qodalis-cli-server-plugin-docker 1.0.0b39__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,89 @@
1
+ /*! @qodalis/console-module-docker 1.0.0-beta.36 */
2
+ var xv=Object.defineProperty;var Cv=(e,t,i)=>t in e?xv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var Sc=(e,t,i)=>Cv(e,typeof t!="symbol"?t+"":t,i);var wc={exports:{}},be={};/**
3
+ * @license React
4
+ * react.production.min.js
5
+ *
6
+ * Copyright (c) Facebook, Inc. and its affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var Hf;function bv(){if(Hf)return be;Hf=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function k(T){return T===null||typeof T!="object"?null:(T=v&&T[v]||T["@@iterator"],typeof T=="function"?T:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,C={};function b(T,U,pe){this.props=T,this.context=U,this.refs=C,this.updater=pe||S}b.prototype.isReactComponent={},b.prototype.setState=function(T,U){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,U,"setState")},b.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function P(){}P.prototype=b.prototype;function j(T,U,pe){this.props=T,this.context=U,this.refs=C,this.updater=pe||S}var E=j.prototype=new P;E.constructor=j,w(E,b.prototype),E.isPureReactComponent=!0;var M=Array.isArray,R=Object.prototype.hasOwnProperty,Q={current:null},J={key:!0,ref:!0,__self:!0,__source:!0};function q(T,U,pe){var ge,W={},ae=null,de=null;if(U!=null)for(ge in U.ref!==void 0&&(de=U.ref),U.key!==void 0&&(ae=""+U.key),U)R.call(U,ge)&&!J.hasOwnProperty(ge)&&(W[ge]=U[ge]);var _e=arguments.length-2;if(_e===1)W.children=pe;else if(1<_e){for(var ke=Array(_e),at=0;at<_e;at++)ke[at]=arguments[at+2];W.children=ke}if(T&&T.defaultProps)for(ge in _e=T.defaultProps,_e)W[ge]===void 0&&(W[ge]=_e[ge]);return{$$typeof:e,type:T,key:ae,ref:de,props:W,_owner:Q.current}}function H(T,U){return{$$typeof:e,type:T.type,key:U,ref:T.ref,props:T.props,_owner:T._owner}}function F(T){return typeof T=="object"&&T!==null&&T.$$typeof===e}function ee(T){var U={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(pe){return U[pe]})}var $=/\/+/g;function z(T,U){return typeof T=="object"&&T!==null&&T.key!=null?ee(""+T.key):U.toString(36)}function K(T,U,pe,ge,W){var ae=typeof T;(ae==="undefined"||ae==="boolean")&&(T=null);var de=!1;if(T===null)de=!0;else switch(ae){case"string":case"number":de=!0;break;case"object":switch(T.$$typeof){case e:case t:de=!0}}if(de)return de=T,W=W(de),T=ge===""?"."+z(de,0):ge,M(W)?(pe="",T!=null&&(pe=T.replace($,"$&/")+"/"),K(W,U,pe,"",function(at){return at})):W!=null&&(F(W)&&(W=H(W,pe+(!W.key||de&&de.key===W.key?"":(""+W.key).replace($,"$&/")+"/")+T)),U.push(W)),1;if(de=0,ge=ge===""?".":ge+":",M(T))for(var _e=0;_e<T.length;_e++){ae=T[_e];var ke=ge+z(ae,_e);de+=K(ae,U,pe,ke,W)}else if(ke=k(T),typeof ke=="function")for(T=ke.call(T),_e=0;!(ae=T.next()).done;)ae=ae.value,ke=ge+z(ae,_e++),de+=K(ae,U,pe,ke,W);else if(ae==="object")throw U=String(T),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return de}function X(T,U,pe){if(T==null)return T;var ge=[],W=0;return K(T,ge,"","",function(ae){return U.call(pe,ae,W++)}),ge}function se(T){if(T._status===-1){var U=T._result;U=U(),U.then(function(pe){(T._status===0||T._status===-1)&&(T._status=1,T._result=pe)},function(pe){(T._status===0||T._status===-1)&&(T._status=2,T._result=pe)}),T._status===-1&&(T._status=0,T._result=U)}if(T._status===1)return T._result.default;throw T._result}var ne={current:null},A={transition:null},oe={ReactCurrentDispatcher:ne,ReactCurrentBatchConfig:A,ReactCurrentOwner:Q};function re(){throw Error("act(...) is not supported in production builds of React.")}return be.Children={map:X,forEach:function(T,U,pe){X(T,function(){U.apply(this,arguments)},pe)},count:function(T){var U=0;return X(T,function(){U++}),U},toArray:function(T){return X(T,function(U){return U})||[]},only:function(T){if(!F(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},be.Component=b,be.Fragment=i,be.Profiler=a,be.PureComponent=j,be.StrictMode=n,be.Suspense=g,be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,be.act=re,be.cloneElement=function(T,U,pe){if(T==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+T+".");var ge=w({},T.props),W=T.key,ae=T.ref,de=T._owner;if(U!=null){if(U.ref!==void 0&&(ae=U.ref,de=Q.current),U.key!==void 0&&(W=""+U.key),T.type&&T.type.defaultProps)var _e=T.type.defaultProps;for(ke in U)R.call(U,ke)&&!J.hasOwnProperty(ke)&&(ge[ke]=U[ke]===void 0&&_e!==void 0?_e[ke]:U[ke])}var ke=arguments.length-2;if(ke===1)ge.children=pe;else if(1<ke){_e=Array(ke);for(var at=0;at<ke;at++)_e[at]=arguments[at+2];ge.children=_e}return{$$typeof:e,type:T.type,key:W,ref:ae,props:ge,_owner:de}},be.createContext=function(T){return T={$$typeof:u,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},T.Provider={$$typeof:c,_context:T},T.Consumer=T},be.createElement=q,be.createFactory=function(T){var U=q.bind(null,T);return U.type=T,U},be.createRef=function(){return{current:null}},be.forwardRef=function(T){return{$$typeof:f,render:T}},be.isValidElement=F,be.lazy=function(T){return{$$typeof:y,_payload:{_status:-1,_result:T},_init:se}},be.memo=function(T,U){return{$$typeof:p,type:T,compare:U===void 0?null:U}},be.startTransition=function(T){var U=A.transition;A.transition={};try{T()}finally{A.transition=U}},be.unstable_act=re,be.useCallback=function(T,U){return ne.current.useCallback(T,U)},be.useContext=function(T){return ne.current.useContext(T)},be.useDebugValue=function(){},be.useDeferredValue=function(T){return ne.current.useDeferredValue(T)},be.useEffect=function(T,U){return ne.current.useEffect(T,U)},be.useId=function(){return ne.current.useId()},be.useImperativeHandle=function(T,U,pe){return ne.current.useImperativeHandle(T,U,pe)},be.useInsertionEffect=function(T,U){return ne.current.useInsertionEffect(T,U)},be.useLayoutEffect=function(T,U){return ne.current.useLayoutEffect(T,U)},be.useMemo=function(T,U){return ne.current.useMemo(T,U)},be.useReducer=function(T,U,pe){return ne.current.useReducer(T,U,pe)},be.useRef=function(T){return ne.current.useRef(T)},be.useState=function(T){return ne.current.useState(T)},be.useSyncExternalStore=function(T,U,pe){return ne.current.useSyncExternalStore(T,U,pe)},be.useTransition=function(){return ne.current.useTransition()},be.version="18.3.1",be}var $f;function Nu(){return $f||($f=1,wc.exports=bv()),wc.exports}var I=Nu(),kc={exports:{}},dn={};/**
11
+ * @license React
12
+ * react-jsx-runtime.production.min.js
13
+ *
14
+ * Copyright (c) Facebook, Inc. and its affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var Uf;function Ev(){if(Uf)return dn;Uf=1;var e=Nu(),t=Symbol.for("react.element"),i=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function u(f,g,p){var y,v={},k=null,S=null;p!==void 0&&(k=""+p),g.key!==void 0&&(k=""+g.key),g.ref!==void 0&&(S=g.ref);for(y in g)n.call(g,y)&&!c.hasOwnProperty(y)&&(v[y]=g[y]);if(f&&f.defaultProps)for(y in g=f.defaultProps,g)v[y]===void 0&&(v[y]=g[y]);return{$$typeof:t,type:f,key:k,ref:S,props:v,_owner:a.current}}return dn.Fragment=i,dn.jsx=u,dn.jsxs=u,dn}var Wf;function Dv(){return Wf||(Wf=1,kc.exports=Ev()),kc.exports}var d=Dv(),Qo={},xc={exports:{}},jt={},Cc={exports:{}},bc={};/**
19
+ * @license React
20
+ * scheduler.production.min.js
21
+ *
22
+ * Copyright (c) Facebook, Inc. and its affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var Vf;function Nv(){return Vf||(Vf=1,(function(e){function t(A,oe){var re=A.length;A.push(oe);e:for(;0<re;){var T=re-1>>>1,U=A[T];if(0<a(U,oe))A[T]=oe,A[re]=U,re=T;else break e}}function i(A){return A.length===0?null:A[0]}function n(A){if(A.length===0)return null;var oe=A[0],re=A.pop();if(re!==oe){A[0]=re;e:for(var T=0,U=A.length,pe=U>>>1;T<pe;){var ge=2*(T+1)-1,W=A[ge],ae=ge+1,de=A[ae];if(0>a(W,re))ae<U&&0>a(de,W)?(A[T]=de,A[ae]=re,T=ae):(A[T]=W,A[ge]=re,T=ge);else if(ae<U&&0>a(de,re))A[T]=de,A[ae]=re,T=ae;else break e}}return oe}function a(A,oe){var re=A.sortIndex-oe.sortIndex;return re!==0?re:A.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var g=[],p=[],y=1,v=null,k=3,S=!1,w=!1,C=!1,b=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(A){for(var oe=i(p);oe!==null;){if(oe.callback===null)n(p);else if(oe.startTime<=A)n(p),oe.sortIndex=oe.expirationTime,t(g,oe);else break;oe=i(p)}}function M(A){if(C=!1,E(A),!w)if(i(g)!==null)w=!0,se(R);else{var oe=i(p);oe!==null&&ne(M,oe.startTime-A)}}function R(A,oe){w=!1,C&&(C=!1,P(q),q=-1),S=!0;var re=k;try{for(E(oe),v=i(g);v!==null&&(!(v.expirationTime>oe)||A&&!ee());){var T=v.callback;if(typeof T=="function"){v.callback=null,k=v.priorityLevel;var U=T(v.expirationTime<=oe);oe=e.unstable_now(),typeof U=="function"?v.callback=U:v===i(g)&&n(g),E(oe)}else n(g);v=i(g)}if(v!==null)var pe=!0;else{var ge=i(p);ge!==null&&ne(M,ge.startTime-oe),pe=!1}return pe}finally{v=null,k=re,S=!1}}var Q=!1,J=null,q=-1,H=5,F=-1;function ee(){return!(e.unstable_now()-F<H)}function $(){if(J!==null){var A=e.unstable_now();F=A;var oe=!0;try{oe=J(!0,A)}finally{oe?z():(Q=!1,J=null)}}else Q=!1}var z;if(typeof j=="function")z=function(){j($)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,X=K.port2;K.port1.onmessage=$,z=function(){X.postMessage(null)}}else z=function(){b($,0)};function se(A){J=A,Q||(Q=!0,z())}function ne(A,oe){q=b(function(){A(e.unstable_now())},oe)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_continueExecution=function(){w||S||(w=!0,se(R))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return k},e.unstable_getFirstCallbackNode=function(){return i(g)},e.unstable_next=function(A){switch(k){case 1:case 2:case 3:var oe=3;break;default:oe=k}var re=k;k=oe;try{return A()}finally{k=re}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,oe){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var re=k;k=A;try{return oe()}finally{k=re}},e.unstable_scheduleCallback=function(A,oe,re){var T=e.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?T+re:T):re=T,A){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=re+U,A={id:y++,callback:oe,priorityLevel:A,startTime:re,expirationTime:U,sortIndex:-1},re>T?(A.sortIndex=re,t(p,A),i(g)===null&&A===i(p)&&(C?(P(q),q=-1):C=!0,ne(M,re-T))):(A.sortIndex=U,t(g,A),w||S||(w=!0,se(R))),A},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(A){var oe=k;return function(){var re=k;k=oe;try{return A.apply(this,arguments)}finally{k=re}}}})(bc)),bc}var Kf;function Pv(){return Kf||(Kf=1,Cc.exports=Nv()),Cc.exports}/**
27
+ * @license React
28
+ * react-dom.production.min.js
29
+ *
30
+ * Copyright (c) Facebook, Inc. and its affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var qf;function Mv(){if(qf)return jt;qf=1;var e=Nu(),t=Pv();function i(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,o=1;o<arguments.length;o++)s+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,a={};function c(r,s){u(r,s),u(r+"Capture",s)}function u(r,s){for(a[r]=s,r=0;r<s.length;r++)n.add(s[r])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,p=/^[: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={},v={};function k(r){return g.call(v,r)?!0:g.call(y,r)?!1:p.test(r)?v[r]=!0:(y[r]=!0,!1)}function S(r,s,o,l){if(o!==null&&o.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return l?!1:o!==null?!o.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function w(r,s,o,l){if(s===null||typeof s>"u"||S(r,s,o,l))return!0;if(l)return!1;if(o!==null)switch(o.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function C(r,s,o,l,h,m,_){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=l,this.attributeNamespace=h,this.mustUseProperty=o,this.propertyName=r,this.type=s,this.sanitizeURL=m,this.removeEmptyString=_}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){b[r]=new C(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];b[s]=new C(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){b[r]=new C(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){b[r]=new C(r,2,!1,r,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(r){b[r]=new C(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){b[r]=new C(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){b[r]=new C(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){b[r]=new C(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){b[r]=new C(r,5,!1,r.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function j(r){return r[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(r){var s=r.replace(P,j);b[s]=new C(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(P,j);b[s]=new C(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(P,j);b[s]=new C(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){b[r]=new C(r,1,!1,r.toLowerCase(),null,!1,!1)}),b.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){b[r]=new C(r,1,!1,r.toLowerCase(),null,!0,!0)});function E(r,s,o,l){var h=b.hasOwnProperty(s)?b[s]:null;(h!==null?h.type!==0:l||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(w(s,o,h,l)&&(o=null),l||h===null?k(s)&&(o===null?r.removeAttribute(s):r.setAttribute(s,""+o)):h.mustUseProperty?r[h.propertyName]=o===null?h.type===3?!1:"":o:(s=h.attributeName,l=h.attributeNamespace,o===null?r.removeAttribute(s):(h=h.type,o=h===3||h===4&&o===!0?"":""+o,l?r.setAttributeNS(l,s,o):r.setAttribute(s,o))))}var M=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,R=Symbol.for("react.element"),Q=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),ee=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),ne=Symbol.for("react.offscreen"),A=Symbol.iterator;function oe(r){return r===null||typeof r!="object"?null:(r=A&&r[A]||r["@@iterator"],typeof r=="function"?r:null)}var re=Object.assign,T;function U(r){if(T===void 0)try{throw Error()}catch(o){var s=o.stack.trim().match(/\n( *(at )?)/);T=s&&s[1]||""}return`
35
+ `+T+r}var pe=!1;function ge(r,s){if(!r||pe)return"";pe=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(O){var l=O}Reflect.construct(r,[],s)}else{try{s.call()}catch(O){l=O}r.call(s.prototype)}else{try{throw Error()}catch(O){l=O}r()}}catch(O){if(O&&l&&typeof O.stack=="string"){for(var h=O.stack.split(`
36
+ `),m=l.stack.split(`
37
+ `),_=h.length-1,x=m.length-1;1<=_&&0<=x&&h[_]!==m[x];)x--;for(;1<=_&&0<=x;_--,x--)if(h[_]!==m[x]){if(_!==1||x!==1)do if(_--,x--,0>x||h[_]!==m[x]){var D=`
38
+ `+h[_].replace(" at new "," at ");return r.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",r.displayName)),D}while(1<=_&&0<=x);break}}}finally{pe=!1,Error.prepareStackTrace=o}return(r=r?r.displayName||r.name:"")?U(r):""}function W(r){switch(r.tag){case 5:return U(r.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return r=ge(r.type,!1),r;case 11:return r=ge(r.type.render,!1),r;case 1:return r=ge(r.type,!0),r;default:return""}}function ae(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case J:return"Fragment";case Q:return"Portal";case H:return"Profiler";case q:return"StrictMode";case z:return"Suspense";case K:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case ee:return(r.displayName||"Context")+".Consumer";case F:return(r._context.displayName||"Context")+".Provider";case $:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case X:return s=r.displayName||null,s!==null?s:ae(r.type)||"Memo";case se:s=r._payload,r=r._init;try{return ae(r(s))}catch{}}return null}function de(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ae(s);case 8:return s===q?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function _e(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ke(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function at(r){var s=ke(r)?"checked":"value",o=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),l=""+r[s];if(!r.hasOwnProperty(s)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,m=o.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return h.call(this)},set:function(_){l=""+_,m.call(this,_)}}),Object.defineProperty(r,s,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(_){l=""+_},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function _r(r){r._valueTracker||(r._valueTracker=at(r))}function ar(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var o=s.getValue(),l="";return r&&(l=ke(r)?r.checked?"true":"false":r.value),r=l,r!==o?(s.setValue(r),!0):!1}function Ee(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function ks(r,s){var o=s.checked;return re({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??r._wrapperState.initialChecked})}function qu(r,s){var o=s.defaultValue==null?"":s.defaultValue,l=s.checked!=null?s.checked:s.defaultChecked;o=_e(s.value!=null?s.value:o),r._wrapperState={initialChecked:l,initialValue:o,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Yu(r,s){s=s.checked,s!=null&&E(r,"checked",s,!1)}function Na(r,s){Yu(r,s);var o=_e(s.value),l=s.type;if(o!=null)l==="number"?(o===0&&r.value===""||r.value!=o)&&(r.value=""+o):r.value!==""+o&&(r.value=""+o);else if(l==="submit"||l==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?Pa(r,s.type,o):s.hasOwnProperty("defaultValue")&&Pa(r,s.type,_e(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function Gu(r,s,o){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var l=s.type;if(!(l!=="submit"&&l!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,o||s===r.value||(r.value=s),r.defaultValue=s}o=r.name,o!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,o!==""&&(r.name=o)}function Pa(r,s,o){(s!=="number"||Ee(r.ownerDocument)!==r)&&(o==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+o&&(r.defaultValue=""+o))}var Ei=Array.isArray;function Ws(r,s,o,l){if(r=r.options,s){s={};for(var h=0;h<o.length;h++)s["$"+o[h]]=!0;for(o=0;o<r.length;o++)h=s.hasOwnProperty("$"+r[o].value),r[o].selected!==h&&(r[o].selected=h),h&&l&&(r[o].defaultSelected=!0)}else{for(o=""+_e(o),s=null,h=0;h<r.length;h++){if(r[h].value===o){r[h].selected=!0,l&&(r[h].defaultSelected=!0);return}s!==null||r[h].disabled||(s=r[h])}s!==null&&(s.selected=!0)}}function Ma(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(i(91));return re({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function Xu(r,s){var o=s.value;if(o==null){if(o=s.children,s=s.defaultValue,o!=null){if(s!=null)throw Error(i(92));if(Ei(o)){if(1<o.length)throw Error(i(93));o=o[0]}s=o}s==null&&(s=""),o=s}r._wrapperState={initialValue:_e(o)}}function Zu(r,s){var o=_e(s.value),l=_e(s.defaultValue);o!=null&&(o=""+o,o!==r.value&&(r.value=o),s.defaultValue==null&&r.defaultValue!==o&&(r.defaultValue=o)),l!=null&&(r.defaultValue=""+l)}function Qu(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function Ju(r){switch(r){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 Ta(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?Ju(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Un,eh=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,o,l,h){MSApp.execUnsafeLocalFunction(function(){return r(s,o,l,h)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(Un=Un||document.createElement("div"),Un.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Un.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function Di(r,s){if(s){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=s;return}}r.textContent=s}var Ni={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},Dg=["Webkit","ms","Moz","O"];Object.keys(Ni).forEach(function(r){Dg.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),Ni[s]=Ni[r]})});function th(r,s,o){return s==null||typeof s=="boolean"||s===""?"":o||typeof s!="number"||s===0||Ni.hasOwnProperty(r)&&Ni[r]?(""+s).trim():s+"px"}function rh(r,s){r=r.style;for(var o in s)if(s.hasOwnProperty(o)){var l=o.indexOf("--")===0,h=th(o,s[o],l);o==="float"&&(o="cssFloat"),l?r.setProperty(o,h):r[o]=h}}var Ng=re({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 Ra(r,s){if(s){if(Ng[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(i(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(i(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(i(61))}if(s.style!=null&&typeof s.style!="object")throw Error(i(62))}}function La(r,s){if(r.indexOf("-")===-1)return typeof s.is=="string";switch(r){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 Ia=null;function Ba(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Aa=null,Vs=null,Ks=null;function sh(r){if(r=Xi(r)){if(typeof Aa!="function")throw Error(i(280));var s=r.stateNode;s&&(s=fo(s),Aa(r.stateNode,r.type,s))}}function ih(r){Vs?Ks?Ks.push(r):Ks=[r]:Vs=r}function nh(){if(Vs){var r=Vs,s=Ks;if(Ks=Vs=null,sh(r),s)for(r=0;r<s.length;r++)sh(s[r])}}function oh(r,s){return r(s)}function ah(){}var Oa=!1;function lh(r,s,o){if(Oa)return r(s,o);Oa=!0;try{return oh(r,s,o)}finally{Oa=!1,(Vs!==null||Ks!==null)&&(ah(),nh())}}function Pi(r,s){var o=r.stateNode;if(o===null)return null;var l=fo(o);if(l===null)return null;o=l[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(r=r.type,l=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!l;break e;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(i(231,s,typeof o));return o}var za=!1;if(f)try{var Mi={};Object.defineProperty(Mi,"passive",{get:function(){za=!0}}),window.addEventListener("test",Mi,Mi),window.removeEventListener("test",Mi,Mi)}catch{za=!1}function Pg(r,s,o,l,h,m,_,x,D){var O=Array.prototype.slice.call(arguments,3);try{s.apply(o,O)}catch(G){this.onError(G)}}var Ti=!1,Wn=null,Vn=!1,ja=null,Mg={onError:function(r){Ti=!0,Wn=r}};function Tg(r,s,o,l,h,m,_,x,D){Ti=!1,Wn=null,Pg.apply(Mg,arguments)}function Rg(r,s,o,l,h,m,_,x,D){if(Tg.apply(this,arguments),Ti){if(Ti){var O=Wn;Ti=!1,Wn=null}else throw Error(i(198));Vn||(Vn=!0,ja=O)}}function xs(r){var s=r,o=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(o=s.return),r=s.return;while(r)}return s.tag===3?o:null}function ch(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function uh(r){if(xs(r)!==r)throw Error(i(188))}function Lg(r){var s=r.alternate;if(!s){if(s=xs(r),s===null)throw Error(i(188));return s!==r?null:r}for(var o=r,l=s;;){var h=o.return;if(h===null)break;var m=h.alternate;if(m===null){if(l=h.return,l!==null){o=l;continue}break}if(h.child===m.child){for(m=h.child;m;){if(m===o)return uh(h),r;if(m===l)return uh(h),s;m=m.sibling}throw Error(i(188))}if(o.return!==l.return)o=h,l=m;else{for(var _=!1,x=h.child;x;){if(x===o){_=!0,o=h,l=m;break}if(x===l){_=!0,l=h,o=m;break}x=x.sibling}if(!_){for(x=m.child;x;){if(x===o){_=!0,o=m,l=h;break}if(x===l){_=!0,l=m,o=h;break}x=x.sibling}if(!_)throw Error(i(189))}}if(o.alternate!==l)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?r:s}function hh(r){return r=Lg(r),r!==null?dh(r):null}function dh(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=dh(r);if(s!==null)return s;r=r.sibling}return null}var fh=t.unstable_scheduleCallback,mh=t.unstable_cancelCallback,Ig=t.unstable_shouldYield,Bg=t.unstable_requestPaint,qe=t.unstable_now,Ag=t.unstable_getCurrentPriorityLevel,Fa=t.unstable_ImmediatePriority,ph=t.unstable_UserBlockingPriority,Kn=t.unstable_NormalPriority,Og=t.unstable_LowPriority,gh=t.unstable_IdlePriority,qn=null,vr=null;function zg(r){if(vr&&typeof vr.onCommitFiberRoot=="function")try{vr.onCommitFiberRoot(qn,r,void 0,(r.current.flags&128)===128)}catch{}}var lr=Math.clz32?Math.clz32:Hg,jg=Math.log,Fg=Math.LN2;function Hg(r){return r>>>=0,r===0?32:31-(jg(r)/Fg|0)|0}var Yn=64,Gn=4194304;function Ri(r){switch(r&-r){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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Xn(r,s){var o=r.pendingLanes;if(o===0)return 0;var l=0,h=r.suspendedLanes,m=r.pingedLanes,_=o&268435455;if(_!==0){var x=_&~h;x!==0?l=Ri(x):(m&=_,m!==0&&(l=Ri(m)))}else _=o&~h,_!==0?l=Ri(_):m!==0&&(l=Ri(m));if(l===0)return 0;if(s!==0&&s!==l&&(s&h)===0&&(h=l&-l,m=s&-s,h>=m||h===16&&(m&4194240)!==0))return s;if((l&4)!==0&&(l|=o&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=l;0<s;)o=31-lr(s),h=1<<o,l|=r[o],s&=~h;return l}function $g(r,s){switch(r){case 1:case 2:case 4:return s+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 s+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 Ug(r,s){for(var o=r.suspendedLanes,l=r.pingedLanes,h=r.expirationTimes,m=r.pendingLanes;0<m;){var _=31-lr(m),x=1<<_,D=h[_];D===-1?((x&o)===0||(x&l)!==0)&&(h[_]=$g(x,s)):D<=s&&(r.expiredLanes|=x),m&=~x}}function Ha(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function _h(){var r=Yn;return Yn<<=1,(Yn&4194240)===0&&(Yn=64),r}function $a(r){for(var s=[],o=0;31>o;o++)s.push(r);return s}function Li(r,s,o){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-lr(s),r[s]=o}function Wg(r,s){var o=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var l=r.eventTimes;for(r=r.expirationTimes;0<o;){var h=31-lr(o),m=1<<h;s[h]=0,l[h]=-1,r[h]=-1,o&=~m}}function Ua(r,s){var o=r.entangledLanes|=s;for(r=r.entanglements;o;){var l=31-lr(o),h=1<<l;h&s|r[l]&s&&(r[l]|=s),o&=~h}}var Te=0;function vh(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var yh,Wa,Sh,wh,kh,Va=!1,Zn=[],Kr=null,qr=null,Yr=null,Ii=new Map,Bi=new Map,Gr=[],Vg="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 xh(r,s){switch(r){case"focusin":case"focusout":Kr=null;break;case"dragenter":case"dragleave":qr=null;break;case"mouseover":case"mouseout":Yr=null;break;case"pointerover":case"pointerout":Ii.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bi.delete(s.pointerId)}}function Ai(r,s,o,l,h,m){return r===null||r.nativeEvent!==m?(r={blockedOn:s,domEventName:o,eventSystemFlags:l,nativeEvent:m,targetContainers:[h]},s!==null&&(s=Xi(s),s!==null&&Wa(s)),r):(r.eventSystemFlags|=l,s=r.targetContainers,h!==null&&s.indexOf(h)===-1&&s.push(h),r)}function Kg(r,s,o,l,h){switch(s){case"focusin":return Kr=Ai(Kr,r,s,o,l,h),!0;case"dragenter":return qr=Ai(qr,r,s,o,l,h),!0;case"mouseover":return Yr=Ai(Yr,r,s,o,l,h),!0;case"pointerover":var m=h.pointerId;return Ii.set(m,Ai(Ii.get(m)||null,r,s,o,l,h)),!0;case"gotpointercapture":return m=h.pointerId,Bi.set(m,Ai(Bi.get(m)||null,r,s,o,l,h)),!0}return!1}function Ch(r){var s=Cs(r.target);if(s!==null){var o=xs(s);if(o!==null){if(s=o.tag,s===13){if(s=ch(o),s!==null){r.blockedOn=s,kh(r.priority,function(){Sh(o)});return}}else if(s===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Qn(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var o=qa(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(o===null){o=r.nativeEvent;var l=new o.constructor(o.type,o);Ia=l,o.target.dispatchEvent(l),Ia=null}else return s=Xi(o),s!==null&&Wa(s),r.blockedOn=o,!1;s.shift()}return!0}function bh(r,s,o){Qn(r)&&o.delete(s)}function qg(){Va=!1,Kr!==null&&Qn(Kr)&&(Kr=null),qr!==null&&Qn(qr)&&(qr=null),Yr!==null&&Qn(Yr)&&(Yr=null),Ii.forEach(bh),Bi.forEach(bh)}function Oi(r,s){r.blockedOn===s&&(r.blockedOn=null,Va||(Va=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qg)))}function zi(r){function s(h){return Oi(h,r)}if(0<Zn.length){Oi(Zn[0],r);for(var o=1;o<Zn.length;o++){var l=Zn[o];l.blockedOn===r&&(l.blockedOn=null)}}for(Kr!==null&&Oi(Kr,r),qr!==null&&Oi(qr,r),Yr!==null&&Oi(Yr,r),Ii.forEach(s),Bi.forEach(s),o=0;o<Gr.length;o++)l=Gr[o],l.blockedOn===r&&(l.blockedOn=null);for(;0<Gr.length&&(o=Gr[0],o.blockedOn===null);)Ch(o),o.blockedOn===null&&Gr.shift()}var qs=M.ReactCurrentBatchConfig,Jn=!0;function Yg(r,s,o,l){var h=Te,m=qs.transition;qs.transition=null;try{Te=1,Ka(r,s,o,l)}finally{Te=h,qs.transition=m}}function Gg(r,s,o,l){var h=Te,m=qs.transition;qs.transition=null;try{Te=4,Ka(r,s,o,l)}finally{Te=h,qs.transition=m}}function Ka(r,s,o,l){if(Jn){var h=qa(r,s,o,l);if(h===null)ul(r,s,l,eo,o),xh(r,l);else if(Kg(h,r,s,o,l))l.stopPropagation();else if(xh(r,l),s&4&&-1<Vg.indexOf(r)){for(;h!==null;){var m=Xi(h);if(m!==null&&yh(m),m=qa(r,s,o,l),m===null&&ul(r,s,l,eo,o),m===h)break;h=m}h!==null&&l.stopPropagation()}else ul(r,s,l,null,o)}}var eo=null;function qa(r,s,o,l){if(eo=null,r=Ba(l),r=Cs(r),r!==null)if(s=xs(r),s===null)r=null;else if(o=s.tag,o===13){if(r=ch(s),r!==null)return r;r=null}else if(o===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return eo=r,null}function Eh(r){switch(r){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(Ag()){case Fa:return 1;case ph:return 4;case Kn:case Og:return 16;case gh:return 536870912;default:return 16}default:return 16}}var Xr=null,Ya=null,to=null;function Dh(){if(to)return to;var r,s=Ya,o=s.length,l,h="value"in Xr?Xr.value:Xr.textContent,m=h.length;for(r=0;r<o&&s[r]===h[r];r++);var _=o-r;for(l=1;l<=_&&s[o-l]===h[m-l];l++);return to=h.slice(r,1<l?1-l:void 0)}function ro(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function so(){return!0}function Nh(){return!1}function $t(r){function s(o,l,h,m,_){this._reactName=o,this._targetInst=h,this.type=l,this.nativeEvent=m,this.target=_,this.currentTarget=null;for(var x in r)r.hasOwnProperty(x)&&(o=r[x],this[x]=o?o(m):m[x]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?so:Nh,this.isPropagationStopped=Nh,this}return re(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=so)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=so)},persist:function(){},isPersistent:so}),s}var Ys={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ga=$t(Ys),ji=re({},Ys,{view:0,detail:0}),Xg=$t(ji),Xa,Za,Fi,io=re({},ji,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ja,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Fi&&(Fi&&r.type==="mousemove"?(Xa=r.screenX-Fi.screenX,Za=r.screenY-Fi.screenY):Za=Xa=0,Fi=r),Xa)},movementY:function(r){return"movementY"in r?r.movementY:Za}}),Ph=$t(io),Zg=re({},io,{dataTransfer:0}),Qg=$t(Zg),Jg=re({},ji,{relatedTarget:0}),Qa=$t(Jg),e_=re({},Ys,{animationName:0,elapsedTime:0,pseudoElement:0}),t_=$t(e_),r_=re({},Ys,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),s_=$t(r_),i_=re({},Ys,{data:0}),Mh=$t(i_),n_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},o_={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"},a_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function l_(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=a_[r])?!!s[r]:!1}function Ja(){return l_}var c_=re({},ji,{key:function(r){if(r.key){var s=n_[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=ro(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?o_[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ja,charCode:function(r){return r.type==="keypress"?ro(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?ro(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),u_=$t(c_),h_=re({},io,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Th=$t(h_),d_=re({},ji,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ja}),f_=$t(d_),m_=re({},Ys,{propertyName:0,elapsedTime:0,pseudoElement:0}),p_=$t(m_),g_=re({},io,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),__=$t(g_),v_=[9,13,27,32],el=f&&"CompositionEvent"in window,Hi=null;f&&"documentMode"in document&&(Hi=document.documentMode);var y_=f&&"TextEvent"in window&&!Hi,Rh=f&&(!el||Hi&&8<Hi&&11>=Hi),Lh=" ",Ih=!1;function Bh(r,s){switch(r){case"keyup":return v_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ah(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Gs=!1;function S_(r,s){switch(r){case"compositionend":return Ah(s);case"keypress":return s.which!==32?null:(Ih=!0,Lh);case"textInput":return r=s.data,r===Lh&&Ih?null:r;default:return null}}function w_(r,s){if(Gs)return r==="compositionend"||!el&&Bh(r,s)?(r=Dh(),to=Ya=Xr=null,Gs=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Rh&&s.locale!=="ko"?null:s.data;default:return null}}var k_={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 Oh(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!k_[r.type]:s==="textarea"}function zh(r,s,o,l){ih(l),s=co(s,"onChange"),0<s.length&&(o=new Ga("onChange","change",null,o,l),r.push({event:o,listeners:s}))}var $i=null,Ui=null;function x_(r){rd(r,0)}function no(r){var s=ei(r);if(ar(s))return r}function C_(r,s){if(r==="change")return s}var jh=!1;if(f){var tl;if(f){var rl="oninput"in document;if(!rl){var Fh=document.createElement("div");Fh.setAttribute("oninput","return;"),rl=typeof Fh.oninput=="function"}tl=rl}else tl=!1;jh=tl&&(!document.documentMode||9<document.documentMode)}function Hh(){$i&&($i.detachEvent("onpropertychange",$h),Ui=$i=null)}function $h(r){if(r.propertyName==="value"&&no(Ui)){var s=[];zh(s,Ui,r,Ba(r)),lh(x_,s)}}function b_(r,s,o){r==="focusin"?(Hh(),$i=s,Ui=o,$i.attachEvent("onpropertychange",$h)):r==="focusout"&&Hh()}function E_(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return no(Ui)}function D_(r,s){if(r==="click")return no(s)}function N_(r,s){if(r==="input"||r==="change")return no(s)}function P_(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var cr=typeof Object.is=="function"?Object.is:P_;function Wi(r,s){if(cr(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var o=Object.keys(r),l=Object.keys(s);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++){var h=o[l];if(!g.call(s,h)||!cr(r[h],s[h]))return!1}return!0}function Uh(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Wh(r,s){var o=Uh(r);r=0;for(var l;o;){if(o.nodeType===3){if(l=r+o.textContent.length,r<=s&&l>=s)return{node:o,offset:s-r};r=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Uh(o)}}function Vh(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?Vh(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Kh(){for(var r=window,s=Ee();s instanceof r.HTMLIFrameElement;){try{var o=typeof s.contentWindow.location.href=="string"}catch{o=!1}if(o)r=s.contentWindow;else break;s=Ee(r.document)}return s}function sl(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function M_(r){var s=Kh(),o=r.focusedElem,l=r.selectionRange;if(s!==o&&o&&o.ownerDocument&&Vh(o.ownerDocument.documentElement,o)){if(l!==null&&sl(o)){if(s=l.start,r=l.end,r===void 0&&(r=s),"selectionStart"in o)o.selectionStart=s,o.selectionEnd=Math.min(r,o.value.length);else if(r=(s=o.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var h=o.textContent.length,m=Math.min(l.start,h);l=l.end===void 0?m:Math.min(l.end,h),!r.extend&&m>l&&(h=l,l=m,m=h),h=Wh(o,m);var _=Wh(o,l);h&&_&&(r.rangeCount!==1||r.anchorNode!==h.node||r.anchorOffset!==h.offset||r.focusNode!==_.node||r.focusOffset!==_.offset)&&(s=s.createRange(),s.setStart(h.node,h.offset),r.removeAllRanges(),m>l?(r.addRange(s),r.extend(_.node,_.offset)):(s.setEnd(_.node,_.offset),r.addRange(s)))}}for(s=[],r=o;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<s.length;o++)r=s[o],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var T_=f&&"documentMode"in document&&11>=document.documentMode,Xs=null,il=null,Vi=null,nl=!1;function qh(r,s,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;nl||Xs==null||Xs!==Ee(l)||(l=Xs,"selectionStart"in l&&sl(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Vi&&Wi(Vi,l)||(Vi=l,l=co(il,"onSelect"),0<l.length&&(s=new Ga("onSelect","select",null,s,o),r.push({event:s,listeners:l}),s.target=Xs)))}function oo(r,s){var o={};return o[r.toLowerCase()]=s.toLowerCase(),o["Webkit"+r]="webkit"+s,o["Moz"+r]="moz"+s,o}var Zs={animationend:oo("Animation","AnimationEnd"),animationiteration:oo("Animation","AnimationIteration"),animationstart:oo("Animation","AnimationStart"),transitionend:oo("Transition","TransitionEnd")},ol={},Yh={};f&&(Yh=document.createElement("div").style,"AnimationEvent"in window||(delete Zs.animationend.animation,delete Zs.animationiteration.animation,delete Zs.animationstart.animation),"TransitionEvent"in window||delete Zs.transitionend.transition);function ao(r){if(ol[r])return ol[r];if(!Zs[r])return r;var s=Zs[r],o;for(o in s)if(s.hasOwnProperty(o)&&o in Yh)return ol[r]=s[o];return r}var Gh=ao("animationend"),Xh=ao("animationiteration"),Zh=ao("animationstart"),Qh=ao("transitionend"),Jh=new Map,ed="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 Zr(r,s){Jh.set(r,s),c(s,[r])}for(var al=0;al<ed.length;al++){var ll=ed[al],R_=ll.toLowerCase(),L_=ll[0].toUpperCase()+ll.slice(1);Zr(R_,"on"+L_)}Zr(Gh,"onAnimationEnd"),Zr(Xh,"onAnimationIteration"),Zr(Zh,"onAnimationStart"),Zr("dblclick","onDoubleClick"),Zr("focusin","onFocus"),Zr("focusout","onBlur"),Zr(Qh,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ki="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(" "),I_=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ki));function td(r,s,o){var l=r.type||"unknown-event";r.currentTarget=o,Rg(l,s,void 0,r),r.currentTarget=null}function rd(r,s){s=(s&4)!==0;for(var o=0;o<r.length;o++){var l=r[o],h=l.event;l=l.listeners;e:{var m=void 0;if(s)for(var _=l.length-1;0<=_;_--){var x=l[_],D=x.instance,O=x.currentTarget;if(x=x.listener,D!==m&&h.isPropagationStopped())break e;td(h,x,O),m=D}else for(_=0;_<l.length;_++){if(x=l[_],D=x.instance,O=x.currentTarget,x=x.listener,D!==m&&h.isPropagationStopped())break e;td(h,x,O),m=D}}}if(Vn)throw r=ja,Vn=!1,ja=null,r}function Be(r,s){var o=s[gl];o===void 0&&(o=s[gl]=new Set);var l=r+"__bubble";o.has(l)||(sd(s,r,2,!1),o.add(l))}function cl(r,s,o){var l=0;s&&(l|=4),sd(o,r,l,s)}var lo="_reactListening"+Math.random().toString(36).slice(2);function qi(r){if(!r[lo]){r[lo]=!0,n.forEach(function(o){o!=="selectionchange"&&(I_.has(o)||cl(o,!1,r),cl(o,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[lo]||(s[lo]=!0,cl("selectionchange",!1,s))}}function sd(r,s,o,l){switch(Eh(s)){case 1:var h=Yg;break;case 4:h=Gg;break;default:h=Ka}o=h.bind(null,s,o,r),h=void 0,!za||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(h=!0),l?h!==void 0?r.addEventListener(s,o,{capture:!0,passive:h}):r.addEventListener(s,o,!0):h!==void 0?r.addEventListener(s,o,{passive:h}):r.addEventListener(s,o,!1)}function ul(r,s,o,l,h){var m=l;if((s&1)===0&&(s&2)===0&&l!==null)e:for(;;){if(l===null)return;var _=l.tag;if(_===3||_===4){var x=l.stateNode.containerInfo;if(x===h||x.nodeType===8&&x.parentNode===h)break;if(_===4)for(_=l.return;_!==null;){var D=_.tag;if((D===3||D===4)&&(D=_.stateNode.containerInfo,D===h||D.nodeType===8&&D.parentNode===h))return;_=_.return}for(;x!==null;){if(_=Cs(x),_===null)return;if(D=_.tag,D===5||D===6){l=m=_;continue e}x=x.parentNode}}l=l.return}lh(function(){var O=m,G=Ba(o),Z=[];e:{var Y=Jh.get(r);if(Y!==void 0){var ce=Ga,he=r;switch(r){case"keypress":if(ro(o)===0)break e;case"keydown":case"keyup":ce=u_;break;case"focusin":he="focus",ce=Qa;break;case"focusout":he="blur",ce=Qa;break;case"beforeblur":case"afterblur":ce=Qa;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=Ph;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=Qg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=f_;break;case Gh:case Xh:case Zh:ce=t_;break;case Qh:ce=p_;break;case"scroll":ce=Xg;break;case"wheel":ce=__;break;case"copy":case"cut":case"paste":ce=s_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=Th}var fe=(s&4)!==0,Ye=!fe&&r==="scroll",L=fe?Y!==null?Y+"Capture":null:Y;fe=[];for(var N=O,B;N!==null;){B=N;var te=B.stateNode;if(B.tag===5&&te!==null&&(B=te,L!==null&&(te=Pi(N,L),te!=null&&fe.push(Yi(N,te,B)))),Ye)break;N=N.return}0<fe.length&&(Y=new ce(Y,he,null,o,G),Z.push({event:Y,listeners:fe}))}}if((s&7)===0){e:{if(Y=r==="mouseover"||r==="pointerover",ce=r==="mouseout"||r==="pointerout",Y&&o!==Ia&&(he=o.relatedTarget||o.fromElement)&&(Cs(he)||he[Tr]))break e;if((ce||Y)&&(Y=G.window===G?G:(Y=G.ownerDocument)?Y.defaultView||Y.parentWindow:window,ce?(he=o.relatedTarget||o.toElement,ce=O,he=he?Cs(he):null,he!==null&&(Ye=xs(he),he!==Ye||he.tag!==5&&he.tag!==6)&&(he=null)):(ce=null,he=O),ce!==he)){if(fe=Ph,te="onMouseLeave",L="onMouseEnter",N="mouse",(r==="pointerout"||r==="pointerover")&&(fe=Th,te="onPointerLeave",L="onPointerEnter",N="pointer"),Ye=ce==null?Y:ei(ce),B=he==null?Y:ei(he),Y=new fe(te,N+"leave",ce,o,G),Y.target=Ye,Y.relatedTarget=B,te=null,Cs(G)===O&&(fe=new fe(L,N+"enter",he,o,G),fe.target=B,fe.relatedTarget=Ye,te=fe),Ye=te,ce&&he)t:{for(fe=ce,L=he,N=0,B=fe;B;B=Qs(B))N++;for(B=0,te=L;te;te=Qs(te))B++;for(;0<N-B;)fe=Qs(fe),N--;for(;0<B-N;)L=Qs(L),B--;for(;N--;){if(fe===L||L!==null&&fe===L.alternate)break t;fe=Qs(fe),L=Qs(L)}fe=null}else fe=null;ce!==null&&id(Z,Y,ce,fe,!1),he!==null&&Ye!==null&&id(Z,Ye,he,fe,!0)}}e:{if(Y=O?ei(O):window,ce=Y.nodeName&&Y.nodeName.toLowerCase(),ce==="select"||ce==="input"&&Y.type==="file")var me=C_;else if(Oh(Y))if(jh)me=N_;else{me=E_;var ve=b_}else(ce=Y.nodeName)&&ce.toLowerCase()==="input"&&(Y.type==="checkbox"||Y.type==="radio")&&(me=D_);if(me&&(me=me(r,O))){zh(Z,me,o,G);break e}ve&&ve(r,Y,O),r==="focusout"&&(ve=Y._wrapperState)&&ve.controlled&&Y.type==="number"&&Pa(Y,"number",Y.value)}switch(ve=O?ei(O):window,r){case"focusin":(Oh(ve)||ve.contentEditable==="true")&&(Xs=ve,il=O,Vi=null);break;case"focusout":Vi=il=Xs=null;break;case"mousedown":nl=!0;break;case"contextmenu":case"mouseup":case"dragend":nl=!1,qh(Z,o,G);break;case"selectionchange":if(T_)break;case"keydown":case"keyup":qh(Z,o,G)}var ye;if(el)e:{switch(r){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else Gs?Bh(r,o)&&(Se="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&(Se="onCompositionStart");Se&&(Rh&&o.locale!=="ko"&&(Gs||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Gs&&(ye=Dh()):(Xr=G,Ya="value"in Xr?Xr.value:Xr.textContent,Gs=!0)),ve=co(O,Se),0<ve.length&&(Se=new Mh(Se,r,null,o,G),Z.push({event:Se,listeners:ve}),ye?Se.data=ye:(ye=Ah(o),ye!==null&&(Se.data=ye)))),(ye=y_?S_(r,o):w_(r,o))&&(O=co(O,"onBeforeInput"),0<O.length&&(G=new Mh("onBeforeInput","beforeinput",null,o,G),Z.push({event:G,listeners:O}),G.data=ye))}rd(Z,s)})}function Yi(r,s,o){return{instance:r,listener:s,currentTarget:o}}function co(r,s){for(var o=s+"Capture",l=[];r!==null;){var h=r,m=h.stateNode;h.tag===5&&m!==null&&(h=m,m=Pi(r,o),m!=null&&l.unshift(Yi(r,m,h)),m=Pi(r,s),m!=null&&l.push(Yi(r,m,h))),r=r.return}return l}function Qs(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function id(r,s,o,l,h){for(var m=s._reactName,_=[];o!==null&&o!==l;){var x=o,D=x.alternate,O=x.stateNode;if(D!==null&&D===l)break;x.tag===5&&O!==null&&(x=O,h?(D=Pi(o,m),D!=null&&_.unshift(Yi(o,D,x))):h||(D=Pi(o,m),D!=null&&_.push(Yi(o,D,x)))),o=o.return}_.length!==0&&r.push({event:s,listeners:_})}var B_=/\r\n?/g,A_=/\u0000|\uFFFD/g;function nd(r){return(typeof r=="string"?r:""+r).replace(B_,`
39
+ `).replace(A_,"")}function uo(r,s,o){if(s=nd(s),nd(r)!==s&&o)throw Error(i(425))}function ho(){}var hl=null,dl=null;function fl(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var ml=typeof setTimeout=="function"?setTimeout:void 0,O_=typeof clearTimeout=="function"?clearTimeout:void 0,od=typeof Promise=="function"?Promise:void 0,z_=typeof queueMicrotask=="function"?queueMicrotask:typeof od<"u"?function(r){return od.resolve(null).then(r).catch(j_)}:ml;function j_(r){setTimeout(function(){throw r})}function pl(r,s){var o=s,l=0;do{var h=o.nextSibling;if(r.removeChild(o),h&&h.nodeType===8)if(o=h.data,o==="/$"){if(l===0){r.removeChild(h),zi(s);return}l--}else o!=="$"&&o!=="$?"&&o!=="$!"||l++;o=h}while(o);zi(s)}function Qr(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function ad(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"){if(s===0)return r;s--}else o==="/$"&&s++}r=r.previousSibling}return null}var Js=Math.random().toString(36).slice(2),yr="__reactFiber$"+Js,Gi="__reactProps$"+Js,Tr="__reactContainer$"+Js,gl="__reactEvents$"+Js,F_="__reactListeners$"+Js,H_="__reactHandles$"+Js;function Cs(r){var s=r[yr];if(s)return s;for(var o=r.parentNode;o;){if(s=o[Tr]||o[yr]){if(o=s.alternate,s.child!==null||o!==null&&o.child!==null)for(r=ad(r);r!==null;){if(o=r[yr])return o;r=ad(r)}return s}r=o,o=r.parentNode}return null}function Xi(r){return r=r[yr]||r[Tr],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function ei(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(i(33))}function fo(r){return r[Gi]||null}var _l=[],ti=-1;function Jr(r){return{current:r}}function Ae(r){0>ti||(r.current=_l[ti],_l[ti]=null,ti--)}function Ie(r,s){ti++,_l[ti]=r.current,r.current=s}var es={},wt=Jr(es),It=Jr(!1),bs=es;function ri(r,s){var o=r.type.contextTypes;if(!o)return es;var l=r.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===s)return l.__reactInternalMemoizedMaskedChildContext;var h={},m;for(m in o)h[m]=s[m];return l&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=h),h}function Bt(r){return r=r.childContextTypes,r!=null}function mo(){Ae(It),Ae(wt)}function ld(r,s,o){if(wt.current!==es)throw Error(i(168));Ie(wt,s),Ie(It,o)}function cd(r,s,o){var l=r.stateNode;if(s=s.childContextTypes,typeof l.getChildContext!="function")return o;l=l.getChildContext();for(var h in l)if(!(h in s))throw Error(i(108,de(r)||"Unknown",h));return re({},o,l)}function po(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||es,bs=wt.current,Ie(wt,r),Ie(It,It.current),!0}function ud(r,s,o){var l=r.stateNode;if(!l)throw Error(i(169));o?(r=cd(r,s,bs),l.__reactInternalMemoizedMergedChildContext=r,Ae(It),Ae(wt),Ie(wt,r)):Ae(It),Ie(It,o)}var Rr=null,go=!1,vl=!1;function hd(r){Rr===null?Rr=[r]:Rr.push(r)}function $_(r){go=!0,hd(r)}function ts(){if(!vl&&Rr!==null){vl=!0;var r=0,s=Te;try{var o=Rr;for(Te=1;r<o.length;r++){var l=o[r];do l=l(!0);while(l!==null)}Rr=null,go=!1}catch(h){throw Rr!==null&&(Rr=Rr.slice(r+1)),fh(Fa,ts),h}finally{Te=s,vl=!1}}return null}var si=[],ii=0,_o=null,vo=0,Xt=[],Zt=0,Es=null,Lr=1,Ir="";function Ds(r,s){si[ii++]=vo,si[ii++]=_o,_o=r,vo=s}function dd(r,s,o){Xt[Zt++]=Lr,Xt[Zt++]=Ir,Xt[Zt++]=Es,Es=r;var l=Lr;r=Ir;var h=32-lr(l)-1;l&=~(1<<h),o+=1;var m=32-lr(s)+h;if(30<m){var _=h-h%5;m=(l&(1<<_)-1).toString(32),l>>=_,h-=_,Lr=1<<32-lr(s)+h|o<<h|l,Ir=m+r}else Lr=1<<m|o<<h|l,Ir=r}function yl(r){r.return!==null&&(Ds(r,1),dd(r,1,0))}function Sl(r){for(;r===_o;)_o=si[--ii],si[ii]=null,vo=si[--ii],si[ii]=null;for(;r===Es;)Es=Xt[--Zt],Xt[Zt]=null,Ir=Xt[--Zt],Xt[Zt]=null,Lr=Xt[--Zt],Xt[Zt]=null}var Ut=null,Wt=null,ze=!1,ur=null;function fd(r,s){var o=tr(5,null,null,0);o.elementType="DELETED",o.stateNode=s,o.return=r,s=r.deletions,s===null?(r.deletions=[o],r.flags|=16):s.push(o)}function md(r,s){switch(r.tag){case 5:var o=r.type;return s=s.nodeType!==1||o.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,Ut=r,Wt=Qr(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,Ut=r,Wt=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(o=Es!==null?{id:Lr,overflow:Ir}:null,r.memoizedState={dehydrated:s,treeContext:o,retryLane:1073741824},o=tr(18,null,null,0),o.stateNode=s,o.return=r,r.child=o,Ut=r,Wt=null,!0):!1;default:return!1}}function wl(r){return(r.mode&1)!==0&&(r.flags&128)===0}function kl(r){if(ze){var s=Wt;if(s){var o=s;if(!md(r,s)){if(wl(r))throw Error(i(418));s=Qr(o.nextSibling);var l=Ut;s&&md(r,s)?fd(l,o):(r.flags=r.flags&-4097|2,ze=!1,Ut=r)}}else{if(wl(r))throw Error(i(418));r.flags=r.flags&-4097|2,ze=!1,Ut=r}}}function pd(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Ut=r}function yo(r){if(r!==Ut)return!1;if(!ze)return pd(r),ze=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!fl(r.type,r.memoizedProps)),s&&(s=Wt)){if(wl(r))throw gd(),Error(i(418));for(;s;)fd(r,s),s=Qr(s.nextSibling)}if(pd(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"){if(s===0){Wt=Qr(r.nextSibling);break e}s--}else o!=="$"&&o!=="$!"&&o!=="$?"||s++}r=r.nextSibling}Wt=null}}else Wt=Ut?Qr(r.stateNode.nextSibling):null;return!0}function gd(){for(var r=Wt;r;)r=Qr(r.nextSibling)}function ni(){Wt=Ut=null,ze=!1}function xl(r){ur===null?ur=[r]:ur.push(r)}var U_=M.ReactCurrentBatchConfig;function Zi(r,s,o){if(r=o.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(i(309));var l=o.stateNode}if(!l)throw Error(i(147,r));var h=l,m=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===m?s.ref:(s=function(_){var x=h.refs;_===null?delete x[m]:x[m]=_},s._stringRef=m,s)}if(typeof r!="string")throw Error(i(284));if(!o._owner)throw Error(i(290,r))}return r}function So(r,s){throw r=Object.prototype.toString.call(s),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function _d(r){var s=r._init;return s(r._payload)}function vd(r){function s(L,N){if(r){var B=L.deletions;B===null?(L.deletions=[N],L.flags|=16):B.push(N)}}function o(L,N){if(!r)return null;for(;N!==null;)s(L,N),N=N.sibling;return null}function l(L,N){for(L=new Map;N!==null;)N.key!==null?L.set(N.key,N):L.set(N.index,N),N=N.sibling;return L}function h(L,N){return L=cs(L,N),L.index=0,L.sibling=null,L}function m(L,N,B){return L.index=B,r?(B=L.alternate,B!==null?(B=B.index,B<N?(L.flags|=2,N):B):(L.flags|=2,N)):(L.flags|=1048576,N)}function _(L){return r&&L.alternate===null&&(L.flags|=2),L}function x(L,N,B,te){return N===null||N.tag!==6?(N=mc(B,L.mode,te),N.return=L,N):(N=h(N,B),N.return=L,N)}function D(L,N,B,te){var me=B.type;return me===J?G(L,N,B.props.children,te,B.key):N!==null&&(N.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===se&&_d(me)===N.type)?(te=h(N,B.props),te.ref=Zi(L,N,B),te.return=L,te):(te=Wo(B.type,B.key,B.props,null,L.mode,te),te.ref=Zi(L,N,B),te.return=L,te)}function O(L,N,B,te){return N===null||N.tag!==4||N.stateNode.containerInfo!==B.containerInfo||N.stateNode.implementation!==B.implementation?(N=pc(B,L.mode,te),N.return=L,N):(N=h(N,B.children||[]),N.return=L,N)}function G(L,N,B,te,me){return N===null||N.tag!==7?(N=Bs(B,L.mode,te,me),N.return=L,N):(N=h(N,B),N.return=L,N)}function Z(L,N,B){if(typeof N=="string"&&N!==""||typeof N=="number")return N=mc(""+N,L.mode,B),N.return=L,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case R:return B=Wo(N.type,N.key,N.props,null,L.mode,B),B.ref=Zi(L,null,N),B.return=L,B;case Q:return N=pc(N,L.mode,B),N.return=L,N;case se:var te=N._init;return Z(L,te(N._payload),B)}if(Ei(N)||oe(N))return N=Bs(N,L.mode,B,null),N.return=L,N;So(L,N)}return null}function Y(L,N,B,te){var me=N!==null?N.key:null;if(typeof B=="string"&&B!==""||typeof B=="number")return me!==null?null:x(L,N,""+B,te);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case R:return B.key===me?D(L,N,B,te):null;case Q:return B.key===me?O(L,N,B,te):null;case se:return me=B._init,Y(L,N,me(B._payload),te)}if(Ei(B)||oe(B))return me!==null?null:G(L,N,B,te,null);So(L,B)}return null}function ce(L,N,B,te,me){if(typeof te=="string"&&te!==""||typeof te=="number")return L=L.get(B)||null,x(N,L,""+te,me);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case R:return L=L.get(te.key===null?B:te.key)||null,D(N,L,te,me);case Q:return L=L.get(te.key===null?B:te.key)||null,O(N,L,te,me);case se:var ve=te._init;return ce(L,N,B,ve(te._payload),me)}if(Ei(te)||oe(te))return L=L.get(B)||null,G(N,L,te,me,null);So(N,te)}return null}function he(L,N,B,te){for(var me=null,ve=null,ye=N,Se=N=0,ut=null;ye!==null&&Se<B.length;Se++){ye.index>Se?(ut=ye,ye=null):ut=ye.sibling;var Pe=Y(L,ye,B[Se],te);if(Pe===null){ye===null&&(ye=ut);break}r&&ye&&Pe.alternate===null&&s(L,ye),N=m(Pe,N,Se),ve===null?me=Pe:ve.sibling=Pe,ve=Pe,ye=ut}if(Se===B.length)return o(L,ye),ze&&Ds(L,Se),me;if(ye===null){for(;Se<B.length;Se++)ye=Z(L,B[Se],te),ye!==null&&(N=m(ye,N,Se),ve===null?me=ye:ve.sibling=ye,ve=ye);return ze&&Ds(L,Se),me}for(ye=l(L,ye);Se<B.length;Se++)ut=ce(ye,L,Se,B[Se],te),ut!==null&&(r&&ut.alternate!==null&&ye.delete(ut.key===null?Se:ut.key),N=m(ut,N,Se),ve===null?me=ut:ve.sibling=ut,ve=ut);return r&&ye.forEach(function(us){return s(L,us)}),ze&&Ds(L,Se),me}function fe(L,N,B,te){var me=oe(B);if(typeof me!="function")throw Error(i(150));if(B=me.call(B),B==null)throw Error(i(151));for(var ve=me=null,ye=N,Se=N=0,ut=null,Pe=B.next();ye!==null&&!Pe.done;Se++,Pe=B.next()){ye.index>Se?(ut=ye,ye=null):ut=ye.sibling;var us=Y(L,ye,Pe.value,te);if(us===null){ye===null&&(ye=ut);break}r&&ye&&us.alternate===null&&s(L,ye),N=m(us,N,Se),ve===null?me=us:ve.sibling=us,ve=us,ye=ut}if(Pe.done)return o(L,ye),ze&&Ds(L,Se),me;if(ye===null){for(;!Pe.done;Se++,Pe=B.next())Pe=Z(L,Pe.value,te),Pe!==null&&(N=m(Pe,N,Se),ve===null?me=Pe:ve.sibling=Pe,ve=Pe);return ze&&Ds(L,Se),me}for(ye=l(L,ye);!Pe.done;Se++,Pe=B.next())Pe=ce(ye,L,Se,Pe.value,te),Pe!==null&&(r&&Pe.alternate!==null&&ye.delete(Pe.key===null?Se:Pe.key),N=m(Pe,N,Se),ve===null?me=Pe:ve.sibling=Pe,ve=Pe);return r&&ye.forEach(function(kv){return s(L,kv)}),ze&&Ds(L,Se),me}function Ye(L,N,B,te){if(typeof B=="object"&&B!==null&&B.type===J&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case R:e:{for(var me=B.key,ve=N;ve!==null;){if(ve.key===me){if(me=B.type,me===J){if(ve.tag===7){o(L,ve.sibling),N=h(ve,B.props.children),N.return=L,L=N;break e}}else if(ve.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===se&&_d(me)===ve.type){o(L,ve.sibling),N=h(ve,B.props),N.ref=Zi(L,ve,B),N.return=L,L=N;break e}o(L,ve);break}else s(L,ve);ve=ve.sibling}B.type===J?(N=Bs(B.props.children,L.mode,te,B.key),N.return=L,L=N):(te=Wo(B.type,B.key,B.props,null,L.mode,te),te.ref=Zi(L,N,B),te.return=L,L=te)}return _(L);case Q:e:{for(ve=B.key;N!==null;){if(N.key===ve)if(N.tag===4&&N.stateNode.containerInfo===B.containerInfo&&N.stateNode.implementation===B.implementation){o(L,N.sibling),N=h(N,B.children||[]),N.return=L,L=N;break e}else{o(L,N);break}else s(L,N);N=N.sibling}N=pc(B,L.mode,te),N.return=L,L=N}return _(L);case se:return ve=B._init,Ye(L,N,ve(B._payload),te)}if(Ei(B))return he(L,N,B,te);if(oe(B))return fe(L,N,B,te);So(L,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,N!==null&&N.tag===6?(o(L,N.sibling),N=h(N,B),N.return=L,L=N):(o(L,N),N=mc(B,L.mode,te),N.return=L,L=N),_(L)):o(L,N)}return Ye}var oi=vd(!0),yd=vd(!1),wo=Jr(null),ko=null,ai=null,Cl=null;function bl(){Cl=ai=ko=null}function El(r){var s=wo.current;Ae(wo),r._currentValue=s}function Dl(r,s,o){for(;r!==null;){var l=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,l!==null&&(l.childLanes|=s)):l!==null&&(l.childLanes&s)!==s&&(l.childLanes|=s),r===o)break;r=r.return}}function li(r,s){ko=r,Cl=ai=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(At=!0),r.firstContext=null)}function Qt(r){var s=r._currentValue;if(Cl!==r)if(r={context:r,memoizedValue:s,next:null},ai===null){if(ko===null)throw Error(i(308));ai=r,ko.dependencies={lanes:0,firstContext:r}}else ai=ai.next=r;return s}var Ns=null;function Nl(r){Ns===null?Ns=[r]:Ns.push(r)}function Sd(r,s,o,l){var h=s.interleaved;return h===null?(o.next=o,Nl(s)):(o.next=h.next,h.next=o),s.interleaved=o,Br(r,l)}function Br(r,s){r.lanes|=s;var o=r.alternate;for(o!==null&&(o.lanes|=s),o=r,r=r.return;r!==null;)r.childLanes|=s,o=r.alternate,o!==null&&(o.childLanes|=s),o=r,r=r.return;return o.tag===3?o.stateNode:null}var rs=!1;function Pl(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wd(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Ar(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function ss(r,s,o){var l=r.updateQueue;if(l===null)return null;if(l=l.shared,(Ne&2)!==0){var h=l.pending;return h===null?s.next=s:(s.next=h.next,h.next=s),l.pending=s,Br(r,o)}return h=l.interleaved,h===null?(s.next=s,Nl(l)):(s.next=h.next,h.next=s),l.interleaved=s,Br(r,o)}function xo(r,s,o){if(s=s.updateQueue,s!==null&&(s=s.shared,(o&4194240)!==0)){var l=s.lanes;l&=r.pendingLanes,o|=l,s.lanes=o,Ua(r,o)}}function kd(r,s){var o=r.updateQueue,l=r.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var h=null,m=null;if(o=o.firstBaseUpdate,o!==null){do{var _={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};m===null?h=m=_:m=m.next=_,o=o.next}while(o!==null);m===null?h=m=s:m=m.next=s}else h=m=s;o={baseState:l.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:l.shared,effects:l.effects},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=s:r.next=s,o.lastBaseUpdate=s}function Co(r,s,o,l){var h=r.updateQueue;rs=!1;var m=h.firstBaseUpdate,_=h.lastBaseUpdate,x=h.shared.pending;if(x!==null){h.shared.pending=null;var D=x,O=D.next;D.next=null,_===null?m=O:_.next=O,_=D;var G=r.alternate;G!==null&&(G=G.updateQueue,x=G.lastBaseUpdate,x!==_&&(x===null?G.firstBaseUpdate=O:x.next=O,G.lastBaseUpdate=D))}if(m!==null){var Z=h.baseState;_=0,G=O=D=null,x=m;do{var Y=x.lane,ce=x.eventTime;if((l&Y)===Y){G!==null&&(G=G.next={eventTime:ce,lane:0,tag:x.tag,payload:x.payload,callback:x.callback,next:null});e:{var he=r,fe=x;switch(Y=s,ce=o,fe.tag){case 1:if(he=fe.payload,typeof he=="function"){Z=he.call(ce,Z,Y);break e}Z=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=fe.payload,Y=typeof he=="function"?he.call(ce,Z,Y):he,Y==null)break e;Z=re({},Z,Y);break e;case 2:rs=!0}}x.callback!==null&&x.lane!==0&&(r.flags|=64,Y=h.effects,Y===null?h.effects=[x]:Y.push(x))}else ce={eventTime:ce,lane:Y,tag:x.tag,payload:x.payload,callback:x.callback,next:null},G===null?(O=G=ce,D=Z):G=G.next=ce,_|=Y;if(x=x.next,x===null){if(x=h.shared.pending,x===null)break;Y=x,x=Y.next,Y.next=null,h.lastBaseUpdate=Y,h.shared.pending=null}}while(!0);if(G===null&&(D=Z),h.baseState=D,h.firstBaseUpdate=O,h.lastBaseUpdate=G,s=h.shared.interleaved,s!==null){h=s;do _|=h.lane,h=h.next;while(h!==s)}else m===null&&(h.shared.lanes=0);Ts|=_,r.lanes=_,r.memoizedState=Z}}function xd(r,s,o){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var l=r[s],h=l.callback;if(h!==null){if(l.callback=null,l=o,typeof h!="function")throw Error(i(191,h));h.call(l)}}}var Qi={},Sr=Jr(Qi),Ji=Jr(Qi),en=Jr(Qi);function Ps(r){if(r===Qi)throw Error(i(174));return r}function Ml(r,s){switch(Ie(en,s),Ie(Ji,r),Ie(Sr,Qi),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:Ta(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=Ta(s,r)}Ae(Sr),Ie(Sr,s)}function ci(){Ae(Sr),Ae(Ji),Ae(en)}function Cd(r){Ps(en.current);var s=Ps(Sr.current),o=Ta(s,r.type);s!==o&&(Ie(Ji,r),Ie(Sr,o))}function Tl(r){Ji.current===r&&(Ae(Sr),Ae(Ji))}var Fe=Jr(0);function bo(r){for(var s=r;s!==null;){if(s.tag===13){var o=s.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Rl=[];function Ll(){for(var r=0;r<Rl.length;r++)Rl[r]._workInProgressVersionPrimary=null;Rl.length=0}var Eo=M.ReactCurrentDispatcher,Il=M.ReactCurrentBatchConfig,Ms=0,He=null,rt=null,lt=null,Do=!1,tn=!1,rn=0,W_=0;function kt(){throw Error(i(321))}function Bl(r,s){if(s===null)return!1;for(var o=0;o<s.length&&o<r.length;o++)if(!cr(r[o],s[o]))return!1;return!0}function Al(r,s,o,l,h,m){if(Ms=m,He=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Eo.current=r===null||r.memoizedState===null?Y_:G_,r=o(l,h),tn){m=0;do{if(tn=!1,rn=0,25<=m)throw Error(i(301));m+=1,lt=rt=null,s.updateQueue=null,Eo.current=X_,r=o(l,h)}while(tn)}if(Eo.current=Mo,s=rt!==null&&rt.next!==null,Ms=0,lt=rt=He=null,Do=!1,s)throw Error(i(300));return r}function Ol(){var r=rn!==0;return rn=0,r}function wr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?He.memoizedState=lt=r:lt=lt.next=r,lt}function Jt(){if(rt===null){var r=He.alternate;r=r!==null?r.memoizedState:null}else r=rt.next;var s=lt===null?He.memoizedState:lt.next;if(s!==null)lt=s,rt=r;else{if(r===null)throw Error(i(310));rt=r,r={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},lt===null?He.memoizedState=lt=r:lt=lt.next=r}return lt}function sn(r,s){return typeof s=="function"?s(r):s}function zl(r){var s=Jt(),o=s.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=r;var l=rt,h=l.baseQueue,m=o.pending;if(m!==null){if(h!==null){var _=h.next;h.next=m.next,m.next=_}l.baseQueue=h=m,o.pending=null}if(h!==null){m=h.next,l=l.baseState;var x=_=null,D=null,O=m;do{var G=O.lane;if((Ms&G)===G)D!==null&&(D=D.next={lane:0,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),l=O.hasEagerState?O.eagerState:r(l,O.action);else{var Z={lane:G,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null};D===null?(x=D=Z,_=l):D=D.next=Z,He.lanes|=G,Ts|=G}O=O.next}while(O!==null&&O!==m);D===null?_=l:D.next=x,cr(l,s.memoizedState)||(At=!0),s.memoizedState=l,s.baseState=_,s.baseQueue=D,o.lastRenderedState=l}if(r=o.interleaved,r!==null){h=r;do m=h.lane,He.lanes|=m,Ts|=m,h=h.next;while(h!==r)}else h===null&&(o.lanes=0);return[s.memoizedState,o.dispatch]}function jl(r){var s=Jt(),o=s.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=r;var l=o.dispatch,h=o.pending,m=s.memoizedState;if(h!==null){o.pending=null;var _=h=h.next;do m=r(m,_.action),_=_.next;while(_!==h);cr(m,s.memoizedState)||(At=!0),s.memoizedState=m,s.baseQueue===null&&(s.baseState=m),o.lastRenderedState=m}return[m,l]}function bd(){}function Ed(r,s){var o=He,l=Jt(),h=s(),m=!cr(l.memoizedState,h);if(m&&(l.memoizedState=h,At=!0),l=l.queue,Fl(Pd.bind(null,o,l,r),[r]),l.getSnapshot!==s||m||lt!==null&&lt.memoizedState.tag&1){if(o.flags|=2048,nn(9,Nd.bind(null,o,l,h,s),void 0,null),ct===null)throw Error(i(349));(Ms&30)!==0||Dd(o,s,h)}return h}function Dd(r,s,o){r.flags|=16384,r={getSnapshot:s,value:o},s=He.updateQueue,s===null?(s={lastEffect:null,stores:null},He.updateQueue=s,s.stores=[r]):(o=s.stores,o===null?s.stores=[r]:o.push(r))}function Nd(r,s,o,l){s.value=o,s.getSnapshot=l,Md(s)&&Td(r)}function Pd(r,s,o){return o(function(){Md(s)&&Td(r)})}function Md(r){var s=r.getSnapshot;r=r.value;try{var o=s();return!cr(r,o)}catch{return!0}}function Td(r){var s=Br(r,1);s!==null&&mr(s,r,1,-1)}function Rd(r){var s=wr();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:sn,lastRenderedState:r},s.queue=r,r=r.dispatch=q_.bind(null,He,r),[s.memoizedState,r]}function nn(r,s,o,l){return r={tag:r,create:s,destroy:o,deps:l,next:null},s=He.updateQueue,s===null?(s={lastEffect:null,stores:null},He.updateQueue=s,s.lastEffect=r.next=r):(o=s.lastEffect,o===null?s.lastEffect=r.next=r:(l=o.next,o.next=r,r.next=l,s.lastEffect=r)),r}function Ld(){return Jt().memoizedState}function No(r,s,o,l){var h=wr();He.flags|=r,h.memoizedState=nn(1|s,o,void 0,l===void 0?null:l)}function Po(r,s,o,l){var h=Jt();l=l===void 0?null:l;var m=void 0;if(rt!==null){var _=rt.memoizedState;if(m=_.destroy,l!==null&&Bl(l,_.deps)){h.memoizedState=nn(s,o,m,l);return}}He.flags|=r,h.memoizedState=nn(1|s,o,m,l)}function Id(r,s){return No(8390656,8,r,s)}function Fl(r,s){return Po(2048,8,r,s)}function Bd(r,s){return Po(4,2,r,s)}function Ad(r,s){return Po(4,4,r,s)}function Od(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function zd(r,s,o){return o=o!=null?o.concat([r]):null,Po(4,4,Od.bind(null,s,r),o)}function Hl(){}function jd(r,s){var o=Jt();s=s===void 0?null:s;var l=o.memoizedState;return l!==null&&s!==null&&Bl(s,l[1])?l[0]:(o.memoizedState=[r,s],r)}function Fd(r,s){var o=Jt();s=s===void 0?null:s;var l=o.memoizedState;return l!==null&&s!==null&&Bl(s,l[1])?l[0]:(r=r(),o.memoizedState=[r,s],r)}function Hd(r,s,o){return(Ms&21)===0?(r.baseState&&(r.baseState=!1,At=!0),r.memoizedState=o):(cr(o,s)||(o=_h(),He.lanes|=o,Ts|=o,r.baseState=!0),s)}function V_(r,s){var o=Te;Te=o!==0&&4>o?o:4,r(!0);var l=Il.transition;Il.transition={};try{r(!1),s()}finally{Te=o,Il.transition=l}}function $d(){return Jt().memoizedState}function K_(r,s,o){var l=as(r);if(o={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null},Ud(r))Wd(s,o);else if(o=Sd(r,s,o,l),o!==null){var h=Pt();mr(o,r,l,h),Vd(o,s,l)}}function q_(r,s,o){var l=as(r),h={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(Ud(r))Wd(s,h);else{var m=r.alternate;if(r.lanes===0&&(m===null||m.lanes===0)&&(m=s.lastRenderedReducer,m!==null))try{var _=s.lastRenderedState,x=m(_,o);if(h.hasEagerState=!0,h.eagerState=x,cr(x,_)){var D=s.interleaved;D===null?(h.next=h,Nl(s)):(h.next=D.next,D.next=h),s.interleaved=h;return}}catch{}finally{}o=Sd(r,s,h,l),o!==null&&(h=Pt(),mr(o,r,l,h),Vd(o,s,l))}}function Ud(r){var s=r.alternate;return r===He||s!==null&&s===He}function Wd(r,s){tn=Do=!0;var o=r.pending;o===null?s.next=s:(s.next=o.next,o.next=s),r.pending=s}function Vd(r,s,o){if((o&4194240)!==0){var l=s.lanes;l&=r.pendingLanes,o|=l,s.lanes=o,Ua(r,o)}}var Mo={readContext:Qt,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useInsertionEffect:kt,useLayoutEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useMutableSource:kt,useSyncExternalStore:kt,useId:kt,unstable_isNewReconciler:!1},Y_={readContext:Qt,useCallback:function(r,s){return wr().memoizedState=[r,s===void 0?null:s],r},useContext:Qt,useEffect:Id,useImperativeHandle:function(r,s,o){return o=o!=null?o.concat([r]):null,No(4194308,4,Od.bind(null,s,r),o)},useLayoutEffect:function(r,s){return No(4194308,4,r,s)},useInsertionEffect:function(r,s){return No(4,2,r,s)},useMemo:function(r,s){var o=wr();return s=s===void 0?null:s,r=r(),o.memoizedState=[r,s],r},useReducer:function(r,s,o){var l=wr();return s=o!==void 0?o(s):s,l.memoizedState=l.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},l.queue=r,r=r.dispatch=K_.bind(null,He,r),[l.memoizedState,r]},useRef:function(r){var s=wr();return r={current:r},s.memoizedState=r},useState:Rd,useDebugValue:Hl,useDeferredValue:function(r){return wr().memoizedState=r},useTransition:function(){var r=Rd(!1),s=r[0];return r=V_.bind(null,r[1]),wr().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,o){var l=He,h=wr();if(ze){if(o===void 0)throw Error(i(407));o=o()}else{if(o=s(),ct===null)throw Error(i(349));(Ms&30)!==0||Dd(l,s,o)}h.memoizedState=o;var m={value:o,getSnapshot:s};return h.queue=m,Id(Pd.bind(null,l,m,r),[r]),l.flags|=2048,nn(9,Nd.bind(null,l,m,o,s),void 0,null),o},useId:function(){var r=wr(),s=ct.identifierPrefix;if(ze){var o=Ir,l=Lr;o=(l&~(1<<32-lr(l)-1)).toString(32)+o,s=":"+s+"R"+o,o=rn++,0<o&&(s+="H"+o.toString(32)),s+=":"}else o=W_++,s=":"+s+"r"+o.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},G_={readContext:Qt,useCallback:jd,useContext:Qt,useEffect:Fl,useImperativeHandle:zd,useInsertionEffect:Bd,useLayoutEffect:Ad,useMemo:Fd,useReducer:zl,useRef:Ld,useState:function(){return zl(sn)},useDebugValue:Hl,useDeferredValue:function(r){var s=Jt();return Hd(s,rt.memoizedState,r)},useTransition:function(){var r=zl(sn)[0],s=Jt().memoizedState;return[r,s]},useMutableSource:bd,useSyncExternalStore:Ed,useId:$d,unstable_isNewReconciler:!1},X_={readContext:Qt,useCallback:jd,useContext:Qt,useEffect:Fl,useImperativeHandle:zd,useInsertionEffect:Bd,useLayoutEffect:Ad,useMemo:Fd,useReducer:jl,useRef:Ld,useState:function(){return jl(sn)},useDebugValue:Hl,useDeferredValue:function(r){var s=Jt();return rt===null?s.memoizedState=r:Hd(s,rt.memoizedState,r)},useTransition:function(){var r=jl(sn)[0],s=Jt().memoizedState;return[r,s]},useMutableSource:bd,useSyncExternalStore:Ed,useId:$d,unstable_isNewReconciler:!1};function hr(r,s){if(r&&r.defaultProps){s=re({},s),r=r.defaultProps;for(var o in r)s[o]===void 0&&(s[o]=r[o]);return s}return s}function $l(r,s,o,l){s=r.memoizedState,o=o(l,s),o=o==null?s:re({},s,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var To={isMounted:function(r){return(r=r._reactInternals)?xs(r)===r:!1},enqueueSetState:function(r,s,o){r=r._reactInternals;var l=Pt(),h=as(r),m=Ar(l,h);m.payload=s,o!=null&&(m.callback=o),s=ss(r,m,h),s!==null&&(mr(s,r,h,l),xo(s,r,h))},enqueueReplaceState:function(r,s,o){r=r._reactInternals;var l=Pt(),h=as(r),m=Ar(l,h);m.tag=1,m.payload=s,o!=null&&(m.callback=o),s=ss(r,m,h),s!==null&&(mr(s,r,h,l),xo(s,r,h))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var o=Pt(),l=as(r),h=Ar(o,l);h.tag=2,s!=null&&(h.callback=s),s=ss(r,h,l),s!==null&&(mr(s,r,l,o),xo(s,r,l))}};function Kd(r,s,o,l,h,m,_){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(l,m,_):s.prototype&&s.prototype.isPureReactComponent?!Wi(o,l)||!Wi(h,m):!0}function qd(r,s,o){var l=!1,h=es,m=s.contextType;return typeof m=="object"&&m!==null?m=Qt(m):(h=Bt(s)?bs:wt.current,l=s.contextTypes,m=(l=l!=null)?ri(r,h):es),s=new s(o,m),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=To,r.stateNode=s,s._reactInternals=r,l&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=h,r.__reactInternalMemoizedMaskedChildContext=m),s}function Yd(r,s,o,l){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(o,l),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(o,l),s.state!==r&&To.enqueueReplaceState(s,s.state,null)}function Ul(r,s,o,l){var h=r.stateNode;h.props=o,h.state=r.memoizedState,h.refs={},Pl(r);var m=s.contextType;typeof m=="object"&&m!==null?h.context=Qt(m):(m=Bt(s)?bs:wt.current,h.context=ri(r,m)),h.state=r.memoizedState,m=s.getDerivedStateFromProps,typeof m=="function"&&($l(r,s,m,o),h.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(s=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),s!==h.state&&To.enqueueReplaceState(h,h.state,null),Co(r,o,h,l),h.state=r.memoizedState),typeof h.componentDidMount=="function"&&(r.flags|=4194308)}function ui(r,s){try{var o="",l=s;do o+=W(l),l=l.return;while(l);var h=o}catch(m){h=`
40
+ Error generating stack: `+m.message+`
41
+ `+m.stack}return{value:r,source:s,stack:h,digest:null}}function Wl(r,s,o){return{value:r,source:null,stack:o??null,digest:s??null}}function Vl(r,s){try{console.error(s.value)}catch(o){setTimeout(function(){throw o})}}var Z_=typeof WeakMap=="function"?WeakMap:Map;function Gd(r,s,o){o=Ar(-1,o),o.tag=3,o.payload={element:null};var l=s.value;return o.callback=function(){zo||(zo=!0,oc=l),Vl(r,s)},o}function Xd(r,s,o){o=Ar(-1,o),o.tag=3;var l=r.type.getDerivedStateFromError;if(typeof l=="function"){var h=s.value;o.payload=function(){return l(h)},o.callback=function(){Vl(r,s)}}var m=r.stateNode;return m!==null&&typeof m.componentDidCatch=="function"&&(o.callback=function(){Vl(r,s),typeof l!="function"&&(ns===null?ns=new Set([this]):ns.add(this));var _=s.stack;this.componentDidCatch(s.value,{componentStack:_!==null?_:""})}),o}function Zd(r,s,o){var l=r.pingCache;if(l===null){l=r.pingCache=new Z_;var h=new Set;l.set(s,h)}else h=l.get(s),h===void 0&&(h=new Set,l.set(s,h));h.has(o)||(h.add(o),r=hv.bind(null,r,s,o),s.then(r,r))}function Qd(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function Jd(r,s,o,l,h){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(s=Ar(-1,1),s.tag=2,ss(o,s,1))),o.lanes|=1),r):(r.flags|=65536,r.lanes=h,r)}var Q_=M.ReactCurrentOwner,At=!1;function Nt(r,s,o,l){s.child=r===null?yd(s,null,o,l):oi(s,r.child,o,l)}function ef(r,s,o,l,h){o=o.render;var m=s.ref;return li(s,h),l=Al(r,s,o,l,m,h),o=Ol(),r!==null&&!At?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~h,Or(r,s,h)):(ze&&o&&yl(s),s.flags|=1,Nt(r,s,l,h),s.child)}function tf(r,s,o,l,h){if(r===null){var m=o.type;return typeof m=="function"&&!fc(m)&&m.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(s.tag=15,s.type=m,rf(r,s,m,l,h)):(r=Wo(o.type,null,l,s,s.mode,h),r.ref=s.ref,r.return=s,s.child=r)}if(m=r.child,(r.lanes&h)===0){var _=m.memoizedProps;if(o=o.compare,o=o!==null?o:Wi,o(_,l)&&r.ref===s.ref)return Or(r,s,h)}return s.flags|=1,r=cs(m,l),r.ref=s.ref,r.return=s,s.child=r}function rf(r,s,o,l,h){if(r!==null){var m=r.memoizedProps;if(Wi(m,l)&&r.ref===s.ref)if(At=!1,s.pendingProps=l=m,(r.lanes&h)!==0)(r.flags&131072)!==0&&(At=!0);else return s.lanes=r.lanes,Or(r,s,h)}return Kl(r,s,o,l,h)}function sf(r,s,o){var l=s.pendingProps,h=l.children,m=r!==null?r.memoizedState:null;if(l.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ie(di,Vt),Vt|=o;else{if((o&1073741824)===0)return r=m!==null?m.baseLanes|o:o,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,Ie(di,Vt),Vt|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=m!==null?m.baseLanes:o,Ie(di,Vt),Vt|=l}else m!==null?(l=m.baseLanes|o,s.memoizedState=null):l=o,Ie(di,Vt),Vt|=l;return Nt(r,s,h,o),s.child}function nf(r,s){var o=s.ref;(r===null&&o!==null||r!==null&&r.ref!==o)&&(s.flags|=512,s.flags|=2097152)}function Kl(r,s,o,l,h){var m=Bt(o)?bs:wt.current;return m=ri(s,m),li(s,h),o=Al(r,s,o,l,m,h),l=Ol(),r!==null&&!At?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~h,Or(r,s,h)):(ze&&l&&yl(s),s.flags|=1,Nt(r,s,o,h),s.child)}function of(r,s,o,l,h){if(Bt(o)){var m=!0;po(s)}else m=!1;if(li(s,h),s.stateNode===null)Lo(r,s),qd(s,o,l),Ul(s,o,l,h),l=!0;else if(r===null){var _=s.stateNode,x=s.memoizedProps;_.props=x;var D=_.context,O=o.contextType;typeof O=="object"&&O!==null?O=Qt(O):(O=Bt(o)?bs:wt.current,O=ri(s,O));var G=o.getDerivedStateFromProps,Z=typeof G=="function"||typeof _.getSnapshotBeforeUpdate=="function";Z||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(x!==l||D!==O)&&Yd(s,_,l,O),rs=!1;var Y=s.memoizedState;_.state=Y,Co(s,l,_,h),D=s.memoizedState,x!==l||Y!==D||It.current||rs?(typeof G=="function"&&($l(s,o,G,l),D=s.memoizedState),(x=rs||Kd(s,o,x,l,Y,D,O))?(Z||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=l,s.memoizedState=D),_.props=l,_.state=D,_.context=O,l=x):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),l=!1)}else{_=s.stateNode,wd(r,s),x=s.memoizedProps,O=s.type===s.elementType?x:hr(s.type,x),_.props=O,Z=s.pendingProps,Y=_.context,D=o.contextType,typeof D=="object"&&D!==null?D=Qt(D):(D=Bt(o)?bs:wt.current,D=ri(s,D));var ce=o.getDerivedStateFromProps;(G=typeof ce=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(x!==Z||Y!==D)&&Yd(s,_,l,D),rs=!1,Y=s.memoizedState,_.state=Y,Co(s,l,_,h);var he=s.memoizedState;x!==Z||Y!==he||It.current||rs?(typeof ce=="function"&&($l(s,o,ce,l),he=s.memoizedState),(O=rs||Kd(s,o,O,l,Y,he,D)||!1)?(G||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(l,he,D),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(l,he,D)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||x===r.memoizedProps&&Y===r.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&Y===r.memoizedState||(s.flags|=1024),s.memoizedProps=l,s.memoizedState=he),_.props=l,_.state=he,_.context=D,l=O):(typeof _.componentDidUpdate!="function"||x===r.memoizedProps&&Y===r.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&Y===r.memoizedState||(s.flags|=1024),l=!1)}return ql(r,s,o,l,m,h)}function ql(r,s,o,l,h,m){nf(r,s);var _=(s.flags&128)!==0;if(!l&&!_)return h&&ud(s,o,!1),Or(r,s,m);l=s.stateNode,Q_.current=s;var x=_&&typeof o.getDerivedStateFromError!="function"?null:l.render();return s.flags|=1,r!==null&&_?(s.child=oi(s,r.child,null,m),s.child=oi(s,null,x,m)):Nt(r,s,x,m),s.memoizedState=l.state,h&&ud(s,o,!0),s.child}function af(r){var s=r.stateNode;s.pendingContext?ld(r,s.pendingContext,s.pendingContext!==s.context):s.context&&ld(r,s.context,!1),Ml(r,s.containerInfo)}function lf(r,s,o,l,h){return ni(),xl(h),s.flags|=256,Nt(r,s,o,l),s.child}var Yl={dehydrated:null,treeContext:null,retryLane:0};function Gl(r){return{baseLanes:r,cachePool:null,transitions:null}}function cf(r,s,o){var l=s.pendingProps,h=Fe.current,m=!1,_=(s.flags&128)!==0,x;if((x=_)||(x=r!==null&&r.memoizedState===null?!1:(h&2)!==0),x?(m=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(h|=1),Ie(Fe,h&1),r===null)return kl(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((s.mode&1)===0?s.lanes=1:r.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(_=l.children,r=l.fallback,m?(l=s.mode,m=s.child,_={mode:"hidden",children:_},(l&1)===0&&m!==null?(m.childLanes=0,m.pendingProps=_):m=Vo(_,l,0,null),r=Bs(r,l,o,null),m.return=s,r.return=s,m.sibling=r,s.child=m,s.child.memoizedState=Gl(o),s.memoizedState=Yl,r):Xl(s,_));if(h=r.memoizedState,h!==null&&(x=h.dehydrated,x!==null))return J_(r,s,_,l,x,h,o);if(m){m=l.fallback,_=s.mode,h=r.child,x=h.sibling;var D={mode:"hidden",children:l.children};return(_&1)===0&&s.child!==h?(l=s.child,l.childLanes=0,l.pendingProps=D,s.deletions=null):(l=cs(h,D),l.subtreeFlags=h.subtreeFlags&14680064),x!==null?m=cs(x,m):(m=Bs(m,_,o,null),m.flags|=2),m.return=s,l.return=s,l.sibling=m,s.child=l,l=m,m=s.child,_=r.child.memoizedState,_=_===null?Gl(o):{baseLanes:_.baseLanes|o,cachePool:null,transitions:_.transitions},m.memoizedState=_,m.childLanes=r.childLanes&~o,s.memoizedState=Yl,l}return m=r.child,r=m.sibling,l=cs(m,{mode:"visible",children:l.children}),(s.mode&1)===0&&(l.lanes=o),l.return=s,l.sibling=null,r!==null&&(o=s.deletions,o===null?(s.deletions=[r],s.flags|=16):o.push(r)),s.child=l,s.memoizedState=null,l}function Xl(r,s){return s=Vo({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function Ro(r,s,o,l){return l!==null&&xl(l),oi(s,r.child,null,o),r=Xl(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function J_(r,s,o,l,h,m,_){if(o)return s.flags&256?(s.flags&=-257,l=Wl(Error(i(422))),Ro(r,s,_,l)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(m=l.fallback,h=s.mode,l=Vo({mode:"visible",children:l.children},h,0,null),m=Bs(m,h,_,null),m.flags|=2,l.return=s,m.return=s,l.sibling=m,s.child=l,(s.mode&1)!==0&&oi(s,r.child,null,_),s.child.memoizedState=Gl(_),s.memoizedState=Yl,m);if((s.mode&1)===0)return Ro(r,s,_,null);if(h.data==="$!"){if(l=h.nextSibling&&h.nextSibling.dataset,l)var x=l.dgst;return l=x,m=Error(i(419)),l=Wl(m,l,void 0),Ro(r,s,_,l)}if(x=(_&r.childLanes)!==0,At||x){if(l=ct,l!==null){switch(_&-_){case 4:h=2;break;case 16:h=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:h=32;break;case 536870912:h=268435456;break;default:h=0}h=(h&(l.suspendedLanes|_))!==0?0:h,h!==0&&h!==m.retryLane&&(m.retryLane=h,Br(r,h),mr(l,r,h,-1))}return dc(),l=Wl(Error(i(421))),Ro(r,s,_,l)}return h.data==="$?"?(s.flags|=128,s.child=r.child,s=dv.bind(null,r),h._reactRetry=s,null):(r=m.treeContext,Wt=Qr(h.nextSibling),Ut=s,ze=!0,ur=null,r!==null&&(Xt[Zt++]=Lr,Xt[Zt++]=Ir,Xt[Zt++]=Es,Lr=r.id,Ir=r.overflow,Es=s),s=Xl(s,l.children),s.flags|=4096,s)}function uf(r,s,o){r.lanes|=s;var l=r.alternate;l!==null&&(l.lanes|=s),Dl(r.return,s,o)}function Zl(r,s,o,l,h){var m=r.memoizedState;m===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:h}:(m.isBackwards=s,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=o,m.tailMode=h)}function hf(r,s,o){var l=s.pendingProps,h=l.revealOrder,m=l.tail;if(Nt(r,s,l.children,o),l=Fe.current,(l&2)!==0)l=l&1|2,s.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&uf(r,o,s);else if(r.tag===19)uf(r,o,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}l&=1}if(Ie(Fe,l),(s.mode&1)===0)s.memoizedState=null;else switch(h){case"forwards":for(o=s.child,h=null;o!==null;)r=o.alternate,r!==null&&bo(r)===null&&(h=o),o=o.sibling;o=h,o===null?(h=s.child,s.child=null):(h=o.sibling,o.sibling=null),Zl(s,!1,h,o,m);break;case"backwards":for(o=null,h=s.child,s.child=null;h!==null;){if(r=h.alternate,r!==null&&bo(r)===null){s.child=h;break}r=h.sibling,h.sibling=o,o=h,h=r}Zl(s,!0,o,null,m);break;case"together":Zl(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Lo(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function Or(r,s,o){if(r!==null&&(s.dependencies=r.dependencies),Ts|=s.lanes,(o&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(i(153));if(s.child!==null){for(r=s.child,o=cs(r,r.pendingProps),s.child=o,o.return=s;r.sibling!==null;)r=r.sibling,o=o.sibling=cs(r,r.pendingProps),o.return=s;o.sibling=null}return s.child}function ev(r,s,o){switch(s.tag){case 3:af(s),ni();break;case 5:Cd(s);break;case 1:Bt(s.type)&&po(s);break;case 4:Ml(s,s.stateNode.containerInfo);break;case 10:var l=s.type._context,h=s.memoizedProps.value;Ie(wo,l._currentValue),l._currentValue=h;break;case 13:if(l=s.memoizedState,l!==null)return l.dehydrated!==null?(Ie(Fe,Fe.current&1),s.flags|=128,null):(o&s.child.childLanes)!==0?cf(r,s,o):(Ie(Fe,Fe.current&1),r=Or(r,s,o),r!==null?r.sibling:null);Ie(Fe,Fe.current&1);break;case 19:if(l=(o&s.childLanes)!==0,(r.flags&128)!==0){if(l)return hf(r,s,o);s.flags|=128}if(h=s.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Ie(Fe,Fe.current),l)break;return null;case 22:case 23:return s.lanes=0,sf(r,s,o)}return Or(r,s,o)}var df,Ql,ff,mf;df=function(r,s){for(var o=s.child;o!==null;){if(o.tag===5||o.tag===6)r.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},Ql=function(){},ff=function(r,s,o,l){var h=r.memoizedProps;if(h!==l){r=s.stateNode,Ps(Sr.current);var m=null;switch(o){case"input":h=ks(r,h),l=ks(r,l),m=[];break;case"select":h=re({},h,{value:void 0}),l=re({},l,{value:void 0}),m=[];break;case"textarea":h=Ma(r,h),l=Ma(r,l),m=[];break;default:typeof h.onClick!="function"&&typeof l.onClick=="function"&&(r.onclick=ho)}Ra(o,l);var _;o=null;for(O in h)if(!l.hasOwnProperty(O)&&h.hasOwnProperty(O)&&h[O]!=null)if(O==="style"){var x=h[O];for(_ in x)x.hasOwnProperty(_)&&(o||(o={}),o[_]="")}else O!=="dangerouslySetInnerHTML"&&O!=="children"&&O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&O!=="autoFocus"&&(a.hasOwnProperty(O)?m||(m=[]):(m=m||[]).push(O,null));for(O in l){var D=l[O];if(x=h!=null?h[O]:void 0,l.hasOwnProperty(O)&&D!==x&&(D!=null||x!=null))if(O==="style")if(x){for(_ in x)!x.hasOwnProperty(_)||D&&D.hasOwnProperty(_)||(o||(o={}),o[_]="");for(_ in D)D.hasOwnProperty(_)&&x[_]!==D[_]&&(o||(o={}),o[_]=D[_])}else o||(m||(m=[]),m.push(O,o)),o=D;else O==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,x=x?x.__html:void 0,D!=null&&x!==D&&(m=m||[]).push(O,D)):O==="children"?typeof D!="string"&&typeof D!="number"||(m=m||[]).push(O,""+D):O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&(a.hasOwnProperty(O)?(D!=null&&O==="onScroll"&&Be("scroll",r),m||x===D||(m=[])):(m=m||[]).push(O,D))}o&&(m=m||[]).push("style",o);var O=m;(s.updateQueue=O)&&(s.flags|=4)}},mf=function(r,s,o,l){o!==l&&(s.flags|=4)};function on(r,s){if(!ze)switch(r.tailMode){case"hidden":s=r.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:l.sibling=null}}function xt(r){var s=r.alternate!==null&&r.alternate.child===r.child,o=0,l=0;if(s)for(var h=r.child;h!==null;)o|=h.lanes|h.childLanes,l|=h.subtreeFlags&14680064,l|=h.flags&14680064,h.return=r,h=h.sibling;else for(h=r.child;h!==null;)o|=h.lanes|h.childLanes,l|=h.subtreeFlags,l|=h.flags,h.return=r,h=h.sibling;return r.subtreeFlags|=l,r.childLanes=o,s}function tv(r,s,o){var l=s.pendingProps;switch(Sl(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(s),null;case 1:return Bt(s.type)&&mo(),xt(s),null;case 3:return l=s.stateNode,ci(),Ae(It),Ae(wt),Ll(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(r===null||r.child===null)&&(yo(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,ur!==null&&(cc(ur),ur=null))),Ql(r,s),xt(s),null;case 5:Tl(s);var h=Ps(en.current);if(o=s.type,r!==null&&s.stateNode!=null)ff(r,s,o,l,h),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!l){if(s.stateNode===null)throw Error(i(166));return xt(s),null}if(r=Ps(Sr.current),yo(s)){l=s.stateNode,o=s.type;var m=s.memoizedProps;switch(l[yr]=s,l[Gi]=m,r=(s.mode&1)!==0,o){case"dialog":Be("cancel",l),Be("close",l);break;case"iframe":case"object":case"embed":Be("load",l);break;case"video":case"audio":for(h=0;h<Ki.length;h++)Be(Ki[h],l);break;case"source":Be("error",l);break;case"img":case"image":case"link":Be("error",l),Be("load",l);break;case"details":Be("toggle",l);break;case"input":qu(l,m),Be("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!m.multiple},Be("invalid",l);break;case"textarea":Xu(l,m),Be("invalid",l)}Ra(o,m),h=null;for(var _ in m)if(m.hasOwnProperty(_)){var x=m[_];_==="children"?typeof x=="string"?l.textContent!==x&&(m.suppressHydrationWarning!==!0&&uo(l.textContent,x,r),h=["children",x]):typeof x=="number"&&l.textContent!==""+x&&(m.suppressHydrationWarning!==!0&&uo(l.textContent,x,r),h=["children",""+x]):a.hasOwnProperty(_)&&x!=null&&_==="onScroll"&&Be("scroll",l)}switch(o){case"input":_r(l),Gu(l,m,!0);break;case"textarea":_r(l),Qu(l);break;case"select":case"option":break;default:typeof m.onClick=="function"&&(l.onclick=ho)}l=h,s.updateQueue=l,l!==null&&(s.flags|=4)}else{_=h.nodeType===9?h:h.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=Ju(o)),r==="http://www.w3.org/1999/xhtml"?o==="script"?(r=_.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof l.is=="string"?r=_.createElement(o,{is:l.is}):(r=_.createElement(o),o==="select"&&(_=r,l.multiple?_.multiple=!0:l.size&&(_.size=l.size))):r=_.createElementNS(r,o),r[yr]=s,r[Gi]=l,df(r,s,!1,!1),s.stateNode=r;e:{switch(_=La(o,l),o){case"dialog":Be("cancel",r),Be("close",r),h=l;break;case"iframe":case"object":case"embed":Be("load",r),h=l;break;case"video":case"audio":for(h=0;h<Ki.length;h++)Be(Ki[h],r);h=l;break;case"source":Be("error",r),h=l;break;case"img":case"image":case"link":Be("error",r),Be("load",r),h=l;break;case"details":Be("toggle",r),h=l;break;case"input":qu(r,l),h=ks(r,l),Be("invalid",r);break;case"option":h=l;break;case"select":r._wrapperState={wasMultiple:!!l.multiple},h=re({},l,{value:void 0}),Be("invalid",r);break;case"textarea":Xu(r,l),h=Ma(r,l),Be("invalid",r);break;default:h=l}Ra(o,h),x=h;for(m in x)if(x.hasOwnProperty(m)){var D=x[m];m==="style"?rh(r,D):m==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,D!=null&&eh(r,D)):m==="children"?typeof D=="string"?(o!=="textarea"||D!=="")&&Di(r,D):typeof D=="number"&&Di(r,""+D):m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&m!=="autoFocus"&&(a.hasOwnProperty(m)?D!=null&&m==="onScroll"&&Be("scroll",r):D!=null&&E(r,m,D,_))}switch(o){case"input":_r(r),Gu(r,l,!1);break;case"textarea":_r(r),Qu(r);break;case"option":l.value!=null&&r.setAttribute("value",""+_e(l.value));break;case"select":r.multiple=!!l.multiple,m=l.value,m!=null?Ws(r,!!l.multiple,m,!1):l.defaultValue!=null&&Ws(r,!!l.multiple,l.defaultValue,!0);break;default:typeof h.onClick=="function"&&(r.onclick=ho)}switch(o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return xt(s),null;case 6:if(r&&s.stateNode!=null)mf(r,s,r.memoizedProps,l);else{if(typeof l!="string"&&s.stateNode===null)throw Error(i(166));if(o=Ps(en.current),Ps(Sr.current),yo(s)){if(l=s.stateNode,o=s.memoizedProps,l[yr]=s,(m=l.nodeValue!==o)&&(r=Ut,r!==null))switch(r.tag){case 3:uo(l.nodeValue,o,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&uo(l.nodeValue,o,(r.mode&1)!==0)}m&&(s.flags|=4)}else l=(o.nodeType===9?o:o.ownerDocument).createTextNode(l),l[yr]=s,s.stateNode=l}return xt(s),null;case 13:if(Ae(Fe),l=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(ze&&Wt!==null&&(s.mode&1)!==0&&(s.flags&128)===0)gd(),ni(),s.flags|=98560,m=!1;else if(m=yo(s),l!==null&&l.dehydrated!==null){if(r===null){if(!m)throw Error(i(318));if(m=s.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(i(317));m[yr]=s}else ni(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;xt(s),m=!1}else ur!==null&&(cc(ur),ur=null),m=!0;if(!m)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=o,s):(l=l!==null,l!==(r!==null&&r.memoizedState!==null)&&l&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(Fe.current&1)!==0?st===0&&(st=3):dc())),s.updateQueue!==null&&(s.flags|=4),xt(s),null);case 4:return ci(),Ql(r,s),r===null&&qi(s.stateNode.containerInfo),xt(s),null;case 10:return El(s.type._context),xt(s),null;case 17:return Bt(s.type)&&mo(),xt(s),null;case 19:if(Ae(Fe),m=s.memoizedState,m===null)return xt(s),null;if(l=(s.flags&128)!==0,_=m.rendering,_===null)if(l)on(m,!1);else{if(st!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(_=bo(r),_!==null){for(s.flags|=128,on(m,!1),l=_.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),s.subtreeFlags=0,l=o,o=s.child;o!==null;)m=o,r=l,m.flags&=14680066,_=m.alternate,_===null?(m.childLanes=0,m.lanes=r,m.child=null,m.subtreeFlags=0,m.memoizedProps=null,m.memoizedState=null,m.updateQueue=null,m.dependencies=null,m.stateNode=null):(m.childLanes=_.childLanes,m.lanes=_.lanes,m.child=_.child,m.subtreeFlags=0,m.deletions=null,m.memoizedProps=_.memoizedProps,m.memoizedState=_.memoizedState,m.updateQueue=_.updateQueue,m.type=_.type,r=_.dependencies,m.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),o=o.sibling;return Ie(Fe,Fe.current&1|2),s.child}r=r.sibling}m.tail!==null&&qe()>fi&&(s.flags|=128,l=!0,on(m,!1),s.lanes=4194304)}else{if(!l)if(r=bo(_),r!==null){if(s.flags|=128,l=!0,o=r.updateQueue,o!==null&&(s.updateQueue=o,s.flags|=4),on(m,!0),m.tail===null&&m.tailMode==="hidden"&&!_.alternate&&!ze)return xt(s),null}else 2*qe()-m.renderingStartTime>fi&&o!==1073741824&&(s.flags|=128,l=!0,on(m,!1),s.lanes=4194304);m.isBackwards?(_.sibling=s.child,s.child=_):(o=m.last,o!==null?o.sibling=_:s.child=_,m.last=_)}return m.tail!==null?(s=m.tail,m.rendering=s,m.tail=s.sibling,m.renderingStartTime=qe(),s.sibling=null,o=Fe.current,Ie(Fe,l?o&1|2:o&1),s):(xt(s),null);case 22:case 23:return hc(),l=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==l&&(s.flags|=8192),l&&(s.mode&1)!==0?(Vt&1073741824)!==0&&(xt(s),s.subtreeFlags&6&&(s.flags|=8192)):xt(s),null;case 24:return null;case 25:return null}throw Error(i(156,s.tag))}function rv(r,s){switch(Sl(s),s.tag){case 1:return Bt(s.type)&&mo(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return ci(),Ae(It),Ae(wt),Ll(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return Tl(s),null;case 13:if(Ae(Fe),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(i(340));ni()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return Ae(Fe),null;case 4:return ci(),null;case 10:return El(s.type._context),null;case 22:case 23:return hc(),null;case 24:return null;default:return null}}var Io=!1,Ct=!1,sv=typeof WeakSet=="function"?WeakSet:Set,ue=null;function hi(r,s){var o=r.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(l){We(r,s,l)}else o.current=null}function Jl(r,s,o){try{o()}catch(l){We(r,s,l)}}var pf=!1;function iv(r,s){if(hl=Jn,r=Kh(),sl(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else e:{o=(o=r.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var h=l.anchorOffset,m=l.focusNode;l=l.focusOffset;try{o.nodeType,m.nodeType}catch{o=null;break e}var _=0,x=-1,D=-1,O=0,G=0,Z=r,Y=null;t:for(;;){for(var ce;Z!==o||h!==0&&Z.nodeType!==3||(x=_+h),Z!==m||l!==0&&Z.nodeType!==3||(D=_+l),Z.nodeType===3&&(_+=Z.nodeValue.length),(ce=Z.firstChild)!==null;)Y=Z,Z=ce;for(;;){if(Z===r)break t;if(Y===o&&++O===h&&(x=_),Y===m&&++G===l&&(D=_),(ce=Z.nextSibling)!==null)break;Z=Y,Y=Z.parentNode}Z=ce}o=x===-1||D===-1?null:{start:x,end:D}}else o=null}o=o||{start:0,end:0}}else o=null;for(dl={focusedElem:r,selectionRange:o},Jn=!1,ue=s;ue!==null;)if(s=ue,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,ue=r;else for(;ue!==null;){s=ue;try{var he=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(he!==null){var fe=he.memoizedProps,Ye=he.memoizedState,L=s.stateNode,N=L.getSnapshotBeforeUpdate(s.elementType===s.type?fe:hr(s.type,fe),Ye);L.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var B=s.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(te){We(s,s.return,te)}if(r=s.sibling,r!==null){r.return=s.return,ue=r;break}ue=s.return}return he=pf,pf=!1,he}function an(r,s,o){var l=s.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var h=l=l.next;do{if((h.tag&r)===r){var m=h.destroy;h.destroy=void 0,m!==void 0&&Jl(s,o,m)}h=h.next}while(h!==l)}}function Bo(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var o=s=s.next;do{if((o.tag&r)===r){var l=o.create;o.destroy=l()}o=o.next}while(o!==s)}}function ec(r){var s=r.ref;if(s!==null){var o=r.stateNode;switch(r.tag){case 5:r=o;break;default:r=o}typeof s=="function"?s(r):s.current=r}}function gf(r){var s=r.alternate;s!==null&&(r.alternate=null,gf(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[yr],delete s[Gi],delete s[gl],delete s[F_],delete s[H_])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function _f(r){return r.tag===5||r.tag===3||r.tag===4}function vf(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||_f(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function tc(r,s,o){var l=r.tag;if(l===5||l===6)r=r.stateNode,s?o.nodeType===8?o.parentNode.insertBefore(r,s):o.insertBefore(r,s):(o.nodeType===8?(s=o.parentNode,s.insertBefore(r,o)):(s=o,s.appendChild(r)),o=o._reactRootContainer,o!=null||s.onclick!==null||(s.onclick=ho));else if(l!==4&&(r=r.child,r!==null))for(tc(r,s,o),r=r.sibling;r!==null;)tc(r,s,o),r=r.sibling}function rc(r,s,o){var l=r.tag;if(l===5||l===6)r=r.stateNode,s?o.insertBefore(r,s):o.appendChild(r);else if(l!==4&&(r=r.child,r!==null))for(rc(r,s,o),r=r.sibling;r!==null;)rc(r,s,o),r=r.sibling}var gt=null,dr=!1;function is(r,s,o){for(o=o.child;o!==null;)yf(r,s,o),o=o.sibling}function yf(r,s,o){if(vr&&typeof vr.onCommitFiberUnmount=="function")try{vr.onCommitFiberUnmount(qn,o)}catch{}switch(o.tag){case 5:Ct||hi(o,s);case 6:var l=gt,h=dr;gt=null,is(r,s,o),gt=l,dr=h,gt!==null&&(dr?(r=gt,o=o.stateNode,r.nodeType===8?r.parentNode.removeChild(o):r.removeChild(o)):gt.removeChild(o.stateNode));break;case 18:gt!==null&&(dr?(r=gt,o=o.stateNode,r.nodeType===8?pl(r.parentNode,o):r.nodeType===1&&pl(r,o),zi(r)):pl(gt,o.stateNode));break;case 4:l=gt,h=dr,gt=o.stateNode.containerInfo,dr=!0,is(r,s,o),gt=l,dr=h;break;case 0:case 11:case 14:case 15:if(!Ct&&(l=o.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){h=l=l.next;do{var m=h,_=m.destroy;m=m.tag,_!==void 0&&((m&2)!==0||(m&4)!==0)&&Jl(o,s,_),h=h.next}while(h!==l)}is(r,s,o);break;case 1:if(!Ct&&(hi(o,s),l=o.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=o.memoizedProps,l.state=o.memoizedState,l.componentWillUnmount()}catch(x){We(o,s,x)}is(r,s,o);break;case 21:is(r,s,o);break;case 22:o.mode&1?(Ct=(l=Ct)||o.memoizedState!==null,is(r,s,o),Ct=l):is(r,s,o);break;default:is(r,s,o)}}function Sf(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var o=r.stateNode;o===null&&(o=r.stateNode=new sv),s.forEach(function(l){var h=fv.bind(null,r,l);o.has(l)||(o.add(l),l.then(h,h))})}}function fr(r,s){var o=s.deletions;if(o!==null)for(var l=0;l<o.length;l++){var h=o[l];try{var m=r,_=s,x=_;e:for(;x!==null;){switch(x.tag){case 5:gt=x.stateNode,dr=!1;break e;case 3:gt=x.stateNode.containerInfo,dr=!0;break e;case 4:gt=x.stateNode.containerInfo,dr=!0;break e}x=x.return}if(gt===null)throw Error(i(160));yf(m,_,h),gt=null,dr=!1;var D=h.alternate;D!==null&&(D.return=null),h.return=null}catch(O){We(h,s,O)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)wf(s,r),s=s.sibling}function wf(r,s){var o=r.alternate,l=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(fr(s,r),kr(r),l&4){try{an(3,r,r.return),Bo(3,r)}catch(fe){We(r,r.return,fe)}try{an(5,r,r.return)}catch(fe){We(r,r.return,fe)}}break;case 1:fr(s,r),kr(r),l&512&&o!==null&&hi(o,o.return);break;case 5:if(fr(s,r),kr(r),l&512&&o!==null&&hi(o,o.return),r.flags&32){var h=r.stateNode;try{Di(h,"")}catch(fe){We(r,r.return,fe)}}if(l&4&&(h=r.stateNode,h!=null)){var m=r.memoizedProps,_=o!==null?o.memoizedProps:m,x=r.type,D=r.updateQueue;if(r.updateQueue=null,D!==null)try{x==="input"&&m.type==="radio"&&m.name!=null&&Yu(h,m),La(x,_);var O=La(x,m);for(_=0;_<D.length;_+=2){var G=D[_],Z=D[_+1];G==="style"?rh(h,Z):G==="dangerouslySetInnerHTML"?eh(h,Z):G==="children"?Di(h,Z):E(h,G,Z,O)}switch(x){case"input":Na(h,m);break;case"textarea":Zu(h,m);break;case"select":var Y=h._wrapperState.wasMultiple;h._wrapperState.wasMultiple=!!m.multiple;var ce=m.value;ce!=null?Ws(h,!!m.multiple,ce,!1):Y!==!!m.multiple&&(m.defaultValue!=null?Ws(h,!!m.multiple,m.defaultValue,!0):Ws(h,!!m.multiple,m.multiple?[]:"",!1))}h[Gi]=m}catch(fe){We(r,r.return,fe)}}break;case 6:if(fr(s,r),kr(r),l&4){if(r.stateNode===null)throw Error(i(162));h=r.stateNode,m=r.memoizedProps;try{h.nodeValue=m}catch(fe){We(r,r.return,fe)}}break;case 3:if(fr(s,r),kr(r),l&4&&o!==null&&o.memoizedState.isDehydrated)try{zi(s.containerInfo)}catch(fe){We(r,r.return,fe)}break;case 4:fr(s,r),kr(r);break;case 13:fr(s,r),kr(r),h=r.child,h.flags&8192&&(m=h.memoizedState!==null,h.stateNode.isHidden=m,!m||h.alternate!==null&&h.alternate.memoizedState!==null||(nc=qe())),l&4&&Sf(r);break;case 22:if(G=o!==null&&o.memoizedState!==null,r.mode&1?(Ct=(O=Ct)||G,fr(s,r),Ct=O):fr(s,r),kr(r),l&8192){if(O=r.memoizedState!==null,(r.stateNode.isHidden=O)&&!G&&(r.mode&1)!==0)for(ue=r,G=r.child;G!==null;){for(Z=ue=G;ue!==null;){switch(Y=ue,ce=Y.child,Y.tag){case 0:case 11:case 14:case 15:an(4,Y,Y.return);break;case 1:hi(Y,Y.return);var he=Y.stateNode;if(typeof he.componentWillUnmount=="function"){l=Y,o=Y.return;try{s=l,he.props=s.memoizedProps,he.state=s.memoizedState,he.componentWillUnmount()}catch(fe){We(l,o,fe)}}break;case 5:hi(Y,Y.return);break;case 22:if(Y.memoizedState!==null){Cf(Z);continue}}ce!==null?(ce.return=Y,ue=ce):Cf(Z)}G=G.sibling}e:for(G=null,Z=r;;){if(Z.tag===5){if(G===null){G=Z;try{h=Z.stateNode,O?(m=h.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none"):(x=Z.stateNode,D=Z.memoizedProps.style,_=D!=null&&D.hasOwnProperty("display")?D.display:null,x.style.display=th("display",_))}catch(fe){We(r,r.return,fe)}}}else if(Z.tag===6){if(G===null)try{Z.stateNode.nodeValue=O?"":Z.memoizedProps}catch(fe){We(r,r.return,fe)}}else if((Z.tag!==22&&Z.tag!==23||Z.memoizedState===null||Z===r)&&Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===r)break e;for(;Z.sibling===null;){if(Z.return===null||Z.return===r)break e;G===Z&&(G=null),Z=Z.return}G===Z&&(G=null),Z.sibling.return=Z.return,Z=Z.sibling}}break;case 19:fr(s,r),kr(r),l&4&&Sf(r);break;case 21:break;default:fr(s,r),kr(r)}}function kr(r){var s=r.flags;if(s&2){try{e:{for(var o=r.return;o!==null;){if(_f(o)){var l=o;break e}o=o.return}throw Error(i(160))}switch(l.tag){case 5:var h=l.stateNode;l.flags&32&&(Di(h,""),l.flags&=-33);var m=vf(r);rc(r,m,h);break;case 3:case 4:var _=l.stateNode.containerInfo,x=vf(r);tc(r,x,_);break;default:throw Error(i(161))}}catch(D){We(r,r.return,D)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function nv(r,s,o){ue=r,kf(r)}function kf(r,s,o){for(var l=(r.mode&1)!==0;ue!==null;){var h=ue,m=h.child;if(h.tag===22&&l){var _=h.memoizedState!==null||Io;if(!_){var x=h.alternate,D=x!==null&&x.memoizedState!==null||Ct;x=Io;var O=Ct;if(Io=_,(Ct=D)&&!O)for(ue=h;ue!==null;)_=ue,D=_.child,_.tag===22&&_.memoizedState!==null?bf(h):D!==null?(D.return=_,ue=D):bf(h);for(;m!==null;)ue=m,kf(m),m=m.sibling;ue=h,Io=x,Ct=O}xf(r)}else(h.subtreeFlags&8772)!==0&&m!==null?(m.return=h,ue=m):xf(r)}}function xf(r){for(;ue!==null;){var s=ue;if((s.flags&8772)!==0){var o=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Ct||Bo(5,s);break;case 1:var l=s.stateNode;if(s.flags&4&&!Ct)if(o===null)l.componentDidMount();else{var h=s.elementType===s.type?o.memoizedProps:hr(s.type,o.memoizedProps);l.componentDidUpdate(h,o.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var m=s.updateQueue;m!==null&&xd(s,m,l);break;case 3:var _=s.updateQueue;if(_!==null){if(o=null,s.child!==null)switch(s.child.tag){case 5:o=s.child.stateNode;break;case 1:o=s.child.stateNode}xd(s,_,o)}break;case 5:var x=s.stateNode;if(o===null&&s.flags&4){o=x;var D=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":D.autoFocus&&o.focus();break;case"img":D.src&&(o.src=D.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var O=s.alternate;if(O!==null){var G=O.memoizedState;if(G!==null){var Z=G.dehydrated;Z!==null&&zi(Z)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}Ct||s.flags&512&&ec(s)}catch(Y){We(s,s.return,Y)}}if(s===r){ue=null;break}if(o=s.sibling,o!==null){o.return=s.return,ue=o;break}ue=s.return}}function Cf(r){for(;ue!==null;){var s=ue;if(s===r){ue=null;break}var o=s.sibling;if(o!==null){o.return=s.return,ue=o;break}ue=s.return}}function bf(r){for(;ue!==null;){var s=ue;try{switch(s.tag){case 0:case 11:case 15:var o=s.return;try{Bo(4,s)}catch(D){We(s,o,D)}break;case 1:var l=s.stateNode;if(typeof l.componentDidMount=="function"){var h=s.return;try{l.componentDidMount()}catch(D){We(s,h,D)}}var m=s.return;try{ec(s)}catch(D){We(s,m,D)}break;case 5:var _=s.return;try{ec(s)}catch(D){We(s,_,D)}}}catch(D){We(s,s.return,D)}if(s===r){ue=null;break}var x=s.sibling;if(x!==null){x.return=s.return,ue=x;break}ue=s.return}}var ov=Math.ceil,Ao=M.ReactCurrentDispatcher,sc=M.ReactCurrentOwner,er=M.ReactCurrentBatchConfig,Ne=0,ct=null,Qe=null,_t=0,Vt=0,di=Jr(0),st=0,ln=null,Ts=0,Oo=0,ic=0,cn=null,Ot=null,nc=0,fi=1/0,zr=null,zo=!1,oc=null,ns=null,jo=!1,os=null,Fo=0,un=0,ac=null,Ho=-1,$o=0;function Pt(){return(Ne&6)!==0?qe():Ho!==-1?Ho:Ho=qe()}function as(r){return(r.mode&1)===0?1:(Ne&2)!==0&&_t!==0?_t&-_t:U_.transition!==null?($o===0&&($o=_h()),$o):(r=Te,r!==0||(r=window.event,r=r===void 0?16:Eh(r.type)),r)}function mr(r,s,o,l){if(50<un)throw un=0,ac=null,Error(i(185));Li(r,o,l),((Ne&2)===0||r!==ct)&&(r===ct&&((Ne&2)===0&&(Oo|=o),st===4&&ls(r,_t)),zt(r,l),o===1&&Ne===0&&(s.mode&1)===0&&(fi=qe()+500,go&&ts()))}function zt(r,s){var o=r.callbackNode;Ug(r,s);var l=Xn(r,r===ct?_t:0);if(l===0)o!==null&&mh(o),r.callbackNode=null,r.callbackPriority=0;else if(s=l&-l,r.callbackPriority!==s){if(o!=null&&mh(o),s===1)r.tag===0?$_(Df.bind(null,r)):hd(Df.bind(null,r)),z_(function(){(Ne&6)===0&&ts()}),o=null;else{switch(vh(l)){case 1:o=Fa;break;case 4:o=ph;break;case 16:o=Kn;break;case 536870912:o=gh;break;default:o=Kn}o=Bf(o,Ef.bind(null,r))}r.callbackPriority=s,r.callbackNode=o}}function Ef(r,s){if(Ho=-1,$o=0,(Ne&6)!==0)throw Error(i(327));var o=r.callbackNode;if(mi()&&r.callbackNode!==o)return null;var l=Xn(r,r===ct?_t:0);if(l===0)return null;if((l&30)!==0||(l&r.expiredLanes)!==0||s)s=Uo(r,l);else{s=l;var h=Ne;Ne|=2;var m=Pf();(ct!==r||_t!==s)&&(zr=null,fi=qe()+500,Ls(r,s));do try{cv();break}catch(x){Nf(r,x)}while(!0);bl(),Ao.current=m,Ne=h,Qe!==null?s=0:(ct=null,_t=0,s=st)}if(s!==0){if(s===2&&(h=Ha(r),h!==0&&(l=h,s=lc(r,h))),s===1)throw o=ln,Ls(r,0),ls(r,l),zt(r,qe()),o;if(s===6)ls(r,l);else{if(h=r.current.alternate,(l&30)===0&&!av(h)&&(s=Uo(r,l),s===2&&(m=Ha(r),m!==0&&(l=m,s=lc(r,m))),s===1))throw o=ln,Ls(r,0),ls(r,l),zt(r,qe()),o;switch(r.finishedWork=h,r.finishedLanes=l,s){case 0:case 1:throw Error(i(345));case 2:Is(r,Ot,zr);break;case 3:if(ls(r,l),(l&130023424)===l&&(s=nc+500-qe(),10<s)){if(Xn(r,0)!==0)break;if(h=r.suspendedLanes,(h&l)!==l){Pt(),r.pingedLanes|=r.suspendedLanes&h;break}r.timeoutHandle=ml(Is.bind(null,r,Ot,zr),s);break}Is(r,Ot,zr);break;case 4:if(ls(r,l),(l&4194240)===l)break;for(s=r.eventTimes,h=-1;0<l;){var _=31-lr(l);m=1<<_,_=s[_],_>h&&(h=_),l&=~m}if(l=h,l=qe()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*ov(l/1960))-l,10<l){r.timeoutHandle=ml(Is.bind(null,r,Ot,zr),l);break}Is(r,Ot,zr);break;case 5:Is(r,Ot,zr);break;default:throw Error(i(329))}}}return zt(r,qe()),r.callbackNode===o?Ef.bind(null,r):null}function lc(r,s){var o=cn;return r.current.memoizedState.isDehydrated&&(Ls(r,s).flags|=256),r=Uo(r,s),r!==2&&(s=Ot,Ot=o,s!==null&&cc(s)),r}function cc(r){Ot===null?Ot=r:Ot.push.apply(Ot,r)}function av(r){for(var s=r;;){if(s.flags&16384){var o=s.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var l=0;l<o.length;l++){var h=o[l],m=h.getSnapshot;h=h.value;try{if(!cr(m(),h))return!1}catch{return!1}}}if(o=s.child,s.subtreeFlags&16384&&o!==null)o.return=s,s=o;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ls(r,s){for(s&=~ic,s&=~Oo,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var o=31-lr(s),l=1<<o;r[o]=-1,s&=~l}}function Df(r){if((Ne&6)!==0)throw Error(i(327));mi();var s=Xn(r,0);if((s&1)===0)return zt(r,qe()),null;var o=Uo(r,s);if(r.tag!==0&&o===2){var l=Ha(r);l!==0&&(s=l,o=lc(r,l))}if(o===1)throw o=ln,Ls(r,0),ls(r,s),zt(r,qe()),o;if(o===6)throw Error(i(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,Is(r,Ot,zr),zt(r,qe()),null}function uc(r,s){var o=Ne;Ne|=1;try{return r(s)}finally{Ne=o,Ne===0&&(fi=qe()+500,go&&ts())}}function Rs(r){os!==null&&os.tag===0&&(Ne&6)===0&&mi();var s=Ne;Ne|=1;var o=er.transition,l=Te;try{if(er.transition=null,Te=1,r)return r()}finally{Te=l,er.transition=o,Ne=s,(Ne&6)===0&&ts()}}function hc(){Vt=di.current,Ae(di)}function Ls(r,s){r.finishedWork=null,r.finishedLanes=0;var o=r.timeoutHandle;if(o!==-1&&(r.timeoutHandle=-1,O_(o)),Qe!==null)for(o=Qe.return;o!==null;){var l=o;switch(Sl(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&mo();break;case 3:ci(),Ae(It),Ae(wt),Ll();break;case 5:Tl(l);break;case 4:ci();break;case 13:Ae(Fe);break;case 19:Ae(Fe);break;case 10:El(l.type._context);break;case 22:case 23:hc()}o=o.return}if(ct=r,Qe=r=cs(r.current,null),_t=Vt=s,st=0,ln=null,ic=Oo=Ts=0,Ot=cn=null,Ns!==null){for(s=0;s<Ns.length;s++)if(o=Ns[s],l=o.interleaved,l!==null){o.interleaved=null;var h=l.next,m=o.pending;if(m!==null){var _=m.next;m.next=h,l.next=_}o.pending=l}Ns=null}return r}function Nf(r,s){do{var o=Qe;try{if(bl(),Eo.current=Mo,Do){for(var l=He.memoizedState;l!==null;){var h=l.queue;h!==null&&(h.pending=null),l=l.next}Do=!1}if(Ms=0,lt=rt=He=null,tn=!1,rn=0,sc.current=null,o===null||o.return===null){st=1,ln=s,Qe=null;break}e:{var m=r,_=o.return,x=o,D=s;if(s=_t,x.flags|=32768,D!==null&&typeof D=="object"&&typeof D.then=="function"){var O=D,G=x,Z=G.tag;if((G.mode&1)===0&&(Z===0||Z===11||Z===15)){var Y=G.alternate;Y?(G.updateQueue=Y.updateQueue,G.memoizedState=Y.memoizedState,G.lanes=Y.lanes):(G.updateQueue=null,G.memoizedState=null)}var ce=Qd(_);if(ce!==null){ce.flags&=-257,Jd(ce,_,x,m,s),ce.mode&1&&Zd(m,O,s),s=ce,D=O;var he=s.updateQueue;if(he===null){var fe=new Set;fe.add(D),s.updateQueue=fe}else he.add(D);break e}else{if((s&1)===0){Zd(m,O,s),dc();break e}D=Error(i(426))}}else if(ze&&x.mode&1){var Ye=Qd(_);if(Ye!==null){(Ye.flags&65536)===0&&(Ye.flags|=256),Jd(Ye,_,x,m,s),xl(ui(D,x));break e}}m=D=ui(D,x),st!==4&&(st=2),cn===null?cn=[m]:cn.push(m),m=_;do{switch(m.tag){case 3:m.flags|=65536,s&=-s,m.lanes|=s;var L=Gd(m,D,s);kd(m,L);break e;case 1:x=D;var N=m.type,B=m.stateNode;if((m.flags&128)===0&&(typeof N.getDerivedStateFromError=="function"||B!==null&&typeof B.componentDidCatch=="function"&&(ns===null||!ns.has(B)))){m.flags|=65536,s&=-s,m.lanes|=s;var te=Xd(m,x,s);kd(m,te);break e}}m=m.return}while(m!==null)}Tf(o)}catch(me){s=me,Qe===o&&o!==null&&(Qe=o=o.return);continue}break}while(!0)}function Pf(){var r=Ao.current;return Ao.current=Mo,r===null?Mo:r}function dc(){(st===0||st===3||st===2)&&(st=4),ct===null||(Ts&268435455)===0&&(Oo&268435455)===0||ls(ct,_t)}function Uo(r,s){var o=Ne;Ne|=2;var l=Pf();(ct!==r||_t!==s)&&(zr=null,Ls(r,s));do try{lv();break}catch(h){Nf(r,h)}while(!0);if(bl(),Ne=o,Ao.current=l,Qe!==null)throw Error(i(261));return ct=null,_t=0,st}function lv(){for(;Qe!==null;)Mf(Qe)}function cv(){for(;Qe!==null&&!Ig();)Mf(Qe)}function Mf(r){var s=If(r.alternate,r,Vt);r.memoizedProps=r.pendingProps,s===null?Tf(r):Qe=s,sc.current=null}function Tf(r){var s=r;do{var o=s.alternate;if(r=s.return,(s.flags&32768)===0){if(o=tv(o,s,Vt),o!==null){Qe=o;return}}else{if(o=rv(o,s),o!==null){o.flags&=32767,Qe=o;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{st=6,Qe=null;return}}if(s=s.sibling,s!==null){Qe=s;return}Qe=s=r}while(s!==null);st===0&&(st=5)}function Is(r,s,o){var l=Te,h=er.transition;try{er.transition=null,Te=1,uv(r,s,o,l)}finally{er.transition=h,Te=l}return null}function uv(r,s,o,l){do mi();while(os!==null);if((Ne&6)!==0)throw Error(i(327));o=r.finishedWork;var h=r.finishedLanes;if(o===null)return null;if(r.finishedWork=null,r.finishedLanes=0,o===r.current)throw Error(i(177));r.callbackNode=null,r.callbackPriority=0;var m=o.lanes|o.childLanes;if(Wg(r,m),r===ct&&(Qe=ct=null,_t=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||jo||(jo=!0,Bf(Kn,function(){return mi(),null})),m=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||m){m=er.transition,er.transition=null;var _=Te;Te=1;var x=Ne;Ne|=4,sc.current=null,iv(r,o),wf(o,r),M_(dl),Jn=!!hl,dl=hl=null,r.current=o,nv(o),Bg(),Ne=x,Te=_,er.transition=m}else r.current=o;if(jo&&(jo=!1,os=r,Fo=h),m=r.pendingLanes,m===0&&(ns=null),zg(o.stateNode),zt(r,qe()),s!==null)for(l=r.onRecoverableError,o=0;o<s.length;o++)h=s[o],l(h.value,{componentStack:h.stack,digest:h.digest});if(zo)throw zo=!1,r=oc,oc=null,r;return(Fo&1)!==0&&r.tag!==0&&mi(),m=r.pendingLanes,(m&1)!==0?r===ac?un++:(un=0,ac=r):un=0,ts(),null}function mi(){if(os!==null){var r=vh(Fo),s=er.transition,o=Te;try{if(er.transition=null,Te=16>r?16:r,os===null)var l=!1;else{if(r=os,os=null,Fo=0,(Ne&6)!==0)throw Error(i(331));var h=Ne;for(Ne|=4,ue=r.current;ue!==null;){var m=ue,_=m.child;if((ue.flags&16)!==0){var x=m.deletions;if(x!==null){for(var D=0;D<x.length;D++){var O=x[D];for(ue=O;ue!==null;){var G=ue;switch(G.tag){case 0:case 11:case 15:an(8,G,m)}var Z=G.child;if(Z!==null)Z.return=G,ue=Z;else for(;ue!==null;){G=ue;var Y=G.sibling,ce=G.return;if(gf(G),G===O){ue=null;break}if(Y!==null){Y.return=ce,ue=Y;break}ue=ce}}}var he=m.alternate;if(he!==null){var fe=he.child;if(fe!==null){he.child=null;do{var Ye=fe.sibling;fe.sibling=null,fe=Ye}while(fe!==null)}}ue=m}}if((m.subtreeFlags&2064)!==0&&_!==null)_.return=m,ue=_;else e:for(;ue!==null;){if(m=ue,(m.flags&2048)!==0)switch(m.tag){case 0:case 11:case 15:an(9,m,m.return)}var L=m.sibling;if(L!==null){L.return=m.return,ue=L;break e}ue=m.return}}var N=r.current;for(ue=N;ue!==null;){_=ue;var B=_.child;if((_.subtreeFlags&2064)!==0&&B!==null)B.return=_,ue=B;else e:for(_=N;ue!==null;){if(x=ue,(x.flags&2048)!==0)try{switch(x.tag){case 0:case 11:case 15:Bo(9,x)}}catch(me){We(x,x.return,me)}if(x===_){ue=null;break e}var te=x.sibling;if(te!==null){te.return=x.return,ue=te;break e}ue=x.return}}if(Ne=h,ts(),vr&&typeof vr.onPostCommitFiberRoot=="function")try{vr.onPostCommitFiberRoot(qn,r)}catch{}l=!0}return l}finally{Te=o,er.transition=s}}return!1}function Rf(r,s,o){s=ui(o,s),s=Gd(r,s,1),r=ss(r,s,1),s=Pt(),r!==null&&(Li(r,1,s),zt(r,s))}function We(r,s,o){if(r.tag===3)Rf(r,r,o);else for(;s!==null;){if(s.tag===3){Rf(s,r,o);break}else if(s.tag===1){var l=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ns===null||!ns.has(l))){r=ui(o,r),r=Xd(s,r,1),s=ss(s,r,1),r=Pt(),s!==null&&(Li(s,1,r),zt(s,r));break}}s=s.return}}function hv(r,s,o){var l=r.pingCache;l!==null&&l.delete(s),s=Pt(),r.pingedLanes|=r.suspendedLanes&o,ct===r&&(_t&o)===o&&(st===4||st===3&&(_t&130023424)===_t&&500>qe()-nc?Ls(r,0):ic|=o),zt(r,s)}function Lf(r,s){s===0&&((r.mode&1)===0?s=1:(s=Gn,Gn<<=1,(Gn&130023424)===0&&(Gn=4194304)));var o=Pt();r=Br(r,s),r!==null&&(Li(r,s,o),zt(r,o))}function dv(r){var s=r.memoizedState,o=0;s!==null&&(o=s.retryLane),Lf(r,o)}function fv(r,s){var o=0;switch(r.tag){case 13:var l=r.stateNode,h=r.memoizedState;h!==null&&(o=h.retryLane);break;case 19:l=r.stateNode;break;default:throw Error(i(314))}l!==null&&l.delete(s),Lf(r,o)}var If;If=function(r,s,o){if(r!==null)if(r.memoizedProps!==s.pendingProps||It.current)At=!0;else{if((r.lanes&o)===0&&(s.flags&128)===0)return At=!1,ev(r,s,o);At=(r.flags&131072)!==0}else At=!1,ze&&(s.flags&1048576)!==0&&dd(s,vo,s.index);switch(s.lanes=0,s.tag){case 2:var l=s.type;Lo(r,s),r=s.pendingProps;var h=ri(s,wt.current);li(s,o),h=Al(null,s,l,r,h,o);var m=Ol();return s.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Bt(l)?(m=!0,po(s)):m=!1,s.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,Pl(s),h.updater=To,s.stateNode=h,h._reactInternals=s,Ul(s,l,r,o),s=ql(null,s,l,!0,m,o)):(s.tag=0,ze&&m&&yl(s),Nt(null,s,h,o),s=s.child),s;case 16:l=s.elementType;e:{switch(Lo(r,s),r=s.pendingProps,h=l._init,l=h(l._payload),s.type=l,h=s.tag=pv(l),r=hr(l,r),h){case 0:s=Kl(null,s,l,r,o);break e;case 1:s=of(null,s,l,r,o);break e;case 11:s=ef(null,s,l,r,o);break e;case 14:s=tf(null,s,l,hr(l.type,r),o);break e}throw Error(i(306,l,""))}return s;case 0:return l=s.type,h=s.pendingProps,h=s.elementType===l?h:hr(l,h),Kl(r,s,l,h,o);case 1:return l=s.type,h=s.pendingProps,h=s.elementType===l?h:hr(l,h),of(r,s,l,h,o);case 3:e:{if(af(s),r===null)throw Error(i(387));l=s.pendingProps,m=s.memoizedState,h=m.element,wd(r,s),Co(s,l,null,o);var _=s.memoizedState;if(l=_.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:_.cache,pendingSuspenseBoundaries:_.pendingSuspenseBoundaries,transitions:_.transitions},s.updateQueue.baseState=m,s.memoizedState=m,s.flags&256){h=ui(Error(i(423)),s),s=lf(r,s,l,o,h);break e}else if(l!==h){h=ui(Error(i(424)),s),s=lf(r,s,l,o,h);break e}else for(Wt=Qr(s.stateNode.containerInfo.firstChild),Ut=s,ze=!0,ur=null,o=yd(s,null,l,o),s.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(ni(),l===h){s=Or(r,s,o);break e}Nt(r,s,l,o)}s=s.child}return s;case 5:return Cd(s),r===null&&kl(s),l=s.type,h=s.pendingProps,m=r!==null?r.memoizedProps:null,_=h.children,fl(l,h)?_=null:m!==null&&fl(l,m)&&(s.flags|=32),nf(r,s),Nt(r,s,_,o),s.child;case 6:return r===null&&kl(s),null;case 13:return cf(r,s,o);case 4:return Ml(s,s.stateNode.containerInfo),l=s.pendingProps,r===null?s.child=oi(s,null,l,o):Nt(r,s,l,o),s.child;case 11:return l=s.type,h=s.pendingProps,h=s.elementType===l?h:hr(l,h),ef(r,s,l,h,o);case 7:return Nt(r,s,s.pendingProps,o),s.child;case 8:return Nt(r,s,s.pendingProps.children,o),s.child;case 12:return Nt(r,s,s.pendingProps.children,o),s.child;case 10:e:{if(l=s.type._context,h=s.pendingProps,m=s.memoizedProps,_=h.value,Ie(wo,l._currentValue),l._currentValue=_,m!==null)if(cr(m.value,_)){if(m.children===h.children&&!It.current){s=Or(r,s,o);break e}}else for(m=s.child,m!==null&&(m.return=s);m!==null;){var x=m.dependencies;if(x!==null){_=m.child;for(var D=x.firstContext;D!==null;){if(D.context===l){if(m.tag===1){D=Ar(-1,o&-o),D.tag=2;var O=m.updateQueue;if(O!==null){O=O.shared;var G=O.pending;G===null?D.next=D:(D.next=G.next,G.next=D),O.pending=D}}m.lanes|=o,D=m.alternate,D!==null&&(D.lanes|=o),Dl(m.return,o,s),x.lanes|=o;break}D=D.next}}else if(m.tag===10)_=m.type===s.type?null:m.child;else if(m.tag===18){if(_=m.return,_===null)throw Error(i(341));_.lanes|=o,x=_.alternate,x!==null&&(x.lanes|=o),Dl(_,o,s),_=m.sibling}else _=m.child;if(_!==null)_.return=m;else for(_=m;_!==null;){if(_===s){_=null;break}if(m=_.sibling,m!==null){m.return=_.return,_=m;break}_=_.return}m=_}Nt(r,s,h.children,o),s=s.child}return s;case 9:return h=s.type,l=s.pendingProps.children,li(s,o),h=Qt(h),l=l(h),s.flags|=1,Nt(r,s,l,o),s.child;case 14:return l=s.type,h=hr(l,s.pendingProps),h=hr(l.type,h),tf(r,s,l,h,o);case 15:return rf(r,s,s.type,s.pendingProps,o);case 17:return l=s.type,h=s.pendingProps,h=s.elementType===l?h:hr(l,h),Lo(r,s),s.tag=1,Bt(l)?(r=!0,po(s)):r=!1,li(s,o),qd(s,l,h),Ul(s,l,h,o),ql(null,s,l,!0,r,o);case 19:return hf(r,s,o);case 22:return sf(r,s,o)}throw Error(i(156,s.tag))};function Bf(r,s){return fh(r,s)}function mv(r,s,o,l){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tr(r,s,o,l){return new mv(r,s,o,l)}function fc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function pv(r){if(typeof r=="function")return fc(r)?1:0;if(r!=null){if(r=r.$$typeof,r===$)return 11;if(r===X)return 14}return 2}function cs(r,s){var o=r.alternate;return o===null?(o=tr(r.tag,s,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=s,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&14680064,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,s=r.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o}function Wo(r,s,o,l,h,m){var _=2;if(l=r,typeof r=="function")fc(r)&&(_=1);else if(typeof r=="string")_=5;else e:switch(r){case J:return Bs(o.children,h,m,s);case q:_=8,h|=8;break;case H:return r=tr(12,o,s,h|2),r.elementType=H,r.lanes=m,r;case z:return r=tr(13,o,s,h),r.elementType=z,r.lanes=m,r;case K:return r=tr(19,o,s,h),r.elementType=K,r.lanes=m,r;case ne:return Vo(o,h,m,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case F:_=10;break e;case ee:_=9;break e;case $:_=11;break e;case X:_=14;break e;case se:_=16,l=null;break e}throw Error(i(130,r==null?r:typeof r,""))}return s=tr(_,o,s,h),s.elementType=r,s.type=l,s.lanes=m,s}function Bs(r,s,o,l){return r=tr(7,r,l,s),r.lanes=o,r}function Vo(r,s,o,l){return r=tr(22,r,l,s),r.elementType=ne,r.lanes=o,r.stateNode={isHidden:!1},r}function mc(r,s,o){return r=tr(6,r,null,s),r.lanes=o,r}function pc(r,s,o){return s=tr(4,r.children!==null?r.children:[],r.key,s),s.lanes=o,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function gv(r,s,o,l,h){this.tag=s,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=$a(0),this.expirationTimes=$a(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$a(0),this.identifierPrefix=l,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function gc(r,s,o,l,h,m,_,x,D){return r=new gv(r,s,o,x,D),s===1?(s=1,m===!0&&(s|=8)):s=0,m=tr(3,null,null,s),r.current=m,m.stateNode=r,m.memoizedState={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pl(m),r}function _v(r,s,o){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Q,key:l==null?null:""+l,children:r,containerInfo:s,implementation:o}}function Af(r){if(!r)return es;r=r._reactInternals;e:{if(xs(r)!==r||r.tag!==1)throw Error(i(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Bt(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(i(171))}if(r.tag===1){var o=r.type;if(Bt(o))return cd(r,o,s)}return s}function Of(r,s,o,l,h,m,_,x,D){return r=gc(o,l,!0,r,h,m,_,x,D),r.context=Af(null),o=r.current,l=Pt(),h=as(o),m=Ar(l,h),m.callback=s??null,ss(o,m,h),r.current.lanes=h,Li(r,h,l),zt(r,l),r}function Ko(r,s,o,l){var h=s.current,m=Pt(),_=as(h);return o=Af(o),s.context===null?s.context=o:s.pendingContext=o,s=Ar(m,_),s.payload={element:r},l=l===void 0?null:l,l!==null&&(s.callback=l),r=ss(h,s,_),r!==null&&(mr(r,h,_,m),xo(r,h,_)),_}function qo(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function zf(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<s?o:s}}function _c(r,s){zf(r,s),(r=r.alternate)&&zf(r,s)}function vv(){return null}var jf=typeof reportError=="function"?reportError:function(r){console.error(r)};function vc(r){this._internalRoot=r}Yo.prototype.render=vc.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(i(409));Ko(r,s,null,null)},Yo.prototype.unmount=vc.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Rs(function(){Ko(null,r,null,null)}),s[Tr]=null}};function Yo(r){this._internalRoot=r}Yo.prototype.unstable_scheduleHydration=function(r){if(r){var s=wh();r={blockedOn:null,target:r,priority:s};for(var o=0;o<Gr.length&&s!==0&&s<Gr[o].priority;o++);Gr.splice(o,0,r),o===0&&Ch(r)}};function yc(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Go(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function Ff(){}function yv(r,s,o,l,h){if(h){if(typeof l=="function"){var m=l;l=function(){var O=qo(_);m.call(O)}}var _=Of(s,l,r,0,null,!1,!1,"",Ff);return r._reactRootContainer=_,r[Tr]=_.current,qi(r.nodeType===8?r.parentNode:r),Rs(),_}for(;h=r.lastChild;)r.removeChild(h);if(typeof l=="function"){var x=l;l=function(){var O=qo(D);x.call(O)}}var D=gc(r,0,!1,null,null,!1,!1,"",Ff);return r._reactRootContainer=D,r[Tr]=D.current,qi(r.nodeType===8?r.parentNode:r),Rs(function(){Ko(s,D,o,l)}),D}function Xo(r,s,o,l,h){var m=o._reactRootContainer;if(m){var _=m;if(typeof h=="function"){var x=h;h=function(){var D=qo(_);x.call(D)}}Ko(s,_,r,h)}else _=yv(o,s,r,h,l);return qo(_)}yh=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var o=Ri(s.pendingLanes);o!==0&&(Ua(s,o|1),zt(s,qe()),(Ne&6)===0&&(fi=qe()+500,ts()))}break;case 13:Rs(function(){var l=Br(r,1);if(l!==null){var h=Pt();mr(l,r,1,h)}}),_c(r,1)}},Wa=function(r){if(r.tag===13){var s=Br(r,134217728);if(s!==null){var o=Pt();mr(s,r,134217728,o)}_c(r,134217728)}},Sh=function(r){if(r.tag===13){var s=as(r),o=Br(r,s);if(o!==null){var l=Pt();mr(o,r,s,l)}_c(r,s)}},wh=function(){return Te},kh=function(r,s){var o=Te;try{return Te=r,s()}finally{Te=o}},Aa=function(r,s,o){switch(s){case"input":if(Na(r,o),s=o.name,o.type==="radio"&&s!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<o.length;s++){var l=o[s];if(l!==r&&l.form===r.form){var h=fo(l);if(!h)throw Error(i(90));ar(l),Na(l,h)}}}break;case"textarea":Zu(r,o);break;case"select":s=o.value,s!=null&&Ws(r,!!o.multiple,s,!1)}},oh=uc,ah=Rs;var Sv={usingClientEntryPoint:!1,Events:[Xi,ei,fo,ih,nh,uc]},hn={findFiberByHostInstance:Cs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},wv={bundleType:hn.bundleType,version:hn.version,rendererPackageName:hn.rendererPackageName,rendererConfig:hn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=hh(r),r===null?null:r.stateNode},findFiberByHostInstance:hn.findFiberByHostInstance||vv,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 Zo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zo.isDisabled&&Zo.supportsFiber)try{qn=Zo.inject(wv),vr=Zo}catch{}}return jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Sv,jt.createPortal=function(r,s){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!yc(s))throw Error(i(200));return _v(r,s,null,o)},jt.createRoot=function(r,s){if(!yc(r))throw Error(i(299));var o=!1,l="",h=jf;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(l=s.identifierPrefix),s.onRecoverableError!==void 0&&(h=s.onRecoverableError)),s=gc(r,1,!1,null,null,o,!1,l,h),r[Tr]=s.current,qi(r.nodeType===8?r.parentNode:r),new vc(s)},jt.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=hh(s),r=r===null?null:r.stateNode,r},jt.flushSync=function(r){return Rs(r)},jt.hydrate=function(r,s,o){if(!Go(s))throw Error(i(200));return Xo(null,r,s,!0,o)},jt.hydrateRoot=function(r,s,o){if(!yc(r))throw Error(i(405));var l=o!=null&&o.hydratedSources||null,h=!1,m="",_=jf;if(o!=null&&(o.unstable_strictMode===!0&&(h=!0),o.identifierPrefix!==void 0&&(m=o.identifierPrefix),o.onRecoverableError!==void 0&&(_=o.onRecoverableError)),s=Of(s,null,r,1,o??null,h,!1,m,_),r[Tr]=s.current,qi(r),l)for(r=0;r<l.length;r++)o=l[r],h=o._getVersion,h=h(o._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[o,h]:s.mutableSourceEagerHydrationData.push(o,h);return new Yo(s)},jt.render=function(r,s,o){if(!Go(s))throw Error(i(200));return Xo(null,r,s,!1,o)},jt.unmountComponentAtNode=function(r){if(!Go(r))throw Error(i(40));return r._reactRootContainer?(Rs(function(){Xo(null,null,r,!1,function(){r._reactRootContainer=null,r[Tr]=null})}),!0):!1},jt.unstable_batchedUpdates=uc,jt.unstable_renderSubtreeIntoContainer=function(r,s,o,l){if(!Go(o))throw Error(i(200));if(r==null||r._reactInternals===void 0)throw Error(i(38));return Xo(r,s,o,!1,l)},jt.version="18.3.1-next-f1338f8080-20240426",jt}var Yf;function mp(){if(Yf)return xc.exports;Yf=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),xc.exports=Mv(),xc.exports}var Gf;function Tv(){if(Gf)return Qo;Gf=1;var e=mp();return Qo.createRoot=e.createRoot,Qo.hydrateRoot=e.hydrateRoot,Qo}var pp=Tv();const Rv=[{code:"en",name:"English"},{code:"es",name:"Español"},{code:"fr",name:"Français"},{code:"de",name:"Deutsch"},{code:"pt",name:"Português"},{code:"it",name:"Italiano"},{code:"ja",name:"日本語"},{code:"ko",name:"한국어"},{code:"zh",name:"中文"},{code:"ru",name:"Русский"},{code:"ro",name:"Română"}];function Lv(e){return Rv.some(t=>t.code===e)}const Xf={en:{serverPluginMissing:"This page needs the server plugin {title}",serverPluginMissingHint:"{title} is not installed on this server, so this page has nothing to show. Install it, then restart the server.",serverPluginOpen:"Open it in the plugin store",serverPluginFromCode:"Add it in the server’s code:",paletteSearchIn:"Search {page} for “{query}”",autoScrollOn:"Auto-scroll ON",autoScrollOff:"Auto-scroll OFF",breadcrumb:"Path",root:"Root directory",paletteOpen:"Search…",paletteTitle:"Go to",palettePlaceholder:"Go to a page, a job or a command, or search…",paletteEmpty:"Nothing found.",palettePages:"Pages",paletteSearchGroup:"Search",paletteSearchLogs:"Search logs for “{query}”",paletteMove:"move",paletteOpenItem:"open",paletteClose:"close",pagination:"Pages",rowsPerPage:"Rows per page",pageRange:"{from}–{to} of {total}",previousPage:"Previous",nextPage:"Next",pageOf:"Page {page} of {pages}",selectSearch:"Search…",selectNoMatches:"No matches",selectClear:"Clear",selectMore:"+{count}",dialogClose:"Close",confirmOk:"Confirm",confirmCancel:"Cancel",confirmBusy:"Working…",moreActions:"More actions",rowActions:"Actions for {name}",noData:"No data",sortBy:"Sort by {column}",table:"Table",pageFailed:"This page failed to load",retry:"Retry",loading:"Loading…",loadFailed:"Could not load the data",noAccess:"You don't have access to this page",noAccessPermission:"It needs the permission {permission}. Ask an administrator to grant it.",noAccessHint:"Ask an administrator to give you access.",missingPermission:"Missing permission: {permission}",sectionFailed:"{label} failed to render",thisSection:"This section",panel:"Panel",chipListMore:"+{count} more",chipListShowAll:"Show all {count}",chipListTitle:"All items ({count})",chipListSearch:"Search the list",chipListMatches:"{shown} of {total}"},es:{serverPluginMissing:"Esta página necesita el plugin de servidor {title}",serverPluginMissingHint:"{title} no está instalado en este servidor, así que esta página no tiene nada que mostrar. Instálalo y reinicia el servidor.",serverPluginOpen:"Abrirlo en la tienda de plugins",serverPluginFromCode:"Añádelo en el código del servidor:",paletteClose:"cerrar",paletteOpenItem:"abrir",paletteMove:"mover",paletteSearchIn:"Buscar «{query}» en {page}",paletteSearchLogs:"Buscar «{query}» en los registros",paletteSearchGroup:"Buscar",palettePages:"Páginas",paletteEmpty:"No se encontró nada.",palettePlaceholder:"Ir a una página, una tarea o un comando, o buscar…",paletteTitle:"Ir a",paletteOpen:"Buscar…",autoScrollOn:"Desplazamiento auto: SÍ",autoScrollOff:"Desplazamiento auto: NO",breadcrumb:"Ruta",root:"Directorio raíz",pagination:"Páginas",rowsPerPage:"Filas por página",pageRange:"{from}–{to} de {total}",previousPage:"Anterior",nextPage:"Siguiente",pageOf:"Página {page} de {pages}",selectSearch:"Buscar…",selectNoMatches:"Sin coincidencias",selectClear:"Borrar",selectMore:"+{count}",dialogClose:"Cerrar",confirmOk:"Confirmar",confirmCancel:"Cancelar",confirmBusy:"Procesando…",moreActions:"Más acciones",rowActions:"Acciones de {name}",noData:"Sin datos",sortBy:"Ordenar por {column}",table:"Tabla",pageFailed:"No se pudo cargar esta página",retry:"Reintentar",loading:"Cargando…",loadFailed:"No se pudieron cargar los datos",noAccess:"No tienes acceso a esta página",noAccessPermission:"Necesita el permiso {permission}. Pide a un administrador que te lo conceda.",noAccessHint:"Pide acceso a un administrador.",missingPermission:"Falta el permiso: {permission}",sectionFailed:"No se pudo mostrar {label}",thisSection:"Esta sección",panel:"Panel",chipListMore:"+{count} más",chipListShowAll:"Mostrar los {count}",chipListTitle:"Todos los elementos ({count})",chipListSearch:"Buscar en la lista",chipListMatches:"{shown} de {total}"},fr:{serverPluginMissing:"Cette page a besoin du plugin serveur {title}",serverPluginMissingHint:"{title} n’est pas installé sur ce serveur : cette page n’a rien à afficher. Installez-le, puis redémarrez le serveur.",serverPluginOpen:"L’ouvrir dans la boutique de plugins",serverPluginFromCode:"Ajoutez-le dans le code du serveur :",paletteClose:"fermer",paletteOpenItem:"ouvrir",paletteMove:"déplacer",paletteSearchIn:"Rechercher « {query} » dans {page}",paletteSearchLogs:"Rechercher « {query} » dans les journaux",paletteSearchGroup:"Rechercher",palettePages:"Pages",paletteEmpty:"Aucun résultat.",palettePlaceholder:"Aller à une page, une tâche ou une commande, ou rechercher…",paletteTitle:"Aller à",paletteOpen:"Rechercher…",autoScrollOn:"Défilement auto : ON",autoScrollOff:"Défilement auto : OFF",breadcrumb:"Chemin",root:"Répertoire racine",pagination:"Pages",rowsPerPage:"Lignes par page",pageRange:"{from}–{to} sur {total}",previousPage:"Précédent",nextPage:"Suivant",pageOf:"Page {page} sur {pages}",selectSearch:"Rechercher…",selectNoMatches:"Aucun résultat",selectClear:"Effacer",selectMore:"+{count}",dialogClose:"Fermer",confirmOk:"Confirmer",confirmCancel:"Annuler",confirmBusy:"En cours…",moreActions:"Plus d’actions",rowActions:"Actions pour {name}",noData:"Aucune donnée",sortBy:"Trier par {column}",table:"Tableau",pageFailed:"Impossible de charger cette page",retry:"Réessayer",loading:"Chargement…",loadFailed:"Impossible de charger les données",noAccess:"Vous n’avez pas accès à cette page",noAccessPermission:"Elle nécessite la permission {permission}. Demandez-la à un administrateur.",noAccessHint:"Demandez l’accès à un administrateur.",missingPermission:"Permission manquante : {permission}",sectionFailed:"Impossible d’afficher {label}",thisSection:"Cette section",panel:"Panneau",chipListMore:"+{count} de plus",chipListShowAll:"Tout afficher ({count})",chipListTitle:"Tous les éléments ({count})",chipListSearch:"Rechercher dans la liste",chipListMatches:"{shown} sur {total}"},de:{serverPluginMissing:"Diese Seite braucht das Server-Plugin {title}",serverPluginMissingHint:"{title} ist auf diesem Server nicht installiert, daher hat diese Seite nichts anzuzeigen. Installieren Sie es und starten Sie den Server neu.",serverPluginOpen:"Im Plugin-Store öffnen",serverPluginFromCode:"Im Code des Servers hinzufügen:",paletteClose:"schließen",paletteOpenItem:"öffnen",paletteMove:"bewegen",paletteSearchIn:"„{query}“ in {page} suchen",paletteSearchLogs:"„{query}“ in den Logs suchen",paletteSearchGroup:"Suche",palettePages:"Seiten",paletteEmpty:"Nichts gefunden.",palettePlaceholder:"Zu einer Seite, einem Job oder einem Befehl springen oder suchen…",paletteTitle:"Gehe zu",paletteOpen:"Suchen…",autoScrollOn:"Auto-Scroll AN",autoScrollOff:"Auto-Scroll AUS",breadcrumb:"Pfad",root:"Stammverzeichnis",pagination:"Seiten",rowsPerPage:"Zeilen pro Seite",pageRange:"{from}–{to} von {total}",previousPage:"Zurück",nextPage:"Weiter",pageOf:"Seite {page} von {pages}",selectSearch:"Suchen…",selectNoMatches:"Keine Treffer",selectClear:"Leeren",selectMore:"+{count}",dialogClose:"Schließen",confirmOk:"Bestätigen",confirmCancel:"Abbrechen",confirmBusy:"Wird ausgeführt…",moreActions:"Weitere Aktionen",rowActions:"Aktionen für {name}",noData:"Keine Daten",sortBy:"Nach {column} sortieren",table:"Tabelle",pageFailed:"Diese Seite konnte nicht geladen werden",retry:"Erneut versuchen",loading:"Wird geladen…",loadFailed:"Die Daten konnten nicht geladen werden",noAccess:"Sie haben keinen Zugriff auf diese Seite",noAccessPermission:"Sie benötigt die Berechtigung {permission}. Bitten Sie einen Administrator, sie Ihnen zu erteilen.",noAccessHint:"Bitten Sie einen Administrator um Zugriff.",missingPermission:"Fehlende Berechtigung: {permission}",sectionFailed:"{label} konnte nicht angezeigt werden",thisSection:"Dieser Bereich",panel:"Bereich",chipListMore:"+{count} weitere",chipListShowAll:"Alle {count} anzeigen",chipListTitle:"Alle Einträge ({count})",chipListSearch:"Liste durchsuchen",chipListMatches:"{shown} von {total}"},pt:{serverPluginMissing:"Esta página precisa do plugin de servidor {title}",serverPluginMissingHint:"{title} não está instalado neste servidor, por isso esta página não tem nada para mostrar. Instale-o e reinicie o servidor.",serverPluginOpen:"Abrir na loja de plugins",serverPluginFromCode:"Adicione-o no código do servidor:",paletteClose:"fechar",paletteOpenItem:"abrir",paletteMove:"mover",paletteSearchIn:"Pesquisar “{query}” em {page}",paletteSearchLogs:"Pesquisar “{query}” nos logs",paletteSearchGroup:"Pesquisar",palettePages:"Páginas",paletteEmpty:"Nada encontrado.",palettePlaceholder:"Ir para uma página, uma tarefa ou um comando, ou pesquisar…",paletteTitle:"Ir para",paletteOpen:"Pesquisar…",autoScrollOn:"Rolagem automática: SIM",autoScrollOff:"Rolagem automática: NÃO",breadcrumb:"Caminho",root:"Diretório raiz",pagination:"Páginas",rowsPerPage:"Linhas por página",pageRange:"{from}–{to} de {total}",previousPage:"Anterior",nextPage:"Seguinte",pageOf:"Página {page} de {pages}",selectSearch:"Pesquisar…",selectNoMatches:"Nenhum resultado",selectClear:"Limpar",selectMore:"+{count}",dialogClose:"Fechar",confirmOk:"Confirmar",confirmCancel:"Cancelar",confirmBusy:"Processando…",moreActions:"Mais ações",rowActions:"Ações de {name}",noData:"Sem dados",sortBy:"Ordenar por {column}",table:"Tabela",pageFailed:"Não foi possível carregar esta página",retry:"Tentar novamente",loading:"Carregando…",loadFailed:"Não foi possível carregar os dados",noAccess:"Você não tem acesso a esta página",noAccessPermission:"Ela requer a permissão {permission}. Peça a um administrador para concedê-la.",noAccessHint:"Peça acesso a um administrador.",missingPermission:"Permissão ausente: {permission}",sectionFailed:"Não foi possível exibir {label}",thisSection:"Esta seção",panel:"Painel",chipListMore:"+{count} mais",chipListShowAll:"Mostrar todos os {count}",chipListTitle:"Todos os itens ({count})",chipListSearch:"Pesquisar na lista",chipListMatches:"{shown} de {total}"},it:{serverPluginMissing:"Questa pagina richiede il plugin server {title}",serverPluginMissingHint:"{title} non è installato su questo server, quindi questa pagina non ha nulla da mostrare. Installalo, poi riavvia il server.",serverPluginOpen:"Aprilo nello store dei plugin",serverPluginFromCode:"Aggiungilo nel codice del server:",paletteClose:"chiudi",paletteOpenItem:"apri",paletteMove:"sposta",paletteSearchIn:"Cerca “{query}” in {page}",paletteSearchLogs:"Cerca “{query}” nei log",paletteSearchGroup:"Cerca",palettePages:"Pagine",paletteEmpty:"Nessun risultato.",palettePlaceholder:"Vai a una pagina, un job o un comando, o cerca…",paletteTitle:"Vai a",paletteOpen:"Cerca…",autoScrollOn:"Scorrimento auto: ON",autoScrollOff:"Scorrimento auto: OFF",breadcrumb:"Percorso",root:"Directory radice",pagination:"Pagine",rowsPerPage:"Righe per pagina",pageRange:"{from}–{to} di {total}",previousPage:"Precedente",nextPage:"Successiva",pageOf:"Pagina {page} di {pages}",selectSearch:"Cerca…",selectNoMatches:"Nessun risultato",selectClear:"Cancella",selectMore:"+{count}",dialogClose:"Chiudi",confirmOk:"Conferma",confirmCancel:"Annulla",confirmBusy:"In corso…",moreActions:"Altre azioni",rowActions:"Azioni per {name}",noData:"Nessun dato",sortBy:"Ordina per {column}",table:"Tabella",pageFailed:"Impossibile caricare questa pagina",retry:"Riprova",loading:"Caricamento…",loadFailed:"Impossibile caricare i dati",noAccess:"Non hai accesso a questa pagina",noAccessPermission:"Richiede il permesso {permission}. Chiedi a un amministratore di concedertelo.",noAccessHint:"Chiedi l’accesso a un amministratore.",missingPermission:"Permesso mancante: {permission}",sectionFailed:"Impossibile visualizzare {label}",thisSection:"Questa sezione",panel:"Pannello",chipListMore:"+{count} altri",chipListShowAll:"Mostra tutti i {count}",chipListTitle:"Tutti gli elementi ({count})",chipListSearch:"Cerca nell’elenco",chipListMatches:"{shown} di {total}"},ja:{serverPluginMissing:"このページにはサーバープラグイン {title} が必要です",serverPluginMissingHint:"{title} がこのサーバーにインストールされていないため、このページには表示する内容がありません。インストールしてからサーバーを再起動してください。",serverPluginOpen:"プラグインストアで開く",serverPluginFromCode:"サーバーのコードに追加:",paletteClose:"閉じる",paletteOpenItem:"開く",paletteMove:"移動",paletteSearchIn:"{page}で「{query}」を検索",paletteSearchLogs:"ログで「{query}」を検索",paletteSearchGroup:"検索",palettePages:"ページ",paletteEmpty:"見つかりませんでした。",palettePlaceholder:"ページ、ジョブ、コマンドへ移動、または検索…",paletteTitle:"移動",paletteOpen:"検索…",autoScrollOn:"自動スクロール: オン",autoScrollOff:"自動スクロール: オフ",breadcrumb:"パス",root:"ルートディレクトリ",pagination:"ページ",rowsPerPage:"1 ページの行数",pageRange:"{total} 件中 {from}–{to}",previousPage:"前へ",nextPage:"次へ",pageOf:"{page} / {pages} ページ",selectSearch:"検索…",selectNoMatches:"一致なし",selectClear:"クリア",selectMore:"+{count}",dialogClose:"閉じる",confirmOk:"確認",confirmCancel:"キャンセル",confirmBusy:"処理中…",moreActions:"その他の操作",rowActions:"{name} の操作",noData:"データがありません",sortBy:"{column} で並べ替え",table:"テーブル",pageFailed:"このページを読み込めませんでした",retry:"再試行",loading:"読み込み中…",loadFailed:"データを読み込めませんでした",noAccess:"このページにアクセスする権限がありません",noAccessPermission:"権限 {permission} が必要です。管理者に付与を依頼してください。",noAccessHint:"管理者にアクセスを依頼してください。",missingPermission:"不足している権限: {permission}",sectionFailed:"{label}を表示できませんでした",thisSection:"このセクション",panel:"パネル",chipListMore:"+{count} 件",chipListShowAll:"すべて表示 ({count})",chipListTitle:"すべての項目 ({count})",chipListSearch:"リストを検索",chipListMatches:"{total} 件中 {shown} 件"},ko:{serverPluginMissing:"이 페이지에는 서버 플러그인 {title}이(가) 필요합니다",serverPluginMissingHint:"{title}이(가) 이 서버에 설치되어 있지 않아 이 페이지에 표시할 내용이 없습니다. 설치한 뒤 서버를 다시 시작하세요.",serverPluginOpen:"플러그인 스토어에서 열기",serverPluginFromCode:"서버 코드에 추가:",paletteClose:"닫기",paletteOpenItem:"열기",paletteMove:"이동",paletteSearchIn:"{page}에서 “{query}” 검색",paletteSearchLogs:"로그에서 “{query}” 검색",paletteSearchGroup:"검색",palettePages:"페이지",paletteEmpty:"찾을 수 없습니다.",palettePlaceholder:"페이지, 작업, 명령으로 이동하거나 검색…",paletteTitle:"이동",paletteOpen:"검색…",autoScrollOn:"자동 스크롤 켜짐",autoScrollOff:"자동 스크롤 꺼짐",breadcrumb:"경로",root:"루트 디렉터리",pagination:"페이지",rowsPerPage:"페이지당 행 수",pageRange:"{total}개 중 {from}–{to}",previousPage:"이전",nextPage:"다음",pageOf:"{pages}페이지 중 {page}페이지",selectSearch:"검색…",selectNoMatches:"일치 항목 없음",selectClear:"지우기",selectMore:"+{count}",dialogClose:"닫기",confirmOk:"확인",confirmCancel:"취소",confirmBusy:"처리 중…",moreActions:"추가 작업",rowActions:"{name} 작업",noData:"데이터 없음",sortBy:"{column} 기준 정렬",table:"표",pageFailed:"이 페이지를 불러오지 못했습니다",retry:"다시 시도",loading:"불러오는 중…",loadFailed:"데이터를 불러오지 못했습니다",noAccess:"이 페이지에 접근할 권한이 없습니다",noAccessPermission:"{permission} 권한이 필요합니다. 관리자에게 권한을 요청하세요.",noAccessHint:"관리자에게 접근 권한을 요청하세요.",missingPermission:"누락된 권한: {permission}",sectionFailed:"{label}을(를) 표시하지 못했습니다",thisSection:"이 섹션",panel:"패널",chipListMore:"+{count}개 더 보기",chipListShowAll:"{count}개 모두 보기",chipListTitle:"전체 항목 ({count})",chipListSearch:"목록 검색",chipListMatches:"{total}개 중 {shown}개"},zh:{serverPluginMissing:"此页面需要服务器插件 {title}",serverPluginMissingHint:"此服务器未安装 {title},因此此页面没有内容可显示。请安装它,然后重启服务器。",serverPluginOpen:"在插件商店中打开",serverPluginFromCode:"在服务器代码中添加:",paletteClose:"关闭",paletteOpenItem:"打开",paletteMove:"移动",paletteSearchIn:"在{page}中搜索“{query}”",paletteSearchLogs:"在日志中搜索“{query}”",paletteSearchGroup:"搜索",palettePages:"页面",paletteEmpty:"未找到。",palettePlaceholder:"转到页面、任务或命令,或搜索…",paletteTitle:"转到",paletteOpen:"搜索…",autoScrollOn:"自动滚动:开",autoScrollOff:"自动滚动:关",breadcrumb:"路径",root:"根目录",pagination:"分页",rowsPerPage:"每页行数",pageRange:"第 {from}–{to} 条,共 {total} 条",previousPage:"上一页",nextPage:"下一页",pageOf:"第 {page} / {pages} 页",selectSearch:"搜索…",selectNoMatches:"无匹配项",selectClear:"清除",selectMore:"+{count}",dialogClose:"关闭",confirmOk:"确认",confirmCancel:"取消",confirmBusy:"处理中…",moreActions:"更多操作",rowActions:"{name} 的操作",noData:"暂无数据",sortBy:"按 {column} 排序",table:"表格",pageFailed:"此页面加载失败",retry:"重试",loading:"加载中…",loadFailed:"无法加载数据",noAccess:"您无权访问此页面",noAccessPermission:"需要权限 {permission}。请联系管理员授予。",noAccessHint:"请联系管理员获取访问权限。",missingPermission:"缺少权限:{permission}",sectionFailed:"无法显示{label}",thisSection:"此部分",panel:"面板",chipListMore:"+{count} 项",chipListShowAll:"显示全部 {count} 项",chipListTitle:"全部项目 ({count})",chipListSearch:"搜索列表",chipListMatches:"{shown} / {total}"},ru:{serverPluginMissing:"Этой странице нужен серверный плагин {title}",serverPluginMissingHint:"{title} не установлен на этом сервере, поэтому странице нечего показать. Установите его и перезапустите сервер.",serverPluginOpen:"Открыть в магазине плагинов",serverPluginFromCode:"Добавьте его в код сервера:",paletteClose:"закрыть",paletteOpenItem:"открыть",paletteMove:"перейти",paletteSearchIn:"Искать «{query}» в разделе {page}",paletteSearchLogs:"Искать «{query}» в журналах",paletteSearchGroup:"Поиск",palettePages:"Страницы",paletteEmpty:"Ничего не найдено.",palettePlaceholder:"Перейти к странице, заданию или команде, или искать…",paletteTitle:"Перейти",paletteOpen:"Поиск…",autoScrollOn:"Автопрокрутка: ВКЛ",autoScrollOff:"Автопрокрутка: ВЫКЛ",breadcrumb:"Путь",root:"Корневой каталог",pagination:"Страницы",rowsPerPage:"Строк на странице",pageRange:"{from}–{to} из {total}",previousPage:"Назад",nextPage:"Вперёд",pageOf:"Страница {page} из {pages}",selectSearch:"Поиск…",selectNoMatches:"Нет совпадений",selectClear:"Очистить",selectMore:"+{count}",dialogClose:"Закрыть",confirmOk:"Подтвердить",confirmCancel:"Отмена",confirmBusy:"Выполняется…",moreActions:"Другие действия",rowActions:"Действия для {name}",noData:"Нет данных",sortBy:"Сортировать по «{column}»",table:"Таблица",pageFailed:"Не удалось загрузить страницу",retry:"Повторить",loading:"Загрузка…",loadFailed:"Не удалось загрузить данные",noAccess:"У вас нет доступа к этой странице",noAccessPermission:"Нужно разрешение {permission}. Попросите администратора выдать его.",noAccessHint:"Попросите администратора предоставить доступ.",missingPermission:"Не хватает разрешения: {permission}",sectionFailed:"Не удалось отобразить: {label}",thisSection:"Этот раздел",panel:"Панель",chipListMore:"ещё {count}",chipListShowAll:"Показать все ({count})",chipListTitle:"Все элементы ({count})",chipListSearch:"Поиск по списку",chipListMatches:"{shown} из {total}"},ro:{serverPluginMissing:"Această pagină are nevoie de pluginul de server {title}",serverPluginMissingHint:"{title} nu este instalat pe acest server, așa că pagina nu are nimic de afișat. Instalează-l, apoi repornește serverul.",serverPluginOpen:"Deschide-l în magazinul de pluginuri",serverPluginFromCode:"Adaugă-l în codul serverului:",paletteSearchIn:"Caută „{query}” în {page}",autoScrollOn:"Derulare automată ACTIVĂ",autoScrollOff:"Derulare automată OPRITĂ",breadcrumb:"Cale",root:"Directorul rădăcină",paletteOpen:"Caută…",paletteTitle:"Mergi la",palettePlaceholder:"Mergi la o pagină, un job sau o comandă, ori caută…",paletteEmpty:"Nu s-a găsit nimic.",palettePages:"Pagini",paletteSearchGroup:"Căutare",paletteSearchLogs:"Caută „{query}” în jurnale",paletteMove:"mută",paletteOpenItem:"deschide",paletteClose:"închide",pagination:"Pagini",rowsPerPage:"Rânduri pe pagină",pageRange:"{from}–{to} din {total}",previousPage:"Înapoi",nextPage:"Înainte",pageOf:"Pagina {page} din {pages}",selectSearch:"Caută…",selectNoMatches:"Niciun rezultat",selectClear:"Golește",selectMore:"+{count}",dialogClose:"Închide",confirmOk:"Confirmă",confirmCancel:"Anulează",confirmBusy:"Se lucrează…",moreActions:"Mai multe acțiuni",rowActions:"Acțiuni pentru {name}",noData:"Nu există date",sortBy:"Sortează după {column}",table:"Tabel",pageFailed:"Această pagină nu s-a putut încărca",retry:"Reîncearcă",loading:"Se încarcă…",loadFailed:"Datele nu s-au putut încărca",noAccess:"Nu ai acces la această pagină",noAccessPermission:"Este nevoie de permisiunea {permission}. Cere unui administrator să ți-o acorde.",noAccessHint:"Cere acces unui administrator.",missingPermission:"Lipsește permisiunea: {permission}",sectionFailed:"{label} nu a putut fi afișat",thisSection:"Această secțiune",panel:"Panou",chipListMore:"încă {count}",chipListShowAll:"Arată toate ({count})",chipListTitle:"Toate elementele ({count})",chipListSearch:"Caută în listă",chipListMatches:"{shown} din {total}"}},gp=I.createContext("en");function _p({locale:e,children:t}){const i=e.toLowerCase().split("-")[0];return d.jsx(gp.Provider,{value:Lv(i)?i:"en",children:t})}function vp(){return I.useContext(gp)}function Iv(e,t,i){const n=Xf[e];return((n==null?void 0:n[t])??Xf.en[t]).replace(/\{(\w+)\}/g,(c,u)=>i&&u in i?String(i[u]):c)}function Ur(){const e=vp();return I.useMemo(()=>{const t=new Intl.NumberFormat(e);return{t:(i,n)=>Iv(e,i,n),formatNumber:i=>t.format(i)}},[e])}const Bv="qcli-extension";let Fc=null,hs=null;function Av(e){Fc=e}function Pu(){return Fc?(hs!=null&&hs.isConnected||(hs=document.createElement("div"),hs.className=Fc,hs.dataset.qcliOverlays="",document.body.appendChild(hs)),hs):document.body}const Jo=4,fn=8;function yp(e,t,i,n="start"){const[a,c]=I.useState(null),u=I.useCallback(()=>{if(!t||!i.current)return;const f=t.getBoundingClientRect(),g=i.current.getBoundingClientRect(),p=window.innerHeight-f.bottom-Jo-fn,y=f.top-Jo-fn,v=g.height>p&&y>p?"top":"bottom",k=Math.max(120,v==="bottom"?p:y),S=Math.min(g.height,k),w=Math.max(g.width,f.width),C=n==="end"?f.right-w:f.left,b=Math.min(Math.max(fn,C),Math.max(fn,window.innerWidth-w-fn)),P=v==="bottom"?f.bottom+Jo:f.top-Jo-S;c(j=>j&&j.left===b&&j.top===P&&j.minWidth===f.width&&j.maxHeight===k&&j.placement===v?j:{left:b,top:P,minWidth:f.width,maxHeight:k,placement:v})},[t,i,n]);return I.useLayoutEffect(()=>{if(!e)return;u(),window.addEventListener("resize",u);const f=typeof ResizeObserver=="function"&&i.current?new ResizeObserver(u):null;return f&&i.current&&f.observe(i.current),()=>{window.removeEventListener("resize",u),f==null||f.disconnect()}},[e,u,i]),e?a:null}function Sp(e,t,i,n){const a=I.useRef(t),c=I.useRef(i),u=I.useRef(n);I.useEffect(()=>{a.current=t,c.current=i,u.current=n}),I.useEffect(()=>{if(!e)return;const f=y=>y instanceof Node&&a.current().some(v=>v==null?void 0:v.contains(y)),g=y=>{f(y.target)||c.current()},p=y=>{var v;f(y.target)||(v=u.current)==null||v.call(u)};return document.addEventListener("pointerdown",g,!0),document.addEventListener("mousedown",g,!0),window.addEventListener("scroll",p,!0),()=>{document.removeEventListener("pointerdown",g,!0),document.removeEventListener("mousedown",g,!0),window.removeEventListener("scroll",p,!0)}},[e])}let Zf=0,Qf="";function Ov(e){I.useEffect(()=>{if(e)return Zf++===0&&(Qf=document.body.style.overflow,document.body.style.overflow="hidden"),()=>{--Zf===0&&(document.body.style.overflow=Qf)}},[e])}function Nn(e,t,i){for(let n=t+i;n>=0&&n<e.length;n+=i)if(!e[n])return n;return t}function gs(e){return e.findIndex(t=>!t)}function yi(e){for(let t=e.length-1;t>=0;t--)if(!e[t])return t;return-1}function wp(){const e=I.useRef(""),t=I.useRef(void 0);return I.useEffect(()=>()=>clearTimeout(t.current),[]),I.useCallback((i,n,a,c)=>{clearTimeout(t.current),t.current=setTimeout(()=>{e.current=""},500),e.current+=i.toLowerCase();const u=e.current,f=u.length>1&&[...u].every(y=>y===u[0]),g=f?u[0]:u,p=u.length===1||f?c+1:c;for(let y=0;y<n.length;y++){const v=(Math.max(0,p)+y)%n.length;if(!a[v]&&n[v].toLowerCase().startsWith(g))return v}return c},[])}function Hc(e){return e.key.length===1&&e.key!==" "&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function kp(e){if(!e||typeof e!="object")return null;const t=e;for(const i of["error","message","detail","title"]){const n=t[i];if(typeof n=="string"&&n.trim())return n;if(n&&typeof n=="object"){const a=kp(n);if(a)return a}}return null}const zv={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",408:"Request Timeout",409:"Conflict",413:"Payload Too Large",429:"Too Many Requests",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"};function $c(e,t=""){const i=t.trim()||zv[e]||"";return`HTTP ${e}${i?` ${i}`:""}`}function jv(e){return/^\s*<(!doctype|html|head|body|\?xml|[a-z][\w-]*[\s>/])/i.test(e)}const Jf={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'"};function Fv(e){return e.replace(/<[^>]*>/g," ").replace(/&(#\d+|#x[\da-f]+|[a-z]+);/gi,(t,i)=>Jf[i.toLowerCase()]!==void 0?Jf[i.toLowerCase()]:i.startsWith("#x")||i.startsWith("#X")?String.fromCodePoint(parseInt(i.slice(2),16)):i.startsWith("#")?String.fromCodePoint(Number(i.slice(1))):t).replace(/\s+/g," ").trim()}function Hv(e){for(const t of["pre","h1","title"]){const i=new RegExp(`<${t}\\b[^>]*>([\\s\\S]*?)</${t}>`,"i").exec(e),n=i?Fv(i[1]):"";if(n&&!(t==="title"&&/^error$/i.test(n)))return n}return null}function gr(e){const t=e instanceof Error?e.message||String(e):typeof e=="string"?e:String(e),i=t.trim();if(i.startsWith("{"))try{const n=kp(JSON.parse(i));if(n)return n}catch{}if(jv(i)){const n=Hv(i);if(n)return n;const a=e,c=a&&typeof a=="object"&&typeof a.status=="number"?a.status:0;return c?$c(c,typeof a.statusText=="string"?a.statusText:""):"HTTP error"}return t}function xp(e,t,i){const n=i.trim();if(!n)return $c(e,t);const a=gr(Object.assign(new Error(n),{status:e,statusText:t}));return a===n&&n.startsWith("{")?$c(e,t):a}const $v=/(?:missing permissions?|permission denied:)\s*([\w.*-]+:[\w.*-]+(?:\s*,\s*[\w.*-]+:[\w.*-]+)*)/i;function Uv(e){if(e==null||e==="")return null;const t=e,i=typeof t=="object"&&t!==null&&typeof t.status=="number"?t.status:0,n=gr(e).trim(),a=$v.exec(n);return i===403||a||/^(forbidden\b|HTTP 403\b)/i.test(n)?{permission:a?a[1].replace(/\s*,\s*/g,", "):null}:null}function Wv(e,t){if(e!==404)return!1;const i=t.trim();if(!i.startsWith("{"))return!0;try{const n=JSON.parse(i);return typeof(n==null?void 0:n.error)!="string"}catch{return!0}}function em(e){const t=e.split(/[?#]/)[0],i=t.indexOf("/api/");return(i===-1?t:t.slice(i)).replace(/\/+$/,"")}function Vv(e,t,i){const n=em(t);return async(a,c)=>{const u=await e(a,c);if(u.status===404&&em(a)===n){const f=await u.clone().text().catch(()=>"");Wv(u.status,f)&&i()}return u}}function Kv(e,t=typeof window>"u"?"":window.location.pathname){const i=t.indexOf("/x/");return`${i===-1?"":t.slice(0,i)}/plugins?${new URLSearchParams({tab:"marketplace",kind:"server",q:e})}`}const qv=[["node","Node",e=>`npm install ${e}`],["python","Python",e=>`pip install ${e}`],["dotnet",".NET",e=>`dotnet add package ${e}`]];function Yv({requirement:e}){const{t}=Ur(),i=qv.filter(([n])=>e.packages[n]);return d.jsx("div",{className:"p-4 sm:p-6",children:d.jsxs("div",{role:"alert","data-testid":"missing-server-plugin",className:"rounded-xl border border-warning/40 bg-warning/[0.06] p-4 sm:p-5 space-y-3 max-w-3xl",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-sm font-semibold text-heading",children:t("serverPluginMissing",{title:e.title})}),d.jsx("p",{className:"text-xs text-muted mt-1",children:t("serverPluginMissingHint",{title:e.title})})]}),!e.codeOnly&&d.jsx("a",{href:Kv(e.id),className:"inline-flex items-center px-3 py-1.5 text-xs rounded-lg bg-primary text-on-primary hover:bg-primary/90 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60",children:t("serverPluginOpen")}),i.length>0&&d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"text-xs text-subtle",children:t("serverPluginFromCode")}),d.jsx("ul",{className:"space-y-0.5",children:i.map(([n,a,c])=>d.jsxs("li",{className:"text-[11px] font-mono text-text break-all",children:[d.jsxs("span",{className:"text-subtle",children:[a,": "]}),c(e.packages[n])]},n))})]})]})})}function Gv({requirement:e,fetcher:t,provide:i}){const[n,a]=I.useState(!1),c=I.useMemo(()=>Vv(t,e.api,()=>a(!0)),[t,e.api]);return n?d.jsx(Yv,{requirement:e}):d.jsx(d.Fragment,{children:i(c)})}const Xv="/api/v1/qcli/sessions/ws-ticket";class Ec extends Error{constructor(t,i){super(i),this.status=t,this.name="SocketTicketError"}}function Zv(e,t,i={}){const n=e||(typeof window<"u"?window.location.origin:"http://localhost"),a=new URL(`${n.replace(/\/$/,"")}${t.startsWith("/")?"":"/"}${t}`);a.protocol=a.protocol==="https:"?"wss:":"ws:";for(const[c,u]of Object.entries(i))u!=null&&a.searchParams.set(c,String(u));return a.toString()}async function Qv(e,t,i={}){let n;try{n=await e.fetch(Xv,{method:"POST",body:"{}",headers:{"Content-Type":"application/json"},quiet:!0})}catch(c){throw new Ec(0,c instanceof Error?c.message:String(c))}let a;if(n.ok){const c=await n.json().catch(()=>({}));if(typeof c.ticket!="string")throw new Ec(n.status,"The ticket response has no ticket");a=c.ticket}else if(n.status!==404&&n.status!==405)throw new Ec(n.status,xp(n.status,n.statusText,await n.text().catch(()=>"")));return new WebSocket(Zv(e.apiBase,t,a?{...i,ticket:a}:i))}function Jv(e,t,i={}){return e.openSocket?e.openSocket(t,i):Qv(e,t,i)}const Sa=I.createContext(null);function tm(e){return(t,i)=>{var g;const n=pp.createRoot(t);let a={...i};const c=()=>n.render(d.jsx(Sa.Provider,{value:a,children:d.jsx(_p,{locale:a.language,children:d.jsx(e,{})})})),u=p=>{a={...a,...p},c()},f=[i.onThemeChange(p=>u({theme:p})),i.onLanguageChange(p=>u({language:p})),i.onPathChange(p=>u({path:p})),((g=i.onConfigChange)==null?void 0:g.call(i,p=>u({config:p})))??(()=>{})];return c(),()=>{f.forEach(p=>p()),n.unmount()}}}function ey(e){return(t,i,n)=>{const a=pp.createRoot(t),c=u=>a.render(d.jsx(Sa.Provider,{value:n,children:d.jsx(_p,{locale:n.language,children:d.jsx(e,{...u})})}));return c(i),{update:c,unmount:()=>a.unmount()}}}function ty(e,t={}){Av(Bv);const i=t.overview,n=t.serverPlugin;return{mount:tm(n?function(){const u=Tt();return d.jsx(Gv,{requirement:n,fetcher:u.fetch,provide:f=>d.jsx(Sa.Provider,{value:{...u,fetch:f},children:d.jsx(e,{})})})}:e),...i?{overview:{cards:(i.cards??[]).map(c=>({id:c.id,size:c.size,mount:tm(c.component)})),...i.attention?{attention:i.attention}:{}}}:{},...t.palette?{palette:t.palette}:{},...t.configEditors?{configEditors:Object.fromEntries(Object.entries(t.configEditors).map(([c,u])=>[c,ey(u)]))}:{}}}function Tt(){const e=I.useContext(Sa);if(!e)throw new Error("useConsole() is only available inside defineExtension");return e}class ry extends Error{constructor(t,i,n){super(i),this.status=t,this.error=i,this.body=n,this.name="ApiError"}}function sy(e){const t=async(i,n,a,c={})=>{const u=await e(n,{method:i,...c.quiet?{quiet:!0}:{},...a===void 0?{}:{body:JSON.stringify(a),headers:{"Content-Type":"application/json"}}}),f=await u.text();let g;if(f)try{g=JSON.parse(f)}catch{g=f}if(!u.ok)throw new ry(u.status,xp(u.status,u.statusText,f),g);return g};return{get:(i,n)=>t("GET",i,void 0,n),post:(i,n)=>t("POST",i,n),put:(i,n)=>t("PUT",i,n),patch:(i,n)=>t("PATCH",i,n),del:i=>t("DELETE",i)}}function St(){const{fetch:e}=Tt();return I.useMemo(()=>sy(e),[e])}function iy(){const e=Tt(),t=I.useRef(e);return I.useEffect(()=>{t.current=e}),I.useMemo(()=>(i,n)=>Jv(t.current,i,n),[])}function ny(){const{path:e,navigate:t}=Tt(),i=e.includes("?")?e.slice(e.indexOf("?")+1).split("#")[0]:"",n=I.useMemo(()=>new URLSearchParams(i),[i]),a=e.split(/[?#]/)[0]||"/";return[n,u=>{const f=u(new URLSearchParams(i)).toString();t(f?`${a}?${f}`:a,{replace:!0})}]}function Dr(e,t=(i,n)=>new Intl.NumberFormat(void 0,n).format(i)){const i=["B","KB","MB","GB","TB"];let n=e,a=0;for(;n>=1024&&a<i.length-1;)n/=1024,a++;return`${t(n,{maximumFractionDigits:a===0||n>=10?0:1})} ${i[a]}`}const oy=[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60]];function ay(e){const t=vp();return I.useMemo(()=>ly(e,t),[e,t])}function ly(e,t){const i=new Intl.PluralRules(t),n=new Intl.NumberFormat(t),a=new Intl.RelativeTimeFormat(t,{numeric:"auto"}),c=(f,g)=>{var y,v;const p=e[f];return((y=p==null?void 0:p[t])==null?void 0:y[g])??((v=p==null?void 0:p.en)==null?void 0:v[g])};return{locale:t,t:(f,g)=>{const p=f.indexOf("."),y=f.slice(0,p),v=f.slice(p+1);if(g&&"count"in g&&typeof g.count!="number"){const S=Number(g.count);g={...g,count:Number.isFinite(S)?S:0}}let k;return g&&typeof g.count=="number"&&(k=c(y,`${v}_${i.select(g.count)}`)??c(y,`${v}_other`)),k??(k=c(y,v)??c(y,`${v}_other`)??f),g?k.replace(/\{(\w+)\}/g,(S,w)=>g[w]!=null?typeof g[w]=="number"?n.format(g[w]):String(g[w]):S):k},formatDate:(f,g)=>{const p=new Date(f);return Number.isNaN(p.getTime())?"—":p.toLocaleString(t,g)},formatNumber:(f,g)=>new Intl.NumberFormat(t,g).format(f),formatRelative:f=>{const g=new Date(f).getTime();if(Number.isNaN(g))return"—";const p=Math.round((g-Date.now())/1e3);for(const[y,v]of oy)if(Math.abs(p)>=v)return a.format(Math.round(p/v),y);return a.format(p,"second")}}}const cy={success:"bg-success/15 text-success border-success/30",warning:"bg-warning/15 text-warning border-warning/30",error:"bg-error/15 text-error border-error/30",info:"bg-info/15 text-info border-info/30",neutral:"bg-subtle/15 text-muted border-subtle/30"};function Xe({variant:e,children:t,dot:i}){return d.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[11px] font-medium border ${cy[e]}`,children:[i&&d.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-current"}),t]})}var Mu=mp();const rm="separator";function uy({items:e,children:t,label:i,align:n="start",buttonClassName:a="",header:c}){const u=I.useId(),[f,g]=I.useState(!1),[p,y]=I.useState(-1),[v,k]=I.useState(null),S=I.useRef(null),w=I.useRef([]),C=wp(),b=e.filter(H=>H!==rm),P=b.map(H=>!!H.disabled),j=yp(f,v,S,n),E=(H=!0)=>{g(!1),H&&(v==null||v.focus())};Sp(f,()=>[v,S.current],()=>E(!1),()=>E(!1));function M(H){y(H),g(!0)}I.useEffect(()=>{var H,F;f&&(p>=0?(H=w.current[p])==null||H.focus():(F=S.current)==null||F.focus())},[f,p]);function R(H){H.disabled||(E(),H.onSelect())}function Q(H){H.key==="ArrowDown"||H.key==="Enter"||H.key===" "?(H.preventDefault(),M(gs(P))):H.key==="ArrowUp"&&(H.preventDefault(),M(yi(P)))}function J(H){switch(H.key){case"ArrowDown":H.preventDefault(),y(F=>{const ee=Nn(P,F,1);return ee===F?gs(P):ee});break;case"ArrowUp":H.preventDefault(),y(F=>{const ee=Nn(P,F,-1);return ee===F?yi(P):ee});break;case"Home":H.preventDefault(),y(gs(P));break;case"End":H.preventDefault(),y(yi(P));break;case"Escape":H.preventDefault(),H.stopPropagation(),E();break;case"Tab":H.preventDefault(),E();break;default:Hc(H)&&y(F=>C(H.key,b.map(ee=>ee.label),P,F))}}let q=-1;return d.jsxs(d.Fragment,{children:[d.jsx("button",{ref:k,type:"button","aria-label":i,"aria-haspopup":"menu","aria-expanded":f,"aria-controls":f?u:void 0,onClick:()=>f?E():M(-1),onKeyDown:Q,className:a,children:t}),f&&Mu.createPortal(d.jsxs("div",{ref:S,id:u,role:"menu","aria-label":i,"data-placement":j==null?void 0:j.placement,onKeyDown:J,tabIndex:-1,style:j?{left:j.left,top:j.top,maxHeight:j.maxHeight}:{left:0,top:0,visibility:"hidden"},className:"fixed z-[60] min-w-[11rem] max-w-[min(20rem,calc(100vw-1rem))] overflow-y-auto p-1 rounded-lg border border-border bg-popover shadow-xl focus:outline-none motion-safe:animate-pop-in",children:[c&&d.jsx("div",{className:"px-2.5 py-2 mb-1 border-b border-border/75 text-xs text-muted",children:c}),e.map((H,F)=>{if(H===rm)return d.jsx("div",{role:"separator",className:"my-1 h-px bg-border/75"},`sep-${F}`);const ee=++q;return d.jsxs("button",{ref:$=>{w.current[ee]=$},type:"button",role:"menuitem",tabIndex:ee===p?0:-1,"aria-disabled":H.disabled||void 0,onClick:()=>R(H),onMouseMove:()=>{!H.disabled&&p!==ee&&y(ee)},className:`w-full flex items-center gap-2 min-h-11 sm:min-h-8 px-2.5 py-1 rounded-md text-sm sm:text-xs text-left focus:outline-none focus:bg-control-hover ${H.disabled?"opacity-40 cursor-not-allowed":"hover:bg-control-hover"} ${H.tone==="danger"?"text-error":"text-text"}`,children:[H.icon&&d.jsx("span",{"aria-hidden":!0,className:"inline-flex w-4 justify-center shrink-0",children:H.icon}),d.jsx("span",{className:"truncate",children:H.label})]},H.key)})]}),Pu())]})}function wa(){return Ur().t}function In({size:e=14,label:t,className:i=""}){const n=d.jsxs("svg",{"aria-hidden":!0,width:e,height:e,viewBox:"0 0 24 24",className:`animate-spin motion-reduce:animate-none ${i}`,children:[d.jsx("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeOpacity:"0.3"}),d.jsx("path",{d:"M21 12a9 9 0 0 0-9-9",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]});return t?d.jsxs("span",{role:"status","aria-live":"polite",className:"inline-flex items-center",children:[n,d.jsx("span",{className:"sr-only",children:t})]}):n}const sm={default:"text-text hover:bg-control-hover",primary:"text-accent hover:bg-primary/15",success:"text-success hover:bg-success/15",warning:"text-warning hover:bg-warning/15",danger:"text-error hover:bg-error/15"},im="inline-flex items-center justify-center gap-1.5 min-h-11 min-w-11 sm:min-h-8 sm:min-w-8 px-2.5 text-xs font-medium whitespace-nowrap transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary disabled:opacity-50 disabled:cursor-not-allowed",hy={always:"",sm:"sr-only sm:not-sr-only",xl:"sr-only xl:not-sr-only",never:"sr-only"};function Uc({items:e,label:t,labels:i="always",overflow:n=[],className:a=""}){const c=wa();return e.length===0&&n.length===0?null:d.jsxs("div",{role:"group","aria-label":t,className:`inline-flex items-stretch rounded-lg border border-border/75 bg-control divide-x divide-border/75 overflow-hidden ${a}`,children:[e.map(u=>{const f=u.disabled||u.loading;return d.jsxs("button",{type:"button",onClick:u.onClick,disabled:f,"aria-busy":u.loading||void 0,"aria-pressed":u.pressed,"aria-label":u.ariaLabel??(i==="always"?void 0:u.label),title:i==="always"?void 0:u.label,className:`${im} ${sm[u.tone??"default"]} ${u.pressed?"bg-primary/15":""}`,children:[u.loading?d.jsx(In,{}):u.icon&&d.jsx("span",{"aria-hidden":!0,className:"inline-flex",children:u.icon}),d.jsx("span",{className:hy[i],children:u.label})]},u.key)}),n.length>0&&d.jsx(uy,{items:n,label:c("moreActions"),align:"end",buttonClassName:`${im} ${sm.default}`,children:d.jsxs("svg",{"aria-hidden":!0,width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:[d.jsx("circle",{cx:"5",cy:"12",r:"2"}),d.jsx("circle",{cx:"12",cy:"12",r:"2"}),d.jsx("circle",{cx:"19",cy:"12",r:"2"})]})})]})}const dy='a[href], button:not([disabled]), select:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function nm(e){return e?Array.from(e.querySelectorAll(dy)):[]}function fy(e,t,i){if(e.length===0)return null;const n=t?e.indexOf(t):-1;return n===-1?i?e[e.length-1]:e[0]:i&&n===0?e[e.length-1]:!i&&n===e.length-1?e[0]:null}const my={sm:"sm:max-w-sm",md:"sm:max-w-md",lg:"sm:max-w-3xl",full:"sm:max-w-6xl sm:h-[90vh]"},mn=[];function ka({open:e,onClose:t,title:i,children:n,actions:a,size:c="md",closeOnEscape:u=!0,closeOnBackdrop:f=!0,showClose:g=!0,initialFocus:p,description:y}){const v=wa(),k=I.useId(),S=I.useId(),w=I.useRef(null),C=I.useRef(null),b=I.useRef(!1),P=I.useRef({onClose:t,closeOnEscape:u});if(I.useEffect(()=>{P.current={onClose:t,closeOnEscape:u}}),Ov(e),I.useEffect(()=>{var Q;if(!e)return;const E=Symbol("modal");mn.push(E);const M=document.activeElement instanceof HTMLElement?document.activeElement:null;if(!((Q=w.current)!=null&&Q.contains(document.activeElement))){const J=(p==null?void 0:p.current)??nm(C.current)[0]??w.current;J==null||J.focus()}const R=J=>{if(mn[mn.length-1]===E){if(J.key==="Escape"){if(J.defaultPrevented||!P.current.closeOnEscape)return;J.preventDefault(),P.current.onClose()}else if(J.key==="Tab"){const q=fy(nm(w.current),document.activeElement,J.shiftKey);q&&(J.preventDefault(),q.focus())}}};return document.addEventListener("keydown",R),()=>{document.removeEventListener("keydown",R),mn.splice(mn.indexOf(E),1),M!=null&&M.isConnected&&M.focus()}},[e]),!e)return null;const j=c==="full";return Mu.createPortal(d.jsx("div",{className:"fixed inset-0 z-50 flex items-end sm:items-center justify-center sm:p-4 bg-overlay motion-safe:animate-fade-in",onMouseDown:E=>{b.current=E.target===E.currentTarget},onClick:E=>{f&&b.current&&E.target===E.currentTarget&&t(),b.current=!1},children:d.jsxs("div",{ref:w,role:"dialog","aria-modal":"true","aria-labelledby":k,"aria-describedby":y?S:void 0,tabIndex:-1,className:`relative flex flex-col w-full bg-popover border-border shadow-2xl focus:outline-none sm:border sm:rounded-xl sm:max-h-[90vh] ${my[c]} ${j?"h-[100dvh] sm:h-[90vh] pt-[env(safe-area-inset-top)] sm:pt-0":"max-h-[92dvh] border-t rounded-t-2xl motion-safe:animate-sheet-in sm:motion-safe:animate-pop-in"} pb-[env(safe-area-inset-bottom)] sm:pb-0 pl-[env(safe-area-inset-left)] pr-[env(safe-area-inset-right)] sm:px-0`,children:[!j&&d.jsx("div",{"aria-hidden":!0,className:"sm:hidden mx-auto mt-2 h-1 w-10 rounded-full bg-border"}),d.jsxs("div",{className:"flex items-start gap-3 px-5 py-4 border-b border-border/75",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("h3",{id:k,className:"text-base font-semibold text-heading break-words",children:i}),y&&d.jsx("p",{id:S,className:"mt-1 text-xs text-muted",children:y})]}),g&&d.jsx("button",{type:"button",onClick:t,"aria-label":v("dialogClose"),title:v("dialogClose"),className:"-mr-2 -my-1 w-11 h-11 sm:w-8 sm:h-8 shrink-0 inline-flex items-center justify-center rounded-lg text-muted hover:text-text hover:bg-control-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",children:d.jsx("svg",{"aria-hidden":!0,width:"12",height:"12",viewBox:"0 0 12 12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",children:d.jsx("path",{d:"M2 2l8 8M10 2l-8 8"})})})]}),d.jsx("div",{ref:C,className:"flex-1 min-h-0 overflow-y-auto overscroll-contain px-5 py-4 text-sm text-text",children:n}),a&&d.jsx("div",{className:"px-5 py-3 border-t border-border/75 flex flex-wrap justify-end gap-2 [&>button]:min-h-11 sm:[&>button]:min-h-0",children:a})]})}),Pu())}const om="px-3 py-1.5 text-sm sm:text-xs rounded-lg transition-colors disabled:opacity-50 inline-flex items-center justify-center gap-1.5";function py({open:e,title:t,message:i,confirmLabel:n,cancelLabel:a,busyLabel:c,tone:u="default",onConfirm:f,onCancel:g,error:p,busy:y=!1,size:v="sm"}){const k=wa(),[S,w]=I.useState(!1),[C,b]=I.useState(null),P=I.useRef(null),j=I.useRef(null),E=S||y;async function M(){b(null),w(!0);try{await f()}catch(Q){b(Q instanceof Error?Q.message:String(Q))}finally{w(!1)}}const R=()=>{E||(b(null),g())};return d.jsx(ka,{open:e,onClose:R,title:t,size:v,closeOnEscape:!E,closeOnBackdrop:!E,showClose:!1,initialFocus:u==="danger"?P:j,actions:d.jsxs(d.Fragment,{children:[d.jsx("button",{ref:P,type:"button",onClick:R,disabled:E,className:`${om} bg-control hover:bg-control-hover text-text`,children:a??k("confirmCancel")}),d.jsxs("button",{ref:j,type:"button",onClick:()=>void M(),disabled:E,"aria-busy":E||void 0,className:`${om} ${u==="danger"?"bg-error/20 hover:bg-error/30 text-error":"bg-primary hover:bg-primary-hover text-on-primary"}`,children:[E&&d.jsx(In,{size:12}),E?c??k("confirmBusy"):n??k("confirmOk")]})]}),children:d.jsxs("div",{className:"space-y-2",children:[d.jsx("div",{children:i}),(C||p)&&d.jsx("p",{role:"alert",className:"text-error text-xs",children:C??p})]})})}function Bn(){const[e,t]=I.useState(null),i=I.useCallback(a=>new Promise(c=>t({...a,resolve:c})),[]),n=d.jsx(py,{open:e!==null,title:(e==null?void 0:e.title)??"",message:e==null?void 0:e.message,confirmLabel:e==null?void 0:e.confirmLabel,cancelLabel:e==null?void 0:e.cancelLabel,tone:e==null?void 0:e.tone,onCancel:()=>{e==null||e.resolve(!1),t(null)},onConfirm:async()=>{var a;e&&(await((a=e.onConfirm)==null?void 0:a.call(e)),e.resolve(!0),t(null))}});return{confirm:i,dialog:n}}function gy(e=[],t=[]){return e.length!==t.length||e.some((i,n)=>!Object.is(i,t[n]))}class Cp extends I.Component{constructor(){super(...arguments);Sc(this,"state",{error:null});Sc(this,"retry",()=>this.setState({error:null}))}static getDerivedStateFromError(i){return{error:i}}componentDidCatch(i,n){console.error(`[console] ${this.props.label??"section"} failed to render`,i,n.componentStack)}componentDidUpdate(i,n){this.state.error&&n.error&&gy(i.resetKeys,this.props.resetKeys)&&this.setState({error:null})}render(){const{error:i}=this.state;return i?d.jsx(_y,{error:i,label:this.props.label,page:this.props.variant==="page",onRetry:this.retry}):this.props.children}}function _y({error:e,label:t,page:i,onRetry:n}){const{t:a}=Ur(),c={page:a("pageFailed"),section:a("sectionFailed",{label:t??a("thisSection")}),retry:a("retry")};return d.jsxs("div",{role:"alert",className:i?"m-6 p-6 rounded-xl border border-error/30 bg-error/[0.06]":"p-4 rounded-lg border border-error/30 bg-error/[0.06]",children:[d.jsx("div",{className:"text-sm font-medium text-error",children:i?c.page:c.section}),d.jsx("div",{className:"mt-1 text-xs text-error/70 font-mono break-all",children:e.message||String(e)}),d.jsx("button",{onClick:n,className:"mt-3 text-xs px-3 py-1 rounded-md border border-border text-text hover:bg-control",children:c.retry})]})}function vy(e,t,i){const n=i==="asc"?1:-1,a=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return e.map((c,u)=>({row:c,index:u,value:t(c)})).sort((c,u)=>{const f=c.value===null||c.value===void 0||c.value==="",g=u.value===null||u.value===void 0||u.value==="";if(f||g)return f===g?c.index-u.index:f?1:-1;const p=typeof c.value=="number"&&typeof u.value=="number"?c.value-u.value:a.compare(String(c.value),String(u.value));return p!==0?p*n:c.index-u.index}).map(c=>c.row)}function yy(e,t){return Math.max(1,Math.ceil(Math.max(0,e)/t))}function Sy(e,t,i){return Math.min(Math.max(0,e),yy(t,i)-1)}function wy(e,t,i){const n=Sy(t,e.length,i)*i;return e.slice(n,n+i)}function Yt({message:e,detail:t,action:i,className:n=""}){const{t:a}=Ur();return d.jsxs("div",{className:`px-4 py-8 text-center ${n}`,children:[d.jsx("div",{className:"text-sm text-subtle",children:e??a("noData")}),t&&d.jsx("div",{className:"text-xs text-subtle/80 mt-1",children:t}),i&&d.jsx("div",{className:"mt-3",children:i})]})}function ky({permission:e,title:t,className:i=""}){const{t:n}=Ur();return d.jsxs("div",{role:"status",className:`rounded-lg border border-border bg-control/40 p-4 flex items-start gap-3 ${i}`,children:[d.jsx("span",{"aria-hidden":!0,className:"text-lg leading-none text-subtle",children:"🔒"}),d.jsxs("div",{className:"min-w-0",children:[d.jsx("div",{className:"text-sm font-medium text-heading",children:t??n("noAccess")}),d.jsx("div",{className:"mt-0.5 text-xs text-muted",children:e?xy(n("noAccessPermission",{permission:"\0"}),e):n("noAccessHint")})]})]})}function xy(e,t){const[i,n=""]=e.split("\0");return d.jsxs(d.Fragment,{children:[i,d.jsx("code",{className:"font-mono text-text",children:t}),n]})}function Ze({title:e,error:t,onRetry:i,compact:n=!1,className:a=""}){const{t:c}=Ur(),u=Uv(t);if(u&&!n)return d.jsx(ky,{permission:u.permission,className:a});const f=t==null||t===""?"":u!=null&&u.permission?c("missingPermission",{permission:u.permission}):gr(t);return d.jsxs("div",{role:"alert",className:`rounded-lg border border-error/30 bg-error/[0.06] ${n?"px-3 py-2":"p-4"} flex flex-wrap items-start justify-between gap-3 ${a}`,children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("div",{className:"text-sm font-medium text-error",children:e??c("loadFailed")}),f&&d.jsx("div",{className:"mt-0.5 text-xs text-error/80 font-mono break-all",children:f})]}),i&&d.jsx("button",{type:"button",onClick:i,className:"shrink-0 px-3 py-1 text-xs rounded-md border border-error/40 text-error hover:bg-error/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-error/50",children:c("retry")})]})}function Cy({columns:e,data:t,onRowClick:i,keyExtractor:n,defaultSort:a,page:c,emptyMessage:u,plain:f=!1}){const{t:g}=Ur(),[p,y]=I.useState(a??null),v=p?e.find(C=>C.key===p.key&&C.sortValue):void 0,k=v&&p?vy(t,v.sortValue,p.direction):t,S=c?wy(k,c.index,c.size):k;function w(C){y(b=>(b==null?void 0:b.key)===C?{key:C,direction:b.direction==="asc"?"desc":"asc"}:{key:C,direction:"asc"})}return d.jsxs("div",{className:f?"overflow-x-auto":"bg-surface border border-border rounded-xl overflow-x-auto",children:[d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{children:d.jsx("tr",{className:"border-b border-border/75",children:e.map(C=>{const b=(p==null?void 0:p.key)===C.key&&!!C.sortValue;return d.jsx("th",{"aria-sort":b?p.direction==="asc"?"ascending":"descending":void 0,className:`px-4 py-3 text-left text-xs text-subtle font-medium uppercase tracking-wide ${C.className??""}`,children:C.sortValue?d.jsxs("button",{type:"button",onClick:()=>w(C.key),title:g("sortBy",{column:C.header}),className:`inline-flex items-center gap-1 uppercase tracking-wide hover:text-text ${b?"text-text":""}`,children:[C.header,d.jsx("span",{"aria-hidden":!0,className:`text-[9px] ${b?"":"opacity-30"}`,children:b&&p.direction==="desc"?"▼":"▲"})]}):C.header},C.key)})})}),d.jsx("tbody",{children:S.map(C=>d.jsx("tr",{onClick:i?()=>i(C):void 0,onKeyDown:i?b=>{b.target!==b.currentTarget||b.key!=="Enter"&&b.key!==" "||(b.preventDefault(),i(C))}:void 0,tabIndex:i?0:void 0,className:`border-b border-border/50 last:border-0 ${i?"cursor-pointer hover:bg-control focus-visible:bg-control focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary/60":""}`,children:e.map(b=>d.jsx("td",{className:`px-4 py-3 text-text ${b.className??""}`,children:b.render?b.render(C):String(C[b.key]??"")},b.key))},n(C)))})]}),t.length===0&&(u??d.jsx(Yt,{}))]})}function $r(e){const{t}=Ur();return d.jsx(Cp,{label:t("table"),resetKeys:[e.data],children:d.jsx(Cy,{...e})})}const by={responsive:"w-full sm:w-auto",full:"w-full",auto:"w-auto"},Ey={sm:"min-h-11 sm:min-h-0 px-2.5 py-1.5 text-xs",md:"min-h-11 sm:min-h-0 px-3 py-2 text-sm"};function Tu(e){const{value:t,onChange:i,onClear:n,...a}=e;return d.jsx(Dy,{...a,multiple:!1,selected:t===null?[]:[t],onPick:c=>i(c),onClear:n})}function Dy({options:e,label:t,id:i,placeholder:n,searchable:a,disabled:c=!1,size:u="sm",width:f="responsive",className:g="",multiple:p,selected:y,onPick:v,onClear:k,maxChips:S=2}){const w=wa(),C=I.useId(),b=W=>`${C}-o${W}`,[P,j]=I.useState(!1),[E,M]=I.useState(-1),[R,Q]=I.useState(""),[J,q]=I.useState(null),H=I.useRef(null),F=I.useRef(null),ee=I.useRef(null),$=wp(),z=a??e.length>10,K=I.useMemo(()=>{const W=R.trim().toLowerCase();return W?e.filter(ae=>ae.label.toLowerCase().includes(W)||ae.value.toLowerCase().includes(W)):e},[e,R]),X=I.useMemo(()=>K.map(W=>!!W.disabled),[K]),se=I.useMemo(()=>K.map(W=>W.label),[K]),ne=yp(P,J,H),A=(W=!0)=>{j(!1),Q(""),W&&(J==null||J.focus())};Sp(P,()=>[J,H.current],()=>A(!1),()=>A(!1));function oe(W){if(c)return;const ae=e.findIndex(_e=>y.includes(_e.value)&&!_e.disabled),de=e.map(_e=>!!_e.disabled);Q(""),M(W??(ae>=0?ae:gs(de))),j(!0)}I.useEffect(()=>{var W;P&&z&&((W=ee.current)==null||W.focus())},[P,z]),I.useEffect(()=>{var W,ae;!P||E<0||(ae=(W=document.getElementById(`${C}-o${E}`))==null?void 0:W.scrollIntoView)==null||ae.call(W,{block:"nearest"})},[P,E,C]);function re(W){const ae=K[W];!ae||ae.disabled||(v(ae.value),p||A())}function T(W){const ae=W.currentTarget===ee.current;if(!P){if(W.key==="ArrowDown"||W.key==="ArrowUp"||W.key==="Enter"||W.key===" ")W.preventDefault(),oe();else if(W.key==="Home"||W.key==="End"){W.preventDefault();const de=e.map(_e=>!!_e.disabled);oe(W.key==="Home"?gs(de):yi(de))}else if(Hc(W)){const de=e.findIndex(ke=>y.includes(ke.value)),_e=$(W.key,e.map(ke=>ke.label),e.map(ke=>!!ke.disabled),de);_e!==de&&_e>=0&&(p?oe(_e):v(e[_e].value))}return}switch(W.key){case"ArrowDown":W.preventDefault(),M(de=>de<0?gs(X):Nn(X,de,1));break;case"ArrowUp":if(W.preventDefault(),W.altKey){p||re(E),A();break}M(de=>de<0?yi(X):Nn(X,de,-1));break;case"Home":case"End":if(ae&&!W.ctrlKey)break;W.preventDefault(),M(W.key==="Home"?gs(X):yi(X));break;case"PageDown":case"PageUp":{W.preventDefault();let de=E;for(let _e=0;_e<10;_e++)de=Nn(X,de,W.key==="PageDown"?1:-1);M(de);break}case"Enter":W.preventDefault(),re(E);break;case" ":if(ae)break;W.preventDefault(),re(E);break;case"Escape":W.preventDefault(),W.stopPropagation(),A();break;case"Tab":ae?(W.preventDefault(),A()):A(!1);break;default:!ae&&Hc(W)&&M(de=>$(W.key,se,X,de))}}const U=e.filter(W=>y.includes(W.value)),pe=U.length>0,ge=!!k&&pe&&!c;return d.jsxs("div",{className:`relative inline-flex max-w-full ${by[f]} ${g}`,children:[d.jsx("button",{ref:q,id:i,type:"button",role:"combobox","aria-label":t,"aria-haspopup":"listbox","aria-expanded":P,"aria-controls":P?C:void 0,"aria-activedescendant":P&&!z&&E>=0?b(E):void 0,disabled:c,onClick:()=>P?A():oe(),onKeyDown:T,className:`flex-1 min-w-0 inline-flex items-center gap-2 bg-control border rounded-lg text-left text-text transition-colors hover:bg-control-hover focus:outline-none focus-visible:border-primary disabled:opacity-50 disabled:cursor-not-allowed ${P?"border-primary":"border-border/75"} ${Ey[u]} ${ge?"pr-16 sm:pr-12":"pr-7"}`,children:d.jsxs("span",{className:"flex-1 min-w-0 flex items-center gap-1.5 truncate",children:[!pe&&d.jsx("span",{className:"truncate text-subtle",children:n??"—"}),pe&&!p&&d.jsxs(d.Fragment,{children:[U[0].icon&&d.jsx("span",{"aria-hidden":!0,className:"inline-flex shrink-0",children:U[0].icon}),d.jsx("span",{className:"truncate",children:U[0].label})]}),pe&&p&&d.jsxs(d.Fragment,{children:[U.slice(0,S).map(W=>d.jsxs("span",{className:"inline-flex items-center gap-1 max-w-[8rem] px-1.5 py-px rounded bg-primary/15 text-accent text-[11px] leading-4",children:[W.icon&&d.jsx("span",{"aria-hidden":!0,className:"inline-flex shrink-0",children:W.icon}),d.jsx("span",{className:"truncate",children:W.label})]},W.value)),U.length>S&&d.jsx("span",{className:"shrink-0 text-[11px] text-muted tabular-nums",children:w("selectMore",{count:U.length-S})})]})]})}),d.jsx(Ny,{open:P}),ge&&d.jsx("button",{type:"button","aria-label":w("selectClear"),title:w("selectClear"),onClick:()=>{k==null||k(),J==null||J.focus()},className:"absolute right-6 sm:right-5 top-1/2 -translate-y-1/2 w-8 h-8 sm:w-5 sm:h-5 inline-flex items-center justify-center rounded text-subtle hover:text-text hover:bg-control-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",children:d.jsx("svg",{"aria-hidden":!0,width:"10",height:"10",viewBox:"0 0 10 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:d.jsx("path",{d:"M2 2l6 6M8 2l-6 6"})})}),P&&Mu.createPortal(d.jsxs("div",{ref:H,"data-placement":ne==null?void 0:ne.placement,style:ne?{left:ne.left,top:ne.top,minWidth:ne.minWidth,maxHeight:ne.maxHeight}:{left:0,top:0,visibility:"hidden"},className:"fixed z-[60] flex flex-col max-w-[min(24rem,calc(100vw-1rem))] rounded-lg border border-border bg-popover shadow-xl overflow-hidden motion-safe:animate-pop-in",children:[z&&d.jsx("div",{className:"p-1.5 border-b border-border/75",children:d.jsx("input",{ref:ee,type:"text",role:"combobox","aria-label":t?`${t}: ${w("selectSearch")}`:w("selectSearch"),"aria-autocomplete":"list","aria-expanded":!0,"aria-controls":C,"aria-activedescendant":E>=0&&E<K.length?b(E):void 0,placeholder:w("selectSearch"),value:R,onChange:W=>{const ae=W.target.value;Q(ae);const de=ae.trim().toLowerCase(),_e=e.filter(ke=>!de||ke.label.toLowerCase().includes(de)||ke.value.toLowerCase().includes(de)).map(ke=>!!ke.disabled);M(gs(_e))},onKeyDown:T,className:"w-full min-h-11 sm:min-h-0 px-2.5 py-1.5 text-base sm:text-xs bg-control border border-border/75 rounded-md text-text placeholder:text-subtle focus:outline-none focus:border-primary"})}),d.jsxs("ul",{ref:F,id:C,role:"listbox","aria-label":t,"aria-multiselectable":p||void 0,tabIndex:-1,className:"flex-1 min-h-0 overflow-y-auto overscroll-contain p-1",children:[K.length===0&&d.jsx("li",{role:"presentation",className:"px-2.5 py-2 text-xs text-subtle",children:w("selectNoMatches")}),K.map((W,ae)=>{const de=y.includes(W.value);return d.jsxs("li",{id:b(ae),role:"option","aria-selected":de,"aria-disabled":W.disabled||void 0,onMouseMove:()=>{!W.disabled&&E!==ae&&M(ae)},onMouseDown:_e=>_e.preventDefault(),onClick:()=>re(ae),className:`flex items-center gap-2 min-h-11 sm:min-h-8 px-2.5 py-1 rounded-md text-sm sm:text-xs select-none ${W.disabled?"opacity-40 cursor-not-allowed":"cursor-pointer"} ${ae===E?"bg-control-hover":""} ${de?"text-accent font-medium":"text-text"}`,children:[d.jsx(Py,{checked:de,box:p}),W.icon&&d.jsx("span",{"aria-hidden":!0,className:"inline-flex shrink-0",children:W.icon}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate",children:W.label}),W.description&&d.jsx("span",{className:"block truncate text-[11px] font-normal text-subtle",children:W.description})]})]},W.value)})]})]}),Pu())]})}function Ny({open:e}){return d.jsx("svg",{"aria-hidden":!0,width:"10",height:"10",viewBox:"0 0 10 10",className:`absolute right-2.5 top-1/2 -mt-[5px] pointer-events-none text-muted motion-safe:transition-transform ${e?"rotate-180":""}`,children:d.jsx("path",{d:"M2 3.5l3 3 3-3",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Py({checked:e,box:t}){return t?d.jsx("span",{"aria-hidden":!0,className:`inline-flex shrink-0 items-center justify-center w-4 h-4 rounded border ${e?"bg-primary border-primary text-on-primary":"border-border"}`,children:e&&d.jsx(am,{})}):d.jsx("span",{"aria-hidden":!0,className:"inline-flex shrink-0 w-4 justify-center",children:e&&d.jsx(am,{})})}function am(){return d.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",children:d.jsx("path",{d:"M1.5 5.5l2.5 2.5 4.5-5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function My({title:e,subtitle:t,actions:i}){return d.jsxs("div",{className:"px-4 sm:px-6 py-4 border-b border-border/75 flex flex-wrap items-center justify-between gap-x-4 gap-y-2",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("h2",{className:"text-lg font-semibold text-heading",children:e}),t&&d.jsx("p",{className:"text-xs text-subtle mt-0.5",children:t})]}),i&&d.jsx("div",{className:"flex flex-wrap items-center gap-2",children:i})]})}function Ty({label:e,value:t,sub:i,subColor:n="text-subtle"}){return d.jsxs("div",{className:"flex-1 min-w-[140px] bg-surface border border-border rounded-xl p-4",children:[d.jsx("div",{className:"text-[11px] text-subtle uppercase tracking-wide",children:e}),d.jsx("div",{className:"text-2xl font-semibold text-heading mt-1",children:t}),i&&d.jsx("div",{className:`text-[11px] mt-0.5 ${n}`,children:i})]})}function _i(e){return d.jsx(Cp,{label:e.label,resetKeys:[e.value],children:d.jsx(Ty,{...e})})}function Fr({className:e="",style:t}){return d.jsx("div",{"aria-hidden":!0,className:`rounded bg-control ${e}`,style:t})}function Ru({label:e,className:t="",children:i}){const{t:n}=Ur();return d.jsxs("div",{role:"status","aria-live":"polite","aria-busy":"true",className:`animate-pulse motion-reduce:animate-none ${t}`,children:[d.jsx("span",{className:"sr-only",children:e??n("loading")}),i]})}const da=["100%","92%","96%","80%","88%","70%"];function Ry(){return d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"h-4 flex items-center",children:d.jsx(Fr,{className:"h-2.5 w-20"})}),d.jsx("div",{className:"h-8 mt-1 flex items-center",children:d.jsx(Fr,{className:"h-6 w-16"})}),d.jsx("div",{className:"h-4 mt-0.5 flex items-center",children:d.jsx(Fr,{className:"h-2.5 w-24"})})]})}const Ly="flex-1 min-w-[140px] bg-surface border border-border rounded-xl p-4";function Iy({label:e,className:t=""}){return d.jsx(Ru,{label:e,className:`${Ly} ${t}`,children:d.jsx(Ry,{})})}function An({rows:e=5,columns:t=4,label:i,plain:n=!1,className:a=""}){const c=Array.from({length:t},(u,f)=>f);return d.jsxs(Ru,{label:i,className:`${n?"":"bg-surface border border-border rounded-xl"} overflow-hidden ${a}`,children:[d.jsx("div",{className:"flex gap-4 px-4 py-3.5 border-b border-border/75",children:c.map(u=>d.jsx(Fr,{className:"h-2.5 flex-1",style:{maxWidth:u===0?"7rem":"5rem"}},u))}),Array.from({length:e},(u,f)=>d.jsx("div",{className:"flex gap-4 px-4 py-3.5 border-b border-border/50 last:border-0",children:c.map(g=>d.jsx(Fr,{className:"h-3.5 flex-1",style:{maxWidth:g===0?"12rem":da[(f+g)%da.length]}},g))},f))]})}function xa({label:e,columns:t=4,rows:i=6}){return d.jsxs(Ru,{label:e,className:"space-y-6",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Fr,{className:"h-6 w-48"}),d.jsx(Fr,{className:"h-3.5 w-72 max-w-full"})]}),d.jsxs("div",{className:"bg-surface border border-border rounded-xl overflow-hidden",children:[d.jsx("div",{className:"flex gap-4 px-4 py-3.5 border-b border-border/75",children:Array.from({length:t},(n,a)=>d.jsx(Fr,{className:"h-2.5 flex-1 max-w-[6rem]"},a))}),Array.from({length:i},(n,a)=>d.jsx("div",{className:"flex gap-4 px-4 py-3.5 border-b border-border/50 last:border-0",children:Array.from({length:t},(c,u)=>d.jsx(Fr,{className:"h-3.5 flex-1",style:{maxWidth:da[(a+u)%da.length]}},u))},a))]})]})}function By(){const e=I.useRef(null),[t,i]=I.useState(0);return I.useLayoutEffect(()=>{const n=e.current;if(!n||(i(n.clientWidth),typeof ResizeObserver>"u"))return;const a=new ResizeObserver(c=>i(c[0].contentRect.width));return a.observe(n),()=>a.disconnect()},[]),[e,t]}function Ay(e,t=!1){if(!(e>0))return{max:1,ticks:[0,1]};const i=10**Math.floor(Math.log10(e)),n=[.2,.25,.5,1,2,2.5,5,10].map(u=>u*i).filter(u=>!t||Number.isInteger(u)).find(u=>e/u<=4)??i*10,a=Math.ceil(e/n)*n,c=[];for(let u=0;u<=a+n/2;u+=n)c.push(Number(u.toPrecision(12)));return{max:a,ticks:c}}function lm({items:e}){return d.jsx("ul",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted",children:e.map(t=>d.jsxs("li",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:"inline-block w-2.5 h-2.5 rounded-sm",style:{background:t.color},"aria-hidden":!0}),d.jsx("span",{children:t.label}),t.value!==void 0&&d.jsx("span",{className:"text-text font-medium tabular-nums",children:t.value})]},t.label))})}function Oy({x:e,y:t,width:i,title:n,rows:a}){const c=e>i-120,u=e<120,f=c?"translate(-100%, -100%)":u?"translate(0, -100%)":"translate(-50%, -100%)";return d.jsxs("div",{role:"status",className:"pointer-events-none absolute z-10 min-w-[120px] rounded-lg border border-border bg-popover px-3 py-2 text-xs shadow-lg",style:{left:e,top:t-8,transform:f},children:[d.jsx("div",{className:"text-subtle mb-1 whitespace-nowrap",children:n}),a.map(g=>d.jsxs("div",{className:"flex items-center gap-2 whitespace-nowrap",children:[g.color&&d.jsx("span",{className:"inline-block w-3 h-0.5 rounded",style:{background:g.color},"aria-hidden":!0}),d.jsx("span",{className:"text-heading font-semibold tabular-nums",children:g.value}),d.jsx("span",{className:"text-muted",children:g.label})]},g.label))]})}function cm({title:e,note:t,legend:i,actions:n,children:a}){return d.jsxs("section",{className:"bg-surface border border-border rounded-xl p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2 mb-3",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-sm font-semibold text-heading",children:e}),t&&d.jsx("div",{className:"text-[11px] text-subtle mt-0.5",children:t})]}),n]}),i&&d.jsx("div",{className:"mb-2",children:i}),a]})}const pn=44,zy=18;function um({times:e,series:t,formatValue:i,formatTime:n,formatTick:a,height:c=120,minMax:u=0,integer:f=!1,ariaLabel:g}){const[p,y]=By(),[v,k]=I.useState(null),S=Math.max(0,y-pn-8),w=c-zy,C=t.flatMap(F=>F.values.filter(ee=>ee!==null)),{max:b,ticks:P}=Ay(Math.max(u,...C,0),f),j=e[0]??0,E=e[e.length-1]??1,M=Math.max(1,E-j),R=F=>pn+(F-j)/M*S,Q=F=>w-F/b*w,J=F=>{let ee="",$=!1;return F.forEach((z,K)=>{if(z===null){$=!1;return}ee+=`${$?"L":"M"}${R(e[K]).toFixed(1)},${Q(z).toFixed(1)}`,$=!0}),ee},q=F=>{if(e.length===0)return;const ee=F.currentTarget.getBoundingClientRect(),$=j+(F.clientX-ee.left)/Math.max(1,ee.width)*M;let z=0;e.forEach((K,X)=>{Math.abs(K-$)<Math.abs(e[z]-$)&&(z=X)}),k(z)},H=e.length<2?[]:M<4*6e4?[j,E]:[0,1,2,3].map(F=>j+M*F/3);return d.jsxs("div",{ref:p,className:"relative select-none",onPointerLeave:()=>k(null),children:[y>0&&e.length>0&&d.jsxs("svg",{width:y,height:c,role:"img","aria-label":g,className:"block overflow-visible",children:[P.map(F=>d.jsxs("g",{children:[d.jsx("line",{x1:pn,x2:y,y1:Q(F),y2:Q(F),stroke:"var(--qcli-border)",strokeWidth:1,shapeRendering:"crispEdges"}),d.jsx("text",{x:pn-8,y:Q(F),dy:"0.32em",textAnchor:"end",className:"fill-subtle text-[10px] tabular-nums",children:i(F)})]},F)),H.map((F,ee)=>d.jsx("text",{x:R(F),y:c-3,textAnchor:ee===0?"start":ee===H.length-1?"end":"middle",className:"fill-subtle text-[10px]",children:a(F)},F)),t.length===1&&J(t[0].values)&&d.jsx("path",{d:`${J(t[0].values)}V${w}H${R(e.find((F,ee)=>t[0].values[ee]!==null)??j)}Z`,fill:t[0].color,opacity:.1}),t.filter(F=>J(F.values)).map(F=>d.jsx("path",{d:J(F.values),fill:"none",stroke:F.color,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"},F.key)),t.map(F=>{const ee=F.values.length-1,$=F.values[ee];return $==null?null:d.jsx("circle",{cx:R(e[ee]),cy:Q($),r:4,fill:F.color,stroke:"var(--qcli-background)",strokeWidth:2},F.key)}),v!==null&&d.jsxs("g",{children:[d.jsx("line",{x1:R(e[v]),x2:R(e[v]),y1:0,y2:w,stroke:"var(--qcli-muted)",strokeWidth:1,shapeRendering:"crispEdges"}),t.map(F=>F.values[v]===null?null:d.jsx("circle",{cx:R(e[v]),cy:Q(F.values[v]),r:4,fill:F.color,stroke:"var(--qcli-background)",strokeWidth:2},F.key))]}),d.jsx("rect",{x:pn,y:0,width:S,height:w,fill:"transparent",onPointerMove:q,onPointerDown:q})]}),v!==null&&d.jsx(Oy,{x:R(e[v]),y:Math.min(...t.map(F=>F.values[v]===null?w:Q(F.values[v]))),width:y,title:n(e[v]),rows:t.map(F=>({label:F.label,value:F.values[v]===null?"—":i(F.values[v]),color:F.color}))})]})}function jy(e){try{return localStorage.getItem(e)}catch{return null}}function Fy(e,t){try{localStorage.setItem(e,t)}catch{}}function hm(e,t,i){const[n,a]=I.useState(()=>{const u=jy(e);return(u!==null?t(u):null)??i()}),c=I.useCallback(u=>{a(u),Fy(e,String(u))},[e]);return[n,c]}function Ht(e,t=[]){const[i,n]=I.useState(null),[a,c]=I.useState(!0),[u,f]=I.useState(null),g=I.useRef(0),p=I.useCallback(async k=>{const S=++g.current;k!==!0&&(c(!0),f(null));try{const w=await e();S===g.current&&(n(w),f(null))}catch(w){S===g.current&&f(w instanceof Error?w.message:"Failed to fetch")}finally{S===g.current&&c(!1)}},t);I.useEffect(()=>{p()},[p]);const y=I.useCallback(()=>{p()},[p]),v=I.useCallback(()=>{p(!0)},[p]);return{data:i,loading:a,error:u,refetch:y,refresh:v}}const De="/api/v1/qcli/docker",Hy="/ws/v1/qcli/docker/exec";function Me(e,t={}){const i=new URLSearchParams;e&&i.set("host",e);for(const[a,c]of Object.entries(t))c!==void 0&&i.set(a,String(c));const n=i.toString();return n?`?${n}`:""}const Et=encodeURIComponent,$y=e=>e.get(`${De}/hosts`),Uy=(e,t)=>e.get(`${De}/info${Me(t)}`),Wy=(e,t)=>e.get(`${De}/df${Me(t)}`),Vy=(e,t,i=3600,n=200)=>e.get(`${De}/events${Me(t,{since:i,limit:n})}`),bp=(e,t,i={})=>e.get(`${De}/containers${Me(t,{all:i.all??!0,stack:i.stack})}`),Ky=(e,t,i)=>e.get(`${De}/containers/${Et(t)}${Me(i)}`),qy=(e,t,i,n={})=>e.get(`${De}/containers/${Et(t)}/logs${Me(i,{tail:n.tail??100,since:n.since,timestamps:n.timestamps??!0})}`),Ep=(e,t,i)=>e.get(`${De}/stats${Me(t,{ids:i!=null&&i.length?i.join(","):void 0})}`),Yy=(e,t)=>e.get(`${De}/images${Me(t)}`),Gy=(e,t)=>e.get(`${De}/stacks${Me(t)}`),Dp=(e,t,i)=>e.get(`${De}/stacks/${Et(t)}${Me(i)}`),Xy=(e,t)=>e.get(`${De}/compose${Me(t)}`),Zy=(e,t)=>e.get(`${De}/volumes${Me(t)}`),Qy=(e,t)=>e.get(`${De}/networks${Me(t)}`),Jy=e=>e.get(`${De}/operations`),eS=(e,t)=>e.get(`${De}/operations/${Et(t)}`),tS=(e,t,i,n)=>e.post(`${De}/containers/${Et(t)}/${i}${Me(n)}`),rS=(e,t,i)=>e.post(`${De}/images/pull${Me(i)}`,{image:t}),sS=(e,t,i,n)=>e.post(`${De}/stacks/${Et(t)}/${i}${Me(n)}`),iS=(e,t,i)=>e.post(`${De}/stacks/${Et(t)}/pull${Me(i)}`),nS=(e,t,i,n)=>e.post(`${De}/exec/${Et(t)}${Me(n)}`,i),oS=(e,t,i,n={})=>e.del(`${De}/admin/containers/${Et(t)}${Me(i,{force:n.force,volumes:n.volumes})}`),aS=(e,t,i,n)=>e.del(`${De}/admin/images/${Et(t)}${Me(i,{force:n})}`),lS=(e,t,i)=>e.post(`${De}/admin/images/prune${Me(t)}`,i?{all:!0}:{}),cS=(e,t,i)=>e.post(`${De}/admin/volumes${Me(i)}`,t),uS=(e,t,i,n)=>e.del(`${De}/admin/volumes/${Et(t)}${Me(i,{force:n})}`),hS=(e,t)=>e.post(`${De}/admin/volumes/prune${Me(t)}`),dS=(e,t,i)=>e.post(`${De}/admin/networks${Me(i)}`,t),fS=(e,t,i)=>e.del(`${De}/admin/networks/${Et(t)}${Me(i)}`),mS=(e,t)=>e.post(`${De}/admin/networks/prune${Me(t)}`),pS=(e,t,i,n)=>e.post(`${De}/admin/stacks/${Et(t)}/down${Me(i)}`,n?{volumes:n.volumes}:void 0),gS=(e,t,i,n)=>e.put(`${De}/admin/stacks/${Et(t)}/compose${Me(n)}`,{content:i}),Np=(e,t,i,n)=>e.post(`${De}/admin/stacks/${Et(t)}/up${Me(n)}`,{pull:i.pull}),_S=(e,t,i)=>e.del(`${De}/admin/stacks/${Et(t)}/compose${Me(i)}`),vS={title:"Docker",subtitle:"Docker {version} · {endpoint}",subtitleShort:"Containers, stacks, images, volumes and networks",loading:"Loading…",loadFailed:"Could not load Docker",refreshFailed:"Could not refresh",readOnly:"Read-only",host:"Host",unreachableShort:"unreachable",unreachable:"Cannot reach Docker on {host}",unknownHost:"Unknown Docker host: {host}","tab.containers":"Containers","tab.stacks":"Stacks","tab.images":"Images","tab.volumes":"Volumes","tab.networks":"Networks","tab.system":"System",back:"Back",refresh:"Refresh",copy:"Copy",copied:"Copied",cancel:"Cancel",create:"Create",created:"{name} created",removed:"{name} removed",none:"None",protected:"Protected",actionsFor:"Actions for {name}",actionDone:"{action}: {name}","action.start":"Start","action.stop":"Stop","action.restart":"Restart","action.pause":"Pause","action.unpause":"Unpause","action.kill":"Kill","action.remove":"Remove","state.created":"Created","state.running":"Running","state.paused":"Paused","state.restarting":"Restarting","state.removing":"Removing","state.exited":"Exited","state.dead":"Dead","health.healthy":"Healthy","health.unhealthy":"Unhealthy","health.starting":"Starting","col.name":"Name","col.image":"Image","col.state":"State","col.status":"Status","col.health":"Health","col.ports":"Ports","col.stack":"Stack","col.service":"Service","col.services":"Services","col.containers":"Containers","col.cpu":"CPU","col.memory":"Memory","col.id":"ID","col.size":"Size","col.created":"Created","col.usedBy":"Used by","col.driver":"Driver","col.scope":"Scope","col.subnets":"Subnets","col.mountpoint":"Mount point","col.type":"Type","col.source":"Source","col.destination":"Destination","col.mode":"Mode","col.ip":"IP","col.gateway":"Gateway","col.mac":"MAC","col.time":"Time","col.action":"Action",search:"Search containers",showStopped:"Show stopped",containerCount_one:"{count} container",containerCount_other:"{count} containers",noContainers:"No containers.",noMatch:"No container matches.","view.summary":"Summary","view.logs":"Logs","view.stats":"Stats","view.run":"Run command","view.terminal":"Terminal","section.container":"Container","section.ports":"Ports","section.mounts":"Mounts","section.networks":"Networks","section.environment":"Environment","field.id":"ID","field.image":"Image","field.status":"Status","field.created":"Created","field.started":"Started","field.finished":"Finished","field.exitCode":"Exit code","field.restartPolicy":"Restart policy","field.platform":"Platform","field.command":"Command","field.stack":"Stack","field.workingDir":"Working directory","field.configFiles":"Compose files",restarts_one:"{count} restart",restarts_other:"{count} restarts",killTitle:"Kill {name}?",killMessage:"The container is stopped immediately, without a chance to shut down cleanly.",removeContainerTitle:"Remove {name}?",removeContainerMessage:"The container is deleted. Its volumes are kept.",removeRunningMessage:"The container is running: it is stopped and deleted. Its volumes are kept.","logs.tail":"Lines","logs.lines_one":"Last {count} line","logs.lines_other":"Last {count} lines","logs.follow":"Follow","logs.following":"Following","logs.wrap":"Wrap lines","logs.empty":"No log lines.","logs.failed":"Could not load the logs","stats.notRunning":"The container is not running: there are no live figures.","stats.waiting":"Waiting for the first sample…","stats.failed":"Could not read the stats","stats.network":"Network","stats.block":"Disk I/O","stats.pids":"Processes","stats.cpuChart":"CPU usage","stats.memoryChart":"Memory usage","run.command":"Command","run.placeholder":"ls -la /app","run.user":"User","run.workdir":"Working directory","run.hint":"The command runs without a shell: use sh -c '…' for pipes, && and variables.","run.run":"Run","run.exitCode":"Exit code","run.truncated":"Output truncated","run.noOutput":"The command printed nothing.","run.failed":"The command could not run","run.notRunning":"The container is not running.","term.connecting":"Connecting…","term.connected":"Connected","term.exited":"The shell exited with code {code}","term.ended":"The session ended.","term.refused":"The server refused the connection (read-only mode, a protected container, or a missing permission).","term.closed":"The connection closed (code {code}).","term.reconnect":"Reconnect","stackState.running":"Running","stackState.partial":"Partly running","stackState.stopped":"Stopped",noStacks:"No stacks.",noStacksHint:"Stacks are Docker Compose projects; create one with docker compose on the host.",composeFile:"Compose file",stackDown:"Down",stackDownTitle:"Bring {name} down?",stackDownMessage:"Its containers are stopped and removed, then its networks. Volumes and images are kept.",stackDownDone:"{name} is down",stackPartial:"{name}: some containers failed.",pullStarted:"Pulling the images of {name}",operations:"Operations","op.running":"Running","op.done":"Done","op.failed":"Failed","op.working":"Working…",pull:"Pull",pullImage:"Image to pull",pullPlaceholder:"nginx:latest",noImages:"No images.",dangling:"Dangling",removeImageTitle:"Remove {name}?",removeImageMessage:"The image is deleted from the host.",removeImageUsed_one:"The image is used by {count} container; it is removed anyway where the engine allows it.",removeImageUsed_other:"The image is used by {count} containers; it is removed anyway where the engine allows it.",prune:"Prune",pruneDangling:"Prune dangling",pruneUnused:"Prune unused",pruneImagesTitle:"Prune dangling images?",pruneImagesMessage:"Images without a tag that no container uses are deleted.",pruneImagesAllTitle:"Prune all unused images?",pruneImagesAllMessage:"Every image that no container uses is deleted, tagged or not.",pruned_one:"{count} item removed, {size} reclaimed",pruned_other:"{count} items removed, {size} reclaimed",prunedCount_one:"{count} item removed",prunedCount_other:"{count} items removed",noVolumes:"No volumes.",createVolume:"Create volume",inUse:"In use",unused:"Unused",removeVolumeTitle:"Remove volume {name}?",removeVolumeMessage:"The volume and its data are deleted.",removeVolumeInUse:"The volume is used by a container: the engine refuses to remove it until that container is gone.",pruneVolumes:"Prune volumes",pruneVolumesTitle:"Prune unused volumes?",pruneVolumesMessage:"Every volume that no container uses is deleted with its data.",noNetworks:"No networks.",createNetwork:"Create network",builtin:"Built-in",internal:"Internal",internalNetwork:"Internal network (no outside access)",subnet:"Subnet",removeNetworkTitle:"Remove network {name}?",removeNetworkMessage:"The network is deleted; the engine refuses when containers are still connected.",pruneNetworks:"Prune networks",pruneNetworksTitle:"Prune unused networks?",pruneNetworksMessage:"Every custom network without containers is deleted.","sys.engine":"Engine","sys.name":"Host name","sys.version":"Version","sys.os":"System","sys.cpus":"CPUs","sys.memory":"Memory","sys.storage":"Storage driver","sys.rootDir":"Root directory","sys.containers":"Containers","sys.containersValue":"{total} total · {running} running · {paused} paused · {stopped} stopped","sys.images":"Images","sys.disk":"Disk usage","sys.imagesUsage":"Images","sys.containersUsage":"Containers","sys.volumesUsage":"Volumes","sys.buildCache":"Build cache",reclaimable_one:"{size} reclaimable · {count} item",reclaimable_other:"{size} reclaimable · {count} items","sys.events":"Recent events","sys.period":"Period","sys.last1h":"Last hour","sys.last6h":"Last 6 hours","sys.last24h":"Last 24 hours","sys.noEvents":"No events in this period.",cardRunning:"running",cardUnhealthy_one:"{count} unhealthy",cardUnhealthy_other:"{count} unhealthy",cardSummary:"{running} of {total} containers running, {unhealthy} unhealthy",cardError:"Could not load Docker",openPage:"Open the Docker page",unprotectedTitle:"The Docker plugin needs a protected server",unprotectedHint:"Docker access is root-equivalent: turn on sign-in (the users plugin), or set allowUnprotected in the Docker plugin's settings.",openSettings:"Open the Docker settings",noComposeFile:"No compose file is shown: add the folder of the stack's compose file to the composeRoots setting of the Docker plugin (a local Docker socket only).","stackState.down":"Down",composeUnavailable:"Compose is not available",composeUnavailableHint:"Creating and deploying stacks from compose files is not set up on this server.",newStack:"New stack",stackName:"Stack name",stackNameHint:"Lowercase letters, digits, - and _; at most 63 characters.",stackNameInvalid:"Use lowercase letters, digits, - and _, starting with a letter or digit (63 characters at most).",stackNameTaken:"A stack with this name already exists.",composeYaml:"Compose file (YAML)",editStackTitle:"Edit {name}",save:"Save",saveDeploy:"Save and deploy",saving:"Saving…",composeSaved:"{name}: compose file saved.",stackEdit:"Edit",stackDeploy:"Deploy",deployTitle:"Deploy {name}?",deployMessage:"Runs docker compose up -d with the file: missing containers are created, changed ones recreated and services removed from the file are removed.",pullImages:"Pull images first",deployStarted:"Deploying {name}",stackDownFileMessage:"Its containers and networks are removed. Volumes are kept unless you choose to remove them.",removeVolumes:"Also remove the stack's volumes",stackDeleteFile:"Delete file",deleteFileTitle:"Delete the compose file of {name}?",deleteFileMessage:"The file is removed from the server (its folder stays) and the stack disappears from the list.",fileDeleted:"{name}: compose file deleted","op.output":"Output of {title}"},yS={title:"Docker",subtitle:"Docker {version} · {endpoint}",subtitleShort:"Contenedores, stacks, imágenes, volúmenes y redes",loading:"Cargando…",loadFailed:"No se pudo cargar Docker",refreshFailed:"No se pudo actualizar",readOnly:"Solo lectura",host:"Host",unreachableShort:"inaccesible",unreachable:"No se puede acceder a Docker en {host}",unknownHost:"Host de Docker desconocido: {host}","tab.containers":"Contenedores","tab.stacks":"Stacks","tab.images":"Imágenes","tab.volumes":"Volúmenes","tab.networks":"Redes","tab.system":"Sistema",back:"Atrás",refresh:"Actualizar",copy:"Copiar",copied:"Copiado",cancel:"Cancelar",create:"Crear",created:"{name} creado",removed:"{name} eliminado",none:"Ninguno",protected:"Protegido",actionsFor:"Acciones para {name}",actionDone:"{action}: {name}","action.start":"Iniciar","action.stop":"Detener","action.restart":"Reiniciar","action.pause":"Pausar","action.unpause":"Reanudar","action.kill":"Matar","action.remove":"Eliminar","state.created":"Creado","state.running":"En ejecución","state.paused":"Pausado","state.restarting":"Reiniciando","state.removing":"Eliminando","state.exited":"Finalizado","state.dead":"Muerto","health.healthy":"Saludable","health.unhealthy":"No saludable","health.starting":"Iniciando","col.name":"Nombre","col.image":"Imagen","col.state":"Estado","col.status":"Situación","col.health":"Salud","col.ports":"Puertos","col.stack":"Stack","col.service":"Servicio","col.services":"Servicios","col.containers":"Contenedores","col.cpu":"CPU","col.memory":"Memoria","col.id":"ID","col.size":"Tamaño","col.created":"Creado","col.usedBy":"Usado por","col.driver":"Controlador","col.scope":"Ámbito","col.subnets":"Subredes","col.mountpoint":"Punto de montaje","col.type":"Tipo","col.source":"Origen","col.destination":"Destino","col.mode":"Modo","col.ip":"IP","col.gateway":"Puerta de enlace","col.mac":"MAC","col.time":"Hora","col.action":"Acción",search:"Buscar contenedores",showStopped:"Mostrar detenidos",containerCount_one:"{count} contenedor",containerCount_other:"{count} contenedores",noContainers:"No hay contenedores.",noMatch:"Ningún contenedor coincide.","view.summary":"Resumen","view.logs":"Registros","view.stats":"Estadísticas","view.run":"Ejecutar comando","view.terminal":"Terminal","section.container":"Contenedor","section.ports":"Puertos","section.mounts":"Montajes","section.networks":"Redes","section.environment":"Entorno","field.id":"ID","field.image":"Imagen","field.status":"Situación","field.created":"Creado","field.started":"Iniciado","field.finished":"Finalizado","field.exitCode":"Código de salida","field.restartPolicy":"Política de reinicio","field.platform":"Plataforma","field.command":"Comando","field.stack":"Stack","field.workingDir":"Directorio de trabajo","field.configFiles":"Archivos Compose",restarts_one:"{count} reinicio",restarts_other:"{count} reinicios",killTitle:"¿Matar {name}?",killMessage:"El contenedor se detiene de inmediato, sin posibilidad de apagarse de forma limpia.",removeContainerTitle:"¿Eliminar {name}?",removeContainerMessage:"Se elimina el contenedor. Sus volúmenes se conservan.",removeRunningMessage:"El contenedor está en ejecución: se detiene y se elimina. Sus volúmenes se conservan.","logs.tail":"Líneas","logs.lines_one":"Última {count} línea","logs.lines_other":"Últimas {count} líneas","logs.follow":"Seguir","logs.following":"Siguiendo","logs.wrap":"Ajustar líneas","logs.empty":"No hay líneas de registro.","logs.failed":"No se pudieron cargar los registros","stats.notRunning":"El contenedor no está en ejecución: no hay cifras en vivo.","stats.waiting":"Esperando la primera muestra…","stats.failed":"No se pudieron leer las estadísticas","stats.network":"Red","stats.block":"E/S de disco","stats.pids":"Procesos","stats.cpuChart":"Uso de CPU","stats.memoryChart":"Uso de memoria","run.command":"Comando","run.placeholder":"ls -la /app","run.user":"Usuario","run.workdir":"Directorio de trabajo","run.hint":"El comando se ejecuta sin shell: usa sh -c '…' para tuberías, && y variables.","run.run":"Ejecutar","run.exitCode":"Código de salida","run.truncated":"Salida truncada","run.noOutput":"El comando no mostró nada.","run.failed":"No se pudo ejecutar el comando","run.notRunning":"El contenedor no está en ejecución.","term.connecting":"Conectando…","term.connected":"Conectado","term.exited":"El shell terminó con el código {code}","term.ended":"La sesión terminó.","term.refused":"El servidor rechazó la conexión (modo de solo lectura, un contenedor protegido o un permiso que falta).","term.closed":"La conexión se cerró (código {code}).","term.reconnect":"Reconectar","stackState.running":"En ejecución","stackState.partial":"Parcialmente en ejecución","stackState.stopped":"Detenido",noStacks:"No hay stacks.",noStacksHint:"Los stacks son proyectos de Docker Compose; crea uno con docker compose en el host.",composeFile:"Archivo Compose",stackDown:"Bajar",stackDownTitle:"¿Bajar {name}?",stackDownMessage:"Sus contenedores se detienen y se eliminan, y después sus redes. Los volúmenes y las imágenes se conservan.",stackDownDone:"{name} está abajo",stackPartial:"{name}: algunos contenedores fallaron.",pullStarted:"Descargando las imágenes de {name}",operations:"Operaciones","op.running":"En ejecución","op.done":"Hecho","op.failed":"Fallido","op.working":"Trabajando…",pull:"Descargar",pullImage:"Imagen a descargar",pullPlaceholder:"nginx:latest",noImages:"No hay imágenes.",dangling:"Huérfana",removeImageTitle:"¿Eliminar {name}?",removeImageMessage:"La imagen se elimina del host.",removeImageUsed_one:"La imagen la usa {count} contenedor; se elimina igualmente donde el motor lo permite.",removeImageUsed_other:"La imagen la usan {count} contenedores; se elimina igualmente donde el motor lo permite.",prune:"Limpiar",pruneDangling:"Limpiar huérfanas",pruneUnused:"Limpiar sin uso",pruneImagesTitle:"¿Limpiar las imágenes huérfanas?",pruneImagesMessage:"Se eliminan las imágenes sin etiqueta que ningún contenedor usa.",pruneImagesAllTitle:"¿Limpiar todas las imágenes sin uso?",pruneImagesAllMessage:"Se elimina toda imagen que ningún contenedor usa, con etiqueta o sin ella.",pruned_one:"{count} elemento eliminado, {size} liberados",pruned_other:"{count} elementos eliminados, {size} liberados",prunedCount_one:"{count} elemento eliminado",prunedCount_other:"{count} elementos eliminados",noVolumes:"No hay volúmenes.",createVolume:"Crear volumen",inUse:"En uso",unused:"Sin uso",removeVolumeTitle:"¿Eliminar el volumen {name}?",removeVolumeMessage:"Se elimina el volumen y sus datos.",removeVolumeInUse:"Un contenedor usa el volumen: el motor se niega a eliminarlo hasta que ese contenedor desaparezca.",pruneVolumes:"Limpiar volúmenes",pruneVolumesTitle:"¿Limpiar los volúmenes sin uso?",pruneVolumesMessage:"Se elimina con sus datos todo volumen que ningún contenedor usa.",noNetworks:"No hay redes.",createNetwork:"Crear red",builtin:"Integrada",internal:"Interna",internalNetwork:"Red interna (sin acceso exterior)",subnet:"Subred",removeNetworkTitle:"¿Eliminar la red {name}?",removeNetworkMessage:"Se elimina la red; el motor se niega si aún hay contenedores conectados.",pruneNetworks:"Limpiar redes",pruneNetworksTitle:"¿Limpiar las redes sin uso?",pruneNetworksMessage:"Se elimina toda red personalizada sin contenedores.","sys.engine":"Motor","sys.name":"Nombre del host","sys.version":"Versión","sys.os":"Sistema","sys.cpus":"CPU","sys.memory":"Memoria","sys.storage":"Controlador de almacenamiento","sys.rootDir":"Directorio raíz","sys.containers":"Contenedores","sys.containersValue":"{total} en total · {running} en ejecución · {paused} en pausa · {stopped} detenidos","sys.images":"Imágenes","sys.disk":"Uso de disco","sys.imagesUsage":"Imágenes","sys.containersUsage":"Contenedores","sys.volumesUsage":"Volúmenes","sys.buildCache":"Caché de compilación",reclaimable_one:"{size} recuperables · {count} elemento",reclaimable_other:"{size} recuperables · {count} elementos","sys.events":"Eventos recientes","sys.period":"Periodo","sys.last1h":"Última hora","sys.last6h":"Últimas 6 horas","sys.last24h":"Últimas 24 horas","sys.noEvents":"No hay eventos en este periodo.",cardRunning:"en ejecución",cardUnhealthy_one:"{count} no saludable",cardUnhealthy_other:"{count} no saludables",cardSummary:"{running} de {total} contenedores en ejecución, {unhealthy} no saludables",cardError:"No se pudo cargar Docker",openPage:"Abrir la página de Docker",unprotectedTitle:"El plugin de Docker necesita un servidor protegido",unprotectedHint:"El acceso a Docker equivale a root: activa el inicio de sesión (plugin de usuarios) o define allowUnprotected en los ajustes del plugin de Docker.",openSettings:"Abrir los ajustes de Docker",noComposeFile:"No se muestra ningún archivo compose: añade la carpeta del archivo compose del stack al ajuste composeRoots del plugin de Docker (solo con un socket local de Docker).","stackState.down":"Detenido y eliminado",composeUnavailable:"Compose no está disponible",composeUnavailableHint:"En este servidor no está configurada la creación ni el despliegue de stacks desde archivos compose.",newStack:"Nuevo stack",stackName:"Nombre del stack",stackNameHint:"Minúsculas, dígitos, - y _; 63 caracteres como máximo.",stackNameInvalid:"Usa minúsculas, dígitos, - y _, empezando por una letra o un dígito (63 caracteres como máximo).",stackNameTaken:"Ya existe un stack con este nombre.",composeYaml:"Archivo compose (YAML)",editStackTitle:"Editar {name}",save:"Guardar",saveDeploy:"Guardar y desplegar",saving:"Guardando…",composeSaved:"{name}: archivo compose guardado.",stackEdit:"Editar",stackDeploy:"Desplegar",deployTitle:"¿Desplegar {name}?",deployMessage:"Ejecuta docker compose up -d con el archivo: se crean los contenedores que faltan, se recrean los modificados y se eliminan los servicios que ya no están en el archivo.",pullImages:"Descargar imágenes antes",deployStarted:"Desplegando {name}",stackDownFileMessage:"Se eliminan sus contenedores y redes. Los volúmenes se conservan salvo que elijas eliminarlos.",removeVolumes:"Eliminar también los volúmenes del stack",stackDeleteFile:"Eliminar archivo",deleteFileTitle:"¿Eliminar el archivo compose de {name}?",deleteFileMessage:"El archivo se elimina del servidor (su carpeta permanece) y el stack desaparece de la lista.",fileDeleted:"{name}: archivo compose eliminado","op.output":"Salida de {title}"},SS={title:"Docker",subtitle:"Docker {version} · {endpoint}",subtitleShort:"Conteneurs, stacks, images, volumes et réseaux",loading:"Chargement…",loadFailed:"Impossible de charger Docker",refreshFailed:"Impossible d’actualiser",readOnly:"Lecture seule",host:"Hôte",unreachableShort:"injoignable",unreachable:"Impossible de joindre Docker sur {host}",unknownHost:"Hôte Docker inconnu : {host}","tab.containers":"Conteneurs","tab.stacks":"Stacks","tab.images":"Images","tab.volumes":"Volumes","tab.networks":"Réseaux","tab.system":"Système",back:"Retour",refresh:"Actualiser",copy:"Copier",copied:"Copié",cancel:"Annuler",create:"Créer",created:"{name} créé",removed:"{name} supprimé",none:"Aucun",protected:"Protégé",actionsFor:"Actions pour {name}",actionDone:"{action} : {name}","action.start":"Démarrer","action.stop":"Arrêter","action.restart":"Redémarrer","action.pause":"Mettre en pause","action.unpause":"Reprendre","action.kill":"Tuer","action.remove":"Supprimer","state.created":"Créé","state.running":"En cours","state.paused":"En pause","state.restarting":"Redémarrage","state.removing":"Suppression","state.exited":"Terminé","state.dead":"Mort","health.healthy":"Sain","health.unhealthy":"Défaillant","health.starting":"Démarrage","col.name":"Nom","col.image":"Image","col.state":"État","col.status":"Statut","col.health":"Santé","col.ports":"Ports","col.stack":"Stack","col.service":"Service","col.services":"Services","col.containers":"Conteneurs","col.cpu":"CPU","col.memory":"Mémoire","col.id":"ID","col.size":"Taille","col.created":"Créé","col.usedBy":"Utilisé par","col.driver":"Pilote","col.scope":"Portée","col.subnets":"Sous-réseaux","col.mountpoint":"Point de montage","col.type":"Type","col.source":"Source","col.destination":"Destination","col.mode":"Mode","col.ip":"IP","col.gateway":"Passerelle","col.mac":"MAC","col.time":"Heure","col.action":"Action",search:"Rechercher des conteneurs",showStopped:"Afficher les arrêtés",containerCount_one:"{count} conteneur",containerCount_other:"{count} conteneurs",noContainers:"Aucun conteneur.",noMatch:"Aucun conteneur ne correspond.","view.summary":"Résumé","view.logs":"Journaux","view.stats":"Statistiques","view.run":"Exécuter une commande","view.terminal":"Terminal","section.container":"Conteneur","section.ports":"Ports","section.mounts":"Montages","section.networks":"Réseaux","section.environment":"Environnement","field.id":"ID","field.image":"Image","field.status":"Statut","field.created":"Créé","field.started":"Démarré","field.finished":"Terminé","field.exitCode":"Code de sortie","field.restartPolicy":"Politique de redémarrage","field.platform":"Plateforme","field.command":"Commande","field.stack":"Stack","field.workingDir":"Répertoire de travail","field.configFiles":"Fichiers Compose",restarts_one:"{count} redémarrage",restarts_other:"{count} redémarrages",killTitle:"Tuer {name} ?",killMessage:"Le conteneur est arrêté immédiatement, sans pouvoir s’éteindre proprement.",removeContainerTitle:"Supprimer {name} ?",removeContainerMessage:"Le conteneur est supprimé. Ses volumes sont conservés.",removeRunningMessage:"Le conteneur est en cours d’exécution : il est arrêté puis supprimé. Ses volumes sont conservés.","logs.tail":"Lignes","logs.lines_one":"Dernière {count} ligne","logs.lines_other":"{count} dernières lignes","logs.follow":"Suivre","logs.following":"Suivi en cours","logs.wrap":"Retour à la ligne","logs.empty":"Aucune ligne de journal.","logs.failed":"Impossible de charger les journaux","stats.notRunning":"Le conteneur n’est pas en cours d’exécution : aucune mesure en direct.","stats.waiting":"En attente du premier échantillon…","stats.failed":"Impossible de lire les statistiques","stats.network":"Réseau","stats.block":"E/S disque","stats.pids":"Processus","stats.cpuChart":"Utilisation du CPU","stats.memoryChart":"Utilisation de la mémoire","run.command":"Commande","run.placeholder":"ls -la /app","run.user":"Utilisateur","run.workdir":"Répertoire de travail","run.hint":"La commande s'exécute sans shell : utilisez sh -c '…' pour les tubes, && et les variables.","run.run":"Exécuter","run.exitCode":"Code de sortie","run.truncated":"Sortie tronquée","run.noOutput":"La commande n’a rien affiché.","run.failed":"Impossible d’exécuter la commande","run.notRunning":"Le conteneur n’est pas en cours d’exécution.","term.connecting":"Connexion…","term.connected":"Connecté","term.exited":"Le shell s’est terminé avec le code {code}","term.ended":"La session est terminée.","term.refused":"Le serveur a refusé la connexion (mode lecture seule, conteneur protégé ou autorisation manquante).","term.closed":"La connexion a été fermée (code {code}).","term.reconnect":"Se reconnecter","stackState.running":"En cours","stackState.partial":"Partiellement en cours","stackState.stopped":"Arrêté",noStacks:"Aucun stack.",noStacksHint:"Les stacks sont des projets Docker Compose ; créez-en un avec docker compose sur l’hôte.",composeFile:"Fichier Compose",stackDown:"Arrêter le stack",stackDownTitle:"Arrêter {name} ?",stackDownMessage:"Ses conteneurs sont arrêtés et supprimés, puis ses réseaux. Les volumes et les images sont conservés.",stackDownDone:"{name} est arrêté",stackPartial:"{name} : certains conteneurs ont échoué.",pullStarted:"Téléchargement des images de {name}",operations:"Opérations","op.running":"En cours","op.done":"Terminé","op.failed":"Échec","op.working":"En cours…",pull:"Télécharger",pullImage:"Image à télécharger",pullPlaceholder:"nginx:latest",noImages:"Aucune image.",dangling:"Orpheline",removeImageTitle:"Supprimer {name} ?",removeImageMessage:"L’image est supprimée de l’hôte.",removeImageUsed_one:"L’image est utilisée par {count} conteneur ; elle est tout de même supprimée là où le moteur l’autorise.",removeImageUsed_other:"L’image est utilisée par {count} conteneurs ; elle est tout de même supprimée là où le moteur l’autorise.",prune:"Nettoyer",pruneDangling:"Nettoyer les orphelines",pruneUnused:"Nettoyer les inutilisées",pruneImagesTitle:"Nettoyer les images orphelines ?",pruneImagesMessage:"Les images sans tag qu’aucun conteneur n’utilise sont supprimées.",pruneImagesAllTitle:"Nettoyer toutes les images inutilisées ?",pruneImagesAllMessage:"Toute image qu’aucun conteneur n’utilise est supprimée, avec ou sans tag.",pruned_one:"{count} élément supprimé, {size} libérés",pruned_other:"{count} éléments supprimés, {size} libérés",prunedCount_one:"{count} élément supprimé",prunedCount_other:"{count} éléments supprimés",noVolumes:"Aucun volume.",createVolume:"Créer un volume",inUse:"Utilisé",unused:"Inutilisé",removeVolumeTitle:"Supprimer le volume {name} ?",removeVolumeMessage:"Le volume et ses données sont supprimés.",removeVolumeInUse:"Le volume est utilisé par un conteneur : le moteur refuse de le supprimer tant que ce conteneur existe.",pruneVolumes:"Nettoyer les volumes",pruneVolumesTitle:"Nettoyer les volumes inutilisés ?",pruneVolumesMessage:"Tout volume qu’aucun conteneur n’utilise est supprimé avec ses données.",noNetworks:"Aucun réseau.",createNetwork:"Créer un réseau",builtin:"Intégré",internal:"Interne",internalNetwork:"Réseau interne (sans accès extérieur)",subnet:"Sous-réseau",removeNetworkTitle:"Supprimer le réseau {name} ?",removeNetworkMessage:"Le réseau est supprimé ; le moteur refuse si des conteneurs y sont encore connectés.",pruneNetworks:"Nettoyer les réseaux",pruneNetworksTitle:"Nettoyer les réseaux inutilisés ?",pruneNetworksMessage:"Tout réseau personnalisé sans conteneur est supprimé.","sys.engine":"Moteur","sys.name":"Nom de l’hôte","sys.version":"Version","sys.os":"Système","sys.cpus":"CPU","sys.memory":"Mémoire","sys.storage":"Pilote de stockage","sys.rootDir":"Répertoire racine","sys.containers":"Conteneurs","sys.containersValue":"{total} au total · {running} en cours · {paused} en pause · {stopped} arrêtés","sys.images":"Images","sys.disk":"Utilisation du disque","sys.imagesUsage":"Images","sys.containersUsage":"Conteneurs","sys.volumesUsage":"Volumes","sys.buildCache":"Cache de build",reclaimable_one:"{size} récupérables · {count} élément",reclaimable_other:"{size} récupérables · {count} éléments","sys.events":"Événements récents","sys.period":"Période","sys.last1h":"Dernière heure","sys.last6h":"6 dernières heures","sys.last24h":"24 dernières heures","sys.noEvents":"Aucun événement sur cette période.",cardRunning:"en cours",cardUnhealthy_one:"{count} défaillant",cardUnhealthy_other:"{count} défaillants",cardSummary:"{running} conteneurs sur {total} en cours, {unhealthy} défaillants",cardError:"Impossible de charger Docker",openPage:"Ouvrir la page Docker",unprotectedTitle:"Le plugin Docker nécessite un serveur protégé",unprotectedHint:"L'accès à Docker équivaut à root : activez la connexion (plugin des utilisateurs) ou définissez allowUnprotected dans les réglages du plugin Docker.",openSettings:"Ouvrir les réglages de Docker",noComposeFile:"Aucun fichier compose n'est affiché : ajoutez le dossier du fichier compose du stack au réglage composeRoots du plugin Docker (socket Docker local uniquement).","stackState.down":"Arrêté et supprimé",composeUnavailable:"Compose n'est pas disponible",composeUnavailableHint:"La création et le déploiement de stacks à partir de fichiers compose ne sont pas configurés sur ce serveur.",newStack:"Nouveau stack",stackName:"Nom du stack",stackNameHint:"Minuscules, chiffres, - et _ ; 63 caractères au plus.",stackNameInvalid:"Utilisez des minuscules, des chiffres, - et _, en commençant par une lettre ou un chiffre (63 caractères au plus).",stackNameTaken:"Un stack porte déjà ce nom.",composeYaml:"Fichier compose (YAML)",editStackTitle:"Modifier {name}",save:"Enregistrer",saveDeploy:"Enregistrer et déployer",saving:"Enregistrement…",composeSaved:"{name} : fichier compose enregistré.",stackEdit:"Modifier",stackDeploy:"Déployer",deployTitle:"Déployer {name} ?",deployMessage:"Exécute docker compose up -d avec le fichier : les conteneurs manquants sont créés, ceux qui ont changé sont recréés et les services retirés du fichier sont supprimés.",pullImages:"Télécharger les images d'abord",deployStarted:"Déploiement de {name}",stackDownFileMessage:"Ses conteneurs et ses réseaux sont supprimés. Les volumes sont conservés sauf si vous choisissez de les supprimer.",removeVolumes:"Supprimer aussi les volumes du stack",stackDeleteFile:"Supprimer le fichier",deleteFileTitle:"Supprimer le fichier compose de {name} ?",deleteFileMessage:"Le fichier est supprimé du serveur (son dossier reste) et le stack disparaît de la liste.",fileDeleted:"{name} : fichier compose supprimé","op.output":"Sortie de {title}"},wS={title:"Docker",subtitle:"Docker {version} · {endpoint}",subtitleShort:"Container, Stacks, Images, Volumes und Netzwerke",loading:"Wird geladen…",loadFailed:"Docker konnte nicht geladen werden",refreshFailed:"Aktualisieren fehlgeschlagen",readOnly:"Schreibgeschützt",host:"Host",unreachableShort:"nicht erreichbar",unreachable:"Docker auf {host} ist nicht erreichbar",unknownHost:"Unbekannter Docker-Host: {host}","tab.containers":"Container","tab.stacks":"Stacks","tab.images":"Images","tab.volumes":"Volumes","tab.networks":"Netzwerke","tab.system":"System",back:"Zurück",refresh:"Aktualisieren",copy:"Kopieren",copied:"Kopiert",cancel:"Abbrechen",create:"Erstellen",created:"{name} erstellt",removed:"{name} entfernt",none:"Keine",protected:"Geschützt",actionsFor:"Aktionen für {name}",actionDone:"{action}: {name}","action.start":"Starten","action.stop":"Stoppen","action.restart":"Neu starten","action.pause":"Pausieren","action.unpause":"Fortsetzen","action.kill":"Beenden erzwingen","action.remove":"Entfernen","state.created":"Erstellt","state.running":"Läuft","state.paused":"Pausiert","state.restarting":"Startet neu","state.removing":"Wird entfernt","state.exited":"Beendet","state.dead":"Tot","health.healthy":"Fehlerfrei","health.unhealthy":"Fehlerhaft","health.starting":"Startet","col.name":"Name","col.image":"Image","col.state":"Zustand","col.status":"Status","col.health":"Health","col.ports":"Ports","col.stack":"Stack","col.service":"Dienst","col.services":"Dienste","col.containers":"Container","col.cpu":"CPU","col.memory":"Speicher","col.id":"ID","col.size":"Größe","col.created":"Erstellt","col.usedBy":"Verwendet von","col.driver":"Treiber","col.scope":"Bereich","col.subnets":"Subnetze","col.mountpoint":"Einhängepunkt","col.type":"Typ","col.source":"Quelle","col.destination":"Ziel","col.mode":"Modus","col.ip":"IP","col.gateway":"Gateway","col.mac":"MAC","col.time":"Zeit","col.action":"Aktion",search:"Container suchen",showStopped:"Gestoppte anzeigen",containerCount_one:"{count} Container",containerCount_other:"{count} Container",noContainers:"Keine Container.",noMatch:"Kein Container passt.","view.summary":"Übersicht","view.logs":"Logs","view.stats":"Statistiken","view.run":"Befehl ausführen","view.terminal":"Terminal","section.container":"Container","section.ports":"Ports","section.mounts":"Mounts","section.networks":"Netzwerke","section.environment":"Umgebung","field.id":"ID","field.image":"Image","field.status":"Status","field.created":"Erstellt","field.started":"Gestartet","field.finished":"Beendet","field.exitCode":"Exit-Code","field.restartPolicy":"Neustart-Richtlinie","field.platform":"Plattform","field.command":"Befehl","field.stack":"Stack","field.workingDir":"Arbeitsverzeichnis","field.configFiles":"Compose-Dateien",restarts_one:"{count} Neustart",restarts_other:"{count} Neustarts",killTitle:"{name} beenden erzwingen?",killMessage:"Der Container wird sofort gestoppt, ohne die Möglichkeit, sauber herunterzufahren.",removeContainerTitle:"{name} entfernen?",removeContainerMessage:"Der Container wird gelöscht. Seine Volumes bleiben erhalten.",removeRunningMessage:"Der Container läuft: Er wird gestoppt und gelöscht. Seine Volumes bleiben erhalten.","logs.tail":"Zeilen","logs.lines_one":"Letzte {count} Zeile","logs.lines_other":"Letzte {count} Zeilen","logs.follow":"Folgen","logs.following":"Folgt","logs.wrap":"Zeilen umbrechen","logs.empty":"Keine Logzeilen.","logs.failed":"Die Logs konnten nicht geladen werden","stats.notRunning":"Der Container läuft nicht: Es gibt keine Live-Werte.","stats.waiting":"Warte auf die erste Messung…","stats.failed":"Die Statistiken konnten nicht gelesen werden","stats.network":"Netzwerk","stats.block":"Festplatten-E/A","stats.pids":"Prozesse","stats.cpuChart":"CPU-Auslastung","stats.memoryChart":"Speichernutzung","run.command":"Befehl","run.placeholder":"ls -la /app","run.user":"Benutzer","run.workdir":"Arbeitsverzeichnis","run.hint":"Der Befehl läuft ohne Shell: Nutze sh -c '…' für Pipes, && und Variablen.","run.run":"Ausführen","run.exitCode":"Exit-Code","run.truncated":"Ausgabe gekürzt","run.noOutput":"Der Befehl hat nichts ausgegeben.","run.failed":"Der Befehl konnte nicht ausgeführt werden","run.notRunning":"Der Container läuft nicht.","term.connecting":"Verbindung wird hergestellt…","term.connected":"Verbunden","term.exited":"Die Shell wurde mit Code {code} beendet","term.ended":"Die Sitzung wurde beendet.","term.refused":"Der Server hat die Verbindung abgelehnt (schreibgeschützter Modus, ein geschützter Container oder eine fehlende Berechtigung).","term.closed":"Die Verbindung wurde geschlossen (Code {code}).","term.reconnect":"Neu verbinden","stackState.running":"Läuft","stackState.partial":"Teilweise laufend","stackState.stopped":"Gestoppt",noStacks:"Keine Stacks.",noStacksHint:"Stacks sind Docker-Compose-Projekte; erstelle einen mit docker compose auf dem Host.",composeFile:"Compose-Datei",stackDown:"Herunterfahren",stackDownTitle:"{name} herunterfahren?",stackDownMessage:"Seine Container werden gestoppt und entfernt, danach seine Netzwerke. Volumes und Images bleiben erhalten.",stackDownDone:"{name} ist heruntergefahren",stackPartial:"{name}: Einige Container sind fehlgeschlagen.",pullStarted:"Images von {name} werden heruntergeladen",operations:"Vorgänge","op.running":"Läuft","op.done":"Fertig","op.failed":"Fehlgeschlagen","op.working":"In Arbeit…",pull:"Pullen",pullImage:"Zu pullendes Image",pullPlaceholder:"nginx:latest",noImages:"Keine Images.",dangling:"Dangling",removeImageTitle:"{name} entfernen?",removeImageMessage:"Das Image wird vom Host gelöscht.",removeImageUsed_one:"Das Image wird von {count} Container verwendet; es wird trotzdem entfernt, wo die Engine es erlaubt.",removeImageUsed_other:"Das Image wird von {count} Containern verwendet; es wird trotzdem entfernt, wo die Engine es erlaubt.",prune:"Bereinigen",pruneDangling:"Dangling bereinigen",pruneUnused:"Ungenutzte bereinigen",pruneImagesTitle:"Dangling Images bereinigen?",pruneImagesMessage:"Images ohne Tag, die kein Container verwendet, werden gelöscht.",pruneImagesAllTitle:"Alle ungenutzten Images bereinigen?",pruneImagesAllMessage:"Jedes Image, das kein Container verwendet, wird gelöscht, mit oder ohne Tag.",pruned_one:"{count} Element entfernt, {size} freigegeben",pruned_other:"{count} Elemente entfernt, {size} freigegeben",prunedCount_one:"{count} Element entfernt",prunedCount_other:"{count} Elemente entfernt",noVolumes:"Keine Volumes.",createVolume:"Volume erstellen",inUse:"In Benutzung",unused:"Ungenutzt",removeVolumeTitle:"Volume {name} entfernen?",removeVolumeMessage:"Das Volume und seine Daten werden gelöscht.",removeVolumeInUse:"Das Volume wird von einem Container verwendet: Die Engine verweigert das Entfernen, bis dieser Container weg ist.",pruneVolumes:"Volumes bereinigen",pruneVolumesTitle:"Ungenutzte Volumes bereinigen?",pruneVolumesMessage:"Jedes Volume, das kein Container verwendet, wird mit seinen Daten gelöscht.",noNetworks:"Keine Netzwerke.",createNetwork:"Netzwerk erstellen",builtin:"Integriert",internal:"Intern",internalNetwork:"Internes Netzwerk (kein Zugriff nach außen)",subnet:"Subnetz",removeNetworkTitle:"Netzwerk {name} entfernen?",removeNetworkMessage:"Das Netzwerk wird gelöscht; die Engine verweigert es, solange noch Container verbunden sind.",pruneNetworks:"Netzwerke bereinigen",pruneNetworksTitle:"Ungenutzte Netzwerke bereinigen?",pruneNetworksMessage:"Jedes benutzerdefinierte Netzwerk ohne Container wird gelöscht.","sys.engine":"Engine","sys.name":"Hostname","sys.version":"Version","sys.os":"System","sys.cpus":"CPUs","sys.memory":"Speicher","sys.storage":"Storage-Treiber","sys.rootDir":"Stammverzeichnis","sys.containers":"Container","sys.containersValue":"{total} insgesamt · {running} laufend · {paused} pausiert · {stopped} gestoppt","sys.images":"Images","sys.disk":"Speicherplatznutzung","sys.imagesUsage":"Images","sys.containersUsage":"Container","sys.volumesUsage":"Volumes","sys.buildCache":"Build-Cache",reclaimable_one:"{size} freigebbar · {count} Element",reclaimable_other:"{size} freigebbar · {count} Elemente","sys.events":"Letzte Ereignisse","sys.period":"Zeitraum","sys.last1h":"Letzte Stunde","sys.last6h":"Letzte 6 Stunden","sys.last24h":"Letzte 24 Stunden","sys.noEvents":"Keine Ereignisse in diesem Zeitraum.",cardRunning:"laufend",cardUnhealthy_one:"{count} fehlerhaft",cardUnhealthy_other:"{count} fehlerhaft",cardSummary:"{running} von {total} Containern laufen, {unhealthy} fehlerhaft",cardError:"Docker konnte nicht geladen werden",openPage:"Docker-Seite öffnen",unprotectedTitle:"Das Docker-Plugin braucht einen geschützten Server",unprotectedHint:"Der Docker-Zugriff entspricht root: Aktiviere die Anmeldung (Users-Plugin) oder setze allowUnprotected in den Einstellungen des Docker-Plugins.",openSettings:"Docker-Einstellungen öffnen",noComposeFile:"Es wird keine Compose-Datei angezeigt: Füge den Ordner der Compose-Datei des Stacks zur Einstellung composeRoots des Docker-Plugins hinzu (nur bei lokalem Docker-Socket).","stackState.down":"Heruntergefahren",composeUnavailable:"Compose ist nicht verfügbar",composeUnavailableHint:"Das Erstellen und Bereitstellen von Stacks aus Compose-Dateien ist auf diesem Server nicht eingerichtet.",newStack:"Neuer Stack",stackName:"Name des Stacks",stackNameHint:"Kleinbuchstaben, Ziffern, - und _; höchstens 63 Zeichen.",stackNameInvalid:"Verwende Kleinbuchstaben, Ziffern, - und _, beginnend mit einem Buchstaben oder einer Ziffer (höchstens 63 Zeichen).",stackNameTaken:"Ein Stack mit diesem Namen existiert bereits.",composeYaml:"Compose-Datei (YAML)",editStackTitle:"{name} bearbeiten",save:"Speichern",saveDeploy:"Speichern und bereitstellen",saving:"Wird gespeichert…",composeSaved:"{name}: Compose-Datei gespeichert.",stackEdit:"Bearbeiten",stackDeploy:"Bereitstellen",deployTitle:"{name} bereitstellen?",deployMessage:"Führt docker compose up -d mit der Datei aus: fehlende Container werden erstellt, geänderte neu erstellt und aus der Datei entfernte Services entfernt.",pullImages:"Zuerst Images laden",deployStarted:"{name} wird bereitgestellt",stackDownFileMessage:"Seine Container und Netzwerke werden entfernt. Volumes bleiben erhalten, außer du wählst, sie zu entfernen.",removeVolumes:"Auch die Volumes des Stacks entfernen",stackDeleteFile:"Datei löschen",deleteFileTitle:"Die Compose-Datei von {name} löschen?",deleteFileMessage:"Die Datei wird vom Server gelöscht (ihr Ordner bleibt) und der Stack verschwindet aus der Liste.",fileDeleted:"{name}: Compose-Datei gelöscht","op.output":"Ausgabe von {title}"},kS={title:"Docker",subtitle:"Docker {version} · {endpoint}",subtitleShort:"Contêineres, stacks, imagens, volumes e redes",loading:"Carregando…",loadFailed:"Não foi possível carregar o Docker",refreshFailed:"Não foi possível atualizar",readOnly:"Somente leitura",host:"Host",unreachableShort:"inacessível",unreachable:"Não foi possível acessar o Docker em {host}",unknownHost:"Host Docker desconhecido: {host}","tab.containers":"Contêineres","tab.stacks":"Stacks","tab.images":"Imagens","tab.volumes":"Volumes","tab.networks":"Redes","tab.system":"Sistema",back:"Voltar",refresh:"Atualizar",copy:"Copiar",copied:"Copiado",cancel:"Cancelar",create:"Criar",created:"{name} criado",removed:"{name} removido",none:"Nenhum",protected:"Protegido",actionsFor:"Ações para {name}",actionDone:"{action}: {name}","action.start":"Iniciar","action.stop":"Parar","action.restart":"Reiniciar","action.pause":"Pausar","action.unpause":"Retomar","action.kill":"Matar","action.remove":"Remover","state.created":"Criado","state.running":"Em execução","state.paused":"Pausado","state.restarting":"Reiniciando","state.removing":"Removendo","state.exited":"Encerrado","state.dead":"Morto","health.healthy":"Saudável","health.unhealthy":"Não saudável","health.starting":"Iniciando","col.name":"Nome","col.image":"Imagem","col.state":"Estado","col.status":"Situação","col.health":"Saúde","col.ports":"Portas","col.stack":"Stack","col.service":"Serviço","col.services":"Serviços","col.containers":"Contêineres","col.cpu":"CPU","col.memory":"Memória","col.id":"ID","col.size":"Tamanho","col.created":"Criado","col.usedBy":"Usado por","col.driver":"Driver","col.scope":"Escopo","col.subnets":"Sub-redes","col.mountpoint":"Ponto de montagem","col.type":"Tipo","col.source":"Origem","col.destination":"Destino","col.mode":"Modo","col.ip":"IP","col.gateway":"Gateway","col.mac":"MAC","col.time":"Hora","col.action":"Ação",search:"Buscar contêineres",showStopped:"Mostrar parados",containerCount_one:"{count} contêiner",containerCount_other:"{count} contêineres",noContainers:"Nenhum contêiner.",noMatch:"Nenhum contêiner corresponde.","view.summary":"Resumo","view.logs":"Logs","view.stats":"Estatísticas","view.run":"Executar comando","view.terminal":"Terminal","section.container":"Contêiner","section.ports":"Portas","section.mounts":"Montagens","section.networks":"Redes","section.environment":"Ambiente","field.id":"ID","field.image":"Imagem","field.status":"Situação","field.created":"Criado","field.started":"Iniciado","field.finished":"Finalizado","field.exitCode":"Código de saída","field.restartPolicy":"Política de reinício","field.platform":"Plataforma","field.command":"Comando","field.stack":"Stack","field.workingDir":"Diretório de trabalho","field.configFiles":"Arquivos Compose",restarts_one:"{count} reinício",restarts_other:"{count} reinícios",killTitle:"Matar {name}?",killMessage:"O contêiner é parado imediatamente, sem chance de encerrar de forma limpa.",removeContainerTitle:"Remover {name}?",removeContainerMessage:"O contêiner é excluído. Seus volumes são mantidos.",removeRunningMessage:"O contêiner está em execução: ele é parado e excluído. Seus volumes são mantidos.","logs.tail":"Linhas","logs.lines_one":"Última {count} linha","logs.lines_other":"Últimas {count} linhas","logs.follow":"Acompanhar","logs.following":"Acompanhando","logs.wrap":"Quebrar linhas","logs.empty":"Nenhuma linha de log.","logs.failed":"Não foi possível carregar os logs","stats.notRunning":"O contêiner não está em execução: não há números ao vivo.","stats.waiting":"Aguardando a primeira amostra…","stats.failed":"Não foi possível ler as estatísticas","stats.network":"Rede","stats.block":"E/S de disco","stats.pids":"Processos","stats.cpuChart":"Uso de CPU","stats.memoryChart":"Uso de memória","run.command":"Comando","run.placeholder":"ls -la /app","run.user":"Usuário","run.workdir":"Diretório de trabalho","run.hint":"O comando é executado sem shell: use sh -c '…' para pipes, && e variáveis.","run.run":"Executar","run.exitCode":"Código de saída","run.truncated":"Saída truncada","run.noOutput":"O comando não exibiu nada.","run.failed":"Não foi possível executar o comando","run.notRunning":"O contêiner não está em execução.","term.connecting":"Conectando…","term.connected":"Conectado","term.exited":"O shell encerrou com o código {code}","term.ended":"A sessão terminou.","term.refused":"O servidor recusou a conexão (modo somente leitura, um contêiner protegido ou uma permissão ausente).","term.closed":"A conexão foi fechada (código {code}).","term.reconnect":"Reconectar","stackState.running":"Em execução","stackState.partial":"Parcialmente em execução","stackState.stopped":"Parado",noStacks:"Nenhum stack.",noStacksHint:"Stacks são projetos do Docker Compose; crie um com docker compose no host.",composeFile:"Arquivo Compose",stackDown:"Derrubar",stackDownTitle:"Derrubar {name}?",stackDownMessage:"Seus contêineres são parados e removidos, depois suas redes. Volumes e imagens são mantidos.",stackDownDone:"{name} foi derrubado",stackPartial:"{name}: alguns contêineres falharam.",pullStarted:"Baixando as imagens de {name}",operations:"Operações","op.running":"Em execução","op.done":"Concluído","op.failed":"Falhou","op.working":"Trabalhando…",pull:"Baixar",pullImage:"Imagem a baixar",pullPlaceholder:"nginx:latest",noImages:"Nenhuma imagem.",dangling:"Órfã",removeImageTitle:"Remover {name}?",removeImageMessage:"A imagem é excluída do host.",removeImageUsed_one:"A imagem é usada por {count} contêiner; ela é removida mesmo assim onde o mecanismo permitir.",removeImageUsed_other:"A imagem é usada por {count} contêineres; ela é removida mesmo assim onde o mecanismo permitir.",prune:"Limpar",pruneDangling:"Limpar órfãs",pruneUnused:"Limpar não usadas",pruneImagesTitle:"Limpar as imagens órfãs?",pruneImagesMessage:"As imagens sem tag que nenhum contêiner usa são excluídas.",pruneImagesAllTitle:"Limpar todas as imagens não usadas?",pruneImagesAllMessage:"Toda imagem que nenhum contêiner usa é excluída, com tag ou não.",pruned_one:"{count} item removido, {size} liberados",pruned_other:"{count} itens removidos, {size} liberados",prunedCount_one:"{count} item removido",prunedCount_other:"{count} itens removidos",noVolumes:"Nenhum volume.",createVolume:"Criar volume",inUse:"Em uso",unused:"Não usado",removeVolumeTitle:"Remover o volume {name}?",removeVolumeMessage:"O volume e seus dados são excluídos.",removeVolumeInUse:"O volume é usado por um contêiner: o mecanismo se recusa a removê-lo até que esse contêiner deixe de existir.",pruneVolumes:"Limpar volumes",pruneVolumesTitle:"Limpar os volumes não usados?",pruneVolumesMessage:"Todo volume que nenhum contêiner usa é excluído junto com seus dados.",noNetworks:"Nenhuma rede.",createNetwork:"Criar rede",builtin:"Integrada",internal:"Interna",internalNetwork:"Rede interna (sem acesso externo)",subnet:"Sub-rede",removeNetworkTitle:"Remover a rede {name}?",removeNetworkMessage:"A rede é excluída; o mecanismo se recusa se ainda houver contêineres conectados.",pruneNetworks:"Limpar redes",pruneNetworksTitle:"Limpar as redes não usadas?",pruneNetworksMessage:"Toda rede personalizada sem contêineres é excluída.","sys.engine":"Mecanismo","sys.name":"Nome do host","sys.version":"Versão","sys.os":"Sistema","sys.cpus":"CPUs","sys.memory":"Memória","sys.storage":"Driver de armazenamento","sys.rootDir":"Diretório raiz","sys.containers":"Contêineres","sys.containersValue":"{total} no total · {running} em execução · {paused} pausados · {stopped} parados","sys.images":"Imagens","sys.disk":"Uso de disco","sys.imagesUsage":"Imagens","sys.containersUsage":"Contêineres","sys.volumesUsage":"Volumes","sys.buildCache":"Cache de build",reclaimable_one:"{size} recuperáveis · {count} item",reclaimable_other:"{size} recuperáveis · {count} itens","sys.events":"Eventos recentes","sys.period":"Período","sys.last1h":"Última hora","sys.last6h":"Últimas 6 horas","sys.last24h":"Últimas 24 horas","sys.noEvents":"Nenhum evento neste período.",cardRunning:"em execução",cardUnhealthy_one:"{count} não saudável",cardUnhealthy_other:"{count} não saudáveis",cardSummary:"{running} de {total} contêineres em execução, {unhealthy} não saudáveis",cardError:"Não foi possível carregar o Docker",openPage:"Abrir a página do Docker",unprotectedTitle:"O plugin do Docker precisa de um servidor protegido",unprotectedHint:"O acesso ao Docker equivale a root: ative o login (plugin de usuários) ou defina allowUnprotected nas configurações do plugin do Docker.",openSettings:"Abrir as configurações do Docker",noComposeFile:"Nenhum arquivo compose é exibido: adicione a pasta do arquivo compose da stack à configuração composeRoots do plugin do Docker (apenas com um socket local do Docker).","stackState.down":"Desligado",composeUnavailable:"O Compose não está disponível",composeUnavailableHint:"A criação e a implantação de stacks a partir de arquivos compose não estão configuradas neste servidor.",newStack:"Novo stack",stackName:"Nome do stack",stackNameHint:"Letras minúsculas, dígitos, - e _; no máximo 63 caracteres.",stackNameInvalid:"Use letras minúsculas, dígitos, - e _, começando por uma letra ou um dígito (no máximo 63 caracteres).",stackNameTaken:"Já existe um stack com este nome.",composeYaml:"Arquivo compose (YAML)",editStackTitle:"Editar {name}",save:"Salvar",saveDeploy:"Salvar e implantar",saving:"Salvando…",composeSaved:"{name}: arquivo compose salvo.",stackEdit:"Editar",stackDeploy:"Implantar",deployTitle:"Implantar {name}?",deployMessage:"Executa docker compose up -d com o arquivo: os contêineres que faltam são criados, os alterados são recriados e os serviços removidos do arquivo são removidos.",pullImages:"Baixar as imagens antes",deployStarted:"Implantando {name}",stackDownFileMessage:"Seus contêineres e redes são removidos. Os volumes são mantidos, a menos que você escolha removê-los.",removeVolumes:"Remover também os volumes do stack",stackDeleteFile:"Excluir arquivo",deleteFileTitle:"Excluir o arquivo compose de {name}?",deleteFileMessage:"O arquivo é removido do servidor (a pasta permanece) e o stack some da lista.",fileDeleted:"{name}: arquivo compose excluído","op.output":"Saída de {title}"},xS={title:"Docker",subtitle:"Docker {version} · {endpoint}",subtitleShort:"Container, stack, immagini, volumi e reti",loading:"Caricamento…",loadFailed:"Impossibile caricare Docker",refreshFailed:"Impossibile aggiornare",readOnly:"Sola lettura",host:"Host",unreachableShort:"non raggiungibile",unreachable:"Impossibile raggiungere Docker su {host}",unknownHost:"Host Docker sconosciuto: {host}","tab.containers":"Container","tab.stacks":"Stack","tab.images":"Immagini","tab.volumes":"Volumi","tab.networks":"Reti","tab.system":"Sistema",back:"Indietro",refresh:"Aggiorna",copy:"Copia",copied:"Copiato",cancel:"Annulla",create:"Crea",created:"{name} creato",removed:"{name} rimosso",none:"Nessuno",protected:"Protetto",actionsFor:"Azioni per {name}",actionDone:"{action}: {name}","action.start":"Avvia","action.stop":"Arresta","action.restart":"Riavvia","action.pause":"Metti in pausa","action.unpause":"Riprendi","action.kill":"Termina","action.remove":"Rimuovi","state.created":"Creato","state.running":"In esecuzione","state.paused":"In pausa","state.restarting":"Riavvio","state.removing":"Rimozione","state.exited":"Terminato","state.dead":"Morto","health.healthy":"Integro","health.unhealthy":"Non integro","health.starting":"Avvio","col.name":"Nome","col.image":"Immagine","col.state":"Stato","col.status":"Situazione","col.health":"Integrità","col.ports":"Porte","col.stack":"Stack","col.service":"Servizio","col.services":"Servizi","col.containers":"Container","col.cpu":"CPU","col.memory":"Memoria","col.id":"ID","col.size":"Dimensione","col.created":"Creato","col.usedBy":"Usato da","col.driver":"Driver","col.scope":"Ambito","col.subnets":"Sottoreti","col.mountpoint":"Punto di montaggio","col.type":"Tipo","col.source":"Origine","col.destination":"Destinazione","col.mode":"Modalità","col.ip":"IP","col.gateway":"Gateway","col.mac":"MAC","col.time":"Ora","col.action":"Azione",search:"Cerca container",showStopped:"Mostra arrestati",containerCount_one:"{count} container",containerCount_other:"{count} container",noContainers:"Nessun container.",noMatch:"Nessun container corrisponde.","view.summary":"Riepilogo","view.logs":"Log","view.stats":"Statistiche","view.run":"Esegui comando","view.terminal":"Terminale","section.container":"Container","section.ports":"Porte","section.mounts":"Montaggi","section.networks":"Reti","section.environment":"Ambiente","field.id":"ID","field.image":"Immagine","field.status":"Situazione","field.created":"Creato","field.started":"Avviato","field.finished":"Terminato","field.exitCode":"Codice di uscita","field.restartPolicy":"Criterio di riavvio","field.platform":"Piattaforma","field.command":"Comando","field.stack":"Stack","field.workingDir":"Directory di lavoro","field.configFiles":"File Compose",restarts_one:"{count} riavvio",restarts_other:"{count} riavvii",killTitle:"Terminare {name}?",killMessage:"Il container viene arrestato immediatamente, senza la possibilità di spegnersi in modo pulito.",removeContainerTitle:"Rimuovere {name}?",removeContainerMessage:"Il container viene eliminato. I suoi volumi vengono conservati.",removeRunningMessage:"Il container è in esecuzione: viene arrestato ed eliminato. I suoi volumi vengono conservati.","logs.tail":"Righe","logs.lines_one":"Ultima {count} riga","logs.lines_other":"Ultime {count} righe","logs.follow":"Segui","logs.following":"In ascolto","logs.wrap":"A capo automatico","logs.empty":"Nessuna riga di log.","logs.failed":"Impossibile caricare i log","stats.notRunning":"Il container non è in esecuzione: non ci sono dati in tempo reale.","stats.waiting":"In attesa del primo campione…","stats.failed":"Impossibile leggere le statistiche","stats.network":"Rete","stats.block":"I/O disco","stats.pids":"Processi","stats.cpuChart":"Utilizzo CPU","stats.memoryChart":"Utilizzo memoria","run.command":"Comando","run.placeholder":"ls -la /app","run.user":"Utente","run.workdir":"Directory di lavoro","run.hint":"Il comando viene eseguito senza shell: usa sh -c '…' per pipe, && e variabili.","run.run":"Esegui","run.exitCode":"Codice di uscita","run.truncated":"Output troncato","run.noOutput":"Il comando non ha stampato nulla.","run.failed":"Impossibile eseguire il comando","run.notRunning":"Il container non è in esecuzione.","term.connecting":"Connessione…","term.connected":"Connesso","term.exited":"La shell è terminata con il codice {code}","term.ended":"La sessione è terminata.","term.refused":"Il server ha rifiutato la connessione (modalità sola lettura, un container protetto o un’autorizzazione mancante).","term.closed":"La connessione è stata chiusa (codice {code}).","term.reconnect":"Riconnetti","stackState.running":"In esecuzione","stackState.partial":"Parzialmente in esecuzione","stackState.stopped":"Arrestato",noStacks:"Nessuno stack.",noStacksHint:"Gli stack sono progetti Docker Compose; creane uno con docker compose sull’host.",composeFile:"File Compose",stackDown:"Abbatti",stackDownTitle:"Abbattere {name}?",stackDownMessage:"I suoi container vengono arrestati e rimossi, poi le sue reti. Volumi e immagini vengono conservati.",stackDownDone:"{name} è stato abbattuto",stackPartial:"{name}: alcuni container sono falliti.",pullStarted:"Download delle immagini di {name}",operations:"Operazioni","op.running":"In esecuzione","op.done":"Completato","op.failed":"Fallito","op.working":"In corso…",pull:"Scarica",pullImage:"Immagine da scaricare",pullPlaceholder:"nginx:latest",noImages:"Nessuna immagine.",dangling:"Orfana",removeImageTitle:"Rimuovere {name}?",removeImageMessage:"L’immagine viene eliminata dall’host.",removeImageUsed_one:"L’immagine è usata da {count} container; viene rimossa comunque dove il motore lo consente.",removeImageUsed_other:"L’immagine è usata da {count} container; viene rimossa comunque dove il motore lo consente.",prune:"Pulisci",pruneDangling:"Pulisci orfane",pruneUnused:"Pulisci inutilizzate",pruneImagesTitle:"Pulire le immagini orfane?",pruneImagesMessage:"Le immagini senza tag che nessun container usa vengono eliminate.",pruneImagesAllTitle:"Pulire tutte le immagini inutilizzate?",pruneImagesAllMessage:"Ogni immagine che nessun container usa viene eliminata, con tag o senza.",pruned_one:"{count} elemento rimosso, {size} liberati",pruned_other:"{count} elementi rimossi, {size} liberati",prunedCount_one:"{count} elemento rimosso",prunedCount_other:"{count} elementi rimossi",noVolumes:"Nessun volume.",createVolume:"Crea volume",inUse:"In uso",unused:"Inutilizzato",removeVolumeTitle:"Rimuovere il volume {name}?",removeVolumeMessage:"Il volume e i suoi dati vengono eliminati.",removeVolumeInUse:"Il volume è usato da un container: il motore rifiuta di rimuoverlo finché quel container esiste.",pruneVolumes:"Pulisci volumi",pruneVolumesTitle:"Pulire i volumi inutilizzati?",pruneVolumesMessage:"Ogni volume che nessun container usa viene eliminato con i suoi dati.",noNetworks:"Nessuna rete.",createNetwork:"Crea rete",builtin:"Integrata",internal:"Interna",internalNetwork:"Rete interna (senza accesso esterno)",subnet:"Sottorete",removeNetworkTitle:"Rimuovere la rete {name}?",removeNetworkMessage:"La rete viene eliminata; il motore rifiuta se ci sono ancora container connessi.",pruneNetworks:"Pulisci reti",pruneNetworksTitle:"Pulire le reti inutilizzate?",pruneNetworksMessage:"Ogni rete personalizzata senza container viene eliminata.","sys.engine":"Motore","sys.name":"Nome host","sys.version":"Versione","sys.os":"Sistema","sys.cpus":"CPU","sys.memory":"Memoria","sys.storage":"Driver di archiviazione","sys.rootDir":"Directory radice","sys.containers":"Container","sys.containersValue":"{total} in totale · {running} in esecuzione · {paused} in pausa · {stopped} arrestati","sys.images":"Immagini","sys.disk":"Utilizzo del disco","sys.imagesUsage":"Immagini","sys.containersUsage":"Container","sys.volumesUsage":"Volumi","sys.buildCache":"Cache di build",reclaimable_one:"{size} recuperabili · {count} elemento",reclaimable_other:"{size} recuperabili · {count} elementi","sys.events":"Eventi recenti","sys.period":"Periodo","sys.last1h":"Ultima ora","sys.last6h":"Ultime 6 ore","sys.last24h":"Ultime 24 ore","sys.noEvents":"Nessun evento in questo periodo.",cardRunning:"in esecuzione",cardUnhealthy_one:"{count} non integro",cardUnhealthy_other:"{count} non integri",cardSummary:"{running} container su {total} in esecuzione, {unhealthy} non integri",cardError:"Impossibile caricare Docker",openPage:"Apri la pagina Docker",unprotectedTitle:"Il plugin Docker richiede un server protetto",unprotectedHint:"L'accesso a Docker equivale a root: attiva l'accesso con login (plugin utenti) oppure imposta allowUnprotected nelle impostazioni del plugin Docker.",openSettings:"Apri le impostazioni di Docker",noComposeFile:"Nessun file compose mostrato: aggiungi la cartella del file compose dello stack all'impostazione composeRoots del plugin Docker (solo con un socket Docker locale).","stackState.down":"Spento",composeUnavailable:"Compose non è disponibile",composeUnavailableHint:"La creazione e il deploy di stack da file compose non sono configurati su questo server.",newStack:"Nuovo stack",stackName:"Nome dello stack",stackNameHint:"Lettere minuscole, cifre, - e _; al massimo 63 caratteri.",stackNameInvalid:"Usa lettere minuscole, cifre, - e _, iniziando con una lettera o una cifra (al massimo 63 caratteri).",stackNameTaken:"Esiste già uno stack con questo nome.",composeYaml:"File compose (YAML)",editStackTitle:"Modifica {name}",save:"Salva",saveDeploy:"Salva e distribuisci",saving:"Salvataggio…",composeSaved:"{name}: file compose salvato.",stackEdit:"Modifica",stackDeploy:"Distribuisci",deployTitle:"Distribuire {name}?",deployMessage:"Esegue docker compose up -d con il file: i container mancanti vengono creati, quelli modificati ricreati e i servizi rimossi dal file eliminati.",pullImages:"Scarica prima le immagini",deployStarted:"Distribuzione di {name}",stackDownFileMessage:"I suoi container e le sue reti vengono rimossi. I volumi restano, salvo che tu scelga di rimuoverli.",removeVolumes:"Rimuovi anche i volumi dello stack",stackDeleteFile:"Elimina file",deleteFileTitle:"Eliminare il file compose di {name}?",deleteFileMessage:"Il file viene eliminato dal server (la sua cartella resta) e lo stack scompare dall'elenco.",fileDeleted:"{name}: file compose eliminato","op.output":"Output di {title}"},CS={title:"Docker",subtitle:"Docker {version} · {endpoint}",subtitleShort:"コンテナ、スタック、イメージ、ボリューム、ネットワーク",loading:"読み込み中…",loadFailed:"Docker を読み込めませんでした",refreshFailed:"更新できませんでした",readOnly:"読み取り専用",host:"ホスト",unreachableShort:"接続不可",unreachable:"{host} の Docker に接続できません",unknownHost:"不明な Docker ホスト: {host}","tab.containers":"コンテナ","tab.stacks":"スタック","tab.images":"イメージ","tab.volumes":"ボリューム","tab.networks":"ネットワーク","tab.system":"システム",back:"戻る",refresh:"更新",copy:"コピー",copied:"コピーしました",cancel:"キャンセル",create:"作成",created:"{name} を作成しました",removed:"{name} を削除しました",none:"なし",protected:"保護",actionsFor:"{name} の操作",actionDone:"{action}: {name}","action.start":"開始","action.stop":"停止","action.restart":"再起動","action.pause":"一時停止","action.unpause":"再開","action.kill":"強制終了","action.remove":"削除","state.created":"作成済み","state.running":"実行中","state.paused":"一時停止中","state.restarting":"再起動中","state.removing":"削除中","state.exited":"終了","state.dead":"停止(異常)","health.healthy":"正常","health.unhealthy":"異常","health.starting":"起動中","col.name":"名前","col.image":"イメージ","col.state":"状態","col.status":"ステータス","col.health":"ヘルス","col.ports":"ポート","col.stack":"スタック","col.service":"サービス","col.services":"サービス","col.containers":"コンテナ","col.cpu":"CPU","col.memory":"メモリ","col.id":"ID","col.size":"サイズ","col.created":"作成日時","col.usedBy":"使用元","col.driver":"ドライバー","col.scope":"スコープ","col.subnets":"サブネット","col.mountpoint":"マウントポイント","col.type":"種類","col.source":"ソース","col.destination":"マウント先","col.mode":"モード","col.ip":"IP","col.gateway":"ゲートウェイ","col.mac":"MAC","col.time":"時刻","col.action":"操作",search:"コンテナを検索",showStopped:"停止中を表示",containerCount_other:"コンテナ {count} 個",noContainers:"コンテナがありません。",noMatch:"一致するコンテナがありません。","view.summary":"概要","view.logs":"ログ","view.stats":"統計","view.run":"コマンド実行","view.terminal":"ターミナル","section.container":"コンテナ","section.ports":"ポート","section.mounts":"マウント","section.networks":"ネットワーク","section.environment":"環境変数","field.id":"ID","field.image":"イメージ","field.status":"ステータス","field.created":"作成日時","field.started":"開始日時","field.finished":"終了日時","field.exitCode":"終了コード","field.restartPolicy":"再起動ポリシー","field.platform":"プラットフォーム","field.command":"コマンド","field.stack":"スタック","field.workingDir":"作業ディレクトリ","field.configFiles":"Compose ファイル",restarts_other:"再起動 {count} 回",killTitle:"{name} を強制終了しますか?",killMessage:"コンテナは直ちに停止され、正常にシャットダウンする機会はありません。",removeContainerTitle:"{name} を削除しますか?",removeContainerMessage:"コンテナは削除されます。ボリュームは保持されます。",removeRunningMessage:"コンテナは実行中です。停止してから削除されます。ボリュームは保持されます。","logs.tail":"行数","logs.lines_other":"直近 {count} 行","logs.follow":"追跡","logs.following":"追跡中","logs.wrap":"行を折り返す","logs.empty":"ログ行がありません。","logs.failed":"ログを読み込めませんでした","stats.notRunning":"コンテナは実行中ではないため、リアルタイムの値はありません。","stats.waiting":"最初のサンプルを待っています…","stats.failed":"統計を読み取れませんでした","stats.network":"ネットワーク","stats.block":"ディスク I/O","stats.pids":"プロセス","stats.cpuChart":"CPU 使用率","stats.memoryChart":"メモリ使用量","run.command":"コマンド","run.placeholder":"ls -la /app","run.user":"ユーザー","run.workdir":"作業ディレクトリ","run.hint":"コマンドはシェルなしで実行されます。パイプ、&&、変数には sh -c '…' を使ってください。","run.run":"実行","run.exitCode":"終了コード","run.truncated":"出力が切り詰められました","run.noOutput":"コマンドは何も出力しませんでした。","run.failed":"コマンドを実行できませんでした","run.notRunning":"コンテナは実行中ではありません。","term.connecting":"接続中…","term.connected":"接続しました","term.exited":"シェルがコード {code} で終了しました","term.ended":"セッションが終了しました。","term.refused":"サーバーが接続を拒否しました(読み取り専用モード、保護されたコンテナ、または権限不足)。","term.closed":"接続が閉じられました(コード {code})。","term.reconnect":"再接続","stackState.running":"実行中","stackState.partial":"一部実行中","stackState.stopped":"停止中",noStacks:"スタックがありません。",noStacksHint:"スタックは Docker Compose プロジェクトです。ホストで docker compose を使って作成してください。",composeFile:"Compose ファイル",stackDown:"ダウン",stackDownTitle:"{name} をダウンしますか?",stackDownMessage:"コンテナが停止・削除され、続いてネットワークが削除されます。ボリュームとイメージは保持されます。",stackDownDone:"{name} をダウンしました",stackPartial:"{name}: 一部のコンテナが失敗しました。",pullStarted:"{name} のイメージを取得しています",operations:"操作","op.running":"実行中","op.done":"完了","op.failed":"失敗","op.working":"処理中…",pull:"プル",pullImage:"取得するイメージ",pullPlaceholder:"nginx:latest",noImages:"イメージがありません。",dangling:"未使用(タグなし)",removeImageTitle:"{name} を削除しますか?",removeImageMessage:"イメージはホストから削除されます。",removeImageUsed_other:"このイメージは {count} 個のコンテナで使用されています。エンジンが許可する場合は、それでも削除されます。",prune:"プルーン",pruneDangling:"未使用タグなしを削除",pruneUnused:"未使用を削除",pruneImagesTitle:"タグなしイメージを削除しますか?",pruneImagesMessage:"タグがなく、どのコンテナにも使われていないイメージが削除されます。",pruneImagesAllTitle:"未使用のイメージをすべて削除しますか?",pruneImagesAllMessage:"どのコンテナにも使われていないイメージが、タグの有無にかかわらずすべて削除されます。",pruned_other:"{count} 件を削除、{size} を解放しました",prunedCount_other:"{count} 件を削除しました",noVolumes:"ボリュームがありません。",createVolume:"ボリュームを作成",inUse:"使用中",unused:"未使用",removeVolumeTitle:"ボリューム {name} を削除しますか?",removeVolumeMessage:"ボリュームとそのデータが削除されます。",removeVolumeInUse:"このボリュームはコンテナで使用されています。そのコンテナがなくなるまで、エンジンは削除を拒否します。",pruneVolumes:"ボリュームを削除",pruneVolumesTitle:"未使用のボリュームを削除しますか?",pruneVolumesMessage:"どのコンテナにも使われていないボリュームが、データとともにすべて削除されます。",noNetworks:"ネットワークがありません。",createNetwork:"ネットワークを作成",builtin:"組み込み",internal:"内部",internalNetwork:"内部ネットワーク(外部アクセスなし)",subnet:"サブネット",removeNetworkTitle:"ネットワーク {name} を削除しますか?",removeNetworkMessage:"ネットワークは削除されます。コンテナが接続されている場合、エンジンは削除を拒否します。",pruneNetworks:"ネットワークを削除",pruneNetworksTitle:"未使用のネットワークを削除しますか?",pruneNetworksMessage:"コンテナのないカスタムネットワークがすべて削除されます。","sys.engine":"エンジン","sys.name":"ホスト名","sys.version":"バージョン","sys.os":"システム","sys.cpus":"CPU 数","sys.memory":"メモリ","sys.storage":"ストレージドライバー","sys.rootDir":"ルートディレクトリ","sys.containers":"コンテナ","sys.containersValue":"合計 {total} · 実行中 {running} · 一時停止 {paused} · 停止 {stopped}","sys.images":"イメージ","sys.disk":"ディスク使用量","sys.imagesUsage":"イメージ","sys.containersUsage":"コンテナ","sys.volumesUsage":"ボリューム","sys.buildCache":"ビルドキャッシュ",reclaimable_other:"{size} を解放可能 · {count} 件","sys.events":"最近のイベント","sys.period":"期間","sys.last1h":"過去 1 時間","sys.last6h":"過去 6 時間","sys.last24h":"過去 24 時間","sys.noEvents":"この期間のイベントはありません。",cardRunning:"実行中",cardUnhealthy_other:"異常 {count} 件",cardSummary:"{total} 個中 {running} 個のコンテナが実行中、異常 {unhealthy} 個",cardError:"Docker を読み込めませんでした",openPage:"Docker ページを開く",unprotectedTitle:"Docker プラグインには保護されたサーバーが必要です",unprotectedHint:"Docker へのアクセスは root 相当です。サインイン(users プラグイン)を有効にするか、Docker プラグインの設定で allowUnprotected を設定してください。",openSettings:"Docker の設定を開く",noComposeFile:"compose ファイルは表示されません。スタックの compose ファイルのフォルダーを Docker プラグインの composeRoots 設定に追加してください(ローカルの Docker ソケットのみ)。","stackState.down":"ダウン",composeUnavailable:"Compose は利用できません",composeUnavailableHint:"このサーバーでは、compose ファイルからのスタックの作成とデプロイが設定されていません。",newStack:"新しいスタック",stackName:"スタック名",stackNameHint:"小文字、数字、- と _ が使えます。63 文字までです。",stackNameInvalid:"小文字、数字、- と _ を使い、先頭は英字か数字にしてください(63 文字まで)。",stackNameTaken:"この名前のスタックはすでにあります。",composeYaml:"Compose ファイル(YAML)",editStackTitle:"{name} を編集",save:"保存",saveDeploy:"保存してデプロイ",saving:"保存中…",composeSaved:"{name}: compose ファイルを保存しました。",stackEdit:"編集",stackDeploy:"デプロイ",deployTitle:"{name} をデプロイしますか?",deployMessage:"ファイルを使って docker compose up -d を実行します。足りないコンテナは作成され、変更されたものは再作成され、ファイルから削除されたサービスは削除されます。",pullImages:"先にイメージを取得する",deployStarted:"{name} をデプロイしています",stackDownFileMessage:"コンテナとネットワークが削除されます。ボリュームは、削除を選ばない限り保持されます。",removeVolumes:"スタックのボリュームも削除する",stackDeleteFile:"ファイルを削除",deleteFileTitle:"{name} の compose ファイルを削除しますか?",deleteFileMessage:"ファイルはサーバーから削除され(フォルダーは残ります)、スタックは一覧から消えます。",fileDeleted:"{name}: compose ファイルを削除しました","op.output":"{title} の出力"},bS={title:"Docker",subtitle:"Docker {version} · {endpoint}",subtitleShort:"컨테이너, 스택, 이미지, 볼륨, 네트워크",loading:"불러오는 중…",loadFailed:"Docker를 불러올 수 없습니다",refreshFailed:"새로 고칠 수 없습니다",readOnly:"읽기 전용",host:"호스트",unreachableShort:"연결 불가",unreachable:"{host}의 Docker에 연결할 수 없습니다",unknownHost:"알 수 없는 Docker 호스트: {host}","tab.containers":"컨테이너","tab.stacks":"스택","tab.images":"이미지","tab.volumes":"볼륨","tab.networks":"네트워크","tab.system":"시스템",back:"뒤로",refresh:"새로 고침",copy:"복사",copied:"복사됨",cancel:"취소",create:"만들기",created:"{name}을(를) 만들었습니다",removed:"{name}을(를) 삭제했습니다",none:"없음",protected:"보호됨",actionsFor:"{name} 작업",actionDone:"{action}: {name}","action.start":"시작","action.stop":"중지","action.restart":"다시 시작","action.pause":"일시 중지","action.unpause":"일시 중지 해제","action.kill":"강제 종료","action.remove":"삭제","state.created":"생성됨","state.running":"실행 중","state.paused":"일시 중지됨","state.restarting":"다시 시작 중","state.removing":"삭제 중","state.exited":"종료됨","state.dead":"비정상 종료","health.healthy":"정상","health.unhealthy":"비정상","health.starting":"시작 중","col.name":"이름","col.image":"이미지","col.state":"상태","col.status":"상태 정보","col.health":"헬스","col.ports":"포트","col.stack":"스택","col.service":"서비스","col.services":"서비스","col.containers":"컨테이너","col.cpu":"CPU","col.memory":"메모리","col.id":"ID","col.size":"크기","col.created":"생성일","col.usedBy":"사용처","col.driver":"드라이버","col.scope":"범위","col.subnets":"서브넷","col.mountpoint":"마운트 지점","col.type":"유형","col.source":"소스","col.destination":"대상","col.mode":"모드","col.ip":"IP","col.gateway":"게이트웨이","col.mac":"MAC","col.time":"시간","col.action":"작업",search:"컨테이너 검색",showStopped:"중지된 항목 표시",containerCount_other:"컨테이너 {count}개",noContainers:"컨테이너가 없습니다.",noMatch:"일치하는 컨테이너가 없습니다.","view.summary":"요약","view.logs":"로그","view.stats":"통계","view.run":"명령 실행","view.terminal":"터미널","section.container":"컨테이너","section.ports":"포트","section.mounts":"마운트","section.networks":"네트워크","section.environment":"환경 변수","field.id":"ID","field.image":"이미지","field.status":"상태 정보","field.created":"생성일","field.started":"시작일","field.finished":"종료일","field.exitCode":"종료 코드","field.restartPolicy":"재시작 정책","field.platform":"플랫폼","field.command":"명령","field.stack":"스택","field.workingDir":"작업 디렉터리","field.configFiles":"Compose 파일",restarts_other:"재시작 {count}회",killTitle:"{name}을(를) 강제 종료할까요?",killMessage:"컨테이너가 즉시 중지되며, 정상적으로 종료할 기회가 없습니다.",removeContainerTitle:"{name}을(를) 삭제할까요?",removeContainerMessage:"컨테이너가 삭제됩니다. 볼륨은 유지됩니다.",removeRunningMessage:"컨테이너가 실행 중입니다. 중지한 후 삭제됩니다. 볼륨은 유지됩니다.","logs.tail":"줄 수","logs.lines_other":"최근 {count}줄","logs.follow":"따라가기","logs.following":"따라가는 중","logs.wrap":"줄 바꿈","logs.empty":"로그 줄이 없습니다.","logs.failed":"로그를 불러올 수 없습니다","stats.notRunning":"컨테이너가 실행 중이 아니므로 실시간 수치가 없습니다.","stats.waiting":"첫 번째 샘플을 기다리는 중…","stats.failed":"통계를 읽을 수 없습니다","stats.network":"네트워크","stats.block":"디스크 I/O","stats.pids":"프로세스","stats.cpuChart":"CPU 사용량","stats.memoryChart":"메모리 사용량","run.command":"명령","run.placeholder":"ls -la /app","run.user":"사용자","run.workdir":"작업 디렉터리","run.hint":"명령은 셸 없이 실행됩니다. 파이프, &&, 변수에는 sh -c '…'를 사용하세요.","run.run":"실행","run.exitCode":"종료 코드","run.truncated":"출력이 잘렸습니다","run.noOutput":"명령이 아무것도 출력하지 않았습니다.","run.failed":"명령을 실행할 수 없습니다","run.notRunning":"컨테이너가 실행 중이 아닙니다.","term.connecting":"연결 중…","term.connected":"연결됨","term.exited":"셸이 코드 {code}(으)로 종료되었습니다","term.ended":"세션이 종료되었습니다.","term.refused":"서버가 연결을 거부했습니다(읽기 전용 모드, 보호된 컨테이너 또는 권한 없음).","term.closed":"연결이 닫혔습니다(코드 {code}).","term.reconnect":"다시 연결","stackState.running":"실행 중","stackState.partial":"일부 실행 중","stackState.stopped":"중지됨",noStacks:"스택이 없습니다.",noStacksHint:"스택은 Docker Compose 프로젝트입니다. 호스트에서 docker compose로 만드세요.",composeFile:"Compose 파일",stackDown:"내리기",stackDownTitle:"{name}을(를) 내릴까요?",stackDownMessage:"컨테이너가 중지 및 삭제된 후 네트워크가 삭제됩니다. 볼륨과 이미지는 유지됩니다.",stackDownDone:"{name}을(를) 내렸습니다",stackPartial:"{name}: 일부 컨테이너가 실패했습니다.",pullStarted:"{name}의 이미지를 받는 중",operations:"작업","op.running":"실행 중","op.done":"완료","op.failed":"실패","op.working":"작업 중…",pull:"가져오기",pullImage:"가져올 이미지",pullPlaceholder:"nginx:latest",noImages:"이미지가 없습니다.",dangling:"미사용(태그 없음)",removeImageTitle:"{name}을(를) 삭제할까요?",removeImageMessage:"이미지가 호스트에서 삭제됩니다.",removeImageUsed_other:"이 이미지는 컨테이너 {count}개에서 사용 중입니다. 엔진이 허용하는 경우 그래도 삭제됩니다.",prune:"정리",pruneDangling:"태그 없는 항목 정리",pruneUnused:"미사용 항목 정리",pruneImagesTitle:"태그 없는 이미지를 정리할까요?",pruneImagesMessage:"태그가 없고 어떤 컨테이너에서도 사용하지 않는 이미지가 삭제됩니다.",pruneImagesAllTitle:"사용하지 않는 모든 이미지를 정리할까요?",pruneImagesAllMessage:"어떤 컨테이너에서도 사용하지 않는 모든 이미지가 태그 여부와 관계없이 삭제됩니다.",pruned_other:"{count}개 삭제, {size} 확보",prunedCount_other:"{count}개 삭제",noVolumes:"볼륨이 없습니다.",createVolume:"볼륨 만들기",inUse:"사용 중",unused:"미사용",removeVolumeTitle:"볼륨 {name}을(를) 삭제할까요?",removeVolumeMessage:"볼륨과 데이터가 삭제됩니다.",removeVolumeInUse:"이 볼륨은 컨테이너에서 사용 중입니다. 해당 컨테이너가 없어질 때까지 엔진이 삭제를 거부합니다.",pruneVolumes:"볼륨 정리",pruneVolumesTitle:"사용하지 않는 볼륨을 정리할까요?",pruneVolumesMessage:"어떤 컨테이너에서도 사용하지 않는 모든 볼륨이 데이터와 함께 삭제됩니다.",noNetworks:"네트워크가 없습니다.",createNetwork:"네트워크 만들기",builtin:"기본 제공",internal:"내부",internalNetwork:"내부 네트워크(외부 접근 없음)",subnet:"서브넷",removeNetworkTitle:"네트워크 {name}을(를) 삭제할까요?",removeNetworkMessage:"네트워크가 삭제됩니다. 컨테이너가 아직 연결되어 있으면 엔진이 거부합니다.",pruneNetworks:"네트워크 정리",pruneNetworksTitle:"사용하지 않는 네트워크를 정리할까요?",pruneNetworksMessage:"컨테이너가 없는 모든 사용자 정의 네트워크가 삭제됩니다.","sys.engine":"엔진","sys.name":"호스트 이름","sys.version":"버전","sys.os":"시스템","sys.cpus":"CPU 수","sys.memory":"메모리","sys.storage":"스토리지 드라이버","sys.rootDir":"루트 디렉터리","sys.containers":"컨테이너","sys.containersValue":"전체 {total} · 실행 중 {running} · 일시 중지 {paused} · 중지 {stopped}","sys.images":"이미지","sys.disk":"디스크 사용량","sys.imagesUsage":"이미지","sys.containersUsage":"컨테이너","sys.volumesUsage":"볼륨","sys.buildCache":"빌드 캐시",reclaimable_other:"{size} 확보 가능 · {count}개","sys.events":"최근 이벤트","sys.period":"기간","sys.last1h":"최근 1시간","sys.last6h":"최근 6시간","sys.last24h":"최근 24시간","sys.noEvents":"이 기간에는 이벤트가 없습니다.",cardRunning:"실행 중",cardUnhealthy_other:"비정상 {count}개",cardSummary:"컨테이너 {total}개 중 {running}개 실행 중, 비정상 {unhealthy}개",cardError:"Docker를 불러올 수 없습니다",openPage:"Docker 페이지 열기",unprotectedTitle:"Docker 플러그인에는 보호된 서버가 필요합니다",unprotectedHint:"Docker 접근은 root와 동등합니다. 로그인(users 플러그인)을 켜거나 Docker 플러그인 설정에서 allowUnprotected를 설정하세요.",openSettings:"Docker 설정 열기",noComposeFile:"compose 파일이 표시되지 않습니다. 스택의 compose 파일 폴더를 Docker 플러그인의 composeRoots 설정에 추가하세요(로컬 Docker 소켓만 해당).","stackState.down":"다운",composeUnavailable:"Compose를 사용할 수 없습니다",composeUnavailableHint:"이 서버에는 compose 파일로 스택을 만들고 배포하는 기능이 설정되어 있지 않습니다.",newStack:"새 스택",stackName:"스택 이름",stackNameHint:"소문자, 숫자, - 및 _ 를 사용할 수 있으며 최대 63자입니다.",stackNameInvalid:"소문자, 숫자, - 및 _ 를 사용하고 문자나 숫자로 시작해야 합니다(최대 63자).",stackNameTaken:"이 이름의 스택이 이미 있습니다.",composeYaml:"Compose 파일(YAML)",editStackTitle:"{name} 편집",save:"저장",saveDeploy:"저장 후 배포",saving:"저장 중…",composeSaved:"{name}: compose 파일을 저장했습니다.",stackEdit:"편집",stackDeploy:"배포",deployTitle:"{name}을(를) 배포할까요?",deployMessage:"파일로 docker compose up -d를 실행합니다. 없는 컨테이너는 만들고, 변경된 컨테이너는 다시 만들고, 파일에서 제거된 서비스는 삭제합니다.",pullImages:"먼저 이미지 가져오기",deployStarted:"{name} 배포 중",stackDownFileMessage:"컨테이너와 네트워크가 삭제됩니다. 볼륨은 삭제를 선택하지 않으면 유지됩니다.",removeVolumes:"스택의 볼륨도 삭제",stackDeleteFile:"파일 삭제",deleteFileTitle:"{name}의 compose 파일을 삭제할까요?",deleteFileMessage:"파일이 서버에서 삭제되고(폴더는 유지) 스택은 목록에서 사라집니다.",fileDeleted:"{name}: compose 파일을 삭제했습니다","op.output":"{title} 출력"},ES={title:"Docker",subtitle:"Docker {version} · {endpoint}",subtitleShort:"容器、堆栈、镜像、卷和网络",loading:"加载中…",loadFailed:"无法加载 Docker",refreshFailed:"无法刷新",readOnly:"只读",host:"主机",unreachableShort:"无法连接",unreachable:"无法连接到 {host} 上的 Docker",unknownHost:"未知的 Docker 主机:{host}","tab.containers":"容器","tab.stacks":"堆栈","tab.images":"镜像","tab.volumes":"卷","tab.networks":"网络","tab.system":"系统",back:"返回",refresh:"刷新",copy:"复制",copied:"已复制",cancel:"取消",create:"创建",created:"已创建 {name}",removed:"已删除 {name}",none:"无",protected:"受保护",actionsFor:"{name} 的操作",actionDone:"{action}:{name}","action.start":"启动","action.stop":"停止","action.restart":"重启","action.pause":"暂停","action.unpause":"恢复","action.kill":"强制终止","action.remove":"删除","state.created":"已创建","state.running":"运行中","state.paused":"已暂停","state.restarting":"重启中","state.removing":"删除中","state.exited":"已退出","state.dead":"已失效","health.healthy":"健康","health.unhealthy":"不健康","health.starting":"启动中","col.name":"名称","col.image":"镜像","col.state":"状态","col.status":"详情","col.health":"健康状况","col.ports":"端口","col.stack":"堆栈","col.service":"服务","col.services":"服务","col.containers":"容器","col.cpu":"CPU","col.memory":"内存","col.id":"ID","col.size":"大小","col.created":"创建时间","col.usedBy":"使用者","col.driver":"驱动","col.scope":"范围","col.subnets":"子网","col.mountpoint":"挂载点","col.type":"类型","col.source":"源","col.destination":"目标","col.mode":"模式","col.ip":"IP","col.gateway":"网关","col.mac":"MAC","col.time":"时间","col.action":"操作",search:"搜索容器",showStopped:"显示已停止的",containerCount_other:"{count} 个容器",noContainers:"没有容器。",noMatch:"没有匹配的容器。","view.summary":"摘要","view.logs":"日志","view.stats":"统计","view.run":"运行命令","view.terminal":"终端","section.container":"容器","section.ports":"端口","section.mounts":"挂载","section.networks":"网络","section.environment":"环境变量","field.id":"ID","field.image":"镜像","field.status":"详情","field.created":"创建时间","field.started":"启动时间","field.finished":"结束时间","field.exitCode":"退出码","field.restartPolicy":"重启策略","field.platform":"平台","field.command":"命令","field.stack":"堆栈","field.workingDir":"工作目录","field.configFiles":"Compose 文件",restarts_other:"重启 {count} 次",killTitle:"强制终止 {name}?",killMessage:"容器将立即停止,没有机会正常关闭。",removeContainerTitle:"删除 {name}?",removeContainerMessage:"容器将被删除。其卷会保留。",removeRunningMessage:"容器正在运行:将先停止再删除。其卷会保留。","logs.tail":"行数","logs.lines_other":"最后 {count} 行","logs.follow":"跟随","logs.following":"跟随中","logs.wrap":"自动换行","logs.empty":"没有日志行。","logs.failed":"无法加载日志","stats.notRunning":"容器未运行:没有实时数据。","stats.waiting":"正在等待第一个样本…","stats.failed":"无法读取统计信息","stats.network":"网络","stats.block":"磁盘 I/O","stats.pids":"进程","stats.cpuChart":"CPU 使用率","stats.memoryChart":"内存使用量","run.command":"命令","run.placeholder":"ls -la /app","run.user":"用户","run.workdir":"工作目录","run.hint":"命令不经过 shell 执行:管道、&& 和变量请使用 sh -c '…'。","run.run":"运行","run.exitCode":"退出码","run.truncated":"输出已截断","run.noOutput":"该命令没有输出任何内容。","run.failed":"无法运行该命令","run.notRunning":"容器未运行。","term.connecting":"正在连接…","term.connected":"已连接","term.exited":"Shell 已退出,退出码 {code}","term.ended":"会话已结束。","term.refused":"服务器拒绝了连接(只读模式、受保护的容器或缺少权限)。","term.closed":"连接已关闭(代码 {code})。","term.reconnect":"重新连接","stackState.running":"运行中","stackState.partial":"部分运行","stackState.stopped":"已停止",noStacks:"没有堆栈。",noStacksHint:"堆栈即 Docker Compose 项目;请在主机上使用 docker compose 创建。",composeFile:"Compose 文件",stackDown:"下线",stackDownTitle:"下线 {name}?",stackDownMessage:"其容器将被停止并删除,然后删除其网络。卷和镜像会保留。",stackDownDone:"{name} 已下线",stackPartial:"{name}:部分容器失败。",pullStarted:"正在拉取 {name} 的镜像",operations:"操作","op.running":"运行中","op.done":"已完成","op.failed":"失败","op.working":"处理中…",pull:"拉取",pullImage:"要拉取的镜像",pullPlaceholder:"nginx:latest",noImages:"没有镜像。",dangling:"悬空",removeImageTitle:"删除 {name}?",removeImageMessage:"该镜像将从主机删除。",removeImageUsed_other:"该镜像正被 {count} 个容器使用;在引擎允许的情况下仍会删除。",prune:"清理",pruneDangling:"清理悬空项",pruneUnused:"清理未使用项",pruneImagesTitle:"清理悬空镜像?",pruneImagesMessage:"没有标签且未被任何容器使用的镜像将被删除。",pruneImagesAllTitle:"清理所有未使用的镜像?",pruneImagesAllMessage:"所有未被任何容器使用的镜像都将被删除,无论是否有标签。",pruned_other:"已删除 {count} 项,回收 {size}",prunedCount_other:"已删除 {count} 项",noVolumes:"没有卷。",createVolume:"创建卷",inUse:"使用中",unused:"未使用",removeVolumeTitle:"删除卷 {name}?",removeVolumeMessage:"该卷及其数据将被删除。",removeVolumeInUse:"该卷正被容器使用:在该容器被删除之前,引擎会拒绝删除。",pruneVolumes:"清理卷",pruneVolumesTitle:"清理未使用的卷?",pruneVolumesMessage:"所有未被任何容器使用的卷及其数据都将被删除。",noNetworks:"没有网络。",createNetwork:"创建网络",builtin:"内置",internal:"内部",internalNetwork:"内部网络(无外部访问)",subnet:"子网",removeNetworkTitle:"删除网络 {name}?",removeNetworkMessage:"该网络将被删除;若仍有容器连接,引擎会拒绝。",pruneNetworks:"清理网络",pruneNetworksTitle:"清理未使用的网络?",pruneNetworksMessage:"所有没有容器的自定义网络都将被删除。","sys.engine":"引擎","sys.name":"主机名","sys.version":"版本","sys.os":"系统","sys.cpus":"CPU 数","sys.memory":"内存","sys.storage":"存储驱动","sys.rootDir":"根目录","sys.containers":"容器","sys.containersValue":"共 {total} · 运行中 {running} · 已暂停 {paused} · 已停止 {stopped}","sys.images":"镜像","sys.disk":"磁盘使用情况","sys.imagesUsage":"镜像","sys.containersUsage":"容器","sys.volumesUsage":"卷","sys.buildCache":"构建缓存",reclaimable_other:"可回收 {size} · {count} 项","sys.events":"最近事件","sys.period":"时间段","sys.last1h":"最近 1 小时","sys.last6h":"最近 6 小时","sys.last24h":"最近 24 小时","sys.noEvents":"此时间段内没有事件。",cardRunning:"运行中",cardUnhealthy_other:"{count} 个不健康",cardSummary:"{total} 个容器中有 {running} 个运行中,{unhealthy} 个不健康",cardError:"无法加载 Docker",openPage:"打开 Docker 页面",unprotectedTitle:"Docker 插件需要受保护的服务器",unprotectedHint:"访问 Docker 等同于 root:请启用登录(users 插件),或在 Docker 插件设置中设置 allowUnprotected。",openSettings:"打开 Docker 设置",noComposeFile:"未显示 compose 文件:请将堆栈 compose 文件所在文件夹添加到 Docker 插件的 composeRoots 设置(仅限本地 Docker 套接字)。","stackState.down":"已停止并删除",composeUnavailable:"Compose 不可用",composeUnavailableHint:"此服务器未设置通过 compose 文件创建和部署堆栈。",newStack:"新建堆栈",stackName:"堆栈名称",stackNameHint:"可使用小写字母、数字、- 和 _,最多 63 个字符。",stackNameInvalid:"请使用小写字母、数字、- 和 _,并以字母或数字开头(最多 63 个字符)。",stackNameTaken:"已存在同名堆栈。",composeYaml:"Compose 文件(YAML)",editStackTitle:"编辑 {name}",save:"保存",saveDeploy:"保存并部署",saving:"正在保存…",composeSaved:"{name}:compose 文件已保存。",stackEdit:"编辑",stackDeploy:"部署",deployTitle:"部署 {name}?",deployMessage:"使用该文件运行 docker compose up -d:创建缺少的容器,重新创建已更改的容器,并删除文件中已移除的服务。",pullImages:"先拉取镜像",deployStarted:"正在部署 {name}",stackDownFileMessage:"其容器和网络将被删除。除非你选择删除,否则卷会保留。",removeVolumes:"同时删除堆栈的卷",stackDeleteFile:"删除文件",deleteFileTitle:"删除 {name} 的 compose 文件?",deleteFileMessage:"文件将从服务器删除(其文件夹保留),堆栈将从列表中消失。",fileDeleted:"{name}:compose 文件已删除","op.output":"{title} 的输出"},DS={title:"Docker",subtitle:"Docker {version} · {endpoint}",subtitleShort:"Контейнеры, стеки, образы, тома и сети",loading:"Загрузка…",loadFailed:"Не удалось загрузить Docker",refreshFailed:"Не удалось обновить",readOnly:"Только чтение",host:"Хост",unreachableShort:"недоступен",unreachable:"Нет связи с Docker на {host}",unknownHost:"Неизвестный хост Docker: {host}","tab.containers":"Контейнеры","tab.stacks":"Стеки","tab.images":"Образы","tab.volumes":"Тома","tab.networks":"Сети","tab.system":"Система",back:"Назад",refresh:"Обновить",copy:"Копировать",copied:"Скопировано",cancel:"Отмена",create:"Создать",created:"{name} создан",removed:"{name} удалён",none:"Нет",protected:"Защищён",actionsFor:"Действия для {name}",actionDone:"{action}: {name}","action.start":"Запустить","action.stop":"Остановить","action.restart":"Перезапустить","action.pause":"Приостановить","action.unpause":"Возобновить","action.kill":"Завершить принудительно","action.remove":"Удалить","state.created":"Создан","state.running":"Работает","state.paused":"Приостановлен","state.restarting":"Перезапускается","state.removing":"Удаляется","state.exited":"Завершён","state.dead":"Нерабочий","health.healthy":"Исправен","health.unhealthy":"Неисправен","health.starting":"Запускается","col.name":"Имя","col.image":"Образ","col.state":"Состояние","col.status":"Статус","col.health":"Здоровье","col.ports":"Порты","col.stack":"Стек","col.service":"Сервис","col.services":"Сервисы","col.containers":"Контейнеры","col.cpu":"CPU","col.memory":"Память","col.id":"ID","col.size":"Размер","col.created":"Создан","col.usedBy":"Используется","col.driver":"Драйвер","col.scope":"Область","col.subnets":"Подсети","col.mountpoint":"Точка монтирования","col.type":"Тип","col.source":"Источник","col.destination":"Назначение","col.mode":"Режим","col.ip":"IP","col.gateway":"Шлюз","col.mac":"MAC","col.time":"Время","col.action":"Действие",search:"Поиск контейнеров",showStopped:"Показать остановленные",containerCount_one:"{count} контейнер",containerCount_few:"{count} контейнера",containerCount_many:"{count} контейнеров",containerCount_other:"{count} контейнера",noContainers:"Контейнеров нет.",noMatch:"Подходящих контейнеров нет.","view.summary":"Сводка","view.logs":"Логи","view.stats":"Статистика","view.run":"Выполнить команду","view.terminal":"Терминал","section.container":"Контейнер","section.ports":"Порты","section.mounts":"Монтирования","section.networks":"Сети","section.environment":"Окружение","field.id":"ID","field.image":"Образ","field.status":"Статус","field.created":"Создан","field.started":"Запущен","field.finished":"Завершён","field.exitCode":"Код выхода","field.restartPolicy":"Политика перезапуска","field.platform":"Платформа","field.command":"Команда","field.stack":"Стек","field.workingDir":"Рабочий каталог","field.configFiles":"Файлы Compose",restarts_one:"{count} перезапуск",restarts_few:"{count} перезапуска",restarts_many:"{count} перезапусков",restarts_other:"{count} перезапуска",killTitle:"Завершить {name} принудительно?",killMessage:"Контейнер останавливается немедленно, без возможности корректного завершения.",removeContainerTitle:"Удалить {name}?",removeContainerMessage:"Контейнер будет удалён. Его тома сохранятся.",removeRunningMessage:"Контейнер работает: он будет остановлен и удалён. Его тома сохранятся.","logs.tail":"Строки","logs.lines_one":"Последняя {count} строка","logs.lines_few":"Последние {count} строки","logs.lines_many":"Последние {count} строк","logs.lines_other":"Последние {count} строки","logs.follow":"Следить","logs.following":"Слежение","logs.wrap":"Переносить строки","logs.empty":"Строк лога нет.","logs.failed":"Не удалось загрузить логи","stats.notRunning":"Контейнер не работает: текущих данных нет.","stats.waiting":"Ожидание первого замера…","stats.failed":"Не удалось прочитать статистику","stats.network":"Сеть","stats.block":"Дисковый ввод-вывод","stats.pids":"Процессы","stats.cpuChart":"Загрузка CPU","stats.memoryChart":"Использование памяти","run.command":"Команда","run.placeholder":"ls -la /app","run.user":"Пользователь","run.workdir":"Рабочий каталог","run.hint":"Команда выполняется без оболочки: для конвейеров, && и переменных используйте sh -c '…'.","run.run":"Выполнить","run.exitCode":"Код выхода","run.truncated":"Вывод обрезан","run.noOutput":"Команда ничего не вывела.","run.failed":"Не удалось выполнить команду","run.notRunning":"Контейнер не работает.","term.connecting":"Подключение…","term.connected":"Подключено","term.exited":"Оболочка завершилась с кодом {code}","term.ended":"Сеанс завершён.","term.refused":"Сервер отклонил подключение (режим только чтения, защищённый контейнер или нехватка прав).","term.closed":"Подключение закрыто (код {code}).","term.reconnect":"Подключиться снова","stackState.running":"Работает","stackState.partial":"Частично работает","stackState.stopped":"Остановлен",noStacks:"Стеков нет.",noStacksHint:"Стеки — это проекты Docker Compose; создайте стек с помощью docker compose на хосте.",composeFile:"Файл Compose",stackDown:"Остановить и удалить",stackDownTitle:"Остановить и удалить {name}?",stackDownMessage:"Его контейнеры останавливаются и удаляются, затем удаляются его сети. Тома и образы сохраняются.",stackDownDone:"{name} остановлен и удалён",stackPartial:"{name}: часть контейнеров завершилась с ошибкой.",pullStarted:"Загрузка образов {name}",operations:"Операции","op.running":"Выполняется","op.done":"Готово","op.failed":"Ошибка","op.working":"Выполнение…",pull:"Загрузить",pullImage:"Образ для загрузки",pullPlaceholder:"nginx:latest",noImages:"Образов нет.",dangling:"Неиспользуемые без тега",removeImageTitle:"Удалить {name}?",removeImageMessage:"Образ будет удалён с хоста.",removeImageUsed_one:"Образ используется {count} контейнером; он всё равно удаляется, если движок это позволяет.",removeImageUsed_few:"Образ используется {count} контейнерами; он всё равно удаляется, если движок это позволяет.",removeImageUsed_many:"Образ используется {count} контейнерами; он всё равно удаляется, если движок это позволяет.",removeImageUsed_other:"Образ используется {count} контейнерами; он всё равно удаляется, если движок это позволяет.",prune:"Очистить",pruneDangling:"Очистить без тега",pruneUnused:"Очистить неиспользуемые",pruneImagesTitle:"Очистить образы без тега?",pruneImagesMessage:"Образы без тега, которые не использует ни один контейнер, будут удалены.",pruneImagesAllTitle:"Очистить все неиспользуемые образы?",pruneImagesAllMessage:"Все образы, которые не использует ни один контейнер, будут удалены, с тегом или без.",pruned_one:"Удалён {count} элемент, освобождено {size}",pruned_few:"Удалено {count} элемента, освобождено {size}",pruned_many:"Удалено {count} элементов, освобождено {size}",pruned_other:"Удалено {count} элемента, освобождено {size}",prunedCount_one:"Удалён {count} элемент",prunedCount_few:"Удалено {count} элемента",prunedCount_many:"Удалено {count} элементов",prunedCount_other:"Удалено {count} элемента",noVolumes:"Томов нет.",createVolume:"Создать том",inUse:"Используется",unused:"Не используется",removeVolumeTitle:"Удалить том {name}?",removeVolumeMessage:"Том и его данные будут удалены.",removeVolumeInUse:"Том используется контейнером: движок откажется удалять его, пока этот контейнер не будет удалён.",pruneVolumes:"Очистить тома",pruneVolumesTitle:"Очистить неиспользуемые тома?",pruneVolumesMessage:"Все тома, которые не использует ни один контейнер, будут удалены вместе с данными.",noNetworks:"Сетей нет.",createNetwork:"Создать сеть",builtin:"Встроенная",internal:"Внутренняя",internalNetwork:"Внутренняя сеть (без доступа наружу)",subnet:"Подсеть",removeNetworkTitle:"Удалить сеть {name}?",removeNetworkMessage:"Сеть будет удалена; движок откажет, если к ней ещё подключены контейнеры.",pruneNetworks:"Очистить сети",pruneNetworksTitle:"Очистить неиспользуемые сети?",pruneNetworksMessage:"Все пользовательские сети без контейнеров будут удалены.","sys.engine":"Движок","sys.name":"Имя хоста","sys.version":"Версия","sys.os":"Система","sys.cpus":"Процессоры","sys.memory":"Память","sys.storage":"Драйвер хранилища","sys.rootDir":"Корневой каталог","sys.containers":"Контейнеры","sys.containersValue":"всего {total} · работают {running} · приостановлены {paused} · остановлены {stopped}","sys.images":"Образы","sys.disk":"Использование диска","sys.imagesUsage":"Образы","sys.containersUsage":"Контейнеры","sys.volumesUsage":"Тома","sys.buildCache":"Кеш сборки",reclaimable_one:"Можно освободить {size} · {count} элемент",reclaimable_few:"Можно освободить {size} · {count} элемента",reclaimable_many:"Можно освободить {size} · {count} элементов",reclaimable_other:"Можно освободить {size} · {count} элемента","sys.events":"Последние события","sys.period":"Период","sys.last1h":"Последний час","sys.last6h":"Последние 6 часов","sys.last24h":"Последние 24 часа","sys.noEvents":"В этом периоде событий нет.",cardRunning:"работают",cardUnhealthy_one:"{count} неисправен",cardUnhealthy_few:"{count} неисправны",cardUnhealthy_many:"{count} неисправны",cardUnhealthy_other:"{count} неисправны",cardSummary:"Работает {running} из {total} контейнеров, неисправных: {unhealthy}",cardError:"Не удалось загрузить Docker",openPage:"Открыть страницу Docker",unprotectedTitle:"Плагину Docker нужен защищённый сервер",unprotectedHint:"Доступ к Docker равен доступу root: включите вход (плагин users) или задайте allowUnprotected в настройках плагина Docker.",openSettings:"Открыть настройки Docker",noComposeFile:"Файл compose не показан: добавьте папку с compose-файлом стека в настройку composeRoots плагина Docker (только для локального сокета Docker).","stackState.down":"Остановлен и удалён",composeUnavailable:"Compose недоступен",composeUnavailableHint:"На этом сервере не настроены создание и развёртывание стеков из файлов compose.",newStack:"Новый стек",stackName:"Имя стека",stackNameHint:"Строчные буквы, цифры, - и _; не более 63 символов.",stackNameInvalid:"Используйте строчные буквы, цифры, - и _, начиная с буквы или цифры (не более 63 символов).",stackNameTaken:"Стек с таким именем уже существует.",composeYaml:"Файл compose (YAML)",editStackTitle:"Изменить {name}",save:"Сохранить",saveDeploy:"Сохранить и развернуть",saving:"Сохранение…",composeSaved:"{name}: файл compose сохранён.",stackEdit:"Изменить",stackDeploy:"Развернуть",deployTitle:"Развернуть {name}?",deployMessage:"Запускает docker compose up -d с этим файлом: недостающие контейнеры создаются, изменённые пересоздаются, а сервисы, удалённые из файла, удаляются.",pullImages:"Сначала загрузить образы",deployStarted:"Развёртывание {name}",stackDownFileMessage:"Его контейнеры и сети будут удалены. Тома сохраняются, если вы не выберете их удаление.",removeVolumes:"Удалить также тома стека",stackDeleteFile:"Удалить файл",deleteFileTitle:"Удалить файл compose стека {name}?",deleteFileMessage:"Файл будет удалён с сервера (его папка останется), а стек исчезнет из списка.",fileDeleted:"{name}: файл compose удалён","op.output":"Вывод {title}"},NS={title:"Docker",subtitle:"Docker {version} · {endpoint}",subtitleShort:"Containere, stack-uri, imagini, volume și rețele",loading:"Se încarcă…",loadFailed:"Docker nu a putut fi încărcat",refreshFailed:"Nu s-a putut reîmprospăta",readOnly:"Doar citire",host:"Gazdă",unreachableShort:"inaccesibil",unreachable:"Docker de pe {host} nu poate fi contactat",unknownHost:"Gazdă Docker necunoscută: {host}","tab.containers":"Containere","tab.stacks":"Stack-uri","tab.images":"Imagini","tab.volumes":"Volume","tab.networks":"Rețele","tab.system":"Sistem",back:"Înapoi",refresh:"Reîmprospătează",copy:"Copiază",copied:"Copiat",cancel:"Anulează",create:"Creează",created:"{name} a fost creat",removed:"{name} a fost șters",none:"Niciunul",protected:"Protejat",actionsFor:"Acțiuni pentru {name}",actionDone:"{action}: {name}","action.start":"Pornește","action.stop":"Oprește","action.restart":"Repornește","action.pause":"Pune pe pauză","action.unpause":"Reia","action.kill":"Forțează oprirea","action.remove":"Șterge","state.created":"Creat","state.running":"În execuție","state.paused":"Pe pauză","state.restarting":"Se repornește","state.removing":"Se șterge","state.exited":"Oprit","state.dead":"Mort","health.healthy":"Sănătos","health.unhealthy":"Nesănătos","health.starting":"Pornește","col.name":"Nume","col.image":"Imagine","col.state":"Stare","col.status":"Status","col.health":"Sănătate","col.ports":"Porturi","col.stack":"Stack","col.service":"Serviciu","col.services":"Servicii","col.containers":"Containere","col.cpu":"CPU","col.memory":"Memorie","col.id":"ID","col.size":"Dimensiune","col.created":"Creat","col.usedBy":"Folosit de","col.driver":"Driver","col.scope":"Domeniu","col.subnets":"Subrețele","col.mountpoint":"Punct de montare","col.type":"Tip","col.source":"Sursă","col.destination":"Destinație","col.mode":"Mod","col.ip":"IP","col.gateway":"Gateway","col.mac":"MAC","col.time":"Ora","col.action":"Acțiune",search:"Caută containere",showStopped:"Arată cele oprite",containerCount_one:"{count} container",containerCount_few:"{count} containere",containerCount_other:"{count} de containere",noContainers:"Niciun container.",noMatch:"Niciun container nu se potrivește.","view.summary":"Rezumat","view.logs":"Jurnale","view.stats":"Statistici","view.run":"Rulează comandă","view.terminal":"Terminal","section.container":"Container","section.ports":"Porturi","section.mounts":"Montări","section.networks":"Rețele","section.environment":"Mediu","field.id":"ID","field.image":"Imagine","field.status":"Status","field.created":"Creat","field.started":"Pornit","field.finished":"Terminat","field.exitCode":"Cod de ieșire","field.restartPolicy":"Politică de repornire","field.platform":"Platformă","field.command":"Comandă","field.stack":"Stack","field.workingDir":"Director de lucru","field.configFiles":"Fișiere Compose",restarts_one:"{count} repornire",restarts_few:"{count} reporniri",restarts_other:"{count} de reporniri",killTitle:"Forțezi oprirea {name}?",killMessage:"Containerul este oprit imediat, fără șansa de a se închide corect.",removeContainerTitle:"Ștergi {name}?",removeContainerMessage:"Containerul este șters. Volumele sale se păstrează.",removeRunningMessage:"Containerul rulează: este oprit și șters. Volumele sale se păstrează.","logs.tail":"Linii","logs.lines_one":"Ultima {count} linie","logs.lines_few":"Ultimele {count} linii","logs.lines_other":"Ultimele {count} de linii","logs.follow":"Urmărește","logs.following":"Se urmărește","logs.wrap":"Împarte liniile","logs.empty":"Nicio linie de jurnal.","logs.failed":"Jurnalele nu au putut fi încărcate","stats.notRunning":"Containerul nu rulează: nu există valori în timp real.","stats.waiting":"Se așteaptă prima probă…","stats.failed":"Statisticile nu au putut fi citite","stats.network":"Rețea","stats.block":"I/O disc","stats.pids":"Procese","stats.cpuChart":"Utilizare CPU","stats.memoryChart":"Utilizare memorie","run.command":"Comandă","run.placeholder":"ls -la /app","run.user":"Utilizator","run.workdir":"Director de lucru","run.hint":"Comanda rulează fără shell: folosește sh -c '…' pentru pipe-uri, && și variabile.","run.run":"Rulează","run.exitCode":"Cod de ieșire","run.truncated":"Ieșire trunchiată","run.noOutput":"Comanda nu a afișat nimic.","run.failed":"Comanda nu a putut fi rulată","run.notRunning":"Containerul nu rulează.","term.connecting":"Se conectează…","term.connected":"Conectat","term.exited":"Shell-ul s-a închis cu codul {code}","term.ended":"Sesiunea s-a încheiat.","term.refused":"Serverul a refuzat conexiunea (mod doar citire, un container protejat sau o permisiune lipsă).","term.closed":"Conexiunea s-a închis (cod {code}).","term.reconnect":"Reconectează","stackState.running":"În execuție","stackState.partial":"Parțial în execuție","stackState.stopped":"Oprit",noStacks:"Niciun stack.",noStacksHint:"Stack-urile sunt proiecte Docker Compose; creează unul cu docker compose pe gazdă.",composeFile:"Fișier Compose",stackDown:"Oprește și șterge",stackDownTitle:"Oprești și ștergi {name}?",stackDownMessage:"Containerele sale sunt oprite și șterse, apoi rețelele sale. Volumele și imaginile se păstrează.",stackDownDone:"{name} a fost oprit și șters",stackPartial:"{name}: unele containere au eșuat.",pullStarted:"Se descarcă imaginile pentru {name}",operations:"Operațiuni","op.running":"În execuție","op.done":"Terminat","op.failed":"Eșuat","op.working":"Se lucrează…",pull:"Descarcă",pullImage:"Imagine de descărcat",pullPlaceholder:"nginx:latest",noImages:"Nicio imagine.",dangling:"Fără etichetă",removeImageTitle:"Ștergi {name}?",removeImageMessage:"Imaginea este ștearsă de pe gazdă.",removeImageUsed_one:"Imaginea este folosită de {count} container; este ștearsă oricum acolo unde motorul permite.",removeImageUsed_few:"Imaginea este folosită de {count} containere; este ștearsă oricum acolo unde motorul permite.",removeImageUsed_other:"Imaginea este folosită de {count} de containere; este ștearsă oricum acolo unde motorul permite.",prune:"Curăță",pruneDangling:"Curăță cele fără etichetă",pruneUnused:"Curăță cele nefolosite",pruneImagesTitle:"Cureți imaginile fără etichetă?",pruneImagesMessage:"Imaginile fără etichetă pe care nu le folosește niciun container sunt șterse.",pruneImagesAllTitle:"Cureți toate imaginile nefolosite?",pruneImagesAllMessage:"Fiecare imagine pe care nu o folosește niciun container este ștearsă, cu etichetă sau fără.",pruned_one:"{count} element șters, {size} recuperați",pruned_few:"{count} elemente șterse, {size} recuperați",pruned_other:"{count} de elemente șterse, {size} recuperați",prunedCount_one:"{count} element șters",prunedCount_few:"{count} elemente șterse",prunedCount_other:"{count} de elemente șterse",noVolumes:"Niciun volum.",createVolume:"Creează volum",inUse:"În uz",unused:"Nefolosit",removeVolumeTitle:"Ștergi volumul {name}?",removeVolumeMessage:"Volumul și datele sale sunt șterse.",removeVolumeInUse:"Volumul este folosit de un container: motorul refuză ștergerea până când containerul respectiv dispare.",pruneVolumes:"Curăță volumele",pruneVolumesTitle:"Cureți volumele nefolosite?",pruneVolumesMessage:"Fiecare volum pe care nu îl folosește niciun container este șters împreună cu datele sale.",noNetworks:"Nicio rețea.",createNetwork:"Creează rețea",builtin:"Încorporată",internal:"Internă",internalNetwork:"Rețea internă (fără acces la exterior)",subnet:"Subrețea",removeNetworkTitle:"Ștergi rețeaua {name}?",removeNetworkMessage:"Rețeaua este ștearsă; motorul refuză dacă încă mai sunt containere conectate.",pruneNetworks:"Curăță rețelele",pruneNetworksTitle:"Cureți rețelele nefolosite?",pruneNetworksMessage:"Fiecare rețea personalizată fără containere este ștearsă.","sys.engine":"Motor","sys.name":"Nume gazdă","sys.version":"Versiune","sys.os":"Sistem","sys.cpus":"CPU-uri","sys.memory":"Memorie","sys.storage":"Driver de stocare","sys.rootDir":"Director rădăcină","sys.containers":"Containere","sys.containersValue":"{total} în total · {running} în execuție · {paused} pe pauză · {stopped} oprite","sys.images":"Imagini","sys.disk":"Utilizare disc","sys.imagesUsage":"Imagini","sys.containersUsage":"Containere","sys.volumesUsage":"Volume","sys.buildCache":"Cache de build",reclaimable_one:"{size} recuperabili · {count} element",reclaimable_few:"{size} recuperabili · {count} elemente",reclaimable_other:"{size} recuperabili · {count} de elemente","sys.events":"Evenimente recente","sys.period":"Perioadă","sys.last1h":"Ultima oră","sys.last6h":"Ultimele 6 ore","sys.last24h":"Ultimele 24 de ore","sys.noEvents":"Niciun eveniment în această perioadă.",cardRunning:"în execuție",cardUnhealthy_one:"{count} nesănătos",cardUnhealthy_few:"{count} nesănătoase",cardUnhealthy_other:"{count} de nesănătoase",cardSummary:"{running} din {total} containere rulează, {unhealthy} nesănătoase",cardError:"Docker nu a putut fi încărcat",openPage:"Deschide pagina Docker",unprotectedTitle:"Pluginul Docker are nevoie de un server protejat",unprotectedHint:"Accesul la Docker echivalează cu root: activează autentificarea (pluginul users) sau setează allowUnprotected în setările pluginului Docker.",openSettings:"Deschide setările Docker",noComposeFile:"Nu se afișează niciun fișier compose: adaugă folderul fișierului compose al stack-ului în setarea composeRoots a pluginului Docker (doar cu un socket Docker local).","stackState.down":"Oprit și șters",composeUnavailable:"Compose nu este disponibil",composeUnavailableHint:"Crearea și implementarea stack-urilor din fișiere compose nu este configurată pe acest server.",newStack:"Stack nou",stackName:"Numele stack-ului",stackNameHint:"Litere mici, cifre, - și _; cel mult 63 de caractere.",stackNameInvalid:"Folosește litere mici, cifre, - și _, începând cu o literă sau o cifră (cel mult 63 de caractere).",stackNameTaken:"Există deja un stack cu acest nume.",composeYaml:"Fișier compose (YAML)",editStackTitle:"Editează {name}",save:"Salvează",saveDeploy:"Salvează și implementează",saving:"Se salvează…",composeSaved:"{name}: fișierul compose a fost salvat.",stackEdit:"Editează",stackDeploy:"Implementează",deployTitle:"Implementezi {name}?",deployMessage:"Rulează docker compose up -d cu fișierul: containerele lipsă sunt create, cele modificate sunt recreate, iar serviciile scoase din fișier sunt șterse.",pullImages:"Descarcă întâi imaginile",deployStarted:"Se implementează {name}",stackDownFileMessage:"Containerele și rețelele sale sunt șterse. Volumele se păstrează, dacă nu alegi să fie șterse.",removeVolumes:"Șterge și volumele stack-ului",stackDeleteFile:"Șterge fișierul",deleteFileTitle:"Ștergi fișierul compose al stack-ului {name}?",deleteFileMessage:"Fișierul este șters de pe server (folderul rămâne), iar stack-ul dispare din listă.",fileDeleted:"{name}: fișierul compose a fost șters","op.output":"Ieșirea {title}"},PS={en:vS,es:yS,fr:SS,de:wS,pt:kS,it:xS,ja:CS,ko:bS,zh:ES,ru:DS,ro:NS},MS={docker:PS},tt=()=>ay(MS),Pp=I.createContext(null);function TS({value:e,children:t}){return d.jsx(Pp.Provider,{value:e,children:t})}function Dt(){const e=I.useContext(Pp);if(!e)throw new Error("useDocker() is only available inside the Docker page");return e}function RS(e,t){return{manage:!t&&e("docker:manage"),exec:!t&&e("docker:exec"),admin:!t&&e("docker:admin")}}function ws(e,t,i=!0){const n=I.useRef(e);I.useEffect(()=>{n.current=e}),I.useEffect(()=>{if(!i)return;const c=setInterval(()=>{(typeof document>"u"||document.visibilityState!=="hidden")&&n.current()},t);return()=>clearInterval(c)},[t,i])}function On(){const{notify:e}=Tt(),[t,i]=I.useState(null),n=I.useCallback(async(a,c,u)=>{i(a);try{return await c(),u&&e(u,"success"),!0}catch(f){return e(gr(f),"error"),!1}finally{i(null)}},[e]);return{busy:t,run:n}}const Le="—";function Lu(e=typeof window>"u"?"":window.location.pathname){const t=e.indexOf("/x/");return`${t===-1?"":e.slice(0,t)}/config?${new URLSearchParams({provider:"docker"})}`}const dm=e=>!!e&&/needs a protected server/i.test(e);function fa(e){switch(e){case"running":return"success";case"paused":case"restarting":return"warning";case"dead":return"error";case"exited":case"created":case"removing":default:return"neutral"}}function Pn(e){return e==="healthy"?"success":e==="unhealthy"?"error":e==="starting"?"warning":"neutral"}const LS=/^[a-z0-9][a-z0-9_-]{0,62}$/;function Wc(e){return e==="running"?"success":e==="partial"?"warning":"neutral"}function Mp(e){const t=`${e.private}/${e.type}`;return e.public===void 0||e.public===null?t:`${e.ip?`${e.ip}:`:""}${e.public}→${t}`}function fm(e){const t=new Set,i=[];for(const n of e){const a=`${n.public??""}:${n.private}/${n.type}`;t.has(a)||(t.add(a),i.push(Mp(n)))}return i.join(", ")}function IS(e){const t=e.state==="running"||e.state==="restarting"||e.state==="paused";return{start:!t,stop:t,restart:e.state==="running"||e.state==="paused",pause:e.state==="running",unpause:e.state==="paused",kill:t}}function BS(e){const t=[];let i="",n=null,a=!1;for(let c=0;c<e.length;c++){const u=e[c];n?u===n?n=null:u==="\\"&&n==='"'&&c+1<e.length?i+=e[++c]:i+=u:u==='"'||u==="'"?(n=u,a=!0):u==="\\"&&c+1<e.length?(i+=e[++c],a=!0):/\s/.test(u)?((a||i)&&t.push(i),i="",a=!1):(i+=u,a=!0)}return(a||i)&&t.push(i),t}function AS(e){return!e||!(e.total>0)?null:Math.max(0,Math.min(100,Math.round(e.current/e.total*100)))}function OS(e,t,i){const n=t.toLowerCase().split(/\s+/).filter(Boolean);return e.filter(a=>{if(!i&&a.state!=="running"&&a.state!=="restarting"&&a.state!=="paused")return!1;const c=`${a.name} ${a.image} ${a.stack??""} ${a.service??""} ${a.shortId}`.toLowerCase();return n.every(u=>c.includes(u))})}const zS="\x1B",jS=new RegExp(`${zS}\\[[0-9;?]*[ -/]*[@-~]`,"g"),FS=e=>e.replace(jS,""),Gt="px-3 py-1.5 text-xs bg-control hover:bg-control-hover text-text rounded-lg transition-colors disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50",ys="px-3 py-1.5 text-xs font-medium bg-primary hover:bg-primary-hover text-on-primary rounded-lg transition-colors disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50",nr="w-full px-3 py-1.5 text-sm bg-control border border-border rounded-lg text-text placeholder:text-subtle focus:outline-none focus:border-primary/50",Ss="bg-surface border border-border rounded-xl",Si="text-accent hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 rounded";function Tp({tabs:e,active:t,onChange:i,label:n}){return d.jsx("div",{role:"tablist","aria-label":n,className:"flex gap-1 overflow-x-auto border-b border-border/75 px-4 sm:px-6",children:e.map(a=>{const c=a.id===t;return d.jsx("button",{id:`tab-${a.id}`,role:"tab",type:"button","aria-selected":c,onClick:()=>i(a.id),className:`shrink-0 px-3 py-2.5 text-sm border-b-2 -mb-px transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 ${c?"border-primary text-heading font-medium":"border-transparent text-muted hover:text-text"}`,children:a.label},a.id)})})}function zn({children:e}){return d.jsx("div",{className:"flex flex-wrap items-center gap-2",children:e})}function HS({value:e,label:t}){return d.jsx("div",{role:"progressbar","aria-label":t,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e??void 0,className:"h-1.5 w-full rounded-full bg-control overflow-hidden",children:d.jsx("div",{className:`h-full bg-primary ${e===null?"w-1/3 animate-pulse":""}`,style:e===null?void 0:{width:`${e}%`}})})}function Iu({items:e}){return d.jsx("dl",{className:"grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1.5 text-sm",children:e.map(([t,i])=>d.jsxs("div",{className:"contents",children:[d.jsx("dt",{className:"text-subtle",children:t}),d.jsx("dd",{className:"text-text break-all min-w-0",children:i})]},t))})}function Pr({text:e,className:t="",max:i="max-w-[14rem] xl:max-w-[22rem]"}){return d.jsx("span",{title:e,className:`block truncate ${i} ${t}`,children:e})}const mm="(min-width: 640px)";function Rp(){const[e,t]=I.useState(()=>typeof matchMedia>"u"||matchMedia(mm).matches);return I.useEffect(()=>{if(typeof matchMedia>"u")return;const i=matchMedia(mm),n=()=>t(i.matches);return i.addEventListener("change",n),()=>i.removeEventListener("change",n)},[]),e}function ki({children:e}){return Rp()?null:d.jsx("div",{className:"mt-1 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted",children:e})}const $S={stopPropagation(){},preventDefault(){}};function xi({label:e,items:t,overflow:i=[]}){const n=Rp();if(t.length===0&&i.length===0)return null;const a=[...t.map(c=>({key:c.key,label:c.label,tone:c.tone==="danger"?"danger":"default",disabled:c.disabled||c.loading,onSelect:()=>c.onClick($S)})),...i];return n?d.jsx(Uc,{label:e,items:t,overflow:i}):d.jsx(Uc,{label:e,items:[],overflow:a})}function Lp(e){const{t}=tt(),i=St(),{host:n,can:a}=Dt(),{confirm:c,dialog:u}=Bn(),{busy:f,run:g}=On(),p=I.useCallback(async(S,w)=>{await g(`${S.id}:${w}`,()=>tS(i,S.id,w,n),t("docker.actionDone",{action:t(`docker.action.${w}`),name:S.name}))&&e()},[i,n,g,t,e]),y=I.useCallback(S=>{const w=S.state==="running"||S.state==="paused"||S.state==="restarting";c({title:t("docker.removeContainerTitle",{name:S.name}),message:t(w?"docker.removeRunningMessage":"docker.removeContainerMessage"),confirmLabel:t("docker.action.remove"),tone:"danger",onConfirm:async()=>{await g(`${S.id}:remove`,()=>oS(i,S.id,n,{force:w}),t("docker.removed",{name:S.name}))&&e()}})},[i,n,c,g,t,e]),v=I.useCallback(S=>{c({title:t("docker.killTitle",{name:S.name}),message:t("docker.killMessage"),confirmLabel:t("docker.action.kill"),tone:"danger",onConfirm:async()=>{await p(S,"kill")}})},[c,p,t]);return{controls:I.useCallback(S=>{const w=[],C=[];if(S.protected)return{items:w,overflow:C};const b=IS(S),P=E=>t(`docker.action.${E}`),j=(E,M)=>({key:E,label:P(E),ariaLabel:`${P(E)} ${S.name}`,tone:M,loading:f===`${S.id}:${E}`,disabled:f!==null,onClick:R=>{R.stopPropagation(),p(S,E)}});return a.manage&&(b.start&&w.push(j("start","success")),b.stop&&w.push(j("stop")),b.restart&&w.push(j("restart")),b.pause&&C.push({key:"pause",label:P("pause"),onSelect:()=>void p(S,"pause")}),b.unpause&&C.push({key:"unpause",label:P("unpause"),onSelect:()=>void p(S,"unpause")}),b.kill&&C.push({key:"kill",label:P("kill"),tone:"danger",onSelect:()=>v(S)})),a.admin&&C.push({key:"remove",label:P("remove"),tone:"danger",onSelect:()=>y(S)}),{items:w,overflow:C}},[a.manage,a.admin,f,p,v,y,t]),dialog:u,busy:f}}/**
42
+ * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
43
+ * @license MIT
44
+ *
45
+ * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
46
+ * @license MIT
47
+ *
48
+ * Originally forked from (with the author's permission):
49
+ * Fabrice Bellard's javascript vt100 for jslinux:
50
+ * http://bellard.org/jslinux/
51
+ * Copyright (c) 2011 Fabrice Bellard
52
+ */var Ip=Object.defineProperty,US=Object.getOwnPropertyDescriptor,WS=(e,t)=>{for(var i in t)Ip(e,i,{get:t[i],enumerable:!0})},Ke=(e,t,i,n)=>{for(var a=n>1?void 0:n?US(t,i):t,c=e.length-1,u;c>=0;c--)(u=e[c])&&(a=(n?u(t,i,a):u(a))||a);return n&&a&&Ip(t,i,a),a},le=(e,t)=>(i,n)=>t(i,n,e),pm="Terminal input",Vc={get:()=>pm,set:e=>pm=e},gm="Too much output to announce, navigate to rows manually to read",Kc={get:()=>gm,set:e=>gm=e};function VS(e){return e.replace(/\r?\n/g,"\r")}function KS(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function qS(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function YS(e,t,i,n){if(e.stopPropagation(),e.clipboardData){let a=e.clipboardData.getData("text/plain");Bp(a,t,i,n)}}function Bp(e,t,i,n){e=VS(e),e=KS(e,i.decPrivateModes.bracketedPasteMode&&n.rawOptions.ignoreBracketedPasteMode!==!0),i.triggerDataEvent(e,!0),t.value=""}function Ap(e,t,i){let n=i.getBoundingClientRect(),a=e.clientX-n.left-10,c=e.clientY-n.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${a}px`,t.style.top=`${c}px`,t.style.zIndex="1000",t.focus()}function _m(e,t,i,n,a){Ap(e,t,i),a&&n.rightClickSelect(e),t.value=n.selectionText,t.select()}function ps(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function Ca(e,t=0,i=e.length){let n="";for(let a=t;a<i;++a){let c=e[a];c>65535?(c-=65536,n+=String.fromCharCode((c>>10)+55296)+String.fromCharCode(c%1024+56320)):n+=String.fromCharCode(c)}return n}var GS=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let i=e.length;if(!i)return 0;let n=0,a=0;if(this._interim){let c=e.charCodeAt(a++);56320<=c&&c<=57343?t[n++]=(this._interim-55296)*1024+c-56320+65536:(t[n++]=this._interim,t[n++]=c),this._interim=0}for(let c=a;c<i;++c){let u=e.charCodeAt(c);if(55296<=u&&u<=56319){if(++c>=i)return this._interim=u,n;let f=e.charCodeAt(c);56320<=f&&f<=57343?t[n++]=(u-55296)*1024+f-56320+65536:(t[n++]=u,t[n++]=f);continue}u!==65279&&(t[n++]=u)}return n}},XS=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let i=e.length;if(!i)return 0;let n=0,a,c,u,f,g=0,p=0;if(this.interim[0]){let k=!1,S=this.interim[0];S&=(S&224)===192?31:(S&240)===224?15:7;let w=0,C;for(;(C=this.interim[++w]&63)&&w<4;)S<<=6,S|=C;let b=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,P=b-w;for(;p<P;){if(p>=i)return 0;if(C=e[p++],(C&192)!==128){p--,k=!0;break}else this.interim[w++]=C,S<<=6,S|=C&63}k||(b===2?S<128?p--:t[n++]=S:b===3?S<2048||S>=55296&&S<=57343||S===65279||(t[n++]=S):S<65536||S>1114111||(t[n++]=S)),this.interim.fill(0)}let y=i-4,v=p;for(;v<i;){for(;v<y&&!((a=e[v])&128)&&!((c=e[v+1])&128)&&!((u=e[v+2])&128)&&!((f=e[v+3])&128);)t[n++]=a,t[n++]=c,t[n++]=u,t[n++]=f,v+=4;if(a=e[v++],a<128)t[n++]=a;else if((a&224)===192){if(v>=i)return this.interim[0]=a,n;if(c=e[v++],(c&192)!==128){v--;continue}if(g=(a&31)<<6|c&63,g<128){v--;continue}t[n++]=g}else if((a&240)===224){if(v>=i)return this.interim[0]=a,n;if(c=e[v++],(c&192)!==128){v--;continue}if(v>=i)return this.interim[0]=a,this.interim[1]=c,n;if(u=e[v++],(u&192)!==128){v--;continue}if(g=(a&15)<<12|(c&63)<<6|u&63,g<2048||g>=55296&&g<=57343||g===65279)continue;t[n++]=g}else if((a&248)===240){if(v>=i)return this.interim[0]=a,n;if(c=e[v++],(c&192)!==128){v--;continue}if(v>=i)return this.interim[0]=a,this.interim[1]=c,n;if(u=e[v++],(u&192)!==128){v--;continue}if(v>=i)return this.interim[0]=a,this.interim[1]=c,this.interim[2]=u,n;if(f=e[v++],(f&192)!==128){v--;continue}if(g=(a&7)<<18|(c&63)<<12|(u&63)<<6|f&63,g<65536||g>1114111)continue;t[n++]=g}}return n}},Op="",_s=" ",jn=class zp{constructor(){this.fg=0,this.bg=0,this.extended=new ma}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new zp;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},ma=class jp{constructor(t=0,i=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new jp(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},or=class Fp extends jn{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new ma,this.combinedData=""}static fromCharData(t){let i=new Fp;return i.setFromCharData(t),i}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?ps(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let i=!1;if(t[1].length>2)i=!0;else if(t[1].length===2){let n=t[1].charCodeAt(0);if(55296<=n&&n<=56319){let a=t[1].charCodeAt(1);56320<=a&&a<=57343?this.content=(n-55296)*1024+a-56320+65536|t[2]<<22:i=!0}else i=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;i&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},vm="di$target",qc="di$dependencies",Dc=new Map;function ZS(e){return e[qc]||[]}function pt(e){if(Dc.has(e))return Dc.get(e);let t=function(i,n,a){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");QS(t,i,a)};return t._id=e,Dc.set(e,t),t}function QS(e,t,i){t[vm]===t?t[qc].push({id:e,index:i}):(t[qc]=[{id:e,index:i}],t[vm]=t)}var Rt=pt("BufferService"),Hp=pt("CoreMouseService"),Us=pt("CoreService"),JS=pt("CharsetService"),Bu=pt("InstantiationService"),$p=pt("LogService"),Lt=pt("OptionsService"),Up=pt("OscLinkService"),ew=pt("UnicodeService"),Fn=pt("DecorationService"),Yc=class{constructor(e,t,i){this._bufferService=e,this._optionsService=t,this._oscLinkService=i}provideLinks(e,t){var y;let i=this._bufferService.buffer.lines.get(e-1);if(!i){t(void 0);return}let n=[],a=this._optionsService.rawOptions.linkHandler,c=new or,u=i.getTrimmedLength(),f=-1,g=-1,p=!1;for(let v=0;v<u;v++)if(!(g===-1&&!i.hasContent(v))){if(i.loadCell(v,c),c.hasExtendedAttrs()&&c.extended.urlId)if(g===-1){g=v,f=c.extended.urlId;continue}else p=c.extended.urlId!==f;else g!==-1&&(p=!0);if(p||g!==-1&&v===u-1){let k=(y=this._oscLinkService.getLinkData(f))==null?void 0:y.uri;if(k){let S={start:{x:g+1,y:e},end:{x:v+(!p&&v===u-1?1:0),y:e}},w=!1;if(!(a!=null&&a.allowNonHttpProtocols))try{let C=new URL(k);["http:","https:"].includes(C.protocol)||(w=!0)}catch{w=!0}w||n.push({text:k,range:S,activate:(C,b)=>a?a.activate(C,b,S):tw(C,b),hover:(C,b)=>{var P;return(P=a==null?void 0:a.hover)==null?void 0:P.call(a,C,b,S)},leave:(C,b)=>{var P;return(P=a==null?void 0:a.leave)==null?void 0:P.call(a,C,b,S)}})}p=!1,c.hasExtendedAttrs()&&c.extended.urlId?(g=v,f=c.extended.urlId):(g=-1,f=-1)}}t(n)}};Yc=Ke([le(0,Rt),le(1,Lt),le(2,Up)],Yc);function tw(e,t){if(confirm(`Do you want to navigate to ${t}?
53
+
54
+ WARNING: This link could potentially be dangerous`)){let i=window.open();if(i){try{i.opener=null}catch{}i.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var ba=pt("CharSizeService"),Wr=pt("CoreBrowserService"),Au=pt("MouseService"),Vr=pt("RenderService"),rw=pt("SelectionService"),Wp=pt("CharacterJoinerService"),Ci=pt("ThemeService"),Vp=pt("LinkProviderService"),sw=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?ym.isErrorNoTelemetry(e)?new ym(e.message+`
55
+
56
+ `+e.stack):new Error(e.message+`
57
+
58
+ `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},iw=new sw;function oa(e){nw(e)||iw.onUnexpectedError(e)}var Gc="Canceled";function nw(e){return e instanceof ow?!0:e instanceof Error&&e.name===Gc&&e.message===Gc}var ow=class extends Error{constructor(){super(Gc),this.name=this.message}};function aw(e){return new Error(`Illegal argument: ${e}`)}var ym=class Xc extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Xc)return t;let i=new Xc;return i.message=t.message,i.stack=t.stack,i}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},Zc=class Kp extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,Kp.prototype)}};function Kt(e,t=0){return e[e.length-(1+t)]}var lw;(e=>{function t(c){return c<0}e.isLessThan=t;function i(c){return c<=0}e.isLessThanOrEqual=i;function n(c){return c>0}e.isGreaterThan=n;function a(c){return c===0}e.isNeitherLessOrGreaterThan=a,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(lw||(lw={}));function cw(e,t){let i=this,n=!1,a;return function(){return n||(n=!0,t||(a=e.apply(i,arguments))),a}}var qp;(e=>{function t(M){return M&&typeof M=="object"&&typeof M[Symbol.iterator]=="function"}e.is=t;let i=Object.freeze([]);function n(){return i}e.empty=n;function*a(M){yield M}e.single=a;function c(M){return t(M)?M:a(M)}e.wrap=c;function u(M){return M||i}e.from=u;function*f(M){for(let R=M.length-1;R>=0;R--)yield M[R]}e.reverse=f;function g(M){return!M||M[Symbol.iterator]().next().done===!0}e.isEmpty=g;function p(M){return M[Symbol.iterator]().next().value}e.first=p;function y(M,R){let Q=0;for(let J of M)if(R(J,Q++))return!0;return!1}e.some=y;function v(M,R){for(let Q of M)if(R(Q))return Q}e.find=v;function*k(M,R){for(let Q of M)R(Q)&&(yield Q)}e.filter=k;function*S(M,R){let Q=0;for(let J of M)yield R(J,Q++)}e.map=S;function*w(M,R){let Q=0;for(let J of M)yield*R(J,Q++)}e.flatMap=w;function*C(...M){for(let R of M)yield*R}e.concat=C;function b(M,R,Q){let J=Q;for(let q of M)J=R(J,q);return J}e.reduce=b;function*P(M,R,Q=M.length){for(R<0&&(R+=M.length),Q<0?Q+=M.length:Q>M.length&&(Q=M.length);R<Q;R++)yield M[R]}e.slice=P;function j(M,R=Number.POSITIVE_INFINITY){let Q=[];if(R===0)return[Q,M];let J=M[Symbol.iterator]();for(let q=0;q<R;q++){let H=J.next();if(H.done)return[Q,e.empty()];Q.push(H.value)}return[Q,{[Symbol.iterator](){return J}}]}e.consume=j;async function E(M){let R=[];for await(let Q of M)R.push(Q);return Promise.resolve(R)}e.asyncToArray=E})(qp||(qp={}));function Hs(e){if(qp.is(e)){let t=[];for(let i of e)if(i)try{i.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function uw(...e){return je(()=>Hs(e))}function je(e){return{dispose:cw(()=>{e()})}}var Yp=class Gp{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Hs(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Gp.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),void 0)}};Yp.DISABLE_DISPOSED_WARNING=!1;var vs=Yp,Ce=class{constructor(){this._store=new vs,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Ce.None=Object.freeze({dispose(){}});var wi=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)==null||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)==null||e.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e}},Hr=typeof window=="object"?window:globalThis,Qc=class Jc{constructor(t){this.element=t,this.next=Jc.Undefined,this.prev=Jc.Undefined}};Qc.Undefined=new Qc(void 0);var $e=Qc,Sm=class{constructor(){this._first=$e.Undefined,this._last=$e.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===$e.Undefined}clear(){let e=this._first;for(;e!==$e.Undefined;){let t=e.next;e.prev=$e.Undefined,e.next=$e.Undefined,e=t}this._first=$e.Undefined,this._last=$e.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let i=new $e(e);if(this._first===$e.Undefined)this._first=i,this._last=i;else if(t){let a=this._last;this._last=i,i.prev=a,a.next=i}else{let a=this._first;this._first=i,i.next=a,a.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==$e.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==$e.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==$e.Undefined&&e.next!==$e.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===$e.Undefined&&e.next===$e.Undefined?(this._first=$e.Undefined,this._last=$e.Undefined):e.next===$e.Undefined?(this._last=this._last.prev,this._last.next=$e.Undefined):e.prev===$e.Undefined&&(this._first=this._first.next,this._first.prev=$e.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==$e.Undefined;)yield e.element,e=e.next}},hw=globalThis.performance&&typeof globalThis.performance.now=="function",dw=class Xp{static create(t){return new Xp(t)}constructor(t){this._now=hw&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},yt;(e=>{e.None=()=>Ce.None;function t($,z){return v($,()=>{},0,void 0,!0,void 0,z)}e.defer=t;function i($){return(z,K=null,X)=>{let se=!1,ne;return ne=$(A=>{if(!se)return ne?ne.dispose():se=!0,z.call(K,A)},null,X),se&&ne.dispose(),ne}}e.once=i;function n($,z,K){return p((X,se=null,ne)=>$(A=>X.call(se,z(A)),null,ne),K)}e.map=n;function a($,z,K){return p((X,se=null,ne)=>$(A=>{z(A),X.call(se,A)},null,ne),K)}e.forEach=a;function c($,z,K){return p((X,se=null,ne)=>$(A=>z(A)&&X.call(se,A),null,ne),K)}e.filter=c;function u($){return $}e.signal=u;function f(...$){return(z,K=null,X)=>{let se=uw(...$.map(ne=>ne(A=>z.call(K,A))));return y(se,X)}}e.any=f;function g($,z,K,X){let se=K;return n($,ne=>(se=z(se,ne),se),X)}e.reduce=g;function p($,z){let K,X={onWillAddFirstListener(){K=$(se.fire,se)},onDidRemoveLastListener(){K==null||K.dispose()}},se=new ie(X);return z==null||z.add(se),se.event}function y($,z){return z instanceof Array?z.push($):z&&z.add($),$}function v($,z,K=100,X=!1,se=!1,ne,A){let oe,re,T,U=0,pe,ge={leakWarningThreshold:ne,onWillAddFirstListener(){oe=$(ae=>{U++,re=z(re,ae),X&&!T&&(W.fire(re),re=void 0),pe=()=>{let de=re;re=void 0,T=void 0,(!X||U>1)&&W.fire(de),U=0},typeof K=="number"?(clearTimeout(T),T=setTimeout(pe,K)):T===void 0&&(T=0,queueMicrotask(pe))})},onWillRemoveListener(){se&&U>0&&(pe==null||pe())},onDidRemoveLastListener(){pe=void 0,oe.dispose()}},W=new ie(ge);return A==null||A.add(W),W.event}e.debounce=v;function k($,z=0,K){return e.debounce($,(X,se)=>X?(X.push(se),X):[se],z,void 0,!0,void 0,K)}e.accumulate=k;function S($,z=(X,se)=>X===se,K){let X=!0,se;return c($,ne=>{let A=X||!z(ne,se);return X=!1,se=ne,A},K)}e.latch=S;function w($,z,K){return[e.filter($,z,K),e.filter($,X=>!z(X),K)]}e.split=w;function C($,z=!1,K=[],X){let se=K.slice(),ne=$(re=>{se?se.push(re):oe.fire(re)});X&&X.add(ne);let A=()=>{se==null||se.forEach(re=>oe.fire(re)),se=null},oe=new ie({onWillAddFirstListener(){ne||(ne=$(re=>oe.fire(re)),X&&X.add(ne))},onDidAddFirstListener(){se&&(z?setTimeout(A):A())},onDidRemoveLastListener(){ne&&ne.dispose(),ne=null}});return X&&X.add(oe),oe.event}e.buffer=C;function b($,z){return(K,X,se)=>{let ne=z(new j);return $(function(A){let oe=ne.evaluate(A);oe!==P&&K.call(X,oe)},void 0,se)}}e.chain=b;let P=Symbol("HaltChainable");class j{constructor(){this.steps=[]}map(z){return this.steps.push(z),this}forEach(z){return this.steps.push(K=>(z(K),K)),this}filter(z){return this.steps.push(K=>z(K)?K:P),this}reduce(z,K){let X=K;return this.steps.push(se=>(X=z(X,se),X)),this}latch(z=(K,X)=>K===X){let K=!0,X;return this.steps.push(se=>{let ne=K||!z(se,X);return K=!1,X=se,ne?se:P}),this}evaluate(z){for(let K of this.steps)if(z=K(z),z===P)break;return z}}function E($,z,K=X=>X){let X=(...oe)=>A.fire(K(...oe)),se=()=>$.on(z,X),ne=()=>$.removeListener(z,X),A=new ie({onWillAddFirstListener:se,onDidRemoveLastListener:ne});return A.event}e.fromNodeEventEmitter=E;function M($,z,K=X=>X){let X=(...oe)=>A.fire(K(...oe)),se=()=>$.addEventListener(z,X),ne=()=>$.removeEventListener(z,X),A=new ie({onWillAddFirstListener:se,onDidRemoveLastListener:ne});return A.event}e.fromDOMEventEmitter=M;function R($){return new Promise(z=>i($)(z))}e.toPromise=R;function Q($){let z=new ie;return $.then(K=>{z.fire(K)},()=>{z.fire(void 0)}).finally(()=>{z.dispose()}),z.event}e.fromPromise=Q;function J($,z){return $(K=>z.fire(K))}e.forward=J;function q($,z,K){return z(K),$(X=>z(X))}e.runAndSubscribe=q;class H{constructor(z,K){this._observable=z,this._counter=0,this._hasChanged=!1;let X={onWillAddFirstListener:()=>{z.addObserver(this)},onDidRemoveLastListener:()=>{z.removeObserver(this)}};this.emitter=new ie(X),K&&K.add(this.emitter)}beginUpdate(z){this._counter++}handlePossibleChange(z){}handleChange(z,K){this._hasChanged=!0}endUpdate(z){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function F($,z){return new H($,z).emitter.event}e.fromObservable=F;function ee($){return(z,K,X)=>{let se=0,ne=!1,A={beginUpdate(){se++},endUpdate(){se--,se===0&&($.reportChanges(),ne&&(ne=!1,z.call(K)))},handlePossibleChange(){},handleChange(){ne=!0}};$.addObserver(A),$.reportChanges();let oe={dispose(){$.removeObserver(A)}};return X instanceof vs?X.add(oe):Array.isArray(X)&&X.push(oe),oe}}e.fromObservableLight=ee})(yt||(yt={}));var eu=class tu{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${tu._idPool++}`,tu.all.add(this)}start(t){this._stopWatch=new dw,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};eu.all=new Set,eu._idPool=0;var fw=eu,mw=-1,Zp=class Qp{constructor(t,i,n=(Qp._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=i,this.name=n,this._warnCountdown=0}dispose(){var t;(t=this._stacks)==null||t.clear()}check(t,i){let n=this.threshold;if(n<=0||i<n)return;this._stacks||(this._stacks=new Map);let a=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,a+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[c,u]=this.getMostFrequentStack(),f=`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${u}):`;console.warn(f),console.warn(c);let g=new _w(f,c);this._errorHandler(g)}return()=>{let c=this._stacks.get(t.value)||0;this._stacks.set(t.value,c-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,i=0;for(let[n,a]of this._stacks)(!t||i<a)&&(t=[n,a],i=a);return t}};Zp._idPool=1;var pw=Zp,gw=class Jp{constructor(t){this.value=t}static create(){let t=new Error;return new Jp(t.stack??"")}print(){console.warn(this.value.split(`
59
+ `).slice(2).join(`
60
+ `))}},_w=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},vw=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},yw=0,Nc=class{constructor(e){this.value=e,this.id=yw++}},Sw=2,ww,ie=class{constructor(e){var t,i,n,a;this._size=0,this._options=e,this._leakageMon=(t=this._options)!=null&&t.leakWarningThreshold?new pw((e==null?void 0:e.onListenerError)??oa,((i=this._options)==null?void 0:i.leakWarningThreshold)??mw):void 0,this._perfMon=(n=this._options)!=null&&n._profName?new fw(this._options._profName):void 0,this._deliveryQueue=(a=this._options)==null?void 0:a.deliveryQueue}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)==null?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(i=(t=this._options)==null?void 0:t.onDidRemoveLastListener)==null||i.call(t),(n=this._leakageMon)==null||n.dispose())}get event(){return this._event??(this._event=(e,t,i)=>{var u,f,g,p,y;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let v=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(v);let k=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],S=new vw(`${v}. HINT: Stack shows most frequent listener (${k[1]}-times)`,k[0]);return(((u=this._options)==null?void 0:u.onListenerError)||oa)(S),Ce.None}if(this._disposed)return Ce.None;t&&(e=e.bind(t));let n=new Nc(e),a;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=gw.create(),a=this._leakageMon.check(n.stack,this._size+1)),this._listeners?this._listeners instanceof Nc?(this._deliveryQueue??(this._deliveryQueue=new kw),this._listeners=[this._listeners,n]):this._listeners.push(n):((g=(f=this._options)==null?void 0:f.onWillAddFirstListener)==null||g.call(f,this),this._listeners=n,(y=(p=this._options)==null?void 0:p.onDidAddFirstListener)==null||y.call(p,this)),this._size++;let c=je(()=>{a==null||a(),this._removeListener(n)});return i instanceof vs?i.add(c):Array.isArray(i)&&i.push(c),c}),this._event}_removeListener(e){var a,c,u,f;if((c=(a=this._options)==null?void 0:a.onWillRemoveListener)==null||c.call(a,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(f=(u=this._options)==null?void 0:u.onDidRemoveLastListener)==null||f.call(u,this),this._size=0;return}let t=this._listeners,i=t.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;let n=this._deliveryQueue.current===this;if(this._size*Sw<=t.length){let g=0;for(let p=0;p<t.length;p++)t[p]?t[g++]=t[p]:n&&(this._deliveryQueue.end--,g<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=g}}_deliver(e,t){var n;if(!e)return;let i=((n=this._options)==null?void 0:n.onListenerError)||oa;if(!i){e.value(t);return}try{e.value(t)}catch(a){i(a)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){var t,i,n,a;if((t=this._deliveryQueue)!=null&&t.current&&(this._deliverQueue(this._deliveryQueue),(i=this._perfMon)==null||i.stop()),(n=this._perfMon)==null||n.start(this._size),this._listeners)if(this._listeners instanceof Nc)this._deliver(this._listeners,e);else{let c=this._deliveryQueue;c.enqueue(this,e,this._listeners.length),this._deliverQueue(c)}(a=this._perfMon)==null||a.stop()}hasListeners(){return this._size>0}},kw=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},ru=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new ie,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new ie,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,i){if(this.getZoomLevel(i)===t)return;let n=this.getWindowId(i);this.mapWindowIdToZoomLevel.set(n,t),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,i){this.mapWindowIdToZoomFactor.set(this.getWindowId(i),t)}setFullscreen(t,i){if(this.isFullscreen(i)===t)return;let n=this.getWindowId(i);this.mapWindowIdToFullScreen.set(n,t),this._onDidChangeFullscreen.fire(n)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};ru.INSTANCE=new ru;var Ou=ru;function xw(e,t,i){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",i)}Ou.INSTANCE.onDidChangeZoomLevel;function Cw(e){return Ou.INSTANCE.getZoomFactor(e)}Ou.INSTANCE.onDidChangeFullscreen;var bi=typeof navigator=="object"?navigator.userAgent:"",su=bi.indexOf("Firefox")>=0,bw=bi.indexOf("AppleWebKit")>=0,zu=bi.indexOf("Chrome")>=0,Ew=!zu&&bi.indexOf("Safari")>=0;bi.indexOf("Electron/")>=0;bi.indexOf("Android")>=0;var Pc=!1;if(typeof Hr.matchMedia=="function"){let e=Hr.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=Hr.matchMedia("(display-mode: fullscreen)");Pc=e.matches,xw(Hr,e,({matches:i})=>{Pc&&t.matches||(Pc=i)})}var vi="en",iu=!1,nu=!1,aa=!1,eg=!1,ea,la=vi,wm=vi,Dw,pr,Fs=globalThis,vt,hp;typeof Fs.vscode<"u"&&typeof Fs.vscode.process<"u"?vt=Fs.vscode.process:typeof process<"u"&&typeof((hp=process==null?void 0:process.versions)==null?void 0:hp.node)=="string"&&(vt=process);var dp,Nw=typeof((dp=vt==null?void 0:vt.versions)==null?void 0:dp.electron)=="string",Pw=Nw&&(vt==null?void 0:vt.type)==="renderer",fp;if(typeof vt=="object"){iu=vt.platform==="win32",nu=vt.platform==="darwin",aa=vt.platform==="linux",aa&&vt.env.SNAP&&vt.env.SNAP_REVISION,vt.env.CI||vt.env.BUILD_ARTIFACTSTAGINGDIRECTORY,ea=vi,la=vi;let e=vt.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);ea=t.userLocale,wm=t.osLocale,la=t.resolvedLanguage||vi,Dw=(fp=t.languagePack)==null?void 0:fp.translationsConfigFile}catch{}eg=!0}else typeof navigator=="object"&&!Pw?(pr=navigator.userAgent,iu=pr.indexOf("Windows")>=0,nu=pr.indexOf("Macintosh")>=0,(pr.indexOf("Macintosh")>=0||pr.indexOf("iPad")>=0||pr.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,aa=pr.indexOf("Linux")>=0,(pr==null?void 0:pr.indexOf("Mobi"))>=0,la=globalThis._VSCODE_NLS_LANGUAGE||vi,ea=navigator.language.toLowerCase(),wm=ea):console.error("Unable to resolve platform.");var tg=iu,Nr=nu,Mw=aa,km=eg,Mr=pr,ds=la,Tw;(e=>{function t(){return ds}e.value=t;function i(){return ds.length===2?ds==="en":ds.length>=3?ds[0]==="e"&&ds[1]==="n"&&ds[2]==="-":!1}e.isDefaultVariant=i;function n(){return ds==="en"}e.isDefault=n})(Tw||(Tw={}));var Rw=typeof Fs.postMessage=="function"&&!Fs.importScripts;(()=>{if(Rw){let e=[];Fs.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let n=0,a=e.length;n<a;n++){let c=e[n];if(c.id===i.data.vscodeScheduleAsyncWork){e.splice(n,1),c.callback();return}}});let t=0;return i=>{let n=++t;e.push({id:n,callback:i}),Fs.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})();var Lw=!!(Mr&&Mr.indexOf("Chrome")>=0);Mr&&Mr.indexOf("Firefox")>=0;!Lw&&Mr&&Mr.indexOf("Safari")>=0;Mr&&Mr.indexOf("Edg/")>=0;Mr&&Mr.indexOf("Android")>=0;var pi=typeof navigator=="object"?navigator:{};km||document.queryCommandSupported&&document.queryCommandSupported("copy")||pi&&pi.clipboard&&pi.clipboard.writeText,km||pi&&pi.clipboard&&pi.clipboard.readText;var ju=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},Mc=new ju,xm=new ju,Cm=new ju,Iw=new Array(230),rg;(e=>{function t(f){return Mc.keyCodeToStr(f)}e.toString=t;function i(f){return Mc.strToKeyCode(f)}e.fromString=i;function n(f){return xm.keyCodeToStr(f)}e.toUserSettingsUS=n;function a(f){return Cm.keyCodeToStr(f)}e.toUserSettingsGeneral=a;function c(f){return xm.strToKeyCode(f)||Cm.strToKeyCode(f)}e.fromUserSettings=c;function u(f){if(f>=98&&f<=113)return null;switch(f){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Mc.keyCodeToStr(f)}e.toElectronAccelerator=u})(rg||(rg={}));var Bw=class sg{constructor(t,i,n,a,c){this.ctrlKey=t,this.shiftKey=i,this.altKey=n,this.metaKey=a,this.keyCode=c}equals(t){return t instanceof sg&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",i=this.shiftKey?"1":"0",n=this.altKey?"1":"0",a=this.metaKey?"1":"0";return`K${t}${i}${n}${a}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new Aw([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},Aw=class{constructor(e){if(e.length===0)throw aw("chords");this.chords=e}getHashCode(){let e="";for(let t=0,i=this.chords.length;t<i;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function Ow(e){if(e.charCode){let i=String.fromCharCode(e.charCode).toUpperCase();return rg.fromString(i)}let t=e.keyCode;if(t===3)return 7;if(su)switch(t){case 59:return 85;case 60:if(Mw)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(Nr)return 57;break}else if(bw&&(Nr&&t===93||!Nr&&t===92))return 57;return Iw[t]||0}var zw=Nr?256:2048,jw=512,Fw=1024,Hw=Nr?2048:256,bm=class{constructor(e){var i;this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=(i=t.getModifierState)==null?void 0:i.call(t,"AltGraph"),this.keyCode=Ow(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=zw),this.altKey&&(t|=jw),this.shiftKey&&(t|=Fw),this.metaKey&&(t|=Hw),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new Bw(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},Em=new WeakMap;function $w(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if(t.origin!=="null"&&i.origin!=="null"&&t.origin!==i.origin)return null}catch{return null}return e.parent}var Uw=class{static getSameOriginWindowChain(e){let t=Em.get(e);if(!t){t=[],Em.set(e,t);let i=e,n;do n=$w(i),n?t.push({window:new WeakRef(i),iframeElement:i.frameElement||null}):t.push({window:new WeakRef(i),iframeElement:null}),i=n;while(i)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,a=this.getSameOriginWindowChain(e);for(let c of a){let u=c.window.deref();if(i+=(u==null?void 0:u.scrollY)??0,n+=(u==null?void 0:u.scrollX)??0,u===t||!c.iframeElement)break;let f=c.iframeElement.getBoundingClientRect();i+=f.top,n+=f.left}return{top:i,left:n}}},ta=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let i=Uw.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},Dm=class{constructor(e,t=0,i=0){var a;this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t;let n=!1;if(zu){let c=navigator.userAgent.match(/Chrome\/(\d+)/);n=(c?parseInt(c[1]):123)<=122}if(e){let c=e,u=e,f=((a=e.view)==null?void 0:a.devicePixelRatio)||1;if(typeof c.wheelDeltaY<"u")n?this.deltaY=c.wheelDeltaY/(120*f):this.deltaY=c.wheelDeltaY/120;else if(typeof u.VERTICAL_AXIS<"u"&&u.axis===u.VERTICAL_AXIS)this.deltaY=-u.detail/3;else if(e.type==="wheel"){let g=e;g.deltaMode===g.DOM_DELTA_LINE?su&&!Nr?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof c.wheelDeltaX<"u")Ew&&tg?this.deltaX=-(c.wheelDeltaX/120):n?this.deltaX=c.wheelDeltaX/(120*f):this.deltaX=c.wheelDeltaX/120;else if(typeof u.HORIZONTAL_AXIS<"u"&&u.axis===u.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let g=e;g.deltaMode===g.DOM_DELTA_LINE?su&&!Nr?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(n?this.deltaY=e.wheelDelta/(120*f):this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)==null||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)==null||e.stopPropagation()}},ig=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}),Ww;(e=>{function t(i){return i===e.None||i===e.Cancelled||i instanceof Vw?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:yt.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ig})})(Ww||(Ww={}));var Vw=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?ig:(this._emitter||(this._emitter=new ie),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Fu=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new Zc("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new Zc("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},Kw=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){var e;(e=this.disposable)==null||e.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){if(this.isDisposed)throw new Zc("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let n=i.setInterval(()=>{e()},t);this.disposable=je(()=>{i.clearInterval(n),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},qw;(e=>{async function t(n){let a,c=await Promise.all(n.map(u=>u.then(f=>f,f=>{a||(a=f)})));if(typeof a<"u")throw a;return c}e.settled=t;function i(n){return new Promise(async(a,c)=>{try{await n(a,c)}catch(u){c(u)}})}e.withAsyncBody=i})(qw||(qw={}));var Nm=class sr{static fromArray(t){return new sr(i=>{i.emitMany(t)})}static fromPromise(t){return new sr(async i=>{i.emitMany(await t)})}static fromPromises(t){return new sr(async i=>{await Promise.all(t.map(async n=>i.emitOne(await n)))})}static merge(t){return new sr(async i=>{await Promise.all(t.map(async n=>{for await(let a of n)i.emitOne(a)}))})}constructor(t,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new ie,queueMicrotask(async()=>{let n={emitOne:a=>this.emitOne(a),emitMany:a=>this.emitMany(a),reject:a=>this.reject(a)};try{await Promise.resolve(t(n)),this.resolve()}catch(a){this.reject(a)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await yt.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>{var i;return(i=this._onReturn)==null||i.call(this),{done:!0,value:void 0}}}}static map(t,i){return new sr(async n=>{for await(let a of t)n.emitOne(i(a))})}map(t){return sr.map(this,t)}static filter(t,i){return new sr(async n=>{for await(let a of t)i(a)&&n.emitOne(a)})}filter(t){return sr.filter(this,t)}static coalesce(t){return sr.filter(t,i=>!!i)}coalesce(){return sr.coalesce(this)}static async toPromise(t){let i=[];for await(let n of t)i.push(n);return i}toPromise(){return sr.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};Nm.EMPTY=Nm.fromArray([]);var{getWindow:Er,getWindowId:Yw,onDidRegisterWindow:Gw}=(function(){let e=new Map,t={window:Hr,disposables:new vs};e.set(Hr.vscodeWindowId,t);let i=new ie,n=new ie,a=new ie;function c(u,f){return(typeof u=="number"?e.get(u):void 0)??(f?t:void 0)}return{onDidRegisterWindow:i.event,onWillUnregisterWindow:a.event,onDidUnregisterWindow:n.event,registerWindow(u){if(e.has(u.vscodeWindowId))return Ce.None;let f=new vs,g={window:u,disposables:f.add(new vs)};return e.set(u.vscodeWindowId,g),f.add(je(()=>{e.delete(u.vscodeWindowId),n.fire(u)})),f.add(we(u,ht.BEFORE_UNLOAD,()=>{a.fire(u)})),i.fire(g),f},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(u){return u.vscodeWindowId},hasWindow(u){return e.has(u)},getWindowById:c,getWindow(u){var p;let f=u;if((p=f==null?void 0:f.ownerDocument)!=null&&p.defaultView)return f.ownerDocument.defaultView.window;let g=u;return g!=null&&g.view?g.view.window:Hr},getDocument(u){return Er(u).document}}})(),Xw=class{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function we(e,t,i,n){return new Xw(e,t,i,n)}var Pm=function(e,t,i,n){return we(e,t,i,n)},Hu,Zw=class extends Kw{constructor(e){super(),this.defaultTarget=e&&Er(e)}cancelAndSet(e,t,i){return super.cancelAndSet(e,t,i??this.defaultTarget)}},Mm=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){oa(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,i=new Map,n=new Map,a=c=>{i.set(c,!1);let u=e.get(c)??[];for(t.set(c,u),e.set(c,[]),n.set(c,!0);u.length>0;)u.sort(Mm.sort),u.shift().execute();n.set(c,!1)};Hu=(c,u,f=0)=>{let g=Yw(c),p=new Mm(u,f),y=e.get(g);return y||(y=[],e.set(g,y)),y.push(p),i.get(g)||(i.set(g,!0),c.requestAnimationFrame(()=>a(g))),p}})();function Qw(e){let t=e.getBoundingClientRect(),i=Er(e);return{left:t.left+i.scrollX,top:t.top+i.scrollY,width:t.width,height:t.height}}var ht={CLICK:"click",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",KEY_DOWN:"keydown",KEY_UP:"keyup",BEFORE_UNLOAD:"beforeunload",CHANGE:"change",FOCUS:"focus",BLUR:"blur",INPUT:"input"},Jw=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=Ft(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=Ft(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=Ft(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=Ft(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=Ft(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=Ft(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=Ft(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=Ft(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=Ft(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=Ft(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=Ft(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=Ft(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=Ft(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=Ft(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function Ft(e){return typeof e=="number"?`${e}px`:e}function Mn(e){return new Jw(e)}var ng=class{constructor(){this._hooks=new vs,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,n,a){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=n,this._onStopCallback=a;let c=e;try{e.setPointerCapture(t),this._hooks.add(je(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{c=Er(e)}this._hooks.add(we(c,ht.POINTER_MOVE,u=>{if(u.buttons!==i){this.stopMonitoring(!0);return}u.preventDefault(),this._pointerMoveCallback(u)})),this._hooks.add(we(c,ht.POINTER_UP,u=>this.stopMonitoring(!0)))}};function ek(e,t,i){let n=null,a=null;if(typeof i.value=="function"?(n="value",a=i.value,a.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof i.get=="function"&&(n="get",a=i.get),!a)throw new Error("not supported");let c=`$memoize$${t}`;i[n]=function(...u){return this.hasOwnProperty(c)||Object.defineProperty(this,c,{configurable:!1,enumerable:!1,writable:!1,value:a.apply(this,u)}),this[c]}}var br;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(br||(br={}));var xn=class bt extends Ce{constructor(){super(),this.dispatched=!1,this.targets=new Sm,this.ignoreTargets=new Sm,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(yt.runAndSubscribe(Gw,({window:t,disposables:i})=>{i.add(we(t.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),i.add(we(t.document,"touchend",n=>this.onTouchEnd(t,n))),i.add(we(t.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:Hr,disposables:this._store}))}static addTarget(t){if(!bt.isTouchDevice())return Ce.None;bt.INSTANCE||(bt.INSTANCE=new bt);let i=bt.INSTANCE.targets.push(t);return je(i)}static ignoreTarget(t){if(!bt.isTouchDevice())return Ce.None;bt.INSTANCE||(bt.INSTANCE=new bt);let i=bt.INSTANCE.ignoreTargets.push(t);return je(i)}static isTouchDevice(){return"ontouchstart"in Hr||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let i=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,a=t.targetTouches.length;n<a;n++){let c=t.targetTouches.item(n);this.activeTouches[c.identifier]={id:c.identifier,initialTarget:c.target,initialTimeStamp:i,initialPageX:c.pageX,initialPageY:c.pageY,rollingTimestamps:[i],rollingPageX:[c.pageX],rollingPageY:[c.pageY]};let u=this.newGestureEvent(br.Start,c.target);u.pageX=c.pageX,u.pageY=c.pageY,this.dispatchEvent(u)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,i){let n=Date.now(),a=Object.keys(this.activeTouches).length;for(let c=0,u=i.changedTouches.length;c<u;c++){let f=i.changedTouches.item(c);if(!this.activeTouches.hasOwnProperty(String(f.identifier))){console.warn("move of an UNKNOWN touch",f);continue}let g=this.activeTouches[f.identifier],p=Date.now()-g.initialTimeStamp;if(p<bt.HOLD_DELAY&&Math.abs(g.initialPageX-Kt(g.rollingPageX))<30&&Math.abs(g.initialPageY-Kt(g.rollingPageY))<30){let y=this.newGestureEvent(br.Tap,g.initialTarget);y.pageX=Kt(g.rollingPageX),y.pageY=Kt(g.rollingPageY),this.dispatchEvent(y)}else if(p>=bt.HOLD_DELAY&&Math.abs(g.initialPageX-Kt(g.rollingPageX))<30&&Math.abs(g.initialPageY-Kt(g.rollingPageY))<30){let y=this.newGestureEvent(br.Contextmenu,g.initialTarget);y.pageX=Kt(g.rollingPageX),y.pageY=Kt(g.rollingPageY),this.dispatchEvent(y)}else if(a===1){let y=Kt(g.rollingPageX),v=Kt(g.rollingPageY),k=Kt(g.rollingTimestamps)-g.rollingTimestamps[0],S=y-g.rollingPageX[0],w=v-g.rollingPageY[0],C=[...this.targets].filter(b=>g.initialTarget instanceof Node&&b.contains(g.initialTarget));this.inertia(t,C,n,Math.abs(S)/k,S>0?1:-1,y,Math.abs(w)/k,w>0?1:-1,v)}this.dispatchEvent(this.newGestureEvent(br.End,g.initialTarget)),delete this.activeTouches[f.identifier]}this.dispatched&&(i.preventDefault(),i.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,i){let n=document.createEvent("CustomEvent");return n.initEvent(t,!1,!0),n.initialTarget=i,n.tapCount=0,n}dispatchEvent(t){if(t.type===br.Tap){let i=new Date().getTime(),n=0;i-this._lastSetTapCountTime>bt.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=i,t.tapCount=n}else(t.type===br.Change||t.type===br.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let n of this.ignoreTargets)if(n.contains(t.initialTarget))return;let i=[];for(let n of this.targets)if(n.contains(t.initialTarget)){let a=0,c=t.initialTarget;for(;c&&c!==n;)a++,c=c.parentElement;i.push([a,n])}i.sort((n,a)=>n[0]-a[0]);for(let[n,a]of i)a.dispatchEvent(t),this.dispatched=!0}}inertia(t,i,n,a,c,u,f,g,p){this.handle=Hu(t,()=>{let y=Date.now(),v=y-n,k=0,S=0,w=!0;a+=bt.SCROLL_FRICTION*v,f+=bt.SCROLL_FRICTION*v,a>0&&(w=!1,k=c*a*v),f>0&&(w=!1,S=g*f*v);let C=this.newGestureEvent(br.Change);C.translationX=k,C.translationY=S,i.forEach(b=>b.dispatchEvent(C)),w||this.inertia(t,i,y,a,c,u+k,f,g,p+S)})}onTouchMove(t){let i=Date.now();for(let n=0,a=t.changedTouches.length;n<a;n++){let c=t.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(c.identifier))){console.warn("end of an UNKNOWN touch",c);continue}let u=this.activeTouches[c.identifier],f=this.newGestureEvent(br.Change,u.initialTarget);f.translationX=c.pageX-Kt(u.rollingPageX),f.translationY=c.pageY-Kt(u.rollingPageY),f.pageX=c.pageX,f.pageY=c.pageY,this.dispatchEvent(f),u.rollingPageX.length>3&&(u.rollingPageX.shift(),u.rollingPageY.shift(),u.rollingTimestamps.shift()),u.rollingPageX.push(c.pageX),u.rollingPageY.push(c.pageY),u.rollingTimestamps.push(i)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};xn.SCROLL_FRICTION=-.005,xn.HOLD_DELAY=700,xn.CLEAR_TAP_COUNT_TIME=400,Ke([ek],xn,"isTouchDevice",1);var tk=xn,$u=class extends Ce{onclick(e,t){this._register(we(e,ht.CLICK,i=>t(new ta(Er(e),i))))}onmousedown(e,t){this._register(we(e,ht.MOUSE_DOWN,i=>t(new ta(Er(e),i))))}onmouseover(e,t){this._register(we(e,ht.MOUSE_OVER,i=>t(new ta(Er(e),i))))}onmouseleave(e,t){this._register(we(e,ht.MOUSE_LEAVE,i=>t(new ta(Er(e),i))))}onkeydown(e,t){this._register(we(e,ht.KEY_DOWN,i=>t(new bm(i))))}onkeyup(e,t){this._register(we(e,ht.KEY_UP,i=>t(new bm(i))))}oninput(e,t){this._register(we(e,ht.INPUT,t))}onblur(e,t){this._register(we(e,ht.BLUR,t))}onfocus(e,t){this._register(we(e,ht.FOCUS,t))}onchange(e,t){this._register(we(e,ht.CHANGE,t))}ignoreGesture(e){return tk.ignoreTarget(e)}},Tm=11,rk=class extends $u{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=Tm+"px",this.domNode.style.height=Tm+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new ng),this._register(Pm(this.bgDomNode,ht.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(Pm(this.domNode,ht.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new Zw),this._pointerdownScheduleRepeatTimer=this._register(new Fu)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Er(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},sk=class ou{constructor(t,i,n,a,c,u,f){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(i=i|0,n=n|0,a=a|0,c=c|0,u=u|0,f=f|0),this.rawScrollLeft=a,this.rawScrollTop=f,i<0&&(i=0),a+i>n&&(a=n-i),a<0&&(a=0),c<0&&(c=0),f+c>u&&(f=u-c),f<0&&(f=0),this.width=i,this.scrollWidth=n,this.scrollLeft=a,this.height=c,this.scrollHeight=u,this.scrollTop=f}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,i){return new ou(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,i?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,i?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new ou(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,i){let n=this.width!==t.width,a=this.scrollWidth!==t.scrollWidth,c=this.scrollLeft!==t.scrollLeft,u=this.height!==t.height,f=this.scrollHeight!==t.scrollHeight,g=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:i,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:a,scrollLeftChanged:c,heightChanged:u,scrollHeightChanged:f,scrollTopChanged:g}}},ik=class extends Ce{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new ie),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new sk(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var n;let i=this._state.withScrollDimensions(e,t);this._setState(i,!!this._smoothScrolling),(n=this._smoothScrolling)==null||n.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;t?n=new Lm(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{let i=this._state.withScrollPosition(e);this._smoothScrolling=Lm.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}},Rm=class{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}};function Tc(e,t){let i=t-e;return function(n){return e+i*ak(n)}}function nk(e,t,i){return function(n){return n<i?e(n/i):t((n-i)/(1-i))}}var Lm=class au{constructor(t,i,n,a){this.from=t,this.to=i,this.duration=a,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,i,n){if(Math.abs(t-i)>2.5*n){let a,c;return t<i?(a=t+.75*n,c=i-.75*n):(a=t-.75*n,c=i+.75*n),nk(Tc(t,a),Tc(c,i),.33)}return Tc(t,i)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let i=(t-this.startTime)/this.duration;if(i<1){let n=this.scrollLeft(i),a=this.scrollTop(i);return new Rm(n,a,!1)}return new Rm(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,i,n){return au.start(t,i,n)}static start(t,i,n){n=n+10;let a=Date.now()-10;return new au(t,i,a,n)}};function ok(e){return Math.pow(e,3)}function ak(e){return 1-ok(1-e)}var lk=class extends Ce{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new Fu)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)==null||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)==null||t.setClassName(this._invisibleClassName+(e?" fade":"")))}},ck=140,og=class extends $u{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new lk(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new ng),this._shouldRender=!0,this.domNode=Mn(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(we(this.domNode.domNode,ht.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new rk(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=Mn(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof i=="number"&&this.slider.setWidth(i),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(we(this.slider.domNode,ht.POINTER_DOWN,a=>{a.button===0&&(a.preventDefault(),this._sliderPointerDown(a))})),this.onclick(this.slider.domNode,a=>{a.leftButton&&a.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),a=this._sliderPointerPosition(e);i<=a&&a<=n?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,i=e.offsetY;else{let a=Qw(this.domNode.domNode);t=e.pageX-a.left,i=e.pageY-a.top}let n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,a=>{let c=this._sliderOrthogonalPointerPosition(a),u=Math.abs(c-i);if(tg&&u>ck){this._setDesiredScrollPositionNow(n.getScrollPosition());return}let f=this._sliderPointerPosition(a)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(f))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},ag=class lu{constructor(t,i,n,a,c,u){this._scrollbarSize=Math.round(i),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(t),this._visibleSize=a,this._scrollSize=c,this._scrollPosition=u,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new lu(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let i=Math.round(t);return this._visibleSize!==i?(this._visibleSize=i,this._refreshComputedValues(),!0):!1}setScrollSize(t){let i=Math.round(t);return this._scrollSize!==i?(this._scrollSize=i,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let i=Math.round(t);return this._scrollPosition!==i?(this._scrollPosition=i,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,i,n,a,c){let u=Math.max(0,n-t),f=Math.max(0,u-2*i),g=a>0&&a>n;if(!g)return{computedAvailableSize:Math.round(u),computedIsNeeded:g,computedSliderSize:Math.round(f),computedSliderRatio:0,computedSliderPosition:0};let p=Math.round(Math.max(20,Math.floor(n*f/a))),y=(f-p)/(a-n),v=c*y;return{computedAvailableSize:Math.round(u),computedIsNeeded:g,computedSliderSize:Math.round(p),computedSliderRatio:y,computedSliderPosition:Math.round(v)}}_refreshComputedValues(){let t=lu._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let i=t-this._arrowSize-this._computedSliderSize/2;return Math.round(i/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let i=t-this._arrowSize,n=this._scrollPosition;return i<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let i=this._computedSliderPosition+t;return Math.round(i/this._computedSliderRatio)}},uk=class extends og{constructor(e,t,i){let n=e.getScrollDimensions(),a=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new ag(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,n.width,n.scrollWidth,a.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},hk=class extends og{constructor(e,t,i){let n=e.getScrollDimensions(),a=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new ag(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,a.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},dk=500,Im=50,fk=class{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}},cu=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,i=0,n=1,a=this._rear;do{let c=a===this._front?t:Math.pow(2,-n);if(t-=c,i+=this._memory[a].score*c,a===this._front)break;a=(this._capacity+a-1)%this._capacity,n++}while(!0);return i<=.5}acceptStandardWheelEvent(t){if(zu){let i=Er(t.browserEvent),n=Cw(i);this.accept(Date.now(),t.deltaX*n,t.deltaY*n)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,i,n){let a=null,c=new fk(t,i,n);this._front===-1&&this._rear===-1?(this._memory[0]=c,this._front=0,this._rear=0):(a=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=c),c.score=this._computeScore(c,a)}_computeScore(t,i){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(n+=.25),i){let a=Math.abs(t.deltaX),c=Math.abs(t.deltaY),u=Math.abs(i.deltaX),f=Math.abs(i.deltaY),g=Math.max(Math.min(a,u),1),p=Math.max(Math.min(c,f),1),y=Math.max(a,u),v=Math.max(c,f);y%g===0&&v%p===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};cu.INSTANCE=new cu;var mk=cu,pk=class extends $u{constructor(e,t,i){super(),this._onScroll=this._register(new ie),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new ie),this.onWillScroll=this._onWillScroll.event,this._options=_k(t),this._scrollable=i,this._register(this._scrollable.onScroll(a=>{this._onWillScroll.fire(a),this._onDidScroll(a),this._onScroll.fire(a)}));let n={onMouseWheel:a=>this._onMouseWheel(a),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new hk(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new uk(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Mn(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Mn(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Mn(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,a=>this._onMouseOver(a)),this.onmouseleave(this._listenOnDomNode,a=>this._onMouseLeave(a)),this._hideTimeout=this._register(new Fu),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=Hs(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Nr&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new Dm(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Hs(this._mouseWheelToDispose),e)){let t=i=>{this._onMouseWheel(new Dm(i))};this._mouseWheelToDispose.push(we(this._listenOnDomNode,ht.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){var a;if((a=e.browserEvent)!=null&&a.defaultPrevented)return;let t=mk.INSTANCE;t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let c=e.deltaY*this._options.mouseWheelScrollSensitivity,u=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&u+c===0?u=c=0:Math.abs(c)>=Math.abs(u)?u=0:c=0),this._options.flipAxes&&([c,u]=[u,c]);let f=!Nr&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||f)&&!u&&(u=c,c=0),e.browserEvent&&e.browserEvent.altKey&&(u=u*this._options.fastScrollSensitivity,c=c*this._options.fastScrollSensitivity);let g=this._scrollable.getFutureScrollPosition(),p={};if(c){let y=Im*c,v=g.scrollTop-(y<0?Math.floor(y):Math.ceil(y));this._verticalScrollbar.writeScrollPosition(p,v)}if(u){let y=Im*u,v=g.scrollLeft-(y<0?Math.floor(y):Math.ceil(y));this._horizontalScrollbar.writeScrollPosition(p,v)}p=this._scrollable.validateScrollPosition(p),(g.scrollLeft!==p.scrollLeft||g.scrollTop!==p.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(p):this._scrollable.setScrollPositionNow(p),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",a=t?" top":"",c=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${a}`),this._topLeftShadowDomNode.setClassName(`shadow${c}${a}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),dk)}},gk=class extends pk{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function _k(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,Nr&&(t.className+=" mac"),t}var uu=class extends Ce{constructor(e,t,i,n,a,c,u,f){super(),this._bufferService=i,this._optionsService=u,this._renderService=f,this._onRequestScrollLines=this._register(new ie),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let g=this._register(new ik({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:p=>Hu(n.window,p)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{g.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new gk(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},g)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(a.onProtocolChange(p=>{this._scrollableElement.updateOptions({handleMouseWheel:!(p&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(yt.runAndSubscribe(c.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=c.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(je(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=n.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(je(()=>this._styleElement.remove())),this._register(yt.runAndSubscribe(c.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${c.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${c.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${c.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
61
+ `)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(p=>this._handleScroll(p)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){var e;return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:((e=this._optionsService.rawOptions.overviewRuler)==null?void 0:e.width)||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),i=t-this._bufferService.buffer.ydisp;i!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(i)),this._isHandlingScroll=!1}};uu=Ke([le(2,Rt),le(3,Wr),le(4,Hp),le(5,Ci),le(6,Lt),le(7,Vr)],uu);var hu=class extends Ce{constructor(e,t,i,n,a){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=i,this._decorationService=n,this._renderService=a,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(c=>this._removeDecoration(c))),this._register(je(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){var n;let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",((n=e==null?void 0:e.options)==null?void 0:n.layer)==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let i=e.options.x??0;return i&&i>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let i=this._decorationElements.get(e);i||(i=this._createElement(e),e.element=i,this._decorationElements.set(e,i),this._container.appendChild(i),e.onDispose(()=>{this._decorationElements.delete(e),i.remove()})),i.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(i.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,i.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,i.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,i.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(i)}}_refreshXPosition(e,t=e.element){if(!t)return;let i=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=i?`${i*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=i?`${i*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){var t;(t=this._decorationElements.get(e))==null||t.remove(),this._decorationElements.delete(e),e.dispose()}};hu=Ke([le(1,Rt),le(2,Wr),le(3,Fn),le(4,Vr)],hu);var vk=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(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,i){return t>=e.startBufferLine-this._linePadding[i||"full"]&&t<=e.endBufferLine+this._linePadding[i||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},xr={full:0,left:0,center:0,right:0},fs={full:0,left:0,center:0,right:0},gn={full:0,left:0,center:0,right:0},pa=class extends Ce{constructor(e,t,i,n,a,c,u,f){var p;super(),this._viewportElement=e,this._screenElement=t,this._bufferService=i,this._decorationService=n,this._renderService=a,this._optionsService=c,this._themeService=u,this._coreBrowserService=f,this._colorZoneStore=new vk,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(),(p=this._viewportElement.parentElement)==null||p.insertBefore(this._canvas,this._viewportElement),this._register(je(()=>{var y;return(y=this._canvas)==null?void 0:y.remove()}));let g=this._canvas.getContext("2d");if(g)this._ctx=g;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),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())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){var e;return((e=this._optionsService.options.overviewRuler)==null?void 0:e.width)||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);fs.full=this._canvas.width,fs.left=e,fs.center=t,fs.right=e,this._refreshDrawHeightConstants(),gn.full=1,gn.left=1,gn.center=1+fs.left,gn.right=1+fs.left+fs.center}_refreshDrawHeightConstants(){xr.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);xr.left=t,xr.center=t,xr.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*xr.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*xr.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*xr.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*xr.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(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(gn[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-xr[e.position||"full"]/2),fs[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+xr[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};pa=Ke([le(2,Rt),le(3,Fn),le(4,Vr),le(5,Lt),le(6,Ci),le(7,Wr)],pa);var V;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
62
+ `,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""))(V||(V={}));var ca;(e=>(e.PAD="€",e.HOP="",e.BPH="‚",e.NBH="ƒ",e.IND="„",e.NEL="…",e.SSA="†",e.ESA="‡",e.HTS="ˆ",e.HTJ="‰",e.VTS="Š",e.PLD="‹",e.PLU="Œ",e.RI="",e.SS2="Ž",e.SS3="",e.DCS="",e.PU1="‘",e.PU2="’",e.STS="“",e.CCH="”",e.MW="•",e.SPA="–",e.EPA="—",e.SOS="˜",e.SGCI="™",e.SCI="š",e.CSI="›",e.ST="œ",e.OSC="",e.PM="ž",e.APC="Ÿ"))(ca||(ca={}));var lg;(e=>e.ST=`${V.ESC}\\`)(lg||(lg={}));var du=class{constructor(e,t,i,n,a,c){this._textarea=e,this._compositionView=t,this._bufferService=i,this._optionsService=n,this._coreService=a,this._renderService=c,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let i;t.start+=this._dataAlreadySent.length,this._isComposing?i=this._textarea.value.substring(t.start,this._compositionPosition.start):i=this._textarea.value.substring(t.start),i.length>0&&this._coreService.triggerDataEvent(i,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,i=t.replace(e,"");this._dataAlreadySent=i,t.length>e.length?this._coreService.triggerDataEvent(i,!0):t.length<e.length?this._coreService.triggerDataEvent(`${V.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),i=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,a=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=a+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=i+"px",this._compositionView.style.lineHeight=i+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let c=this._compositionView.getBoundingClientRect();this._textarea.style.left=a+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(c.width,1)+"px",this._textarea.style.height=Math.max(c.height,1)+"px",this._textarea.style.lineHeight=c.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};du=Ke([le(2,Rt),le(3,Lt),le(4,Us),le(5,Vr)],du);var dt=0,ft=0,mt=0,Ve=0,Bm={css:"#00000000",rgba:0},et;(e=>{function t(a,c,u,f){return f!==void 0?`#${As(a)}${As(c)}${As(u)}${As(f)}`:`#${As(a)}${As(c)}${As(u)}`}e.toCss=t;function i(a,c,u,f=255){return(a<<24|c<<16|u<<8|f)>>>0}e.toRgba=i;function n(a,c,u,f){return{css:e.toCss(a,c,u,f),rgba:e.toRgba(a,c,u,f)}}e.toColor=n})(et||(et={}));var Oe;(e=>{function t(g,p){if(Ve=(p.rgba&255)/255,Ve===1)return{css:p.css,rgba:p.rgba};let y=p.rgba>>24&255,v=p.rgba>>16&255,k=p.rgba>>8&255,S=g.rgba>>24&255,w=g.rgba>>16&255,C=g.rgba>>8&255;dt=S+Math.round((y-S)*Ve),ft=w+Math.round((v-w)*Ve),mt=C+Math.round((k-C)*Ve);let b=et.toCss(dt,ft,mt),P=et.toRgba(dt,ft,mt);return{css:b,rgba:P}}e.blend=t;function i(g){return(g.rgba&255)===255}e.isOpaque=i;function n(g,p,y){let v=ua.ensureContrastRatio(g.rgba,p.rgba,y);if(v)return et.toColor(v>>24&255,v>>16&255,v>>8&255)}e.ensureContrastRatio=n;function a(g){let p=(g.rgba|255)>>>0;return[dt,ft,mt]=ua.toChannels(p),{css:et.toCss(dt,ft,mt),rgba:p}}e.opaque=a;function c(g,p){return Ve=Math.round(p*255),[dt,ft,mt]=ua.toChannels(g.rgba),{css:et.toCss(dt,ft,mt,Ve),rgba:et.toRgba(dt,ft,mt,Ve)}}e.opacity=c;function u(g,p){return Ve=g.rgba&255,c(g,Ve*p/255)}e.multiplyOpacity=u;function f(g){return[g.rgba>>24&255,g.rgba>>16&255,g.rgba>>8&255]}e.toColorRGB=f})(Oe||(Oe={}));var Ue;(e=>{let t,i;try{let a=document.createElement("canvas");a.width=1,a.height=1;let c=a.getContext("2d",{willReadFrequently:!0});c&&(t=c,t.globalCompositeOperation="copy",i=t.createLinearGradient(0,0,1,1))}catch{}function n(a){if(a.match(/#[\da-f]{3,8}/i))switch(a.length){case 4:return dt=parseInt(a.slice(1,2).repeat(2),16),ft=parseInt(a.slice(2,3).repeat(2),16),mt=parseInt(a.slice(3,4).repeat(2),16),et.toColor(dt,ft,mt);case 5:return dt=parseInt(a.slice(1,2).repeat(2),16),ft=parseInt(a.slice(2,3).repeat(2),16),mt=parseInt(a.slice(3,4).repeat(2),16),Ve=parseInt(a.slice(4,5).repeat(2),16),et.toColor(dt,ft,mt,Ve);case 7:return{css:a,rgba:(parseInt(a.slice(1),16)<<8|255)>>>0};case 9:return{css:a,rgba:parseInt(a.slice(1),16)>>>0}}let c=a.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(c)return dt=parseInt(c[1]),ft=parseInt(c[2]),mt=parseInt(c[3]),Ve=Math.round((c[5]===void 0?1:parseFloat(c[5]))*255),et.toColor(dt,ft,mt,Ve);if(!t||!i)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=i,t.fillStyle=a,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[dt,ft,mt,Ve]=t.getImageData(0,0,1,1).data,Ve!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:et.toRgba(dt,ft,mt,Ve),css:a}}e.toColor=n})(Ue||(Ue={}));var Mt;(e=>{function t(n){return i(n>>16&255,n>>8&255,n&255)}e.relativeLuminance=t;function i(n,a,c){let u=n/255,f=a/255,g=c/255,p=u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4),y=f<=.03928?f/12.92:Math.pow((f+.055)/1.055,2.4),v=g<=.03928?g/12.92:Math.pow((g+.055)/1.055,2.4);return p*.2126+y*.7152+v*.0722}e.relativeLuminance2=i})(Mt||(Mt={}));var ua;(e=>{function t(u,f){if(Ve=(f&255)/255,Ve===1)return f;let g=f>>24&255,p=f>>16&255,y=f>>8&255,v=u>>24&255,k=u>>16&255,S=u>>8&255;return dt=v+Math.round((g-v)*Ve),ft=k+Math.round((p-k)*Ve),mt=S+Math.round((y-S)*Ve),et.toRgba(dt,ft,mt)}e.blend=t;function i(u,f,g){let p=Mt.relativeLuminance(u>>8),y=Mt.relativeLuminance(f>>8);if(jr(p,y)<g){if(y<p){let S=n(u,f,g),w=jr(p,Mt.relativeLuminance(S>>8));if(w<g){let C=a(u,f,g),b=jr(p,Mt.relativeLuminance(C>>8));return w>b?S:C}return S}let v=a(u,f,g),k=jr(p,Mt.relativeLuminance(v>>8));if(k<g){let S=n(u,f,g),w=jr(p,Mt.relativeLuminance(S>>8));return k>w?v:S}return v}}e.ensureContrastRatio=i;function n(u,f,g){let p=u>>24&255,y=u>>16&255,v=u>>8&255,k=f>>24&255,S=f>>16&255,w=f>>8&255,C=jr(Mt.relativeLuminance2(k,S,w),Mt.relativeLuminance2(p,y,v));for(;C<g&&(k>0||S>0||w>0);)k-=Math.max(0,Math.ceil(k*.1)),S-=Math.max(0,Math.ceil(S*.1)),w-=Math.max(0,Math.ceil(w*.1)),C=jr(Mt.relativeLuminance2(k,S,w),Mt.relativeLuminance2(p,y,v));return(k<<24|S<<16|w<<8|255)>>>0}e.reduceLuminance=n;function a(u,f,g){let p=u>>24&255,y=u>>16&255,v=u>>8&255,k=f>>24&255,S=f>>16&255,w=f>>8&255,C=jr(Mt.relativeLuminance2(k,S,w),Mt.relativeLuminance2(p,y,v));for(;C<g&&(k<255||S<255||w<255);)k=Math.min(255,k+Math.ceil((255-k)*.1)),S=Math.min(255,S+Math.ceil((255-S)*.1)),w=Math.min(255,w+Math.ceil((255-w)*.1)),C=jr(Mt.relativeLuminance2(k,S,w),Mt.relativeLuminance2(p,y,v));return(k<<24|S<<16|w<<8|255)>>>0}e.increaseLuminance=a;function c(u){return[u>>24&255,u>>16&255,u>>8&255,u&255]}e.toChannels=c})(ua||(ua={}));function As(e){let t=e.toString(16);return t.length<2?"0"+t:t}function jr(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var yk=class extends jn{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},ga=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new or}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let i=[],n=t.translateToString(!0),a=0,c=0,u=0,f=t.getFg(0),g=t.getBg(0);for(let p=0;p<t.getTrimmedLength();p++)if(t.loadCell(p,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==f||this._workCell.bg!==g){if(p-a>1){let y=this._getJoinedRanges(n,u,c,t,a);for(let v=0;v<y.length;v++)i.push(y[v])}a=p,u=c,f=this._workCell.fg,g=this._workCell.bg}c+=this._workCell.getChars().length||_s.length}if(this._bufferService.cols-a>1){let p=this._getJoinedRanges(n,u,c,t,a);for(let y=0;y<p.length;y++)i.push(p[y])}return i}_getJoinedRanges(e,t,i,n,a){let c=e.substring(t,i),u=[];try{u=this._characterJoiners[0].handler(c)}catch(f){console.error(f)}for(let f=1;f<this._characterJoiners.length;f++)try{let g=this._characterJoiners[f].handler(c);for(let p=0;p<g.length;p++)ga._mergeRanges(u,g[p])}catch(g){console.error(g)}return this._stringRangesToCellRanges(u,n,a),u}_stringRangesToCellRanges(e,t,i){let n=0,a=!1,c=0,u=e[n];if(u){for(let f=i;f<this._bufferService.cols;f++){let g=t.getWidth(f),p=t.getString(f).length||_s.length;if(g!==0){if(!a&&u[0]<=c&&(u[0]=f,a=!0),u[1]<=c){if(u[1]=f,u=e[++n],!u)break;u[0]<=c?(u[0]=f,a=!0):a=!1}c+=p}}u&&(u[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let i=!1;for(let n=0;n<e.length;n++){let a=e[n];if(i){if(t[1]<=a[0])return e[n-1][1]=t[1],e;if(t[1]<=a[1])return e[n-1][1]=Math.max(t[1],a[1]),e.splice(n,1),e;e.splice(n,1),n--}else{if(t[1]<=a[0])return e.splice(n,0,t),e;if(t[1]<=a[1])return a[0]=Math.min(t[0],a[0]),e;t[0]<a[1]&&(a[0]=Math.min(t[0],a[0]),i=!0);continue}}return i?e[e.length-1][1]=t[1]:e.push(t),e}};ga=Ke([le(0,Rt)],ga);function Sk(e){return 57508<=e&&e<=57558}function wk(e){return 9472<=e&&e<=9631}function kk(e){return Sk(e)||wk(e)}function xk(){return{css:{canvas:ra(),cell:ra()},device:{canvas:ra(),cell:ra(),char:{width:0,height:0,left:0,top:0}}}}function ra(){return{width:0,height:0}}var fu=class{constructor(e,t,i,n,a,c,u){this._document=e,this._characterJoinerService=t,this._optionsService=i,this._coreBrowserService=n,this._coreService=a,this._decorationService=c,this._themeService=u,this._workCell=new or,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,i){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=i}createRow(e,t,i,n,a,c,u,f,g,p,y){let v=[],k=this._characterJoinerService.getJoinedCharacters(t),S=this._themeService.colors,w=e.getNoBgTrimmedLength();i&&w<c+1&&(w=c+1);let C,b=0,P="",j=0,E=0,M=0,R=0,Q=!1,J=0,q=!1,H=0,F=0,ee=[],$=p!==-1&&y!==-1;for(let z=0;z<w;z++){e.loadCell(z,this._workCell);let K=this._workCell.getWidth();if(K===0)continue;let X=!1,se=z>=F,ne=z,A=this._workCell;if(k.length>0&&z===k[0][0]&&se){let Ee=k.shift(),ks=this._isCellInSelection(Ee[0],t);for(j=Ee[0]+1;j<Ee[1];j++)se&&(se=ks===this._isCellInSelection(j,t));se&&(se=!i||c<Ee[0]||c>=Ee[1]),se?(X=!0,A=new yk(this._workCell,e.translateToString(!0,Ee[0],Ee[1]),Ee[1]-Ee[0]),ne=Ee[1]-1,K=A.getWidth()):F=Ee[1]}let oe=this._isCellInSelection(z,t),re=i&&z===c,T=$&&z>=p&&z<=y,U=!1;this._decorationService.forEachDecorationAtCell(z,t,void 0,Ee=>{U=!0});let pe=A.getChars()||_s;if(pe===" "&&(A.isUnderline()||A.isOverline())&&(pe=" "),H=K*f-g.get(pe,A.isBold(),A.isItalic()),!C)C=this._document.createElement("span");else if(b&&(oe&&q||!oe&&!q&&A.bg===E)&&(oe&&q&&S.selectionForeground||A.fg===M)&&A.extended.ext===R&&T===Q&&H===J&&!re&&!X&&!U&&se){A.isInvisible()?P+=_s:P+=pe,b++;continue}else b&&(C.textContent=P),C=this._document.createElement("span"),b=0,P="";if(E=A.bg,M=A.fg,R=A.extended.ext,Q=T,J=H,q=oe,X&&c>=z&&c<=ne&&(c=z),!this._coreService.isCursorHidden&&re&&this._coreService.isCursorInitialized){if(ee.push("xterm-cursor"),this._coreBrowserService.isFocused)u&&ee.push("xterm-cursor-blink"),ee.push(n==="bar"?"xterm-cursor-bar":n==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(a)switch(a){case"outline":ee.push("xterm-cursor-outline");break;case"block":ee.push("xterm-cursor-block");break;case"bar":ee.push("xterm-cursor-bar");break;case"underline":ee.push("xterm-cursor-underline");break}}if(A.isBold()&&ee.push("xterm-bold"),A.isItalic()&&ee.push("xterm-italic"),A.isDim()&&ee.push("xterm-dim"),A.isInvisible()?P=_s:P=A.getChars()||_s,A.isUnderline()&&(ee.push(`xterm-underline-${A.extended.underlineStyle}`),P===" "&&(P=" "),!A.isUnderlineColorDefault()))if(A.isUnderlineColorRGB())C.style.textDecorationColor=`rgb(${jn.toColorRGB(A.getUnderlineColor()).join(",")})`;else{let Ee=A.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&A.isBold()&&Ee<8&&(Ee+=8),C.style.textDecorationColor=S.ansi[Ee].css}A.isOverline()&&(ee.push("xterm-overline"),P===" "&&(P=" ")),A.isStrikethrough()&&ee.push("xterm-strikethrough"),T&&(C.style.textDecoration="underline");let ge=A.getFgColor(),W=A.getFgColorMode(),ae=A.getBgColor(),de=A.getBgColorMode(),_e=!!A.isInverse();if(_e){let Ee=ge;ge=ae,ae=Ee;let ks=W;W=de,de=ks}let ke,at,_r=!1;this._decorationService.forEachDecorationAtCell(z,t,void 0,Ee=>{Ee.options.layer!=="top"&&_r||(Ee.backgroundColorRGB&&(de=50331648,ae=Ee.backgroundColorRGB.rgba>>8&16777215,ke=Ee.backgroundColorRGB),Ee.foregroundColorRGB&&(W=50331648,ge=Ee.foregroundColorRGB.rgba>>8&16777215,at=Ee.foregroundColorRGB),_r=Ee.options.layer==="top")}),!_r&&oe&&(ke=this._coreBrowserService.isFocused?S.selectionBackgroundOpaque:S.selectionInactiveBackgroundOpaque,ae=ke.rgba>>8&16777215,de=50331648,_r=!0,S.selectionForeground&&(W=50331648,ge=S.selectionForeground.rgba>>8&16777215,at=S.selectionForeground)),_r&&ee.push("xterm-decoration-top");let ar;switch(de){case 16777216:case 33554432:ar=S.ansi[ae],ee.push(`xterm-bg-${ae}`);break;case 50331648:ar=et.toColor(ae>>16,ae>>8&255,ae&255),this._addStyle(C,`background-color:#${Am((ae>>>0).toString(16),"0",6)}`);break;case 0:default:_e?(ar=S.foreground,ee.push("xterm-bg-257")):ar=S.background}switch(ke||A.isDim()&&(ke=Oe.multiplyOpacity(ar,.5)),W){case 16777216:case 33554432:A.isBold()&&ge<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ge+=8),this._applyMinimumContrast(C,ar,S.ansi[ge],A,ke,void 0)||ee.push(`xterm-fg-${ge}`);break;case 50331648:let Ee=et.toColor(ge>>16&255,ge>>8&255,ge&255);this._applyMinimumContrast(C,ar,Ee,A,ke,at)||this._addStyle(C,`color:#${Am(ge.toString(16),"0",6)}`);break;case 0:default:this._applyMinimumContrast(C,ar,S.foreground,A,ke,at)||_e&&ee.push("xterm-fg-257")}ee.length&&(C.className=ee.join(" "),ee.length=0),!re&&!X&&!U&&se?b++:C.textContent=P,H!==this.defaultSpacing&&(C.style.letterSpacing=`${H}px`),v.push(C),z=ne}return C&&b&&(C.textContent=P),v}_applyMinimumContrast(e,t,i,n,a,c){if(this._optionsService.rawOptions.minimumContrastRatio===1||kk(n.getCode()))return!1;let u=this._getContrastCache(n),f;if(!a&&!c&&(f=u.getColor(t.rgba,i.rgba)),f===void 0){let g=this._optionsService.rawOptions.minimumContrastRatio/(n.isDim()?2:1);f=Oe.ensureContrastRatio(a||t,c||i,g),u.setColor((a||t).rgba,(c||i).rgba,f??null)}return f?(this._addStyle(e,`color:${f.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let i=this._selectionStart,n=this._selectionEnd;return!i||!n?!1:this._columnSelectMode?i[0]<=n[0]?e>=i[0]&&t>=i[1]&&e<n[0]&&t<=n[1]:e<i[0]&&t>=i[1]&&e>=n[0]&&t<=n[1]:t>i[1]&&t<n[1]||i[1]===n[1]&&t===i[1]&&e>=i[0]&&e<n[0]||i[1]<n[1]&&t===n[1]&&e<n[0]||i[1]<n[1]&&t===i[1]&&e>=i[0]}};fu=Ke([le(1,Wp),le(2,Lt),le(3,Wr),le(4,Us),le(5,Fn),le(6,Ci)],fu);function Am(e,t,i){for(;e.length<i;)e=t+e;return e}var Ck=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.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";let i=e.createElement("span");i.classList.add("xterm-char-measure-element");let n=e.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontWeight="bold";let a=e.createElement("span");a.classList.add("xterm-char-measure-element"),a.style.fontStyle="italic";let c=e.createElement("span");c.classList.add("xterm-char-measure-element"),c.style.fontWeight="bold",c.style.fontStyle="italic",this._measureElements=[i,n,a,c],this._container.appendChild(i),this._container.appendChild(n),this._container.appendChild(a),this._container.appendChild(c),t.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(e,t,i,n){e===this._font&&t===this._fontSize&&i===this._weight&&n===this._weightBold||(this._font=e,this._fontSize=t,this._weight=i,this._weightBold=n,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${i}`,this._measureElements[1].style.fontWeight=`${n}`,this._measureElements[2].style.fontWeight=`${i}`,this._measureElements[3].style.fontWeight=`${n}`,this.clear())}get(e,t,i){let n=0;if(!t&&!i&&e.length===1&&(n=e.charCodeAt(0))<256){if(this._flat[n]!==-9999)return this._flat[n];let u=this._measure(e,0);return u>0&&(this._flat[n]=u),u}let a=e;t&&(a+="B"),i&&(a+="I");let c=this._holey.get(a);if(c===void 0){let u=0;t&&(u|=1),i&&(u|=2),c=this._measure(e,u),c>0&&this._holey.set(a,c)}return c}_measure(e,t){let i=this._measureElements[t];return i.textContent=e.repeat(32),i.offsetWidth/32}},bk=class{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(e,t,i,n=!1){if(this.selectionStart=t,this.selectionEnd=i,!t||!i||t[0]===i[0]&&t[1]===i[1]){this.clear();return}let a=e.buffers.active.ydisp,c=t[1]-a,u=i[1]-a,f=Math.max(c,0),g=Math.min(u,e.rows-1);if(f>=e.rows||g<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=n,this.viewportStartRow=c,this.viewportEndRow=u,this.viewportCappedStartRow=f,this.viewportCappedEndRow=g,this.startCol=t[0],this.endCol=i[0]}isCellSelected(e,t,i){return this.hasSelection?(i-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&i>=this.viewportCappedStartRow&&t<this.endCol&&i<=this.viewportCappedEndRow:t<this.startCol&&i>=this.viewportCappedStartRow&&t>=this.endCol&&i<=this.viewportCappedEndRow:i>this.viewportStartRow&&i<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol):!1}};function Ek(){return new bk}var Rc="xterm-dom-renderer-owner-",rr="xterm-rows",sa="xterm-fg-",Om="xterm-bg-",_n="xterm-focus",ia="xterm-selection",Dk=1,mu=class extends Ce{constructor(e,t,i,n,a,c,u,f,g,p,y,v,k,S){super(),this._terminal=e,this._document=t,this._element=i,this._screenElement=n,this._viewportElement=a,this._helperContainer=c,this._linkifier2=u,this._charSizeService=g,this._optionsService=p,this._bufferService=y,this._coreService=v,this._coreBrowserService=k,this._themeService=S,this._terminalClass=Dk++,this._rowElements=[],this._selectionRenderModel=Ek(),this.onRequestRedraw=this._register(new ie).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(rr),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(ia),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=xk(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(w=>this._injectCss(w))),this._injectCss(this._themeService.colors),this._rowFactory=f.createInstance(fu,document),this._element.classList.add(Rc+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(w=>this._handleLinkHover(w))),this._register(this._linkifier2.onHideLinkUnderline(w=>this._handleLinkLeave(w))),this._register(je(()=>{this._element.classList.remove(Rc+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new Ck(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(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),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/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),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(let i of this._rowElements)i.style.width=`${this.dimensions.css.canvas.width}px`,i.style.height=`${this.dimensions.css.cell.height}px`,i.style.lineHeight=`${this.dimensions.css.cell.height}px`,i.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${rr} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,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(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${rr} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${rr} .xterm-dim { color: ${Oe.multiplyOpacity(e.foreground,.5).css};}`,t+=`${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;}`;let i=`blink_underline_${this._terminalClass}`,n=`blink_bar_${this._terminalClass}`,a=`blink_block_${this._terminalClass}`;t+=`@keyframes ${i} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${n} { 50% { box-shadow: none; }}`,t+=`@keyframes ${a} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${rr}.${_n} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${rr}.${_n} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${rr}.${_n} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${a} 1s step-end infinite;}${this._terminalSelector} .${rr} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${rr} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${rr} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${rr} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${rr} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${ia} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${ia} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${ia} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[c,u]of e.ansi.entries())t+=`${this._terminalSelector} .${sa}${c} { color: ${u.css}; }${this._terminalSelector} .${sa}${c}.xterm-dim { color: ${Oe.multiplyOpacity(u,.5).css}; }${this._terminalSelector} .${Om}${c} { background-color: ${u.css}; }`;t+=`${this._terminalSelector} .${sa}257 { color: ${Oe.opaque(e.background).css}; }${this._terminalSelector} .${sa}257.xterm-dim { color: ${Oe.multiplyOpacity(Oe.opaque(e.background),.5).css}; }${this._terminalSelector} .${Om}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let i=this._rowElements.length;i<=t;i++){let n=this._document.createElement("div");this._rowContainer.appendChild(n),this._rowElements.push(n)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),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(_n),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(_n),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,i){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,i),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,i),!this._selectionRenderModel.hasSelection))return;let n=this._selectionRenderModel.viewportStartRow,a=this._selectionRenderModel.viewportEndRow,c=this._selectionRenderModel.viewportCappedStartRow,u=this._selectionRenderModel.viewportCappedEndRow,f=this._document.createDocumentFragment();if(i){let g=e[0]>t[0];f.appendChild(this._createSelectionElement(c,g?t[0]:e[0],g?e[0]:t[0],u-c+1))}else{let g=n===c?e[0]:0,p=c===a?t[0]:this._bufferService.cols;f.appendChild(this._createSelectionElement(c,g,p));let y=u-c-1;if(f.appendChild(this._createSelectionElement(c+1,0,this._bufferService.cols,y)),c!==u){let v=a===u?t[0]:this._bufferService.cols;f.appendChild(this._createSelectionElement(u,0,v))}}this._selectionContainer.appendChild(f)}_createSelectionElement(e,t,i,n=1){let a=this._document.createElement("div"),c=t*this.dimensions.css.cell.width,u=this.dimensions.css.cell.width*(i-t);return c+u>this.dimensions.css.canvas.width&&(u=this.dimensions.css.canvas.width-c),a.style.height=`${n*this.dimensions.css.cell.height}px`,a.style.top=`${e*this.dimensions.css.cell.height}px`,a.style.left=`${c}px`,a.style.width=`${u}px`,a}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(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let i=this._bufferService.buffer,n=i.ybase+i.y,a=Math.min(i.x,this._bufferService.cols-1),c=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,u=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,f=this._optionsService.rawOptions.cursorInactiveStyle;for(let g=e;g<=t;g++){let p=g+i.ydisp,y=this._rowElements[g],v=i.lines.get(p);if(!y||!v)break;y.replaceChildren(...this._rowFactory.createRow(v,p,p===n,u,f,a,c,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${Rc}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,i,n,a,c){i<0&&(e=0),n<0&&(t=0);let u=this._bufferService.rows-1;i=Math.max(Math.min(i,u),0),n=Math.max(Math.min(n,u),0),a=Math.min(a,this._bufferService.cols);let f=this._bufferService.buffer,g=f.ybase+f.y,p=Math.min(f.x,a-1),y=this._optionsService.rawOptions.cursorBlink,v=this._optionsService.rawOptions.cursorStyle,k=this._optionsService.rawOptions.cursorInactiveStyle;for(let S=i;S<=n;++S){let w=S+f.ydisp,C=this._rowElements[S],b=f.lines.get(w);if(!C||!b)break;C.replaceChildren(...this._rowFactory.createRow(b,w,w===g,v,k,p,y,this.dimensions.css.cell.width,this._widthCache,c?S===i?e:0:-1,c?(S===n?t:a)-1:-1))}}};mu=Ke([le(7,Bu),le(8,ba),le(9,Lt),le(10,Rt),le(11,Us),le(12,Wr),le(13,Ci)],mu);var pu=class extends Ce{constructor(e,t,i){super(),this._optionsService=i,this.width=0,this.height=0,this._onCharSizeChange=this._register(new ie),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new Pk(this._optionsService))}catch{this._measureStrategy=this._register(new Nk(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};pu=Ke([le(2,Lt)],pu);var cg=class extends Ce{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},Nk=class extends cg{constructor(e,t,i){super(),this._document=e,this._parentElement=t,this._optionsService=i,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}},Pk=class extends cg{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},Mk=class extends Ce{constructor(e,t,i){super(),this._textarea=e,this._window=t,this.mainDocument=i,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new Tk(this._window)),this._onDprChange=this._register(new ie),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new ie),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(n=>this._screenDprMonitor.setWindow(n))),this._register(yt.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(we(this._textarea,"focus",()=>this._isFocused=!0)),this._register(we(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,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}},Tk=class extends Ce{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new wi),this._onDprChange=this._register(new ie),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(je(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=we(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var e;this._outerListener&&((e=this._resolutionMediaMatchList)==null||e.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)}},Rk=class extends Ce{constructor(){super(),this.linkProviders=[],this._register(je(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function Uu(e,t,i){let n=i.getBoundingClientRect(),a=e.getComputedStyle(i),c=parseInt(a.getPropertyValue("padding-left")),u=parseInt(a.getPropertyValue("padding-top"));return[t.clientX-n.left-c,t.clientY-n.top-u]}function Lk(e,t,i,n,a,c,u,f,g){if(!c)return;let p=Uu(e,t,i);if(p)return p[0]=Math.ceil((p[0]+(g?u/2:0))/u),p[1]=Math.ceil(p[1]/f),p[0]=Math.min(Math.max(p[0],1),n+(g?1:0)),p[1]=Math.min(Math.max(p[1],1),a),p}var gu=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,i,n,a){return Lk(window,e,t,i,n,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,a)}getMouseReportCoords(e,t){let i=Uu(window,e,t);if(this._charSizeService.hasValidSize)return i[0]=Math.min(Math.max(i[0],0),this._renderService.dimensions.css.canvas.width-1),i[1]=Math.min(Math.max(i[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(i[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(i[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(i[0]),y:Math.floor(i[1])}}};gu=Ke([le(0,Vr),le(1,ba)],gu);var Ik=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,i){this._rowCount=i,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!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){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},ug={};WS(ug,{getSafariVersion:()=>Ak,isChromeOS:()=>mg,isFirefox:()=>hg,isIpad:()=>Ok,isIphone:()=>zk,isLegacyEdge:()=>Bk,isLinux:()=>Wu,isMac:()=>_a,isNode:()=>Ea,isSafari:()=>dg,isWindows:()=>fg});var Ea=typeof process<"u"&&"title"in process,Hn=Ea?"node":navigator.userAgent,$n=Ea?"node":navigator.platform,hg=Hn.includes("Firefox"),Bk=Hn.includes("Edge"),dg=/^((?!chrome|android).)*safari/i.test(Hn);function Ak(){if(!dg)return 0;let e=Hn.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var _a=["Macintosh","MacIntel","MacPPC","Mac68K"].includes($n),Ok=$n==="iPad",zk=$n==="iPhone",fg=["Windows","Win16","Win32","WinCE"].includes($n),Wu=$n.indexOf("Linux")>=0,mg=/\bCrOS\b/.test(Hn),pg=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),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(e){this._idleCallback=void 0;let t=0,i=0,n=e.timeRemaining(),a=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),i=Math.max(t,i),a=e.timeRemaining(),i*1.5>a){n-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-t))}ms`),this._start();return}n=a}this.clear()}},jk=class extends pg{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},Fk=class extends pg{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},va=!Ea&&"requestIdleCallback"in window?Fk:jk,Hk=class{constructor(){this._queue=new va}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},_u=class extends Ce{constructor(e,t,i,n,a,c,u,f,g){super(),this._rowCount=e,this._optionsService=i,this._charSizeService=n,this._coreService=a,this._coreBrowserService=f,this._renderer=this._register(new wi),this._pausedResizeTask=new Hk,this._observerDisposable=this._register(new wi),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 ie),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new ie),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new ie),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new ie),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new Ik((p,y)=>this._renderRows(p,y),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new $k(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(je(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(u.onResize(()=>this._fullRefresh())),this._register(u.buffers.onBufferActivate(()=>{var p;return(p=this._renderer.value)==null?void 0:p.clear()})),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(c.onDecorationRegistered(()=>this._fullRefresh())),this._register(c.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(u.cols,u.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(u.buffer.y,u.buffer.y,!0))),this._register(g.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(p=>this._registerIntersectionObserver(p,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let i=new e.IntersectionObserver(n=>this._handleIntersectionChange(n[n.length-1]),{threshold:0});i.observe(t),this._observerDisposable.value=je(()=>i.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.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(e,t,i=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let n=this._syncOutputHandler.flush();n&&(e=Math.min(e,n.start),t=Math.max(t,n.end)),i||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,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(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var e,t;this._renderer.value&&((t=(e=this._renderer.value).clearTextureAtlas)==null||t.call(e),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var i;return(i=this._renderer.value)==null?void 0:i.handleResize(e,t)}):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){var e;(e=this._renderer.value)==null||e.handleCharSizeChanged()}handleBlur(){var e;(e=this._renderer.value)==null||e.handleBlur()}handleFocus(){var e;(e=this._renderer.value)==null||e.handleFocus()}handleSelectionChanged(e,t,i){var n;this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=i,(n=this._renderer.value)==null||n.handleSelectionChanged(e,t,i)}handleCursorMove(){var e;(e=this._renderer.value)==null||e.handleCursorMove()}clear(){var e;(e=this._renderer.value)==null||e.clear()}};_u=Ke([le(2,Lt),le(3,ba),le(4,Us),le(5,Fn),le(6,Rt),le(7,Wr),le(8,Ci)],_u);var $k=class{constructor(e,t,i){this._coreBrowserService=e,this._coreService=t,this._onTimeout=i,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function Uk(e,t,i,n){let a=i.buffer.x,c=i.buffer.y;if(!i.buffer.hasScrollback)return Kk(a,c,e,t,i,n)+Da(c,t,i,n)+qk(a,c,e,t,i,n);let u;if(c===t)return u=a>e?"D":"C",Rn(Math.abs(a-e),Tn(u,n));u=c>t?"D":"C";let f=Math.abs(c-t),g=Vk(c>t?e:a,i)+(f-1)*i.cols+1+Wk(c>t?a:e);return Rn(g,Tn(u,n))}function Wk(e,t){return e-1}function Vk(e,t){return t.cols-e}function Kk(e,t,i,n,a,c){return Da(t,n,a,c).length===0?"":Rn(_g(e,t,e,t-$s(t,a),!1,a).length,Tn("D",c))}function Da(e,t,i,n){let a=e-$s(e,i),c=t-$s(t,i),u=Math.abs(a-c)-Yk(e,t,i);return Rn(u,Tn(gg(e,t),n))}function qk(e,t,i,n,a,c){let u;Da(t,n,a,c).length>0?u=n-$s(n,a):u=t;let f=n,g=Gk(e,t,i,n,a,c);return Rn(_g(e,u,i,f,g==="C",a).length,Tn(g,c))}function Yk(e,t,i){var u;let n=0,a=e-$s(e,i),c=t-$s(t,i);for(let f=0;f<Math.abs(a-c);f++){let g=gg(e,t)==="A"?-1:1;(u=i.buffer.lines.get(a+g*f))!=null&&u.isWrapped&&n++}return n}function $s(e,t){let i=0,n=t.buffer.lines.get(e),a=n==null?void 0:n.isWrapped;for(;a&&e>=0&&e<t.rows;)i++,n=t.buffer.lines.get(--e),a=n==null?void 0:n.isWrapped;return i}function Gk(e,t,i,n,a,c){let u;return Da(i,n,a,c).length>0?u=n-$s(n,a):u=t,e<i&&u<=n||e>=i&&u<n?"C":"D"}function gg(e,t){return e>t?"A":"B"}function _g(e,t,i,n,a,c){let u=e,f=t,g="";for(;(u!==i||f!==n)&&f>=0&&f<c.buffer.lines.length;)u+=a?1:-1,a&&u>c.cols-1?(g+=c.buffer.translateBufferLineToString(f,!1,e,u),u=0,e=0,f++):!a&&u<0&&(g+=c.buffer.translateBufferLineToString(f,!1,0,e+1),u=c.cols-1,e=u,f--);return g+c.buffer.translateBufferLineToString(f,!1,e,u)}function Tn(e,t){let i=t?"O":"[";return V.ESC+i+e}function Rn(e,t){e=Math.floor(e);let i="";for(let n=0;n<e;n++)i+=t;return i}var Xk=class{constructor(e){this._bufferService=e,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.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()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function zm(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var Lc=50,Zk=15,Qk=50,Jk=500,e0=" ",t0=new RegExp(e0,"g"),vu=class extends Ce{constructor(e,t,i,n,a,c,u,f,g){super(),this._element=e,this._screenElement=t,this._linkifier=i,this._bufferService=n,this._coreService=a,this._mouseService=c,this._optionsService=u,this._renderService=f,this._coreBrowserService=g,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new or,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new ie),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new ie),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new ie),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new ie),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=p=>this._handleMouseMove(p),this._mouseUpListener=p=>this._handleMouseUp(p),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(p=>this._handleTrim(p)),this._register(this._bufferService.buffers.onBufferActivate(p=>this._handleBufferActivate(p))),this.enable(),this._model=new Xk(this._bufferService),this._activeSelectionMode=0,this._register(je(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(p=>{p.rowsChanged&&this.clearSelection()}))}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(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let i=this._bufferService.buffer,n=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let a=e[0]<t[0]?e[0]:t[0],c=e[0]<t[0]?t[0]:e[0];for(let u=e[1];u<=t[1];u++){let f=i.translateBufferLineToString(u,!0,a,c);n.push(f)}}else{let a=e[1]===t[1]?t[0]:void 0;n.push(i.translateBufferLineToString(e[1],!0,e[0],a));for(let c=e[1]+1;c<=t[1]-1;c++){let u=i.lines.get(c),f=i.translateBufferLineToString(c,!0);u!=null&&u.isWrapped?n[n.length-1]+=f:n.push(f)}if(e[1]!==t[1]){let c=i.lines.get(t[1]),u=i.translateBufferLineToString(t[1],!0,0,t[0]);c&&c.isWrapped?n[n.length-1]+=u:n.push(u)}}return n.map(a=>a.replace(t0," ")).join(fg?`\r
63
+ `:`
64
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),Wu&&e&&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(e){let t=this._getMouseBufferCoords(e),i=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!i||!n||!t?!1:this._areCoordsInSelection(t,i,n)}isCellInSelection(e,t){let i=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!i||!n?!1:this._areCoordsInSelection([e,t],i,n)}_areCoordsInSelection(e,t,i){return e[1]>t[1]&&e[1]<i[1]||t[1]===i[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<i[0]||t[1]<i[1]&&e[1]===i[1]&&e[0]<i[0]||t[1]<i[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){var a,c;let i=(c=(a=this._linkifier.currentLink)==null?void 0:a.link)==null?void 0:c.range;if(i)return this._model.selectionStart=[i.start.x-1,i.start.y-1],this._model.selectionStartLength=zm(i,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let n=this._getMouseBufferCoords(e);return n?(this._selectWordAt(n,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=Uu(this._coreBrowserService.window,e,this._screenElement)[1],i=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=i?0:(t>i&&(t-=i),t=Math.min(Math.max(t,-Lc),Lc),t/=Lc,t/Math.abs(t)+Math.round(t*(Zk-1)))}shouldForceSelection(e){return _a?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),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(),Qk)}_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(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(_a&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}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(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let i=this._bufferService.buffer;if(this._model.selectionEnd[1]<i.lines.length){let n=i.lines.get(this._model.selectionEnd[1]);n&&n.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[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});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<Jk&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let i=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(i&&i[0]!==void 0&&i[1]!==void 0){let n=Uk(i[0]-1,i[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(n,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,i=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!i){this._oldHasSelection&&this._fireOnSelectionChange(e,t,i);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,i)}_fireOnSelectionChange(e,t,i){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=i,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let i=t;for(let n=0;t>=n;n++){let a=e.loadCell(n,this._workCell).getChars().length;this._workCell.getWidth()===0?i--:a>1&&t!==n&&(i+=a-1)}return i}setSelection(e,t,i){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=i,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,i=!0,n=!0){if(e[0]>=this._bufferService.cols)return;let a=this._bufferService.buffer,c=a.lines.get(e[1]);if(!c)return;let u=a.translateBufferLineToString(e[1],!1),f=this._convertViewportColToCharacterIndex(c,e[0]),g=f,p=e[0]-f,y=0,v=0,k=0,S=0;if(u.charAt(f)===" "){for(;f>0&&u.charAt(f-1)===" ";)f--;for(;g<u.length&&u.charAt(g+1)===" ";)g++}else{let b=e[0],P=e[0];c.getWidth(b)===0&&(y++,b--),c.getWidth(P)===2&&(v++,P++);let j=c.getString(P).length;for(j>1&&(S+=j-1,g+=j-1);b>0&&f>0&&!this._isCharWordSeparator(c.loadCell(b-1,this._workCell));){c.loadCell(b-1,this._workCell);let E=this._workCell.getChars().length;this._workCell.getWidth()===0?(y++,b--):E>1&&(k+=E-1,f-=E-1),f--,b--}for(;P<c.length&&g+1<u.length&&!this._isCharWordSeparator(c.loadCell(P+1,this._workCell));){c.loadCell(P+1,this._workCell);let E=this._workCell.getChars().length;this._workCell.getWidth()===2?(v++,P++):E>1&&(S+=E-1,g+=E-1),g++,P++}}g++;let w=f+p-y+k,C=Math.min(this._bufferService.cols,g-f+y+v-k-S);if(!(!t&&u.slice(f,g).trim()==="")){if(i&&w===0&&c.getCodePoint(0)!==32){let b=a.lines.get(e[1]-1);if(b&&c.isWrapped&&b.getCodePoint(this._bufferService.cols-1)!==32){let P=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(P){let j=this._bufferService.cols-P.start;w-=j,C+=j}}}if(n&&w+C===this._bufferService.cols&&c.getCodePoint(this._bufferService.cols-1)!==32){let b=a.lines.get(e[1]+1);if(b!=null&&b.isWrapped&&b.getCodePoint(0)!==32){let P=this._getWordAt([0,e[1]+1],!1,!1,!0);P&&(C+=P.length)}}return{start:w,length:C}}}_selectWordAt(e,t){let i=this._getWordAt(e,t);if(i){for(;i.start<0;)i.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[i.start,e[1]],this._model.selectionStartLength=i.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let i=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,i--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,i++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,i]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),i={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=zm(i,this._bufferService.cols)}};vu=Ke([le(3,Rt),le(4,Us),le(5,Au),le(6,Lt),le(7,Vr),le(8,Wr)],vu);var jm=class{constructor(){this._data={}}set(e,t,i){this._data[e]||(this._data[e]={}),this._data[e][t]=i}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},Fm=class{constructor(){this._color=new jm,this._css=new jm}setCss(e,t,i){this._css.set(e,t,i)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,i){this._color.set(e,t,i)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},it=Object.freeze((()=>{let e=[Ue.toColor("#2e3436"),Ue.toColor("#cc0000"),Ue.toColor("#4e9a06"),Ue.toColor("#c4a000"),Ue.toColor("#3465a4"),Ue.toColor("#75507b"),Ue.toColor("#06989a"),Ue.toColor("#d3d7cf"),Ue.toColor("#555753"),Ue.toColor("#ef2929"),Ue.toColor("#8ae234"),Ue.toColor("#fce94f"),Ue.toColor("#729fcf"),Ue.toColor("#ad7fa8"),Ue.toColor("#34e2e2"),Ue.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let i=0;i<216;i++){let n=t[i/36%6|0],a=t[i/6%6|0],c=t[i%6];e.push({css:et.toCss(n,a,c),rgba:et.toRgba(n,a,c)})}for(let i=0;i<24;i++){let n=8+i*10;e.push({css:et.toCss(n,n,n),rgba:et.toRgba(n,n,n)})}return e})()),Os=Ue.toColor("#ffffff"),Cn=Ue.toColor("#000000"),Hm=Ue.toColor("#ffffff"),$m=Cn,vn={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},r0=Os,yu=class extends Ce{constructor(e){super(),this._optionsService=e,this._contrastCache=new Fm,this._halfContrastCache=new Fm,this._onChangeColors=this._register(new ie),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:Os,background:Cn,cursor:Hm,cursorAccent:$m,selectionForeground:void 0,selectionBackgroundTransparent:vn,selectionBackgroundOpaque:Oe.blend(Cn,vn),selectionInactiveBackgroundTransparent:vn,selectionInactiveBackgroundOpaque:Oe.blend(Cn,vn),scrollbarSliderBackground:Oe.opacity(Os,.2),scrollbarSliderHoverBackground:Oe.opacity(Os,.4),scrollbarSliderActiveBackground:Oe.opacity(Os,.5),overviewRulerBorder:Os,ansi:it.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)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=Re(e.foreground,Os),t.background=Re(e.background,Cn),t.cursor=Oe.blend(t.background,Re(e.cursor,Hm)),t.cursorAccent=Oe.blend(t.background,Re(e.cursorAccent,$m)),t.selectionBackgroundTransparent=Re(e.selectionBackground,vn),t.selectionBackgroundOpaque=Oe.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=Re(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=Oe.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?Re(e.selectionForeground,Bm):void 0,t.selectionForeground===Bm&&(t.selectionForeground=void 0),Oe.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=Oe.opacity(t.selectionBackgroundTransparent,.3)),Oe.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=Oe.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=Re(e.scrollbarSliderBackground,Oe.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=Re(e.scrollbarSliderHoverBackground,Oe.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=Re(e.scrollbarSliderActiveBackground,Oe.opacity(t.foreground,.5)),t.overviewRulerBorder=Re(e.overviewRulerBorder,r0),t.ansi=it.slice(),t.ansi[0]=Re(e.black,it[0]),t.ansi[1]=Re(e.red,it[1]),t.ansi[2]=Re(e.green,it[2]),t.ansi[3]=Re(e.yellow,it[3]),t.ansi[4]=Re(e.blue,it[4]),t.ansi[5]=Re(e.magenta,it[5]),t.ansi[6]=Re(e.cyan,it[6]),t.ansi[7]=Re(e.white,it[7]),t.ansi[8]=Re(e.brightBlack,it[8]),t.ansi[9]=Re(e.brightRed,it[9]),t.ansi[10]=Re(e.brightGreen,it[10]),t.ansi[11]=Re(e.brightYellow,it[11]),t.ansi[12]=Re(e.brightBlue,it[12]),t.ansi[13]=Re(e.brightMagenta,it[13]),t.ansi[14]=Re(e.brightCyan,it[14]),t.ansi[15]=Re(e.brightWhite,it[15]),e.extendedAnsi){let i=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let n=0;n<i;n++)t.ansi[n+16]=Re(e.extendedAnsi[n],it[n+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};yu=Ke([le(0,Lt)],yu);function Re(e,t){if(e!==void 0)try{return Ue.toColor(e)}catch{}return t}var s0=class{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){let i=this._entries.get(e);return this._entries.set(e,t),i}forEach(e){for(let[t,i]of this._entries.entries())e(t,i)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},i0=class{constructor(){this._services=new s0,this._services.set(Bu,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let i=ZS(e).sort((c,u)=>c.index-u.index),n=[];for(let c of i){let u=this._services.get(c.id);if(!u)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${c.id._id}.`);n.push(u)}let a=i.length>0?i[0].index:t.length;if(t.length!==a)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${a+1} conflicts with ${t.length} static arguments`);return new e(...t,...n)}},n0={trace:0,debug:1,info:2,warn:3,error:4,off:5},o0="xterm.js: ",Su=class extends Ce{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=n0[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":o0)+t,...i)}trace(e,...t){var i;this._logLevel<=0&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.trace.bind(this._optionsService.options.logger))??console.log,e,t)}debug(e,...t){var i;this._logLevel<=1&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.debug.bind(this._optionsService.options.logger))??console.log,e,t)}info(e,...t){var i;this._logLevel<=2&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.info.bind(this._optionsService.options.logger))??console.info,e,t)}warn(e,...t){var i;this._logLevel<=3&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.warn.bind(this._optionsService.options.logger))??console.warn,e,t)}error(e,...t){var i;this._logLevel<=4&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.error.bind(this._optionsService.options.logger))??console.error,e,t)}};Su=Ke([le(0,Lt)],Su);var Um=class extends Ce{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new ie),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new ie),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new ie),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let i=0;i<Math.min(e,this.length);i++)t[i]=this._array[this._getCyclicIndex(i)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,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(e,t,...i){if(t){for(let n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let n=this._length-1;n>=e;n--)this._array[this._getCyclicIndex(n+i.length)]=this._array[this._getCyclicIndex(n)];for(let n=0;n<i.length;n++)this._array[this._getCyclicIndex(e+n)]=i[n];if(i.length&&this.onInsertEmitter.fire({index:e,amount:i.length}),this._length+i.length>this._maxLength){let n=this._length+i.length-this._maxLength;this._startIndex+=n,this._length=this._maxLength,this.onTrimEmitter.fire(n)}else this._length+=i.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,i){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(i>0){for(let a=t-1;a>=0;a--)this.set(e+a+i,this.get(e+a));let n=e+t+i-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let n=0;n<t;n++)this.set(e+n+i,this.get(e+n))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},xe=3,Je=Object.freeze(new jn),na=0,Ic=2,bn=class vg{constructor(t,i,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*xe);let a=i||or.fromCharData([0,Op,1,0]);for(let c=0;c<t;++c)this.setCell(c,a);this.length=t}get(t){let i=this._data[t*xe+0],n=i&2097151;return[this._data[t*xe+1],i&2097152?this._combined[t]:n?ps(n):"",i>>22,i&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):n]}set(t,i){this._data[t*xe+1]=i[0],i[1].length>1?(this._combined[t]=i[1],this._data[t*xe+0]=t|2097152|i[2]<<22):this._data[t*xe+0]=i[1].charCodeAt(0)|i[2]<<22}getWidth(t){return this._data[t*xe+0]>>22}hasWidth(t){return this._data[t*xe+0]&12582912}getFg(t){return this._data[t*xe+1]}getBg(t){return this._data[t*xe+2]}hasContent(t){return this._data[t*xe+0]&4194303}getCodePoint(t){let i=this._data[t*xe+0];return i&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):i&2097151}isCombined(t){return this._data[t*xe+0]&2097152}getString(t){let i=this._data[t*xe+0];return i&2097152?this._combined[t]:i&2097151?ps(i&2097151):""}isProtected(t){return this._data[t*xe+2]&536870912}loadCell(t,i){return na=t*xe,i.content=this._data[na+0],i.fg=this._data[na+1],i.bg=this._data[na+2],i.content&2097152&&(i.combinedData=this._combined[t]),i.bg&268435456&&(i.extended=this._extendedAttrs[t]),i}setCell(t,i){i.content&2097152&&(this._combined[t]=i.combinedData),i.bg&268435456&&(this._extendedAttrs[t]=i.extended),this._data[t*xe+0]=i.content,this._data[t*xe+1]=i.fg,this._data[t*xe+2]=i.bg}setCellFromCodepoint(t,i,n,a){a.bg&268435456&&(this._extendedAttrs[t]=a.extended),this._data[t*xe+0]=i|n<<22,this._data[t*xe+1]=a.fg,this._data[t*xe+2]=a.bg}addCodepointToCell(t,i,n){let a=this._data[t*xe+0];a&2097152?this._combined[t]+=ps(i):a&2097151?(this._combined[t]=ps(a&2097151)+ps(i),a&=-2097152,a|=2097152):a=i|1<<22,n&&(a&=-12582913,a|=n<<22),this._data[t*xe+0]=a}insertCells(t,i,n){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),i<this.length-t){let a=new or;for(let c=this.length-t-i-1;c>=0;--c)this.setCell(t+i+c,this.loadCell(t+c,a));for(let c=0;c<i;++c)this.setCell(t+c,n)}else for(let a=t;a<this.length;++a)this.setCell(a,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(t,i,n){if(t%=this.length,i<this.length-t){let a=new or;for(let c=0;c<this.length-t-i;++c)this.setCell(t+c,this.loadCell(t+i+c,a));for(let c=this.length-i;c<this.length;++c)this.setCell(c,n)}else for(let a=t;a<this.length;++a)this.setCell(a,n);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,n)}replaceCells(t,i,n,a=!1){if(a){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,n),i<this.length&&this.getWidth(i-1)===2&&!this.isProtected(i)&&this.setCellFromCodepoint(i,0,1,n);t<i&&t<this.length;)this.isProtected(t)||this.setCell(t,n),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),i<this.length&&this.getWidth(i-1)===2&&this.setCellFromCodepoint(i,0,1,n);t<i&&t<this.length;)this.setCell(t++,n)}resize(t,i){if(t===this.length)return this._data.length*4*Ic<this._data.buffer.byteLength;let n=t*xe;if(t>this.length){if(this._data.buffer.byteLength>=n*4)this._data=new Uint32Array(this._data.buffer,0,n);else{let a=new Uint32Array(n);a.set(this._data),this._data=a}for(let a=this.length;a<t;++a)this.setCell(a,i)}else{this._data=this._data.subarray(0,n);let a=Object.keys(this._combined);for(let u=0;u<a.length;u++){let f=parseInt(a[u],10);f>=t&&delete this._combined[f]}let c=Object.keys(this._extendedAttrs);for(let u=0;u<c.length;u++){let f=parseInt(c[u],10);f>=t&&delete this._extendedAttrs[f]}}return this.length=t,n*4*Ic<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*Ic<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,i=!1){if(i){for(let n=0;n<this.length;++n)this.isProtected(n)||this.setCell(n,t);return}this._combined={},this._extendedAttrs={};for(let n=0;n<this.length;++n)this.setCell(n,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let i in t._combined)this._combined[i]=t._combined[i];this._extendedAttrs={};for(let i in t._extendedAttrs)this._extendedAttrs[i]=t._extendedAttrs[i];this.isWrapped=t.isWrapped}clone(){let t=new vg(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let i in this._combined)t._combined[i]=this._combined[i];for(let i in this._extendedAttrs)t._extendedAttrs[i]=this._extendedAttrs[i];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*xe+0]&4194303)return t+(this._data[t*xe+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*xe+0]&4194303||this._data[t*xe+2]&50331648)return t+(this._data[t*xe+0]>>22);return 0}copyCellsFrom(t,i,n,a,c){let u=t._data;if(c)for(let g=a-1;g>=0;g--){for(let p=0;p<xe;p++)this._data[(n+g)*xe+p]=u[(i+g)*xe+p];u[(i+g)*xe+2]&268435456&&(this._extendedAttrs[n+g]=t._extendedAttrs[i+g])}else for(let g=0;g<a;g++){for(let p=0;p<xe;p++)this._data[(n+g)*xe+p]=u[(i+g)*xe+p];u[(i+g)*xe+2]&268435456&&(this._extendedAttrs[n+g]=t._extendedAttrs[i+g])}let f=Object.keys(t._combined);for(let g=0;g<f.length;g++){let p=parseInt(f[g],10);p>=i&&(this._combined[p-i+n]=t._combined[p])}}translateToString(t,i,n,a){i=i??0,n=n??this.length,t&&(n=Math.min(n,this.getTrimmedLength())),a&&(a.length=0);let c="";for(;i<n;){let u=this._data[i*xe+0],f=u&2097151,g=u&2097152?this._combined[i]:f?ps(f):_s;if(c+=g,a)for(let p=0;p<g.length;++p)a.push(i);i+=u>>22||1}return a&&a.push(i),c}};function a0(e,t,i,n,a,c){let u=[];for(let f=0;f<e.length-1;f++){let g=f,p=e.get(++g);if(!p.isWrapped)continue;let y=[e.get(f)];for(;g<e.length&&p.isWrapped;)y.push(p),p=e.get(++g);if(!c&&n>=f&&n<g){f+=y.length-1;continue}let v=0,k=Ln(y,v,t),S=1,w=0;for(;S<y.length;){let b=Ln(y,S,t),P=b-w,j=i-k,E=Math.min(P,j);y[v].copyCellsFrom(y[S],w,k,E,!1),k+=E,k===i&&(v++,k=0),w+=E,w===b&&(S++,w=0),k===0&&v!==0&&y[v-1].getWidth(i-1)===2&&(y[v].copyCellsFrom(y[v-1],i-1,k++,1,!1),y[v-1].setCell(i-1,a))}y[v].replaceCells(k,i,a);let C=0;for(let b=y.length-1;b>0&&(b>v||y[b].getTrimmedLength()===0);b--)C++;C>0&&(u.push(f+y.length-C),u.push(C)),f+=y.length-1}return u}function l0(e,t){let i=[],n=0,a=t[n],c=0;for(let u=0;u<e.length;u++)if(a===u){let f=t[++n];e.onDeleteEmitter.fire({index:u-c,amount:f}),u+=f-1,c+=f,a=t[++n]}else i.push(u);return{layout:i,countRemoved:c}}function c0(e,t){let i=[];for(let n=0;n<t.length;n++)i.push(e.get(t[n]));for(let n=0;n<i.length;n++)e.set(n,i[n]);e.length=t.length}function u0(e,t,i){let n=[],a=e.map((g,p)=>Ln(e,p,t)).reduce((g,p)=>g+p),c=0,u=0,f=0;for(;f<a;){if(a-f<i){n.push(a-f);break}c+=i;let g=Ln(e,u,t);c>g&&(c-=g,u++);let p=e[u].getWidth(c-1)===2;p&&c--;let y=p?i-1:i;n.push(y),f+=y}return n}function Ln(e,t,i){if(t===e.length-1)return e[t].getTrimmedLength();let n=!e[t].hasContent(i-1)&&e[t].getWidth(i-1)===1,a=e[t+1].getWidth(0)===2;return n&&a?i-1:i}var yg=class Sg{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=Sg._nextId++,this._onDispose=this.register(new ie),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),Hs(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};yg._nextId=1;var h0=yg,ot={},zs=ot.B;ot[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:"≥","{":"π","|":"≠","}":"£","~":"·"};ot.A={"#":"£"};ot.B=void 0;ot[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"};ot.C=ot[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};ot.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"};ot.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"};ot.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"};ot.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"};ot.E=ot[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"};ot.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"};ot.H=ot[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};ot["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"};var Wm=4294967295,Vm=class{constructor(e,t,i){this._hasScrollback=e,this._optionsService=t,this._bufferService=i,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=Je.clone(),this.savedCharset=zs,this.markers=[],this._nullCell=or.fromCharData([0,Op,1,0]),this._whitespaceCell=or.fromCharData([0,_s,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new va,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new Um(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new ma),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new ma),this._whitespaceCell}getBlankLine(e,t){return new bn(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>Wm?Wm:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=Je);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new Um(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let i=this.getNullCell(Je),n=0,a=this._getCorrectBufferLength(t);if(a>this.lines.maxLength&&(this.lines.maxLength=a),this.lines.length>0){if(this._cols<e)for(let u=0;u<this.lines.length;u++)n+=+this.lines.get(u).resize(e,i);let c=0;if(this._rows<t)for(let u=this._rows;u<t;u++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new bn(e,i)):this.ybase>0&&this.lines.length<=this.ybase+this.y+c+1?(this.ybase--,c++,this.ydisp>0&&this.ydisp--):this.lines.push(new bn(e,i)));else for(let u=this._rows;u>t;u--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(a<this.lines.maxLength){let u=this.lines.length-a;u>0&&(this.lines.trimStart(u),this.ybase=Math.max(this.ybase-u,0),this.ydisp=Math.max(this.ydisp-u,0),this.savedY=Math.max(this.savedY-u,0)),this.lines.maxLength=a}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),c&&(this.y+=c),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let c=0;c<this.lines.length;c++)n+=+this.lines.get(c).resize(e,i);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),n>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let i=this._optionsService.rawOptions.reflowCursorLine,n=a0(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(Je),i);if(n.length>0){let a=l0(this.lines,n);c0(this.lines,a.layout),this._reflowLargerAdjustViewport(e,t,a.countRemoved)}}_reflowLargerAdjustViewport(e,t,i){let n=this.getNullCell(Je),a=i;for(;a-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new bn(e,n))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-i,0)}_reflowSmaller(e,t){let i=this._optionsService.rawOptions.reflowCursorLine,n=this.getNullCell(Je),a=[],c=0;for(let u=this.lines.length-1;u>=0;u--){let f=this.lines.get(u);if(!f||!f.isWrapped&&f.getTrimmedLength()<=e)continue;let g=[f];for(;f.isWrapped&&u>0;)f=this.lines.get(--u),g.unshift(f);if(!i){let E=this.ybase+this.y;if(E>=u&&E<u+g.length)continue}let p=g[g.length-1].getTrimmedLength(),y=u0(g,this._cols,e),v=y.length-g.length,k;this.ybase===0&&this.y!==this.lines.length-1?k=Math.max(0,this.y-this.lines.maxLength+v):k=Math.max(0,this.lines.length-this.lines.maxLength+v);let S=[];for(let E=0;E<v;E++){let M=this.getBlankLine(Je,!0);S.push(M)}S.length>0&&(a.push({start:u+g.length+c,newLines:S}),c+=S.length),g.push(...S);let w=y.length-1,C=y[w];C===0&&(w--,C=y[w]);let b=g.length-v-1,P=p;for(;b>=0;){let E=Math.min(P,C);if(g[w]===void 0)break;if(g[w].copyCellsFrom(g[b],P-E,C-E,E,!0),C-=E,C===0&&(w--,C=y[w]),P-=E,P===0){b--;let M=Math.max(b,0);P=Ln(g,M,this._cols)}}for(let E=0;E<g.length;E++)y[E]<e&&g[E].setCell(y[E],n);let j=v-k;for(;j-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+c)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+v,this.ybase+t-1)}if(a.length>0){let u=[],f=[];for(let C=0;C<this.lines.length;C++)f.push(this.lines.get(C));let g=this.lines.length,p=g-1,y=0,v=a[y];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+c);let k=0;for(let C=Math.min(this.lines.maxLength-1,g+c-1);C>=0;C--)if(v&&v.start>p+k){for(let b=v.newLines.length-1;b>=0;b--)this.lines.set(C--,v.newLines[b]);C++,u.push({index:p+1,amount:v.newLines.length}),k+=v.newLines.length,v=a[++y]}else this.lines.set(C,f[p--]);let S=0;for(let C=u.length-1;C>=0;C--)u[C].index+=S,this.lines.onInsertEmitter.fire(u[C]),S+=u[C].amount;let w=Math.max(0,g+c-this.lines.maxLength);w>0&&this.lines.onTrimEmitter.fire(w)}}translateBufferLineToString(e,t,i=0,n){let a=this.lines.get(e);return a?a.translateToString(t,i,n):""}getWrappedRangeForLine(e){let t=e,i=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;i+1<this.lines.length&&this.lines.get(i+1).isWrapped;)i++;return{first:t,last:i}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new h0(e);return this.markers.push(t),t.register(this.lines.onTrim(i=>{t.line-=i,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(i=>{t.line>=i.index&&(t.line+=i.amount)})),t.register(this.lines.onDelete(i=>{t.line>=i.index&&t.line<i.index+i.amount&&t.dispose(),t.line>i.index&&(t.line-=i.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},d0=class extends Ce{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new ie),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 Vm(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new Vm(!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(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),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(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},wg=2,kg=1,wu=class extends Ce{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new ie),this.onResize=this._onResize.event,this._onScroll=this._register(new ie),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,wg),this.rows=Math.max(e.rawOptions.rows||0,kg),this.buffers=this._register(new d0(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let i=this.cols!==e,n=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:i,rowsChanged:n})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let i=this.buffer,n;n=this._cachedBlankLine,(!n||n.length!==this.cols||n.getFg(0)!==e.fg||n.getBg(0)!==e.bg)&&(n=i.getBlankLine(e,t),this._cachedBlankLine=n),n.isWrapped=t;let a=i.ybase+i.scrollTop,c=i.ybase+i.scrollBottom;if(i.scrollTop===0){let u=i.lines.isFull;c===i.lines.length-1?u?i.lines.recycle().copyFrom(n):i.lines.push(n.clone()):i.lines.splice(c+1,0,n.clone()),u?this.isUserScrolling&&(i.ydisp=Math.max(i.ydisp-1,0)):(i.ybase++,this.isUserScrolling||i.ydisp++)}else{let u=c-a+1;i.lines.shiftElements(a+1,u-1,-1),i.lines.set(c,n.clone())}this.isUserScrolling||(i.ydisp=i.ybase),this._onScroll.fire(i.ydisp)}scrollLines(e,t){let i=this.buffer;if(e<0){if(i.ydisp===0)return;this.isUserScrolling=!0}else e+i.ydisp>=i.ybase&&(this.isUserScrolling=!1);let n=i.ydisp;i.ydisp=Math.max(Math.min(i.ydisp+e,i.ybase),0),n!==i.ydisp&&(t||this._onScroll.fire(i.ydisp))}};wu=Ke([le(0,Lt)],wu);var gi={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:_a,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},f0=["normal","bold","100","200","300","400","500","600","700","800","900"],m0=class extends Ce{constructor(e){super(),this._onOptionChange=this._register(new ie),this.onOptionChange=this._onOptionChange.event;let t={...gi};for(let i in e)if(i in t)try{let n=e[i];t[i]=this._sanitizeAndValidateOption(i,n)}catch(n){console.error(n)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(je(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(i=>{i===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(i=>{e.indexOf(i)!==-1&&t()})}_setupOptions(){let e=i=>{if(!(i in gi))throw new Error(`No option with key "${i}"`);return this.rawOptions[i]},t=(i,n)=>{if(!(i in gi))throw new Error(`No option with key "${i}"`);n=this._sanitizeAndValidateOption(i,n),this.rawOptions[i]!==n&&(this.rawOptions[i]=n,this._onOptionChange.fire(i))};for(let i in this.rawOptions){let n={get:e.bind(this,i),set:t.bind(this,i)};Object.defineProperty(this.options,i,n)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=gi[e]),!p0(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=gi[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=f0.includes(t)?t:gi[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function p0(e){return e==="block"||e==="underline"||e==="bar"}function En(e,t=5){if(typeof e!="object")return e;let i=Array.isArray(e)?[]:{};for(let n in e)i[n]=t<=1?e[n]:e[n]&&En(e[n],t-1);return i}var Km=Object.freeze({insertMode:!1}),qm=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),ku=class extends Ce{constructor(e,t,i){super(),this._bufferService=e,this._logService=t,this._optionsService=i,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new ie),this.onData=this._onData.event,this._onUserInput=this._register(new ie),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new ie),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new ie),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=En(Km),this.decPrivateModes=En(qm)}reset(){this.modes=En(Km),this.decPrivateModes=En(qm)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let i=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&i.ybase!==i.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(n=>n.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};ku=Ke([le(0,Rt),le(1,$p),le(2,Lt)],ku);var Ym={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function Bc(e,t){let i=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(i|=64,i|=e.action):(i|=e.button&3,e.button&4&&(i|=64),e.button&8&&(i|=128),e.action===32?i|=32:e.action===0&&!t&&(i|=3)),i}var Ac=String.fromCharCode,Gm={DEFAULT:e=>{let t=[Bc(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${Ac(t[0])}${Ac(t[1])}${Ac(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${Bc(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${Bc(e,!0)};${e.x};${e.y}${t}`}},xu=class extends Ce{constructor(e,t,i){super(),this._bufferService=e,this._coreService=t,this._optionsService=i,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new ie),this.onProtocolChange=this._onProtocolChange.event;for(let n of Object.keys(Ym))this.addProtocol(n,Ym[n]);for(let n of Object.keys(Gm))this.addEncoding(n,Gm[n]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,i){if(e.deltaY===0||e.shiftKey||t===void 0||i===void 0)return 0;let n=t/i,a=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(a/=n+0,Math.abs(e.deltaY)<50&&(a*=.3),this._wheelPartialScroll+=a,a=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._bufferService.rows),a}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,i){if(i){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};xu=Ke([le(0,Rt),le(1,Us),le(2,Lt)],xu);var Oc=[[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]],g0=[[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]],nt;function _0(e,t){let i=0,n=t.length-1,a;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=i;)if(a=i+n>>1,e>t[a][1])i=a+1;else if(e<t[a][0])n=a-1;else return!0;return!1}var v0=class{constructor(){if(this.version="6",!nt){nt=new Uint8Array(65536),nt.fill(1),nt[0]=0,nt.fill(0,1,32),nt.fill(0,127,160),nt.fill(2,4352,4448),nt[9001]=2,nt[9002]=2,nt.fill(2,11904,42192),nt[12351]=1,nt.fill(2,44032,55204),nt.fill(2,63744,64256),nt.fill(2,65040,65050),nt.fill(2,65072,65136),nt.fill(2,65280,65377),nt.fill(2,65504,65511);for(let e=0;e<Oc.length;++e)nt.fill(0,Oc[e][0],Oc[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?nt[e]:_0(e,g0)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let i=this.wcwidth(e),n=i===0&&t!==0;if(n){let a=js.extractWidth(t);a===0?n=!1:a>i&&(i=a)}return js.createPropertyValue(0,i,n)}},js=class ha{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new ie,this.onChange=this._onChange.event;let t=new v0;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,i,n=!1){return(t&16777215)<<3|(i&3)<<1|(n?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let i=0,n=0,a=t.length;for(let c=0;c<a;++c){let u=t.charCodeAt(c);if(55296<=u&&u<=56319){if(++c>=a)return i+this.wcwidth(u);let p=t.charCodeAt(c);56320<=p&&p<=57343?u=(u-55296)*1024+p-56320+65536:i+=this.wcwidth(p)}let f=this.charProperties(u,n),g=ha.extractWidth(f);ha.extractShouldJoin(f)&&(g-=ha.extractWidth(n)),i+=g,n=f}return i}charProperties(t,i){return this._activeProvider.charProperties(t,i)}},y0=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function Xm(e){var n;let t=(n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1))==null?void 0:n.get(e.cols-1),i=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);i&&t&&(i.isWrapped=t[3]!==0&&t[3]!==32)}var yn=2147483647,S0=256,xg=class Cu{constructor(t=32,i=32){if(this.maxLength=t,this.maxSubParamsLength=i,i>S0)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(i),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let i=new Cu;if(!t.length)return i;for(let n=Array.isArray(t[0])?1:0;n<t.length;++n){let a=t[n];if(Array.isArray(a))for(let c=0;c<a.length;++c)i.addSubParam(a[c]);else i.addParam(a)}return i}clone(){let t=new Cu(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let i=0;i<this.length;++i){t.push(this.params[i]);let n=this._subParamsIdx[i]>>8,a=this._subParamsIdx[i]&255;a-n>0&&t.push(Array.prototype.slice.call(this._subParams,n,a))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>yn?yn:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>yn?yn:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let i=this._subParamsIdx[t]>>8,n=this._subParamsIdx[t]&255;return n-i>0?this._subParams.subarray(i,n):null}getSubParamsAll(){let t={};for(let i=0;i<this.length;++i){let n=this._subParamsIdx[i]>>8,a=this._subParamsIdx[i]&255;a-n>0&&(t[i]=this._subParams.slice(n,a))}return t}addDigit(t){let i;if(this._rejectDigits||!(i=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let n=this._digitIsSub?this._subParams:this.params,a=n[i-1];n[i-1]=~a?Math.min(a*10+t,yn):t}},Sn=[],w0=class{constructor(){this._state=0,this._active=Sn,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let i=this._handlers[e];return i.push(t),{dispose:()=>{let n=i.indexOf(t);n!==-1&&i.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Sn}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=Sn,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||Sn,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,i){if(!this._active.length)this._handlerFb(this._id,"PUT",Ca(e,t,i));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,i)}start(){this.reset(),this._state=1}put(e,t,i){if(this._state!==3){if(this._state===1)for(;t<i;){let n=e[t++];if(n===59){this._state=2,this._start();break}if(n<48||57<n){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+n-48}this._state===2&&i-t>0&&this._put(e,t,i)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let i=!1,n=this._active.length-1,a=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,i=t,a=this._stack.fallThrough,this._stack.paused=!1),!a&&i===!1){for(;n>=0&&(i=this._active[n].end(e),i!==!0);n--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,i;n--}for(;n>=0;n--)if(i=this._active[n].end(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,i}this._active=Sn,this._id=-1,this._state=0}}},qt=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=Ca(e,t,i),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(i=>(this._data="",this._hitLimit=!1,i));return this._data="",this._hitLimit=!1,t}},wn=[],k0=class{constructor(){this._handlers=Object.create(null),this._active=wn,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=wn}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let i=this._handlers[e];return i.push(t),{dispose:()=>{let n=i.indexOf(t);n!==-1&&i.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=wn,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||wn,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let i=this._active.length-1;i>=0;i--)this._active[i].hook(t)}put(e,t,i){if(!this._active.length)this._handlerFb(this._ident,"PUT",Ca(e,t,i));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,i)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let i=!1,n=this._active.length-1,a=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,i=t,a=this._stack.fallThrough,this._stack.paused=!1),!a&&i===!1){for(;n>=0&&(i=this._active[n].unhook(e),i!==!0);n--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,i;n--}for(;n>=0;n--)if(i=this._active[n].unhook(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,i}this._active=wn,this._ident=0}},Dn=new xg;Dn.addParam(0);var Zm=class{constructor(e){this._handler=e,this._data="",this._params=Dn,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():Dn,this._data="",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=Ca(e,t,i),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(i=>(this._params=Dn,this._data="",this._hitLimit=!1,i));return this._params=Dn,this._data="",this._hitLimit=!1,t}},x0=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,i,n){this.table[t<<8|e]=i<<4|n}addMany(e,t,i,n){for(let a=0;a<e.length;a++)this.table[t<<8|e[a]]=i<<4|n}},ir=160,C0=(function(){let e=new x0(4095),t=Array.apply(null,Array(256)).map((f,g)=>g),i=(f,g)=>t.slice(f,g),n=i(32,127),a=i(0,24);a.push(25),a.push.apply(a,i(28,32));let c=i(0,14),u;e.setDefault(1,0),e.addMany(n,0,2,0);for(u in c)e.addMany([24,26,153,154],u,3,0),e.addMany(i(128,144),u,3,0),e.addMany(i(144,152),u,3,0),e.add(156,u,0,0),e.add(27,u,11,1),e.add(157,u,4,8),e.addMany([152,158,159],u,0,7),e.add(155,u,11,3),e.add(144,u,11,9);return e.addMany(a,0,3,0),e.addMany(a,1,3,1),e.add(127,1,0,1),e.addMany(a,8,0,8),e.addMany(a,3,3,3),e.add(127,3,0,3),e.addMany(a,4,3,4),e.add(127,4,0,4),e.addMany(a,6,3,6),e.addMany(a,5,3,5),e.add(127,5,0,5),e.addMany(a,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(n,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(i(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(n,7,0,7),e.addMany(a,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(i(64,127),3,7,0),e.addMany(i(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(i(48,60),4,8,4),e.addMany(i(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(i(32,64),6,0,6),e.add(127,6,0,6),e.addMany(i(64,127),6,0,0),e.addMany(i(32,48),3,9,5),e.addMany(i(32,48),5,9,5),e.addMany(i(48,64),5,0,6),e.addMany(i(64,127),5,7,0),e.addMany(i(32,48),4,9,5),e.addMany(i(32,48),1,9,2),e.addMany(i(32,48),2,9,2),e.addMany(i(48,127),2,10,0),e.addMany(i(48,80),1,10,0),e.addMany(i(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(i(96,127),1,10,0),e.add(80,1,11,9),e.addMany(a,9,0,9),e.add(127,9,0,9),e.addMany(i(28,32),9,0,9),e.addMany(i(32,48),9,9,12),e.addMany(i(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(a,11,0,11),e.addMany(i(32,128),11,0,11),e.addMany(i(28,32),11,0,11),e.addMany(a,10,0,10),e.add(127,10,0,10),e.addMany(i(28,32),10,0,10),e.addMany(i(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(i(32,48),10,9,12),e.addMany(a,12,0,12),e.add(127,12,0,12),e.addMany(i(28,32),12,0,12),e.addMany(i(32,48),12,9,12),e.addMany(i(48,64),12,0,11),e.addMany(i(64,127),12,12,13),e.addMany(i(64,127),10,12,13),e.addMany(i(64,127),9,12,13),e.addMany(a,13,13,13),e.addMany(n,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(ir,0,2,0),e.add(ir,8,5,8),e.add(ir,6,0,6),e.add(ir,11,0,11),e.add(ir,13,13,13),e})(),b0=class extends Ce{constructor(e=C0){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new xg,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,i,n)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,i)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(je(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new w0),this._dcsParser=this._register(new k0),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let i=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(i=e.prefix.charCodeAt(0),i&&60>i||i>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let a=0;a<e.intermediates.length;++a){let c=e.intermediates.charCodeAt(a);if(32>c||c>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");i<<=8,i|=c}}if(e.final.length!==1)throw new Error("final must be a single byte");let n=e.final.charCodeAt(0);if(t[0]>n||n>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return i<<=8,i|=n,i}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let i=this._identifier(e,[48,126]);this._escHandlers[i]===void 0&&(this._escHandlers[i]=[]);let n=this._escHandlers[i];return n.push(t),{dispose:()=>{let a=n.indexOf(t);a!==-1&&n.splice(a,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let i=this._identifier(e);this._csiHandlers[i]===void 0&&(this._csiHandlers[i]=[]);let n=this._csiHandlers[i];return n.push(t),{dispose:()=>{let a=n.indexOf(t);a!==-1&&n.splice(a,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}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(e,t,i,n,a){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=i,this._parseStack.transition=n,this._parseStack.chunkPos=a}parse(e,t,i){let n=0,a=0,c=0,u;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,c=this._parseStack.chunkPos+1;else{if(i===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let f=this._parseStack.handlers,g=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(i===!1&&g>-1){for(;g>=0&&(u=f[g](this._params),u!==!0);g--)if(u instanceof Promise)return this._parseStack.handlerPos=g,u}this._parseStack.handlers=[];break;case 4:if(i===!1&&g>-1){for(;g>=0&&(u=f[g](),u!==!0);g--)if(u instanceof Promise)return this._parseStack.handlerPos=g,u}this._parseStack.handlers=[];break;case 6:if(n=e[this._parseStack.chunkPos],u=this._dcsParser.unhook(n!==24&&n!==26,i),u)return u;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(n=e[this._parseStack.chunkPos],u=this._oscParser.end(n!==24&&n!==26,i),u)return u;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,c=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let f=c;f<t;++f){switch(n=e[f],a=this._transitions.table[this.currentState<<8|(n<160?n:ir)],a>>4){case 2:for(let k=f+1;;++k){if(k>=t||(n=e[k])<32||n>126&&n<ir){this._printHandler(e,f,k),f=k-1;break}if(++k>=t||(n=e[k])<32||n>126&&n<ir){this._printHandler(e,f,k),f=k-1;break}if(++k>=t||(n=e[k])<32||n>126&&n<ir){this._printHandler(e,f,k),f=k-1;break}if(++k>=t||(n=e[k])<32||n>126&&n<ir){this._printHandler(e,f,k),f=k-1;break}}break;case 3:this._executeHandlers[n]?this._executeHandlers[n]():this._executeHandlerFb(n),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:f,code:n,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let g=this._csiHandlers[this._collect<<8|n],p=g?g.length-1:-1;for(;p>=0&&(u=g[p](this._params),u!==!0);p--)if(u instanceof Promise)return this._preserveStack(3,g,p,a,f),u;p<0&&this._csiHandlerFb(this._collect<<8|n,this._params),this.precedingJoinState=0;break;case 8:do switch(n){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(n-48)}while(++f<t&&(n=e[f])>47&&n<60);f--;break;case 9:this._collect<<=8,this._collect|=n;break;case 10:let y=this._escHandlers[this._collect<<8|n],v=y?y.length-1:-1;for(;v>=0&&(u=y[v](),u!==!0);v--)if(u instanceof Promise)return this._preserveStack(4,y,v,a,f),u;v<0&&this._escHandlerFb(this._collect<<8|n),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|n,this._params);break;case 13:for(let k=f+1;;++k)if(k>=t||(n=e[k])===24||n===26||n===27||n>127&&n<ir){this._dcsParser.put(e,f,k),f=k-1;break}break;case 14:if(u=this._dcsParser.unhook(n!==24&&n!==26),u)return this._preserveStack(6,[],0,a,f),u;n===27&&(a|=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 k=f+1;;k++)if(k>=t||(n=e[k])<32||n>127&&n<ir){this._oscParser.put(e,f,k),f=k-1;break}break;case 6:if(u=this._oscParser.end(n!==24&&n!==26),u)return this._preserveStack(5,[],0,a,f),u;n===27&&(a|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=a&15}}},E0=/^([\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})$/,D0=/^[\da-f]+$/;function Qm(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let i=E0.exec(t);if(i){let n=i[1]?15:i[4]?255:i[7]?4095:65535;return[Math.round(parseInt(i[1]||i[4]||i[7]||i[10],16)/n*255),Math.round(parseInt(i[2]||i[5]||i[8]||i[11],16)/n*255),Math.round(parseInt(i[3]||i[6]||i[9]||i[12],16)/n*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),D0.exec(t)&&[3,6,9,12].includes(t.length))){let i=t.length/3,n=[0,0,0];for(let a=0;a<3;++a){let c=parseInt(t.slice(i*a,i*a+i),16);n[a]=i===1?c<<4:i===2?c:i===3?c>>4:c>>8}return n}}function zc(e,t){let i=e.toString(16),n=i.length<2?"0"+i:i;switch(t){case 4:return i[0];case 8:return n;case 12:return(n+n).slice(0,3);default:return n+n}}function N0(e,t=16){let[i,n,a]=e;return`rgb:${zc(i,t)}/${zc(n,t)}/${zc(a,t)}`}var P0={"(":0,")":1,"*":2,"+":3,"-":1,".":2},ms=131072,Jm=10;function ep(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var tp=5e3,rp=0,M0=class extends Ce{constructor(e,t,i,n,a,c,u,f,g=new b0){super(),this._bufferService=e,this._charsetService=t,this._coreService=i,this._logService=n,this._optionsService=a,this._oscLinkService=c,this._coreMouseService=u,this._unicodeService=f,this._parser=g,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new GS,this._utf8Decoder=new XS,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=Je.clone(),this._eraseAttrDataInternal=Je.clone(),this._onRequestBell=this._register(new ie),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new ie),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new ie),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new ie),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new ie),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new ie),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new ie),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new ie),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new ie),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new ie),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new ie),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new ie),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new ie),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 bu(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(p=>this._activeBuffer=p.activeBuffer)),this._parser.setCsiHandlerFallback((p,y)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(p),params:y.toArray()})}),this._parser.setEscHandlerFallback(p=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(p)})}),this._parser.setExecuteHandlerFallback(p=>{this._logService.debug("Unknown EXECUTE code: ",{code:p})}),this._parser.setOscHandlerFallback((p,y,v)=>{this._logService.debug("Unknown OSC code: ",{identifier:p,action:y,data:v})}),this._parser.setDcsHandlerFallback((p,y,v)=>{y==="HOOK"&&(v=v.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(p),action:y,payload:v})}),this._parser.setPrintHandler((p,y,v)=>this.print(p,y,v)),this._parser.registerCsiHandler({final:"@"},p=>this.insertChars(p)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},p=>this.scrollLeft(p)),this._parser.registerCsiHandler({final:"A"},p=>this.cursorUp(p)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},p=>this.scrollRight(p)),this._parser.registerCsiHandler({final:"B"},p=>this.cursorDown(p)),this._parser.registerCsiHandler({final:"C"},p=>this.cursorForward(p)),this._parser.registerCsiHandler({final:"D"},p=>this.cursorBackward(p)),this._parser.registerCsiHandler({final:"E"},p=>this.cursorNextLine(p)),this._parser.registerCsiHandler({final:"F"},p=>this.cursorPrecedingLine(p)),this._parser.registerCsiHandler({final:"G"},p=>this.cursorCharAbsolute(p)),this._parser.registerCsiHandler({final:"H"},p=>this.cursorPosition(p)),this._parser.registerCsiHandler({final:"I"},p=>this.cursorForwardTab(p)),this._parser.registerCsiHandler({final:"J"},p=>this.eraseInDisplay(p,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},p=>this.eraseInDisplay(p,!0)),this._parser.registerCsiHandler({final:"K"},p=>this.eraseInLine(p,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},p=>this.eraseInLine(p,!0)),this._parser.registerCsiHandler({final:"L"},p=>this.insertLines(p)),this._parser.registerCsiHandler({final:"M"},p=>this.deleteLines(p)),this._parser.registerCsiHandler({final:"P"},p=>this.deleteChars(p)),this._parser.registerCsiHandler({final:"S"},p=>this.scrollUp(p)),this._parser.registerCsiHandler({final:"T"},p=>this.scrollDown(p)),this._parser.registerCsiHandler({final:"X"},p=>this.eraseChars(p)),this._parser.registerCsiHandler({final:"Z"},p=>this.cursorBackwardTab(p)),this._parser.registerCsiHandler({final:"`"},p=>this.charPosAbsolute(p)),this._parser.registerCsiHandler({final:"a"},p=>this.hPositionRelative(p)),this._parser.registerCsiHandler({final:"b"},p=>this.repeatPrecedingCharacter(p)),this._parser.registerCsiHandler({final:"c"},p=>this.sendDeviceAttributesPrimary(p)),this._parser.registerCsiHandler({prefix:">",final:"c"},p=>this.sendDeviceAttributesSecondary(p)),this._parser.registerCsiHandler({final:"d"},p=>this.linePosAbsolute(p)),this._parser.registerCsiHandler({final:"e"},p=>this.vPositionRelative(p)),this._parser.registerCsiHandler({final:"f"},p=>this.hVPosition(p)),this._parser.registerCsiHandler({final:"g"},p=>this.tabClear(p)),this._parser.registerCsiHandler({final:"h"},p=>this.setMode(p)),this._parser.registerCsiHandler({prefix:"?",final:"h"},p=>this.setModePrivate(p)),this._parser.registerCsiHandler({final:"l"},p=>this.resetMode(p)),this._parser.registerCsiHandler({prefix:"?",final:"l"},p=>this.resetModePrivate(p)),this._parser.registerCsiHandler({final:"m"},p=>this.charAttributes(p)),this._parser.registerCsiHandler({final:"n"},p=>this.deviceStatus(p)),this._parser.registerCsiHandler({prefix:"?",final:"n"},p=>this.deviceStatusPrivate(p)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},p=>this.softReset(p)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},p=>this.setCursorStyle(p)),this._parser.registerCsiHandler({final:"r"},p=>this.setScrollRegion(p)),this._parser.registerCsiHandler({final:"s"},p=>this.saveCursor(p)),this._parser.registerCsiHandler({final:"t"},p=>this.windowOptions(p)),this._parser.registerCsiHandler({final:"u"},p=>this.restoreCursor(p)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},p=>this.insertColumns(p)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},p=>this.deleteColumns(p)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},p=>this.selectProtected(p)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},p=>this.requestMode(p,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},p=>this.requestMode(p,!1)),this._parser.setExecuteHandler(V.BEL,()=>this.bell()),this._parser.setExecuteHandler(V.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(V.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(V.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(V.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(V.BS,()=>this.backspace()),this._parser.setExecuteHandler(V.HT,()=>this.tab()),this._parser.setExecuteHandler(V.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(V.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(ca.IND,()=>this.index()),this._parser.setExecuteHandler(ca.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(ca.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new qt(p=>(this.setTitle(p),this.setIconName(p),!0))),this._parser.registerOscHandler(1,new qt(p=>this.setIconName(p))),this._parser.registerOscHandler(2,new qt(p=>this.setTitle(p))),this._parser.registerOscHandler(4,new qt(p=>this.setOrReportIndexedColor(p))),this._parser.registerOscHandler(8,new qt(p=>this.setHyperlink(p))),this._parser.registerOscHandler(10,new qt(p=>this.setOrReportFgColor(p))),this._parser.registerOscHandler(11,new qt(p=>this.setOrReportBgColor(p))),this._parser.registerOscHandler(12,new qt(p=>this.setOrReportCursorColor(p))),this._parser.registerOscHandler(104,new qt(p=>this.restoreIndexedColor(p))),this._parser.registerOscHandler(110,new qt(p=>this.restoreFgColor(p))),this._parser.registerOscHandler(111,new qt(p=>this.restoreBgColor(p))),this._parser.registerOscHandler(112,new qt(p=>this.restoreCursorColor(p))),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(let p in ot)this._parser.registerEscHandler({intermediates:"(",final:p},()=>this.selectCharset("("+p)),this._parser.registerEscHandler({intermediates:")",final:p},()=>this.selectCharset(")"+p)),this._parser.registerEscHandler({intermediates:"*",final:p},()=>this.selectCharset("*"+p)),this._parser.registerEscHandler({intermediates:"+",final:p},()=>this.selectCharset("+"+p)),this._parser.registerEscHandler({intermediates:"-",final:p},()=>this.selectCharset("-"+p)),this._parser.registerEscHandler({intermediates:".",final:p},()=>this.selectCharset("."+p)),this._parser.registerEscHandler({intermediates:"/",final:p},()=>this.selectCharset("/"+p));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(p=>(this._logService.error("Parsing error: ",p),p)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new Zm((p,y)=>this.requestStatusString(p,y)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,i,n){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=i,this._parseStack.position=n}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,i)=>setTimeout(()=>i("#SLOW_TIMEOUT"),tp))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${tp} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let i,n=this._activeBuffer.x,a=this._activeBuffer.y,c=0,u=this._parseStack.paused;if(u){if(i=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(i),i;n=this._parseStack.cursorStartX,a=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>ms&&(c=this._parseStack.position+ms)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,p=>String.fromCharCode(p)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(p=>p.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<ms&&(this._parseBuffer=new Uint32Array(Math.min(e.length,ms))),u||this._dirtyRowTracker.clearRange(),e.length>ms)for(let p=c;p<e.length;p+=ms){let y=p+ms<e.length?p+ms:e.length,v=typeof e=="string"?this._stringDecoder.decode(e.substring(p,y),this._parseBuffer):this._utf8Decoder.decode(e.subarray(p,y),this._parseBuffer);if(i=this._parser.parse(this._parseBuffer,v))return this._preserveStack(n,a,v,p),this._logSlowResolvingAsync(i),i}else if(!u){let p=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(i=this._parser.parse(this._parseBuffer,p))return this._preserveStack(n,a,p,0),this._logSlowResolvingAsync(i),i}(this._activeBuffer.x!==n||this._activeBuffer.y!==a)&&this._onCursorMove.fire();let f=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),g=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);g<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(g,this._bufferService.rows-1),end:Math.min(f,this._bufferService.rows-1)})}print(e,t,i){let n,a,c=this._charsetService.charset,u=this._optionsService.rawOptions.screenReaderMode,f=this._bufferService.cols,g=this._coreService.decPrivateModes.wraparound,p=this._coreService.modes.insertMode,y=this._curAttrData,v=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&i-t>0&&v.getWidth(this._activeBuffer.x-1)===2&&v.setCellFromCodepoint(this._activeBuffer.x-1,0,1,y);let k=this._parser.precedingJoinState;for(let S=t;S<i;++S){if(n=e[S],n<127&&c){let P=c[String.fromCharCode(n)];P&&(n=P.charCodeAt(0))}let w=this._unicodeService.charProperties(n,k);a=js.extractWidth(w);let C=js.extractShouldJoin(w),b=C?js.extractWidth(k):0;if(k=w,u&&this._onA11yChar.fire(ps(n)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+a-b>f){if(g){let P=v,j=this._activeBuffer.x-b;for(this._activeBuffer.x=b,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),v=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),b>0&&v instanceof bn&&v.copyCellsFrom(P,j,0,b,!1);j<f;)P.setCellFromCodepoint(j++,0,1,y)}else if(this._activeBuffer.x=f-1,a===2)continue}if(C&&this._activeBuffer.x){let P=v.getWidth(this._activeBuffer.x-1)?1:2;v.addCodepointToCell(this._activeBuffer.x-P,n,a);for(let j=a-b;--j>=0;)v.setCellFromCodepoint(this._activeBuffer.x++,0,0,y);continue}if(p&&(v.insertCells(this._activeBuffer.x,a-b,this._activeBuffer.getNullCell(y)),v.getWidth(f-1)===2&&v.setCellFromCodepoint(f-1,0,1,y)),v.setCellFromCodepoint(this._activeBuffer.x++,n,a,y),a>0)for(;--a;)v.setCellFromCodepoint(this._activeBuffer.x++,0,0,y)}this._parser.precedingJoinState=k,this._activeBuffer.x<f&&i-t>0&&v.getWidth(this._activeBuffer.x)===0&&!v.hasContent(this._activeBuffer.x)&&v.setCellFromCodepoint(this._activeBuffer.x,0,1,y),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,i=>ep(i.params[0],this._optionsService.rawOptions.windowOptions)?t(i):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new Zm(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new qt(t))}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 e;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&&((e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&e.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);t.hasWidth(this._activeBuffer.x)&&!t.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,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(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,i,n=!1,a=!1){let c=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);c.replaceCells(t,i,this._activeBuffer.getNullCell(this._eraseAttrData()),a),n&&(c.isWrapped=!1)}_resetBufferLine(e,t=!1){let i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i&&(i.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),i.isWrapped=!1)}eraseInDisplay(e,t=!1){var n;this._restrictCursor(this._bufferService.cols);let i;switch(e.params[0]){case 0:for(i=this._activeBuffer.y,this._dirtyRowTracker.markDirty(i),this._eraseInBufferLine(i++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);i<this._bufferService.rows;i++)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(i);break;case 1:for(i=this._activeBuffer.y,this._dirtyRowTracker.markDirty(i),this._eraseInBufferLine(i,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(i+1).isWrapped=!1);i--;)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(i=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,i-1);i--&&!((n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i))!=null&&n.getTrimmedLength()););for(;i>=0;i--)this._bufferService.scroll(this._eraseAttrData())}else{for(i=this._bufferService.rows,this._dirtyRowTracker.markDirty(i-1);i--;)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let a=this._activeBuffer.lines.length-this._bufferService.rows;a>0&&(this._activeBuffer.lines.trimStart(a),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-a,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-a,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let i=this._activeBuffer.ybase+this._activeBuffer.y,n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,a=this._bufferService.rows-1+this._activeBuffer.ybase-n+1;for(;t--;)this._activeBuffer.lines.splice(a-1,1),this._activeBuffer.lines.splice(i,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let i=this._activeBuffer.ybase+this._activeBuffer.y,n;for(n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,n=this._bufferService.rows-1+this._activeBuffer.ybase-n;t--;)this._activeBuffer.lines.splice(i,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)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(e){let t=e.params[0]||1;for(;t--;)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(Je));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);n.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);n.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);n.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);n.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let i=e.params[0]||1,n=js.extractWidth(t),a=this._activeBuffer.x-n,c=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(a),u=new Uint32Array(c.length*i),f=0;for(let p=0;p<c.length;){let y=c.codePointAt(p)||0;u[f++]=y,p+=y>65535?2:1}let g=f;for(let p=1;p<i;++p)u.copyWithin(g,0,f),g+=f;return this.print(u,0,g),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(V.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(V.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(V.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(V.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(V.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,zs),this._charsetService.setgCharset(1,zs),this._charsetService.setgCharset(2,zs),this._charsetService.setgCharset(3,zs);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(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){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:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){(C=>(C[C.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",C[C.SET=1]="SET",C[C.RESET=2]="RESET",C[C.PERMANENTLY_SET=3]="PERMANENTLY_SET",C[C.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(void 0||(i={}));let n=this._coreService.decPrivateModes,{activeProtocol:a,activeEncoding:c}=this._coreMouseService,u=this._coreService,{buffers:f,cols:g}=this._bufferService,{active:p,alt:y}=f,v=this._optionsService.rawOptions,k=(C,b)=>(u.triggerDataEvent(`${V.ESC}[${t?"":"?"}${C};${b}$y`),!0),S=C=>C?1:2,w=e.params[0];return t?w===2?k(w,4):w===4?k(w,S(u.modes.insertMode)):w===12?k(w,3):w===20?k(w,S(v.convertEol)):k(w,0):w===1?k(w,S(n.applicationCursorKeys)):w===3?k(w,v.windowOptions.setWinLines?g===80?2:g===132?1:0:0):w===6?k(w,S(n.origin)):w===7?k(w,S(n.wraparound)):w===8?k(w,3):w===9?k(w,S(a==="X10")):w===12?k(w,S(v.cursorBlink)):w===25?k(w,S(!u.isCursorHidden)):w===45?k(w,S(n.reverseWraparound)):w===66?k(w,S(n.applicationKeypad)):w===67?k(w,4):w===1e3?k(w,S(a==="VT200")):w===1002?k(w,S(a==="DRAG")):w===1003?k(w,S(a==="ANY")):w===1004?k(w,S(n.sendFocus)):w===1005?k(w,4):w===1006?k(w,S(c==="SGR")):w===1015?k(w,4):w===1016?k(w,S(c==="SGR_PIXELS")):w===1048?k(w,1):w===47||w===1047||w===1049?k(w,S(p===y)):w===2004?k(w,S(n.bracketedPasteMode)):w===2026?k(w,S(n.synchronizedOutput)):k(w,0)}_updateAttrColor(e,t,i,n,a){return t===2?(e|=50331648,e&=-16777216,e|=jn.fromColorRGB([i,n,a])):t===5&&(e&=-50331904,e|=33554432|i&255),e}_extractColor(e,t,i){let n=[0,0,-1,0,0,0],a=0,c=0;do{if(n[c+a]=e.params[t+c],e.hasSubParams(t+c)){let u=e.getSubParams(t+c),f=0;do n[1]===5&&(a=1),n[c+f+1+a]=u[f];while(++f<u.length&&f+c+1+a<n.length);break}if(n[1]===5&&c+a>=2||n[1]===2&&c+a>=5)break;n[1]&&(a=1)}while(++c+t<e.length&&c+a<n.length);for(let u=2;u<n.length;++u)n[u]===-1&&(n[u]=0);switch(n[0]){case 38:i.fg=this._updateAttrColor(i.fg,n[1],n[3],n[4],n[5]);break;case 48:i.bg=this._updateAttrColor(i.bg,n[1],n[3],n[4],n[5]);break;case 58:i.extended=i.extended.clone(),i.extended.underlineColor=this._updateAttrColor(i.extended.underlineColor,n[1],n[3],n[4],n[5])}return c}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=Je.fg,e.bg=Je.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,i,n=this._curAttrData;for(let a=0;a<t;a++)i=e.params[a],i>=30&&i<=37?(n.fg&=-50331904,n.fg|=16777216|i-30):i>=40&&i<=47?(n.bg&=-50331904,n.bg|=16777216|i-40):i>=90&&i<=97?(n.fg&=-50331904,n.fg|=16777216|i-90|8):i>=100&&i<=107?(n.bg&=-50331904,n.bg|=16777216|i-100|8):i===0?this._processSGR0(n):i===1?n.fg|=134217728:i===3?n.bg|=67108864:i===4?(n.fg|=268435456,this._processUnderline(e.hasSubParams(a)?e.getSubParams(a)[0]:1,n)):i===5?n.fg|=536870912:i===7?n.fg|=67108864:i===8?n.fg|=1073741824:i===9?n.fg|=2147483648:i===2?n.bg|=134217728:i===21?this._processUnderline(2,n):i===22?(n.fg&=-134217729,n.bg&=-134217729):i===23?n.bg&=-67108865:i===24?(n.fg&=-268435457,this._processUnderline(0,n)):i===25?n.fg&=-536870913:i===27?n.fg&=-67108865:i===28?n.fg&=-1073741825:i===29?n.fg&=2147483647:i===39?(n.fg&=-67108864,n.fg|=Je.fg&16777215):i===49?(n.bg&=-67108864,n.bg|=Je.bg&16777215):i===38||i===48||i===58?a+=this._extractColor(e,a,n):i===53?n.bg|=1073741824:i===55?n.bg&=-1073741825:i===59?(n.extended=n.extended.clone(),n.extended.underlineColor=-1,n.updateExtended()):i===100?(n.fg&=-67108864,n.fg|=Je.fg&16777215,n.bg&=-67108864,n.bg|=Je.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",i);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${V.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,i=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${V.ESC}[${t};${i}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,i=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${V.ESC}[?${t};${i}R`);break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=Je.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(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let i=t%2===1;this._coreService.decPrivateModes.cursorBlink=i}return!0}setScrollRegion(e){let t=e.params[0]||1,i;return(e.length<2||(i=e.params[1])>this._bufferService.rows||i===0)&&(i=this._bufferService.rows),i>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=i-1,this._setCursor(0,0)),!0}windowOptions(e){if(!ep(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${V.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>Jm&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>Jm&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){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(e){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(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],i=e.split(";");for(;i.length>1;){let n=i.shift(),a=i.shift();if(/^\d+$/.exec(n)){let c=parseInt(n);if(sp(c))if(a==="?")t.push({type:0,index:c});else{let u=Qm(a);u&&t.push({type:1,index:c,color:u})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let i=e.slice(0,t).trim(),n=e.slice(t+1);return n?this._createHyperlink(i,n):i.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let i=e.split(":"),n,a=i.findIndex(c=>c.startsWith("id="));return a!==-1&&(n=i[a].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:n,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let i=e.split(";");for(let n=0;n<i.length&&!(t>=this._specialColors.length);++n,++t)if(i[n]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let a=Qm(i[n]);a&&this._onColor.fire([{type:1,index:this._specialColors[t],color:a}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],i=e.split(";");for(let n=0;n<i.length;++n)if(/^\d+$/.exec(i[n])){let a=parseInt(i[n]);sp(a)&&t.push({type:2,index:a})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){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,zs),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(P0[e[0]],ot[e[1]]||zs),!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){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,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=Je.clone(),this._eraseAttrDataInternal=Je.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new or;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let i=this._activeBuffer.ybase+this._activeBuffer.y+t,n=this._activeBuffer.lines.get(i);n&&(n.fill(e),n.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let i=u=>(this._coreService.triggerDataEvent(`${V.ESC}${u}${V.ESC}\\`),!0),n=this._bufferService.buffer,a=this._optionsService.rawOptions;return i(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${n.scrollTop+1};${n.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[a.cursorStyle]-(a.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},bu=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(rp=e,e=t,t=rp),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};bu=Ke([le(0,Rt)],bu);function sp(e){return 0<=e&&e<256}var T0=5e7,ip=12,R0=50,L0=class extends Ce{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new ie),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let i;for(;i=this._writeBuffer.shift();){this._action(i);let n=this._callbacks.shift();n&&n()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>T0)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let i=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let n=this._writeBuffer[this._bufferOffset],a=this._action(n,t);if(a){let u=f=>performance.now()-i>=ip?setTimeout(()=>this._innerWrite(0,f)):this._innerWrite(i,f);a.catch(f=>(queueMicrotask(()=>{throw f}),Promise.resolve(!1))).then(u);return}let c=this._callbacks[this._bufferOffset];if(c&&c(),this._bufferOffset++,this._pendingData-=n.length,performance.now()-i>=ip)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>R0&&(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()}},Eu=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let f=t.addMarker(t.ybase+t.y),g={data:e,id:this._nextId++,lines:[f]};return f.onDispose(()=>this._removeMarkerFromLink(g,f)),this._dataByLinkId.set(g.id,g),g.id}let i=e,n=this._getEntryIdKey(i),a=this._entriesWithId.get(n);if(a)return this.addLineToLink(a.id,t.ybase+t.y),a.id;let c=t.addMarker(t.ybase+t.y),u={id:this._nextId++,key:this._getEntryIdKey(i),data:i,lines:[c]};return c.onDispose(()=>this._removeMarkerFromLink(u,c)),this._entriesWithId.set(u.key,u),this._dataByLinkId.set(u.id,u),u.id}addLineToLink(e,t){let i=this._dataByLinkId.get(e);if(i&&i.lines.every(n=>n.line!==t)){let n=this._bufferService.buffer.addMarker(t);i.lines.push(n),n.onDispose(()=>this._removeMarkerFromLink(i,n))}}getLinkData(e){var t;return(t=this._dataByLinkId.get(e))==null?void 0:t.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let i=e.lines.indexOf(t);i!==-1&&(e.lines.splice(i,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};Eu=Ke([le(0,Rt)],Eu);var np=!1,I0=class extends Ce{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new wi),this._onBinary=this._register(new ie),this.onBinary=this._onBinary.event,this._onData=this._register(new ie),this.onData=this._onData.event,this._onLineFeed=this._register(new ie),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new ie),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new ie),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new ie),this._instantiationService=new i0,this.optionsService=this._register(new m0(e)),this._instantiationService.setService(Lt,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(wu)),this._instantiationService.setService(Rt,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(Su)),this._instantiationService.setService($p,this._logService),this.coreService=this._register(this._instantiationService.createInstance(ku)),this._instantiationService.setService(Us,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(xu)),this._instantiationService.setService(Hp,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(js)),this._instantiationService.setService(ew,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y0),this._instantiationService.setService(JS,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(Eu),this._instantiationService.setService(Up,this._oscLinkService),this._inputHandler=this._register(new M0(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(yt.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(yt.forward(this._bufferService.onResize,this._onResize)),this._register(yt.forward(this.coreService.onData,this._onData)),this._register(yt.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new L0((t,i)=>this._inputHandler.parse(t,i))),this._register(yt.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new ie),this._onScroll.event(e=>{var t;(t=this._onScrollApi)==null||t.fire(e.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(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!np&&(this._logService.warn("writeSync is unreliable and will be removed soon."),np=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,wg),t=Math.max(t,kg),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(Xm.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(Xm(this._bufferService),!1))),this._windowsWrappingHeuristics.value=je(()=>{for(let t of e)t.dispose()})}}},B0={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:["'",'"']};function A0(e,t,i,n){var u;let a={type:0,cancel:!1,key:void 0},c=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?a.key=V.ESC+"OA":a.key=V.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?a.key=V.ESC+"OD":a.key=V.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?a.key=V.ESC+"OC":a.key=V.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?a.key=V.ESC+"OB":a.key=V.ESC+"[B");break;case 8:a.key=e.ctrlKey?"\b":V.DEL,e.altKey&&(a.key=V.ESC+a.key);break;case 9:if(e.shiftKey){a.key=V.ESC+"[Z";break}a.key=V.HT,a.cancel=!0;break;case 13:a.key=e.altKey?V.ESC+V.CR:V.CR,a.cancel=!0;break;case 27:a.key=V.ESC,e.altKey&&(a.key=V.ESC+V.ESC),a.cancel=!0;break;case 37:if(e.metaKey)break;c?a.key=V.ESC+"[1;"+(c+1)+"D":t?a.key=V.ESC+"OD":a.key=V.ESC+"[D";break;case 39:if(e.metaKey)break;c?a.key=V.ESC+"[1;"+(c+1)+"C":t?a.key=V.ESC+"OC":a.key=V.ESC+"[C";break;case 38:if(e.metaKey)break;c?a.key=V.ESC+"[1;"+(c+1)+"A":t?a.key=V.ESC+"OA":a.key=V.ESC+"[A";break;case 40:if(e.metaKey)break;c?a.key=V.ESC+"[1;"+(c+1)+"B":t?a.key=V.ESC+"OB":a.key=V.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(a.key=V.ESC+"[2~");break;case 46:c?a.key=V.ESC+"[3;"+(c+1)+"~":a.key=V.ESC+"[3~";break;case 36:c?a.key=V.ESC+"[1;"+(c+1)+"H":t?a.key=V.ESC+"OH":a.key=V.ESC+"[H";break;case 35:c?a.key=V.ESC+"[1;"+(c+1)+"F":t?a.key=V.ESC+"OF":a.key=V.ESC+"[F";break;case 33:e.shiftKey?a.type=2:e.ctrlKey?a.key=V.ESC+"[5;"+(c+1)+"~":a.key=V.ESC+"[5~";break;case 34:e.shiftKey?a.type=3:e.ctrlKey?a.key=V.ESC+"[6;"+(c+1)+"~":a.key=V.ESC+"[6~";break;case 112:c?a.key=V.ESC+"[1;"+(c+1)+"P":a.key=V.ESC+"OP";break;case 113:c?a.key=V.ESC+"[1;"+(c+1)+"Q":a.key=V.ESC+"OQ";break;case 114:c?a.key=V.ESC+"[1;"+(c+1)+"R":a.key=V.ESC+"OR";break;case 115:c?a.key=V.ESC+"[1;"+(c+1)+"S":a.key=V.ESC+"OS";break;case 116:c?a.key=V.ESC+"[15;"+(c+1)+"~":a.key=V.ESC+"[15~";break;case 117:c?a.key=V.ESC+"[17;"+(c+1)+"~":a.key=V.ESC+"[17~";break;case 118:c?a.key=V.ESC+"[18;"+(c+1)+"~":a.key=V.ESC+"[18~";break;case 119:c?a.key=V.ESC+"[19;"+(c+1)+"~":a.key=V.ESC+"[19~";break;case 120:c?a.key=V.ESC+"[20;"+(c+1)+"~":a.key=V.ESC+"[20~";break;case 121:c?a.key=V.ESC+"[21;"+(c+1)+"~":a.key=V.ESC+"[21~";break;case 122:c?a.key=V.ESC+"[23;"+(c+1)+"~":a.key=V.ESC+"[23~";break;case 123:c?a.key=V.ESC+"[24;"+(c+1)+"~":a.key=V.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?a.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?a.key=V.NUL:e.keyCode>=51&&e.keyCode<=55?a.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?a.key=V.DEL:e.keyCode===219?a.key=V.ESC:e.keyCode===220?a.key=V.FS:e.keyCode===221&&(a.key=V.GS);else if((!i||n)&&e.altKey&&!e.metaKey){let f=(u=B0[e.keyCode])==null?void 0:u[e.shiftKey?1:0];if(f)a.key=V.ESC+f;else if(e.keyCode>=65&&e.keyCode<=90){let g=e.ctrlKey?e.keyCode-64:e.keyCode+32,p=String.fromCharCode(g);e.shiftKey&&(p=p.toUpperCase()),a.key=V.ESC+p}else if(e.keyCode===32)a.key=V.ESC+(e.ctrlKey?V.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let g=e.code.slice(3,4);e.shiftKey||(g=g.toLowerCase()),a.key=V.ESC+g,a.cancel=!0}}else i&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(a.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?a.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(a.key=V.US),e.key==="@"&&(a.key=V.NUL));break}return a}var Ge=0,O0=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new va,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new va,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((a,c)=>this._getKey(a)-this._getKey(c)),t=0,i=0,n=new Array(this._array.length+this._insertedValues.length);for(let a=0;a<n.length;a++)i>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[i])?(n[a]=e[t],t++):n[a]=this._array[i++];this._array=n,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(Ge=this._search(t),Ge===-1)||this._getKey(this._array[Ge])!==t)return!1;do if(this._array[Ge]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(Ge),!0;while(++Ge<this._array.length&&this._getKey(this._array[Ge])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((a,c)=>a-c),t=0,i=new Array(this._array.length-e.length),n=0;for(let a=0;a<this._array.length;a++)e[t]===a?t++:i[n++]=this._array[a];this._array=i,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Ge=this._search(e),!(Ge<0||Ge>=this._array.length)&&this._getKey(this._array[Ge])===e))do yield this._array[Ge];while(++Ge<this._array.length&&this._getKey(this._array[Ge])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Ge=this._search(e),!(Ge<0||Ge>=this._array.length)&&this._getKey(this._array[Ge])===e))do t(this._array[Ge]);while(++Ge<this._array.length&&this._getKey(this._array[Ge])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,i=this._array.length-1;for(;i>=t;){let n=t+i>>1,a=this._getKey(this._array[n]);if(a>e)i=n-1;else if(a<e)t=n+1;else{for(;n>0&&this._getKey(this._array[n-1])===e;)n--;return n}}return t}},jc=0,op=0,z0=class extends Ce{constructor(){super(),this._decorations=new O0(e=>e==null?void 0:e.marker.line),this._onDecorationRegistered=this._register(new ie),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new ie),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(je(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new j0(e);if(t){let i=t.marker.onDispose(()=>t.dispose()),n=t.onDispose(()=>{n.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),i.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,i){let n=0,a=0;for(let c of this._decorations.getKeyIterator(t))n=c.options.x??0,a=n+(c.options.width??1),e>=n&&e<a&&(!i||(c.options.layer??"bottom")===i)&&(yield c)}forEachDecorationAtCell(e,t,i,n){this._decorations.forEachByKey(t,a=>{jc=a.options.x??0,op=jc+(a.options.width??1),e>=jc&&e<op&&(!i||(a.options.layer??"bottom")===i)&&n(a)})}},j0=class extends vs{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new ie),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new ie),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=Ue.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=Ue.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},F0=1e3,H0=class{constructor(e,t=F0){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,i){this._rowCount=i,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let n=performance.now();if(n-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=n,this._innerRefresh();else if(!this._additionalRefreshRequested){let a=n-this._lastRefreshMs,c=this._debounceThresholdMS-a;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},c)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},ap=20,ya=class extends Ce{constructor(e,t,i,n){super(),this._terminal=e,this._coreBrowserService=i,this._renderService=n,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let a=this._coreBrowserService.mainDocument;this._accessibilityContainer=a.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=a.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let c=0;c<this._terminal.rows;c++)this._rowElements[c]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[c]);if(this._topBoundaryFocusListener=c=>this._handleBoundaryFocus(c,0),this._bottomBoundaryFocusListener=c=>this._handleBoundaryFocus(c,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=a.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new H0(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(c=>this._handleResize(c.rows))),this._register(this._terminal.onRender(c=>this._refreshRows(c.start,c.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(c=>this._handleChar(c))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
65
+ `))),this._register(this._terminal.onA11yTab(c=>this._handleTab(c))),this._register(this._terminal.onKey(c=>this._handleKey(c.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(we(a,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(je(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<ap+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
66
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===ap+1&&(this._liveRegion.textContent+=Kc.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let i=this._terminal.buffer,n=i.lines.length.toString();for(let a=e;a<=t;a++){let c=i.lines.get(i.ydisp+a),u=[],f=(c==null?void 0:c.translateToString(!0,void 0,void 0,u))||"",g=(i.ydisp+a+1).toString(),p=this._rowElements[a];p&&(f.length===0?(p.textContent=" ",this._rowColumns.set(p,[0,1])):(p.textContent=f,this._rowColumns.set(p,u)),p.setAttribute("aria-posinset",g),p.setAttribute("aria-setsize",n),this._alignRowWidth(p))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let i=e.target,n=this._rowElements[t===0?1:this._rowElements.length-2],a=i.getAttribute("aria-posinset"),c=t===0?"1":`${this._terminal.buffer.lines.length}`;if(a===c||e.relatedTarget!==n)return;let u,f;if(t===0?(u=i,f=this._rowElements.pop(),this._rowContainer.removeChild(f)):(u=this._rowElements.shift(),f=i,this._rowContainer.removeChild(u)),u.removeEventListener("focus",this._topBoundaryFocusListener),f.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let g=this._createAccessibilityTreeNode();this._rowElements.unshift(g),this._rowContainer.insertAdjacentElement("afterbegin",g)}else{let g=this._createAccessibilityTreeNode();this._rowElements.push(g),this._rowContainer.appendChild(g)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var f;if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},i={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(i.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===i.node&&t.offset>i.offset)&&([t,i]=[i,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let n=this._rowElements.slice(-1)[0];if(i.node.compareDocumentPosition(n)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(i={node:n,offset:((f=n.textContent)==null?void 0:f.length)??0}),!this._rowContainer.contains(i.node))return;let a=({node:g,offset:p})=>{let y=g instanceof Text?g.parentNode:g,v=parseInt(y==null?void 0:y.getAttribute("aria-posinset"),10)-1;if(isNaN(v))return console.warn("row is invalid. Race condition?"),null;let k=this._rowColumns.get(y);if(!k)return console.warn("columns is null. Race condition?"),null;let S=p<k.length?k[p]:k.slice(-1)[0]+1;return S>=this._terminal.cols&&(++v,S=0),{row:v,column:S}},c=a(t),u=a(i);if(!(!c||!u)){if(c.row>u.row||c.row===u.row&&c.column>=u.column)throw new Error("invalid range");this._terminal.select(c.column,c.row,(u.row-c.row)*this._terminal.cols-c.column+u.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){var a,c;e.style.transform="";let t=e.getBoundingClientRect().width,i=(c=(a=this._rowColumns.get(e))==null?void 0:a.slice(-1))==null?void 0:c[0];if(!i)return;let n=i*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${n/t})`}};ya=Ke([le(1,Bu),le(2,Wr),le(3,Vr)],ya);var Du=class extends Ce{constructor(e,t,i,n,a){super(),this._element=e,this._mouseService=t,this._renderService=i,this._bufferService=n,this._linkProviderService=a,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new ie),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new ie),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(je(()=>{var c;Hs(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,(c=this._activeProviderReplies)==null||c.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(we(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(we(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(we(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(we(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let i=e.composedPath();for(let n=0;n<i.length;n++){let a=i[n];if(a.classList.contains("xterm"))break;if(a.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){var n,a;(!this._activeProviderReplies||!t)&&((n=this._activeProviderReplies)==null||n.forEach(c=>{c==null||c.forEach(u=>{u.link.dispose&&u.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let i=!1;for(let[c,u]of this._linkProviderService.linkProviders.entries())t?(a=this._activeProviderReplies)!=null&&a.get(c)&&(i=this._checkLinkProviderResult(c,e,i)):u.provideLinks(e.y,f=>{var p,y;if(this._isMouseOut)return;let g=f==null?void 0:f.map(v=>({link:v}));(p=this._activeProviderReplies)==null||p.set(c,g),i=this._checkLinkProviderResult(c,e,i),((y=this._activeProviderReplies)==null?void 0:y.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let i=new Set;for(let n=0;n<t.size;n++){let a=t.get(n);if(a)for(let c=0;c<a.length;c++){let u=a[c],f=u.link.range.start.y<e?0:u.link.range.start.x,g=u.link.range.end.y>e?this._bufferService.cols:u.link.range.end.x;for(let p=f;p<=g;p++){if(i.has(p)){a.splice(c--,1);break}i.add(p)}}}}_checkLinkProviderResult(e,t,i){var c;if(!this._activeProviderReplies)return i;let n=this._activeProviderReplies.get(e),a=!1;for(let u=0;u<e;u++)(!this._activeProviderReplies.has(u)||this._activeProviderReplies.get(u))&&(a=!0);if(!a&&n){let u=n.find(f=>this._linkAtPosition(f.link,t));u&&(i=!0,this._handleNewLink(u))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!i)for(let u=0;u<this._activeProviderReplies.size;u++){let f=(c=this._activeProviderReplies.get(u))==null?void 0:c.find(g=>this._linkAtPosition(g.link,t));if(f){i=!0,this._handleNewLink(f);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&$0(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,Hs(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var i,n;return(n=(i=this._currentLink)==null?void 0:i.state)==null?void 0:n.decorations.pointerCursor},set:i=>{var n;(n=this._currentLink)!=null&&n.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",i))}},underline:{get:()=>{var i,n;return(n=(i=this._currentLink)==null?void 0:i.state)==null?void 0:n.decorations.underline},set:i=>{var n,a,c;(n=this._currentLink)!=null&&n.state&&((c=(a=this._currentLink)==null?void 0:a.state)==null?void 0:c.decorations.underline)!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,i))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(i=>{if(!this._currentLink)return;let n=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,a=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=a&&(this._clearCurrentLink(n,a),this._lastMouseEvent)){let c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._askForLink(c,!1)}})))}_linkHover(e,t,i){var n;(n=this._currentLink)!=null&&n.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(i,t.text)}_fireUnderlineEvent(e,t){let i=e.range,n=this._bufferService.buffer.ydisp,a=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-n-1,i.end.x,i.end.y-n-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(a)}_linkLeave(e,t,i){var n;(n=this._currentLink)!=null&&n.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(i,t.text)}_linkAtPosition(e,t){let i=e.range.start.y*this._bufferService.cols+e.range.start.x,n=e.range.end.y*this._bufferService.cols+e.range.end.x,a=t.y*this._bufferService.cols+t.x;return i<=a&&a<=n}_positionFromMouseEvent(e,t,i){let n=i.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(n)return{x:n[0],y:n[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,i,n,a){return{x1:e,y1:t,x2:i,y2:n,cols:this._bufferService.cols,fg:a}}};Du=Ke([le(1,Au),le(2,Vr),le(3,Rt),le(4,Vp)],Du);function $0(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var U0=class extends I0{constructor(e={}){super(e),this._linkifier=this._register(new wi),this.browser=ug,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new wi),this._onCursorMove=this._register(new ie),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new ie),this.onKey=this._onKey.event,this._onRender=this._register(new ie),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new ie),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new ie),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new ie),this.onBell=this._onBell.event,this._onFocus=this._register(new ie),this._onBlur=this._register(new ie),this._onA11yCharEmitter=this._register(new ie),this._onA11yTabEmitter=this._register(new ie),this._onWillOpen=this._register(new ie),this._setup(),this._decorationService=this._instantiationService.createInstance(z0),this._instantiationService.setService(Fn,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Rk),this._instantiationService.setService(Vp,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(Yc)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh((t==null?void 0:t.start)??0,(t==null?void 0:t.end)??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(yt.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(yt.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(yt.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(yt.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(je(()=>{var t,i;this._customKeyEventHandler=void 0,(i=(t=this.element)==null?void 0:t.parentNode)==null||i.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}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}_handleColorEvent(e){if(this._themeService)for(let t of e){let i,n="";switch(t.index){case 256:i="foreground",n="10";break;case 257:i="background",n="11";break;case 258:i="cursor",n="12";break;default:i="ansi",n="4;"+t.index}switch(t.type){case 0:let a=Oe.toColorRGB(i==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[i]);this.coreService.triggerDataEvent(`${V.ESC}]${n};${N0(a)}${lg.ST}`);break;case 1:if(i==="ansi")this._themeService.modifyColors(c=>c.ansi[t.index]=et.toColor(...t.color));else{let c=i;this._themeService.modifyColors(u=>u[c]=et.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(ya,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(V.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var e;return(e=this.textarea)==null?void 0:e.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(V.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let i=Math.min(this.buffer.x,this.cols-1),n=this._renderService.dimensions.css.cell.height,a=t.getWidth(i),c=this._renderService.dimensions.css.cell.width*a,u=this.buffer.y*this._renderService.dimensions.css.cell.height,f=i*this._renderService.dimensions.css.cell.width;this.textarea.style.left=f+"px",this.textarea.style.top=u+"px",this.textarea.style.width=c+"px",this.textarea.style.height=n+"px",this.textarea.style.lineHeight=n+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(we(this.element,"copy",t=>{this.hasSelection()&&qS(t,this._selectionService)}));let e=t=>YS(t,this.textarea,this.coreService,this.optionsService);this._register(we(this.textarea,"paste",e)),this._register(we(this.element,"paste",e)),hg?this._register(we(this.element,"mousedown",t=>{t.button===2&&_m(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(we(this.element,"contextmenu",t=>{_m(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),Wu&&this._register(we(this.element,"auxclick",t=>{t.button===1&&Ap(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(we(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(we(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(we(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(we(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(we(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(we(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(we(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){var a;if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((a=this.element)==null?void 0:a.ownerDocument.defaultView)&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.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"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(we(this.screenElement,"mousemove",c=>this.updateCursorStyle(c))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let i=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",Vc.get()),mg||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._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>i.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(Mk,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(Wr,this._coreBrowserService),this._register(we(this.textarea,"focus",c=>this._handleTextAreaFocus(c))),this._register(we(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(pu,this._document,this._helperContainer),this._instantiationService.setService(ba,this._charSizeService),this._themeService=this._instantiationService.createInstance(yu),this._instantiationService.setService(Ci,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(ga),this._instantiationService.setService(Wp,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(_u,this.rows,this.screenElement)),this._instantiationService.setService(Vr,this._renderService),this._register(this._renderService.onRenderedViewportChange(c=>this._onRender.fire(c))),this.onResize(c=>this._renderService.resize(c.cols,c.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(du,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(gu),this._instantiationService.setService(Au,this._mouseService);let n=this._linkifier.value=this._register(this._instantiationService.createInstance(Du,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),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._viewport=this._register(this._instantiationService.createInstance(uu,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(c=>{super.scrollLines(c,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(vu,this.element,this.screenElement,n)),this._instantiationService.setService(rw,this._selectionService),this._register(this._selectionService.onRequestScrollLines(c=>this.scrollLines(c.amount,c.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(c=>this._renderService.handleSelectionChanged(c.start,c.end,c.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(c=>{this.textarea.value=c,this.textarea.focus(),this.textarea.select()})),this._register(yt.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{var c;this._selectionService.refresh(),(c=this._viewport)==null||c.queueSync()})),this._register(this._instantiationService.createInstance(hu,this.screenElement)),this._register(we(this.element,"mousedown",c=>this._selectionService.handleMouseDown(c))),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(ya,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",c=>this._handleScreenReaderModeOptionChange(c))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(pa,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",c=>{!this._overviewRulerRenderer&&c&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(pa,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(mu,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function i(c){var p,y,v,k,S;let u=e._mouseService.getMouseReportCoords(c,e.screenElement);if(!u)return!1;let f,g;switch(c.overrideType||c.type){case"mousemove":g=32,c.buttons===void 0?(f=3,c.button!==void 0&&(f=c.button<3?c.button:3)):f=c.buttons&1?0:c.buttons&4?1:c.buttons&2?2:3;break;case"mouseup":g=0,f=c.button<3?c.button:3;break;case"mousedown":g=1,f=c.button<3?c.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(c)===!1)return!1;let w=c.deltaY;if(w===0||e.coreMouseService.consumeWheelEvent(c,(k=(v=(y=(p=e._renderService)==null?void 0:p.dimensions)==null?void 0:y.device)==null?void 0:v.cell)==null?void 0:k.height,(S=e._coreBrowserService)==null?void 0:S.dpr)===0)return!1;g=w<0?0:1,f=4;break;default:return!1}return g===void 0||f===void 0||f>4?!1:e.coreMouseService.triggerMouseEvent({col:u.col,row:u.row,x:u.x,y:u.y,button:f,action:g,ctrl:c.ctrlKey,alt:c.altKey,shift:c.shiftKey})}let n={mouseup:null,wheel:null,mousedrag:null,mousemove:null},a={mouseup:c=>(i(c),c.buttons||(this._document.removeEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.removeEventListener("mousemove",n.mousedrag)),this.cancel(c)),wheel:c=>(i(c),this.cancel(c,!0)),mousedrag:c=>{c.buttons&&i(c)},mousemove:c=>{c.buttons||i(c)}};this._register(this.coreMouseService.onProtocolChange(c=>{c?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(c)),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()),c&8?n.mousemove||(t.addEventListener("mousemove",a.mousemove),n.mousemove=a.mousemove):(t.removeEventListener("mousemove",n.mousemove),n.mousemove=null),c&16?n.wheel||(t.addEventListener("wheel",a.wheel,{passive:!1}),n.wheel=a.wheel):(t.removeEventListener("wheel",n.wheel),n.wheel=null),c&2?n.mouseup||(n.mouseup=a.mouseup):(this._document.removeEventListener("mouseup",n.mouseup),n.mouseup=null),c&4?n.mousedrag||(n.mousedrag=a.mousedrag):(this._document.removeEventListener("mousemove",n.mousedrag),n.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(we(t,"mousedown",c=>{if(c.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(c)))return i(c),n.mouseup&&this._document.addEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.addEventListener("mousemove",n.mousedrag),this.cancel(c)})),this._register(we(t,"wheel",c=>{var u,f,g,p,y;if(!n.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(c)===!1)return!1;if(!this.buffer.hasScrollback){if(c.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(c,(p=(g=(f=(u=e._renderService)==null?void 0:u.dimensions)==null?void 0:f.device)==null?void 0:g.cell)==null?void 0:p.height,(y=e._coreBrowserService)==null?void 0:y.dpr)===0)return this.cancel(c,!0);let v=V.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(c.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(v,!0),this.cancel(c,!0)}}},{passive:!1}))}refresh(e,t){var i;(i=this._renderService)==null||i.refreshRows(e,t)}updateCursorStyle(e){var t;(t=this._selectionService)!=null&&t.shouldColumnSelect(e)?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(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){Bp(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,i){this._selectionService.setSelection(e,t,i)}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 e;(e=this._selectionService)==null||e.clearSelection()}selectAll(){var e;(e=this._selectionService)==null||e.selectAll()}selectLines(e,t){var i;(i=this._selectionService)==null||i.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let i=A0(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),i.type===3||i.type===2){let n=this.rows-1;return this.scrollLines(i.type===2?-n:n),this.cancel(e,!0)}if(i.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(i.cancel&&this.cancel(e,!0),!i.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((i.key===V.ETX||i.key===V.CR)&&(this.textarea.value=""),this._onKey.fire({key:i.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(i.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let i=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?i:i&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(W0(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){var i;(i=this._charSizeService)==null||i.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(Je));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){var t;this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),(t=this._selectionService)==null||t.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){var e;(e=this._renderService)==null||e.clearTextureAtlas()}_reportFocus(){var e;(e=this.element)!=null&&e.classList.contains("focus")?this.coreService.triggerDataEvent(V.ESC+"[I"):this.coreService.triggerDataEvent(V.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),i=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${V.ESC}[4;${i};${t}t`);break;case 1:let n=this._renderService.dimensions.css.cell.width.toFixed(0),a=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${V.ESC}[6;${a};${n}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function W0(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var V0=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let i={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(i),t.dispose=()=>this._wrappedAddonDispose(i),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let i=0;i<this._addons.length;i++)if(this._addons[i]===e){t=i;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},K0=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new or)}translateToString(e,t,i){return this._line.translateToString(e,t,i)}},lp=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,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(e){let t=this._buffer.lines.get(e);if(t)return new K0(t)}getNullCell(){return new or}},q0=class extends Ce{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new ie),this.onBufferChange=this._onBufferChange.event,this._normal=new lp(this._core.buffers.normal,"normal"),this._alternate=new lp(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)}},Y0=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,i=>t(i.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(i,n)=>t(i,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},G0=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},X0=["cols","rows"],Cr=0,Z0=class extends Ce{constructor(e){super(),this._core=this._register(new U0(e)),this._addonManager=this._register(new V0),this._publicOptions={...this._core.options};let t=n=>this._core.options[n],i=(n,a)=>{this._checkReadonlyOptions(n),this._core.options[n]=a};for(let n in this._core.options){let a={get:t.bind(this,n),set:i.bind(this,n)};Object.defineProperty(this._publicOptions,n,a)}}_checkReadonlyOptions(e){if(X0.includes(e))throw new Error(`Option "${e}" 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 Y0(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new G0(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 q0(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,i){this._verifyIntegers(e,t,i),this._core.select(e,t,i)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
67
+ `,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return Vc.get()},set promptLabel(e){Vc.set(e)},get tooMuchOutput(){return Kc.get()},set tooMuchOutput(e){Kc.set(e)}}}_verifyIntegers(...e){for(Cr of e)if(Cr===1/0||isNaN(Cr)||Cr%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(Cr of e)if(Cr&&(Cr===1/0||isNaN(Cr)||Cr%1!==0||Cr<0))throw new Error("This API only accepts positive integers")}};/**
68
+ * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
69
+ * @license MIT
70
+ *
71
+ * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
72
+ * @license MIT
73
+ *
74
+ * Originally forked from (with the author's permission):
75
+ * Fabrice Bellard's javascript vt100 for jslinux:
76
+ * http://bellard.org/jslinux/
77
+ * Copyright (c) 2011 Fabrice Bellard
78
+ */var Q0=2,J0=1,ex=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var v;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:((v=this._terminal.options.overviewRuler)==null?void 0:v.width)||14,i=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(i.getPropertyValue("height")),a=Math.max(0,parseInt(i.getPropertyValue("width"))),c=window.getComputedStyle(this._terminal.element),u={top:parseInt(c.getPropertyValue("padding-top")),bottom:parseInt(c.getPropertyValue("padding-bottom")),right:parseInt(c.getPropertyValue("padding-right")),left:parseInt(c.getPropertyValue("padding-left"))},f=u.top+u.bottom,g=u.right+u.left,p=n-f,y=a-g-t;return{cols:Math.max(Q0,Math.floor(y/e.css.cell.width)),rows:Math.max(J0,Math.floor(p/e.css.cell.height))}}};const tx={black:"#24292f",red:"#cf222e",green:"#116329",yellow:"#7d4e00",blue:"#0969da",magenta:"#8250df",cyan:"#1b7c83",white:"#57606a",brightBlack:"#57606a",brightRed:"#a40e26",brightGreen:"#1a7f37",brightYellow:"#633c01",brightBlue:"#0550ae",brightMagenta:"#6639ba",brightCyan:"#0e5a60",brightWhite:"#424a53"};function rx(e,t){const i=getComputedStyle(e),n=t==="light",a=(c,u)=>i.getPropertyValue(`--qcli-${c}`).trim()||u;return{background:a("background",n?"#f9fafb":"#0d1117"),foreground:a("heading",n?"#111827":"#e6edf3"),cursor:a("primary",n?"#4f46e5":"#58a6ff"),cursorAccent:a("background",n?"#f9fafb":"#0d1117"),selectionBackground:n?"rgba(79, 70, 229, 0.25)":"rgba(88, 166, 255, 0.35)",...n?tx:{}}}function sx({id:e}){const{t}=tt(),i=iy(),{host:n}=Dt(),{theme:a}=Tt(),c=I.useRef(null),[u,f]=I.useState({state:"connecting"}),[g,p]=I.useState(0);I.useEffect(()=>{const v=c.current;if(!v)return;const k=new Z0({cursorBlink:!0,fontFamily:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",fontSize:13,scrollback:5e3,theme:rx(v,a)}),S=new ex;k.loadAddon(S),k.open(v);const w=()=>{try{S.fit()}catch{}};w();let C,b=!1,P=!1,j;const E=J=>{C&&C.readyState===1&&C.send(JSON.stringify(J))},M=k.onData(J=>E({type:"stdin",data:J})),R=k.onResize(({cols:J,rows:q})=>E({type:"resize",cols:J,rows:q})),Q=typeof ResizeObserver>"u"?void 0:new ResizeObserver(w);return Q==null||Q.observe(v),i(Hy,{host:n,container:e,cols:k.cols,rows:k.rows}).then(J=>{if(b){J.close(1e3);return}C=J,J.onopen=()=>{f({state:"open"}),E({type:"resize",cols:k.cols,rows:k.rows}),k.focus()},J.onmessage=q=>{let H;try{H=JSON.parse(String(q.data))}catch{return}(H.type==="stdout"||H.type==="stderr"||H.type==="output")&&typeof H.data=="string"?k.write(H.data):H.type==="exit"?(P=!0,k.write(`\r
79
+ \x1B[90m[${t("docker.term.exited",{code:H.code??0})}]\x1B[0m\r
80
+ `)):H.type==="error"&&(j=H.message??"",k.write(`\r
81
+ \x1B[31m${j}\x1B[0m\r
82
+ `))},J.onclose=q=>{b||f({state:"closed",message:j||(P?t("docker.term.ended"):q.code===1006?t("docker.term.refused"):t("docker.term.closed",{code:q.code}))})}}).catch(J=>{b||f({state:"closed",message:gr(J)})}),()=>{b=!0,Q==null||Q.disconnect(),M.dispose(),R.dispose(),C==null||C.close(1e3),k.dispose()}},[i,n,e,g,a]);const y=()=>{f({state:"connecting"}),p(v=>v+1)};return d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:[d.jsx("span",{role:"status",className:u.state==="open"?"text-success":u.state==="connecting"?"text-muted":"text-warning",children:u.state==="open"?t("docker.term.connected"):u.state==="connecting"?t("docker.term.connecting"):u.message}),u.state==="closed"&&d.jsx("button",{type:"button",className:Gt,onClick:y,children:t("docker.term.reconnect")})]}),d.jsx("div",{className:`${Ss} overflow-hidden p-2`,style:{background:"var(--qcli-background)"},children:d.jsx("div",{ref:c,"aria-label":t("docker.view.terminal"),className:"h-[26rem] w-full"})})]})}const ix=[100,500,1e3,2e3],nx=5e3,ox=2e3,cp=e=>`${e.time??""}|${e.stream}|${e.text}`;function ax({id:e}){const{t}=tt(),i=St(),{host:n}=Dt(),[a,c]=I.useState(100),[u,f]=I.useState(!0),[g,p]=I.useState(!0),[y,v]=I.useState([]),[k,S]=I.useState(null),[w,C]=I.useState(!0),[b,P]=I.useState(!1),j=I.useRef(void 0),E=I.useRef(new Set),M=I.useRef(!1),R=I.useRef(null),Q=I.useRef(!0),J=I.useCallback(async F=>{if(!M.current){M.current=!0;try{const ee=await qy(i,e,n,F||!j.current?{tail:a}:{tail:1e3,since:j.current});S(null),v($=>{const z=F?[]:$,K=F?ee.lines:ee.lines.filter(ne=>!E.current.has(cp(ne))),X=[...z,...K].slice(-nx),se=X[X.length-1];return se!=null&&se.time&&(j.current=se.time),E.current=new Set(X.slice(-200).map(cp)),K.length===0&&!F?$:X})}catch(ee){S(gr(ee))}finally{M.current=!1,C(!1)}}},[i,e,n,a]);I.useEffect(()=>{j.current=void 0,C(!0),J(!0)},[J]),ws(()=>void J(!1),ox,u&&!w),I.useEffect(()=>{const F=R.current;F&&u&&Q.current&&(F.scrollTop=F.scrollHeight)},[y,u]);const q=()=>{const F=R.current;F&&(Q.current=F.scrollHeight-F.scrollTop-F.clientHeight<40)},H=async()=>{try{await navigator.clipboard.writeText(y.map(F=>`${F.time?`${F.time} `:""}${F.text}`).join(`
83
+ `)),P(!0),setTimeout(()=>P(!1),1500)}catch{}};return d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[d.jsx(Tu,{label:t("docker.logs.tail"),value:String(a),onChange:F=>c(Number(F)),options:ix.map(F=>({value:String(F),label:t("docker.logs.lines",{count:F})}))}),d.jsxs("label",{className:"inline-flex items-center gap-2 text-xs text-muted min-h-8",children:[d.jsx("input",{type:"checkbox",role:"switch",checked:u,onChange:F=>f(F.target.checked)}),t("docker.logs.follow")]}),d.jsxs("label",{className:"inline-flex items-center gap-2 text-xs text-muted min-h-8",children:[d.jsx("input",{type:"checkbox",role:"switch",checked:g,onChange:F=>p(F.target.checked)}),t("docker.logs.wrap")]}),d.jsx("button",{type:"button",className:Gt,onClick:()=>void J(!0),children:t("docker.refresh")}),d.jsx("button",{type:"button",className:Gt,onClick:()=>void H(),disabled:y.length===0,children:t(b?"docker.copied":"docker.copy")}),u&&!w&&!k&&d.jsxs("span",{className:"text-[11px] text-success inline-flex items-center gap-1",children:[d.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-current"}),t("docker.logs.following")]})]}),k&&d.jsx(Ze,{compact:!0,title:t("docker.logs.failed"),error:k,onRetry:()=>void J(!0)}),d.jsx("div",{className:`${Ss} overflow-hidden`,children:w&&y.length===0?d.jsx("div",{className:"p-6 flex justify-center",children:d.jsx(In,{})}):d.jsx("pre",{ref:R,onScroll:q,"aria-label":t("docker.view.logs"),tabIndex:0,className:`m-0 p-3 max-h-[28rem] min-h-24 overflow-auto font-mono text-xs leading-5 text-text ${g?"whitespace-pre-wrap break-all":"whitespace-pre"}`,children:y.length===0?d.jsx("span",{className:"text-subtle",children:t("docker.logs.empty")}):y.map((F,ee)=>d.jsxs("div",{className:F.stream==="stderr"?"text-warning":void 0,children:[F.time&&d.jsx("span",{className:"text-subtle mr-2 select-none",children:F.time.replace("T"," ").replace(/\.\d+Z?$|Z$/,"")}),FS(F.text)]},ee))})})]})}function lx({id:e,running:t}){const{t:i}=tt(),n=St(),{host:a}=Dt(),[c,u]=I.useState(""),[f,g]=I.useState(""),[p,y]=I.useState(""),[v,k]=I.useState(!1),[S,w]=I.useState(null),[C,b]=I.useState(null),P=BS(c),j=async E=>{if(E.preventDefault(),!(P.length===0||v)){k(!0),b(null);try{w(await nS(n,e,{command:P,...f.trim()?{user:f.trim()}:{},...p.trim()?{workdir:p.trim()}:{}},a))}catch(M){w(null),b(gr(M))}finally{k(!1)}}};return d.jsxs("div",{className:"space-y-3",children:[!t&&d.jsx("p",{className:"text-sm text-warning",children:i("docker.run.notRunning")}),d.jsxs("form",{onSubmit:j,className:"space-y-2",children:[d.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[d.jsx("input",{"aria-label":i("docker.run.command"),placeholder:i("docker.run.placeholder"),value:c,onChange:E=>u(E.target.value),className:`${nr} font-mono sm:flex-1`,autoComplete:"off",spellCheck:!1}),d.jsx("button",{type:"submit",className:ys,disabled:v||!t||P.length===0,children:v?d.jsx(In,{}):i("docker.run.run")})]}),d.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[d.jsx("input",{"aria-label":i("docker.run.user"),placeholder:i("docker.run.user"),value:f,onChange:E=>g(E.target.value),className:`${nr} sm:max-w-[12rem]`}),d.jsx("input",{"aria-label":i("docker.run.workdir"),placeholder:i("docker.run.workdir"),value:p,onChange:E=>y(E.target.value),className:`${nr} sm:max-w-xs`})]})]}),d.jsx("p",{className:"text-[11px] text-subtle",children:i("docker.run.hint")}),C&&d.jsx(Ze,{compact:!0,title:i("docker.run.failed"),error:C}),S&&d.jsxs("div",{className:"space-y-2","aria-live":"polite",children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted",children:[i("docker.run.exitCode")," ",d.jsx(Xe,{variant:S.exitCode===0?"success":"error",children:S.exitCode}),S.truncated&&d.jsx("span",{className:"text-warning",children:i("docker.run.truncated")})]}),S.stdout&&d.jsx("pre",{"aria-label":"stdout",className:"font-mono text-xs bg-control/50 border border-border rounded-lg p-3 overflow-auto max-h-80 whitespace-pre-wrap break-all",children:S.stdout}),S.stderr&&d.jsx("pre",{"aria-label":"stderr",className:"font-mono text-xs text-warning bg-warning/[0.06] border border-warning/30 rounded-lg p-3 overflow-auto max-h-60 whitespace-pre-wrap break-all",children:S.stderr}),!S.stdout&&!S.stderr&&d.jsx("p",{className:"text-sm text-subtle",children:i("docker.run.noOutput")})]})]})}const cx=3e3,ux=60;function hx({id:e,running:t}){const{t:i,formatNumber:n,formatDate:a}=tt(),c=St(),{host:u}=Dt(),[f,g]=I.useState([]),[p,y]=I.useState(null),[v,k]=I.useState(null),S=I.useRef(!1),w=I.useCallback(async()=>{if(!S.current){S.current=!0;try{const R=await Ep(c,u,[e]),Q=R.stats.find(J=>J.id===e||J.id.startsWith(e))??R.stats[0];k(null),Q&&(y(Q),g(J=>[...J,{at:R.at&&Date.parse(R.at)||Date.now(),cpu:Q.cpuPercent,memory:Q.memoryBytes}].slice(-ux)))}catch(R){k(gr(R))}finally{S.current=!1}}},[c,u,e]);if(I.useEffect(()=>{t&&w()},[t,w]),ws(()=>void w(),cx,t),!t)return d.jsx(Yt,{message:i("docker.stats.notRunning")});if(v&&!p)return d.jsx(Ze,{title:i("docker.stats.failed"),error:v,onRetry:()=>void w()});if(!p)return d.jsx(Yt,{message:i("docker.stats.waiting")});const C=f.map(R=>R.at),b=R=>a(R,{hour:"2-digit",minute:"2-digit",second:"2-digit"}),P=R=>Dr(R,n),j=p.memoryLimitBytes>0?` / ${P(p.memoryLimitBytes)}`:"",E=[{key:"cpu",label:i("docker.col.cpu"),color:"var(--qcli-info)",values:f.map(R=>R.cpu)}],M=[{key:"mem",label:i("docker.col.memory"),color:"var(--qcli-success)",values:f.map(R=>R.memory)}];return d.jsxs("div",{className:"space-y-4",children:[v&&d.jsx(Ze,{compact:!0,title:i("docker.stats.failed"),error:v}),d.jsxs("div",{className:"flex flex-wrap gap-3",children:[d.jsx(_i,{label:i("docker.col.cpu"),value:`${n(p.cpuPercent,{maximumFractionDigits:1})}%`}),d.jsx(_i,{label:i("docker.col.memory"),value:P(p.memoryBytes),sub:`${n(p.memoryPercent,{maximumFractionDigits:1})}%${j}`}),d.jsx(_i,{label:i("docker.stats.network"),value:`↓ ${P(p.netRxBytes)}`,sub:`↑ ${P(p.netTxBytes)}`}),d.jsx(_i,{label:i("docker.stats.block"),value:`R ${P(p.blockReadBytes)}`,sub:`W ${P(p.blockWriteBytes)}`}),d.jsx(_i,{label:i("docker.stats.pids"),value:n(p.pids)})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[d.jsx(cm,{title:i("docker.stats.cpuChart"),legend:d.jsx(lm,{items:[{label:i("docker.col.cpu"),color:"var(--qcli-info)"}]}),children:d.jsx(um,{ariaLabel:i("docker.stats.cpuChart"),times:C,series:E,minMax:10,formatValue:R=>`${n(R,{maximumFractionDigits:1})}%`,formatTime:b,formatTick:b})}),d.jsx(cm,{title:i("docker.stats.memoryChart"),legend:d.jsx(lm,{items:[{label:i("docker.col.memory"),color:"var(--qcli-success)"}]}),children:d.jsx(um,{ariaLabel:i("docker.stats.memoryChart"),times:C,series:M,formatValue:P,formatTime:b,formatTick:b})})]})]})}function dx({id:e,view:t,go:i}){const{t:n}=tt(),a=St(),{host:c,can:u}=Dt(),f=Ht(()=>Ky(a,e,c),[a,e,c]);ws(f.refresh,5e3);const{controls:g,dialog:p}=Lp(f.refresh),y=d.jsxs("button",{type:"button",onClick:()=>i({container:void 0,view:void 0}),className:Gt,children:["← ",n("docker.back")]});if(f.loading&&!f.data)return d.jsx(xa,{label:n("docker.loading")});if(!f.data)return d.jsxs("div",{className:"space-y-3",children:[y,d.jsx(Ze,{title:n("docker.loadFailed"),error:f.error,onRetry:f.refetch})]});const v=f.data.container,{items:k,overflow:S}=g(v),w=u.exec&&!v.protected?[{id:"run",label:n("docker.view.run")},{id:"terminal",label:n("docker.view.terminal")}]:[],C=[{id:"summary",label:n("docker.view.summary")},{id:"logs",label:n("docker.view.logs")},{id:"stats",label:n("docker.view.stats")},...w],b=C.some(P=>P.id===t)?t:"summary";return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[y,d.jsx("h3",{className:"text-base font-semibold text-heading break-all",children:v.name}),d.jsx(Xe,{variant:fa(v.state),dot:!0,children:n(`docker.state.${v.state}`)}),v.health&&d.jsx(Xe,{variant:Pn(v.health),children:n(`docker.health.${v.health}`)}),v.protected&&d.jsx(Xe,{variant:"info",children:n("docker.protected")}),(k.length>0||S.length>0)&&d.jsx("div",{className:"ml-auto",children:d.jsx(Uc,{label:n("docker.actionsFor",{name:v.name}),items:k,overflow:S})})]}),f.error&&d.jsx(Ze,{compact:!0,title:n("docker.refreshFailed"),error:f.error}),d.jsxs("div",{className:Ss,children:[d.jsx(Tp,{tabs:C,active:b,label:v.name,onChange:P=>i({view:P==="summary"?void 0:P})}),d.jsxs("div",{className:"p-4",role:"tabpanel","aria-labelledby":`tab-${b}`,children:[b==="summary"&&d.jsx(fx,{c:v}),b==="logs"&&d.jsx(ax,{id:v.id}),b==="stats"&&d.jsx(hx,{id:v.id,running:v.state==="running"}),b==="run"&&d.jsx(lx,{id:v.id,running:v.state==="running"}),b==="terminal"&&(v.state==="running"?d.jsx(sx,{id:v.id}):d.jsx(Yt,{message:n("docker.run.notRunning")}))]})]}),p]})}function kn({title:e,children:t}){return d.jsxs("section",{className:"space-y-2",children:[d.jsx("h4",{className:"text-xs font-semibold text-subtle uppercase tracking-wide",children:e}),t]})}function fx({c:e}){const{t,formatDate:i}=tt(),n=a=>a?i(a):Le;return d.jsxs("div",{className:"space-y-6",children:[d.jsx(kn,{title:t("docker.section.container"),children:d.jsx(Iu,{items:[[t("docker.field.id"),d.jsx("span",{className:"font-mono text-xs",children:e.id},"id")],[t("docker.field.image"),e.image],[t("docker.field.status"),e.status],[t("docker.field.created"),n(e.createdAt)],[t("docker.field.started"),n(e.startedAt)],[t("docker.field.finished"),n(e.finishedAt)],[t("docker.field.exitCode"),e.exitCode===null?Le:String(e.exitCode)],[t("docker.field.restartPolicy"),`${e.restartPolicy||Le} · ${t("docker.restarts",{count:e.restartCount})}`],[t("docker.field.platform"),e.platform||Le],[t("docker.field.command"),d.jsx("span",{className:"font-mono text-xs",children:e.command.join(" ")||Le},"cmd")],...e.stack?[[t("docker.field.stack"),`${e.stack}${e.service?` / ${e.service}`:""}`]]:[]]})}),d.jsx(kn,{title:t("docker.section.ports"),children:e.ports.length===0?d.jsx("p",{className:"text-sm text-subtle",children:t("docker.none")}):d.jsx("ul",{className:"flex flex-wrap gap-2",children:e.ports.map((a,c)=>d.jsx("li",{className:"font-mono text-xs px-2 py-1 rounded-md bg-control border border-border",children:Mp(a)},c))})}),d.jsx(kn,{title:t("docker.section.mounts"),children:d.jsx($r,{plain:!0,data:e.mounts,keyExtractor:a=>`${a.destination}`,emptyMessage:d.jsx(Yt,{message:t("docker.none")}),columns:[{key:"type",header:t("docker.col.type"),render:a=>a.type},{key:"source",header:t("docker.col.source"),render:a=>d.jsx("span",{className:"font-mono text-xs break-all",children:a.source})},{key:"destination",header:t("docker.col.destination"),render:a=>d.jsx("span",{className:"font-mono text-xs break-all",children:a.destination})},{key:"rw",header:t("docker.col.mode"),render:a=>a.rw?"rw":"ro"}]})}),d.jsx(kn,{title:t("docker.section.networks"),children:d.jsx($r,{plain:!0,data:e.networks,keyExtractor:a=>a.name,emptyMessage:d.jsx(Yt,{message:t("docker.none")}),columns:[{key:"name",header:t("docker.col.name"),render:a=>a.name},{key:"ip",header:t("docker.col.ip"),render:a=>d.jsx("span",{className:"font-mono text-xs",children:a.ip||Le})},{key:"gateway",header:t("docker.col.gateway"),render:a=>d.jsx("span",{className:"font-mono text-xs",children:a.gateway||Le})},{key:"mac",header:t("docker.col.mac"),render:a=>d.jsx("span",{className:"font-mono text-xs",children:a.mac||Le})}]})}),d.jsx(kn,{title:t("docker.section.environment"),children:e.env.length===0?d.jsx("p",{className:"text-sm text-subtle",children:t("docker.none")}):d.jsx("pre",{className:"font-mono text-xs bg-control/50 border border-border rounded-lg p-3 overflow-x-auto whitespace-pre-wrap break-all",children:e.env.join(`
84
+ `)})})]})}const mx=5e3;function px({container:e,view:t,go:i}){return e?d.jsx(dx,{id:e,view:t,go:i}):d.jsx(gx,{go:i})}function gx({go:e}){var j;const{t,formatNumber:i}=tt(),n=St(),{host:a}=Dt(),[c,u]=hm("docker.containers.query",E=>E,()=>""),[f,g]=hm("docker.containers.showStopped",E=>E==="true",()=>!0),p=Ht(()=>bp(n,a,{all:!0}),[n,a]),y=Ht(()=>Ep(n,a).catch(()=>null),[n,a]);ws(()=>{p.refresh(),y.refresh()},mx);const{controls:v,dialog:k}=Lp(p.refresh),S=I.useMemo(()=>{var E;return new Map((((E=y.data)==null?void 0:E.stats)??[]).map(M=>[M.id,M]))},[y.data]),w=I.useMemo(()=>{var E;return OS(((E=p.data)==null?void 0:E.containers)??[],c,f)},[p.data,c,f]),C=E=>S.get(E.id);if(p.loading&&!p.data)return d.jsx(An,{rows:6,columns:7,label:t("docker.loading")});if(p.error&&!p.data)return d.jsx(Ze,{title:t("docker.loadFailed"),error:p.error,onRetry:p.refetch});const b=E=>e({container:E.id}),P=E=>[E.status,E.stack,fm(E.ports)].filter(Boolean).join(" · ");return d.jsxs("div",{className:"space-y-3",children:[d.jsxs(zn,{children:[d.jsx("input",{type:"search","aria-label":t("docker.search"),placeholder:t("docker.search"),value:c,onChange:E=>u(E.target.value),className:`${nr} sm:max-w-xs`}),d.jsxs("label",{className:"inline-flex items-center gap-2 text-xs text-muted min-h-8",children:[d.jsx("input",{type:"checkbox",role:"switch",checked:f,onChange:E=>g(E.target.checked)}),t("docker.showStopped")]}),d.jsx("span",{className:"text-xs text-subtle ml-auto",children:t("docker.containerCount",{count:w.length})})]}),p.error&&d.jsx(Ze,{compact:!0,title:t("docker.refreshFailed"),error:p.error}),d.jsx($r,{data:w,keyExtractor:E=>E.id,defaultSort:{key:"name",direction:"asc"},emptyMessage:d.jsx(Yt,{message:(((j=p.data)==null?void 0:j.containers.length)??0)===0?t("docker.noContainers"):t("docker.noMatch")}),columns:[{key:"name",header:t("docker.col.name"),sortValue:E=>E.name,render:E=>d.jsxs("div",{className:"min-w-0",children:[d.jsx("button",{type:"button",onClick:()=>b(E),className:`${Si} font-medium text-left whitespace-nowrap`,children:E.name}),E.protected&&d.jsx("span",{className:"ml-2 align-middle",children:d.jsx(Xe,{variant:"info",children:t("docker.protected")})}),d.jsx("div",{className:"hidden sm:block 2xl:hidden text-xs text-muted truncate max-w-[18rem] xl:max-w-[22rem]",title:P(E),children:P(E)}),d.jsxs(ki,{children:[d.jsx(Xe,{variant:fa(E.state),dot:!0,children:t(`docker.state.${E.state}`)}),E.health&&d.jsx(Xe,{variant:Pn(E.health),children:t(`docker.health.${E.health}`)}),d.jsx("span",{className:"basis-full truncate max-w-[12rem]",title:E.image,children:E.image}),C(E)&&d.jsxs("span",{className:"tabular-nums",children:[i(C(E).cpuPercent,{maximumFractionDigits:1}),"% · ",Dr(C(E).memoryBytes,i)]})]})]})},{key:"image",header:t("docker.col.image"),className:"hidden sm:table-cell",sortValue:E=>E.image,render:E=>d.jsx(Pr,{text:E.image,className:"text-xs",max:"max-w-[10rem] xl:max-w-[14rem] 2xl:max-w-[22rem]"})},{key:"state",header:t("docker.col.state"),className:"hidden sm:table-cell",sortValue:E=>E.state,render:E=>d.jsxs("div",{className:"flex flex-col items-start gap-1",children:[d.jsx(Xe,{variant:fa(E.state),dot:!0,children:t(`docker.state.${E.state}`)}),E.health&&d.jsx("span",{className:"2xl:hidden",children:d.jsx(Xe,{variant:Pn(E.health),children:t(`docker.health.${E.health}`)})})]})},{key:"status",header:t("docker.col.status"),className:"hidden 2xl:table-cell",render:E=>d.jsx("span",{className:"text-xs text-muted whitespace-nowrap",children:E.status})},{key:"health",header:t("docker.col.health"),className:"hidden 2xl:table-cell",render:E=>E.health?d.jsx(Xe,{variant:Pn(E.health),children:t(`docker.health.${E.health}`)}):d.jsx("span",{className:"text-subtle",children:Le})},{key:"ports",header:t("docker.col.ports"),className:"hidden 2xl:table-cell",render:E=>d.jsx(Pr,{text:fm(E.ports)||Le,className:"text-xs font-mono",max:"max-w-[12rem]"})},{key:"stack",header:t("docker.col.stack"),className:"hidden 2xl:table-cell",sortValue:E=>E.stack,render:E=>E.stack?d.jsx("button",{type:"button",onClick:()=>e({tab:"stacks",stack:E.stack??void 0}),className:`${Si} text-xs whitespace-nowrap`,children:E.stack}):d.jsx("span",{className:"text-subtle",children:Le})},{key:"cpu",header:t("docker.col.cpu"),className:"hidden xl:table-cell",sortValue:E=>{var M;return((M=C(E))==null?void 0:M.cpuPercent)??null},render:E=>d.jsx("span",{className:"tabular-nums text-xs",children:C(E)?`${i(C(E).cpuPercent,{maximumFractionDigits:1})}%`:Le})},{key:"memory",header:t("docker.col.memory"),className:"hidden xl:table-cell",sortValue:E=>{var M;return((M=C(E))==null?void 0:M.memoryBytes)??null},render:E=>d.jsx("span",{className:"tabular-nums text-xs whitespace-nowrap",children:C(E)?Dr(C(E).memoryBytes,i):Le})},{key:"actions",header:"",render:E=>{const{items:M,overflow:R}=v(E);return d.jsx(xi,{label:t("docker.actionsFor",{name:E.name}),items:M,overflow:R})}}]}),k]})}function _x(e){const{target:t}=e;return t?d.jsx(vx,{...e,target:t},t.kind==="edit"?t.name:"\0new"):null}function vx({target:e,taken:t,onClose:i,onSaved:n,onDeployFailed:a}){const{t:c}=tt(),u=St(),{host:f}=Dt(),[g,p]=I.useState(""),[y,v]=I.useState(""),k=e.kind==="edit"?e.name:null,[S,w]=I.useState(k!==null),[C,b]=I.useState(null),[P,j]=I.useState(null),[E,M]=I.useState(null),R=I.useRef(null);I.useEffect(()=>{if(!k)return;let $=!0;return Dp(u,k,f).then(z=>{var K;return $&&v(((K=z.composeFile)==null?void 0:K.content)??"")}).catch(z=>$&&b(gr(z))).finally(()=>$&&w(!1)),()=>{$=!1}},[u,f,k]);const Q=g.trim(),J=k||!Q?null:LS.test(Q)?t.includes(Q)?c("docker.stackNameTaken"):null:c("docker.stackNameInvalid"),q=k??Q,H=!!q&&!J&&y.trim()!==""&&!S&&!C&&E===null,F=async $=>{j(null),M($?"deploy":"save");try{await gS(u,q,y,f)}catch(z){j(gr(z)),M(null);return}if(!$){M(null),n(q);return}try{const{operation:z}=await Np(u,q,{pull:!1},f);M(null),n(q,z)}catch(z){M(null),a(q,gr(z))}},ee=$=>{if($.key!=="Tab"||$.shiftKey||$.ctrlKey||$.metaKey||$.altKey)return;$.preventDefault();const z=$.currentTarget;z.setRangeText(" ",z.selectionStart,z.selectionEnd,"end"),v(z.value)};return d.jsx(ka,{open:!0,onClose:()=>E===null&&i(),title:k?c("docker.editStackTitle",{name:k}):c("docker.newStack"),size:"lg",actions:d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",className:Gt,disabled:E!==null,onClick:i,children:c("docker.cancel")}),d.jsx("button",{type:"button",className:Gt,disabled:!H,onClick:()=>void F(!1),children:c(E==="save"?"docker.saving":"docker.save")}),d.jsx("button",{type:"button",className:ys,disabled:!H,onClick:()=>void F(!0),children:c(E==="deploy"?"docker.saving":"docker.saveDeploy")})]}),children:d.jsxs("div",{className:"space-y-3",children:[!k&&d.jsxs("div",{className:"space-y-1",children:[d.jsx("label",{htmlFor:"docker-stack-name",className:"block text-xs text-muted",children:c("docker.stackName")}),d.jsx("input",{id:"docker-stack-name",value:g,onChange:$=>p($.target.value),className:nr,autoFocus:!0,autoComplete:"off",spellCheck:!1,maxLength:63,"aria-invalid":J?!0:void 0,"aria-describedby":"docker-stack-name-hint"}),d.jsx("span",{id:"docker-stack-name-hint",className:J?"block text-xs text-error":"block text-xs text-subtle",children:J??c("docker.stackNameHint")})]}),S?d.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted",children:[d.jsx(In,{}),c("docker.loading")]}):C?d.jsx("p",{role:"alert",className:"text-sm text-error break-all",children:C}):d.jsxs("label",{className:"block text-xs text-muted space-y-1",children:[c("docker.composeYaml"),d.jsx("textarea",{ref:R,value:y,onChange:$=>v($.target.value),onKeyDown:ee,spellCheck:!1,autoCapitalize:"off",autoCorrect:"off",wrap:"off",placeholder:`services:
85
+ web:
86
+ image: nginx:latest
87
+ ports:
88
+ - "8080:80"`,className:`${nr} min-h-[16rem] sm:min-h-[22rem] resize-y font-mono text-xs leading-5 whitespace-pre overflow-auto`})]}),P&&d.jsx("pre",{role:"alert",className:"m-0 p-2 rounded-lg bg-control text-xs font-mono text-error whitespace-pre-wrap break-words max-h-48 overflow-auto",children:P})]})})}const yx=2e3,Sx=5;function wx(e){const t=e.data??e;return t&&typeof t.id=="string"&&typeof t.state=="string"?t:null}function Vu(e,t){const i=St(),{hostInfo:n}=Dt(),{onServerEvent:a}=Tt(),c=n==null?void 0:n.name,[u,f]=I.useState([]),g=I.useRef(t);I.useEffect(()=>{g.current=t});const p=I.useRef(new Map),[y,v]=I.useState(()=>new Set),k=I.useCallback(b=>{const P=p.current.get(b.id);p.current.set(b.id,b.state),v(j=>j.has(b.id)?j:new Set(j).add(b.id)),f(j=>j.some(E=>E.id===b.id)?j.map(E=>E.id===b.id?b:E):[b,...j]),(b.state!=="running"&&P!==b.state&&P!==void 0||b.state!=="running"&&P===void 0)&&g.current()},[]);I.useEffect(()=>{let b=!0;return Jy(i).then(P=>{if(b){for(const j of P.operations)p.current.set(j.id,j.state);f(P.operations),v(j=>new Set([...j,...P.operations.filter(E=>E.state==="running").map(E=>E.id)]))}}).catch(()=>{}),()=>{b=!1}},[i]),I.useEffect(()=>a("docker:operation",b=>{const P=wx(b);P&&k(P)}),[a,k]);const S=e.join(),w=I.useMemo(()=>u.filter(b=>y.has(b.id)&&S.split(",").includes(b.kind)&&(!c||b.host===c)).slice(0,Sx),[u,y,c,S]),C=w.filter(b=>b.state==="running");return ws(()=>{for(const b of C)eS(i,b.id).then(P=>k(P.operation)).catch(()=>{})},yx,C.length>0),{operations:w,track:k}}function kx({lines:e,label:t}){const i=I.useRef(null);return I.useEffect(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[e]),d.jsx("pre",{ref:i,"aria-label":t,tabIndex:0,className:"m-0 p-2 h-40 overflow-auto rounded-lg bg-control font-mono text-xs leading-5 text-text whitespace-pre-wrap break-words",children:e.map(n=>n.trimStart()).join(`
89
+ `)})}function Ku({operations:e}){const{t,formatNumber:i}=tt();return e.length===0?null:d.jsx("ul",{className:"space-y-2","aria-label":t("docker.operations"),children:e.map(n=>{var c;const a=AS(n.progress);return d.jsxs("li",{className:`${Ss} p-3 space-y-2`,children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[d.jsx("span",{className:"text-sm text-heading font-medium break-all",children:n.title}),d.jsx(Xe,{variant:n.state==="done"?"success":n.state==="failed"?"error":"info",dot:n.state==="running",children:t(`docker.op.${n.state}`)})]}),n.kind==="stack-up"&&d.jsxs(d.Fragment,{children:[n.state==="running"&&d.jsx("div",{className:"text-xs text-muted break-all",children:n.message??((c=n.log)==null?void 0:c[n.log.length-1])??t("docker.op.working")}),n.log&&n.log.length>0&&d.jsx(kx,{lines:n.log,label:t("docker.op.output",{title:n.title})}),n.state==="failed"&&d.jsx("div",{className:"text-xs text-error font-mono break-all whitespace-pre-wrap",children:n.error??n.message})]}),n.kind!=="stack-up"&&n.state==="running"&&d.jsxs(d.Fragment,{children:[d.jsx(HS,{value:a,label:n.title}),d.jsx("div",{className:"text-[11px] text-subtle tabular-nums",children:n.progress&&n.progress.total>0?`${Dr(n.progress.current,i)} / ${Dr(n.progress.total,i)} · ${a}%`:n.message??t("docker.op.working")})]}),n.kind!=="stack-up"&&n.state==="done"&&n.message&&d.jsx("div",{className:"text-xs text-muted break-all",children:n.message}),n.kind!=="stack-up"&&n.state==="failed"&&d.jsx("div",{className:"text-xs text-error font-mono break-all",children:n.error??n.message})]},n.id)})})}function xx({stack:e,go:t}){return e?d.jsx(bx,{name:e,go:t}):d.jsx(Cx,{go:t})}function up({onChange:e,label:t}){return d.jsxs("label",{className:"mt-3 inline-flex items-center gap-2 text-sm text-text",children:[d.jsx("input",{type:"checkbox",role:"switch",defaultChecked:!1,onChange:i=>e(i.target.checked)}),t]})}function Cg({compose:e}){const{t}=tt(),{hasPermission:i}=Tt();return!e||e.available?null:d.jsxs("div",{role:"status",className:`${Ss} p-3 space-y-1`,children:[d.jsx("div",{className:"text-sm font-medium text-heading",children:t("docker.composeUnavailable")}),d.jsx("p",{className:"text-sm text-muted break-words",children:e.error??t("docker.composeUnavailableHint")}),i("config:read")&&d.jsxs("a",{href:Lu(),className:`${Si} text-sm inline-block`,children:[t("docker.openSettings")," ↗"]})]})}function bg(e,t,i){var q;const{t:n}=tt(),a=St(),{host:c,can:u}=Dt(),{notify:f}=Tt(),{confirm:g,dialog:p}=Bn(),{busy:y,run:v}=On(),k=Ht(()=>Xy(a,c),[a,c]),S=u.admin&&((q=k.data)==null?void 0:q.available)===!0,[w,C]=I.useState(null),[b,P]=I.useState([]),j=I.useCallback(async(H,F)=>{let ee=[];await v(`${H.name}:${F}`,async()=>{ee=(await sS(a,H.name,F,c)).results.filter(K=>!K.ok).map(K=>`${K.container}: ${K.error??""}`)})&&(ee.length>0?f(`${n("docker.stackPartial",{name:H.name})} ${ee.join("; ")}`,"error"):f(n("docker.actionDone",{action:n(`docker.action.${F}`),name:H.name}),"success")),e()},[a,c,v,f,n,e]),E=I.useCallback(H=>{const F=S&&H.composeFile!==null,ee={volumes:!1};g({title:n("docker.stackDownTitle",{name:H.name}),message:F?d.jsxs(d.Fragment,{children:[d.jsx("p",{children:n("docker.stackDownFileMessage")}),d.jsx(up,{onChange:$=>{ee.volumes=$},label:n("docker.removeVolumes")})]}):n("docker.stackDownMessage"),confirmLabel:n("docker.stackDown"),tone:"danger",onConfirm:async()=>{let $=[];await v(`${H.name}:down`,async()=>void($=(await pS(a,H.name,c,F?{volumes:ee.volumes}:void 0)).errors))&&(f($.length?`${n("docker.stackPartial",{name:H.name})} ${$.join("; ")}`:n("docker.stackDownDone",{name:H.name}),$.length?"error":"success"),e())}})},[S,g,n,v,a,c,f,e]),M=I.useCallback(H=>{const F={pull:!1};g({title:n("docker.deployTitle",{name:H.name}),message:d.jsxs(d.Fragment,{children:[d.jsx("p",{children:n("docker.deployMessage")}),d.jsx(up,{onChange:ee=>{F.pull=ee},label:n("docker.pullImages")})]}),confirmLabel:n("docker.stackDeploy"),onConfirm:async()=>{await v(`${H.name}:deploy`,async()=>t((await Np(a,H.name,{pull:F.pull},c)).operation),n("docker.deployStarted",{name:H.name}))&&e()}})},[g,n,v,t,a,c,e]),R=I.useCallback(H=>void g({title:n("docker.deleteFileTitle",{name:H.name}),message:n("docker.deleteFileMessage"),confirmLabel:n("docker.stackDeleteFile"),tone:"danger",onConfirm:async()=>{await v(`${H.name}:delete`,()=>_S(a,H.name,c),n("docker.fileDeleted",{name:H.name}))&&(e(),i==null||i())}}),[g,n,v,a,c,e,i]),Q=I.useCallback(H=>{const F=[],ee=(z,K,X,se)=>({key:z,label:K,tone:se,ariaLabel:`${K} ${H.name}`,disabled:y!==null,loading:y===`${H.name}:${z}`,onClick:ne=>{ne.stopPropagation(),X()}}),$=H.state!=="down";return u.manage&&$&&(F.push(ee("start",n("docker.action.start"),()=>void j(H,"start"),"success")),F.push(ee("stop",n("docker.action.stop"),()=>void j(H,"stop"))),F.push(ee("restart",n("docker.action.restart"),()=>void j(H,"restart"))),F.push(ee("pull",n("docker.pull"),()=>void v(`${H.name}:pull`,async()=>t((await iS(a,H.name,c)).operation),n("docker.pullStarted",{name:H.name}))))),S&&H.composeFile!==null&&(F.push(ee("edit",n("docker.stackEdit"),()=>{P([]),C({kind:"edit",name:H.name})})),F.push(ee("deploy",n("docker.stackDeploy"),()=>M(H),"success"))),u.admin&&$&&F.push(ee("down",n("docker.stackDown"),()=>E(H),"danger")),S&&H.composeFile!==null&&!$&&F.push(ee("delete",n("docker.stackDeleteFile"),()=>R(H),"danger")),F},[u.manage,u.admin,S,y,j,v,t,a,c,n,M,E,R]),J=d.jsx(_x,{target:w,taken:b,onClose:()=>C(null),onSaved:(H,F)=>{C(null),f(n("docker.composeSaved",{name:H}),"success"),F&&t(F),e()},onDeployFailed:(H,F)=>{C(null),f(`${n("docker.composeSaved",{name:H})} ${F}`,"error"),e()}});return{controls:Q,compose:k.data??void 0,canCompose:S,newStack:H=>{P(H),C({kind:"new"})},dialog:d.jsxs(d.Fragment,{children:[p,J]})}}function Cx({go:e}){const{t}=tt(),i=St(),{host:n}=Dt(),a=Ht(()=>Gy(i,n),[i,n]);ws(a.refresh,1e4);const{operations:c,track:u}=Vu(["stack-pull","stack-up"],a.refresh),{controls:f,dialog:g,compose:p,canCompose:y,newStack:v}=bg(a.refresh,u),k=I.useMemo(()=>{var S;return((S=a.data)==null?void 0:S.stacks)??[]},[a.data]);return a.loading&&!a.data?d.jsx(An,{rows:4,columns:5,label:t("docker.loading")}):a.data?d.jsxs("div",{className:"space-y-3",children:[d.jsx(Cg,{compose:p}),y&&d.jsx(zn,{children:d.jsx("button",{type:"button",className:ys,onClick:()=>v(k.map(S=>S.name)),children:t("docker.newStack")})}),d.jsx(Ku,{operations:c}),a.error&&d.jsx(Ze,{compact:!0,title:t("docker.refreshFailed"),error:a.error}),d.jsx($r,{data:k,keyExtractor:S=>S.name,defaultSort:{key:"name",direction:"asc"},emptyMessage:d.jsx(Yt,{message:t("docker.noStacks"),detail:t("docker.noStacksHint")}),columns:[{key:"name",header:t("docker.col.name"),sortValue:S=>S.name,render:S=>d.jsxs("div",{children:[d.jsx("button",{type:"button",onClick:()=>e({stack:S.name}),className:`${Si} font-medium whitespace-nowrap`,children:S.name}),d.jsxs(ki,{children:[d.jsx(Xe,{variant:Wc(S.state),dot:!0,children:t(`docker.stackState.${S.state}`)}),d.jsxs("span",{className:"tabular-nums",children:[S.running," / ",S.containers]})]})]})},{key:"state",header:t("docker.col.state"),className:"hidden sm:table-cell",sortValue:S=>S.state,render:S=>d.jsx(Xe,{variant:Wc(S.state),dot:!0,children:t(`docker.stackState.${S.state}`)})},{key:"containers",header:t("docker.col.containers"),className:"hidden sm:table-cell",sortValue:S=>S.containers,render:S=>d.jsxs("span",{className:"tabular-nums",children:[S.running," / ",S.containers]})},{key:"services",header:t("docker.col.services"),className:"hidden md:table-cell",render:S=>d.jsx(Pr,{text:S.services.join(", ")||Le,className:"text-xs text-muted"})},{key:"actions",header:"",render:S=>{const w=f(S);return d.jsx(xi,{label:t("docker.actionsFor",{name:S.name}),items:w})}}]}),g]}):d.jsx(Ze,{title:t("docker.loadFailed"),error:a.error,onRetry:a.refetch})}function bx({name:e,go:t}){const{t:i}=tt(),n=St(),{host:a}=Dt(),{hasPermission:c}=Tt(),u=Ht(()=>Dp(n,e,a),[n,e,a]);ws(u.refresh,1e4);const{operations:f,track:g}=Vu(["stack-pull","stack-up"],u.refresh),{controls:p,dialog:y,compose:v}=bg(u.refresh,g,()=>t({stack:void 0})),k=d.jsxs("button",{type:"button",onClick:()=>t({stack:void 0}),className:Gt,children:["← ",i("docker.back")]});if(u.loading&&!u.data)return d.jsx(xa,{label:i("docker.loading")});if(!u.data)return d.jsxs("div",{className:"space-y-3",children:[k,d.jsx(Ze,{title:i("docker.loadFailed"),error:u.error,onRetry:u.refetch})]});const{stack:S,containers:w,composeFile:C}=u.data,b=p(S);return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[k,d.jsx("h3",{className:"text-base font-semibold text-heading break-all",children:S.name}),d.jsx(Xe,{variant:Wc(S.state),dot:!0,children:i(`docker.stackState.${S.state}`)}),b.length>0&&d.jsx("div",{className:"ml-auto",children:d.jsx(xi,{label:i("docker.actionsFor",{name:S.name}),items:b})})]}),d.jsx(Cg,{compose:v}),d.jsx(Ku,{operations:f}),d.jsx("div",{className:`${Ss} p-4`,children:d.jsx(Iu,{items:[[i("docker.col.containers"),`${S.running} / ${S.containers}`],[i("docker.col.services"),S.services.join(", ")||Le],[i("docker.field.workingDir"),S.workingDir?d.jsx("span",{className:"font-mono text-xs",children:S.workingDir},"wd"):Le],[i("docker.field.configFiles"),S.configFiles.length?d.jsx("span",{className:"font-mono text-xs",children:S.configFiles.join(", ")},"cf"):Le]]})}),d.jsx($r,{data:w,keyExtractor:P=>P.id,emptyMessage:d.jsx(Yt,{message:i("docker.noContainers")}),columns:[{key:"name",header:i("docker.col.name"),render:P=>d.jsxs("div",{children:[d.jsx("button",{type:"button",onClick:()=>t({tab:"containers",container:P.id,stack:void 0}),className:`${Si} font-medium whitespace-nowrap`,children:P.name}),d.jsx(ki,{children:d.jsx(Pr,{text:P.image,className:"text-xs",max:"max-w-[12rem]"})})]})},{key:"service",header:i("docker.col.service"),className:"hidden sm:table-cell",render:P=>P.service??Le},{key:"image",header:i("docker.col.image"),className:"hidden sm:table-cell",render:P=>d.jsx(Pr,{text:P.image,className:"text-xs"})},{key:"state",header:i("docker.col.state"),render:P=>d.jsx(Xe,{variant:fa(P.state),dot:!0,children:i(`docker.state.${P.state}`)})},{key:"health",header:i("docker.col.health"),className:"hidden sm:table-cell",render:P=>P.health?d.jsx(Xe,{variant:Pn(P.health),children:i(`docker.health.${P.health}`)}):Le},{key:"status",header:i("docker.col.status"),className:"hidden md:table-cell",render:P=>d.jsx("span",{className:"text-xs text-muted whitespace-nowrap",children:P.status})}]}),d.jsxs("section",{className:"space-y-2",children:[d.jsx("h4",{className:"text-xs font-semibold text-subtle uppercase tracking-wide",children:i("docker.composeFile")}),C?d.jsxs("div",{className:`${Ss} overflow-hidden`,children:[d.jsx("div",{className:"px-3 py-2 border-b border-border/75 text-xs font-mono text-subtle break-all",children:C.path}),d.jsx("pre",{"aria-label":i("docker.composeFile"),tabIndex:0,className:"m-0 p-3 max-h-[28rem] overflow-auto font-mono text-xs leading-5 text-text whitespace-pre",children:C.content})]}):d.jsxs("p",{className:"text-sm text-subtle",children:[i("docker.noComposeFile"),c("config:read")&&d.jsxs(d.Fragment,{children:[" ",d.jsxs("a",{href:Lu(),className:Si,children:[i("docker.openSettings")," ↗"]})]})]})]}),y]})}function Ex(){const{t:e,formatNumber:t,formatDate:i}=tt(),n=St(),{host:a,can:c}=Dt(),{notify:u}=Tt(),f=Ht(()=>Yy(n,a),[n,a]),{confirm:g,dialog:p}=Bn(),{busy:y,run:v}=On(),[k,S]=I.useState(""),{operations:w,track:C}=Vu(["pull"],f.refresh),b=I.useMemo(()=>{var M;return((M=f.data)==null?void 0:M.images)??[]},[f.data]),P=async M=>{M.preventDefault();const R=k.trim();R&&await v("pull",async()=>C((await rS(n,R,a)).operation))&&S("")},j=M=>{const R=M.tags[0]??M.shortId;g({title:e("docker.removeImageTitle",{name:R}),message:M.containers>0?e("docker.removeImageUsed",{count:M.containers}):e("docker.removeImageMessage"),confirmLabel:e("docker.action.remove"),tone:"danger",onConfirm:async()=>{await v(`rm:${M.id}`,()=>aS(n,M.id,a,M.containers>0),e("docker.removed",{name:R}))&&f.refresh()}})},E=M=>void g({title:e(M?"docker.pruneImagesAllTitle":"docker.pruneImagesTitle"),message:e(M?"docker.pruneImagesAllMessage":"docker.pruneImagesMessage"),confirmLabel:e("docker.prune"),tone:"danger",onConfirm:async()=>{let R;await v("prune",async()=>void(R=await lS(n,a,M)))&&(u(e("docker.pruned",{count:(R==null?void 0:R.removed.length)??0,size:Dr((R==null?void 0:R.reclaimedBytes)??0,t)}),"success"),f.refresh())}});return f.loading&&!f.data?d.jsx(An,{rows:5,columns:6,label:e("docker.loading")}):f.data?d.jsxs("div",{className:"space-y-3",children:[d.jsxs(zn,{children:[c.manage&&d.jsxs("form",{onSubmit:P,className:"flex flex-1 min-w-[16rem] gap-2",children:[d.jsx("input",{"aria-label":e("docker.pullImage"),placeholder:e("docker.pullPlaceholder"),value:k,onChange:M=>S(M.target.value),className:`${nr} sm:max-w-sm`,autoComplete:"off",spellCheck:!1}),d.jsx("button",{type:"submit",className:ys,disabled:y!==null||!k.trim(),children:e("docker.pull")})]}),c.admin&&d.jsxs("div",{className:"flex gap-2 ml-auto",children:[d.jsx("button",{type:"button",className:Gt,disabled:y!==null,onClick:()=>E(!1),children:e("docker.pruneDangling")}),d.jsx("button",{type:"button",className:Gt,disabled:y!==null,onClick:()=>E(!0),children:e("docker.pruneUnused")})]})]}),d.jsx(Ku,{operations:w}),f.error&&d.jsx(Ze,{compact:!0,title:e("docker.refreshFailed"),error:f.error}),d.jsx($r,{data:b,keyExtractor:M=>M.id,defaultSort:{key:"created",direction:"desc"},emptyMessage:d.jsx(Yt,{message:e("docker.noImages")}),columns:[{key:"tags",header:e("docker.col.image"),sortValue:M=>M.tags[0]??null,render:M=>d.jsxs("div",{className:"space-y-0.5",children:[M.tags.length===0?d.jsx("span",{className:"text-subtle",children:"<none>"}):M.tags.map(R=>d.jsx(Pr,{text:R,className:"text-sm",max:"max-w-[16rem] xl:max-w-[28rem]"},R)),M.dangling&&d.jsx(Xe,{variant:"warning",children:e("docker.dangling")}),d.jsxs(ki,{children:[d.jsx("span",{className:"tabular-nums",children:Dr(M.sizeBytes,t)}),d.jsxs("span",{children:[e("docker.col.usedBy"),": ",M.containers]})]})]})},{key:"id",header:e("docker.col.id"),className:"hidden md:table-cell",render:M=>d.jsx("span",{className:"font-mono text-xs",children:M.shortId})},{key:"size",header:e("docker.col.size"),className:"hidden sm:table-cell",sortValue:M=>M.sizeBytes,render:M=>d.jsx("span",{className:"tabular-nums text-xs whitespace-nowrap",children:Dr(M.sizeBytes,t)})},{key:"created",header:e("docker.col.created"),className:"hidden md:table-cell",sortValue:M=>M.createdAt?Date.parse(M.createdAt):null,render:M=>d.jsx("span",{className:"text-xs text-muted whitespace-nowrap",children:M.createdAt?i(M.createdAt):Le})},{key:"used",header:e("docker.col.usedBy"),className:"hidden sm:table-cell",sortValue:M=>M.containers,render:M=>d.jsx("span",{className:"tabular-nums",children:M.containers})},{key:"actions",header:"",render:M=>c.admin?d.jsx(xi,{label:e("docker.actionsFor",{name:M.tags[0]??M.shortId}),items:[{key:"rm",label:e("docker.action.remove"),tone:"danger",ariaLabel:`${e("docker.action.remove")} ${M.tags[0]??M.shortId}`,disabled:y!==null,onClick:()=>j(M)}]}):null}]}),p]}):d.jsx(Ze,{title:e("docker.loadFailed"),error:f.error,onRetry:f.refetch})}function Dx(){const{t:e,formatNumber:t,formatDate:i}=tt(),n=St(),{host:a,can:c}=Dt(),{notify:u}=Tt(),f=Ht(()=>Zy(n,a),[n,a]),{confirm:g,dialog:p}=Bn(),{busy:y,run:v}=On(),[k,S]=I.useState(!1),[w,C]=I.useState(""),[b,P]=I.useState(""),j=async R=>{R.preventDefault(),await v("create",()=>cS(n,{name:w.trim(),...b.trim()?{driver:b.trim()}:{}},a),e("docker.created",{name:w.trim()}))&&(S(!1),C(""),P(""),f.refresh())},E=R=>void g({title:e("docker.removeVolumeTitle",{name:R.name}),message:R.inUse?e("docker.removeVolumeInUse"):e("docker.removeVolumeMessage"),confirmLabel:e("docker.action.remove"),tone:"danger",onConfirm:async()=>{await v(`rm:${R.name}`,()=>uS(n,R.name,a),e("docker.removed",{name:R.name}))&&f.refresh()}}),M=()=>void g({title:e("docker.pruneVolumesTitle"),message:e("docker.pruneVolumesMessage"),confirmLabel:e("docker.prune"),tone:"danger",onConfirm:async()=>{let R;await v("prune",async()=>void(R=await hS(n,a)))&&(u(e("docker.pruned",{count:(R==null?void 0:R.removed.length)??0,size:Dr((R==null?void 0:R.reclaimedBytes)??0,t)}),"success"),f.refresh())}});return f.loading&&!f.data?d.jsx(An,{rows:4,columns:5,label:e("docker.loading")}):f.data?d.jsxs("div",{className:"space-y-3",children:[c.admin&&d.jsxs(zn,{children:[d.jsx("button",{type:"button",className:ys,onClick:()=>S(!0),children:e("docker.createVolume")}),d.jsx("button",{type:"button",className:`${Gt} ml-auto`,disabled:y!==null,onClick:M,children:e("docker.pruneVolumes")})]}),d.jsx($r,{data:f.data.volumes,keyExtractor:R=>R.name,defaultSort:{key:"name",direction:"asc"},emptyMessage:d.jsx(Yt,{message:e("docker.noVolumes")}),columns:[{key:"name",header:e("docker.col.name"),sortValue:R=>R.name,render:R=>d.jsxs("div",{children:[d.jsx(Pr,{text:R.name,className:"font-medium",max:"max-w-[14rem] xl:max-w-[24rem]"}),d.jsxs(ki,{children:[d.jsx(Xe,{variant:R.inUse?"success":"neutral",children:R.inUse?e("docker.inUse"):e("docker.unused")}),d.jsx("span",{children:R.driver})]})]})},{key:"driver",header:e("docker.col.driver"),className:"hidden sm:table-cell",sortValue:R=>R.driver,render:R=>R.driver},{key:"inUse",header:e("docker.col.state"),className:"hidden sm:table-cell",sortValue:R=>String(R.inUse),render:R=>d.jsx(Xe,{variant:R.inUse?"success":"neutral",children:R.inUse?e("docker.inUse"):e("docker.unused")})},{key:"stack",header:e("docker.col.stack"),className:"hidden md:table-cell",render:R=>R.stack??d.jsx("span",{className:"text-subtle",children:Le})},{key:"mountpoint",header:e("docker.col.mountpoint"),className:"hidden lg:table-cell",render:R=>d.jsx(Pr,{text:R.mountpoint||Le,className:"font-mono text-xs"})},{key:"created",header:e("docker.col.created"),className:"hidden lg:table-cell",sortValue:R=>R.createdAt?Date.parse(R.createdAt):null,render:R=>d.jsx("span",{className:"text-xs text-muted whitespace-nowrap",children:R.createdAt?i(R.createdAt):Le})},{key:"actions",header:"",render:R=>c.admin?d.jsx(xi,{label:e("docker.actionsFor",{name:R.name}),items:[{key:"rm",label:e("docker.action.remove"),tone:"danger",ariaLabel:`${e("docker.action.remove")} ${R.name}`,disabled:y!==null,onClick:()=>E(R)}]}):null}]}),d.jsx(ka,{open:k,onClose:()=>S(!1),title:e("docker.createVolume"),actions:d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",className:Gt,onClick:()=>S(!1),children:e("docker.cancel")}),d.jsx("button",{type:"submit",form:"docker-volume-form",className:ys,disabled:y!==null||!w.trim(),children:e("docker.create")})]}),children:d.jsxs("form",{id:"docker-volume-form",onSubmit:j,className:"space-y-3",children:[d.jsxs("label",{className:"block text-xs text-muted space-y-1",children:[e("docker.col.name"),d.jsx("input",{value:w,onChange:R=>C(R.target.value),className:nr,autoFocus:!0,autoComplete:"off",required:!0})]}),d.jsxs("label",{className:"block text-xs text-muted space-y-1",children:[e("docker.col.driver"),d.jsx("input",{value:b,onChange:R=>P(R.target.value),placeholder:"local",className:nr,autoComplete:"off"})]})]})}),p]}):d.jsx(Ze,{title:e("docker.loadFailed"),error:f.error,onRetry:f.refetch})}function Nx(){const{t:e,formatDate:t}=tt(),i=St(),{host:n,can:a}=Dt(),{notify:c}=Tt(),u=Ht(()=>Qy(i,n),[i,n]),{confirm:f,dialog:g}=Bn(),{busy:p,run:y}=On(),[v,k]=I.useState(!1),[S,w]=I.useState(""),[C,b]=I.useState(""),[P,j]=I.useState(""),[E,M]=I.useState(!1),R=async q=>{q.preventDefault();const H={name:S.trim(),...C.trim()?{driver:C.trim()}:{},...E?{internal:!0}:{},...P.trim()?{subnet:P.trim()}:{}};await y("create",()=>dS(i,H,n),e("docker.created",{name:S.trim()}))&&(k(!1),w(""),b(""),j(""),M(!1),u.refresh())},Q=q=>void f({title:e("docker.removeNetworkTitle",{name:q.name}),message:e("docker.removeNetworkMessage"),confirmLabel:e("docker.action.remove"),tone:"danger",onConfirm:async()=>{await y(`rm:${q.id}`,()=>fS(i,q.id,n),e("docker.removed",{name:q.name}))&&u.refresh()}}),J=()=>void f({title:e("docker.pruneNetworksTitle"),message:e("docker.pruneNetworksMessage"),confirmLabel:e("docker.prune"),tone:"danger",onConfirm:async()=>{let q=0;await y("prune",async()=>void(q=(await mS(i,n)).removed.length))&&(c(e("docker.prunedCount",{count:q}),"success"),u.refresh())}});return u.loading&&!u.data?d.jsx(An,{rows:4,columns:6,label:e("docker.loading")}):u.data?d.jsxs("div",{className:"space-y-3",children:[a.admin&&d.jsxs(zn,{children:[d.jsx("button",{type:"button",className:ys,onClick:()=>k(!0),children:e("docker.createNetwork")}),d.jsx("button",{type:"button",className:`${Gt} ml-auto`,disabled:p!==null,onClick:J,children:e("docker.pruneNetworks")})]}),d.jsx($r,{data:u.data.networks,keyExtractor:q=>q.id,defaultSort:{key:"name",direction:"asc"},emptyMessage:d.jsx(Yt,{message:e("docker.noNetworks")}),columns:[{key:"name",header:e("docker.col.name"),sortValue:q=>q.name,render:q=>d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(Pr,{text:q.name,className:"font-medium",max:"max-w-[14rem] xl:max-w-[24rem]"}),q.builtin&&d.jsx(Xe,{variant:"info",children:e("docker.builtin")}),q.internal&&d.jsx(Xe,{variant:"neutral",children:e("docker.internal")}),d.jsxs(ki,{children:[d.jsx("span",{children:q.driver}),d.jsxs("span",{children:[e("docker.col.containers"),": ",q.containers]})]})]})},{key:"driver",header:e("docker.col.driver"),className:"hidden sm:table-cell",sortValue:q=>q.driver,render:q=>q.driver},{key:"scope",header:e("docker.col.scope"),className:"hidden lg:table-cell",render:q=>q.scope},{key:"subnets",header:e("docker.col.subnets"),className:"hidden md:table-cell",render:q=>d.jsx(Pr,{text:q.subnets.join(", ")||Le,className:"font-mono text-xs"})},{key:"containers",header:e("docker.col.containers"),className:"hidden sm:table-cell",sortValue:q=>q.containers,render:q=>d.jsx("span",{className:"tabular-nums",children:q.containers})},{key:"stack",header:e("docker.col.stack"),className:"hidden md:table-cell",render:q=>q.stack??d.jsx("span",{className:"text-subtle",children:Le})},{key:"created",header:e("docker.col.created"),className:"hidden xl:table-cell",render:q=>d.jsx("span",{className:"text-xs text-muted whitespace-nowrap",children:q.createdAt?t(q.createdAt):Le})},{key:"actions",header:"",render:q=>a.admin&&!q.builtin?d.jsx(xi,{label:e("docker.actionsFor",{name:q.name}),items:[{key:"rm",label:e("docker.action.remove"),tone:"danger",ariaLabel:`${e("docker.action.remove")} ${q.name}`,disabled:p!==null,onClick:()=>Q(q)}]}):null}]}),d.jsx(ka,{open:v,onClose:()=>k(!1),title:e("docker.createNetwork"),actions:d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",className:Gt,onClick:()=>k(!1),children:e("docker.cancel")}),d.jsx("button",{type:"submit",form:"docker-network-form",className:ys,disabled:p!==null||!S.trim(),children:e("docker.create")})]}),children:d.jsxs("form",{id:"docker-network-form",onSubmit:R,className:"space-y-3",children:[d.jsxs("label",{className:"block text-xs text-muted space-y-1",children:[e("docker.col.name"),d.jsx("input",{value:S,onChange:q=>w(q.target.value),className:nr,autoFocus:!0,autoComplete:"off",required:!0})]}),d.jsxs("label",{className:"block text-xs text-muted space-y-1",children:[e("docker.col.driver"),d.jsx("input",{value:C,onChange:q=>b(q.target.value),placeholder:"bridge",className:nr,autoComplete:"off"})]}),d.jsxs("label",{className:"block text-xs text-muted space-y-1",children:[e("docker.subnet"),d.jsx("input",{value:P,onChange:q=>j(q.target.value),placeholder:"172.30.0.0/16",className:nr,autoComplete:"off"})]}),d.jsxs("label",{className:"inline-flex items-center gap-2 text-xs text-muted",children:[d.jsx("input",{type:"checkbox",checked:E,onChange:q=>M(q.target.checked)}),e("docker.internalNetwork")]})]})}),g]}):d.jsx(Ze,{title:e("docker.loadFailed"),error:u.error,onRetry:u.refetch})}const Px=[3600,21600,86400],Mx={3600:"docker.sys.last1h",21600:"docker.sys.last6h",86400:"docker.sys.last24h"};function Tx(){var S;const{t:e,formatNumber:t,formatDate:i}=tt(),n=St(),{host:a}=Dt(),[c,u]=I.useState(3600),f=Ht(()=>Uy(n,a),[n,a]),g=Ht(()=>Wy(n,a),[n,a]),p=Ht(()=>Vy(n,a,c),[n,a,c]),y=w=>Dr(w,t);if(f.loading&&!f.data)return d.jsx(xa,{label:e("docker.loading")});if(!f.data)return d.jsx(Ze,{title:e("docker.loadFailed"),error:f.error,onRetry:f.refetch});const v=f.data,k=(w,C)=>d.jsx(_i,{label:w,value:y(C.sizeBytes),sub:e("docker.reclaimable",{size:y(C.reclaimableBytes),count:C.count})},w);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("section",{className:"space-y-2",children:[d.jsx("h3",{className:"text-sm font-semibold text-heading",children:e("docker.sys.engine")}),d.jsx("div",{className:`${Ss} p-4`,children:d.jsx(Iu,{items:[[e("docker.sys.name"),v.name],[e("docker.sys.version"),`${v.version} (API ${v.apiVersion})`],[e("docker.sys.os"),`${v.os} · ${v.kernel} · ${v.arch}`],[e("docker.sys.cpus"),t(v.cpus)],[e("docker.sys.memory"),y(v.memoryBytes)],[e("docker.sys.storage"),v.storageDriver],[e("docker.sys.rootDir"),d.jsx("span",{className:"font-mono text-xs",children:v.rootDir},"r")],[e("docker.sys.containers"),e("docker.sys.containersValue",{total:v.containers.total,running:v.containers.running,paused:v.containers.paused,stopped:v.containers.stopped})],[e("docker.sys.images"),t(v.images)]]})})]}),d.jsxs("section",{className:"space-y-2",children:[d.jsx("h3",{className:"text-sm font-semibold text-heading",children:e("docker.sys.disk")}),g.loading&&!g.data?d.jsx("p",{className:"text-sm text-subtle",children:e("docker.loading")}):g.data?d.jsxs("div",{className:"flex flex-wrap gap-3",children:[k(e("docker.sys.imagesUsage"),g.data.images),k(e("docker.sys.containersUsage"),g.data.containers),k(e("docker.sys.volumesUsage"),g.data.volumes),k(e("docker.sys.buildCache"),g.data.buildCache)]}):d.jsx(Ze,{compact:!0,title:e("docker.loadFailed"),error:g.error,onRetry:g.refetch})]}),d.jsxs("section",{className:"space-y-2",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[d.jsx("h3",{className:"text-sm font-semibold text-heading",children:e("docker.sys.events")}),d.jsx(Tu,{label:e("docker.sys.period"),value:String(c),onChange:w=>u(Number(w)),options:Px.map(w=>({value:String(w),label:e(Mx[w])}))})]}),p.error&&!p.data?d.jsx(Ze,{compact:!0,title:e("docker.loadFailed"),error:p.error,onRetry:p.refetch}):d.jsx($r,{data:((S=p.data)==null?void 0:S.events)??[],keyExtractor:w=>`${w.time}|${w.type}|${w.action}|${w.id}`,emptyMessage:d.jsx(Yt,{message:p.loading?e("docker.loading"):e("docker.sys.noEvents")}),columns:[{key:"time",header:e("docker.col.time"),render:w=>d.jsx("span",{className:"text-xs text-muted whitespace-nowrap",children:i(w.time)})},{key:"type",header:e("docker.col.type"),render:w=>w.type},{key:"action",header:e("docker.col.action"),render:w=>w.action},{key:"name",header:e("docker.col.name"),render:w=>d.jsx("span",{className:"break-all",children:w.name||Le})}]})]})]})}const Eg=["containers","stacks","images","volumes","networks","system"],Rx=e=>!!e&&Eg.includes(e);function Lx(){var P;const{t:e}=tt(),t=St(),{hasPermission:i}=Tt(),[n,a]=ny(),c=Ht(()=>$y(t),[t]);ws(c.refresh,3e4);const u=n.get("host")||void 0,f=Rx(n.get("tab"))?n.get("tab"):"containers",g=I.useMemo(()=>{var j;return((j=c.data)==null?void 0:j.hosts)??[]},[c.data]),p=g.find(j=>j.default),y=u?g.find(j=>j.name===u):p,v=((P=c.data)==null?void 0:P.readOnly)??!1,k=I.useCallback(j=>a(E=>{const M=new URLSearchParams(E);for(const[R,Q]of Object.entries(j))Q?M.set(R,Q):M.delete(R);return M}),[a]),S=I.useMemo(()=>({host:u,hostInfo:y,readOnly:v,can:RS(i,v)}),[u,y,v,i]),w=Eg.map(j=>({id:j,label:e(`docker.tab.${j}`)})),C=g.length>1?d.jsx(Tu,{label:e("docker.host"),value:(y==null?void 0:y.name)??null,onChange:j=>k({host:j===(p==null?void 0:p.name)?void 0:j,container:void 0,stack:void 0}),options:g.map(j=>({value:j.name,label:j.reachable?j.name:`${j.name} · ${e("docker.unreachableShort")}`,description:j.endpoint}))}):null;let b;return c.loading&&!c.data?b=d.jsx(xa,{label:e("docker.loading")}):dm(c.error)?b=d.jsxs("div",{"data-testid":"unprotected",role:"alert",className:"rounded-xl border border-warning/30 bg-warning/[0.06] p-6 space-y-3 max-w-2xl",children:[d.jsx("h3",{className:"text-base font-semibold text-heading",children:e("docker.unprotectedTitle")}),d.jsx("p",{className:"text-sm text-text font-mono break-words",children:c.error}),d.jsx("p",{className:"text-sm text-muted",children:e("docker.unprotectedHint")}),i("config:read")&&d.jsxs("a",{href:Lu(),className:"inline-block text-sm text-accent hover:underline",children:[e("docker.openSettings")," ↗"]})]}):c.error||!c.data?b=d.jsx(Ze,{title:e("docker.loadFailed"),error:c.error,onRetry:c.refetch}):u&&!y?b=d.jsx(Ze,{title:e("docker.unknownHost",{host:u}),onRetry:()=>k({host:void 0})}):y&&!y.reachable?b=d.jsx("div",{"data-testid":"host-unreachable",children:d.jsx(Ze,{title:e("docker.unreachable",{host:y.name}),error:y.error,onRetry:c.refetch})}):b=d.jsxs("div",{role:"tabpanel","aria-labelledby":`tab-${f}`,children:[f==="containers"&&d.jsx(px,{container:n.get("container"),view:n.get("view"),go:k}),f==="stacks"&&d.jsx(xx,{stack:n.get("stack"),go:k}),f==="images"&&d.jsx(Ex,{}),f==="volumes"&&d.jsx(Dx,{}),f==="networks"&&d.jsx(Nx,{}),f==="system"&&d.jsx(Tx,{})]},`${u??""}:${f}`),d.jsxs(TS,{value:S,children:[d.jsx(My,{title:e("docker.title"),subtitle:y!=null&&y.version?e("docker.subtitle",{version:y.version,endpoint:y.endpoint}):e("docker.subtitleShort"),actions:d.jsxs(d.Fragment,{children:[v&&d.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full border border-warning/30 bg-warning/15 text-warning",children:e("docker.readOnly")}),C]})}),!dm(c.error)&&d.jsx(Tp,{tabs:w,active:f,label:e("docker.title"),onChange:j=>k({tab:j==="containers"?void 0:j,container:void 0,stack:void 0,view:void 0})}),d.jsx("div",{className:"p-4 sm:p-6 space-y-4",children:b})]})}function Ix(){const{t:e}=tt(),t=St(),{navigate:i}=Tt(),{data:n,loading:a,error:c}=Ht(()=>bp(t,void 0,{all:!0}),[t]);if(a&&!n)return d.jsx(Iy,{label:e("docker.title")});const u=(n==null?void 0:n.containers)??[],f=u.filter(v=>v.state==="running").length,g=u.filter(v=>v.health==="unhealthy").length,p=!!n&&!c,y=p?`${f} / ${u.length}`:Le;return d.jsxs("button",{type:"button",onClick:()=>i("/"),"aria-label":`${e("docker.openPage")}: ${p?e("docker.cardSummary",{running:f,total:u.length,unhealthy:g}):e("docker.cardError")}`,className:"flex-1 min-w-[140px] w-full h-full text-left bg-surface border border-border rounded-xl p-4 hover:border-primary/50 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50",children:[d.jsx("div",{className:"text-[11px] text-subtle uppercase tracking-wide truncate",children:e("docker.title")}),d.jsx("div",{className:"text-2xl font-semibold text-heading mt-1 tabular-nums",children:y}),p?d.jsx("div",{className:`text-[11px] mt-0.5 truncate ${g>0?"text-error":"text-subtle"}`,children:g>0?e("docker.cardUnhealthy",{count:g}):e("docker.cardRunning")}):d.jsx("div",{className:"text-[11px] mt-0.5 text-error truncate",title:c??void 0,children:e("docker.cardError")})]})}const Bx={id:"docker",title:"Docker",packages:{node:"@qodalis/cli-server-plugin-docker",python:"qodalis-cli-server-plugin-docker",dotnet:"Qodalis.Cli.Plugin.Docker"},api:"/api/v1/qcli/docker/hosts"},jx=ty(Lx,{serverPlugin:Bx,overview:{cards:[{id:"docker-containers",size:"stat",component:Ix}]}});export{jx as default};