74 lines
439 KiB
JavaScript
74 lines
439 KiB
JavaScript
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const h of a)if(h.type==="childList")for(const y of h.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&i(y)}).observe(document,{childList:!0,subtree:!0});function r(a){const h={};return a.integrity&&(h.integrity=a.integrity),a.referrerPolicy&&(h.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?h.credentials="include":a.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function i(a){if(a.ep)return;a.ep=!0;const h=r(a);fetch(a.href,h)}})();function Ta(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Aa={exports:{}},Ds={},Pa={exports:{}},J={};/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var wi=Symbol.for("react.element"),Yu=Symbol.for("react.portal"),Ju=Symbol.for("react.fragment"),Zu=Symbol.for("react.strict_mode"),eh=Symbol.for("react.profiler"),th=Symbol.for("react.provider"),rh=Symbol.for("react.context"),ih=Symbol.for("react.forward_ref"),sh=Symbol.for("react.suspense"),nh=Symbol.for("react.memo"),oh=Symbol.for("react.lazy"),ml=Symbol.iterator;function lh(e){return e===null||typeof e!="object"?null:(e=ml&&e[ml]||e["@@iterator"],typeof e=="function"?e:null)}var Ma={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ba=Object.assign,Oa={};function Dr(e,t,r){this.props=e,this.context=t,this.refs=Oa,this.updater=r||Ma}Dr.prototype.isReactComponent={};Dr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Dr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ia(){}Ia.prototype=Dr.prototype;function Eo(e,t,r){this.props=e,this.context=t,this.refs=Oa,this.updater=r||Ma}var ko=Eo.prototype=new Ia;ko.constructor=Eo;Ba(ko,Dr.prototype);ko.isPureReactComponent=!0;var Sl=Array.isArray,Ha=Object.prototype.hasOwnProperty,bo={current:null},Fa={key:!0,ref:!0,__self:!0,__source:!0};function Na(e,t,r){var i,a={},h=null,y=null;if(t!=null)for(i in t.ref!==void 0&&(y=t.ref),t.key!==void 0&&(h=""+t.key),t)Ha.call(t,i)&&!Fa.hasOwnProperty(i)&&(a[i]=t[i]);var n=arguments.length-2;if(n===1)a.children=r;else if(1<n){for(var u=Array(n),f=0;f<n;f++)u[f]=arguments[f+2];a.children=u}if(e&&e.defaultProps)for(i in n=e.defaultProps,n)a[i]===void 0&&(a[i]=n[i]);return{$$typeof:wi,type:e,key:h,ref:y,props:a,_owner:bo.current}}function ah(e,t){return{$$typeof:wi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function xo(e){return typeof e=="object"&&e!==null&&e.$$typeof===wi}function ch(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var yl=/\/+/g;function Zs(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ch(""+e.key):t.toString(36)}function Vi(e,t,r,i,a){var h=typeof e;(h==="undefined"||h==="boolean")&&(e=null);var y=!1;if(e===null)y=!0;else switch(h){case"string":case"number":y=!0;break;case"object":switch(e.$$typeof){case wi:case Yu:y=!0}}if(y)return y=e,a=a(y),e=i===""?"."+Zs(y,0):i,Sl(a)?(r="",e!=null&&(r=e.replace(yl,"$&/")+"/"),Vi(a,t,r,"",function(f){return f})):a!=null&&(xo(a)&&(a=ah(a,r+(!a.key||y&&y.key===a.key?"":(""+a.key).replace(yl,"$&/")+"/")+e)),t.push(a)),1;if(y=0,i=i===""?".":i+":",Sl(e))for(var n=0;n<e.length;n++){h=e[n];var u=i+Zs(h,n);y+=Vi(h,t,r,u,a)}else if(u=lh(e),typeof u=="function")for(e=u.call(e),n=0;!(h=e.next()).done;)h=h.value,u=i+Zs(h,n++),y+=Vi(h,t,r,u,a);else if(h==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return y}function Ri(e,t,r){if(e==null)return e;var i=[],a=0;return Vi(e,i,"","",function(h){return t.call(r,h,a++)}),i}function uh(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Re={current:null},qi={transition:null},hh={ReactCurrentDispatcher:Re,ReactCurrentBatchConfig:qi,ReactCurrentOwner:bo};function za(){throw Error("act(...) is not supported in production builds of React.")}J.Children={map:Ri,forEach:function(e,t,r){Ri(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Ri(e,function(){t++}),t},toArray:function(e){return Ri(e,function(t){return t})||[]},only:function(e){if(!xo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};J.Component=Dr;J.Fragment=Ju;J.Profiler=eh;J.PureComponent=Eo;J.StrictMode=Zu;J.Suspense=sh;J.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hh;J.act=za;J.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=Ba({},e.props),a=e.key,h=e.ref,y=e._owner;if(t!=null){if(t.ref!==void 0&&(h=t.ref,y=bo.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var n=e.type.defaultProps;for(u in t)Ha.call(t,u)&&!Fa.hasOwnProperty(u)&&(i[u]=t[u]===void 0&&n!==void 0?n[u]:t[u])}var u=arguments.length-2;if(u===1)i.children=r;else if(1<u){n=Array(u);for(var f=0;f<u;f++)n[f]=arguments[f+2];i.children=n}return{$$typeof:wi,type:e.type,key:a,ref:h,props:i,_owner:y}};J.createContext=function(e){return e={$$typeof:rh,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:th,_context:e},e.Consumer=e};J.createElement=Na;J.createFactory=function(e){var t=Na.bind(null,e);return t.type=e,t};J.createRef=function(){return{current:null}};J.forwardRef=function(e){return{$$typeof:ih,render:e}};J.isValidElement=xo;J.lazy=function(e){return{$$typeof:oh,_payload:{_status:-1,_result:e},_init:uh}};J.memo=function(e,t){return{$$typeof:nh,type:e,compare:t===void 0?null:t}};J.startTransition=function(e){var t=qi.transition;qi.transition={};try{e()}finally{qi.transition=t}};J.unstable_act=za;J.useCallback=function(e,t){return Re.current.useCallback(e,t)};J.useContext=function(e){return Re.current.useContext(e)};J.useDebugValue=function(){};J.useDeferredValue=function(e){return Re.current.useDeferredValue(e)};J.useEffect=function(e,t){return Re.current.useEffect(e,t)};J.useId=function(){return Re.current.useId()};J.useImperativeHandle=function(e,t,r){return Re.current.useImperativeHandle(e,t,r)};J.useInsertionEffect=function(e,t){return Re.current.useInsertionEffect(e,t)};J.useLayoutEffect=function(e,t){return Re.current.useLayoutEffect(e,t)};J.useMemo=function(e,t){return Re.current.useMemo(e,t)};J.useReducer=function(e,t,r){return Re.current.useReducer(e,t,r)};J.useRef=function(e){return Re.current.useRef(e)};J.useState=function(e){return Re.current.useState(e)};J.useSyncExternalStore=function(e,t,r){return Re.current.useSyncExternalStore(e,t,r)};J.useTransition=function(){return Re.current.useTransition()};J.version="18.3.1";Pa.exports=J;var dt=Pa.exports;const ja=Ta(dt);/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var dh=dt,fh=Symbol.for("react.element"),_h=Symbol.for("react.fragment"),ph=Object.prototype.hasOwnProperty,vh=dh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gh={key:!0,ref:!0,__self:!0,__source:!0};function Ua(e,t,r){var i,a={},h=null,y=null;r!==void 0&&(h=""+r),t.key!==void 0&&(h=""+t.key),t.ref!==void 0&&(y=t.ref);for(i in t)ph.call(t,i)&&!gh.hasOwnProperty(i)&&(a[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)a[i]===void 0&&(a[i]=t[i]);return{$$typeof:fh,type:e,key:h,ref:y,props:a,_owner:vh.current}}Ds.Fragment=_h;Ds.jsx=Ua;Ds.jsxs=Ua;Aa.exports=Ds;var K=Aa.exports,Rn={},Wa={exports:{}},ze={},$a={exports:{}},Ka={};/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/(function(e){function t(x,D){var T=x.length;x.push(D);e:for(;0<T;){var M=T-1>>>1,F=x[M];if(0<a(F,D))x[M]=D,x[T]=F,T=M;else break e}}function r(x){return x.length===0?null:x[0]}function i(x){if(x.length===0)return null;var D=x[0],T=x.pop();if(T!==D){x[0]=T;e:for(var M=0,F=x.length,$=F>>>1;M<$;){var G=2*(M+1)-1,X=x[G],ee=G+1,L=x[ee];if(0>a(X,T))ee<F&&0>a(L,X)?(x[M]=L,x[ee]=T,M=ee):(x[M]=X,x[G]=T,M=G);else if(ee<F&&0>a(L,T))x[M]=L,x[ee]=T,M=ee;else break e}}return D}function a(x,D){var T=x.sortIndex-D.sortIndex;return T!==0?T:x.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;e.unstable_now=function(){return h.now()}}else{var y=Date,n=y.now();e.unstable_now=function(){return y.now()-n}}var u=[],f=[],S=1,d=null,p=3,C=!1,w=!1,m=!1,c=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,s=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function l(x){for(var D=r(f);D!==null;){if(D.callback===null)i(f);else if(D.startTime<=x)i(f),D.sortIndex=D.expirationTime,t(u,D);else break;D=r(f)}}function _(x){if(m=!1,l(x),!w)if(r(u)!==null)w=!0,U(g);else{var D=r(f);D!==null&&j(_,D.startTime-x)}}function g(x,D){w=!1,m&&(m=!1,o(v),v=-1),C=!0;var T=p;try{for(l(D),d=r(u);d!==null&&(!(d.expirationTime>D)||x&&!P());){var M=d.callback;if(typeof M=="function"){d.callback=null,p=d.priorityLevel;var F=M(d.expirationTime<=D);D=e.unstable_now(),typeof F=="function"?d.callback=F:d===r(u)&&i(u),l(D)}else i(u);d=r(u)}if(d!==null)var $=!0;else{var G=r(f);G!==null&&j(_,G.startTime-D),$=!1}return $}finally{d=null,p=T,C=!1}}var E=!1,b=null,v=-1,k=5,R=-1;function P(){return!(e.unstable_now()-R<k)}function A(){if(b!==null){var x=e.unstable_now();R=x;var D=!0;try{D=b(!0,x)}finally{D?B():(E=!1,b=null)}}else E=!1}var B;if(typeof s=="function")B=function(){s(A)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,z=I.port2;I.port1.onmessage=A,B=function(){z.postMessage(null)}}else B=function(){c(A,0)};function U(x){b=x,E||(E=!0,B())}function j(x,D){v=c(function(){x(e.unstable_now())},D)}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(x){x.callback=null},e.unstable_continueExecution=function(){w||C||(w=!0,U(g))},e.unstable_forceFrameRate=function(x){0>x||125<x?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<x?Math.floor(1e3/x):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(u)},e.unstable_next=function(x){switch(p){case 1:case 2:case 3:var D=3;break;default:D=p}var T=p;p=D;try{return x()}finally{p=T}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(x,D){switch(x){case 1:case 2:case 3:case 4:case 5:break;default:x=3}var T=p;p=x;try{return D()}finally{p=T}},e.unstable_scheduleCallback=function(x,D,T){var M=e.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?M+T:M):T=M,x){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=T+F,x={id:S++,callback:D,priorityLevel:x,startTime:T,expirationTime:F,sortIndex:-1},T>M?(x.sortIndex=T,t(f,x),r(u)===null&&x===r(f)&&(m?(o(v),v=-1):m=!0,j(_,T-M))):(x.sortIndex=F,t(u,x),w||C||(w=!0,U(g))),x},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(x){var D=p;return function(){var T=p;p=D;try{return x.apply(this,arguments)}finally{p=T}}}})(Ka);$a.exports=Ka;var mh=$a.exports;/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Sh=dt,Ne=mh;function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Va=new Set,ii={};function Zt(e,t){Cr(e,t),Cr(e+"Capture",t)}function Cr(e,t){for(ii[e]=t,e=0;e<t.length;e++)Va.add(t[e])}var _t=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dn=Object.prototype.hasOwnProperty,yh=/^[: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]*$/,Cl={},wl={};function Ch(e){return Dn.call(wl,e)?!0:Dn.call(Cl,e)?!1:yh.test(e)?wl[e]=!0:(Cl[e]=!0,!1)}function wh(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Eh(e,t,r,i){if(t===null||typeof t>"u"||wh(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function De(e,t,r,i,a,h,y){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=h,this.removeEmptyString=y}var Ce={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ce[e]=new De(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ce[t]=new De(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ce[e]=new De(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ce[e]=new De(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ce[e]=new De(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ce[e]=new De(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ce[e]=new De(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ce[e]=new De(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ce[e]=new De(e,5,!1,e.toLowerCase(),null,!1,!1)});var Lo=/[\-:]([a-z])/g;function Ro(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Lo,Ro);Ce[t]=new De(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Lo,Ro);Ce[t]=new De(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Lo,Ro);Ce[t]=new De(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ce[e]=new De(e,1,!1,e.toLowerCase(),null,!1,!1)});Ce.xlinkHref=new De("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ce[e]=new De(e,1,!1,e.toLowerCase(),null,!0,!0)});function Do(e,t,r,i){var a=Ce.hasOwnProperty(t)?Ce[t]:null;(a!==null?a.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Eh(t,r,a,i)&&(r=null),i||a===null?Ch(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,i=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,i?e.setAttributeNS(i,t,r):e.setAttribute(t,r))))}var mt=Sh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Di=Symbol.for("react.element"),ir=Symbol.for("react.portal"),sr=Symbol.for("react.fragment"),To=Symbol.for("react.strict_mode"),Tn=Symbol.for("react.profiler"),qa=Symbol.for("react.provider"),Xa=Symbol.for("react.context"),Ao=Symbol.for("react.forward_ref"),An=Symbol.for("react.suspense"),Pn=Symbol.for("react.suspense_list"),Po=Symbol.for("react.memo"),wt=Symbol.for("react.lazy"),Ga=Symbol.for("react.offscreen"),El=Symbol.iterator;function Ir(e){return e===null||typeof e!="object"?null:(e=El&&e[El]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Object.assign,en;function $r(e){if(en===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);en=t&&t[1]||""}return`
|
||
`+en+e}var tn=!1;function rn(e,t){if(!e||tn)return"";tn=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var i=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){i=f}e.call(t.prototype)}else{try{throw Error()}catch(f){i=f}e()}}catch(f){if(f&&i&&typeof f.stack=="string"){for(var a=f.stack.split(`
|
||
`),h=i.stack.split(`
|
||
`),y=a.length-1,n=h.length-1;1<=y&&0<=n&&a[y]!==h[n];)n--;for(;1<=y&&0<=n;y--,n--)if(a[y]!==h[n]){if(y!==1||n!==1)do if(y--,n--,0>n||a[y]!==h[n]){var u=`
|
||
`+a[y].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=y&&0<=n);break}}}finally{tn=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?$r(e):""}function kh(e){switch(e.tag){case 5:return $r(e.type);case 16:return $r("Lazy");case 13:return $r("Suspense");case 19:return $r("SuspenseList");case 0:case 2:case 15:return e=rn(e.type,!1),e;case 11:return e=rn(e.type.render,!1),e;case 1:return e=rn(e.type,!0),e;default:return""}}function Mn(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case sr:return"Fragment";case ir:return"Portal";case Tn:return"Profiler";case To:return"StrictMode";case An:return"Suspense";case Pn:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Xa:return(e.displayName||"Context")+".Consumer";case qa:return(e._context.displayName||"Context")+".Provider";case Ao:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Po:return t=e.displayName||null,t!==null?t:Mn(e.type)||"Memo";case wt:t=e._payload,e=e._init;try{return Mn(e(t))}catch{}}return null}function bh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Mn(t);case 8:return t===To?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function It(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qa(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xh(e){var t=Qa(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,h=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(y){i=""+y,h.call(this,y)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(y){i=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ti(e){e._valueTracker||(e._valueTracker=xh(e))}function Ya(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Qa(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function ns(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Bn(e,t){var r=t.checked;return ue({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function kl(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=It(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ja(e,t){t=t.checked,t!=null&&Do(e,"checked",t,!1)}function On(e,t){Ja(e,t);var r=It(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?In(e,t.type,r):t.hasOwnProperty("defaultValue")&&In(e,t.type,It(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function bl(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function In(e,t,r){(t!=="number"||ns(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Kr=Array.isArray;function pr(e,t,r,i){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&i&&(e[r].defaultSelected=!0)}else{for(r=""+It(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,i&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Hn(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(W(91));return ue({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function xl(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(W(92));if(Kr(r)){if(1<r.length)throw Error(W(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:It(r)}}function Za(e,t){var r=It(t.value),i=It(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function Ll(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ec(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Fn(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ec(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ai,tc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ai=Ai||document.createElement("div"),Ai.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ai.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function si(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Xr={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},Lh=["Webkit","ms","Moz","O"];Object.keys(Xr).forEach(function(e){Lh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Xr[t]=Xr[e]})});function rc(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Xr.hasOwnProperty(e)&&Xr[e]?(""+t).trim():t+"px"}function ic(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,a=rc(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,a):e[r]=a}}var Rh=ue({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 Nn(e,t){if(t){if(Rh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function zn(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jn=null;function Mo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Un=null,vr=null,gr=null;function Rl(e){if(e=bi(e)){if(typeof Un!="function")throw Error(W(280));var t=e.stateNode;t&&(t=Bs(t),Un(e.stateNode,e.type,t))}}function sc(e){vr?gr?gr.push(e):gr=[e]:vr=e}function nc(){if(vr){var e=vr,t=gr;if(gr=vr=null,Rl(e),t)for(e=0;e<t.length;e++)Rl(t[e])}}function oc(e,t){return e(t)}function lc(){}var sn=!1;function ac(e,t,r){if(sn)return e(t,r);sn=!0;try{return oc(e,t,r)}finally{sn=!1,(vr!==null||gr!==null)&&(lc(),nc())}}function ni(e,t){var r=e.stateNode;if(r===null)return null;var i=Bs(r);if(i===null)return null;r=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(W(231,t,typeof r));return r}var Wn=!1;if(_t)try{var Hr={};Object.defineProperty(Hr,"passive",{get:function(){Wn=!0}}),window.addEventListener("test",Hr,Hr),window.removeEventListener("test",Hr,Hr)}catch{Wn=!1}function Dh(e,t,r,i,a,h,y,n,u){var f=Array.prototype.slice.call(arguments,3);try{t.apply(r,f)}catch(S){this.onError(S)}}var Gr=!1,os=null,ls=!1,$n=null,Th={onError:function(e){Gr=!0,os=e}};function Ah(e,t,r,i,a,h,y,n,u){Gr=!1,os=null,Dh.apply(Th,arguments)}function Ph(e,t,r,i,a,h,y,n,u){if(Ah.apply(this,arguments),Gr){if(Gr){var f=os;Gr=!1,os=null}else throw Error(W(198));ls||(ls=!0,$n=f)}}function er(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function cc(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Dl(e){if(er(e)!==e)throw Error(W(188))}function Mh(e){var t=e.alternate;if(!t){if(t=er(e),t===null)throw Error(W(188));return t!==e?null:e}for(var r=e,i=t;;){var a=r.return;if(a===null)break;var h=a.alternate;if(h===null){if(i=a.return,i!==null){r=i;continue}break}if(a.child===h.child){for(h=a.child;h;){if(h===r)return Dl(a),e;if(h===i)return Dl(a),t;h=h.sibling}throw Error(W(188))}if(r.return!==i.return)r=a,i=h;else{for(var y=!1,n=a.child;n;){if(n===r){y=!0,r=a,i=h;break}if(n===i){y=!0,i=a,r=h;break}n=n.sibling}if(!y){for(n=h.child;n;){if(n===r){y=!0,r=h,i=a;break}if(n===i){y=!0,i=h,r=a;break}n=n.sibling}if(!y)throw Error(W(189))}}if(r.alternate!==i)throw Error(W(190))}if(r.tag!==3)throw Error(W(188));return r.stateNode.current===r?e:t}function uc(e){return e=Mh(e),e!==null?hc(e):null}function hc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=hc(e);if(t!==null)return t;e=e.sibling}return null}var dc=Ne.unstable_scheduleCallback,Tl=Ne.unstable_cancelCallback,Bh=Ne.unstable_shouldYield,Oh=Ne.unstable_requestPaint,de=Ne.unstable_now,Ih=Ne.unstable_getCurrentPriorityLevel,Bo=Ne.unstable_ImmediatePriority,fc=Ne.unstable_UserBlockingPriority,as=Ne.unstable_NormalPriority,Hh=Ne.unstable_LowPriority,_c=Ne.unstable_IdlePriority,Ts=null,ot=null;function Fh(e){if(ot&&typeof ot.onCommitFiberRoot=="function")try{ot.onCommitFiberRoot(Ts,e,void 0,(e.current.flags&128)===128)}catch{}}var Ze=Math.clz32?Math.clz32:jh,Nh=Math.log,zh=Math.LN2;function jh(e){return e>>>=0,e===0?32:31-(Nh(e)/zh|0)|0}var Pi=64,Mi=4194304;function Vr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function cs(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,h=e.pingedLanes,y=r&268435455;if(y!==0){var n=y&~a;n!==0?i=Vr(n):(h&=y,h!==0&&(i=Vr(h)))}else y=r&~a,y!==0?i=Vr(y):h!==0&&(i=Vr(h));if(i===0)return 0;if(t!==0&&t!==i&&!(t&a)&&(a=i&-i,h=t&-t,a>=h||a===16&&(h&4194240)!==0))return t;if(i&4&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-Ze(t),a=1<<r,i|=e[r],t&=~a;return i}function Uh(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Wh(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,h=e.pendingLanes;0<h;){var y=31-Ze(h),n=1<<y,u=a[y];u===-1?(!(n&r)||n&i)&&(a[y]=Uh(n,t)):u<=t&&(e.expiredLanes|=n),h&=~n}}function Kn(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function pc(){var e=Pi;return Pi<<=1,!(Pi&4194240)&&(Pi=64),e}function nn(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ei(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ze(t),e[t]=r}function $h(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<r;){var a=31-Ze(r),h=1<<a;t[a]=0,i[a]=-1,e[a]=-1,r&=~h}}function Oo(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-Ze(r),a=1<<i;a&t|e[i]&t&&(e[i]|=t),r&=~a}}var re=0;function vc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var gc,Io,mc,Sc,yc,Vn=!1,Bi=[],Rt=null,Dt=null,Tt=null,oi=new Map,li=new Map,kt=[],Kh="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 Al(e,t){switch(e){case"focusin":case"focusout":Rt=null;break;case"dragenter":case"dragleave":Dt=null;break;case"mouseover":case"mouseout":Tt=null;break;case"pointerover":case"pointerout":oi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":li.delete(t.pointerId)}}function Fr(e,t,r,i,a,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:h,targetContainers:[a]},t!==null&&(t=bi(t),t!==null&&Io(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Vh(e,t,r,i,a){switch(t){case"focusin":return Rt=Fr(Rt,e,t,r,i,a),!0;case"dragenter":return Dt=Fr(Dt,e,t,r,i,a),!0;case"mouseover":return Tt=Fr(Tt,e,t,r,i,a),!0;case"pointerover":var h=a.pointerId;return oi.set(h,Fr(oi.get(h)||null,e,t,r,i,a)),!0;case"gotpointercapture":return h=a.pointerId,li.set(h,Fr(li.get(h)||null,e,t,r,i,a)),!0}return!1}function Cc(e){var t=Wt(e.target);if(t!==null){var r=er(t);if(r!==null){if(t=r.tag,t===13){if(t=cc(r),t!==null){e.blockedOn=t,yc(e.priority,function(){mc(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=qn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);jn=i,r.target.dispatchEvent(i),jn=null}else return t=bi(r),t!==null&&Io(t),e.blockedOn=r,!1;t.shift()}return!0}function Pl(e,t,r){Xi(e)&&r.delete(t)}function qh(){Vn=!1,Rt!==null&&Xi(Rt)&&(Rt=null),Dt!==null&&Xi(Dt)&&(Dt=null),Tt!==null&&Xi(Tt)&&(Tt=null),oi.forEach(Pl),li.forEach(Pl)}function Nr(e,t){e.blockedOn===t&&(e.blockedOn=null,Vn||(Vn=!0,Ne.unstable_scheduleCallback(Ne.unstable_NormalPriority,qh)))}function ai(e){function t(a){return Nr(a,e)}if(0<Bi.length){Nr(Bi[0],e);for(var r=1;r<Bi.length;r++){var i=Bi[r];i.blockedOn===e&&(i.blockedOn=null)}}for(Rt!==null&&Nr(Rt,e),Dt!==null&&Nr(Dt,e),Tt!==null&&Nr(Tt,e),oi.forEach(t),li.forEach(t),r=0;r<kt.length;r++)i=kt[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<kt.length&&(r=kt[0],r.blockedOn===null);)Cc(r),r.blockedOn===null&&kt.shift()}var mr=mt.ReactCurrentBatchConfig,us=!0;function Xh(e,t,r,i){var a=re,h=mr.transition;mr.transition=null;try{re=1,Ho(e,t,r,i)}finally{re=a,mr.transition=h}}function Gh(e,t,r,i){var a=re,h=mr.transition;mr.transition=null;try{re=4,Ho(e,t,r,i)}finally{re=a,mr.transition=h}}function Ho(e,t,r,i){if(us){var a=qn(e,t,r,i);if(a===null)pn(e,t,i,hs,r),Al(e,i);else if(Vh(a,e,t,r,i))i.stopPropagation();else if(Al(e,i),t&4&&-1<Kh.indexOf(e)){for(;a!==null;){var h=bi(a);if(h!==null&&gc(h),h=qn(e,t,r,i),h===null&&pn(e,t,i,hs,r),h===a)break;a=h}a!==null&&i.stopPropagation()}else pn(e,t,i,null,r)}}var hs=null;function qn(e,t,r,i){if(hs=null,e=Mo(i),e=Wt(e),e!==null)if(t=er(e),t===null)e=null;else if(r=t.tag,r===13){if(e=cc(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return hs=e,null}function wc(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ih()){case Bo:return 1;case fc:return 4;case as:case Hh:return 16;case _c:return 536870912;default:return 16}default:return 16}}var xt=null,Fo=null,Gi=null;function Ec(){if(Gi)return Gi;var e,t=Fo,r=t.length,i,a="value"in xt?xt.value:xt.textContent,h=a.length;for(e=0;e<r&&t[e]===a[e];e++);var y=r-e;for(i=1;i<=y&&t[r-i]===a[h-i];i++);return Gi=a.slice(e,1<i?1-i:void 0)}function Qi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Oi(){return!0}function Ml(){return!1}function je(e){function t(r,i,a,h,y){this._reactName=r,this._targetInst=a,this.type=i,this.nativeEvent=h,this.target=y,this.currentTarget=null;for(var n in e)e.hasOwnProperty(n)&&(r=e[n],this[n]=r?r(h):h[n]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Oi:Ml,this.isPropagationStopped=Ml,this}return ue(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Oi)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Oi)},persist:function(){},isPersistent:Oi}),t}var Tr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},No=je(Tr),ki=ue({},Tr,{view:0,detail:0}),Qh=je(ki),on,ln,zr,As=ue({},ki,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zo,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==zr&&(zr&&e.type==="mousemove"?(on=e.screenX-zr.screenX,ln=e.screenY-zr.screenY):ln=on=0,zr=e),on)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),Bl=je(As),Yh=ue({},As,{dataTransfer:0}),Jh=je(Yh),Zh=ue({},ki,{relatedTarget:0}),an=je(Zh),ed=ue({},Tr,{animationName:0,elapsedTime:0,pseudoElement:0}),td=je(ed),rd=ue({},Tr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),id=je(rd),sd=ue({},Tr,{data:0}),Ol=je(sd),nd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},od={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"},ld={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ad(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ld[e])?!!t[e]:!1}function zo(){return ad}var cd=ue({},ki,{key:function(e){if(e.key){var t=nd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?od[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zo,charCode:function(e){return e.type==="keypress"?Qi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ud=je(cd),hd=ue({},As,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Il=je(hd),dd=ue({},ki,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zo}),fd=je(dd),_d=ue({},Tr,{propertyName:0,elapsedTime:0,pseudoElement:0}),pd=je(_d),vd=ue({},As,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),gd=je(vd),md=[9,13,27,32],jo=_t&&"CompositionEvent"in window,Qr=null;_t&&"documentMode"in document&&(Qr=document.documentMode);var Sd=_t&&"TextEvent"in window&&!Qr,kc=_t&&(!jo||Qr&&8<Qr&&11>=Qr),Hl=" ",Fl=!1;function bc(e,t){switch(e){case"keyup":return md.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var nr=!1;function yd(e,t){switch(e){case"compositionend":return xc(t);case"keypress":return t.which!==32?null:(Fl=!0,Hl);case"textInput":return e=t.data,e===Hl&&Fl?null:e;default:return null}}function Cd(e,t){if(nr)return e==="compositionend"||!jo&&bc(e,t)?(e=Ec(),Gi=Fo=xt=null,nr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return kc&&t.locale!=="ko"?null:t.data;default:return null}}var wd={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 Nl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wd[e.type]:t==="textarea"}function Lc(e,t,r,i){sc(i),t=ds(t,"onChange"),0<t.length&&(r=new No("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var Yr=null,ci=null;function Ed(e){Fc(e,0)}function Ps(e){var t=ar(e);if(Ya(t))return e}function kd(e,t){if(e==="change")return t}var Rc=!1;if(_t){var cn;if(_t){var un="oninput"in document;if(!un){var zl=document.createElement("div");zl.setAttribute("oninput","return;"),un=typeof zl.oninput=="function"}cn=un}else cn=!1;Rc=cn&&(!document.documentMode||9<document.documentMode)}function jl(){Yr&&(Yr.detachEvent("onpropertychange",Dc),ci=Yr=null)}function Dc(e){if(e.propertyName==="value"&&Ps(ci)){var t=[];Lc(t,ci,e,Mo(e)),ac(Ed,t)}}function bd(e,t,r){e==="focusin"?(jl(),Yr=t,ci=r,Yr.attachEvent("onpropertychange",Dc)):e==="focusout"&&jl()}function xd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ps(ci)}function Ld(e,t){if(e==="click")return Ps(t)}function Rd(e,t){if(e==="input"||e==="change")return Ps(t)}function Dd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tt=typeof Object.is=="function"?Object.is:Dd;function ui(e,t){if(tt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var a=r[i];if(!Dn.call(t,a)||!tt(e[a],t[a]))return!1}return!0}function Ul(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wl(e,t){var r=Ul(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Ul(r)}}function Tc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ac(){for(var e=window,t=ns();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ns(e.document)}return t}function Uo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Td(e){var t=Ac(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Tc(r.ownerDocument.documentElement,r)){if(i!==null&&Uo(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,h=Math.min(i.start,a);i=i.end===void 0?h:Math.min(i.end,a),!e.extend&&h>i&&(a=i,i=h,h=a),a=Wl(r,h);var y=Wl(r,i);a&&y&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),h>i?(e.addRange(t),e.extend(y.node,y.offset)):(t.setEnd(y.node,y.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ad=_t&&"documentMode"in document&&11>=document.documentMode,or=null,Xn=null,Jr=null,Gn=!1;function $l(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Gn||or==null||or!==ns(i)||(i=or,"selectionStart"in i&&Uo(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Jr&&ui(Jr,i)||(Jr=i,i=ds(Xn,"onSelect"),0<i.length&&(t=new No("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=or)))}function Ii(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var lr={animationend:Ii("Animation","AnimationEnd"),animationiteration:Ii("Animation","AnimationIteration"),animationstart:Ii("Animation","AnimationStart"),transitionend:Ii("Transition","TransitionEnd")},hn={},Pc={};_t&&(Pc=document.createElement("div").style,"AnimationEvent"in window||(delete lr.animationend.animation,delete lr.animationiteration.animation,delete lr.animationstart.animation),"TransitionEvent"in window||delete lr.transitionend.transition);function Ms(e){if(hn[e])return hn[e];if(!lr[e])return e;var t=lr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Pc)return hn[e]=t[r];return e}var Mc=Ms("animationend"),Bc=Ms("animationiteration"),Oc=Ms("animationstart"),Ic=Ms("transitionend"),Hc=new Map,Kl="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 Ft(e,t){Hc.set(e,t),Zt(t,[e])}for(var dn=0;dn<Kl.length;dn++){var fn=Kl[dn],Pd=fn.toLowerCase(),Md=fn[0].toUpperCase()+fn.slice(1);Ft(Pd,"on"+Md)}Ft(Mc,"onAnimationEnd");Ft(Bc,"onAnimationIteration");Ft(Oc,"onAnimationStart");Ft("dblclick","onDoubleClick");Ft("focusin","onFocus");Ft("focusout","onBlur");Ft(Ic,"onTransitionEnd");Cr("onMouseEnter",["mouseout","mouseover"]);Cr("onMouseLeave",["mouseout","mouseover"]);Cr("onPointerEnter",["pointerout","pointerover"]);Cr("onPointerLeave",["pointerout","pointerover"]);Zt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Zt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Zt("onBeforeInput",["compositionend","keypress","textInput","paste"]);Zt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Zt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Zt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qr="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(" "),Bd=new Set("cancel close invalid load scroll toggle".split(" ").concat(qr));function Vl(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,Ph(i,t,void 0,e),e.currentTarget=null}function Fc(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],a=i.event;i=i.listeners;e:{var h=void 0;if(t)for(var y=i.length-1;0<=y;y--){var n=i[y],u=n.instance,f=n.currentTarget;if(n=n.listener,u!==h&&a.isPropagationStopped())break e;Vl(a,n,f),h=u}else for(y=0;y<i.length;y++){if(n=i[y],u=n.instance,f=n.currentTarget,n=n.listener,u!==h&&a.isPropagationStopped())break e;Vl(a,n,f),h=u}}}if(ls)throw e=$n,ls=!1,$n=null,e}function se(e,t){var r=t[eo];r===void 0&&(r=t[eo]=new Set);var i=e+"__bubble";r.has(i)||(Nc(t,e,2,!1),r.add(i))}function _n(e,t,r){var i=0;t&&(i|=4),Nc(r,e,i,t)}var Hi="_reactListening"+Math.random().toString(36).slice(2);function hi(e){if(!e[Hi]){e[Hi]=!0,Va.forEach(function(r){r!=="selectionchange"&&(Bd.has(r)||_n(r,!1,e),_n(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Hi]||(t[Hi]=!0,_n("selectionchange",!1,t))}}function Nc(e,t,r,i){switch(wc(t)){case 1:var a=Xh;break;case 4:a=Gh;break;default:a=Ho}r=a.bind(null,t,r,e),a=void 0,!Wn||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),i?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function pn(e,t,r,i,a){var h=i;if(!(t&1)&&!(t&2)&&i!==null)e:for(;;){if(i===null)return;var y=i.tag;if(y===3||y===4){var n=i.stateNode.containerInfo;if(n===a||n.nodeType===8&&n.parentNode===a)break;if(y===4)for(y=i.return;y!==null;){var u=y.tag;if((u===3||u===4)&&(u=y.stateNode.containerInfo,u===a||u.nodeType===8&&u.parentNode===a))return;y=y.return}for(;n!==null;){if(y=Wt(n),y===null)return;if(u=y.tag,u===5||u===6){i=h=y;continue e}n=n.parentNode}}i=i.return}ac(function(){var f=h,S=Mo(r),d=[];e:{var p=Hc.get(e);if(p!==void 0){var C=No,w=e;switch(e){case"keypress":if(Qi(r)===0)break e;case"keydown":case"keyup":C=ud;break;case"focusin":w="focus",C=an;break;case"focusout":w="blur",C=an;break;case"beforeblur":case"afterblur":C=an;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":C=Bl;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":C=Jh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":C=fd;break;case Mc:case Bc:case Oc:C=td;break;case Ic:C=pd;break;case"scroll":C=Qh;break;case"wheel":C=gd;break;case"copy":case"cut":case"paste":C=id;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":C=Il}var m=(t&4)!==0,c=!m&&e==="scroll",o=m?p!==null?p+"Capture":null:p;m=[];for(var s=f,l;s!==null;){l=s;var _=l.stateNode;if(l.tag===5&&_!==null&&(l=_,o!==null&&(_=ni(s,o),_!=null&&m.push(di(s,_,l)))),c)break;s=s.return}0<m.length&&(p=new C(p,w,null,r,S),d.push({event:p,listeners:m}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",C=e==="mouseout"||e==="pointerout",p&&r!==jn&&(w=r.relatedTarget||r.fromElement)&&(Wt(w)||w[pt]))break e;if((C||p)&&(p=S.window===S?S:(p=S.ownerDocument)?p.defaultView||p.parentWindow:window,C?(w=r.relatedTarget||r.toElement,C=f,w=w?Wt(w):null,w!==null&&(c=er(w),w!==c||w.tag!==5&&w.tag!==6)&&(w=null)):(C=null,w=f),C!==w)){if(m=Bl,_="onMouseLeave",o="onMouseEnter",s="mouse",(e==="pointerout"||e==="pointerover")&&(m=Il,_="onPointerLeave",o="onPointerEnter",s="pointer"),c=C==null?p:ar(C),l=w==null?p:ar(w),p=new m(_,s+"leave",C,r,S),p.target=c,p.relatedTarget=l,_=null,Wt(S)===f&&(m=new m(o,s+"enter",w,r,S),m.target=l,m.relatedTarget=c,_=m),c=_,C&&w)t:{for(m=C,o=w,s=0,l=m;l;l=rr(l))s++;for(l=0,_=o;_;_=rr(_))l++;for(;0<s-l;)m=rr(m),s--;for(;0<l-s;)o=rr(o),l--;for(;s--;){if(m===o||o!==null&&m===o.alternate)break t;m=rr(m),o=rr(o)}m=null}else m=null;C!==null&&ql(d,p,C,m,!1),w!==null&&c!==null&&ql(d,c,w,m,!0)}}e:{if(p=f?ar(f):window,C=p.nodeName&&p.nodeName.toLowerCase(),C==="select"||C==="input"&&p.type==="file")var g=kd;else if(Nl(p))if(Rc)g=Rd;else{g=xd;var E=bd}else(C=p.nodeName)&&C.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(g=Ld);if(g&&(g=g(e,f))){Lc(d,g,r,S);break e}E&&E(e,p,f),e==="focusout"&&(E=p._wrapperState)&&E.controlled&&p.type==="number"&&In(p,"number",p.value)}switch(E=f?ar(f):window,e){case"focusin":(Nl(E)||E.contentEditable==="true")&&(or=E,Xn=f,Jr=null);break;case"focusout":Jr=Xn=or=null;break;case"mousedown":Gn=!0;break;case"contextmenu":case"mouseup":case"dragend":Gn=!1,$l(d,r,S);break;case"selectionchange":if(Ad)break;case"keydown":case"keyup":$l(d,r,S)}var b;if(jo)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else nr?bc(e,r)&&(v="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(v="onCompositionStart");v&&(kc&&r.locale!=="ko"&&(nr||v!=="onCompositionStart"?v==="onCompositionEnd"&&nr&&(b=Ec()):(xt=S,Fo="value"in xt?xt.value:xt.textContent,nr=!0)),E=ds(f,v),0<E.length&&(v=new Ol(v,e,null,r,S),d.push({event:v,listeners:E}),b?v.data=b:(b=xc(r),b!==null&&(v.data=b)))),(b=Sd?yd(e,r):Cd(e,r))&&(f=ds(f,"onBeforeInput"),0<f.length&&(S=new Ol("onBeforeInput","beforeinput",null,r,S),d.push({event:S,listeners:f}),S.data=b))}Fc(d,t)})}function di(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ds(e,t){for(var r=t+"Capture",i=[];e!==null;){var a=e,h=a.stateNode;a.tag===5&&h!==null&&(a=h,h=ni(e,r),h!=null&&i.unshift(di(e,h,a)),h=ni(e,t),h!=null&&i.push(di(e,h,a))),e=e.return}return i}function rr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ql(e,t,r,i,a){for(var h=t._reactName,y=[];r!==null&&r!==i;){var n=r,u=n.alternate,f=n.stateNode;if(u!==null&&u===i)break;n.tag===5&&f!==null&&(n=f,a?(u=ni(r,h),u!=null&&y.unshift(di(r,u,n))):a||(u=ni(r,h),u!=null&&y.push(di(r,u,n)))),r=r.return}y.length!==0&&e.push({event:t,listeners:y})}var Od=/\r\n?/g,Id=/\u0000|\uFFFD/g;function Xl(e){return(typeof e=="string"?e:""+e).replace(Od,`
|
||
`).replace(Id,"")}function Fi(e,t,r){if(t=Xl(t),Xl(e)!==t&&r)throw Error(W(425))}function fs(){}var Qn=null,Yn=null;function Jn(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Zn=typeof setTimeout=="function"?setTimeout:void 0,Hd=typeof clearTimeout=="function"?clearTimeout:void 0,Gl=typeof Promise=="function"?Promise:void 0,Fd=typeof queueMicrotask=="function"?queueMicrotask:typeof Gl<"u"?function(e){return Gl.resolve(null).then(e).catch(Nd)}:Zn;function Nd(e){setTimeout(function(){throw e})}function vn(e,t){var r=t,i=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(i===0){e.removeChild(a),ai(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=a}while(r);ai(t)}function At(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ql(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Ar=Math.random().toString(36).slice(2),nt="__reactFiber$"+Ar,fi="__reactProps$"+Ar,pt="__reactContainer$"+Ar,eo="__reactEvents$"+Ar,zd="__reactListeners$"+Ar,jd="__reactHandles$"+Ar;function Wt(e){var t=e[nt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[pt]||r[nt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Ql(e);e!==null;){if(r=e[nt])return r;e=Ql(e)}return t}e=r,r=e.parentNode}return null}function bi(e){return e=e[nt]||e[pt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ar(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function Bs(e){return e[fi]||null}var to=[],cr=-1;function Nt(e){return{current:e}}function ne(e){0>cr||(e.current=to[cr],to[cr]=null,cr--)}function ie(e,t){cr++,to[cr]=e.current,e.current=t}var Ht={},be=Nt(Ht),Me=Nt(!1),Xt=Ht;function wr(e,t){var r=e.type.contextTypes;if(!r)return Ht;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var a={},h;for(h in r)a[h]=t[h];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Be(e){return e=e.childContextTypes,e!=null}function _s(){ne(Me),ne(be)}function Yl(e,t,r){if(be.current!==Ht)throw Error(W(168));ie(be,t),ie(Me,r)}function zc(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var a in i)if(!(a in t))throw Error(W(108,bh(e)||"Unknown",a));return ue({},r,i)}function ps(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ht,Xt=be.current,ie(be,e),ie(Me,Me.current),!0}function Jl(e,t,r){var i=e.stateNode;if(!i)throw Error(W(169));r?(e=zc(e,t,Xt),i.__reactInternalMemoizedMergedChildContext=e,ne(Me),ne(be),ie(be,e)):ne(Me),ie(Me,r)}var ct=null,Os=!1,gn=!1;function jc(e){ct===null?ct=[e]:ct.push(e)}function Ud(e){Os=!0,jc(e)}function zt(){if(!gn&&ct!==null){gn=!0;var e=0,t=re;try{var r=ct;for(re=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}ct=null,Os=!1}catch(a){throw ct!==null&&(ct=ct.slice(e+1)),dc(Bo,zt),a}finally{re=t,gn=!1}}return null}var ur=[],hr=0,vs=null,gs=0,We=[],$e=0,Gt=null,ut=1,ht="";function jt(e,t){ur[hr++]=gs,ur[hr++]=vs,vs=e,gs=t}function Uc(e,t,r){We[$e++]=ut,We[$e++]=ht,We[$e++]=Gt,Gt=e;var i=ut;e=ht;var a=32-Ze(i)-1;i&=~(1<<a),r+=1;var h=32-Ze(t)+a;if(30<h){var y=a-a%5;h=(i&(1<<y)-1).toString(32),i>>=y,a-=y,ut=1<<32-Ze(t)+a|r<<a|i,ht=h+e}else ut=1<<h|r<<a|i,ht=e}function Wo(e){e.return!==null&&(jt(e,1),Uc(e,1,0))}function $o(e){for(;e===vs;)vs=ur[--hr],ur[hr]=null,gs=ur[--hr],ur[hr]=null;for(;e===Gt;)Gt=We[--$e],We[$e]=null,ht=We[--$e],We[$e]=null,ut=We[--$e],We[$e]=null}var Fe=null,He=null,oe=!1,Je=null;function Wc(e,t){var r=Ke(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Zl(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Fe=e,He=At(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Fe=e,He=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Gt!==null?{id:ut,overflow:ht}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Ke(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Fe=e,He=null,!0):!1;default:return!1}}function ro(e){return(e.mode&1)!==0&&(e.flags&128)===0}function io(e){if(oe){var t=He;if(t){var r=t;if(!Zl(e,t)){if(ro(e))throw Error(W(418));t=At(r.nextSibling);var i=Fe;t&&Zl(e,t)?Wc(i,r):(e.flags=e.flags&-4097|2,oe=!1,Fe=e)}}else{if(ro(e))throw Error(W(418));e.flags=e.flags&-4097|2,oe=!1,Fe=e}}}function ea(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Fe=e}function Ni(e){if(e!==Fe)return!1;if(!oe)return ea(e),oe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Jn(e.type,e.memoizedProps)),t&&(t=He)){if(ro(e))throw $c(),Error(W(418));for(;t;)Wc(e,t),t=At(t.nextSibling)}if(ea(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){He=At(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}He=null}}else He=Fe?At(e.stateNode.nextSibling):null;return!0}function $c(){for(var e=He;e;)e=At(e.nextSibling)}function Er(){He=Fe=null,oe=!1}function Ko(e){Je===null?Je=[e]:Je.push(e)}var Wd=mt.ReactCurrentBatchConfig;function jr(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(W(309));var i=r.stateNode}if(!i)throw Error(W(147,e));var a=i,h=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===h?t.ref:(t=function(y){var n=a.refs;y===null?delete n[h]:n[h]=y},t._stringRef=h,t)}if(typeof e!="string")throw Error(W(284));if(!r._owner)throw Error(W(290,e))}return e}function zi(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ta(e){var t=e._init;return t(e._payload)}function Kc(e){function t(o,s){if(e){var l=o.deletions;l===null?(o.deletions=[s],o.flags|=16):l.push(s)}}function r(o,s){if(!e)return null;for(;s!==null;)t(o,s),s=s.sibling;return null}function i(o,s){for(o=new Map;s!==null;)s.key!==null?o.set(s.key,s):o.set(s.index,s),s=s.sibling;return o}function a(o,s){return o=Ot(o,s),o.index=0,o.sibling=null,o}function h(o,s,l){return o.index=l,e?(l=o.alternate,l!==null?(l=l.index,l<s?(o.flags|=2,s):l):(o.flags|=2,s)):(o.flags|=1048576,s)}function y(o){return e&&o.alternate===null&&(o.flags|=2),o}function n(o,s,l,_){return s===null||s.tag!==6?(s=kn(l,o.mode,_),s.return=o,s):(s=a(s,l),s.return=o,s)}function u(o,s,l,_){var g=l.type;return g===sr?S(o,s,l.props.children,_,l.key):s!==null&&(s.elementType===g||typeof g=="object"&&g!==null&&g.$$typeof===wt&&ta(g)===s.type)?(_=a(s,l.props),_.ref=jr(o,s,l),_.return=o,_):(_=is(l.type,l.key,l.props,null,o.mode,_),_.ref=jr(o,s,l),_.return=o,_)}function f(o,s,l,_){return s===null||s.tag!==4||s.stateNode.containerInfo!==l.containerInfo||s.stateNode.implementation!==l.implementation?(s=bn(l,o.mode,_),s.return=o,s):(s=a(s,l.children||[]),s.return=o,s)}function S(o,s,l,_,g){return s===null||s.tag!==7?(s=qt(l,o.mode,_,g),s.return=o,s):(s=a(s,l),s.return=o,s)}function d(o,s,l){if(typeof s=="string"&&s!==""||typeof s=="number")return s=kn(""+s,o.mode,l),s.return=o,s;if(typeof s=="object"&&s!==null){switch(s.$$typeof){case Di:return l=is(s.type,s.key,s.props,null,o.mode,l),l.ref=jr(o,null,s),l.return=o,l;case ir:return s=bn(s,o.mode,l),s.return=o,s;case wt:var _=s._init;return d(o,_(s._payload),l)}if(Kr(s)||Ir(s))return s=qt(s,o.mode,l,null),s.return=o,s;zi(o,s)}return null}function p(o,s,l,_){var g=s!==null?s.key:null;if(typeof l=="string"&&l!==""||typeof l=="number")return g!==null?null:n(o,s,""+l,_);if(typeof l=="object"&&l!==null){switch(l.$$typeof){case Di:return l.key===g?u(o,s,l,_):null;case ir:return l.key===g?f(o,s,l,_):null;case wt:return g=l._init,p(o,s,g(l._payload),_)}if(Kr(l)||Ir(l))return g!==null?null:S(o,s,l,_,null);zi(o,l)}return null}function C(o,s,l,_,g){if(typeof _=="string"&&_!==""||typeof _=="number")return o=o.get(l)||null,n(s,o,""+_,g);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Di:return o=o.get(_.key===null?l:_.key)||null,u(s,o,_,g);case ir:return o=o.get(_.key===null?l:_.key)||null,f(s,o,_,g);case wt:var E=_._init;return C(o,s,l,E(_._payload),g)}if(Kr(_)||Ir(_))return o=o.get(l)||null,S(s,o,_,g,null);zi(s,_)}return null}function w(o,s,l,_){for(var g=null,E=null,b=s,v=s=0,k=null;b!==null&&v<l.length;v++){b.index>v?(k=b,b=null):k=b.sibling;var R=p(o,b,l[v],_);if(R===null){b===null&&(b=k);break}e&&b&&R.alternate===null&&t(o,b),s=h(R,s,v),E===null?g=R:E.sibling=R,E=R,b=k}if(v===l.length)return r(o,b),oe&&jt(o,v),g;if(b===null){for(;v<l.length;v++)b=d(o,l[v],_),b!==null&&(s=h(b,s,v),E===null?g=b:E.sibling=b,E=b);return oe&&jt(o,v),g}for(b=i(o,b);v<l.length;v++)k=C(b,o,v,l[v],_),k!==null&&(e&&k.alternate!==null&&b.delete(k.key===null?v:k.key),s=h(k,s,v),E===null?g=k:E.sibling=k,E=k);return e&&b.forEach(function(P){return t(o,P)}),oe&&jt(o,v),g}function m(o,s,l,_){var g=Ir(l);if(typeof g!="function")throw Error(W(150));if(l=g.call(l),l==null)throw Error(W(151));for(var E=g=null,b=s,v=s=0,k=null,R=l.next();b!==null&&!R.done;v++,R=l.next()){b.index>v?(k=b,b=null):k=b.sibling;var P=p(o,b,R.value,_);if(P===null){b===null&&(b=k);break}e&&b&&P.alternate===null&&t(o,b),s=h(P,s,v),E===null?g=P:E.sibling=P,E=P,b=k}if(R.done)return r(o,b),oe&&jt(o,v),g;if(b===null){for(;!R.done;v++,R=l.next())R=d(o,R.value,_),R!==null&&(s=h(R,s,v),E===null?g=R:E.sibling=R,E=R);return oe&&jt(o,v),g}for(b=i(o,b);!R.done;v++,R=l.next())R=C(b,o,v,R.value,_),R!==null&&(e&&R.alternate!==null&&b.delete(R.key===null?v:R.key),s=h(R,s,v),E===null?g=R:E.sibling=R,E=R);return e&&b.forEach(function(A){return t(o,A)}),oe&&jt(o,v),g}function c(o,s,l,_){if(typeof l=="object"&&l!==null&&l.type===sr&&l.key===null&&(l=l.props.children),typeof l=="object"&&l!==null){switch(l.$$typeof){case Di:e:{for(var g=l.key,E=s;E!==null;){if(E.key===g){if(g=l.type,g===sr){if(E.tag===7){r(o,E.sibling),s=a(E,l.props.children),s.return=o,o=s;break e}}else if(E.elementType===g||typeof g=="object"&&g!==null&&g.$$typeof===wt&&ta(g)===E.type){r(o,E.sibling),s=a(E,l.props),s.ref=jr(o,E,l),s.return=o,o=s;break e}r(o,E);break}else t(o,E);E=E.sibling}l.type===sr?(s=qt(l.props.children,o.mode,_,l.key),s.return=o,o=s):(_=is(l.type,l.key,l.props,null,o.mode,_),_.ref=jr(o,s,l),_.return=o,o=_)}return y(o);case ir:e:{for(E=l.key;s!==null;){if(s.key===E)if(s.tag===4&&s.stateNode.containerInfo===l.containerInfo&&s.stateNode.implementation===l.implementation){r(o,s.sibling),s=a(s,l.children||[]),s.return=o,o=s;break e}else{r(o,s);break}else t(o,s);s=s.sibling}s=bn(l,o.mode,_),s.return=o,o=s}return y(o);case wt:return E=l._init,c(o,s,E(l._payload),_)}if(Kr(l))return w(o,s,l,_);if(Ir(l))return m(o,s,l,_);zi(o,l)}return typeof l=="string"&&l!==""||typeof l=="number"?(l=""+l,s!==null&&s.tag===6?(r(o,s.sibling),s=a(s,l),s.return=o,o=s):(r(o,s),s=kn(l,o.mode,_),s.return=o,o=s),y(o)):r(o,s)}return c}var kr=Kc(!0),Vc=Kc(!1),ms=Nt(null),Ss=null,dr=null,Vo=null;function qo(){Vo=dr=Ss=null}function Xo(e){var t=ms.current;ne(ms),e._currentValue=t}function so(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function Sr(e,t){Ss=e,Vo=dr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pe=!0),e.firstContext=null)}function qe(e){var t=e._currentValue;if(Vo!==e)if(e={context:e,memoizedValue:t,next:null},dr===null){if(Ss===null)throw Error(W(308));dr=e,Ss.dependencies={lanes:0,firstContext:e}}else dr=dr.next=e;return t}var $t=null;function Go(e){$t===null?$t=[e]:$t.push(e)}function qc(e,t,r,i){var a=t.interleaved;return a===null?(r.next=r,Go(t)):(r.next=a.next,a.next=r),t.interleaved=r,vt(e,i)}function vt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Et=!1;function Qo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ft(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Pt(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,Z&2){var a=i.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),i.pending=t,vt(e,r)}return a=i.interleaved,a===null?(t.next=t,Go(i)):(t.next=a.next,a.next=t),i.interleaved=t,vt(e,r)}function Yi(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Oo(e,r)}}function ra(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var a=null,h=null;if(r=r.firstBaseUpdate,r!==null){do{var y={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};h===null?a=h=y:h=h.next=y,r=r.next}while(r!==null);h===null?a=h=t:h=h.next=t}else a=h=t;r={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:h,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ys(e,t,r,i){var a=e.updateQueue;Et=!1;var h=a.firstBaseUpdate,y=a.lastBaseUpdate,n=a.shared.pending;if(n!==null){a.shared.pending=null;var u=n,f=u.next;u.next=null,y===null?h=f:y.next=f,y=u;var S=e.alternate;S!==null&&(S=S.updateQueue,n=S.lastBaseUpdate,n!==y&&(n===null?S.firstBaseUpdate=f:n.next=f,S.lastBaseUpdate=u))}if(h!==null){var d=a.baseState;y=0,S=f=u=null,n=h;do{var p=n.lane,C=n.eventTime;if((i&p)===p){S!==null&&(S=S.next={eventTime:C,lane:0,tag:n.tag,payload:n.payload,callback:n.callback,next:null});e:{var w=e,m=n;switch(p=t,C=r,m.tag){case 1:if(w=m.payload,typeof w=="function"){d=w.call(C,d,p);break e}d=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=m.payload,p=typeof w=="function"?w.call(C,d,p):w,p==null)break e;d=ue({},d,p);break e;case 2:Et=!0}}n.callback!==null&&n.lane!==0&&(e.flags|=64,p=a.effects,p===null?a.effects=[n]:p.push(n))}else C={eventTime:C,lane:p,tag:n.tag,payload:n.payload,callback:n.callback,next:null},S===null?(f=S=C,u=d):S=S.next=C,y|=p;if(n=n.next,n===null){if(n=a.shared.pending,n===null)break;p=n,n=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);if(S===null&&(u=d),a.baseState=u,a.firstBaseUpdate=f,a.lastBaseUpdate=S,t=a.shared.interleaved,t!==null){a=t;do y|=a.lane,a=a.next;while(a!==t)}else h===null&&(a.shared.lanes=0);Yt|=y,e.lanes=y,e.memoizedState=d}}function ia(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=r,typeof a!="function")throw Error(W(191,a));a.call(i)}}}var xi={},lt=Nt(xi),_i=Nt(xi),pi=Nt(xi);function Kt(e){if(e===xi)throw Error(W(174));return e}function Yo(e,t){switch(ie(pi,t),ie(_i,e),ie(lt,xi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fn(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Fn(t,e)}ne(lt),ie(lt,t)}function br(){ne(lt),ne(_i),ne(pi)}function Gc(e){Kt(pi.current);var t=Kt(lt.current),r=Fn(t,e.type);t!==r&&(ie(_i,e),ie(lt,r))}function Jo(e){_i.current===e&&(ne(lt),ne(_i))}var ae=Nt(0);function Cs(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mn=[];function Zo(){for(var e=0;e<mn.length;e++)mn[e]._workInProgressVersionPrimary=null;mn.length=0}var Ji=mt.ReactCurrentDispatcher,Sn=mt.ReactCurrentBatchConfig,Qt=0,ce=null,_e=null,ve=null,ws=!1,Zr=!1,vi=0,$d=0;function we(){throw Error(W(321))}function el(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!tt(e[r],t[r]))return!1;return!0}function tl(e,t,r,i,a,h){if(Qt=h,ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ji.current=e===null||e.memoizedState===null?Xd:Gd,e=r(i,a),Zr){h=0;do{if(Zr=!1,vi=0,25<=h)throw Error(W(301));h+=1,ve=_e=null,t.updateQueue=null,Ji.current=Qd,e=r(i,a)}while(Zr)}if(Ji.current=Es,t=_e!==null&&_e.next!==null,Qt=0,ve=_e=ce=null,ws=!1,t)throw Error(W(300));return e}function rl(){var e=vi!==0;return vi=0,e}function st(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ve===null?ce.memoizedState=ve=e:ve=ve.next=e,ve}function Xe(){if(_e===null){var e=ce.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=ve===null?ce.memoizedState:ve.next;if(t!==null)ve=t,_e=e;else{if(e===null)throw Error(W(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},ve===null?ce.memoizedState=ve=e:ve=ve.next=e}return ve}function gi(e,t){return typeof t=="function"?t(e):t}function yn(e){var t=Xe(),r=t.queue;if(r===null)throw Error(W(311));r.lastRenderedReducer=e;var i=_e,a=i.baseQueue,h=r.pending;if(h!==null){if(a!==null){var y=a.next;a.next=h.next,h.next=y}i.baseQueue=a=h,r.pending=null}if(a!==null){h=a.next,i=i.baseState;var n=y=null,u=null,f=h;do{var S=f.lane;if((Qt&S)===S)u!==null&&(u=u.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),i=f.hasEagerState?f.eagerState:e(i,f.action);else{var d={lane:S,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};u===null?(n=u=d,y=i):u=u.next=d,ce.lanes|=S,Yt|=S}f=f.next}while(f!==null&&f!==h);u===null?y=i:u.next=n,tt(i,t.memoizedState)||(Pe=!0),t.memoizedState=i,t.baseState=y,t.baseQueue=u,r.lastRenderedState=i}if(e=r.interleaved,e!==null){a=e;do h=a.lane,ce.lanes|=h,Yt|=h,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Cn(e){var t=Xe(),r=t.queue;if(r===null)throw Error(W(311));r.lastRenderedReducer=e;var i=r.dispatch,a=r.pending,h=t.memoizedState;if(a!==null){r.pending=null;var y=a=a.next;do h=e(h,y.action),y=y.next;while(y!==a);tt(h,t.memoizedState)||(Pe=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),r.lastRenderedState=h}return[h,i]}function Qc(){}function Yc(e,t){var r=ce,i=Xe(),a=t(),h=!tt(i.memoizedState,a);if(h&&(i.memoizedState=a,Pe=!0),i=i.queue,il(eu.bind(null,r,i,e),[e]),i.getSnapshot!==t||h||ve!==null&&ve.memoizedState.tag&1){if(r.flags|=2048,mi(9,Zc.bind(null,r,i,a,t),void 0,null),ge===null)throw Error(W(349));Qt&30||Jc(r,t,a)}return a}function Jc(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ce.updateQueue,t===null?(t={lastEffect:null,stores:null},ce.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Zc(e,t,r,i){t.value=r,t.getSnapshot=i,tu(t)&&ru(e)}function eu(e,t,r){return r(function(){tu(t)&&ru(e)})}function tu(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!tt(e,r)}catch{return!0}}function ru(e){var t=vt(e,1);t!==null&&et(t,e,1,-1)}function sa(e){var t=st();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:e},t.queue=e,e=e.dispatch=qd.bind(null,ce,e),[t.memoizedState,e]}function mi(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=ce.updateQueue,t===null?(t={lastEffect:null,stores:null},ce.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function iu(){return Xe().memoizedState}function Zi(e,t,r,i){var a=st();ce.flags|=e,a.memoizedState=mi(1|t,r,void 0,i===void 0?null:i)}function Is(e,t,r,i){var a=Xe();i=i===void 0?null:i;var h=void 0;if(_e!==null){var y=_e.memoizedState;if(h=y.destroy,i!==null&&el(i,y.deps)){a.memoizedState=mi(t,r,h,i);return}}ce.flags|=e,a.memoizedState=mi(1|t,r,h,i)}function na(e,t){return Zi(8390656,8,e,t)}function il(e,t){return Is(2048,8,e,t)}function su(e,t){return Is(4,2,e,t)}function nu(e,t){return Is(4,4,e,t)}function ou(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function lu(e,t,r){return r=r!=null?r.concat([e]):null,Is(4,4,ou.bind(null,t,e),r)}function sl(){}function au(e,t){var r=Xe();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&el(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function cu(e,t){var r=Xe();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&el(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function uu(e,t,r){return Qt&21?(tt(r,t)||(r=pc(),ce.lanes|=r,Yt|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Pe=!0),e.memoizedState=r)}function Kd(e,t){var r=re;re=r!==0&&4>r?r:4,e(!0);var i=Sn.transition;Sn.transition={};try{e(!1),t()}finally{re=r,Sn.transition=i}}function hu(){return Xe().memoizedState}function Vd(e,t,r){var i=Bt(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},du(e))fu(t,r);else if(r=qc(e,t,r,i),r!==null){var a=Le();et(r,e,i,a),_u(r,t,i)}}function qd(e,t,r){var i=Bt(e),a={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(du(e))fu(t,a);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var y=t.lastRenderedState,n=h(y,r);if(a.hasEagerState=!0,a.eagerState=n,tt(n,y)){var u=t.interleaved;u===null?(a.next=a,Go(t)):(a.next=u.next,u.next=a),t.interleaved=a;return}}catch{}finally{}r=qc(e,t,a,i),r!==null&&(a=Le(),et(r,e,i,a),_u(r,t,i))}}function du(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function fu(e,t){Zr=ws=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function _u(e,t,r){if(r&4194240){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Oo(e,r)}}var Es={readContext:qe,useCallback:we,useContext:we,useEffect:we,useImperativeHandle:we,useInsertionEffect:we,useLayoutEffect:we,useMemo:we,useReducer:we,useRef:we,useState:we,useDebugValue:we,useDeferredValue:we,useTransition:we,useMutableSource:we,useSyncExternalStore:we,useId:we,unstable_isNewReconciler:!1},Xd={readContext:qe,useCallback:function(e,t){return st().memoizedState=[e,t===void 0?null:t],e},useContext:qe,useEffect:na,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Zi(4194308,4,ou.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Zi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zi(4,2,e,t)},useMemo:function(e,t){var r=st();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=st();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Vd.bind(null,ce,e),[i.memoizedState,e]},useRef:function(e){var t=st();return e={current:e},t.memoizedState=e},useState:sa,useDebugValue:sl,useDeferredValue:function(e){return st().memoizedState=e},useTransition:function(){var e=sa(!1),t=e[0];return e=Kd.bind(null,e[1]),st().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=ce,a=st();if(oe){if(r===void 0)throw Error(W(407));r=r()}else{if(r=t(),ge===null)throw Error(W(349));Qt&30||Jc(i,t,r)}a.memoizedState=r;var h={value:r,getSnapshot:t};return a.queue=h,na(eu.bind(null,i,h,e),[e]),i.flags|=2048,mi(9,Zc.bind(null,i,h,r,t),void 0,null),r},useId:function(){var e=st(),t=ge.identifierPrefix;if(oe){var r=ht,i=ut;r=(i&~(1<<32-Ze(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=vi++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=$d++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Gd={readContext:qe,useCallback:au,useContext:qe,useEffect:il,useImperativeHandle:lu,useInsertionEffect:su,useLayoutEffect:nu,useMemo:cu,useReducer:yn,useRef:iu,useState:function(){return yn(gi)},useDebugValue:sl,useDeferredValue:function(e){var t=Xe();return uu(t,_e.memoizedState,e)},useTransition:function(){var e=yn(gi)[0],t=Xe().memoizedState;return[e,t]},useMutableSource:Qc,useSyncExternalStore:Yc,useId:hu,unstable_isNewReconciler:!1},Qd={readContext:qe,useCallback:au,useContext:qe,useEffect:il,useImperativeHandle:lu,useInsertionEffect:su,useLayoutEffect:nu,useMemo:cu,useReducer:Cn,useRef:iu,useState:function(){return Cn(gi)},useDebugValue:sl,useDeferredValue:function(e){var t=Xe();return _e===null?t.memoizedState=e:uu(t,_e.memoizedState,e)},useTransition:function(){var e=Cn(gi)[0],t=Xe().memoizedState;return[e,t]},useMutableSource:Qc,useSyncExternalStore:Yc,useId:hu,unstable_isNewReconciler:!1};function Qe(e,t){if(e&&e.defaultProps){t=ue({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function no(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:ue({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Hs={isMounted:function(e){return(e=e._reactInternals)?er(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=Le(),a=Bt(e),h=ft(i,a);h.payload=t,r!=null&&(h.callback=r),t=Pt(e,h,a),t!==null&&(et(t,e,a,i),Yi(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=Le(),a=Bt(e),h=ft(i,a);h.tag=1,h.payload=t,r!=null&&(h.callback=r),t=Pt(e,h,a),t!==null&&(et(t,e,a,i),Yi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Le(),i=Bt(e),a=ft(r,i);a.tag=2,t!=null&&(a.callback=t),t=Pt(e,a,i),t!==null&&(et(t,e,i,r),Yi(t,e,i))}};function oa(e,t,r,i,a,h,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,h,y):t.prototype&&t.prototype.isPureReactComponent?!ui(r,i)||!ui(a,h):!0}function pu(e,t,r){var i=!1,a=Ht,h=t.contextType;return typeof h=="object"&&h!==null?h=qe(h):(a=Be(t)?Xt:be.current,i=t.contextTypes,h=(i=i!=null)?wr(e,a):Ht),t=new t(r,h),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Hs,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=h),t}function la(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&Hs.enqueueReplaceState(t,t.state,null)}function oo(e,t,r,i){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},Qo(e);var h=t.contextType;typeof h=="object"&&h!==null?a.context=qe(h):(h=Be(t)?Xt:be.current,a.context=wr(e,h)),a.state=e.memoizedState,h=t.getDerivedStateFromProps,typeof h=="function"&&(no(e,t,h,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&Hs.enqueueReplaceState(a,a.state,null),ys(e,r,a,i),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function xr(e,t){try{var r="",i=t;do r+=kh(i),i=i.return;while(i);var a=r}catch(h){a=`
|
||
Error generating stack: `+h.message+`
|
||
`+h.stack}return{value:e,source:t,stack:a,digest:null}}function wn(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function lo(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Yd=typeof WeakMap=="function"?WeakMap:Map;function vu(e,t,r){r=ft(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){bs||(bs=!0,mo=i),lo(e,t)},r}function gu(e,t,r){r=ft(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var a=t.value;r.payload=function(){return i(a)},r.callback=function(){lo(e,t)}}var h=e.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(r.callback=function(){lo(e,t),typeof i!="function"&&(Mt===null?Mt=new Set([this]):Mt.add(this));var y=t.stack;this.componentDidCatch(t.value,{componentStack:y!==null?y:""})}),r}function aa(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new Yd;var a=new Set;i.set(t,a)}else a=i.get(t),a===void 0&&(a=new Set,i.set(t,a));a.has(r)||(a.add(r),e=df.bind(null,e,t,r),t.then(e,e))}function ca(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ua(e,t,r,i,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=ft(-1,1),t.tag=2,Pt(r,t,1))),r.lanes|=1),e)}var Jd=mt.ReactCurrentOwner,Pe=!1;function xe(e,t,r,i){t.child=e===null?Vc(t,null,r,i):kr(t,e.child,r,i)}function ha(e,t,r,i,a){r=r.render;var h=t.ref;return Sr(t,a),i=tl(e,t,r,i,h,a),r=rl(),e!==null&&!Pe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,gt(e,t,a)):(oe&&r&&Wo(t),t.flags|=1,xe(e,t,i,a),t.child)}function da(e,t,r,i,a){if(e===null){var h=r.type;return typeof h=="function"&&!dl(h)&&h.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=h,mu(e,t,h,i,a)):(e=is(r.type,null,i,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!(e.lanes&a)){var y=h.memoizedProps;if(r=r.compare,r=r!==null?r:ui,r(y,i)&&e.ref===t.ref)return gt(e,t,a)}return t.flags|=1,e=Ot(h,i),e.ref=t.ref,e.return=t,t.child=e}function mu(e,t,r,i,a){if(e!==null){var h=e.memoizedProps;if(ui(h,i)&&e.ref===t.ref)if(Pe=!1,t.pendingProps=i=h,(e.lanes&a)!==0)e.flags&131072&&(Pe=!0);else return t.lanes=e.lanes,gt(e,t,a)}return ao(e,t,r,i,a)}function Su(e,t,r){var i=t.pendingProps,a=i.children,h=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ie(_r,Ie),Ie|=r;else{if(!(r&1073741824))return e=h!==null?h.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ie(_r,Ie),Ie|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=h!==null?h.baseLanes:r,ie(_r,Ie),Ie|=i}else h!==null?(i=h.baseLanes|r,t.memoizedState=null):i=r,ie(_r,Ie),Ie|=i;return xe(e,t,a,r),t.child}function yu(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function ao(e,t,r,i,a){var h=Be(r)?Xt:be.current;return h=wr(t,h),Sr(t,a),r=tl(e,t,r,i,h,a),i=rl(),e!==null&&!Pe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,gt(e,t,a)):(oe&&i&&Wo(t),t.flags|=1,xe(e,t,r,a),t.child)}function fa(e,t,r,i,a){if(Be(r)){var h=!0;ps(t)}else h=!1;if(Sr(t,a),t.stateNode===null)es(e,t),pu(t,r,i),oo(t,r,i,a),i=!0;else if(e===null){var y=t.stateNode,n=t.memoizedProps;y.props=n;var u=y.context,f=r.contextType;typeof f=="object"&&f!==null?f=qe(f):(f=Be(r)?Xt:be.current,f=wr(t,f));var S=r.getDerivedStateFromProps,d=typeof S=="function"||typeof y.getSnapshotBeforeUpdate=="function";d||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(n!==i||u!==f)&&la(t,y,i,f),Et=!1;var p=t.memoizedState;y.state=p,ys(t,i,y,a),u=t.memoizedState,n!==i||p!==u||Me.current||Et?(typeof S=="function"&&(no(t,r,S,i),u=t.memoizedState),(n=Et||oa(t,r,n,i,p,u,f))?(d||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(t.flags|=4194308)):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=u),y.props=i,y.state=u,y.context=f,i=n):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{y=t.stateNode,Xc(e,t),n=t.memoizedProps,f=t.type===t.elementType?n:Qe(t.type,n),y.props=f,d=t.pendingProps,p=y.context,u=r.contextType,typeof u=="object"&&u!==null?u=qe(u):(u=Be(r)?Xt:be.current,u=wr(t,u));var C=r.getDerivedStateFromProps;(S=typeof C=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(n!==d||p!==u)&&la(t,y,i,u),Et=!1,p=t.memoizedState,y.state=p,ys(t,i,y,a);var w=t.memoizedState;n!==d||p!==w||Me.current||Et?(typeof C=="function"&&(no(t,r,C,i),w=t.memoizedState),(f=Et||oa(t,r,f,i,p,w,u)||!1)?(S||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(i,w,u),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(i,w,u)),typeof y.componentDidUpdate=="function"&&(t.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof y.componentDidUpdate!="function"||n===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||n===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=w),y.props=i,y.state=w,y.context=u,i=f):(typeof y.componentDidUpdate!="function"||n===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||n===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),i=!1)}return co(e,t,r,i,h,a)}function co(e,t,r,i,a,h){yu(e,t);var y=(t.flags&128)!==0;if(!i&&!y)return a&&Jl(t,r,!1),gt(e,t,h);i=t.stateNode,Jd.current=t;var n=y&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&y?(t.child=kr(t,e.child,null,h),t.child=kr(t,null,n,h)):xe(e,t,n,h),t.memoizedState=i.state,a&&Jl(t,r,!0),t.child}function Cu(e){var t=e.stateNode;t.pendingContext?Yl(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Yl(e,t.context,!1),Yo(e,t.containerInfo)}function _a(e,t,r,i,a){return Er(),Ko(a),t.flags|=256,xe(e,t,r,i),t.child}var uo={dehydrated:null,treeContext:null,retryLane:0};function ho(e){return{baseLanes:e,cachePool:null,transitions:null}}function wu(e,t,r){var i=t.pendingProps,a=ae.current,h=!1,y=(t.flags&128)!==0,n;if((n=y)||(n=e!==null&&e.memoizedState===null?!1:(a&2)!==0),n?(h=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),ie(ae,a&1),e===null)return io(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(y=i.children,e=i.fallback,h?(i=t.mode,h=t.child,y={mode:"hidden",children:y},!(i&1)&&h!==null?(h.childLanes=0,h.pendingProps=y):h=zs(y,i,0,null),e=qt(e,i,r,null),h.return=t,e.return=t,h.sibling=e,t.child=h,t.child.memoizedState=ho(r),t.memoizedState=uo,e):nl(t,y));if(a=e.memoizedState,a!==null&&(n=a.dehydrated,n!==null))return Zd(e,t,y,i,n,a,r);if(h){h=i.fallback,y=t.mode,a=e.child,n=a.sibling;var u={mode:"hidden",children:i.children};return!(y&1)&&t.child!==a?(i=t.child,i.childLanes=0,i.pendingProps=u,t.deletions=null):(i=Ot(a,u),i.subtreeFlags=a.subtreeFlags&14680064),n!==null?h=Ot(n,h):(h=qt(h,y,r,null),h.flags|=2),h.return=t,i.return=t,i.sibling=h,t.child=i,i=h,h=t.child,y=e.child.memoizedState,y=y===null?ho(r):{baseLanes:y.baseLanes|r,cachePool:null,transitions:y.transitions},h.memoizedState=y,h.childLanes=e.childLanes&~r,t.memoizedState=uo,i}return h=e.child,e=h.sibling,i=Ot(h,{mode:"visible",children:i.children}),!(t.mode&1)&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function nl(e,t){return t=zs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ji(e,t,r,i){return i!==null&&Ko(i),kr(t,e.child,null,r),e=nl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Zd(e,t,r,i,a,h,y){if(r)return t.flags&256?(t.flags&=-257,i=wn(Error(W(422))),ji(e,t,y,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(h=i.fallback,a=t.mode,i=zs({mode:"visible",children:i.children},a,0,null),h=qt(h,a,y,null),h.flags|=2,i.return=t,h.return=t,i.sibling=h,t.child=i,t.mode&1&&kr(t,e.child,null,y),t.child.memoizedState=ho(y),t.memoizedState=uo,h);if(!(t.mode&1))return ji(e,t,y,null);if(a.data==="$!"){if(i=a.nextSibling&&a.nextSibling.dataset,i)var n=i.dgst;return i=n,h=Error(W(419)),i=wn(h,i,void 0),ji(e,t,y,i)}if(n=(y&e.childLanes)!==0,Pe||n){if(i=ge,i!==null){switch(y&-y){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(i.suspendedLanes|y)?0:a,a!==0&&a!==h.retryLane&&(h.retryLane=a,vt(e,a),et(i,e,a,-1))}return hl(),i=wn(Error(W(421))),ji(e,t,y,i)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=ff.bind(null,e),a._reactRetry=t,null):(e=h.treeContext,He=At(a.nextSibling),Fe=t,oe=!0,Je=null,e!==null&&(We[$e++]=ut,We[$e++]=ht,We[$e++]=Gt,ut=e.id,ht=e.overflow,Gt=t),t=nl(t,i.children),t.flags|=4096,t)}function pa(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),so(e.return,t,r)}function En(e,t,r,i,a){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:a}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=i,h.tail=r,h.tailMode=a)}function Eu(e,t,r){var i=t.pendingProps,a=i.revealOrder,h=i.tail;if(xe(e,t,i.children,r),i=ae.current,i&2)i=i&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&pa(e,r,t);else if(e.tag===19)pa(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(ie(ae,i),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&Cs(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),En(t,!1,a,r,h);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Cs(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}En(t,!0,r,null,h);break;case"together":En(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function es(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Yt|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,r=Ot(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Ot(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function ef(e,t,r){switch(t.tag){case 3:Cu(t),Er();break;case 5:Gc(t);break;case 1:Be(t.type)&&ps(t);break;case 4:Yo(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,a=t.memoizedProps.value;ie(ms,i._currentValue),i._currentValue=a;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(ie(ae,ae.current&1),t.flags|=128,null):r&t.child.childLanes?wu(e,t,r):(ie(ae,ae.current&1),e=gt(e,t,r),e!==null?e.sibling:null);ie(ae,ae.current&1);break;case 19:if(i=(r&t.childLanes)!==0,e.flags&128){if(i)return Eu(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),ie(ae,ae.current),i)break;return null;case 22:case 23:return t.lanes=0,Su(e,t,r)}return gt(e,t,r)}var ku,fo,bu,xu;ku=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};fo=function(){};bu=function(e,t,r,i){var a=e.memoizedProps;if(a!==i){e=t.stateNode,Kt(lt.current);var h=null;switch(r){case"input":a=Bn(e,a),i=Bn(e,i),h=[];break;case"select":a=ue({},a,{value:void 0}),i=ue({},i,{value:void 0}),h=[];break;case"textarea":a=Hn(e,a),i=Hn(e,i),h=[];break;default:typeof a.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=fs)}Nn(r,i);var y;r=null;for(f in a)if(!i.hasOwnProperty(f)&&a.hasOwnProperty(f)&&a[f]!=null)if(f==="style"){var n=a[f];for(y in n)n.hasOwnProperty(y)&&(r||(r={}),r[y]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(ii.hasOwnProperty(f)?h||(h=[]):(h=h||[]).push(f,null));for(f in i){var u=i[f];if(n=a!=null?a[f]:void 0,i.hasOwnProperty(f)&&u!==n&&(u!=null||n!=null))if(f==="style")if(n){for(y in n)!n.hasOwnProperty(y)||u&&u.hasOwnProperty(y)||(r||(r={}),r[y]="");for(y in u)u.hasOwnProperty(y)&&n[y]!==u[y]&&(r||(r={}),r[y]=u[y])}else r||(h||(h=[]),h.push(f,r)),r=u;else f==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,n=n?n.__html:void 0,u!=null&&n!==u&&(h=h||[]).push(f,u)):f==="children"?typeof u!="string"&&typeof u!="number"||(h=h||[]).push(f,""+u):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(ii.hasOwnProperty(f)?(u!=null&&f==="onScroll"&&se("scroll",e),h||n===u||(h=[])):(h=h||[]).push(f,u))}r&&(h=h||[]).push("style",r);var f=h;(t.updateQueue=f)&&(t.flags|=4)}};xu=function(e,t,r,i){r!==i&&(t.flags|=4)};function Ur(e,t){if(!oe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Ee(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,i|=a.subtreeFlags&14680064,i|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,i|=a.subtreeFlags,i|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function tf(e,t,r){var i=t.pendingProps;switch($o(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ee(t),null;case 1:return Be(t.type)&&_s(),Ee(t),null;case 3:return i=t.stateNode,br(),ne(Me),ne(be),Zo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ni(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Je!==null&&(Co(Je),Je=null))),fo(e,t),Ee(t),null;case 5:Jo(t);var a=Kt(pi.current);if(r=t.type,e!==null&&t.stateNode!=null)bu(e,t,r,i,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(W(166));return Ee(t),null}if(e=Kt(lt.current),Ni(t)){i=t.stateNode,r=t.type;var h=t.memoizedProps;switch(i[nt]=t,i[fi]=h,e=(t.mode&1)!==0,r){case"dialog":se("cancel",i),se("close",i);break;case"iframe":case"object":case"embed":se("load",i);break;case"video":case"audio":for(a=0;a<qr.length;a++)se(qr[a],i);break;case"source":se("error",i);break;case"img":case"image":case"link":se("error",i),se("load",i);break;case"details":se("toggle",i);break;case"input":kl(i,h),se("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!h.multiple},se("invalid",i);break;case"textarea":xl(i,h),se("invalid",i)}Nn(r,h),a=null;for(var y in h)if(h.hasOwnProperty(y)){var n=h[y];y==="children"?typeof n=="string"?i.textContent!==n&&(h.suppressHydrationWarning!==!0&&Fi(i.textContent,n,e),a=["children",n]):typeof n=="number"&&i.textContent!==""+n&&(h.suppressHydrationWarning!==!0&&Fi(i.textContent,n,e),a=["children",""+n]):ii.hasOwnProperty(y)&&n!=null&&y==="onScroll"&&se("scroll",i)}switch(r){case"input":Ti(i),bl(i,h,!0);break;case"textarea":Ti(i),Ll(i);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(i.onclick=fs)}i=a,t.updateQueue=i,i!==null&&(t.flags|=4)}else{y=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ec(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=y.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=y.createElement(r,{is:i.is}):(e=y.createElement(r),r==="select"&&(y=e,i.multiple?y.multiple=!0:i.size&&(y.size=i.size))):e=y.createElementNS(e,r),e[nt]=t,e[fi]=i,ku(e,t,!1,!1),t.stateNode=e;e:{switch(y=zn(r,i),r){case"dialog":se("cancel",e),se("close",e),a=i;break;case"iframe":case"object":case"embed":se("load",e),a=i;break;case"video":case"audio":for(a=0;a<qr.length;a++)se(qr[a],e);a=i;break;case"source":se("error",e),a=i;break;case"img":case"image":case"link":se("error",e),se("load",e),a=i;break;case"details":se("toggle",e),a=i;break;case"input":kl(e,i),a=Bn(e,i),se("invalid",e);break;case"option":a=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},a=ue({},i,{value:void 0}),se("invalid",e);break;case"textarea":xl(e,i),a=Hn(e,i),se("invalid",e);break;default:a=i}Nn(r,a),n=a;for(h in n)if(n.hasOwnProperty(h)){var u=n[h];h==="style"?ic(e,u):h==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&tc(e,u)):h==="children"?typeof u=="string"?(r!=="textarea"||u!=="")&&si(e,u):typeof u=="number"&&si(e,""+u):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(ii.hasOwnProperty(h)?u!=null&&h==="onScroll"&&se("scroll",e):u!=null&&Do(e,h,u,y))}switch(r){case"input":Ti(e),bl(e,i,!1);break;case"textarea":Ti(e),Ll(e);break;case"option":i.value!=null&&e.setAttribute("value",""+It(i.value));break;case"select":e.multiple=!!i.multiple,h=i.value,h!=null?pr(e,!!i.multiple,h,!1):i.defaultValue!=null&&pr(e,!!i.multiple,i.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=fs)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ee(t),null;case 6:if(e&&t.stateNode!=null)xu(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(W(166));if(r=Kt(pi.current),Kt(lt.current),Ni(t)){if(i=t.stateNode,r=t.memoizedProps,i[nt]=t,(h=i.nodeValue!==r)&&(e=Fe,e!==null))switch(e.tag){case 3:Fi(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Fi(i.nodeValue,r,(e.mode&1)!==0)}h&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[nt]=t,t.stateNode=i}return Ee(t),null;case 13:if(ne(ae),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(oe&&He!==null&&t.mode&1&&!(t.flags&128))$c(),Er(),t.flags|=98560,h=!1;else if(h=Ni(t),i!==null&&i.dehydrated!==null){if(e===null){if(!h)throw Error(W(318));if(h=t.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(W(317));h[nt]=t}else Er(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ee(t),h=!1}else Je!==null&&(Co(Je),Je=null),h=!0;if(!h)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||ae.current&1?pe===0&&(pe=3):hl())),t.updateQueue!==null&&(t.flags|=4),Ee(t),null);case 4:return br(),fo(e,t),e===null&&hi(t.stateNode.containerInfo),Ee(t),null;case 10:return Xo(t.type._context),Ee(t),null;case 17:return Be(t.type)&&_s(),Ee(t),null;case 19:if(ne(ae),h=t.memoizedState,h===null)return Ee(t),null;if(i=(t.flags&128)!==0,y=h.rendering,y===null)if(i)Ur(h,!1);else{if(pe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(y=Cs(e),y!==null){for(t.flags|=128,Ur(h,!1),i=y.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)h=r,e=i,h.flags&=14680066,y=h.alternate,y===null?(h.childLanes=0,h.lanes=e,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=y.childLanes,h.lanes=y.lanes,h.child=y.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=y.memoizedProps,h.memoizedState=y.memoizedState,h.updateQueue=y.updateQueue,h.type=y.type,e=y.dependencies,h.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ie(ae,ae.current&1|2),t.child}e=e.sibling}h.tail!==null&&de()>Lr&&(t.flags|=128,i=!0,Ur(h,!1),t.lanes=4194304)}else{if(!i)if(e=Cs(y),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ur(h,!0),h.tail===null&&h.tailMode==="hidden"&&!y.alternate&&!oe)return Ee(t),null}else 2*de()-h.renderingStartTime>Lr&&r!==1073741824&&(t.flags|=128,i=!0,Ur(h,!1),t.lanes=4194304);h.isBackwards?(y.sibling=t.child,t.child=y):(r=h.last,r!==null?r.sibling=y:t.child=y,h.last=y)}return h.tail!==null?(t=h.tail,h.rendering=t,h.tail=t.sibling,h.renderingStartTime=de(),t.sibling=null,r=ae.current,ie(ae,i?r&1|2:r&1),t):(Ee(t),null);case 22:case 23:return ul(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Ie&1073741824&&(Ee(t),t.subtreeFlags&6&&(t.flags|=8192)):Ee(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function rf(e,t){switch($o(t),t.tag){case 1:return Be(t.type)&&_s(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return br(),ne(Me),ne(be),Zo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Jo(t),null;case 13:if(ne(ae),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));Er()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(ae),null;case 4:return br(),null;case 10:return Xo(t.type._context),null;case 22:case 23:return ul(),null;case 24:return null;default:return null}}var Ui=!1,ke=!1,sf=typeof WeakSet=="function"?WeakSet:Set,q=null;function fr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){he(e,t,i)}else r.current=null}function _o(e,t,r){try{r()}catch(i){he(e,t,i)}}var va=!1;function nf(e,t){if(Qn=us,e=Ac(),Uo(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,h=i.focusNode;i=i.focusOffset;try{r.nodeType,h.nodeType}catch{r=null;break e}var y=0,n=-1,u=-1,f=0,S=0,d=e,p=null;t:for(;;){for(var C;d!==r||a!==0&&d.nodeType!==3||(n=y+a),d!==h||i!==0&&d.nodeType!==3||(u=y+i),d.nodeType===3&&(y+=d.nodeValue.length),(C=d.firstChild)!==null;)p=d,d=C;for(;;){if(d===e)break t;if(p===r&&++f===a&&(n=y),p===h&&++S===i&&(u=y),(C=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=C}r=n===-1||u===-1?null:{start:n,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(Yn={focusedElem:e,selectionRange:r},us=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var m=w.memoizedProps,c=w.memoizedState,o=t.stateNode,s=o.getSnapshotBeforeUpdate(t.elementType===t.type?m:Qe(t.type,m),c);o.__reactInternalSnapshotBeforeUpdate=s}break;case 3:var l=t.stateNode.containerInfo;l.nodeType===1?l.textContent="":l.nodeType===9&&l.documentElement&&l.removeChild(l.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(_){he(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return w=va,va=!1,w}function ei(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&e)===e){var h=a.destroy;a.destroy=void 0,h!==void 0&&_o(t,r,h)}a=a.next}while(a!==i)}}function Fs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function po(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Lu(e){var t=e.alternate;t!==null&&(e.alternate=null,Lu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[nt],delete t[fi],delete t[eo],delete t[zd],delete t[jd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ru(e){return e.tag===5||e.tag===3||e.tag===4}function ga(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ru(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function vo(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=fs));else if(i!==4&&(e=e.child,e!==null))for(vo(e,t,r),e=e.sibling;e!==null;)vo(e,t,r),e=e.sibling}function go(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(go(e,t,r),e=e.sibling;e!==null;)go(e,t,r),e=e.sibling}var Se=null,Ye=!1;function Ct(e,t,r){for(r=r.child;r!==null;)Du(e,t,r),r=r.sibling}function Du(e,t,r){if(ot&&typeof ot.onCommitFiberUnmount=="function")try{ot.onCommitFiberUnmount(Ts,r)}catch{}switch(r.tag){case 5:ke||fr(r,t);case 6:var i=Se,a=Ye;Se=null,Ct(e,t,r),Se=i,Ye=a,Se!==null&&(Ye?(e=Se,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Se.removeChild(r.stateNode));break;case 18:Se!==null&&(Ye?(e=Se,r=r.stateNode,e.nodeType===8?vn(e.parentNode,r):e.nodeType===1&&vn(e,r),ai(e)):vn(Se,r.stateNode));break;case 4:i=Se,a=Ye,Se=r.stateNode.containerInfo,Ye=!0,Ct(e,t,r),Se=i,Ye=a;break;case 0:case 11:case 14:case 15:if(!ke&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){a=i=i.next;do{var h=a,y=h.destroy;h=h.tag,y!==void 0&&(h&2||h&4)&&_o(r,t,y),a=a.next}while(a!==i)}Ct(e,t,r);break;case 1:if(!ke&&(fr(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(n){he(r,t,n)}Ct(e,t,r);break;case 21:Ct(e,t,r);break;case 22:r.mode&1?(ke=(i=ke)||r.memoizedState!==null,Ct(e,t,r),ke=i):Ct(e,t,r);break;default:Ct(e,t,r)}}function ma(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new sf),t.forEach(function(i){var a=_f.bind(null,e,i);r.has(i)||(r.add(i),i.then(a,a))})}}function Ge(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var a=r[i];try{var h=e,y=t,n=y;e:for(;n!==null;){switch(n.tag){case 5:Se=n.stateNode,Ye=!1;break e;case 3:Se=n.stateNode.containerInfo,Ye=!0;break e;case 4:Se=n.stateNode.containerInfo,Ye=!0;break e}n=n.return}if(Se===null)throw Error(W(160));Du(h,y,a),Se=null,Ye=!1;var u=a.alternate;u!==null&&(u.return=null),a.return=null}catch(f){he(a,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Tu(t,e),t=t.sibling}function Tu(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ge(t,e),it(e),i&4){try{ei(3,e,e.return),Fs(3,e)}catch(m){he(e,e.return,m)}try{ei(5,e,e.return)}catch(m){he(e,e.return,m)}}break;case 1:Ge(t,e),it(e),i&512&&r!==null&&fr(r,r.return);break;case 5:if(Ge(t,e),it(e),i&512&&r!==null&&fr(r,r.return),e.flags&32){var a=e.stateNode;try{si(a,"")}catch(m){he(e,e.return,m)}}if(i&4&&(a=e.stateNode,a!=null)){var h=e.memoizedProps,y=r!==null?r.memoizedProps:h,n=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{n==="input"&&h.type==="radio"&&h.name!=null&&Ja(a,h),zn(n,y);var f=zn(n,h);for(y=0;y<u.length;y+=2){var S=u[y],d=u[y+1];S==="style"?ic(a,d):S==="dangerouslySetInnerHTML"?tc(a,d):S==="children"?si(a,d):Do(a,S,d,f)}switch(n){case"input":On(a,h);break;case"textarea":Za(a,h);break;case"select":var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!h.multiple;var C=h.value;C!=null?pr(a,!!h.multiple,C,!1):p!==!!h.multiple&&(h.defaultValue!=null?pr(a,!!h.multiple,h.defaultValue,!0):pr(a,!!h.multiple,h.multiple?[]:"",!1))}a[fi]=h}catch(m){he(e,e.return,m)}}break;case 6:if(Ge(t,e),it(e),i&4){if(e.stateNode===null)throw Error(W(162));a=e.stateNode,h=e.memoizedProps;try{a.nodeValue=h}catch(m){he(e,e.return,m)}}break;case 3:if(Ge(t,e),it(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{ai(t.containerInfo)}catch(m){he(e,e.return,m)}break;case 4:Ge(t,e),it(e);break;case 13:Ge(t,e),it(e),a=e.child,a.flags&8192&&(h=a.memoizedState!==null,a.stateNode.isHidden=h,!h||a.alternate!==null&&a.alternate.memoizedState!==null||(al=de())),i&4&&ma(e);break;case 22:if(S=r!==null&&r.memoizedState!==null,e.mode&1?(ke=(f=ke)||S,Ge(t,e),ke=f):Ge(t,e),it(e),i&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!S&&e.mode&1)for(q=e,S=e.child;S!==null;){for(d=q=S;q!==null;){switch(p=q,C=p.child,p.tag){case 0:case 11:case 14:case 15:ei(4,p,p.return);break;case 1:fr(p,p.return);var w=p.stateNode;if(typeof w.componentWillUnmount=="function"){i=p,r=p.return;try{t=i,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(m){he(i,r,m)}}break;case 5:fr(p,p.return);break;case 22:if(p.memoizedState!==null){ya(d);continue}}C!==null?(C.return=p,q=C):ya(d)}S=S.sibling}e:for(S=null,d=e;;){if(d.tag===5){if(S===null){S=d;try{a=d.stateNode,f?(h=a.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none"):(n=d.stateNode,u=d.memoizedProps.style,y=u!=null&&u.hasOwnProperty("display")?u.display:null,n.style.display=rc("display",y))}catch(m){he(e,e.return,m)}}}else if(d.tag===6){if(S===null)try{d.stateNode.nodeValue=f?"":d.memoizedProps}catch(m){he(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;S===d&&(S=null),d=d.return}S===d&&(S=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Ge(t,e),it(e),i&4&&ma(e);break;case 21:break;default:Ge(t,e),it(e)}}function it(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Ru(r)){var i=r;break e}r=r.return}throw Error(W(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(si(a,""),i.flags&=-33);var h=ga(e);go(e,h,a);break;case 3:case 4:var y=i.stateNode.containerInfo,n=ga(e);vo(e,n,y);break;default:throw Error(W(161))}}catch(u){he(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function of(e,t,r){q=e,Au(e)}function Au(e,t,r){for(var i=(e.mode&1)!==0;q!==null;){var a=q,h=a.child;if(a.tag===22&&i){var y=a.memoizedState!==null||Ui;if(!y){var n=a.alternate,u=n!==null&&n.memoizedState!==null||ke;n=Ui;var f=ke;if(Ui=y,(ke=u)&&!f)for(q=a;q!==null;)y=q,u=y.child,y.tag===22&&y.memoizedState!==null?Ca(a):u!==null?(u.return=y,q=u):Ca(a);for(;h!==null;)q=h,Au(h),h=h.sibling;q=a,Ui=n,ke=f}Sa(e)}else a.subtreeFlags&8772&&h!==null?(h.return=a,q=h):Sa(e)}}function Sa(e){for(;q!==null;){var t=q;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ke||Fs(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!ke)if(r===null)i.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:Qe(t.type,r.memoizedProps);i.componentDidUpdate(a,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var h=t.updateQueue;h!==null&&ia(t,h,i);break;case 3:var y=t.updateQueue;if(y!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}ia(t,y,r)}break;case 5:var n=t.stateNode;if(r===null&&t.flags&4){r=n;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var S=f.memoizedState;if(S!==null){var d=S.dehydrated;d!==null&&ai(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}ke||t.flags&512&&po(t)}catch(p){he(t,t.return,p)}}if(t===e){q=null;break}if(r=t.sibling,r!==null){r.return=t.return,q=r;break}q=t.return}}function ya(e){for(;q!==null;){var t=q;if(t===e){q=null;break}var r=t.sibling;if(r!==null){r.return=t.return,q=r;break}q=t.return}}function Ca(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Fs(4,t)}catch(u){he(t,r,u)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var a=t.return;try{i.componentDidMount()}catch(u){he(t,a,u)}}var h=t.return;try{po(t)}catch(u){he(t,h,u)}break;case 5:var y=t.return;try{po(t)}catch(u){he(t,y,u)}}}catch(u){he(t,t.return,u)}if(t===e){q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,q=n;break}q=t.return}}var lf=Math.ceil,ks=mt.ReactCurrentDispatcher,ol=mt.ReactCurrentOwner,Ve=mt.ReactCurrentBatchConfig,Z=0,ge=null,fe=null,ye=0,Ie=0,_r=Nt(0),pe=0,Si=null,Yt=0,Ns=0,ll=0,ti=null,Ae=null,al=0,Lr=1/0,at=null,bs=!1,mo=null,Mt=null,Wi=!1,Lt=null,xs=0,ri=0,So=null,ts=-1,rs=0;function Le(){return Z&6?de():ts!==-1?ts:ts=de()}function Bt(e){return e.mode&1?Z&2&&ye!==0?ye&-ye:Wd.transition!==null?(rs===0&&(rs=pc()),rs):(e=re,e!==0||(e=window.event,e=e===void 0?16:wc(e.type)),e):1}function et(e,t,r,i){if(50<ri)throw ri=0,So=null,Error(W(185));Ei(e,r,i),(!(Z&2)||e!==ge)&&(e===ge&&(!(Z&2)&&(Ns|=r),pe===4&&bt(e,ye)),Oe(e,i),r===1&&Z===0&&!(t.mode&1)&&(Lr=de()+500,Os&&zt()))}function Oe(e,t){var r=e.callbackNode;Wh(e,t);var i=cs(e,e===ge?ye:0);if(i===0)r!==null&&Tl(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&Tl(r),t===1)e.tag===0?Ud(wa.bind(null,e)):jc(wa.bind(null,e)),Fd(function(){!(Z&6)&&zt()}),r=null;else{switch(vc(i)){case 1:r=Bo;break;case 4:r=fc;break;case 16:r=as;break;case 536870912:r=_c;break;default:r=as}r=Nu(r,Pu.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Pu(e,t){if(ts=-1,rs=0,Z&6)throw Error(W(327));var r=e.callbackNode;if(yr()&&e.callbackNode!==r)return null;var i=cs(e,e===ge?ye:0);if(i===0)return null;if(i&30||i&e.expiredLanes||t)t=Ls(e,i);else{t=i;var a=Z;Z|=2;var h=Bu();(ge!==e||ye!==t)&&(at=null,Lr=de()+500,Vt(e,t));do try{uf();break}catch(n){Mu(e,n)}while(!0);qo(),ks.current=h,Z=a,fe!==null?t=0:(ge=null,ye=0,t=pe)}if(t!==0){if(t===2&&(a=Kn(e),a!==0&&(i=a,t=yo(e,a))),t===1)throw r=Si,Vt(e,0),bt(e,i),Oe(e,de()),r;if(t===6)bt(e,i);else{if(a=e.current.alternate,!(i&30)&&!af(a)&&(t=Ls(e,i),t===2&&(h=Kn(e),h!==0&&(i=h,t=yo(e,h))),t===1))throw r=Si,Vt(e,0),bt(e,i),Oe(e,de()),r;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(W(345));case 2:Ut(e,Ae,at);break;case 3:if(bt(e,i),(i&130023424)===i&&(t=al+500-de(),10<t)){if(cs(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){Le(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Zn(Ut.bind(null,e,Ae,at),t);break}Ut(e,Ae,at);break;case 4:if(bt(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var y=31-Ze(i);h=1<<y,y=t[y],y>a&&(a=y),i&=~h}if(i=a,i=de()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*lf(i/1960))-i,10<i){e.timeoutHandle=Zn(Ut.bind(null,e,Ae,at),i);break}Ut(e,Ae,at);break;case 5:Ut(e,Ae,at);break;default:throw Error(W(329))}}}return Oe(e,de()),e.callbackNode===r?Pu.bind(null,e):null}function yo(e,t){var r=ti;return e.current.memoizedState.isDehydrated&&(Vt(e,t).flags|=256),e=Ls(e,t),e!==2&&(t=Ae,Ae=r,t!==null&&Co(t)),e}function Co(e){Ae===null?Ae=e:Ae.push.apply(Ae,e)}function af(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var a=r[i],h=a.getSnapshot;a=a.value;try{if(!tt(h(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bt(e,t){for(t&=~ll,t&=~Ns,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ze(t),i=1<<r;e[r]=-1,t&=~i}}function wa(e){if(Z&6)throw Error(W(327));yr();var t=cs(e,0);if(!(t&1))return Oe(e,de()),null;var r=Ls(e,t);if(e.tag!==0&&r===2){var i=Kn(e);i!==0&&(t=i,r=yo(e,i))}if(r===1)throw r=Si,Vt(e,0),bt(e,t),Oe(e,de()),r;if(r===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ut(e,Ae,at),Oe(e,de()),null}function cl(e,t){var r=Z;Z|=1;try{return e(t)}finally{Z=r,Z===0&&(Lr=de()+500,Os&&zt())}}function Jt(e){Lt!==null&&Lt.tag===0&&!(Z&6)&&yr();var t=Z;Z|=1;var r=Ve.transition,i=re;try{if(Ve.transition=null,re=1,e)return e()}finally{re=i,Ve.transition=r,Z=t,!(Z&6)&&zt()}}function ul(){Ie=_r.current,ne(_r)}function Vt(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Hd(r)),fe!==null)for(r=fe.return;r!==null;){var i=r;switch($o(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&_s();break;case 3:br(),ne(Me),ne(be),Zo();break;case 5:Jo(i);break;case 4:br();break;case 13:ne(ae);break;case 19:ne(ae);break;case 10:Xo(i.type._context);break;case 22:case 23:ul()}r=r.return}if(ge=e,fe=e=Ot(e.current,null),ye=Ie=t,pe=0,Si=null,ll=Ns=Yt=0,Ae=ti=null,$t!==null){for(t=0;t<$t.length;t++)if(r=$t[t],i=r.interleaved,i!==null){r.interleaved=null;var a=i.next,h=r.pending;if(h!==null){var y=h.next;h.next=a,i.next=y}r.pending=i}$t=null}return e}function Mu(e,t){do{var r=fe;try{if(qo(),Ji.current=Es,ws){for(var i=ce.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}ws=!1}if(Qt=0,ve=_e=ce=null,Zr=!1,vi=0,ol.current=null,r===null||r.return===null){pe=1,Si=t,fe=null;break}e:{var h=e,y=r.return,n=r,u=t;if(t=ye,n.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=u,S=n,d=S.tag;if(!(S.mode&1)&&(d===0||d===11||d===15)){var p=S.alternate;p?(S.updateQueue=p.updateQueue,S.memoizedState=p.memoizedState,S.lanes=p.lanes):(S.updateQueue=null,S.memoizedState=null)}var C=ca(y);if(C!==null){C.flags&=-257,ua(C,y,n,h,t),C.mode&1&&aa(h,f,t),t=C,u=f;var w=t.updateQueue;if(w===null){var m=new Set;m.add(u),t.updateQueue=m}else w.add(u);break e}else{if(!(t&1)){aa(h,f,t),hl();break e}u=Error(W(426))}}else if(oe&&n.mode&1){var c=ca(y);if(c!==null){!(c.flags&65536)&&(c.flags|=256),ua(c,y,n,h,t),Ko(xr(u,n));break e}}h=u=xr(u,n),pe!==4&&(pe=2),ti===null?ti=[h]:ti.push(h),h=y;do{switch(h.tag){case 3:h.flags|=65536,t&=-t,h.lanes|=t;var o=vu(h,u,t);ra(h,o);break e;case 1:n=u;var s=h.type,l=h.stateNode;if(!(h.flags&128)&&(typeof s.getDerivedStateFromError=="function"||l!==null&&typeof l.componentDidCatch=="function"&&(Mt===null||!Mt.has(l)))){h.flags|=65536,t&=-t,h.lanes|=t;var _=gu(h,n,t);ra(h,_);break e}}h=h.return}while(h!==null)}Iu(r)}catch(g){t=g,fe===r&&r!==null&&(fe=r=r.return);continue}break}while(!0)}function Bu(){var e=ks.current;return ks.current=Es,e===null?Es:e}function hl(){(pe===0||pe===3||pe===2)&&(pe=4),ge===null||!(Yt&268435455)&&!(Ns&268435455)||bt(ge,ye)}function Ls(e,t){var r=Z;Z|=2;var i=Bu();(ge!==e||ye!==t)&&(at=null,Vt(e,t));do try{cf();break}catch(a){Mu(e,a)}while(!0);if(qo(),Z=r,ks.current=i,fe!==null)throw Error(W(261));return ge=null,ye=0,pe}function cf(){for(;fe!==null;)Ou(fe)}function uf(){for(;fe!==null&&!Bh();)Ou(fe)}function Ou(e){var t=Fu(e.alternate,e,Ie);e.memoizedProps=e.pendingProps,t===null?Iu(e):fe=t,ol.current=null}function Iu(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=rf(r,t),r!==null){r.flags&=32767,fe=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{pe=6,fe=null;return}}else if(r=tf(r,t,Ie),r!==null){fe=r;return}if(t=t.sibling,t!==null){fe=t;return}fe=t=e}while(t!==null);pe===0&&(pe=5)}function Ut(e,t,r){var i=re,a=Ve.transition;try{Ve.transition=null,re=1,hf(e,t,r,i)}finally{Ve.transition=a,re=i}return null}function hf(e,t,r,i){do yr();while(Lt!==null);if(Z&6)throw Error(W(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var h=r.lanes|r.childLanes;if($h(e,h),e===ge&&(fe=ge=null,ye=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Wi||(Wi=!0,Nu(as,function(){return yr(),null})),h=(r.flags&15990)!==0,r.subtreeFlags&15990||h){h=Ve.transition,Ve.transition=null;var y=re;re=1;var n=Z;Z|=4,ol.current=null,nf(e,r),Tu(r,e),Td(Yn),us=!!Qn,Yn=Qn=null,e.current=r,of(r),Oh(),Z=n,re=y,Ve.transition=h}else e.current=r;if(Wi&&(Wi=!1,Lt=e,xs=a),h=e.pendingLanes,h===0&&(Mt=null),Fh(r.stateNode),Oe(e,de()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],i(a.value,{componentStack:a.stack,digest:a.digest});if(bs)throw bs=!1,e=mo,mo=null,e;return xs&1&&e.tag!==0&&yr(),h=e.pendingLanes,h&1?e===So?ri++:(ri=0,So=e):ri=0,zt(),null}function yr(){if(Lt!==null){var e=vc(xs),t=Ve.transition,r=re;try{if(Ve.transition=null,re=16>e?16:e,Lt===null)var i=!1;else{if(e=Lt,Lt=null,xs=0,Z&6)throw Error(W(331));var a=Z;for(Z|=4,q=e.current;q!==null;){var h=q,y=h.child;if(q.flags&16){var n=h.deletions;if(n!==null){for(var u=0;u<n.length;u++){var f=n[u];for(q=f;q!==null;){var S=q;switch(S.tag){case 0:case 11:case 15:ei(8,S,h)}var d=S.child;if(d!==null)d.return=S,q=d;else for(;q!==null;){S=q;var p=S.sibling,C=S.return;if(Lu(S),S===f){q=null;break}if(p!==null){p.return=C,q=p;break}q=C}}}var w=h.alternate;if(w!==null){var m=w.child;if(m!==null){w.child=null;do{var c=m.sibling;m.sibling=null,m=c}while(m!==null)}}q=h}}if(h.subtreeFlags&2064&&y!==null)y.return=h,q=y;else e:for(;q!==null;){if(h=q,h.flags&2048)switch(h.tag){case 0:case 11:case 15:ei(9,h,h.return)}var o=h.sibling;if(o!==null){o.return=h.return,q=o;break e}q=h.return}}var s=e.current;for(q=s;q!==null;){y=q;var l=y.child;if(y.subtreeFlags&2064&&l!==null)l.return=y,q=l;else e:for(y=s;q!==null;){if(n=q,n.flags&2048)try{switch(n.tag){case 0:case 11:case 15:Fs(9,n)}}catch(g){he(n,n.return,g)}if(n===y){q=null;break e}var _=n.sibling;if(_!==null){_.return=n.return,q=_;break e}q=n.return}}if(Z=a,zt(),ot&&typeof ot.onPostCommitFiberRoot=="function")try{ot.onPostCommitFiberRoot(Ts,e)}catch{}i=!0}return i}finally{re=r,Ve.transition=t}}return!1}function Ea(e,t,r){t=xr(r,t),t=vu(e,t,1),e=Pt(e,t,1),t=Le(),e!==null&&(Ei(e,1,t),Oe(e,t))}function he(e,t,r){if(e.tag===3)Ea(e,e,r);else for(;t!==null;){if(t.tag===3){Ea(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Mt===null||!Mt.has(i))){e=xr(r,e),e=gu(t,e,1),t=Pt(t,e,1),e=Le(),t!==null&&(Ei(t,1,e),Oe(t,e));break}}t=t.return}}function df(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=Le(),e.pingedLanes|=e.suspendedLanes&r,ge===e&&(ye&r)===r&&(pe===4||pe===3&&(ye&130023424)===ye&&500>de()-al?Vt(e,0):ll|=r),Oe(e,t)}function Hu(e,t){t===0&&(e.mode&1?(t=Mi,Mi<<=1,!(Mi&130023424)&&(Mi=4194304)):t=1);var r=Le();e=vt(e,t),e!==null&&(Ei(e,t,r),Oe(e,r))}function ff(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Hu(e,r)}function _f(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(W(314))}i!==null&&i.delete(t),Hu(e,r)}var Fu;Fu=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Me.current)Pe=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Pe=!1,ef(e,t,r);Pe=!!(e.flags&131072)}else Pe=!1,oe&&t.flags&1048576&&Uc(t,gs,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;es(e,t),e=t.pendingProps;var a=wr(t,be.current);Sr(t,r),a=tl(null,t,i,e,a,r);var h=rl();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Be(i)?(h=!0,ps(t)):h=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Qo(t),a.updater=Hs,t.stateNode=a,a._reactInternals=t,oo(t,i,e,r),t=co(null,t,i,!0,h,r)):(t.tag=0,oe&&h&&Wo(t),xe(null,t,a,r),t=t.child),t;case 16:i=t.elementType;e:{switch(es(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=vf(i),e=Qe(i,e),a){case 0:t=ao(null,t,i,e,r);break e;case 1:t=fa(null,t,i,e,r);break e;case 11:t=ha(null,t,i,e,r);break e;case 14:t=da(null,t,i,Qe(i.type,e),r);break e}throw Error(W(306,i,""))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Qe(i,a),ao(e,t,i,a,r);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Qe(i,a),fa(e,t,i,a,r);case 3:e:{if(Cu(t),e===null)throw Error(W(387));i=t.pendingProps,h=t.memoizedState,a=h.element,Xc(e,t),ys(t,i,null,r);var y=t.memoizedState;if(i=y.element,h.isDehydrated)if(h={element:i,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){a=xr(Error(W(423)),t),t=_a(e,t,i,r,a);break e}else if(i!==a){a=xr(Error(W(424)),t),t=_a(e,t,i,r,a);break e}else for(He=At(t.stateNode.containerInfo.firstChild),Fe=t,oe=!0,Je=null,r=Vc(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Er(),i===a){t=gt(e,t,r);break e}xe(e,t,i,r)}t=t.child}return t;case 5:return Gc(t),e===null&&io(t),i=t.type,a=t.pendingProps,h=e!==null?e.memoizedProps:null,y=a.children,Jn(i,a)?y=null:h!==null&&Jn(i,h)&&(t.flags|=32),yu(e,t),xe(e,t,y,r),t.child;case 6:return e===null&&io(t),null;case 13:return wu(e,t,r);case 4:return Yo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=kr(t,null,i,r):xe(e,t,i,r),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Qe(i,a),ha(e,t,i,a,r);case 7:return xe(e,t,t.pendingProps,r),t.child;case 8:return xe(e,t,t.pendingProps.children,r),t.child;case 12:return xe(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,a=t.pendingProps,h=t.memoizedProps,y=a.value,ie(ms,i._currentValue),i._currentValue=y,h!==null)if(tt(h.value,y)){if(h.children===a.children&&!Me.current){t=gt(e,t,r);break e}}else for(h=t.child,h!==null&&(h.return=t);h!==null;){var n=h.dependencies;if(n!==null){y=h.child;for(var u=n.firstContext;u!==null;){if(u.context===i){if(h.tag===1){u=ft(-1,r&-r),u.tag=2;var f=h.updateQueue;if(f!==null){f=f.shared;var S=f.pending;S===null?u.next=u:(u.next=S.next,S.next=u),f.pending=u}}h.lanes|=r,u=h.alternate,u!==null&&(u.lanes|=r),so(h.return,r,t),n.lanes|=r;break}u=u.next}}else if(h.tag===10)y=h.type===t.type?null:h.child;else if(h.tag===18){if(y=h.return,y===null)throw Error(W(341));y.lanes|=r,n=y.alternate,n!==null&&(n.lanes|=r),so(y,r,t),y=h.sibling}else y=h.child;if(y!==null)y.return=h;else for(y=h;y!==null;){if(y===t){y=null;break}if(h=y.sibling,h!==null){h.return=y.return,y=h;break}y=y.return}h=y}xe(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Sr(t,r),a=qe(a),i=i(a),t.flags|=1,xe(e,t,i,r),t.child;case 14:return i=t.type,a=Qe(i,t.pendingProps),a=Qe(i.type,a),da(e,t,i,a,r);case 15:return mu(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Qe(i,a),es(e,t),t.tag=1,Be(i)?(e=!0,ps(t)):e=!1,Sr(t,r),pu(t,i,a),oo(t,i,a,r),co(null,t,i,!0,e,r);case 19:return Eu(e,t,r);case 22:return Su(e,t,r)}throw Error(W(156,t.tag))};function Nu(e,t){return dc(e,t)}function pf(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ke(e,t,r,i){return new pf(e,t,r,i)}function dl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function vf(e){if(typeof e=="function")return dl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ao)return 11;if(e===Po)return 14}return 2}function Ot(e,t){var r=e.alternate;return r===null?(r=Ke(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function is(e,t,r,i,a,h){var y=2;if(i=e,typeof e=="function")dl(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case sr:return qt(r.children,a,h,t);case To:y=8,a|=8;break;case Tn:return e=Ke(12,r,t,a|2),e.elementType=Tn,e.lanes=h,e;case An:return e=Ke(13,r,t,a),e.elementType=An,e.lanes=h,e;case Pn:return e=Ke(19,r,t,a),e.elementType=Pn,e.lanes=h,e;case Ga:return zs(r,a,h,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qa:y=10;break e;case Xa:y=9;break e;case Ao:y=11;break e;case Po:y=14;break e;case wt:y=16,i=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=Ke(y,r,t,a),t.elementType=e,t.type=i,t.lanes=h,t}function qt(e,t,r,i){return e=Ke(7,e,i,t),e.lanes=r,e}function zs(e,t,r,i){return e=Ke(22,e,i,t),e.elementType=Ga,e.lanes=r,e.stateNode={isHidden:!1},e}function kn(e,t,r){return e=Ke(6,e,null,t),e.lanes=r,e}function bn(e,t,r){return t=Ke(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gf(e,t,r,i,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nn(0),this.expirationTimes=nn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nn(0),this.identifierPrefix=i,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function fl(e,t,r,i,a,h,y,n,u){return e=new gf(e,t,r,n,u),t===1?(t=1,h===!0&&(t|=8)):t=0,h=Ke(3,null,null,t),e.current=h,h.stateNode=e,h.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qo(h),e}function mf(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ir,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function zu(e){if(!e)return Ht;e=e._reactInternals;e:{if(er(e)!==e||e.tag!==1)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Be(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(W(171))}if(e.tag===1){var r=e.type;if(Be(r))return zc(e,r,t)}return t}function ju(e,t,r,i,a,h,y,n,u){return e=fl(r,i,!0,e,a,h,y,n,u),e.context=zu(null),r=e.current,i=Le(),a=Bt(r),h=ft(i,a),h.callback=t??null,Pt(r,h,a),e.current.lanes=a,Ei(e,a,i),Oe(e,i),e}function js(e,t,r,i){var a=t.current,h=Le(),y=Bt(a);return r=zu(r),t.context===null?t.context=r:t.pendingContext=r,t=ft(h,y),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=Pt(a,t,y),e!==null&&(et(e,a,y,h),Yi(e,a,y)),y}function Rs(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ka(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function _l(e,t){ka(e,t),(e=e.alternate)&&ka(e,t)}function Sf(){return null}var Uu=typeof reportError=="function"?reportError:function(e){console.error(e)};function pl(e){this._internalRoot=e}Us.prototype.render=pl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));js(e,t,null,null)};Us.prototype.unmount=pl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Jt(function(){js(null,e,null,null)}),t[pt]=null}};function Us(e){this._internalRoot=e}Us.prototype.unstable_scheduleHydration=function(e){if(e){var t=Sc();e={blockedOn:null,target:e,priority:t};for(var r=0;r<kt.length&&t!==0&&t<kt[r].priority;r++);kt.splice(r,0,e),r===0&&Cc(e)}};function vl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ws(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ba(){}function yf(e,t,r,i,a){if(a){if(typeof i=="function"){var h=i;i=function(){var f=Rs(y);h.call(f)}}var y=ju(t,i,e,0,null,!1,!1,"",ba);return e._reactRootContainer=y,e[pt]=y.current,hi(e.nodeType===8?e.parentNode:e),Jt(),y}for(;a=e.lastChild;)e.removeChild(a);if(typeof i=="function"){var n=i;i=function(){var f=Rs(u);n.call(f)}}var u=fl(e,0,!1,null,null,!1,!1,"",ba);return e._reactRootContainer=u,e[pt]=u.current,hi(e.nodeType===8?e.parentNode:e),Jt(function(){js(t,u,r,i)}),u}function $s(e,t,r,i,a){var h=r._reactRootContainer;if(h){var y=h;if(typeof a=="function"){var n=a;a=function(){var u=Rs(y);n.call(u)}}js(t,y,e,a)}else y=yf(r,t,e,a,i);return Rs(y)}gc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Vr(t.pendingLanes);r!==0&&(Oo(t,r|1),Oe(t,de()),!(Z&6)&&(Lr=de()+500,zt()))}break;case 13:Jt(function(){var i=vt(e,1);if(i!==null){var a=Le();et(i,e,1,a)}}),_l(e,1)}};Io=function(e){if(e.tag===13){var t=vt(e,134217728);if(t!==null){var r=Le();et(t,e,134217728,r)}_l(e,134217728)}};mc=function(e){if(e.tag===13){var t=Bt(e),r=vt(e,t);if(r!==null){var i=Le();et(r,e,t,i)}_l(e,t)}};Sc=function(){return re};yc=function(e,t){var r=re;try{return re=e,t()}finally{re=r}};Un=function(e,t,r){switch(t){case"input":if(On(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var a=Bs(i);if(!a)throw Error(W(90));Ya(i),On(i,a)}}}break;case"textarea":Za(e,r);break;case"select":t=r.value,t!=null&&pr(e,!!r.multiple,t,!1)}};oc=cl;lc=Jt;var Cf={usingClientEntryPoint:!1,Events:[bi,ar,Bs,sc,nc,cl]},Wr={findFiberByHostInstance:Wt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},wf={bundleType:Wr.bundleType,version:Wr.version,rendererPackageName:Wr.rendererPackageName,rendererConfig:Wr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:mt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=uc(e),e===null?null:e.stateNode},findFiberByHostInstance:Wr.findFiberByHostInstance||Sf,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 $i=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$i.isDisabled&&$i.supportsFiber)try{Ts=$i.inject(wf),ot=$i}catch{}}ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Cf;ze.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vl(t))throw Error(W(200));return mf(e,t,null,r)};ze.createRoot=function(e,t){if(!vl(e))throw Error(W(299));var r=!1,i="",a=Uu;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=fl(e,1,!1,null,null,r,!1,i,a),e[pt]=t.current,hi(e.nodeType===8?e.parentNode:e),new pl(t)};ze.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=uc(t),e=e===null?null:e.stateNode,e};ze.flushSync=function(e){return Jt(e)};ze.hydrate=function(e,t,r){if(!Ws(t))throw Error(W(200));return $s(null,e,t,!0,r)};ze.hydrateRoot=function(e,t,r){if(!vl(e))throw Error(W(405));var i=r!=null&&r.hydratedSources||null,a=!1,h="",y=Uu;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(h=r.identifierPrefix),r.onRecoverableError!==void 0&&(y=r.onRecoverableError)),t=ju(t,null,e,1,r??null,a,!1,h,y),e[pt]=t.current,hi(e),i)for(e=0;e<i.length;e++)r=i[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new Us(t)};ze.render=function(e,t,r){if(!Ws(t))throw Error(W(200));return $s(null,e,t,!1,r)};ze.unmountComponentAtNode=function(e){if(!Ws(e))throw Error(W(40));return e._reactRootContainer?(Jt(function(){$s(null,null,e,!1,function(){e._reactRootContainer=null,e[pt]=null})}),!0):!1};ze.unstable_batchedUpdates=cl;ze.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!Ws(r))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return $s(e,t,r,!1,i)};ze.version="18.3.1-next-f1338f8080-20240426";function Wu(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Wu)}catch(e){console.error(e)}}Wu(),Wa.exports=ze;var Ef=Wa.exports,xa=Ef;Rn.createRoot=xa.createRoot,Rn.hydrateRoot=xa.hydrateRoot;const kf={},La=e=>{let t;const r=new Set,i=(S,d)=>{const p=typeof S=="function"?S(t):S;if(!Object.is(p,t)){const C=t;t=d??(typeof p!="object"||p===null)?p:Object.assign({},t,p),r.forEach(w=>w(t,C))}},a=()=>t,u={setState:i,getState:a,getInitialState:()=>f,subscribe:S=>(r.add(S),()=>r.delete(S)),destroy:()=>{(kf?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},f=t=e(i,a,u);return u},bf=e=>e?La(e):La;var $u={exports:{}},Ku={},Vu={exports:{}},qu={};/**
|
||
* @license React
|
||
* use-sync-external-store-shim.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Rr=dt;function xf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lf=typeof Object.is=="function"?Object.is:xf,Rf=Rr.useState,Df=Rr.useEffect,Tf=Rr.useLayoutEffect,Af=Rr.useDebugValue;function Pf(e,t){var r=t(),i=Rf({inst:{value:r,getSnapshot:t}}),a=i[0].inst,h=i[1];return Tf(function(){a.value=r,a.getSnapshot=t,xn(a)&&h({inst:a})},[e,r,t]),Df(function(){return xn(a)&&h({inst:a}),e(function(){xn(a)&&h({inst:a})})},[e]),Af(r),r}function xn(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Lf(e,r)}catch{return!0}}function Mf(e,t){return t()}var Bf=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Mf:Pf;qu.useSyncExternalStore=Rr.useSyncExternalStore!==void 0?Rr.useSyncExternalStore:Bf;Vu.exports=qu;var Of=Vu.exports;/**
|
||
* @license React
|
||
* use-sync-external-store-shim/with-selector.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Ks=dt,If=Of;function Hf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ff=typeof Object.is=="function"?Object.is:Hf,Nf=If.useSyncExternalStore,zf=Ks.useRef,jf=Ks.useEffect,Uf=Ks.useMemo,Wf=Ks.useDebugValue;Ku.useSyncExternalStoreWithSelector=function(e,t,r,i,a){var h=zf(null);if(h.current===null){var y={hasValue:!1,value:null};h.current=y}else y=h.current;h=Uf(function(){function u(C){if(!f){if(f=!0,S=C,C=i(C),a!==void 0&&y.hasValue){var w=y.value;if(a(w,C))return d=w}return d=C}if(w=d,Ff(S,C))return w;var m=i(C);return a!==void 0&&a(w,m)?(S=C,w):(S=C,d=m)}var f=!1,S,d,p=r===void 0?null:r;return[function(){return u(t())},p===null?void 0:function(){return u(p())}]},[t,r,i,a]);var n=Nf(e,h[0],h[1]);return jf(function(){y.hasValue=!0,y.value=n},[n]),Wf(n),n};$u.exports=Ku;var $f=$u.exports;const Kf=Ta($f),Xu={},{useDebugValue:Vf}=ja,{useSyncExternalStoreWithSelector:qf}=Kf;let Ra=!1;const Xf=e=>e;function Gf(e,t=Xf,r){(Xu?"production":void 0)!=="production"&&r&&!Ra&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Ra=!0);const i=qf(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return Vf(i),i}const Qf=e=>{(Xu?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?bf(e):e,r=(i,a)=>Gf(t,i,a);return Object.assign(r,t),r},Vs=e=>Qf,ss={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},wo=new Map,Ki=e=>{const t=wo.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([r,i])=>[r,i.getState()])):{}},Yf=(e,t,r)=>{if(e===void 0)return{type:"untracked",connection:t.connect(r)};const i=wo.get(r.name);if(i)return{type:"tracked",store:e,...i};const a={connection:t.connect(r),stores:{}};return wo.set(r.name,a),{type:"tracked",store:e,...a}},Jf=(e,t={})=>(r,i,a)=>{const{enabled:h,anonymousActionType:y,store:n,...u}=t;let f;try{f=(h??(ss?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!f)return(ss?"production":void 0)!=="production"&&h&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(r,i,a);const{connection:S,...d}=Yf(n,f,u);let p=!0;a.setState=(m,c,o)=>{const s=r(m,c);if(!p)return s;const l=o===void 0?{type:y||"anonymous"}:typeof o=="string"?{type:o}:o;return n===void 0?(S==null||S.send(l,i()),s):(S==null||S.send({...l,type:`${n}/${l.type}`},{...Ki(u.name),[n]:a.getState()}),s)};const C=(...m)=>{const c=p;p=!1,r(...m),p=c},w=e(a.setState,i,a);if(d.type==="untracked"?S==null||S.init(w):(d.stores[d.store]=a,S==null||S.init(Object.fromEntries(Object.entries(d.stores).map(([m,c])=>[m,m===d.store?w:c.getState()])))),a.dispatchFromDevtools&&typeof a.dispatch=="function"){let m=!1;const c=a.dispatch;a.dispatch=(...o)=>{(ss?"production":void 0)!=="production"&&o[0].type==="__setState"&&!m&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),m=!0),c(...o)}}return S.subscribe(m=>{var c;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Ln(m.payload,o=>{if(o.type==="__setState"){if(n===void 0){C(o.state);return}Object.keys(o.state).length!==1&&console.error(`
|
||
[zustand devtools middleware] Unsupported __setState action format.
|
||
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
||
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
||
`);const s=o.state[n];if(s==null)return;JSON.stringify(a.getState())!==JSON.stringify(s)&&C(s);return}a.dispatchFromDevtools&&typeof a.dispatch=="function"&&a.dispatch(o)});case"DISPATCH":switch(m.payload.type){case"RESET":return C(w),n===void 0?S==null?void 0:S.init(a.getState()):S==null?void 0:S.init(Ki(u.name));case"COMMIT":if(n===void 0){S==null||S.init(a.getState());return}return S==null?void 0:S.init(Ki(u.name));case"ROLLBACK":return Ln(m.state,o=>{if(n===void 0){C(o),S==null||S.init(a.getState());return}C(o[n]),S==null||S.init(Ki(u.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Ln(m.state,o=>{if(n===void 0){C(o);return}JSON.stringify(a.getState())!==JSON.stringify(o[n])&&C(o[n])});case"IMPORT_STATE":{const{nextLiftedState:o}=m.payload,s=(c=o.computedStates.slice(-1)[0])==null?void 0:c.state;if(!s)return;C(n===void 0?s:s[n]),S==null||S.send(null,o);return}case"PAUSE_RECORDING":return p=!p}return}}),w},qs=Jf,Ln=(e,t)=>{let r;try{r=JSON.parse(e)}catch(i){console.error("[zustand devtools middleware] Could not parse the received json",i)}r!==void 0&&t(r)};function Zf(e,t){let r;try{r=e()}catch{return}return{getItem:a=>{var h;const y=u=>u===null?null:JSON.parse(u,void 0),n=(h=r.getItem(a))!=null?h:null;return n instanceof Promise?n.then(y):y(n)},setItem:(a,h)=>r.setItem(a,JSON.stringify(h,void 0)),removeItem:a=>r.removeItem(a)}}const yi=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(i){return yi(i)(r)},catch(i){return this}}}catch(r){return{then(i){return this},catch(i){return yi(i)(r)}}}},e_=(e,t)=>(r,i,a)=>{let h={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:c=>c,version:0,merge:(c,o)=>({...o,...c}),...t},y=!1;const n=new Set,u=new Set;let f;try{f=h.getStorage()}catch{}if(!f)return e((...c)=>{console.warn(`[zustand persist middleware] Unable to update item '${h.name}', the given storage is currently unavailable.`),r(...c)},i,a);const S=yi(h.serialize),d=()=>{const c=h.partialize({...i()});let o;const s=S({state:c,version:h.version}).then(l=>f.setItem(h.name,l)).catch(l=>{o=l});if(o)throw o;return s},p=a.setState;a.setState=(c,o)=>{p(c,o),d()};const C=e((...c)=>{r(...c),d()},i,a);let w;const m=()=>{var c;if(!f)return;y=!1,n.forEach(s=>s(i()));const o=((c=h.onRehydrateStorage)==null?void 0:c.call(h,i()))||void 0;return yi(f.getItem.bind(f))(h.name).then(s=>{if(s)return h.deserialize(s)}).then(s=>{if(s)if(typeof s.version=="number"&&s.version!==h.version){if(h.migrate)return h.migrate(s.state,s.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return s.state}).then(s=>{var l;return w=h.merge(s,(l=i())!=null?l:C),r(w,!0),d()}).then(()=>{o==null||o(w,void 0),y=!0,u.forEach(s=>s(w))}).catch(s=>{o==null||o(void 0,s)})};return a.persist={setOptions:c=>{h={...h,...c},c.getStorage&&(f=c.getStorage())},clearStorage:()=>{f==null||f.removeItem(h.name)},getOptions:()=>h,rehydrate:()=>m(),hasHydrated:()=>y,onHydrate:c=>(n.add(c),()=>{n.delete(c)}),onFinishHydration:c=>(u.add(c),()=>{u.delete(c)})},m(),w||C},t_=(e,t)=>(r,i,a)=>{let h={storage:Zf(()=>localStorage),partialize:m=>m,version:0,merge:(m,c)=>({...c,...m}),...t},y=!1;const n=new Set,u=new Set;let f=h.storage;if(!f)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${h.name}', the given storage is currently unavailable.`),r(...m)},i,a);const S=()=>{const m=h.partialize({...i()});return f.setItem(h.name,{state:m,version:h.version})},d=a.setState;a.setState=(m,c)=>{d(m,c),S()};const p=e((...m)=>{r(...m),S()},i,a);a.getInitialState=()=>p;let C;const w=()=>{var m,c;if(!f)return;y=!1,n.forEach(s=>{var l;return s((l=i())!=null?l:p)});const o=((c=h.onRehydrateStorage)==null?void 0:c.call(h,(m=i())!=null?m:p))||void 0;return yi(f.getItem.bind(f))(h.name).then(s=>{if(s)if(typeof s.version=="number"&&s.version!==h.version){if(h.migrate)return[!0,h.migrate(s.state,s.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,s.state];return[!1,void 0]}).then(s=>{var l;const[_,g]=s;if(C=h.merge(g,(l=i())!=null?l:p),r(C,!0),_)return S()}).then(()=>{o==null||o(C,void 0),C=i(),y=!0,u.forEach(s=>s(C))}).catch(s=>{o==null||o(void 0,s)})};return a.persist={setOptions:m=>{h={...h,...m},m.storage&&(f=m.storage)},clearStorage:()=>{f==null||f.removeItem(h.name)},getOptions:()=>h,rehydrate:()=>w(),hasHydrated:()=>y,onHydrate:m=>(n.add(m),()=>{n.delete(m)}),onFinishHydration:m=>(u.add(m),()=>{u.delete(m)})},h.skipHydration||w(),C||p},r_=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((ss?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),e_(e,t)):t_(e,t),i_=r_,s_={camX:0,camY:0,zoom:1,flying:!1,dragging:!1,collapsed:!1,spacePanning:!1,setCam:()=>{},setZoom:()=>{},setFlying:()=>{},setDragging:()=>{},setCollapsed:()=>{},setSpacePanning:()=>{}},Ci=Vs()(qs(i_(e=>({...s_,setCam:(t,r)=>e({camX:t,camY:r}),setZoom:t=>e({zoom:t}),setFlying:t=>e({flying:t}),setDragging:t=>e({dragging:t}),setCollapsed:t=>e({collapsed:t}),setSpacePanning:t=>e({spacePanning:t})}),{name:"canvas-state"}))),n_={krates:new Map,selectedKrateId:null,addKrate:()=>{},removeKrate:()=>{},selectKrate:()=>{},updateKrate:()=>{}},gl=Vs()(qs(e=>({...n_,addKrate:t=>e(r=>({krates:new Map(r.krates).set(t.id,t)})),removeKrate:t=>e(r=>{const i=new Map(r.krates);return i.delete(t),{krates:i}}),selectKrate:t=>e({selectedKrateId:t}),updateKrate:(t,r)=>e(i=>{const a=i.krates.get(t);return a?{krates:new Map(i.krates).set(t,{...a,...r})}:i})}))),o_=({krate:e,collapsed:t})=>{const{selectKrate:r}=gl();return t?K.jsxs("div",{style:{position:"absolute",left:e.x,top:e.y,width:"230px",height:"auto",padding:"12px",background:e.color?`rgba(${Da(e.color)}, 0.04)`:"rgba(255,255,255,0.04)",border:`1px dashed ${e.color||"#6fb1ff"}4D`,borderRadius:"18px",cursor:"pointer"},onClick:()=>r(e.id),children:[K.jsx("div",{style:{fontWeight:"600",color:e.color||"#6fb1ff"},children:e.title}),K.jsx("div",{style:{fontSize:"12px",color:"#888"},children:e.windows.size>0?'..."':"Empty"})]}):K.jsxs("div",{style:{position:"absolute",left:e.x,top:e.y,width:e.width,height:e.height,background:e.color?`rgba(${Da(e.color)}, 0.04)`:"rgba(255,255,255,0.04)",border:`1px dashed ${e.color||"#6fb1ff"}4D`,borderRadius:"18px"},onMouseDown:()=>r(e.id),children:[K.jsx(l_,{krate:e,onDragStart:()=>{}}),K.jsx("div",{style:{padding:"30px",display:"grid",gridTemplateColumns:`repeat(${e.windowLayout.cols}, 1fr)`,gap:"16px"},children:Array.from(e.windows.values()).map(i=>K.jsx("div",{style:{backgroundColor:"#1a1e26",border:"1px solid rgba(140,165,200,0.18)",borderRadius:"8px",padding:"12px",minHeight:"100px"},children:i.title},i.id))})]})},l_=({krate:e,onDragStart:t})=>K.jsxs("div",{style:{padding:"8px 12px",borderBottom:`1px solid ${e.color||"#6fb1ff"}33`,cursor:"grab",display:"flex",alignItems:"center",gap:"8px"},onMouseDown:r=>{r.stopPropagation(),t()},children:[K.jsx("span",{style:{fontWeight:"600",flex:1},children:e.title}),K.jsxs("span",{style:{fontSize:"12px",color:"#888"},children:[e.windows.size," windows"]}),K.jsx("button",{style:{background:"none",border:"none",color:"#888",cursor:"pointer",padding:"4px"},onClick:r=>{r.stopPropagation(),alert("Minimize todo")},children:"—"}),K.jsx("button",{style:{background:"none",border:"none",color:"#888",cursor:"pointer",padding:"4px"},onClick:r=>{r.stopPropagation(),alert("Delete todo")},children:"×"})]}),Da=e=>{const t=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return`${t}, ${r}, ${i}`},a_=({...e})=>{const{camX:t,camY:r,zoom:i,collapsed:a}=Ci(),{krates:h}=gl(),y={position:"absolute",width:"12000px",height:"8000px",transform:`translate(${t}px, ${r}px) scale(${i})`,transformOrigin:"0 0"};return K.jsx("div",{style:y,...e,children:Array.from(h.values()).filter(n=>!n.minimized).map(n=>K.jsx(o_,{krate:n,collapsed:a},n.id))})},c_=({...e})=>{Ci();const t={position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",backgroundSize:"34px 34px, 170px 170px",backgroundPosition:"0 0, 0 0",backgroundImage:`
|
||
linear-gradient(to right, rgba(125,145,175,.04) 1px, transparent 1px),
|
||
linear-gradient(to bottom, rgba(125,145,175,.04) 1px, transparent 1px),
|
||
linear-gradient(to right, rgba(125,145,175,.075) 1px, transparent 1px),
|
||
linear-gradient(to bottom, rgba(125,145,175,.075) 1px, transparent 1px)
|
||
`};return K.jsx("div",{style:t,...e})},u_=({...e})=>{const{camX:t,camY:r,zoom:i}=Ci(),{krates:a}=gl(),h=dt.useRef(null),y=180,n=120,u=12e3,f=8e3,S=y/u,d=n/f,p=window.innerWidth/i,C=window.innerHeight/i,w=t*S,m=r*d,c=p*S,o=C*d,s=l=>{var k;const _=(k=h.current)==null?void 0:k.getBoundingClientRect();if(!_)return;const g=l.clientX-_.left,E=l.clientY-_.top,b=g/S-t-p/2,v=E/d-r-C/2;Ci.getState().setCam(b,v)};return K.jsxs("div",{ref:h,onClick:s,style:{position:"absolute",right:"18px",bottom:"64px",width:y,height:n,background:"rgba(16,20,28,.97)",border:"1px solid rgba(140,165,200,.2)",borderRadius:"4px",overflow:"hidden",zIndex:30},...e,children:[Array.from(a.values()).map(l=>K.jsx("div",{style:{position:"absolute",left:l.x*S,top:l.y*d,width:l.width*S,height:l.height*d,backgroundColor:l.color||"#6fb1ff",opacity:.7}},l.id)),K.jsx("div",{style:{position:"absolute",left:w,top:m,width:c,height:o,border:"1px solid #4dd6e8",borderColor:"rgba(77, 214, 232, 0.4)",boxSizing:"border-box"}})]})},h_={open:!1,query:"",filterType:null,sel:0,navigated:!1},d_=Vs()(qs(e=>({...h_,setOpen:t=>e({open:t}),setQuery:t=>e({query:t,navigated:!1,sel:0}),setFilter:t=>e({filterType:t}),setSel:t=>e({sel:t,navigated:!0}),toggle:()=>e(t=>({open:!t.open})),close:()=>e({open:!1,query:"",filterType:null,sel:0,navigated:!1})}))),f_=({...e})=>{const{open:t,query:r,filterType:i}=d_();if(!t)return null;const a=[{id:"all",label:"All"},{id:"krate",label:"Krates"},{id:"namespace",label:"Namespaces"},{id:"pod",label:"Pods"},{id:"deployment",label:"Deployments"},{id:"service",label:"Services"}];return K.jsx("div",{style:{position:"absolute",top:"100px",left:"50%",transform:"translateX(-50%)",width:"600px",zIndex:100},...e,children:K.jsxs("div",{style:{background:"#1a1e26",border:"1px solid rgba(140,165,200,0.18)",borderRadius:"12px",overflow:"hidden"},children:[K.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px 16px",borderBottom:"1px solid rgba(140,165,200,0.18)"},children:[K.jsx("span",{style:{color:"#888"},children:"🔍"}),K.jsx("input",{type:"text",value:r,placeholder:"Search...",autoFocus:!0,style:{flex:1,background:"transparent",border:"none",color:"#fff",fontSize:"16px",outline:"none"}}),K.jsx("button",{style:{background:"none",border:"none",color:"#888",cursor:"pointer",padding:"4px"},children:"Esc"})]}),K.jsx("div",{style:{padding:"8px 16px",display:"flex",gap:"8px",flexWrap:"wrap"},children:a.map(h=>K.jsx("button",{style:{padding:"4px 12px",borderRadius:"12px",background:i===h.id?"#4dd6e8":"#2a3040",color:i===h.id?"#000":"#aaa",border:"none",cursor:"pointer",fontSize:"12px"},children:h.label},h.id))}),K.jsx("div",{style:{padding:"8px 16px",color:"#888",fontSize:"12px"},children:"Select: Enter, Close: Esc"})]})})},__={currentUser:{id:"local-user",name:"User"},presence:new Map},p_=Vs()(qs(e=>({...__,setCurrentUser:t=>e({currentUser:t}),addPresence:t=>e(r=>({presence:new Map(r.presence).set(t.userId,t)})),removePresence:t=>e(r=>{const i=new Map(r.presence);return i.delete(t),{presence:i}}),updatePresence:(t,r)=>e(i=>{const a=i.presence.get(t);return a?{presence:new Map(i.presence).set(t,{...a,...r})}:i})}))),v_=({open:e,onClose:t,users:r})=>{if(!e)return null;const i=a=>{t(),console.log(`Spectating user: ${a}`)};return K.jsxs("div",{style:{position:"absolute",right:0,top:0,bottom:0,width:"380px",zIndex:56,background:"rgba(13,17,24,.98)",borderLeft:"1px solid rgba(140,165,200,.2)",overflowY:"auto"},onClick:t,children:[K.jsxs("div",{style:{padding:"16px",borderBottom:"1px solid rgba(140,165,200,0.18)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[K.jsx("h2",{style:{margin:0,color:"#fff",fontSize:"16px"},children:"Users"}),K.jsx("button",{onClick:t,style:{background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:"20px"},children:"×"})]}),K.jsx("div",{style:{padding:"16px"},children:r.map(a=>K.jsx("div",{style:{marginBottom:"16px",padding:"12px",background:"rgba(255,255,255,0.02)",borderRadius:"8px"},onClick:h=>h.stopPropagation(),children:K.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[K.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",background:a.color,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:"600"},children:a.name.slice(0,2).toUpperCase()}),K.jsxs("div",{style:{flex:1},children:[K.jsx("div",{style:{color:"#fff",fontWeight:"600"},children:a.name}),K.jsx("div",{style:{color:"#888",fontSize:"12px"},children:a.status})]}),K.jsx("button",{onClick:()=>i(a.userId),style:{background:"#4dd6e8",border:"none",borderRadius:"4px",padding:"6px 10px",color:"#000",fontSize:"12px",fontWeight:"600",cursor:"pointer"},children:"Spectate"})]})},a.userId))})]})},g_=()=>{const{currentUser:e,presence:t}=p_(),[r,i]=dt.useState(!1),[a,h]=dt.useState(!0);dt.useEffect(()=>{const n=setInterval(()=>{h(u=>!u)},1e3);return()=>clearInterval(n)},[]);const y=Array.from(t.values()).map(n=>({userId:n.userId,name:n.name,color:n.color,status:"active"}));return K.jsxs(K.Fragment,{children:[K.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:10,height:"56px",display:"flex",alignItems:"center",padding:"13px 18px"},children:[K.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flex:1},children:[K.jsxs("div",{style:{background:"rgba(14,18,25,.82)",border:"1px solid rgba(140,165,200,.18)",borderRadius:"9px",padding:"7px 12px",backdropFilter:"blur(6px)",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},children:[K.jsx("div",{style:{width:"12px",height:"12px",background:"#4dd6e8",clipPath:"polygon(50% 0,100% 50%,50% 100%,0 50%)"}}),K.jsx("span",{style:{color:"#fff",fontSize:"14px",fontWeight:"600"},children:"krates / yard"})]}),K.jsxs("div",{style:{background:"rgba(14,18,25,.82)",border:"1px solid rgba(140,165,200,.18)",borderRadius:"9px",padding:"7px 12px",display:"flex",alignItems:"center",gap:"8px",backdropFilter:"blur(6px)"},children:[K.jsx("span",{style:{color:"#fff",fontSize:"14px"},children:"local"}),K.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",background:"#4ad07a",boxShadow:"0 0 8px #4ad07a"}})]}),y.length>0&&K.jsx("div",{style:{background:"rgba(14,18,25,.82)",border:"1px solid rgba(140,165,200,.18)",borderRadius:"9px",padding:"7px 12px",backdropFilter:"blur(6px)"},children:K.jsxs("span",{style:{color:"#4dd6e8",fontSize:"14px"},children:[y.length," active"]})})]}),K.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[K.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",padding:"4px 10px",borderRadius:"9px",background:"rgba(14,18,25,.82)",border:"1px solid rgba(140,165,200,.18)",backdropFilter:"blur(6px)"},children:[K.jsx("span",{style:{color:"#aaa",fontSize:"12px"},children:"synced"}),K.jsx("div",{style:{width:"6px",height:"6px",borderRadius:"50%",background:"#4dd6e8",opacity:a?1:.5,animation:a?"pulse 1.6s ease-in-out infinite":"none"}})]}),K.jsx("button",{onClick:()=>i(!r),style:{background:r?"rgba(77,214,232,0.1)":"rgba(14,18,25,.82)",border:r?"1px solid #4dd6e8":"1px solid rgba(140,165,200,.18)",borderRadius:"9px",padding:"6px 12px",backdropFilter:"blur(6px)",color:r?"#4dd6e8":"#aaa",fontSize:"14px",cursor:"pointer"},children:"◉ admin"}),y.slice(0,5).map(n=>K.jsx("div",{style:{width:"30px",height:"30px",borderRadius:"50%",background:n.color,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",color:"#fff",fontWeight:"600",cursor:"pointer",border:n.userId===e.id?"2px solid #4dd6e8":"none"},title:n.name,children:n.userId===e.id?"★":n.name.slice(0,2).toUpperCase()},n.userId)),y.length>5&&K.jsxs("div",{style:{width:"30px",height:"30px",borderRadius:"50%",background:"#2a3040",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",color:"#aaa",cursor:"pointer"},children:["+",y.length-5]})]})]}),K.jsx(v_,{open:r,onClose:()=>i(!1),users:y})]})};var m_={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(self,()=>(()=>{var r={4567:function(y,n,u){var f=this&&this.__decorate||function(l,_,g,E){var b,v=arguments.length,k=v<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(l,_,g,E);else for(var R=l.length-1;R>=0;R--)(b=l[R])&&(k=(v<3?b(k):v>3?b(_,g,k):b(_,g))||k);return v>3&&k&&Object.defineProperty(_,g,k),k},S=this&&this.__param||function(l,_){return function(g,E){_(g,E,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const d=u(9042),p=u(6114),C=u(9924),w=u(844),m=u(5596),c=u(4725),o=u(3656);let s=n.AccessibilityManager=class extends w.Disposable{constructor(l,_){super(),this._terminal=l,this._renderService=_,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let g=0;g<this._terminal.rows;g++)this._rowElements[g]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[g]);if(this._topBoundaryFocusListener=g=>this._handleBoundaryFocus(g,0),this._bottomBoundaryFocusListener=g=>this._handleBoundaryFocus(g,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new C.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(g=>this._handleResize(g.rows))),this.register(this._terminal.onRender(g=>this._refreshRows(g.start,g.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(g=>this._handleChar(g))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
||
`))),this.register(this._terminal.onA11yTab(g=>this._handleTab(g))),this.register(this._terminal.onKey(g=>this._handleKey(g.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new m.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,o.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,w.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(l){for(let _=0;_<l;_++)this._handleChar(" ")}_handleChar(l){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==l&&(this._charsToAnnounce+=l):this._charsToAnnounce+=l,l===`
|
||
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.tooMuchOutput)),p.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,p.isMac&&this._liveRegion.remove()}_handleKey(l){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(l)||this._charsToConsume.push(l)}_refreshRows(l,_){this._liveRegionDebouncer.refresh(l,_,this._terminal.rows)}_renderRows(l,_){const g=this._terminal.buffer,E=g.lines.length.toString();for(let b=l;b<=_;b++){const v=g.translateBufferLineToString(g.ydisp+b,!0),k=(g.ydisp+b+1).toString(),R=this._rowElements[b];R&&(v.length===0?R.innerText=" ":R.textContent=v,R.setAttribute("aria-posinset",k),R.setAttribute("aria-setsize",E))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(l,_){const g=l.target,E=this._rowElements[_===0?1:this._rowElements.length-2];if(g.getAttribute("aria-posinset")===(_===0?"1":`${this._terminal.buffer.lines.length}`)||l.relatedTarget!==E)return;let b,v;if(_===0?(b=g,v=this._rowElements.pop(),this._rowContainer.removeChild(v)):(b=this._rowElements.shift(),v=g,this._rowContainer.removeChild(b)),b.removeEventListener("focus",this._topBoundaryFocusListener),v.removeEventListener("focus",this._bottomBoundaryFocusListener),_===0){const k=this._createAccessibilityTreeNode();this._rowElements.unshift(k),this._rowContainer.insertAdjacentElement("afterbegin",k)}else{const k=this._createAccessibilityTreeNode();this._rowElements.push(k),this._rowContainer.appendChild(k)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(_===0?-1:1),this._rowElements[_===0?1:this._rowElements.length-2].focus(),l.preventDefault(),l.stopImmediatePropagation()}_handleResize(l){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let _=this._rowContainer.children.length;_<this._terminal.rows;_++)this._rowElements[_]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[_]);for(;this._rowElements.length>l;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const l=document.createElement("div");return l.setAttribute("role","listitem"),l.tabIndex=-1,this._refreshRowDimensions(l),l}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let l=0;l<this._terminal.rows;l++)this._refreshRowDimensions(this._rowElements[l])}}_refreshRowDimensions(l){l.style.height=`${this._renderService.dimensions.css.cell.height}px`}};n.AccessibilityManager=s=f([S(1,c.IRenderService)],s)},3614:(y,n)=>{function u(p){return p.replace(/\r?\n/g,"\r")}function f(p,C){return C?"\x1B[200~"+p+"\x1B[201~":p}function S(p,C,w,m){p=f(p=u(p),w.decPrivateModes.bracketedPasteMode&&m.rawOptions.ignoreBracketedPasteMode!==!0),w.triggerDataEvent(p,!0),C.value=""}function d(p,C,w){const m=w.getBoundingClientRect(),c=p.clientX-m.left-10,o=p.clientY-m.top-10;C.style.width="20px",C.style.height="20px",C.style.left=`${c}px`,C.style.top=`${o}px`,C.style.zIndex="1000",C.focus()}Object.defineProperty(n,"__esModule",{value:!0}),n.rightClickHandler=n.moveTextAreaUnderMouseCursor=n.paste=n.handlePasteEvent=n.copyHandler=n.bracketTextForPaste=n.prepareTextForTerminal=void 0,n.prepareTextForTerminal=u,n.bracketTextForPaste=f,n.copyHandler=function(p,C){p.clipboardData&&p.clipboardData.setData("text/plain",C.selectionText),p.preventDefault()},n.handlePasteEvent=function(p,C,w,m){p.stopPropagation(),p.clipboardData&&S(p.clipboardData.getData("text/plain"),C,w,m)},n.paste=S,n.moveTextAreaUnderMouseCursor=d,n.rightClickHandler=function(p,C,w,m,c){d(p,C,w),c&&m.rightClickSelect(p),C.value=m.selectionText,C.select()}},7239:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const f=u(1505);n.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(S,d,p){this._css.set(S,d,p)}getCss(S,d){return this._css.get(S,d)}setColor(S,d,p){this._color.set(S,d,p)}getColor(S,d){return this._color.get(S,d)}clear(){this._color.clear(),this._css.clear()}}},3656:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(u,f,S,d){u.addEventListener(f,S,d);let p=!1;return{dispose:()=>{p||(p=!0,u.removeEventListener(f,S,d))}}}},6465:function(y,n,u){var f=this&&this.__decorate||function(c,o,s,l){var _,g=arguments.length,E=g<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,s):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,o,s,l);else for(var b=c.length-1;b>=0;b--)(_=c[b])&&(E=(g<3?_(E):g>3?_(o,s,E):_(o,s))||E);return g>3&&E&&Object.defineProperty(o,s,E),E},S=this&&this.__param||function(c,o){return function(s,l){o(s,l,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier2=void 0;const d=u(3656),p=u(8460),C=u(844),w=u(2585);let m=n.Linkifier2=class extends C.Disposable{get currentLink(){return this._currentLink}constructor(c){super(),this._bufferService=c,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,C.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,C.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}registerLinkProvider(c){return this._linkProviders.push(c),{dispose:()=>{const o=this._linkProviders.indexOf(c);o!==-1&&this._linkProviders.splice(o,1)}}}attachToDom(c,o,s){this._element=c,this._mouseService=o,this._renderService=s,this.register((0,d.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,d.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(c){if(this._lastMouseEvent=c,!this._element||!this._mouseService)return;const o=this._positionFromMouseEvent(c,this._element,this._mouseService);if(!o)return;this._isMouseOut=!1;const s=c.composedPath();for(let l=0;l<s.length;l++){const _=s[l];if(_.classList.contains("xterm"))break;if(_.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._handleHover(o),this._lastBufferCell=o)}_handleHover(c){if(this._activeLine!==c.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(c,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,c)||(this._clearCurrentLink(),this._askForLink(c,!0))}_askForLink(c,o){var s,l;this._activeProviderReplies&&o||((s=this._activeProviderReplies)===null||s===void 0||s.forEach(g=>{g==null||g.forEach(E=>{E.link.dispose&&E.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=c.y);let _=!1;for(const[g,E]of this._linkProviders.entries())o?!((l=this._activeProviderReplies)===null||l===void 0)&&l.get(g)&&(_=this._checkLinkProviderResult(g,c,_)):E.provideLinks(c.y,b=>{var v,k;if(this._isMouseOut)return;const R=b==null?void 0:b.map(P=>({link:P}));(v=this._activeProviderReplies)===null||v===void 0||v.set(g,R),_=this._checkLinkProviderResult(g,c,_),((k=this._activeProviderReplies)===null||k===void 0?void 0:k.size)===this._linkProviders.length&&this._removeIntersectingLinks(c.y,this._activeProviderReplies)})}_removeIntersectingLinks(c,o){const s=new Set;for(let l=0;l<o.size;l++){const _=o.get(l);if(_)for(let g=0;g<_.length;g++){const E=_[g],b=E.link.range.start.y<c?0:E.link.range.start.x,v=E.link.range.end.y>c?this._bufferService.cols:E.link.range.end.x;for(let k=b;k<=v;k++){if(s.has(k)){_.splice(g--,1);break}s.add(k)}}}}_checkLinkProviderResult(c,o,s){var l;if(!this._activeProviderReplies)return s;const _=this._activeProviderReplies.get(c);let g=!1;for(let E=0;E<c;E++)this._activeProviderReplies.has(E)&&!this._activeProviderReplies.get(E)||(g=!0);if(!g&&_){const E=_.find(b=>this._linkAtPosition(b.link,o));E&&(s=!0,this._handleNewLink(E))}if(this._activeProviderReplies.size===this._linkProviders.length&&!s)for(let E=0;E<this._activeProviderReplies.size;E++){const b=(l=this._activeProviderReplies.get(E))===null||l===void 0?void 0:l.find(v=>this._linkAtPosition(v.link,o));if(b){s=!0,this._handleNewLink(b);break}}return s}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(c){if(!this._element||!this._mouseService||!this._currentLink)return;const o=this._positionFromMouseEvent(c,this._element,this._mouseService);o&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(c,this._currentLink.link.text)}_clearCurrentLink(c,o){this._element&&this._currentLink&&this._lastMouseEvent&&(!c||!o||this._currentLink.link.range.start.y>=c&&this._currentLink.link.range.end.y<=o)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,C.disposeArray)(this._linkCacheDisposables))}_handleNewLink(c){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._linkAtPosition(c.link,o)&&(this._currentLink=c,this._currentLink.state={decorations:{underline:c.link.decorations===void 0||c.link.decorations.underline,pointerCursor:c.link.decorations===void 0||c.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,c.link,this._lastMouseEvent),c.link.decorations={},Object.defineProperties(c.link.decorations,{pointerCursor:{get:()=>{var s,l;return(l=(s=this._currentLink)===null||s===void 0?void 0:s.state)===null||l===void 0?void 0:l.decorations.pointerCursor},set:s=>{var l,_;!((l=this._currentLink)===null||l===void 0)&&l.state&&this._currentLink.state.decorations.pointerCursor!==s&&(this._currentLink.state.decorations.pointerCursor=s,this._currentLink.state.isHovered&&((_=this._element)===null||_===void 0||_.classList.toggle("xterm-cursor-pointer",s)))}},underline:{get:()=>{var s,l;return(l=(s=this._currentLink)===null||s===void 0?void 0:s.state)===null||l===void 0?void 0:l.decorations.underline},set:s=>{var l,_,g;!((l=this._currentLink)===null||l===void 0)&&l.state&&((g=(_=this._currentLink)===null||_===void 0?void 0:_.state)===null||g===void 0?void 0:g.decorations.underline)!==s&&(this._currentLink.state.decorations.underline=s,this._currentLink.state.isHovered&&this._fireUnderlineEvent(c.link,s))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(s=>{if(!this._currentLink)return;const l=s.start===0?0:s.start+1+this._bufferService.buffer.ydisp,_=this._bufferService.buffer.ydisp+1+s.end;if(this._currentLink.link.range.start.y>=l&&this._currentLink.link.range.end.y<=_&&(this._clearCurrentLink(l,_),this._lastMouseEvent&&this._element)){const g=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);g&&this._askForLink(g,!1)}})))}_linkHover(c,o,s){var l;!((l=this._currentLink)===null||l===void 0)&&l.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&c.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(s,o.text)}_fireUnderlineEvent(c,o){const s=c.range,l=this._bufferService.buffer.ydisp,_=this._createLinkUnderlineEvent(s.start.x-1,s.start.y-l-1,s.end.x,s.end.y-l-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(_)}_linkLeave(c,o,s){var l;!((l=this._currentLink)===null||l===void 0)&&l.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&c.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(s,o.text)}_linkAtPosition(c,o){const s=c.range.start.y*this._bufferService.cols+c.range.start.x,l=c.range.end.y*this._bufferService.cols+c.range.end.x,_=o.y*this._bufferService.cols+o.x;return s<=_&&_<=l}_positionFromMouseEvent(c,o,s){const l=s.getCoords(c,o,this._bufferService.cols,this._bufferService.rows);if(l)return{x:l[0],y:l[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(c,o,s,l,_){return{x1:c,y1:o,x2:s,y2:l,cols:this._bufferService.cols,fg:_}}};n.Linkifier2=m=f([S(0,w.IBufferService)],m)},9042:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tooMuchOutput=n.promptLabel=void 0,n.promptLabel="Terminal input",n.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(y,n,u){var f=this&&this.__decorate||function(m,c,o,s){var l,_=arguments.length,g=_<3?c:s===null?s=Object.getOwnPropertyDescriptor(c,o):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(m,c,o,s);else for(var E=m.length-1;E>=0;E--)(l=m[E])&&(g=(_<3?l(g):_>3?l(c,o,g):l(c,o))||g);return _>3&&g&&Object.defineProperty(c,o,g),g},S=this&&this.__param||function(m,c){return function(o,s){c(o,s,m)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const d=u(511),p=u(2585);let C=n.OscLinkProvider=class{constructor(m,c,o){this._bufferService=m,this._optionsService=c,this._oscLinkService=o}provideLinks(m,c){var o;const s=this._bufferService.buffer.lines.get(m-1);if(!s)return void c(void 0);const l=[],_=this._optionsService.rawOptions.linkHandler,g=new d.CellData,E=s.getTrimmedLength();let b=-1,v=-1,k=!1;for(let R=0;R<E;R++)if(v!==-1||s.hasContent(R)){if(s.loadCell(R,g),g.hasExtendedAttrs()&&g.extended.urlId){if(v===-1){v=R,b=g.extended.urlId;continue}k=g.extended.urlId!==b}else v!==-1&&(k=!0);if(k||v!==-1&&R===E-1){const P=(o=this._oscLinkService.getLinkData(b))===null||o===void 0?void 0:o.uri;if(P){const A={start:{x:v+1,y:m},end:{x:R+(k||R!==E-1?0:1),y:m}};let B=!1;if(!(_!=null&&_.allowNonHttpProtocols))try{const I=new URL(P);["http:","https:"].includes(I.protocol)||(B=!0)}catch{B=!0}B||l.push({text:P,range:A,activate:(I,z)=>_?_.activate(I,z,A):w(0,z),hover:(I,z)=>{var U;return(U=_==null?void 0:_.hover)===null||U===void 0?void 0:U.call(_,I,z,A)},leave:(I,z)=>{var U;return(U=_==null?void 0:_.leave)===null||U===void 0?void 0:U.call(_,I,z,A)}})}k=!1,g.hasExtendedAttrs()&&g.extended.urlId?(v=R,b=g.extended.urlId):(v=-1,b=-1)}}c(l)}};function w(m,c){if(confirm(`Do you want to navigate to ${c}?
|
||
|
||
WARNING: This link could potentially be dangerous`)){const o=window.open();if(o){try{o.opener=null}catch{}o.location.href=c}else console.warn("Opening link blocked as opener could not be cleared")}}n.OscLinkProvider=C=f([S(0,p.IBufferService),S(1,p.IOptionsService),S(2,p.IOscLinkService)],C)},6193:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0,n.RenderDebouncer=class{constructor(u,f){this._parentWindow=u,this._renderCallback=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(u,f,S){this._rowCount=S,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},5596:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ScreenDprMonitor=void 0;const f=u(844);class S extends f.Disposable{constructor(p){super(),this._parentWindow=p,this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this.register((0,f.toDisposable)(()=>{this.clearListener()}))}setListener(p){this._listener&&this.clearListener(),this._listener=p,this._outerListener=()=>{this._listener&&(this._listener(this._parentWindow.devicePixelRatio,this._currentDevicePixelRatio),this._updateDpr())},this._updateDpr()}_updateDpr(){var p;this._outerListener&&((p=this._resolutionMediaMatchList)===null||p===void 0||p.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._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)}}n.ScreenDprMonitor=S},3236:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const f=u(3614),S=u(3656),d=u(6465),p=u(9042),C=u(3730),w=u(1680),m=u(3107),c=u(5744),o=u(2950),s=u(1296),l=u(428),_=u(4269),g=u(5114),E=u(8934),b=u(3230),v=u(9312),k=u(4725),R=u(6731),P=u(8055),A=u(8969),B=u(8460),I=u(844),z=u(6114),U=u(8437),j=u(2584),x=u(7399),D=u(5941),T=u(9074),M=u(2585),F=u(5435),$=u(4567),G=typeof window<"u"?window.document:null;class X extends A.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(L={}){super(L),this.browser=z,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new I.MutableDisposable),this._onCursorMove=this.register(new B.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new B.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new B.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new B.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new B.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new B.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new B.EventEmitter),this._onBlur=this.register(new B.EventEmitter),this._onA11yCharEmitter=this.register(new B.EventEmitter),this._onA11yTabEmitter=this.register(new B.EventEmitter),this._onWillOpen=this.register(new B.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(d.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(C.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(T.DecorationService),this._instantiationService.setService(M.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((O,N)=>this.refresh(O,N))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(O=>this._reportWindowsOptions(O))),this.register(this._inputHandler.onColor(O=>this._handleColorEvent(O))),this.register((0,B.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,B.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(O=>this._afterResize(O.cols,O.rows))),this.register((0,I.toDisposable)(()=>{var O,N;this._customKeyEventHandler=void 0,(N=(O=this.element)===null||O===void 0?void 0:O.parentNode)===null||N===void 0||N.removeChild(this.element)}))}_handleColorEvent(L){if(this._themeService)for(const O of L){let N,H="";switch(O.index){case 256:N="foreground",H="10";break;case 257:N="background",H="11";break;case 258:N="cursor",H="12";break;default:N="ansi",H="4;"+O.index}switch(O.type){case 0:const Q=P.color.toColorRGB(N==="ansi"?this._themeService.colors.ansi[O.index]:this._themeService.colors[N]);this.coreService.triggerDataEvent(`${j.C0.ESC}]${H};${(0,D.toRgbString)(Q)}${j.C1_ESCAPED.ST}`);break;case 1:if(N==="ansi")this._themeService.modifyColors(V=>V.ansi[O.index]=P.rgba.toColor(...O.color));else{const V=N;this._themeService.modifyColors(te=>te[V]=P.rgba.toColor(...O.color))}break;case 2:this._themeService.restoreColor(O.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(L){L?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance($.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(L){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(j.C0.ESC+"[I"),this.updateCursorStyle(L),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var L;return(L=this.textarea)===null||L===void 0?void 0:L.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(j.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const L=this.buffer.ybase+this.buffer.y,O=this.buffer.lines.get(L);if(!O)return;const N=Math.min(this.buffer.x,this.cols-1),H=this._renderService.dimensions.css.cell.height,Q=O.getWidth(N),V=this._renderService.dimensions.css.cell.width*Q,te=this.buffer.y*this._renderService.dimensions.css.cell.height,me=N*this._renderService.dimensions.css.cell.width;this.textarea.style.left=me+"px",this.textarea.style.top=te+"px",this.textarea.style.width=V+"px",this.textarea.style.height=H+"px",this.textarea.style.lineHeight=H+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,S.addDisposableDomListener)(this.element,"copy",O=>{this.hasSelection()&&(0,f.copyHandler)(O,this._selectionService)}));const L=O=>(0,f.handlePasteEvent)(O,this.textarea,this.coreService,this.optionsService);this.register((0,S.addDisposableDomListener)(this.textarea,"paste",L)),this.register((0,S.addDisposableDomListener)(this.element,"paste",L)),z.isFirefox?this.register((0,S.addDisposableDomListener)(this.element,"mousedown",O=>{O.button===2&&(0,f.rightClickHandler)(O,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,S.addDisposableDomListener)(this.element,"contextmenu",O=>{(0,f.rightClickHandler)(O,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),z.isLinux&&this.register((0,S.addDisposableDomListener)(this.element,"auxclick",O=>{O.button===1&&(0,f.moveTextAreaUnderMouseCursor)(O,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,S.addDisposableDomListener)(this.textarea,"keyup",L=>this._keyUp(L),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"keydown",L=>this._keyDown(L),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"keypress",L=>this._keyPress(L),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionupdate",L=>this._compositionHelper.compositionupdate(L))),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,S.addDisposableDomListener)(this.textarea,"input",L=>this._inputEvent(L),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(L){var O;if(!L)throw new Error("Terminal requires a parent element.");L.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=L.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),L.appendChild(this.element);const N=G.createDocumentFragment();this._viewportElement=G.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),N.appendChild(this._viewportElement),this._viewportScrollArea=G.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=G.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=G.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),N.appendChild(this.screenElement),this.textarea=G.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),z.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this._instantiationService.createInstance(g.CoreBrowserService,this.textarea,(O=this._document.defaultView)!==null&&O!==void 0?O:window),this._instantiationService.setService(k.ICoreBrowserService,this._coreBrowserService),this.register((0,S.addDisposableDomListener)(this.textarea,"focus",H=>this._handleTextAreaFocus(H))),this.register((0,S.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(k.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(R.ThemeService),this._instantiationService.setService(k.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(k.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(b.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(k.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(H=>this._onRender.fire(H))),this.onResize(H=>this._renderService.resize(H.cols,H.rows)),this._compositionView=G.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(o.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(N);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._mouseService=this._instantiationService.createInstance(E.MouseService),this._instantiationService.setService(k.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(w.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(H=>this.scrollLines(H.amount,H.suppressScrollEvent,1)),this.register(this._inputHandler.onRequestSyncScrollBar(()=>this.viewport.syncScrollArea())),this.register(this.viewport),this.register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this.register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this.register(this.onBlur(()=>this._renderService.handleBlur())),this.register(this.onFocus(()=>this._renderService.handleFocus())),this.register(this._renderService.onDimensionsChange(()=>this.viewport.syncScrollArea())),this._selectionService=this.register(this._instantiationService.createInstance(v.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(k.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(H=>this.scrollLines(H.amount,H.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(H=>this._renderService.handleSelectionChanged(H.start,H.end,H.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(H=>{this.textarea.value=H,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(H=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,S.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(m.BufferDecorationRenderer,this.screenElement)),this.register((0,S.addDisposableDomListener)(this.element,"mousedown",H=>this._selectionService.handleMouseDown(H))),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($.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",H=>this._handleScreenReaderModeOptionChange(H))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(c.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",H=>{!this._overviewRulerRenderer&&H&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(c.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(s.DomRenderer,this.element,this.screenElement,this._viewportElement,this.linkifier2)}bindMouse(){const L=this,O=this.element;function N(V){const te=L._mouseService.getMouseReportCoords(V,L.screenElement);if(!te)return!1;let me,Te;switch(V.overrideType||V.type){case"mousemove":Te=32,V.buttons===void 0?(me=3,V.button!==void 0&&(me=V.button<3?V.button:3)):me=1&V.buttons?0:4&V.buttons?1:2&V.buttons?2:3;break;case"mouseup":Te=0,me=V.button<3?V.button:3;break;case"mousedown":Te=1,me=V.button<3?V.button:3;break;case"wheel":if(L.viewport.getLinesScrolled(V)===0)return!1;Te=V.deltaY<0?0:1,me=4;break;default:return!1}return!(Te===void 0||me===void 0||me>4)&&L.coreMouseService.triggerMouseEvent({col:te.col,row:te.row,x:te.x,y:te.y,button:me,action:Te,ctrl:V.ctrlKey,alt:V.altKey,shift:V.shiftKey})}const H={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Q={mouseup:V=>(N(V),V.buttons||(this._document.removeEventListener("mouseup",H.mouseup),H.mousedrag&&this._document.removeEventListener("mousemove",H.mousedrag)),this.cancel(V)),wheel:V=>(N(V),this.cancel(V,!0)),mousedrag:V=>{V.buttons&&N(V)},mousemove:V=>{V.buttons||N(V)}};this.register(this.coreMouseService.onProtocolChange(V=>{V?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(V)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&V?H.mousemove||(O.addEventListener("mousemove",Q.mousemove),H.mousemove=Q.mousemove):(O.removeEventListener("mousemove",H.mousemove),H.mousemove=null),16&V?H.wheel||(O.addEventListener("wheel",Q.wheel,{passive:!1}),H.wheel=Q.wheel):(O.removeEventListener("wheel",H.wheel),H.wheel=null),2&V?H.mouseup||(O.addEventListener("mouseup",Q.mouseup),H.mouseup=Q.mouseup):(this._document.removeEventListener("mouseup",H.mouseup),O.removeEventListener("mouseup",H.mouseup),H.mouseup=null),4&V?H.mousedrag||(H.mousedrag=Q.mousedrag):(this._document.removeEventListener("mousemove",H.mousedrag),H.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,S.addDisposableDomListener)(O,"mousedown",V=>{if(V.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(V))return N(V),H.mouseup&&this._document.addEventListener("mouseup",H.mouseup),H.mousedrag&&this._document.addEventListener("mousemove",H.mousedrag),this.cancel(V)})),this.register((0,S.addDisposableDomListener)(O,"wheel",V=>{if(!H.wheel){if(!this.buffer.hasScrollback){const te=this.viewport.getLinesScrolled(V);if(te===0)return;const me=j.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(V.deltaY<0?"A":"B");let Te="";for(let tr=0;tr<Math.abs(te);tr++)Te+=me;return this.coreService.triggerDataEvent(Te,!0),this.cancel(V,!0)}return this.viewport.handleWheel(V)?this.cancel(V):void 0}},{passive:!1})),this.register((0,S.addDisposableDomListener)(O,"touchstart",V=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(V),this.cancel(V)},{passive:!0})),this.register((0,S.addDisposableDomListener)(O,"touchmove",V=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(V)?void 0:this.cancel(V)},{passive:!1}))}refresh(L,O){var N;(N=this._renderService)===null||N===void 0||N.refreshRows(L,O)}updateCursorStyle(L){var O;!((O=this._selectionService)===null||O===void 0)&&O.shouldColumnSelect(L)?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(L,O,N=0){var H;N===1?(super.scrollLines(L,O,N),this.refresh(0,this.rows-1)):(H=this.viewport)===null||H===void 0||H.scrollLines(L)}paste(L){(0,f.paste)(L,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(L){this._customKeyEventHandler=L}registerLinkProvider(L){return this.linkifier2.registerLinkProvider(L)}registerCharacterJoiner(L){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const O=this._characterJoinerService.register(L);return this.refresh(0,this.rows-1),O}deregisterCharacterJoiner(L){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(L)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(L){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+L)}registerDecoration(L){return this._decorationService.registerDecoration(L)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(L,O,N){this._selectionService.setSelection(L,O,N)}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 L;(L=this._selectionService)===null||L===void 0||L.clearSelection()}selectAll(){var L;(L=this._selectionService)===null||L===void 0||L.selectAll()}selectLines(L,O){var N;(N=this._selectionService)===null||N===void 0||N.selectLines(L,O)}_keyDown(L){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(L)===!1)return!1;const O=this.browser.isMac&&this.options.macOptionIsMeta&&L.altKey;if(!O&&!this._compositionHelper.keydown(L))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;O||L.key!=="Dead"&&L.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const N=(0,x.evaluateKeyboardEvent)(L,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(L),N.type===3||N.type===2){const H=this.rows-1;return this.scrollLines(N.type===2?-H:H),this.cancel(L,!0)}return N.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,L)||(N.cancel&&this.cancel(L,!0),!N.key||!!(L.key&&!L.ctrlKey&&!L.altKey&&!L.metaKey&&L.key.length===1&&L.key.charCodeAt(0)>=65&&L.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(N.key!==j.C0.ETX&&N.key!==j.C0.CR||(this.textarea.value=""),this._onKey.fire({key:N.key,domEvent:L}),this._showCursor(),this.coreService.triggerDataEvent(N.key,!0),!this.optionsService.rawOptions.screenReaderMode||L.altKey||L.ctrlKey?this.cancel(L,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(L,O){const N=L.isMac&&!this.options.macOptionIsMeta&&O.altKey&&!O.ctrlKey&&!O.metaKey||L.isWindows&&O.altKey&&O.ctrlKey&&!O.metaKey||L.isWindows&&O.getModifierState("AltGraph");return O.type==="keypress"?N:N&&(!O.keyCode||O.keyCode>47)}_keyUp(L){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(L)===!1||(function(O){return O.keyCode===16||O.keyCode===17||O.keyCode===18}(L)||this.focus(),this.updateCursorStyle(L),this._keyPressHandled=!1)}_keyPress(L){let O;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(L)===!1)return!1;if(this.cancel(L),L.charCode)O=L.charCode;else if(L.which===null||L.which===void 0)O=L.keyCode;else{if(L.which===0||L.charCode===0)return!1;O=L.which}return!(!O||(L.altKey||L.ctrlKey||L.metaKey)&&!this._isThirdLevelShift(this.browser,L)||(O=String.fromCharCode(O),this._onKey.fire({key:O,domEvent:L}),this._showCursor(),this.coreService.triggerDataEvent(O,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(L){if(L.data&&L.inputType==="insertText"&&(!L.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const O=L.data;return this.coreService.triggerDataEvent(O,!0),this.cancel(L),!0}return!1}resize(L,O){L!==this.cols||O!==this.rows?super.resize(L,O):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(L,O){var N,H;(N=this._charSizeService)===null||N===void 0||N.measure(),(H=this.viewport)===null||H===void 0||H.syncScrollArea(!0)}clear(){var L;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 O=1;O<this.rows;O++)this.buffer.lines.push(this.buffer.getBlankLine(U.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(L=this.viewport)===null||L===void 0||L.reset(),this.refresh(0,this.rows-1)}}reset(){var L,O;this.options.rows=this.rows,this.options.cols=this.cols;const N=this._customKeyEventHandler;this._setup(),super.reset(),(L=this._selectionService)===null||L===void 0||L.reset(),this._decorationService.reset(),(O=this.viewport)===null||O===void 0||O.reset(),this._customKeyEventHandler=N,this.refresh(0,this.rows-1)}clearTextureAtlas(){var L;(L=this._renderService)===null||L===void 0||L.clearTextureAtlas()}_reportFocus(){var L;!((L=this.element)===null||L===void 0)&&L.classList.contains("focus")?this.coreService.triggerDataEvent(j.C0.ESC+"[I"):this.coreService.triggerDataEvent(j.C0.ESC+"[O")}_reportWindowsOptions(L){if(this._renderService)switch(L){case F.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const O=this._renderService.dimensions.css.canvas.width.toFixed(0),N=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${j.C0.ESC}[4;${N};${O}t`);break;case F.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const H=this._renderService.dimensions.css.cell.width.toFixed(0),Q=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${j.C0.ESC}[6;${Q};${H}t`)}}cancel(L,O){if(this.options.cancelEvents||O)return L.preventDefault(),L.stopPropagation(),!1}}n.Terminal=X},9924:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TimeBasedDebouncer=void 0,n.TimeBasedDebouncer=class{constructor(u,f=1e3){this._renderCallback=u,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,f,S){this._rowCount=S,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f;const d=Date.now();if(d-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=d,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=d-this._lastRefreshMs,C=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.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;const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f)}}},1680:function(y,n,u){var f=this&&this.__decorate||function(o,s,l,_){var g,E=arguments.length,b=E<3?s:_===null?_=Object.getOwnPropertyDescriptor(s,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(o,s,l,_);else for(var v=o.length-1;v>=0;v--)(g=o[v])&&(b=(E<3?g(b):E>3?g(s,l,b):g(s,l))||b);return E>3&&b&&Object.defineProperty(s,l,b),b},S=this&&this.__param||function(o,s){return function(l,_){s(l,_,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const d=u(3656),p=u(4725),C=u(8460),w=u(844),m=u(2585);let c=n.Viewport=class extends w.Disposable{constructor(o,s,l,_,g,E,b,v){super(),this._viewportElement=o,this._scrollArea=s,this._bufferService=l,this._optionsService=_,this._charSizeService=g,this._renderService=E,this._coreBrowserService=b,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new C.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(k=>this._activeBuffer=k.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(k=>this._renderDimensions=k)),this._handleThemeChange(v.colors),this.register(v.onChangeColors(k=>this._handleThemeChange(k))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(o){this._viewportElement.style.backgroundColor=o.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame(()=>this.syncScrollArea())}_refresh(o){if(o)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderService.dimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const s=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.css.canvas.height);this._lastRecordedBufferHeight!==s&&(this._lastRecordedBufferHeight=s,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const o=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==o&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=o),this._refreshAnimationFrame=null}syncScrollArea(o=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(o);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(o)}_handleScroll(o){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const s=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:s,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const o=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(o*(this._smoothScrollState.target-this._smoothScrollState.origin)),o<1?this._coreBrowserService.window.requestAnimationFrame(()=>this._smoothScroll()):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(o,s){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(s<0&&this._viewportElement.scrollTop!==0||s>0&&l<this._lastRecordedBufferHeight)||(o.cancelable&&o.preventDefault(),!1)}handleWheel(o){const s=this._getPixelsScrolled(o);return s!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+s:this._smoothScrollState.target+=s,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=s,this._bubbleScroll(o,s))}scrollLines(o){if(o!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const s=o*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+s,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:o,suppressScrollEvent:!1})}_getPixelsScrolled(o){if(o.deltaY===0||o.shiftKey)return 0;let s=this._applyScrollModifier(o.deltaY,o);return o.deltaMode===WheelEvent.DOM_DELTA_LINE?s*=this._currentRowHeight:o.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s*=this._currentRowHeight*this._bufferService.rows),s}getBufferElements(o,s){var l;let _,g="";const E=[],b=s??this._bufferService.buffer.lines.length,v=this._bufferService.buffer.lines;for(let k=o;k<b;k++){const R=v.get(k);if(!R)continue;const P=(l=v.get(k+1))===null||l===void 0?void 0:l.isWrapped;if(g+=R.translateToString(!P),!P||k===v.length-1){const A=document.createElement("div");A.textContent=g,E.push(A),g.length>0&&(_=A),g=""}}return{bufferElements:E,cursorElement:_}}getLinesScrolled(o){if(o.deltaY===0||o.shiftKey)return 0;let s=this._applyScrollModifier(o.deltaY,o);return o.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(s/=this._currentRowHeight+0,this._wheelPartialScroll+=s,s=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):o.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s*=this._bufferService.rows),s}_applyScrollModifier(o,s){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&s.altKey||l==="ctrl"&&s.ctrlKey||l==="shift"&&s.shiftKey?o*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:o*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(o){this._lastTouchY=o.touches[0].pageY}handleTouchMove(o){const s=this._lastTouchY-o.touches[0].pageY;return this._lastTouchY=o.touches[0].pageY,s!==0&&(this._viewportElement.scrollTop+=s,this._bubbleScroll(o,s))}};n.Viewport=c=f([S(2,m.IBufferService),S(3,m.IOptionsService),S(4,p.ICharSizeService),S(5,p.IRenderService),S(6,p.ICoreBrowserService),S(7,p.IThemeService)],c)},3107:function(y,n,u){var f=this&&this.__decorate||function(c,o,s,l){var _,g=arguments.length,E=g<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,s):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,o,s,l);else for(var b=c.length-1;b>=0;b--)(_=c[b])&&(E=(g<3?_(E):g>3?_(o,s,E):_(o,s))||E);return g>3&&E&&Object.defineProperty(o,s,E),E},S=this&&this.__param||function(c,o){return function(s,l){o(s,l,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferDecorationRenderer=void 0;const d=u(3656),p=u(4725),C=u(844),w=u(2585);let m=n.BufferDecorationRenderer=class extends C.Disposable{constructor(c,o,s,l){super(),this._screenElement=c,this._bufferService=o,this._decorationService=s,this._renderService=l,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register((0,d.addDisposableDomListener)(window,"resize",()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(_=>this._removeDecoration(_))),this.register((0,C.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(const c of this._decorationService.decorations)this._renderDecoration(c);this._dimensionsChanged=!1}_renderDecoration(c){this._refreshStyle(c),this._dimensionsChanged&&this._refreshXPosition(c)}_createElement(c){var o,s;const l=document.createElement("div");l.classList.add("xterm-decoration"),l.classList.toggle("xterm-decoration-top-layer",((o=c==null?void 0:c.options)===null||o===void 0?void 0:o.layer)==="top"),l.style.width=`${Math.round((c.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,l.style.height=(c.options.height||1)*this._renderService.dimensions.css.cell.height+"px",l.style.top=(c.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",l.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const _=(s=c.options.x)!==null&&s!==void 0?s:0;return _&&_>this._bufferService.cols&&(l.style.display="none"),this._refreshXPosition(c,l),l}_refreshStyle(c){const o=c.marker.line-this._bufferService.buffers.active.ydisp;if(o<0||o>=this._bufferService.rows)c.element&&(c.element.style.display="none",c.onRenderEmitter.fire(c.element));else{let s=this._decorationElements.get(c);s||(s=this._createElement(c),c.element=s,this._decorationElements.set(c,s),this._container.appendChild(s),c.onDispose(()=>{this._decorationElements.delete(c),s.remove()})),s.style.top=o*this._renderService.dimensions.css.cell.height+"px",s.style.display=this._altBufferIsActive?"none":"block",c.onRenderEmitter.fire(s)}}_refreshXPosition(c,o=c.element){var s;if(!o)return;const l=(s=c.options.x)!==null&&s!==void 0?s:0;(c.options.anchor||"left")==="right"?o.style.right=l?l*this._renderService.dimensions.css.cell.width+"px":"":o.style.left=l?l*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(c){var o;(o=this._decorationElements.get(c))===null||o===void 0||o.remove(),this._decorationElements.delete(c),c.dispose()}};n.BufferDecorationRenderer=m=f([S(1,w.IBufferService),S(2,w.IDecorationService),S(3,p.IRenderService)],m)},5871:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorZoneStore=void 0,n.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(u){if(u.options.overviewRulerOptions){for(const f of this._zones)if(f.color===u.options.overviewRulerOptions.color&&f.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,u.marker.line))return;if(this._lineAdjacentToZone(f,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(f,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,f){return f>=u.startBufferLine&&f<=u.endBufferLine}_lineAdjacentToZone(u,f,S){return f>=u.startBufferLine-this._linePadding[S||"full"]&&f<=u.endBufferLine+this._linePadding[S||"full"]}_addLineToZone(u,f){u.startBufferLine=Math.min(u.startBufferLine,f),u.endBufferLine=Math.max(u.endBufferLine,f)}}},5744:function(y,n,u){var f=this&&this.__decorate||function(_,g,E,b){var v,k=arguments.length,R=k<3?g:b===null?b=Object.getOwnPropertyDescriptor(g,E):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,g,E,b);else for(var P=_.length-1;P>=0;P--)(v=_[P])&&(R=(k<3?v(R):k>3?v(g,E,R):v(g,E))||R);return k>3&&R&&Object.defineProperty(g,E,R),R},S=this&&this.__param||function(_,g){return function(E,b){g(E,b,_)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OverviewRulerRenderer=void 0;const d=u(5871),p=u(3656),C=u(4725),w=u(844),m=u(2585),c={full:0,left:0,center:0,right:0},o={full:0,left:0,center:0,right:0},s={full:0,left:0,center:0,right:0};let l=n.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(_,g,E,b,v,k,R){var P;super(),this._viewportElement=_,this._screenElement=g,this._bufferService=E,this._decorationService=b,this._renderService=v,this._optionsService=k,this._coreBrowseService=R,this._colorZoneStore=new d.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(P=this._viewportElement.parentElement)===null||P===void 0||P.insertBefore(this._canvas,this._viewportElement);const A=this._canvas.getContext("2d");if(!A)throw new Error("Ctx cannot be null");this._ctx=A,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)(()=>{var B;(B=this._canvas)===null||B===void 0||B.remove()}))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this.register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0)))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())}))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",()=>this._queueRefresh(!0))),this.register((0,p.addDisposableDomListener)(this._coreBrowseService.window,"resize",()=>this._queueRefresh(!0))),this._queueRefresh(!0)}_refreshDrawConstants(){const _=Math.floor(this._canvas.width/3),g=Math.ceil(this._canvas.width/3);o.full=this._canvas.width,o.left=_,o.center=g,o.right=_,this._refreshDrawHeightConstants(),s.full=0,s.left=0,s.center=o.left,s.right=o.left+o.center}_refreshDrawHeightConstants(){c.full=Math.round(2*this._coreBrowseService.dpr);const _=this._canvas.height/this._bufferService.buffer.lines.length,g=Math.round(Math.max(Math.min(_,12),6)*this._coreBrowseService.dpr);c.left=g,c.center=g,c.right=g}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.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._coreBrowseService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowseService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const g of this._decorationService.decorations)this._colorZoneStore.addDecoration(g);this._ctx.lineWidth=1;const _=this._colorZoneStore.zones;for(const g of _)g.position!=="full"&&this._renderColorZone(g);for(const g of _)g.position==="full"&&this._renderColorZone(g);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(_){this._ctx.fillStyle=_.color,this._ctx.fillRect(s[_.position||"full"],Math.round((this._canvas.height-1)*(_.startBufferLine/this._bufferService.buffers.active.lines.length)-c[_.position||"full"]/2),o[_.position||"full"],Math.round((this._canvas.height-1)*((_.endBufferLine-_.startBufferLine)/this._bufferService.buffers.active.lines.length)+c[_.position||"full"]))}_queueRefresh(_,g){this._shouldUpdateDimensions=_||this._shouldUpdateDimensions,this._shouldUpdateAnchor=g||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowseService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};n.OverviewRulerRenderer=l=f([S(2,m.IBufferService),S(3,m.IDecorationService),S(4,C.IRenderService),S(5,m.IOptionsService),S(6,C.ICoreBrowserService)],l)},2950:function(y,n,u){var f=this&&this.__decorate||function(m,c,o,s){var l,_=arguments.length,g=_<3?c:s===null?s=Object.getOwnPropertyDescriptor(c,o):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(m,c,o,s);else for(var E=m.length-1;E>=0;E--)(l=m[E])&&(g=(_<3?l(g):_>3?l(c,o,g):l(c,o))||g);return _>3&&g&&Object.defineProperty(c,o,g),g},S=this&&this.__param||function(m,c){return function(o,s){c(o,s,m)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;const d=u(4725),p=u(2585),C=u(2584);let w=n.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(m,c,o,s,l,_){this._textarea=m,this._compositionView=c,this._bufferService=o,this._optionsService=s,this._coreService=l,this._renderService=_,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(m){this._compositionView.textContent=m.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(m){if(this._isComposing||this._isSendingComposition){if(m.keyCode===229||m.keyCode===16||m.keyCode===17||m.keyCode===18)return!1;this._finalizeComposition(!1)}return m.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(m){if(this._compositionView.classList.remove("active"),this._isComposing=!1,m){const c={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let o;this._isSendingComposition=!1,c.start+=this._dataAlreadySent.length,o=this._isComposing?this._textarea.value.substring(c.start,c.end):this._textarea.value.substring(c.start),o.length>0&&this._coreService.triggerDataEvent(o,!0)}},0)}else{this._isSendingComposition=!1;const c=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(c,!0)}}_handleAnyTextareaChanges(){const m=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const c=this._textarea.value,o=c.replace(m,"");this._dataAlreadySent=o,c.length>m.length?this._coreService.triggerDataEvent(o,!0):c.length<m.length?this._coreService.triggerDataEvent(`${C.C0.DEL}`,!0):c.length===m.length&&c!==m&&this._coreService.triggerDataEvent(c,!0)}},0)}updateCompositionElements(m){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const c=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),o=this._renderService.dimensions.css.cell.height,s=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=c*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=s+"px",this._compositionView.style.height=o+"px",this._compositionView.style.lineHeight=o+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const _=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=s+"px",this._textarea.style.width=Math.max(_.width,1)+"px",this._textarea.style.height=Math.max(_.height,1)+"px",this._textarea.style.lineHeight=_.height+"px"}m||setTimeout(()=>this.updateCompositionElements(!0),0)}}};n.CompositionHelper=w=f([S(2,p.IBufferService),S(3,p.IOptionsService),S(4,p.ICoreService),S(5,d.IRenderService)],w)},9806:(y,n)=>{function u(f,S,d){const p=d.getBoundingClientRect(),C=f.getComputedStyle(d),w=parseInt(C.getPropertyValue("padding-left")),m=parseInt(C.getPropertyValue("padding-top"));return[S.clientX-p.left-w,S.clientY-p.top-m]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=u,n.getCoords=function(f,S,d,p,C,w,m,c,o){if(!w)return;const s=u(f,S,d);return s?(s[0]=Math.ceil((s[0]+(o?m/2:0))/m),s[1]=Math.ceil(s[1]/c),s[0]=Math.min(Math.max(s[0],1),p+(o?1:0)),s[1]=Math.min(Math.max(s[1],1),C),s):void 0}},9504:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;const f=u(2584);function S(c,o,s,l){const _=c-d(c,s),g=o-d(o,s),E=Math.abs(_-g)-function(b,v,k){let R=0;const P=b-d(b,k),A=v-d(v,k);for(let B=0;B<Math.abs(P-A);B++){const I=p(b,v)==="A"?-1:1,z=k.buffer.lines.get(P+I*B);z!=null&&z.isWrapped&&R++}return R}(c,o,s);return m(E,w(p(c,o),l))}function d(c,o){let s=0,l=o.buffer.lines.get(c),_=l==null?void 0:l.isWrapped;for(;_&&c>=0&&c<o.rows;)s++,l=o.buffer.lines.get(--c),_=l==null?void 0:l.isWrapped;return s}function p(c,o){return c>o?"A":"B"}function C(c,o,s,l,_,g){let E=c,b=o,v="";for(;E!==s||b!==l;)E+=_?1:-1,_&&E>g.cols-1?(v+=g.buffer.translateBufferLineToString(b,!1,c,E),E=0,c=0,b++):!_&&E<0&&(v+=g.buffer.translateBufferLineToString(b,!1,0,c+1),E=g.cols-1,c=E,b--);return v+g.buffer.translateBufferLineToString(b,!1,c,E)}function w(c,o){const s=o?"O":"[";return f.C0.ESC+s+c}function m(c,o){c=Math.floor(c);let s="";for(let l=0;l<c;l++)s+=o;return s}n.moveToCellSequence=function(c,o,s,l){const _=s.buffer.x,g=s.buffer.y;if(!s.buffer.hasScrollback)return function(v,k,R,P,A,B){return S(k,P,A,B).length===0?"":m(C(v,k,v,k-d(k,A),!1,A).length,w("D",B))}(_,g,0,o,s,l)+S(g,o,s,l)+function(v,k,R,P,A,B){let I;I=S(k,P,A,B).length>0?P-d(P,A):k;const z=P,U=function(j,x,D,T,M,F){let $;return $=S(D,T,M,F).length>0?T-d(T,M):x,j<D&&$<=T||j>=D&&$<T?"C":"D"}(v,k,R,P,A,B);return m(C(v,I,R,z,U==="C",A).length,w(U,B))}(_,g,c,o,s,l);let E;if(g===o)return E=_>c?"D":"C",m(Math.abs(_-c),w(E,l));E=g>o?"D":"C";const b=Math.abs(g-o);return m(function(v,k){return k.cols-v}(g>o?c:_,s)+(b-1)*s.cols+1+((g>o?_:c)-1),w(E,l))}},1296:function(y,n,u){var f=this&&this.__decorate||function(A,B,I,z){var U,j=arguments.length,x=j<3?B:z===null?z=Object.getOwnPropertyDescriptor(B,I):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(A,B,I,z);else for(var D=A.length-1;D>=0;D--)(U=A[D])&&(x=(j<3?U(x):j>3?U(B,I,x):U(B,I))||x);return j>3&&x&&Object.defineProperty(B,I,x),x},S=this&&this.__param||function(A,B){return function(I,z){B(I,z,A)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const d=u(3787),p=u(2550),C=u(2223),w=u(6171),m=u(4725),c=u(8055),o=u(8460),s=u(844),l=u(2585),_="xterm-dom-renderer-owner-",g="xterm-rows",E="xterm-fg-",b="xterm-bg-",v="xterm-focus",k="xterm-selection";let R=1,P=n.DomRenderer=class extends s.Disposable{constructor(A,B,I,z,U,j,x,D,T,M){super(),this._element=A,this._screenElement=B,this._viewportElement=I,this._linkifier2=z,this._charSizeService=j,this._optionsService=x,this._bufferService=D,this._coreBrowserService=T,this._themeService=M,this._terminalClass=R++,this._rowElements=[],this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=document.createElement("div"),this._rowContainer.classList.add(g),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=document.createElement("div"),this._selectionContainer.classList.add(k),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,w.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(F=>this._injectCss(F))),this._injectCss(this._themeService.colors),this._rowFactory=U.createInstance(d.DomRendererRowFactory,document),this._element.classList.add(_+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(F=>this._handleLinkHover(F))),this.register(this._linkifier2.onHideLinkUnderline(F=>this._handleLinkLeave(F))),this.register((0,s.toDisposable)(()=>{this._element.classList.remove(_+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new p.WidthCache(document),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const A=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*A,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*A),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/A),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/A),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const 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=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const B=`${this._terminalSelector} .${g} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=B,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(A){this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let B=`${this._terminalSelector} .${g} { color: ${A.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;B+=`${this._terminalSelector} .${g} .xterm-dim { color: ${c.color.multiplyOpacity(A.foreground,.5).css};}`,B+=`${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;}`,B+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",B+="@keyframes blink_block_"+this._terminalClass+` { 0% { background-color: ${A.cursor.css}; color: ${A.cursorAccent.css}; } 50% { background-color: inherit; color: ${A.cursor.css}; }}`,B+=`${this._terminalSelector} .${g}.${v} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${g}.${v} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-block { background-color: ${A.cursor.css}; color: ${A.cursorAccent.css};}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${A.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${A.cursor.css} inset;}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${A.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,B+=`${this._terminalSelector} .${k} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${k} div { position: absolute; background-color: ${A.selectionBackgroundOpaque.css};}${this._terminalSelector} .${k} div { position: absolute; background-color: ${A.selectionInactiveBackgroundOpaque.css};}`;for(const[I,z]of A.ansi.entries())B+=`${this._terminalSelector} .${E}${I} { color: ${z.css}; }${this._terminalSelector} .${E}${I}.xterm-dim { color: ${c.color.multiplyOpacity(z,.5).css}; }${this._terminalSelector} .${b}${I} { background-color: ${z.css}; }`;B+=`${this._terminalSelector} .${E}${C.INVERTED_DEFAULT_COLOR} { color: ${c.color.opaque(A.background).css}; }${this._terminalSelector} .${E}${C.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${c.color.multiplyOpacity(c.color.opaque(A.background),.5).css}; }${this._terminalSelector} .${b}${C.INVERTED_DEFAULT_COLOR} { background-color: ${A.foreground.css}; }`,this._themeStyleElement.textContent=B}_setDefaultSpacing(){const A=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${A}px`,this._rowFactory.defaultSpacing=A}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(A,B){for(let I=this._rowElements.length;I<=B;I++){const z=document.createElement("div");this._rowContainer.appendChild(z),this._rowElements.push(z)}for(;this._rowElements.length>B;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(A,B){this._refreshRowElements(A,B),this._updateDimensions()}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(v)}handleFocus(){this._rowContainer.classList.add(v),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(A,B,I){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(A,B,I),this.renderRows(0,this._bufferService.rows-1),!A||!B)return;const z=A[1]-this._bufferService.buffer.ydisp,U=B[1]-this._bufferService.buffer.ydisp,j=Math.max(z,0),x=Math.min(U,this._bufferService.rows-1);if(j>=this._bufferService.rows||x<0)return;const D=document.createDocumentFragment();if(I){const T=A[0]>B[0];D.appendChild(this._createSelectionElement(j,T?B[0]:A[0],T?A[0]:B[0],x-j+1))}else{const T=z===j?A[0]:0,M=j===U?B[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(j,T,M));const F=x-j-1;if(D.appendChild(this._createSelectionElement(j+1,0,this._bufferService.cols,F)),j!==x){const $=U===x?B[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(x,0,$))}}this._selectionContainer.appendChild(D)}_createSelectionElement(A,B,I,z=1){const U=document.createElement("div");return U.style.height=z*this.dimensions.css.cell.height+"px",U.style.top=A*this.dimensions.css.cell.height+"px",U.style.left=B*this.dimensions.css.cell.width+"px",U.style.width=this.dimensions.css.cell.width*(I-B)+"px",U}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const A of this._rowElements)A.replaceChildren()}renderRows(A,B){const I=this._bufferService.buffer,z=I.ybase+I.y,U=Math.min(I.x,this._bufferService.cols-1),j=this._optionsService.rawOptions.cursorBlink,x=this._optionsService.rawOptions.cursorStyle,D=this._optionsService.rawOptions.cursorInactiveStyle;for(let T=A;T<=B;T++){const M=T+I.ydisp,F=this._rowElements[T],$=I.lines.get(M);if(!F||!$)break;F.replaceChildren(...this._rowFactory.createRow($,M,M===z,x,D,U,j,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${_}${this._terminalClass}`}_handleLinkHover(A){this._setCellUnderline(A.x1,A.x2,A.y1,A.y2,A.cols,!0)}_handleLinkLeave(A){this._setCellUnderline(A.x1,A.x2,A.y1,A.y2,A.cols,!1)}_setCellUnderline(A,B,I,z,U,j){I<0&&(A=0),z<0&&(B=0);const x=this._bufferService.rows-1;I=Math.max(Math.min(I,x),0),z=Math.max(Math.min(z,x),0),U=Math.min(U,this._bufferService.cols);const D=this._bufferService.buffer,T=D.ybase+D.y,M=Math.min(D.x,U-1),F=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,G=this._optionsService.rawOptions.cursorInactiveStyle;for(let X=I;X<=z;++X){const ee=X+D.ydisp,L=this._rowElements[X],O=D.lines.get(ee);if(!L||!O)break;L.replaceChildren(...this._rowFactory.createRow(O,ee,ee===T,$,G,M,F,this.dimensions.css.cell.width,this._widthCache,j?X===I?A:0:-1,j?(X===z?B:U)-1:-1))}}};n.DomRenderer=P=f([S(4,l.IInstantiationService),S(5,m.ICharSizeService),S(6,l.IOptionsService),S(7,l.IBufferService),S(8,m.ICoreBrowserService),S(9,m.IThemeService)],P)},3787:function(y,n,u){var f=this&&this.__decorate||function(E,b,v,k){var R,P=arguments.length,A=P<3?b:k===null?k=Object.getOwnPropertyDescriptor(b,v):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(E,b,v,k);else for(var B=E.length-1;B>=0;B--)(R=E[B])&&(A=(P<3?R(A):P>3?R(b,v,A):R(b,v))||A);return P>3&&A&&Object.defineProperty(b,v,A),A},S=this&&this.__param||function(E,b){return function(v,k){b(v,k,E)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=void 0;const d=u(2223),p=u(643),C=u(511),w=u(2585),m=u(8055),c=u(4725),o=u(4269),s=u(6171),l=u(3734);let _=n.DomRendererRowFactory=class{constructor(E,b,v,k,R,P,A){this._document=E,this._characterJoinerService=b,this._optionsService=v,this._coreBrowserService=k,this._coreService=R,this._decorationService=P,this._themeService=A,this._workCell=new C.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(E,b,v){this._selectionStart=E,this._selectionEnd=b,this._columnSelectMode=v}createRow(E,b,v,k,R,P,A,B,I,z,U){const j=[],x=this._characterJoinerService.getJoinedCharacters(b),D=this._themeService.colors;let T,M=E.getNoBgTrimmedLength();v&&M<P+1&&(M=P+1);let F=0,$="",G=0,X=0,ee=0,L=!1,O=0,N=!1,H=0;const Q=[],V=z!==-1&&U!==-1;for(let te=0;te<M;te++){E.loadCell(te,this._workCell);let me=this._workCell.getWidth();if(me===0)continue;let Te=!1,tr=te,Y=this._workCell;if(x.length>0&&te===x[0][0]){Te=!0;const le=x.shift();Y=new o.JoinedCellData(this._workCell,E.translateToString(!0,le[0],le[1]),le[1]-le[0]),tr=le[1]-1,me=Y.getWidth()}const Pr=this._isCellInSelection(te,b),Xs=v&&te===P,Gs=V&&te>=z&&te<=U;let Qs=!1;this._decorationService.forEachDecorationAtCell(te,b,void 0,le=>{Qs=!0});let Li=Y.getChars()||p.WHITESPACE_CELL_CHAR;if(Li===" "&&(Y.isUnderline()||Y.isOverline())&&(Li=" "),H=me*B-I.get(Li,Y.isBold(),Y.isItalic()),T){if(F&&(Pr&&N||!Pr&&!N&&Y.bg===G)&&(Pr&&N&&D.selectionForeground||Y.fg===X)&&Y.extended.ext===ee&&Gs===L&&H===O&&!Xs&&!Te&&!Qs){$+=Li,F++;continue}F&&(T.textContent=$),T=this._document.createElement("span"),F=0,$=""}else T=this._document.createElement("span");if(G=Y.bg,X=Y.fg,ee=Y.extended.ext,L=Gs,O=H,N=Pr,Te&&P>=te&&P<=tr&&(P=te),!this._coreService.isCursorHidden&&Xs){if(Q.push("xterm-cursor"),this._coreBrowserService.isFocused)A&&Q.push("xterm-cursor-blink"),Q.push(k==="bar"?"xterm-cursor-bar":k==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(R)switch(R){case"outline":Q.push("xterm-cursor-outline");break;case"block":Q.push("xterm-cursor-block");break;case"bar":Q.push("xterm-cursor-bar");break;case"underline":Q.push("xterm-cursor-underline")}}if(Y.isBold()&&Q.push("xterm-bold"),Y.isItalic()&&Q.push("xterm-italic"),Y.isDim()&&Q.push("xterm-dim"),$=Y.isInvisible()?p.WHITESPACE_CELL_CHAR:Y.getChars()||p.WHITESPACE_CELL_CHAR,Y.isUnderline()&&(Q.push(`xterm-underline-${Y.extended.underlineStyle}`),$===" "&&($=" "),!Y.isUnderlineColorDefault()))if(Y.isUnderlineColorRGB())T.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(Y.getUnderlineColor()).join(",")})`;else{let le=Y.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Y.isBold()&&le<8&&(le+=8),T.style.textDecorationColor=D.ansi[le].css}Y.isOverline()&&(Q.push("xterm-overline"),$===" "&&($=" ")),Y.isStrikethrough()&&Q.push("xterm-strikethrough"),Gs&&(T.style.textDecoration="underline");let Ue=Y.getFgColor(),Mr=Y.getFgColorMode(),rt=Y.getBgColor(),Br=Y.getBgColorMode();const Ys=!!Y.isInverse();if(Ys){const le=Ue;Ue=rt,rt=le;const Qu=Mr;Mr=Br,Br=Qu}let St,Js,yt,Or=!1;switch(this._decorationService.forEachDecorationAtCell(te,b,void 0,le=>{le.options.layer!=="top"&&Or||(le.backgroundColorRGB&&(Br=50331648,rt=le.backgroundColorRGB.rgba>>8&16777215,St=le.backgroundColorRGB),le.foregroundColorRGB&&(Mr=50331648,Ue=le.foregroundColorRGB.rgba>>8&16777215,Js=le.foregroundColorRGB),Or=le.options.layer==="top")}),!Or&&Pr&&(St=this._coreBrowserService.isFocused?D.selectionBackgroundOpaque:D.selectionInactiveBackgroundOpaque,rt=St.rgba>>8&16777215,Br=50331648,Or=!0,D.selectionForeground&&(Mr=50331648,Ue=D.selectionForeground.rgba>>8&16777215,Js=D.selectionForeground)),Or&&Q.push("xterm-decoration-top"),Br){case 16777216:case 33554432:yt=D.ansi[rt],Q.push(`xterm-bg-${rt}`);break;case 50331648:yt=m.rgba.toColor(rt>>16,rt>>8&255,255&rt),this._addStyle(T,`background-color:#${g((rt>>>0).toString(16),"0",6)}`);break;default:Ys?(yt=D.foreground,Q.push(`xterm-bg-${d.INVERTED_DEFAULT_COLOR}`)):yt=D.background}switch(St||Y.isDim()&&(St=m.color.multiplyOpacity(yt,.5)),Mr){case 16777216:case 33554432:Y.isBold()&&Ue<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ue+=8),this._applyMinimumContrast(T,yt,D.ansi[Ue],Y,St,void 0)||Q.push(`xterm-fg-${Ue}`);break;case 50331648:const le=m.rgba.toColor(Ue>>16&255,Ue>>8&255,255&Ue);this._applyMinimumContrast(T,yt,le,Y,St,Js)||this._addStyle(T,`color:#${g(Ue.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(T,yt,D.foreground,Y,St,void 0)||Ys&&Q.push(`xterm-fg-${d.INVERTED_DEFAULT_COLOR}`)}Q.length&&(T.className=Q.join(" "),Q.length=0),Xs||Te||Qs?T.textContent=$:F++,H!==this.defaultSpacing&&(T.style.letterSpacing=`${H}px`),j.push(T),te=tr}return T&&F&&(T.textContent=$),j}_applyMinimumContrast(E,b,v,k,R,P){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,s.excludeFromContrastRatioDemands)(k.getCode()))return!1;const A=this._getContrastCache(k);let B;if(R||P||(B=A.getColor(b.rgba,v.rgba)),B===void 0){const I=this._optionsService.rawOptions.minimumContrastRatio/(k.isDim()?2:1);B=m.color.ensureContrastRatio(R||b,P||v,I),A.setColor((R||b).rgba,(P||v).rgba,B??null)}return!!B&&(this._addStyle(E,`color:${B.css}`),!0)}_getContrastCache(E){return E.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(E,b){E.setAttribute("style",`${E.getAttribute("style")||""}${b};`)}_isCellInSelection(E,b){const v=this._selectionStart,k=this._selectionEnd;return!(!v||!k)&&(this._columnSelectMode?v[0]<=k[0]?E>=v[0]&&b>=v[1]&&E<k[0]&&b<=k[1]:E<v[0]&&b>=v[1]&&E>=k[0]&&b<=k[1]:b>v[1]&&b<k[1]||v[1]===k[1]&&b===v[1]&&E>=v[0]&&E<k[0]||v[1]<k[1]&&b===k[1]&&E<k[0]||v[1]<k[1]&&b===v[1]&&E>=v[0])}};function g(E,b,v){for(;E.length<v;)E=b+E;return E}n.DomRendererRowFactory=_=f([S(1,c.ICharacterJoinerService),S(2,w.IOptionsService),S(3,c.ICoreBrowserService),S(4,w.ICoreService),S(5,w.IDecorationService),S(6,c.IThemeService)],_)},2550:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WidthCache=void 0,n.WidthCache=class{constructor(u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.createElement("div"),this._container.style.position="absolute",this._container.style.top="-50000px",this._container.style.width="50000px",this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const f=u.createElement("span"),S=u.createElement("span");S.style.fontWeight="bold";const d=u.createElement("span");d.style.fontStyle="italic";const p=u.createElement("span");p.style.fontWeight="bold",p.style.fontStyle="italic",this._measureElements=[f,S,d,p],this._container.appendChild(f),this._container.appendChild(S),this._container.appendChild(d),this._container.appendChild(p),u.body.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(u,f,S,d){u===this._font&&f===this._fontSize&&S===this._weight&&d===this._weightBold||(this._font=u,this._fontSize=f,this._weight=S,this._weightBold=d,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${S}`,this._measureElements[1].style.fontWeight=`${d}`,this._measureElements[2].style.fontWeight=`${S}`,this._measureElements[3].style.fontWeight=`${d}`,this.clear())}get(u,f,S){let d=0;if(!f&&!S&&u.length===1&&(d=u.charCodeAt(0))<256)return this._flat[d]!==-9999?this._flat[d]:this._flat[d]=this._measure(u,0);let p=u;f&&(p+="B"),S&&(p+="I");let C=this._holey.get(p);if(C===void 0){let w=0;f&&(w|=1),S&&(w|=2),C=this._measure(u,w),this._holey.set(p,C)}return C}_measure(u,f){const S=this._measureElements[f];return S.textContent=u.repeat(32),S.offsetWidth/32}}},2223:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const f=u(6114);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(y,n)=>{function u(f){return 57508<=f&&f<=57558}Object.defineProperty(n,"__esModule",{value:!0}),n.createRenderDimensions=n.excludeFromContrastRatioDemands=n.isRestrictedPowerlineGlyph=n.isPowerlineGlyph=n.throwIfFalsy=void 0,n.throwIfFalsy=function(f){if(!f)throw new Error("value must not be falsy");return f},n.isPowerlineGlyph=u,n.isRestrictedPowerlineGlyph=function(f){return 57520<=f&&f<=57527},n.excludeFromContrastRatioDemands=function(f){return u(f)||function(S){return 9472<=S&&S<=9631}(f)},n.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}}},456:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0,n.SelectionModel=class{constructor(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,f=this.selectionEnd;return!(!u||!f)&&(u[1]>f[1]||u[1]===f[1]&&u[0]>f[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(y,n,u){var f=this&&this.__decorate||function(c,o,s,l){var _,g=arguments.length,E=g<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,s):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,o,s,l);else for(var b=c.length-1;b>=0;b--)(_=c[b])&&(E=(g<3?_(E):g>3?_(o,s,E):_(o,s))||E);return g>3&&E&&Object.defineProperty(o,s,E),E},S=this&&this.__param||function(c,o){return function(s,l){o(s,l,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;const d=u(2585),p=u(8460),C=u(844);let w=n.CharSizeService=class extends C.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(c,o,s){super(),this._optionsService=s,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event,this._measureStrategy=new m(c,o,this._optionsService),this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const c=this._measureStrategy.measure();c.width===this.width&&c.height===this.height||(this.width=c.width,this.height=c.height,this._onCharSizeChange.fire())}};n.CharSizeService=w=f([S(2,d.IOptionsService)],w);class m{constructor(o,s,l){this._document=o,this._parentElement=s,this._optionsService=l,this._result={width:0,height:0},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(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`;const o={height:Number(this._measureElement.offsetHeight),width:Number(this._measureElement.offsetWidth)};return o.width!==0&&o.height!==0&&(this._result.width=o.width/32,this._result.height=Math.ceil(o.height)),this._result}}},4269:function(y,n,u){var f=this&&this.__decorate||function(o,s,l,_){var g,E=arguments.length,b=E<3?s:_===null?_=Object.getOwnPropertyDescriptor(s,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(o,s,l,_);else for(var v=o.length-1;v>=0;v--)(g=o[v])&&(b=(E<3?g(b):E>3?g(s,l,b):g(s,l))||b);return E>3&&b&&Object.defineProperty(s,l,b),b},S=this&&this.__param||function(o,s){return function(l,_){s(l,_,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const d=u(3734),p=u(643),C=u(511),w=u(2585);class m extends d.AttributeData{constructor(s,l,_){super(),this.content=0,this.combinedData="",this.fg=s.fg,this.bg=s.bg,this.combinedData=l,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(s){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=m;let c=n.CharacterJoinerService=class Gu{constructor(s){this._bufferService=s,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new C.CellData}register(s){const l={id:this._nextCharacterJoinerId++,handler:s};return this._characterJoiners.push(l),l.id}deregister(s){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===s)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(s){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(s);if(!l||l.length===0)return[];const _=[],g=l.translateToString(!0);let E=0,b=0,v=0,k=l.getFg(0),R=l.getBg(0);for(let P=0;P<l.getTrimmedLength();P++)if(l.loadCell(P,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==k||this._workCell.bg!==R){if(P-E>1){const A=this._getJoinedRanges(g,v,b,l,E);for(let B=0;B<A.length;B++)_.push(A[B])}E=P,v=b,k=this._workCell.fg,R=this._workCell.bg}b+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-E>1){const P=this._getJoinedRanges(g,v,b,l,E);for(let A=0;A<P.length;A++)_.push(P[A])}return _}_getJoinedRanges(s,l,_,g,E){const b=s.substring(l,_);let v=[];try{v=this._characterJoiners[0].handler(b)}catch(k){console.error(k)}for(let k=1;k<this._characterJoiners.length;k++)try{const R=this._characterJoiners[k].handler(b);for(let P=0;P<R.length;P++)Gu._mergeRanges(v,R[P])}catch(R){console.error(R)}return this._stringRangesToCellRanges(v,g,E),v}_stringRangesToCellRanges(s,l,_){let g=0,E=!1,b=0,v=s[g];if(v){for(let k=_;k<this._bufferService.cols;k++){const R=l.getWidth(k),P=l.getString(k).length||p.WHITESPACE_CELL_CHAR.length;if(R!==0){if(!E&&v[0]<=b&&(v[0]=k,E=!0),v[1]<=b){if(v[1]=k,v=s[++g],!v)break;v[0]<=b?(v[0]=k,E=!0):E=!1}b+=P}}v&&(v[1]=this._bufferService.cols)}}static _mergeRanges(s,l){let _=!1;for(let g=0;g<s.length;g++){const E=s[g];if(_){if(l[1]<=E[0])return s[g-1][1]=l[1],s;if(l[1]<=E[1])return s[g-1][1]=Math.max(l[1],E[1]),s.splice(g,1),s;s.splice(g,1),g--}else{if(l[1]<=E[0])return s.splice(g,0,l),s;if(l[1]<=E[1])return E[0]=Math.min(l[0],E[0]),s;l[0]<E[1]&&(E[0]=Math.min(l[0],E[0]),_=!0)}}return _?s[s.length-1][1]=l[1]:s.push(l),s}};n.CharacterJoinerService=c=f([S(0,w.IBufferService)],c)},5114:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0,n.CoreBrowserService=class{constructor(u,f){this._textarea=u,this.window=f,this._isFocused=!1,this._cachedIsFocused=void 0,this._textarea.addEventListener("focus",()=>this._isFocused=!0),this._textarea.addEventListener("blur",()=>this._isFocused=!1)}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}}},8934:function(y,n,u){var f=this&&this.__decorate||function(w,m,c,o){var s,l=arguments.length,_=l<3?m:o===null?o=Object.getOwnPropertyDescriptor(m,c):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(w,m,c,o);else for(var g=w.length-1;g>=0;g--)(s=w[g])&&(_=(l<3?s(_):l>3?s(m,c,_):s(m,c))||_);return l>3&&_&&Object.defineProperty(m,c,_),_},S=this&&this.__param||function(w,m){return function(c,o){m(c,o,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;const d=u(4725),p=u(9806);let C=n.MouseService=class{constructor(w,m){this._renderService=w,this._charSizeService=m}getCoords(w,m,c,o,s){return(0,p.getCoords)(window,w,m,c,o,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,s)}getMouseReportCoords(w,m){const c=(0,p.getCoordsRelativeToElement)(window,w,m);if(this._charSizeService.hasValidSize)return c[0]=Math.min(Math.max(c[0],0),this._renderService.dimensions.css.canvas.width-1),c[1]=Math.min(Math.max(c[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(c[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(c[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(c[0]),y:Math.floor(c[1])}}};n.MouseService=C=f([S(0,d.IRenderService),S(1,d.ICharSizeService)],C)},3230:function(y,n,u){var f=this&&this.__decorate||function(_,g,E,b){var v,k=arguments.length,R=k<3?g:b===null?b=Object.getOwnPropertyDescriptor(g,E):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,g,E,b);else for(var P=_.length-1;P>=0;P--)(v=_[P])&&(R=(k<3?v(R):k>3?v(g,E,R):v(g,E))||R);return k>3&&R&&Object.defineProperty(g,E,R),R},S=this&&this.__param||function(_,g){return function(E,b){g(E,b,_)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;const d=u(3656),p=u(6193),C=u(5596),w=u(4725),m=u(8460),c=u(844),o=u(7226),s=u(2585);let l=n.RenderService=class extends c.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(_,g,E,b,v,k,R,P){if(super(),this._rowCount=_,this._charSizeService=b,this._renderer=this.register(new c.MutableDisposable),this._pausedResizeTask=new o.DebouncedIdleTask,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 m.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new m.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new m.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new m.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new p.RenderDebouncer(R.window,(A,B)=>this._renderRows(A,B)),this.register(this._renderDebouncer),this._screenDprMonitor=new C.ScreenDprMonitor(R.window),this._screenDprMonitor.setListener(()=>this.handleDevicePixelRatioChange()),this.register(this._screenDprMonitor),this.register(k.onResize(()=>this._fullRefresh())),this.register(k.buffers.onBufferActivate(()=>{var A;return(A=this._renderer.value)===null||A===void 0?void 0:A.clear()})),this.register(E.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(v.onDecorationRegistered(()=>this._fullRefresh())),this.register(v.onDecorationRemoved(()=>this._fullRefresh())),this.register(E.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio"],()=>{this.clear(),this.handleResize(k.cols,k.rows),this._fullRefresh()})),this.register(E.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(k.buffer.y,k.buffer.y,!0))),this.register((0,d.addDisposableDomListener)(R.window,"resize",()=>this.handleDevicePixelRatioChange())),this.register(P.onChangeColors(()=>this._fullRefresh())),"IntersectionObserver"in R.window){const A=new R.window.IntersectionObserver(B=>this._handleIntersectionChange(B[B.length-1]),{threshold:0});A.observe(g),this.register({dispose:()=>A.disconnect()})}}_handleIntersectionChange(_){this._isPaused=_.isIntersecting===void 0?_.intersectionRatio===0:!_.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(_,g,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(_,g,this._rowCount))}_renderRows(_,g){this._renderer.value&&(_=Math.min(_,this._rowCount-1),g=Math.min(g,this._rowCount-1),this._renderer.value.renderRows(_,g),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:_,end:g}),this._onRender.fire({start:_,end:g}),this._isNextRenderRedrawOnly=!0)}resize(_,g){this._rowCount=g,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(_){this._renderer.value=_,this._renderer.value.onRequestRedraw(g=>this.refreshRows(g.start,g.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh()}addRefreshCallback(_){return this._renderDebouncer.addRefreshCallback(_)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var _,g;this._renderer.value&&((g=(_=this._renderer.value).clearTextureAtlas)===null||g===void 0||g.call(_),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(_,g){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value.handleResize(_,g)):this._renderer.value.handleResize(_,g),this._fullRefresh())}handleCharSizeChanged(){var _;(_=this._renderer.value)===null||_===void 0||_.handleCharSizeChanged()}handleBlur(){var _;(_=this._renderer.value)===null||_===void 0||_.handleBlur()}handleFocus(){var _;(_=this._renderer.value)===null||_===void 0||_.handleFocus()}handleSelectionChanged(_,g,E){var b;this._selectionState.start=_,this._selectionState.end=g,this._selectionState.columnSelectMode=E,(b=this._renderer.value)===null||b===void 0||b.handleSelectionChanged(_,g,E)}handleCursorMove(){var _;(_=this._renderer.value)===null||_===void 0||_.handleCursorMove()}clear(){var _;(_=this._renderer.value)===null||_===void 0||_.clear()}};n.RenderService=l=f([S(2,s.IOptionsService),S(3,w.ICharSizeService),S(4,s.IDecorationService),S(5,s.IBufferService),S(6,w.ICoreBrowserService),S(7,w.IThemeService)],l)},9312:function(y,n,u){var f=this&&this.__decorate||function(v,k,R,P){var A,B=arguments.length,I=B<3?k:P===null?P=Object.getOwnPropertyDescriptor(k,R):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(v,k,R,P);else for(var z=v.length-1;z>=0;z--)(A=v[z])&&(I=(B<3?A(I):B>3?A(k,R,I):A(k,R))||I);return B>3&&I&&Object.defineProperty(k,R,I),I},S=this&&this.__param||function(v,k){return function(R,P){k(R,P,v)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;const d=u(9806),p=u(9504),C=u(456),w=u(4725),m=u(8460),c=u(844),o=u(6114),s=u(4841),l=u(511),_=u(2585),g=" ",E=new RegExp(g,"g");let b=n.SelectionService=class extends c.Disposable{constructor(v,k,R,P,A,B,I,z,U){super(),this._element=v,this._screenElement=k,this._linkifier=R,this._bufferService=P,this._coreService=A,this._mouseService=B,this._optionsService=I,this._renderService=z,this._coreBrowserService=U,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new m.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new m.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new m.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new m.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=j=>this._handleMouseMove(j),this._mouseUpListener=j=>this._handleMouseUp(j),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(j=>this._handleTrim(j)),this.register(this._bufferService.buffers.onBufferActivate(j=>this._handleBufferActivate(j))),this.enable(),this._model=new C.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,c.toDisposable)(()=>{this._removeMouseDownListeners()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const v=this._model.finalSelectionStart,k=this._model.finalSelectionEnd;return!(!v||!k||v[0]===k[0]&&v[1]===k[1])}get selectionText(){const v=this._model.finalSelectionStart,k=this._model.finalSelectionEnd;if(!v||!k)return"";const R=this._bufferService.buffer,P=[];if(this._activeSelectionMode===3){if(v[0]===k[0])return"";const A=v[0]<k[0]?v[0]:k[0],B=v[0]<k[0]?k[0]:v[0];for(let I=v[1];I<=k[1];I++){const z=R.translateBufferLineToString(I,!0,A,B);P.push(z)}}else{const A=v[1]===k[1]?k[0]:void 0;P.push(R.translateBufferLineToString(v[1],!0,v[0],A));for(let B=v[1]+1;B<=k[1]-1;B++){const I=R.lines.get(B),z=R.translateBufferLineToString(B,!0);I!=null&&I.isWrapped?P[P.length-1]+=z:P.push(z)}if(v[1]!==k[1]){const B=R.lines.get(k[1]),I=R.translateBufferLineToString(k[1],!0,0,k[0]);B&&B.isWrapped?P[P.length-1]+=I:P.push(I)}}return P.map(A=>A.replace(E," ")).join(o.isWindows?`\r
|
||
`:`
|
||
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(v){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),o.isLinux&&v&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(v){const k=this._getMouseBufferCoords(v),R=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!!(R&&P&&k)&&this._areCoordsInSelection(k,R,P)}isCellInSelection(v,k){const R=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!(!R||!P)&&this._areCoordsInSelection([v,k],R,P)}_areCoordsInSelection(v,k,R){return v[1]>k[1]&&v[1]<R[1]||k[1]===R[1]&&v[1]===k[1]&&v[0]>=k[0]&&v[0]<R[0]||k[1]<R[1]&&v[1]===R[1]&&v[0]<R[0]||k[1]<R[1]&&v[1]===k[1]&&v[0]>=k[0]}_selectWordAtCursor(v,k){var R,P;const A=(P=(R=this._linkifier.currentLink)===null||R===void 0?void 0:R.link)===null||P===void 0?void 0:P.range;if(A)return this._model.selectionStart=[A.start.x-1,A.start.y-1],this._model.selectionStartLength=(0,s.getRangeLength)(A,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const B=this._getMouseBufferCoords(v);return!!B&&(this._selectWordAt(B,k),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(v,k){this._model.clearSelection(),v=Math.max(v,0),k=Math.min(k,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,v],this._model.selectionEnd=[this._bufferService.cols,k],this.refresh(),this._onSelectionChange.fire()}_handleTrim(v){this._model.handleTrim(v)&&this.refresh()}_getMouseBufferCoords(v){const k=this._mouseService.getCoords(v,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(k)return k[0]--,k[1]--,k[1]+=this._bufferService.buffer.ydisp,k}_getMouseEventScrollAmount(v){let k=(0,d.getCoordsRelativeToElement)(this._coreBrowserService.window,v,this._screenElement)[1];const R=this._renderService.dimensions.css.canvas.height;return k>=0&&k<=R?0:(k>R&&(k-=R),k=Math.min(Math.max(k,-50),50),k/=50,k/Math.abs(k)+Math.round(14*k))}shouldForceSelection(v){return o.isMac?v.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:v.shiftKey}handleMouseDown(v){if(this._mouseDownTimeStamp=v.timeStamp,(v.button!==2||!this.hasSelection)&&v.button===0){if(!this._enabled){if(!this.shouldForceSelection(v))return;v.stopPropagation()}v.preventDefault(),this._dragScrollAmount=0,this._enabled&&v.shiftKey?this._handleIncrementalClick(v):v.detail===1?this._handleSingleClick(v):v.detail===2?this._handleDoubleClick(v):v.detail===3&&this._handleTripleClick(v),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(v){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(v))}_handleSingleClick(v){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(v)?3:0,this._model.selectionStart=this._getMouseBufferCoords(v),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const k=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);k&&k.length!==this._model.selectionStart[0]&&k.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(v){this._selectWordAtCursor(v,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(v){const k=this._getMouseBufferCoords(v);k&&(this._activeSelectionMode=2,this._selectLineAt(k[1]))}shouldColumnSelect(v){return v.altKey&&!(o.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(v){if(v.stopImmediatePropagation(),!this._model.selectionStart)return;const k=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(v),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(v),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const R=this._bufferService.buffer;if(this._model.selectionEnd[1]<R.lines.length){const P=R.lines.get(this._model.selectionEnd[1]);P&&P.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}k&&k[0]===this._model.selectionEnd[0]&&k[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const v=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(v.ydisp+this._bufferService.rows,v.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=v.ydisp),this.refresh()}}_handleMouseUp(v){const k=v.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&k<500&&v.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const R=this._mouseService.getCoords(v,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(R&&R[0]!==void 0&&R[1]!==void 0){const P=(0,p.moveToCellSequence)(R[0]-1,R[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(P,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const v=this._model.finalSelectionStart,k=this._model.finalSelectionEnd,R=!(!v||!k||v[0]===k[0]&&v[1]===k[1]);R?v&&k&&(this._oldSelectionStart&&this._oldSelectionEnd&&v[0]===this._oldSelectionStart[0]&&v[1]===this._oldSelectionStart[1]&&k[0]===this._oldSelectionEnd[0]&&k[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(v,k,R)):this._oldHasSelection&&this._fireOnSelectionChange(v,k,R)}_fireOnSelectionChange(v,k,R){this._oldSelectionStart=v,this._oldSelectionEnd=k,this._oldHasSelection=R,this._onSelectionChange.fire()}_handleBufferActivate(v){this.clearSelection(),this._trimListener.dispose(),this._trimListener=v.activeBuffer.lines.onTrim(k=>this._handleTrim(k))}_convertViewportColToCharacterIndex(v,k){let R=k;for(let P=0;k>=P;P++){const A=v.loadCell(P,this._workCell).getChars().length;this._workCell.getWidth()===0?R--:A>1&&k!==P&&(R+=A-1)}return R}setSelection(v,k,R){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[v,k],this._model.selectionStartLength=R,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(v){this._isClickInSelection(v)||(this._selectWordAtCursor(v,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(v,k,R=!0,P=!0){if(v[0]>=this._bufferService.cols)return;const A=this._bufferService.buffer,B=A.lines.get(v[1]);if(!B)return;const I=A.translateBufferLineToString(v[1],!1);let z=this._convertViewportColToCharacterIndex(B,v[0]),U=z;const j=v[0]-z;let x=0,D=0,T=0,M=0;if(I.charAt(z)===" "){for(;z>0&&I.charAt(z-1)===" ";)z--;for(;U<I.length&&I.charAt(U+1)===" ";)U++}else{let G=v[0],X=v[0];B.getWidth(G)===0&&(x++,G--),B.getWidth(X)===2&&(D++,X++);const ee=B.getString(X).length;for(ee>1&&(M+=ee-1,U+=ee-1);G>0&&z>0&&!this._isCharWordSeparator(B.loadCell(G-1,this._workCell));){B.loadCell(G-1,this._workCell);const L=this._workCell.getChars().length;this._workCell.getWidth()===0?(x++,G--):L>1&&(T+=L-1,z-=L-1),z--,G--}for(;X<B.length&&U+1<I.length&&!this._isCharWordSeparator(B.loadCell(X+1,this._workCell));){B.loadCell(X+1,this._workCell);const L=this._workCell.getChars().length;this._workCell.getWidth()===2?(D++,X++):L>1&&(M+=L-1,U+=L-1),U++,X++}}U++;let F=z+j-x+T,$=Math.min(this._bufferService.cols,U-z+x+D-T-M);if(k||I.slice(z,U).trim()!==""){if(R&&F===0&&B.getCodePoint(0)!==32){const G=A.lines.get(v[1]-1);if(G&&B.isWrapped&&G.getCodePoint(this._bufferService.cols-1)!==32){const X=this._getWordAt([this._bufferService.cols-1,v[1]-1],!1,!0,!1);if(X){const ee=this._bufferService.cols-X.start;F-=ee,$+=ee}}}if(P&&F+$===this._bufferService.cols&&B.getCodePoint(this._bufferService.cols-1)!==32){const G=A.lines.get(v[1]+1);if(G!=null&&G.isWrapped&&G.getCodePoint(0)!==32){const X=this._getWordAt([0,v[1]+1],!1,!1,!0);X&&($+=X.length)}}return{start:F,length:$}}}_selectWordAt(v,k){const R=this._getWordAt(v,k);if(R){for(;R.start<0;)R.start+=this._bufferService.cols,v[1]--;this._model.selectionStart=[R.start,v[1]],this._model.selectionStartLength=R.length}}_selectToWordAt(v){const k=this._getWordAt(v,!0);if(k){let R=v[1];for(;k.start<0;)k.start+=this._bufferService.cols,R--;if(!this._model.areSelectionValuesReversed())for(;k.start+k.length>this._bufferService.cols;)k.length-=this._bufferService.cols,R++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?k.start:k.start+k.length,R]}}_isCharWordSeparator(v){return v.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(v.getChars())>=0}_selectLineAt(v){const k=this._bufferService.buffer.getWrappedRangeForLine(v),R={start:{x:0,y:k.first},end:{x:this._bufferService.cols-1,y:k.last}};this._model.selectionStart=[0,k.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,s.getRangeLength)(R,this._bufferService.cols)}};n.SelectionService=b=f([S(3,_.IBufferService),S(4,_.ICoreService),S(5,w.IMouseService),S(6,_.IOptionsService),S(7,w.IRenderService),S(8,w.ICoreBrowserService)],b)},4725:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IThemeService=n.ICharacterJoinerService=n.ISelectionService=n.IRenderService=n.IMouseService=n.ICoreBrowserService=n.ICharSizeService=void 0;const f=u(8343);n.ICharSizeService=(0,f.createDecorator)("CharSizeService"),n.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),n.IMouseService=(0,f.createDecorator)("MouseService"),n.IRenderService=(0,f.createDecorator)("RenderService"),n.ISelectionService=(0,f.createDecorator)("SelectionService"),n.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),n.IThemeService=(0,f.createDecorator)("ThemeService")},6731:function(y,n,u){var f=this&&this.__decorate||function(b,v,k,R){var P,A=arguments.length,B=A<3?v:R===null?R=Object.getOwnPropertyDescriptor(v,k):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(b,v,k,R);else for(var I=b.length-1;I>=0;I--)(P=b[I])&&(B=(A<3?P(B):A>3?P(v,k,B):P(v,k))||B);return A>3&&B&&Object.defineProperty(v,k,B),B},S=this&&this.__param||function(b,v){return function(k,R){v(k,R,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeService=n.DEFAULT_ANSI_COLORS=void 0;const d=u(7239),p=u(8055),C=u(8460),w=u(844),m=u(2585),c=p.css.toColor("#ffffff"),o=p.css.toColor("#000000"),s=p.css.toColor("#ffffff"),l=p.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const b=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],v=[0,95,135,175,215,255];for(let k=0;k<216;k++){const R=v[k/36%6|0],P=v[k/6%6|0],A=v[k%6];b.push({css:p.channels.toCss(R,P,A),rgba:p.channels.toRgba(R,P,A)})}for(let k=0;k<24;k++){const R=8+10*k;b.push({css:p.channels.toCss(R,R,R),rgba:p.channels.toRgba(R,R,R)})}return b})());let g=n.ThemeService=class extends w.Disposable{get colors(){return this._colors}constructor(b){super(),this._optionsService=b,this._contrastCache=new d.ColorContrastCache,this._halfContrastCache=new d.ColorContrastCache,this._onChangeColors=this.register(new C.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:c,background:o,cursor:s,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:p.color.blend(o,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:p.color.blend(o,_),ansi:n.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(b={}){const v=this._colors;if(v.foreground=E(b.foreground,c),v.background=E(b.background,o),v.cursor=E(b.cursor,s),v.cursorAccent=E(b.cursorAccent,l),v.selectionBackgroundTransparent=E(b.selectionBackground,_),v.selectionBackgroundOpaque=p.color.blend(v.background,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundTransparent=E(b.selectionInactiveBackground,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundOpaque=p.color.blend(v.background,v.selectionInactiveBackgroundTransparent),v.selectionForeground=b.selectionForeground?E(b.selectionForeground,p.NULL_COLOR):void 0,v.selectionForeground===p.NULL_COLOR&&(v.selectionForeground=void 0),p.color.isOpaque(v.selectionBackgroundTransparent)&&(v.selectionBackgroundTransparent=p.color.opacity(v.selectionBackgroundTransparent,.3)),p.color.isOpaque(v.selectionInactiveBackgroundTransparent)&&(v.selectionInactiveBackgroundTransparent=p.color.opacity(v.selectionInactiveBackgroundTransparent,.3)),v.ansi=n.DEFAULT_ANSI_COLORS.slice(),v.ansi[0]=E(b.black,n.DEFAULT_ANSI_COLORS[0]),v.ansi[1]=E(b.red,n.DEFAULT_ANSI_COLORS[1]),v.ansi[2]=E(b.green,n.DEFAULT_ANSI_COLORS[2]),v.ansi[3]=E(b.yellow,n.DEFAULT_ANSI_COLORS[3]),v.ansi[4]=E(b.blue,n.DEFAULT_ANSI_COLORS[4]),v.ansi[5]=E(b.magenta,n.DEFAULT_ANSI_COLORS[5]),v.ansi[6]=E(b.cyan,n.DEFAULT_ANSI_COLORS[6]),v.ansi[7]=E(b.white,n.DEFAULT_ANSI_COLORS[7]),v.ansi[8]=E(b.brightBlack,n.DEFAULT_ANSI_COLORS[8]),v.ansi[9]=E(b.brightRed,n.DEFAULT_ANSI_COLORS[9]),v.ansi[10]=E(b.brightGreen,n.DEFAULT_ANSI_COLORS[10]),v.ansi[11]=E(b.brightYellow,n.DEFAULT_ANSI_COLORS[11]),v.ansi[12]=E(b.brightBlue,n.DEFAULT_ANSI_COLORS[12]),v.ansi[13]=E(b.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),v.ansi[14]=E(b.brightCyan,n.DEFAULT_ANSI_COLORS[14]),v.ansi[15]=E(b.brightWhite,n.DEFAULT_ANSI_COLORS[15]),b.extendedAnsi){const k=Math.min(v.ansi.length-16,b.extendedAnsi.length);for(let R=0;R<k;R++)v.ansi[R+16]=E(b.extendedAnsi[R],n.DEFAULT_ANSI_COLORS[R+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(b){this._restoreColor(b),this._onChangeColors.fire(this.colors)}_restoreColor(b){if(b!==void 0)switch(b){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[b]=this._restoreColors.ansi[b]}else for(let v=0;v<this._restoreColors.ansi.length;++v)this._colors.ansi[v]=this._restoreColors.ansi[v]}modifyColors(b){b(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function E(b,v){if(b!==void 0)try{return p.css.toColor(b)}catch{}return v}n.ThemeService=g=f([S(0,m.IOptionsService)],g)},6349:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;const f=u(8460),S=u(844);class d extends S.Disposable{constructor(C){super(),this._maxLength=C,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(C){if(this._maxLength===C)return;const w=new Array(C);for(let m=0;m<Math.min(C,this.length);m++)w[m]=this._array[this._getCyclicIndex(m)];this._array=w,this._maxLength=C,this._startIndex=0}get length(){return this._length}set length(C){if(C>this._length)for(let w=this._length;w<C;w++)this._array[w]=void 0;this._length=C}get(C){return this._array[this._getCyclicIndex(C)]}set(C,w){this._array[this._getCyclicIndex(C)]=w}push(C){this._array[this._getCyclicIndex(this._length)]=C,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(C,w,...m){if(w){for(let c=C;c<this._length-w;c++)this._array[this._getCyclicIndex(c)]=this._array[this._getCyclicIndex(c+w)];this._length-=w,this.onDeleteEmitter.fire({index:C,amount:w})}for(let c=this._length-1;c>=C;c--)this._array[this._getCyclicIndex(c+m.length)]=this._array[this._getCyclicIndex(c)];for(let c=0;c<m.length;c++)this._array[this._getCyclicIndex(C+c)]=m[c];if(m.length&&this.onInsertEmitter.fire({index:C,amount:m.length}),this._length+m.length>this._maxLength){const c=this._length+m.length-this._maxLength;this._startIndex+=c,this._length=this._maxLength,this.onTrimEmitter.fire(c)}else this._length+=m.length}trimStart(C){C>this._length&&(C=this._length),this._startIndex+=C,this._length-=C,this.onTrimEmitter.fire(C)}shiftElements(C,w,m){if(!(w<=0)){if(C<0||C>=this._length)throw new Error("start argument out of range");if(C+m<0)throw new Error("Cannot shift elements in list beyond index 0");if(m>0){for(let o=w-1;o>=0;o--)this.set(C+o+m,this.get(C+o));const c=C+w+m-this._length;if(c>0)for(this._length+=c;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let c=0;c<w;c++)this.set(C+c+m,this.get(C+c))}}_getCyclicIndex(C){return(this._startIndex+C)%this._maxLength}}n.CircularList=d},1439:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function u(f,S=5){if(typeof f!="object")return f;const d=Array.isArray(f)?[]:{};for(const p in f)d[p]=S<=1?f[p]:f[p]&&u(f[p],S-1);return d}},8055:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=n.NULL_COLOR=void 0;const f=u(6114);let S=0,d=0,p=0,C=0;var w,m,c,o,s;function l(g){const E=g.toString(16);return E.length<2?"0"+E:E}function _(g,E){return g<E?(E+.05)/(g+.05):(g+.05)/(E+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},function(g){g.toCss=function(E,b,v,k){return k!==void 0?`#${l(E)}${l(b)}${l(v)}${l(k)}`:`#${l(E)}${l(b)}${l(v)}`},g.toRgba=function(E,b,v,k=255){return(E<<24|b<<16|v<<8|k)>>>0}}(w||(n.channels=w={})),function(g){function E(b,v){return C=Math.round(255*v),[S,d,p]=s.toChannels(b.rgba),{css:w.toCss(S,d,p,C),rgba:w.toRgba(S,d,p,C)}}g.blend=function(b,v){if(C=(255&v.rgba)/255,C===1)return{css:v.css,rgba:v.rgba};const k=v.rgba>>24&255,R=v.rgba>>16&255,P=v.rgba>>8&255,A=b.rgba>>24&255,B=b.rgba>>16&255,I=b.rgba>>8&255;return S=A+Math.round((k-A)*C),d=B+Math.round((R-B)*C),p=I+Math.round((P-I)*C),{css:w.toCss(S,d,p),rgba:w.toRgba(S,d,p)}},g.isOpaque=function(b){return(255&b.rgba)==255},g.ensureContrastRatio=function(b,v,k){const R=s.ensureContrastRatio(b.rgba,v.rgba,k);if(R)return s.toColor(R>>24&255,R>>16&255,R>>8&255)},g.opaque=function(b){const v=(255|b.rgba)>>>0;return[S,d,p]=s.toChannels(v),{css:w.toCss(S,d,p),rgba:v}},g.opacity=E,g.multiplyOpacity=function(b,v){return C=255&b.rgba,E(b,C*v/255)},g.toColorRGB=function(b){return[b.rgba>>24&255,b.rgba>>16&255,b.rgba>>8&255]}}(m||(n.color=m={})),function(g){let E,b;if(!f.isNode){const v=document.createElement("canvas");v.width=1,v.height=1;const k=v.getContext("2d",{willReadFrequently:!0});k&&(E=k,E.globalCompositeOperation="copy",b=E.createLinearGradient(0,0,1,1))}g.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return S=parseInt(v.slice(1,2).repeat(2),16),d=parseInt(v.slice(2,3).repeat(2),16),p=parseInt(v.slice(3,4).repeat(2),16),s.toColor(S,d,p);case 5:return S=parseInt(v.slice(1,2).repeat(2),16),d=parseInt(v.slice(2,3).repeat(2),16),p=parseInt(v.slice(3,4).repeat(2),16),C=parseInt(v.slice(4,5).repeat(2),16),s.toColor(S,d,p,C);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const k=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(k)return S=parseInt(k[1]),d=parseInt(k[2]),p=parseInt(k[3]),C=Math.round(255*(k[5]===void 0?1:parseFloat(k[5]))),s.toColor(S,d,p,C);if(!E||!b)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=b,E.fillStyle=v,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[S,d,p,C]=E.getImageData(0,0,1,1).data,C!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:w.toRgba(S,d,p,C),css:v}}}(c||(n.css=c={})),function(g){function E(b,v,k){const R=b/255,P=v/255,A=k/255;return .2126*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.7152*(P<=.03928?P/12.92:Math.pow((P+.055)/1.055,2.4))+.0722*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))}g.relativeLuminance=function(b){return E(b>>16&255,b>>8&255,255&b)},g.relativeLuminance2=E}(o||(n.rgb=o={})),function(g){function E(v,k,R){const P=v>>24&255,A=v>>16&255,B=v>>8&255;let I=k>>24&255,z=k>>16&255,U=k>>8&255,j=_(o.relativeLuminance2(I,z,U),o.relativeLuminance2(P,A,B));for(;j<R&&(I>0||z>0||U>0);)I-=Math.max(0,Math.ceil(.1*I)),z-=Math.max(0,Math.ceil(.1*z)),U-=Math.max(0,Math.ceil(.1*U)),j=_(o.relativeLuminance2(I,z,U),o.relativeLuminance2(P,A,B));return(I<<24|z<<16|U<<8|255)>>>0}function b(v,k,R){const P=v>>24&255,A=v>>16&255,B=v>>8&255;let I=k>>24&255,z=k>>16&255,U=k>>8&255,j=_(o.relativeLuminance2(I,z,U),o.relativeLuminance2(P,A,B));for(;j<R&&(I<255||z<255||U<255);)I=Math.min(255,I+Math.ceil(.1*(255-I))),z=Math.min(255,z+Math.ceil(.1*(255-z))),U=Math.min(255,U+Math.ceil(.1*(255-U))),j=_(o.relativeLuminance2(I,z,U),o.relativeLuminance2(P,A,B));return(I<<24|z<<16|U<<8|255)>>>0}g.ensureContrastRatio=function(v,k,R){const P=o.relativeLuminance(v>>8),A=o.relativeLuminance(k>>8);if(_(P,A)<R){if(A<P){const z=E(v,k,R),U=_(P,o.relativeLuminance(z>>8));if(U<R){const j=b(v,k,R);return U>_(P,o.relativeLuminance(j>>8))?z:j}return z}const B=b(v,k,R),I=_(P,o.relativeLuminance(B>>8));if(I<R){const z=E(v,k,R);return I>_(P,o.relativeLuminance(z>>8))?B:z}return B}},g.reduceLuminance=E,g.increaseLuminance=b,g.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]},g.toColor=function(v,k,R,P){return{css:w.toCss(v,k,R,P),rgba:w.toRgba(v,k,R,P)}}}(s||(n.rgba=s={})),n.toPaddedHex=l,n.contrastRatio=_},8969:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const f=u(844),S=u(2585),d=u(4348),p=u(7866),C=u(744),w=u(7302),m=u(6975),c=u(8460),o=u(1753),s=u(1480),l=u(7994),_=u(9282),g=u(5435),E=u(5981),b=u(2660);let v=!1;class k extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new c.EventEmitter),this._onScroll.event(P=>{var A;(A=this._onScrollApi)===null||A===void 0||A.fire(P.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(P){for(const A in P)this.optionsService.options[A]=P[A]}constructor(P){super(),this._windowsWrappingHeuristics=this.register(new f.MutableDisposable),this._onBinary=this.register(new c.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new c.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new c.EventEmitter),this._instantiationService=new d.InstantiationService,this.optionsService=this.register(new w.OptionsService(P)),this._instantiationService.setService(S.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(C.BufferService)),this._instantiationService.setService(S.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(S.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(m.CoreService)),this._instantiationService.setService(S.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(o.CoreMouseService)),this._instantiationService.setService(S.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(s.UnicodeService)),this._instantiationService.setService(S.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(S.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(b.OscLinkService),this._instantiationService.setService(S.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new g.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,c.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,c.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,c.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,c.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(A=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(A=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new E.WriteBuffer((A,B)=>this._inputHandler.parse(A,B))),this.register((0,c.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(P,A){this._writeBuffer.write(P,A)}writeSync(P,A){this._logService.logLevel<=S.LogLevelEnum.WARN&&!v&&(this._logService.warn("writeSync is unreliable and will be removed soon."),v=!0),this._writeBuffer.writeSync(P,A)}resize(P,A){isNaN(P)||isNaN(A)||(P=Math.max(P,C.MINIMUM_COLS),A=Math.max(A,C.MINIMUM_ROWS),this._bufferService.resize(P,A))}scroll(P,A=!1){this._bufferService.scroll(P,A)}scrollLines(P,A,B){this._bufferService.scrollLines(P,A,B)}scrollPages(P){this.scrollLines(P*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(P){const A=P-this._bufferService.buffer.ydisp;A!==0&&this.scrollLines(A)}registerEscHandler(P,A){return this._inputHandler.registerEscHandler(P,A)}registerDcsHandler(P,A){return this._inputHandler.registerDcsHandler(P,A)}registerCsiHandler(P,A){return this._inputHandler.registerCsiHandler(P,A)}registerOscHandler(P,A){return this._inputHandler.registerOscHandler(P,A)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let P=!1;const A=this.optionsService.rawOptions.windowsPty;A&&A.buildNumber!==void 0&&A.buildNumber!==void 0?P=A.backend==="conpty"&&A.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(P=!0),P?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const P=[];P.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),P.push(this.registerCsiHandler({final:"H"},()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)(()=>{for(const A of P)A.dispose()})}}}n.CoreTerminal=k},8460:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const S=[];for(let d=0;d<this._listeners.length;d++)S.push(this._listeners[d]);for(let d=0;d<S.length;d++)S[d].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,f){return u(S=>f.fire(S))}},5435:function(y,n,u){var f=this&&this.__decorate||function(j,x,D,T){var M,F=arguments.length,$=F<3?x:T===null?T=Object.getOwnPropertyDescriptor(x,D):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(j,x,D,T);else for(var G=j.length-1;G>=0;G--)(M=j[G])&&($=(F<3?M($):F>3?M(x,D,$):M(x,D))||$);return F>3&&$&&Object.defineProperty(x,D,$),$},S=this&&this.__param||function(j,x){return function(D,T){x(D,T,j)}};Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;const d=u(2584),p=u(7116),C=u(2015),w=u(844),m=u(482),c=u(8437),o=u(8460),s=u(643),l=u(511),_=u(3734),g=u(2585),E=u(6242),b=u(6351),v=u(5941),k={"(":0,")":1,"*":2,"+":3,"-":1,".":2},R=131072;function P(j,x){if(j>24)return x.setWinLines||!1;switch(j){case 1:return!!x.restoreWin;case 2:return!!x.minimizeWin;case 3:return!!x.setWinPosition;case 4:return!!x.setWinSizePixels;case 5:return!!x.raiseWin;case 6:return!!x.lowerWin;case 7:return!!x.refreshWin;case 8:return!!x.setWinSizeChars;case 9:return!!x.maximizeWin;case 10:return!!x.fullscreenWin;case 11:return!!x.getWinState;case 13:return!!x.getWinPosition;case 14:return!!x.getWinSizePixels;case 15:return!!x.getScreenSizePixels;case 16:return!!x.getCellSizePixels;case 18:return!!x.getWinSizeChars;case 19:return!!x.getScreenSizeChars;case 20:return!!x.getIconTitle;case 21:return!!x.getWinTitle;case 22:return!!x.pushTitle;case 23:return!!x.popTitle;case 24:return!!x.setWinLines}return!1}var A;(function(j){j[j.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",j[j.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(A||(n.WindowsOptionsReportType=A={}));let B=0;class I extends w.Disposable{getAttrData(){return this._curAttrData}constructor(x,D,T,M,F,$,G,X,ee=new C.EscapeSequenceParser){super(),this._bufferService=x,this._charsetService=D,this._coreService=T,this._logService=M,this._optionsService=F,this._oscLinkService=$,this._coreMouseService=G,this._unicodeService=X,this._parser=ee,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new m.StringToUtf32,this._utf8Decoder=new m.Utf8ToUtf32,this._workCell=new l.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=c.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new o.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new o.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new o.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new o.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new o.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new o.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new o.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new o.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new o.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new o.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new o.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new o.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new o.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new z(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(L=>this._activeBuffer=L.activeBuffer)),this._parser.setCsiHandlerFallback((L,O)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(L),params:O.toArray()})}),this._parser.setEscHandlerFallback(L=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(L)})}),this._parser.setExecuteHandlerFallback(L=>{this._logService.debug("Unknown EXECUTE code: ",{code:L})}),this._parser.setOscHandlerFallback((L,O,N)=>{this._logService.debug("Unknown OSC code: ",{identifier:L,action:O,data:N})}),this._parser.setDcsHandlerFallback((L,O,N)=>{O==="HOOK"&&(N=N.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(L),action:O,payload:N})}),this._parser.setPrintHandler((L,O,N)=>this.print(L,O,N)),this._parser.registerCsiHandler({final:"@"},L=>this.insertChars(L)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},L=>this.scrollLeft(L)),this._parser.registerCsiHandler({final:"A"},L=>this.cursorUp(L)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},L=>this.scrollRight(L)),this._parser.registerCsiHandler({final:"B"},L=>this.cursorDown(L)),this._parser.registerCsiHandler({final:"C"},L=>this.cursorForward(L)),this._parser.registerCsiHandler({final:"D"},L=>this.cursorBackward(L)),this._parser.registerCsiHandler({final:"E"},L=>this.cursorNextLine(L)),this._parser.registerCsiHandler({final:"F"},L=>this.cursorPrecedingLine(L)),this._parser.registerCsiHandler({final:"G"},L=>this.cursorCharAbsolute(L)),this._parser.registerCsiHandler({final:"H"},L=>this.cursorPosition(L)),this._parser.registerCsiHandler({final:"I"},L=>this.cursorForwardTab(L)),this._parser.registerCsiHandler({final:"J"},L=>this.eraseInDisplay(L,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},L=>this.eraseInDisplay(L,!0)),this._parser.registerCsiHandler({final:"K"},L=>this.eraseInLine(L,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},L=>this.eraseInLine(L,!0)),this._parser.registerCsiHandler({final:"L"},L=>this.insertLines(L)),this._parser.registerCsiHandler({final:"M"},L=>this.deleteLines(L)),this._parser.registerCsiHandler({final:"P"},L=>this.deleteChars(L)),this._parser.registerCsiHandler({final:"S"},L=>this.scrollUp(L)),this._parser.registerCsiHandler({final:"T"},L=>this.scrollDown(L)),this._parser.registerCsiHandler({final:"X"},L=>this.eraseChars(L)),this._parser.registerCsiHandler({final:"Z"},L=>this.cursorBackwardTab(L)),this._parser.registerCsiHandler({final:"`"},L=>this.charPosAbsolute(L)),this._parser.registerCsiHandler({final:"a"},L=>this.hPositionRelative(L)),this._parser.registerCsiHandler({final:"b"},L=>this.repeatPrecedingCharacter(L)),this._parser.registerCsiHandler({final:"c"},L=>this.sendDeviceAttributesPrimary(L)),this._parser.registerCsiHandler({prefix:">",final:"c"},L=>this.sendDeviceAttributesSecondary(L)),this._parser.registerCsiHandler({final:"d"},L=>this.linePosAbsolute(L)),this._parser.registerCsiHandler({final:"e"},L=>this.vPositionRelative(L)),this._parser.registerCsiHandler({final:"f"},L=>this.hVPosition(L)),this._parser.registerCsiHandler({final:"g"},L=>this.tabClear(L)),this._parser.registerCsiHandler({final:"h"},L=>this.setMode(L)),this._parser.registerCsiHandler({prefix:"?",final:"h"},L=>this.setModePrivate(L)),this._parser.registerCsiHandler({final:"l"},L=>this.resetMode(L)),this._parser.registerCsiHandler({prefix:"?",final:"l"},L=>this.resetModePrivate(L)),this._parser.registerCsiHandler({final:"m"},L=>this.charAttributes(L)),this._parser.registerCsiHandler({final:"n"},L=>this.deviceStatus(L)),this._parser.registerCsiHandler({prefix:"?",final:"n"},L=>this.deviceStatusPrivate(L)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},L=>this.softReset(L)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},L=>this.setCursorStyle(L)),this._parser.registerCsiHandler({final:"r"},L=>this.setScrollRegion(L)),this._parser.registerCsiHandler({final:"s"},L=>this.saveCursor(L)),this._parser.registerCsiHandler({final:"t"},L=>this.windowOptions(L)),this._parser.registerCsiHandler({final:"u"},L=>this.restoreCursor(L)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},L=>this.insertColumns(L)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},L=>this.deleteColumns(L)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},L=>this.selectProtected(L)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},L=>this.requestMode(L,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},L=>this.requestMode(L,!1)),this._parser.setExecuteHandler(d.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(d.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(d.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(d.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(d.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(d.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(d.C1.IND,()=>this.index()),this._parser.setExecuteHandler(d.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(d.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new E.OscHandler(L=>(this.setTitle(L),this.setIconName(L),!0))),this._parser.registerOscHandler(1,new E.OscHandler(L=>this.setIconName(L))),this._parser.registerOscHandler(2,new E.OscHandler(L=>this.setTitle(L))),this._parser.registerOscHandler(4,new E.OscHandler(L=>this.setOrReportIndexedColor(L))),this._parser.registerOscHandler(8,new E.OscHandler(L=>this.setHyperlink(L))),this._parser.registerOscHandler(10,new E.OscHandler(L=>this.setOrReportFgColor(L))),this._parser.registerOscHandler(11,new E.OscHandler(L=>this.setOrReportBgColor(L))),this._parser.registerOscHandler(12,new E.OscHandler(L=>this.setOrReportCursorColor(L))),this._parser.registerOscHandler(104,new E.OscHandler(L=>this.restoreIndexedColor(L))),this._parser.registerOscHandler(110,new E.OscHandler(L=>this.restoreFgColor(L))),this._parser.registerOscHandler(111,new E.OscHandler(L=>this.restoreBgColor(L))),this._parser.registerOscHandler(112,new E.OscHandler(L=>this.restoreCursorColor(L))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(const L in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:L},()=>this.selectCharset("("+L)),this._parser.registerEscHandler({intermediates:")",final:L},()=>this.selectCharset(")"+L)),this._parser.registerEscHandler({intermediates:"*",final:L},()=>this.selectCharset("*"+L)),this._parser.registerEscHandler({intermediates:"+",final:L},()=>this.selectCharset("+"+L)),this._parser.registerEscHandler({intermediates:"-",final:L},()=>this.selectCharset("-"+L)),this._parser.registerEscHandler({intermediates:".",final:L},()=>this.selectCharset("."+L)),this._parser.registerEscHandler({intermediates:"/",final:L},()=>this.selectCharset("/"+L));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(L=>(this._logService.error("Parsing error: ",L),L)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new b.DcsHandler((L,O)=>this.requestStatusString(L,O)))}_preserveStack(x,D,T,M){this._parseStack.paused=!0,this._parseStack.cursorStartX=x,this._parseStack.cursorStartY=D,this._parseStack.decodedLength=T,this._parseStack.position=M}_logSlowResolvingAsync(x){this._logService.logLevel<=g.LogLevelEnum.WARN&&Promise.race([x,new Promise((D,T)=>setTimeout(()=>T("#SLOW_TIMEOUT"),5e3))]).catch(D=>{if(D!=="#SLOW_TIMEOUT")throw D;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(x,D){let T,M=this._activeBuffer.x,F=this._activeBuffer.y,$=0;const G=this._parseStack.paused;if(G){if(T=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,D))return this._logSlowResolvingAsync(T),T;M=this._parseStack.cursorStartX,F=this._parseStack.cursorStartY,this._parseStack.paused=!1,x.length>R&&($=this._parseStack.position+R)}if(this._logService.logLevel<=g.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof x=="string"?` "${x}"`:` "${Array.prototype.map.call(x,X=>String.fromCharCode(X)).join("")}"`),typeof x=="string"?x.split("").map(X=>X.charCodeAt(0)):x),this._parseBuffer.length<x.length&&this._parseBuffer.length<R&&(this._parseBuffer=new Uint32Array(Math.min(x.length,R))),G||this._dirtyRowTracker.clearRange(),x.length>R)for(let X=$;X<x.length;X+=R){const ee=X+R<x.length?X+R:x.length,L=typeof x=="string"?this._stringDecoder.decode(x.substring(X,ee),this._parseBuffer):this._utf8Decoder.decode(x.subarray(X,ee),this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,L))return this._preserveStack(M,F,L,X),this._logSlowResolvingAsync(T),T}else if(!G){const X=typeof x=="string"?this._stringDecoder.decode(x,this._parseBuffer):this._utf8Decoder.decode(x,this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,X))return this._preserveStack(M,F,X,0),this._logSlowResolvingAsync(T),T}this._activeBuffer.x===M&&this._activeBuffer.y===F||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowTracker.start,this._dirtyRowTracker.end)}print(x,D,T){let M,F;const $=this._charsetService.charset,G=this._optionsService.rawOptions.screenReaderMode,X=this._bufferService.cols,ee=this._coreService.decPrivateModes.wraparound,L=this._coreService.modes.insertMode,O=this._curAttrData;let N=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&T-D>0&&N.getWidth(this._activeBuffer.x-1)===2&&N.setCellFromCodePoint(this._activeBuffer.x-1,0,1,O.fg,O.bg,O.extended);for(let H=D;H<T;++H){if(M=x[H],F=this._unicodeService.wcwidth(M),M<127&&$){const Q=$[String.fromCharCode(M)];Q&&(M=Q.charCodeAt(0))}if(G&&this._onA11yChar.fire((0,m.stringFromCodePoint)(M)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),F||!this._activeBuffer.x){if(this._activeBuffer.x+F-1>=X){if(ee){for(;this._activeBuffer.x<X;)N.setCellFromCodePoint(this._activeBuffer.x++,0,1,O.fg,O.bg,O.extended);this._activeBuffer.x=0,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),N=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=X-1,F===2)continue}if(L&&(N.insertCells(this._activeBuffer.x,F,this._activeBuffer.getNullCell(O),O),N.getWidth(X-1)===2&&N.setCellFromCodePoint(X-1,s.NULL_CELL_CODE,s.NULL_CELL_WIDTH,O.fg,O.bg,O.extended)),N.setCellFromCodePoint(this._activeBuffer.x++,M,F,O.fg,O.bg,O.extended),F>0)for(;--F;)N.setCellFromCodePoint(this._activeBuffer.x++,0,0,O.fg,O.bg,O.extended)}else N.getWidth(this._activeBuffer.x-1)?N.addCodepointToCell(this._activeBuffer.x-1,M):N.addCodepointToCell(this._activeBuffer.x-2,M)}T-D>0&&(N.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<X&&T-D>0&&N.getWidth(this._activeBuffer.x)===0&&!N.hasContent(this._activeBuffer.x)&&N.setCellFromCodePoint(this._activeBuffer.x,0,1,O.fg,O.bg,O.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(x,D){return x.final!=="t"||x.prefix||x.intermediates?this._parser.registerCsiHandler(x,D):this._parser.registerCsiHandler(x,T=>!P(T.params[0],this._optionsService.rawOptions.windowOptions)||D(T))}registerDcsHandler(x,D){return this._parser.registerDcsHandler(x,new b.DcsHandler(D))}registerEscHandler(x,D){return this._parser.registerEscHandler(x,D)}registerOscHandler(x,D){return this._parser.registerOscHandler(x,new E.OscHandler(D))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var x;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(!((x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||x===void 0)&&x.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);D.hasWidth(this._activeBuffer.x)&&!D.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const x=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-x),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(x=this._bufferService.cols-1){this._activeBuffer.x=Math.min(x,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(x,D){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=x,this._activeBuffer.y=this._activeBuffer.scrollTop+D):(this._activeBuffer.x=x,this._activeBuffer.y=D),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(x,D){this._restrictCursor(),this._setCursor(this._activeBuffer.x+x,this._activeBuffer.y+D)}cursorUp(x){const D=this._activeBuffer.y-this._activeBuffer.scrollTop;return D>=0?this._moveCursor(0,-Math.min(D,x.params[0]||1)):this._moveCursor(0,-(x.params[0]||1)),!0}cursorDown(x){const D=this._activeBuffer.scrollBottom-this._activeBuffer.y;return D>=0?this._moveCursor(0,Math.min(D,x.params[0]||1)):this._moveCursor(0,x.params[0]||1),!0}cursorForward(x){return this._moveCursor(x.params[0]||1,0),!0}cursorBackward(x){return this._moveCursor(-(x.params[0]||1),0),!0}cursorNextLine(x){return this.cursorDown(x),this._activeBuffer.x=0,!0}cursorPrecedingLine(x){return this.cursorUp(x),this._activeBuffer.x=0,!0}cursorCharAbsolute(x){return this._setCursor((x.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(x){return this._setCursor(x.length>=2?(x.params[1]||1)-1:0,(x.params[0]||1)-1),!0}charPosAbsolute(x){return this._setCursor((x.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(x){return this._moveCursor(x.params[0]||1,0),!0}linePosAbsolute(x){return this._setCursor(this._activeBuffer.x,(x.params[0]||1)-1),!0}vPositionRelative(x){return this._moveCursor(0,x.params[0]||1),!0}hVPosition(x){return this.cursorPosition(x),!0}tabClear(x){const D=x.params[0];return D===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:D===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(x){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=x.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(x){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=x.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(x){const D=x.params[0];return D===1&&(this._curAttrData.bg|=536870912),D!==2&&D!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(x,D,T,M=!1,F=!1){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);$.replaceCells(D,T,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),F),M&&($.isWrapped=!1)}_resetBufferLine(x,D=!1){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);T&&(T.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),D),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+x),T.isWrapped=!1)}eraseInDisplay(x,D=!1){let T;switch(this._restrictCursor(this._bufferService.cols),x.params[0]){case 0:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,D);T<this._bufferService.rows;T++)this._resetBufferLine(T,D);this._dirtyRowTracker.markDirty(T);break;case 1:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T,0,this._activeBuffer.x+1,!0,D),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(T+1).isWrapped=!1);T--;)this._resetBufferLine(T,D);this._dirtyRowTracker.markDirty(0);break;case 2:for(T=this._bufferService.rows,this._dirtyRowTracker.markDirty(T-1);T--;)this._resetBufferLine(T,D);this._dirtyRowTracker.markDirty(0);break;case 3:const M=this._activeBuffer.lines.length-this._bufferService.rows;M>0&&(this._activeBuffer.lines.trimStart(M),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-M,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-M,0),this._onScroll.fire(0))}return!0}eraseInLine(x,D=!1){switch(this._restrictCursor(this._bufferService.cols),x.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,D);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,D);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,D)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(x){this._restrictCursor();let D=x.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=this._activeBuffer.ybase+this._activeBuffer.y,M=this._bufferService.rows-1-this._activeBuffer.scrollBottom,F=this._bufferService.rows-1+this._activeBuffer.ybase-M+1;for(;D--;)this._activeBuffer.lines.splice(F-1,1),this._activeBuffer.lines.splice(T,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(x){this._restrictCursor();let D=x.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=this._activeBuffer.ybase+this._activeBuffer.y;let M;for(M=this._bufferService.rows-1-this._activeBuffer.scrollBottom,M=this._bufferService.rows-1+this._activeBuffer.ybase-M;D--;)this._activeBuffer.lines.splice(T,1),this._activeBuffer.lines.splice(M,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(x){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.insertCells(this._activeBuffer.x,x.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(x){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.deleteCells(this._activeBuffer.x,x.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(x){let D=x.params[0]||1;for(;D--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(x){let D=x.params[0]||1;for(;D--;)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(c.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=x.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);M.deleteCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=x.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);M.insertCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=x.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);M.insertCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=x.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);M.deleteCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(x){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(x.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(x){if(!this._parser.precedingCodepoint)return!0;const D=x.params[0]||1,T=new Uint32Array(D);for(let M=0;M<D;++M)T[M]=this._parser.precedingCodepoint;return this.print(T,0,T.length),!0}sendDeviceAttributesPrimary(x){return x.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(d.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(d.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(x){return x.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(d.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(x.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c")),!0}_is(x){return(this._optionsService.rawOptions.termName+"").indexOf(x)===0}setMode(x){for(let D=0;D<x.length;D++)switch(x.params[D]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(x){for(let D=0;D<x.length;D++)switch(x.params[D]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(x){for(let D=0;D<x.length;D++)switch(x.params[D]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(x){for(let D=0;D<x.length;D++)switch(x.params[D]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),x.params[D]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(x,D){const T=this._coreService.decPrivateModes,{activeProtocol:M,activeEncoding:F}=this._coreMouseService,$=this._coreService,{buffers:G,cols:X}=this._bufferService,{active:ee,alt:L}=G,O=this._optionsService.rawOptions,N=te=>te?1:2,H=x.params[0];return Q=H,V=D?H===2?4:H===4?N($.modes.insertMode):H===12?3:H===20?N(O.convertEol):0:H===1?N(T.applicationCursorKeys):H===3?O.windowOptions.setWinLines?X===80?2:X===132?1:0:0:H===6?N(T.origin):H===7?N(T.wraparound):H===8?3:H===9?N(M==="X10"):H===12?N(O.cursorBlink):H===25?N(!$.isCursorHidden):H===45?N(T.reverseWraparound):H===66?N(T.applicationKeypad):H===67?4:H===1e3?N(M==="VT200"):H===1002?N(M==="DRAG"):H===1003?N(M==="ANY"):H===1004?N(T.sendFocus):H===1005?4:H===1006?N(F==="SGR"):H===1015?4:H===1016?N(F==="SGR_PIXELS"):H===1048?1:H===47||H===1047||H===1049?N(ee===L):H===2004?N(T.bracketedPasteMode):0,$.triggerDataEvent(`${d.C0.ESC}[${D?"":"?"}${Q};${V}$y`),!0;var Q,V}_updateAttrColor(x,D,T,M,F){return D===2?(x|=50331648,x&=-16777216,x|=_.AttributeData.fromColorRGB([T,M,F])):D===5&&(x&=-50331904,x|=33554432|255&T),x}_extractColor(x,D,T){const M=[0,0,-1,0,0,0];let F=0,$=0;do{if(M[$+F]=x.params[D+$],x.hasSubParams(D+$)){const G=x.getSubParams(D+$);let X=0;do M[1]===5&&(F=1),M[$+X+1+F]=G[X];while(++X<G.length&&X+$+1+F<M.length);break}if(M[1]===5&&$+F>=2||M[1]===2&&$+F>=5)break;M[1]&&(F=1)}while(++$+D<x.length&&$+F<M.length);for(let G=2;G<M.length;++G)M[G]===-1&&(M[G]=0);switch(M[0]){case 38:T.fg=this._updateAttrColor(T.fg,M[1],M[3],M[4],M[5]);break;case 48:T.bg=this._updateAttrColor(T.bg,M[1],M[3],M[4],M[5]);break;case 58:T.extended=T.extended.clone(),T.extended.underlineColor=this._updateAttrColor(T.extended.underlineColor,M[1],M[3],M[4],M[5])}return $}_processUnderline(x,D){D.extended=D.extended.clone(),(!~x||x>5)&&(x=1),D.extended.underlineStyle=x,D.fg|=268435456,x===0&&(D.fg&=-268435457),D.updateExtended()}_processSGR0(x){x.fg=c.DEFAULT_ATTR_DATA.fg,x.bg=c.DEFAULT_ATTR_DATA.bg,x.extended=x.extended.clone(),x.extended.underlineStyle=0,x.extended.underlineColor&=-67108864,x.updateExtended()}charAttributes(x){if(x.length===1&&x.params[0]===0)return this._processSGR0(this._curAttrData),!0;const D=x.length;let T;const M=this._curAttrData;for(let F=0;F<D;F++)T=x.params[F],T>=30&&T<=37?(M.fg&=-50331904,M.fg|=16777216|T-30):T>=40&&T<=47?(M.bg&=-50331904,M.bg|=16777216|T-40):T>=90&&T<=97?(M.fg&=-50331904,M.fg|=16777224|T-90):T>=100&&T<=107?(M.bg&=-50331904,M.bg|=16777224|T-100):T===0?this._processSGR0(M):T===1?M.fg|=134217728:T===3?M.bg|=67108864:T===4?(M.fg|=268435456,this._processUnderline(x.hasSubParams(F)?x.getSubParams(F)[0]:1,M)):T===5?M.fg|=536870912:T===7?M.fg|=67108864:T===8?M.fg|=1073741824:T===9?M.fg|=2147483648:T===2?M.bg|=134217728:T===21?this._processUnderline(2,M):T===22?(M.fg&=-134217729,M.bg&=-134217729):T===23?M.bg&=-67108865:T===24?(M.fg&=-268435457,this._processUnderline(0,M)):T===25?M.fg&=-536870913:T===27?M.fg&=-67108865:T===28?M.fg&=-1073741825:T===29?M.fg&=2147483647:T===39?(M.fg&=-67108864,M.fg|=16777215&c.DEFAULT_ATTR_DATA.fg):T===49?(M.bg&=-67108864,M.bg|=16777215&c.DEFAULT_ATTR_DATA.bg):T===38||T===48||T===58?F+=this._extractColor(x,F,M):T===53?M.bg|=1073741824:T===55?M.bg&=-1073741825:T===59?(M.extended=M.extended.clone(),M.extended.underlineColor=-1,M.updateExtended()):T===100?(M.fg&=-67108864,M.fg|=16777215&c.DEFAULT_ATTR_DATA.fg,M.bg&=-67108864,M.bg|=16777215&c.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",T);return!0}deviceStatus(x){switch(x.params[0]){case 5:this._coreService.triggerDataEvent(`${d.C0.ESC}[0n`);break;case 6:const D=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[${D};${T}R`)}return!0}deviceStatusPrivate(x){if(x.params[0]===6){const D=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[?${D};${T}R`)}return!0}softReset(x){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(x){const D=x.params[0]||1;switch(D){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const T=D%2==1;return this._optionsService.options.cursorBlink=T,!0}setScrollRegion(x){const D=x.params[0]||1;let T;return(x.length<2||(T=x.params[1])>this._bufferService.rows||T===0)&&(T=this._bufferService.rows),T>D&&(this._activeBuffer.scrollTop=D-1,this._activeBuffer.scrollBottom=T-1,this._setCursor(0,0)),!0}windowOptions(x){if(!P(x.params[0],this._optionsService.rawOptions.windowOptions))return!0;const D=x.length>1?x.params[1]:0;switch(x.params[0]){case 14:D!==2&&this._onRequestWindowsOptionsReport.fire(A.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(A.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${d.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:D!==0&&D!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),D!==0&&D!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:D!==0&&D!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),D!==0&&D!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(x){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(x){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(x){return this._windowTitle=x,this._onTitleChange.fire(x),!0}setIconName(x){return this._iconName=x,!0}setOrReportIndexedColor(x){const D=[],T=x.split(";");for(;T.length>1;){const M=T.shift(),F=T.shift();if(/^\d+$/.exec(M)){const $=parseInt(M);if(U($))if(F==="?")D.push({type:0,index:$});else{const G=(0,v.parseColor)(F);G&&D.push({type:1,index:$,color:G})}}}return D.length&&this._onColor.fire(D),!0}setHyperlink(x){const D=x.split(";");return!(D.length<2)&&(D[1]?this._createHyperlink(D[0],D[1]):!D[0]&&this._finishHyperlink())}_createHyperlink(x,D){this._getCurrentLinkId()&&this._finishHyperlink();const T=x.split(":");let M;const F=T.findIndex($=>$.startsWith("id="));return F!==-1&&(M=T[F].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:M,uri:D}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(x,D){const T=x.split(";");for(let M=0;M<T.length&&!(D>=this._specialColors.length);++M,++D)if(T[M]==="?")this._onColor.fire([{type:0,index:this._specialColors[D]}]);else{const F=(0,v.parseColor)(T[M]);F&&this._onColor.fire([{type:1,index:this._specialColors[D],color:F}])}return!0}setOrReportFgColor(x){return this._setOrReportSpecialColor(x,0)}setOrReportBgColor(x){return this._setOrReportSpecialColor(x,1)}setOrReportCursorColor(x){return this._setOrReportSpecialColor(x,2)}restoreIndexedColor(x){if(!x)return this._onColor.fire([{type:2}]),!0;const D=[],T=x.split(";");for(let M=0;M<T.length;++M)if(/^\d+$/.exec(T[M])){const F=parseInt(T[M]);U(F)&&D.push({type:2,index:F})}return D.length&&this._onColor.fire(D),!0}restoreFgColor(x){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(x){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(x){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),!0}selectCharset(x){return x.length!==2?(this.selectDefaultCharset(),!0):(x[0]==="/"||this._charsetService.setgCharset(k[x[0]],p.CHARSETS[x[1]]||p.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const x=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,x,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=c.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(x){return this._charsetService.setgLevel(x),!0}screenAlignmentPattern(){const x=new l.CellData;x.content=4194373,x.fg=this._curAttrData.fg,x.bg=this._curAttrData.bg,this._setCursor(0,0);for(let D=0;D<this._bufferService.rows;++D){const T=this._activeBuffer.ybase+this._activeBuffer.y+D,M=this._activeBuffer.lines.get(T);M&&(M.fill(x),M.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(x,D){const T=this._bufferService.buffer,M=this._optionsService.rawOptions;return(F=>(this._coreService.triggerDataEvent(`${d.C0.ESC}${F}${d.C0.ESC}\\`),!0))(x==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:x==='"p'?'P1$r61;1"p':x==="r"?`P1$r${T.scrollTop+1};${T.scrollBottom+1}r`:x==="m"?"P1$r0m":x===" q"?`P1$r${{block:2,underline:4,bar:6}[M.cursorStyle]-(M.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(x,D){this._dirtyRowTracker.markRangeDirty(x,D)}}n.InputHandler=I;let z=class{constructor(j){this._bufferService=j,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(j){j<this.start?this.start=j:j>this.end&&(this.end=j)}markRangeDirty(j,x){j>x&&(B=j,j=x,x=B),j<this.start&&(this.start=j),x>this.end&&(this.end=x)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function U(j){return 0<=j&&j<256}z=f([S(0,g.IBufferService)],z)},844:(y,n)=>{function u(f){for(const S of f)S.dispose();f.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const S=this._disposables.indexOf(f);S!==-1&&this._disposables.splice(S,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var S;this._isDisposed||f===this._value||((S=this._value)===null||S===void 0||S.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)===null||f===void 0||f.dispose(),this._value=void 0}},n.toDisposable=function(f){return{dispose:f}},n.disposeArray=u,n.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},1505:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(S,d,p){this._data[S]||(this._data[S]={}),this._data[S][d]=p}get(S,d){return this._data[S]?this._data[S][d]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(f,S,d,p,C){this._data.get(f,S)||this._data.set(f,S,new u),this._data.get(f,S).set(d,p,C)}get(f,S,d,p){var C;return(C=this._data.get(f,S))===null||C===void 0?void 0:C.get(d,p)}clear(){this._data.clear()}}},6114:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.isChromeOS=n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.getSafariVersion=n.isSafari=n.isLegacyEdge=n.isFirefox=n.isNode=void 0,n.isNode=typeof navigator>"u";const u=n.isNode?"node":navigator.userAgent,f=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const S=u.match(/Version\/(\d+)/);return S===null||S.length<2?0:parseInt(S[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),n.isIpad=f==="iPad",n.isIphone=f==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),n.isLinux=f.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},6106:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SortedList=void 0;let u=0;n.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(u=this._search(this._getKey(f)),this._array.splice(u,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const S=this._getKey(f);if(S===void 0||(u=this._search(S),u===-1)||this._getKey(this._array[u])!==S)return!1;do if(this._array[u]===f)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===S);return!1}*getKeyIterator(f){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===f)}forEachByKey(f,S){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do S(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===f)}values(){return[...this._array].values()}_search(f){let S=0,d=this._array.length-1;for(;d>=S;){let p=S+d>>1;const C=this._getKey(this._array[p]);if(C>f)d=p-1;else{if(!(C<f)){for(;p>0&&this._getKey(this._array[p-1])===f;)p--;return p}S=p+1}}return S}}},7226:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const f=u(6114);class S{constructor(){this._tasks=[],this._i=0}enqueue(C){this._tasks.push(C),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(C){this._idleCallback=void 0;let w=0,m=0,c=C.timeRemaining(),o=0;for(;this._i<this._tasks.length;){if(w=Date.now(),this._tasks[this._i]()||this._i++,w=Math.max(1,Date.now()-w),m=Math.max(w,m),o=C.timeRemaining(),1.5*m>o)return c-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(c-w))}ms`),void this._start();c=o}this.clear()}}class d extends S{_requestCallback(C){return setTimeout(()=>C(this._createDeadline(16)))}_cancelCallback(C){clearTimeout(C)}_createDeadline(C){const w=Date.now()+C;return{timeRemaining:()=>Math.max(0,w-Date.now())}}}n.PriorityTaskQueue=d,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends S{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:d,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;const f=u(643);n.updateWindowsModeWrappedState=function(S){const d=S.buffer.lines.get(S.buffer.ybase+S.buffer.y-1),p=d==null?void 0:d.get(S.cols-1),C=S.buffer.lines.get(S.buffer.ybase+S.buffer.y);C&&p&&(C.isWrapped=p[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&p[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(d){return[d>>>16&255,d>>>8&255,255&d]}static fromColorRGB(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]}clone(){const d=new u;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}n.AttributeData=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(d){this._ext=d}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(d){this._ext&=-469762049,this._ext|=d<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(d){this._ext&=-67108864,this._ext|=67108863&d}get urlId(){return this._urlId}set urlId(d){this._urlId=d}constructor(d=0,p=0){this._ext=0,this._urlId=0,this._ext=d,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=f},9092:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Buffer=n.MAX_BUFFER_SIZE=void 0;const f=u(6349),S=u(7226),d=u(3734),p=u(8437),C=u(4634),w=u(511),m=u(643),c=u(4863),o=u(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(s,l,_){this._hasScrollback=s,this._optionsService=l,this._bufferService=_,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=o.DEFAULT_CHARSET,this.markers=[],this._nullCell=w.CellData.fromCharData([0,m.NULL_CELL_CHAR,m.NULL_CELL_WIDTH,m.NULL_CELL_CODE]),this._whitespaceCell=w.CellData.fromCharData([0,m.WHITESPACE_CELL_CHAR,m.WHITESPACE_CELL_WIDTH,m.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new S.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(s){return s?(this._nullCell.fg=s.fg,this._nullCell.bg=s.bg,this._nullCell.extended=s.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new d.ExtendedAttrs),this._nullCell}getWhitespaceCell(s){return s?(this._whitespaceCell.fg=s.fg,this._whitespaceCell.bg=s.bg,this._whitespaceCell.extended=s.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new d.ExtendedAttrs),this._whitespaceCell}getBlankLine(s,l){return new p.BufferLine(this._bufferService.cols,this.getNullCell(s),l)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const s=this.ybase+this.y-this.ydisp;return s>=0&&s<this._rows}_getCorrectBufferLength(s){if(!this._hasScrollback)return s;const l=s+this._optionsService.rawOptions.scrollback;return l>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:l}fillViewportRows(s){if(this.lines.length===0){s===void 0&&(s=p.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(s))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(s,l){const _=this.getNullCell(p.DEFAULT_ATTR_DATA);let g=0;const E=this._getCorrectBufferLength(l);if(E>this.lines.maxLength&&(this.lines.maxLength=E),this.lines.length>0){if(this._cols<s)for(let v=0;v<this.lines.length;v++)g+=+this.lines.get(v).resize(s,_);let b=0;if(this._rows<l)for(let v=this._rows;v<l;v++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(s,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+b+1?(this.ybase--,b++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(s,_)));else for(let v=this._rows;v>l;v--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(E<this.lines.maxLength){const v=this.lines.length-E;v>0&&(this.lines.trimStart(v),this.ybase=Math.max(this.ybase-v,0),this.ydisp=Math.max(this.ydisp-v,0),this.savedY=Math.max(this.savedY-v,0)),this.lines.maxLength=E}this.x=Math.min(this.x,s-1),this.y=Math.min(this.y,l-1),b&&(this.y+=b),this.savedX=Math.min(this.savedX,s-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(s,l),this._cols>s))for(let b=0;b<this.lines.length;b++)g+=+this.lines.get(b).resize(s,_);this._cols=s,this._rows=l,this._memoryCleanupQueue.clear(),g>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let s=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,s=!1);let l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>100)return!0;return s}get _isReflowEnabled(){const s=this._optionsService.rawOptions.windowsPty;return s&&s.buildNumber?this._hasScrollback&&s.backend==="conpty"&&s.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(s,l){this._cols!==s&&(s>this._cols?this._reflowLarger(s,l):this._reflowSmaller(s,l))}_reflowLarger(s,l){const _=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,s,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(_.length>0){const g=(0,C.reflowLargerCreateNewLayout)(this.lines,_);(0,C.reflowLargerApplyNewLayout)(this.lines,g.layout),this._reflowLargerAdjustViewport(s,l,g.countRemoved)}}_reflowLargerAdjustViewport(s,l,_){const g=this.getNullCell(p.DEFAULT_ATTR_DATA);let E=_;for(;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new p.BufferLine(s,g))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(s,l){const _=this.getNullCell(p.DEFAULT_ATTR_DATA),g=[];let E=0;for(let b=this.lines.length-1;b>=0;b--){let v=this.lines.get(b);if(!v||!v.isWrapped&&v.getTrimmedLength()<=s)continue;const k=[v];for(;v.isWrapped&&b>0;)v=this.lines.get(--b),k.unshift(v);const R=this.ybase+this.y;if(R>=b&&R<b+k.length)continue;const P=k[k.length-1].getTrimmedLength(),A=(0,C.reflowSmallerGetNewLineLengths)(k,this._cols,s),B=A.length-k.length;let I;I=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+B):Math.max(0,this.lines.length-this.lines.maxLength+B);const z=[];for(let M=0;M<B;M++){const F=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);z.push(F)}z.length>0&&(g.push({start:b+k.length+E,newLines:z}),E+=z.length),k.push(...z);let U=A.length-1,j=A[U];j===0&&(U--,j=A[U]);let x=k.length-B-1,D=P;for(;x>=0;){const M=Math.min(D,j);if(k[U]===void 0)break;if(k[U].copyCellsFrom(k[x],D-M,j-M,M,!0),j-=M,j===0&&(U--,j=A[U]),D-=M,D===0){x--;const F=Math.max(x,0);D=(0,C.getWrappedLineTrimmedLength)(k,F,this._cols)}}for(let M=0;M<k.length;M++)A[M]<s&&k[M].setCell(A[M],_);let T=B-I;for(;T-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+E)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+B,this.ybase+l-1)}if(g.length>0){const b=[],v=[];for(let U=0;U<this.lines.length;U++)v.push(this.lines.get(U));const k=this.lines.length;let R=k-1,P=0,A=g[P];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+E);let B=0;for(let U=Math.min(this.lines.maxLength-1,k+E-1);U>=0;U--)if(A&&A.start>R+B){for(let j=A.newLines.length-1;j>=0;j--)this.lines.set(U--,A.newLines[j]);U++,b.push({index:R+1,amount:A.newLines.length}),B+=A.newLines.length,A=g[++P]}else this.lines.set(U,v[R--]);let I=0;for(let U=b.length-1;U>=0;U--)b[U].index+=I,this.lines.onInsertEmitter.fire(b[U]),I+=b[U].amount;const z=Math.max(0,k+E-this.lines.maxLength);z>0&&this.lines.onTrimEmitter.fire(z)}}translateBufferLineToString(s,l,_=0,g){const E=this.lines.get(s);return E?E.translateToString(l,_,g):""}getWrappedRangeForLine(s){let l=s,_=s;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:l,last:_}}setupTabStops(s){for(s!=null?this.tabs[s]||(s=this.prevStop(s)):(this.tabs={},s=0);s<this._cols;s+=this._optionsService.rawOptions.tabStopWidth)this.tabs[s]=!0}prevStop(s){for(s==null&&(s=this.x);!this.tabs[--s]&&s>0;);return s>=this._cols?this._cols-1:s<0?0:s}nextStop(s){for(s==null&&(s=this.x);!this.tabs[++s]&&s<this._cols;);return s>=this._cols?this._cols-1:s<0?0:s}clearMarkers(s){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].line===s&&(this.markers[l].dispose(),this.markers.splice(l--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let s=0;s<this.markers.length;s++)this.markers[s].dispose(),this.markers.splice(s--,1);this._isClearing=!1}addMarker(s){const l=new c.Marker(s);return this.markers.push(l),l.register(this.lines.onTrim(_=>{l.line-=_,l.line<0&&l.dispose()})),l.register(this.lines.onInsert(_=>{l.line>=_.index&&(l.line+=_.amount)})),l.register(this.lines.onDelete(_=>{l.line>=_.index&&l.line<_.index+_.amount&&l.dispose(),l.line>_.index&&(l.line-=_.amount)})),l.register(l.onDispose(()=>this._removeMarker(l))),l}_removeMarker(s){this._isClearing||this.markers.splice(this.markers.indexOf(s),1)}}},8437:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;const f=u(3734),S=u(511),d=u(643),p=u(482);n.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let C=0;class w{constructor(c,o,s=!1){this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*c);const l=o||S.CellData.fromCharData([0,d.NULL_CELL_CHAR,d.NULL_CELL_WIDTH,d.NULL_CELL_CODE]);for(let _=0;_<c;++_)this.setCell(_,l);this.length=c}get(c){const o=this._data[3*c+0],s=2097151&o;return[this._data[3*c+1],2097152&o?this._combined[c]:s?(0,p.stringFromCodePoint)(s):"",o>>22,2097152&o?this._combined[c].charCodeAt(this._combined[c].length-1):s]}set(c,o){this._data[3*c+1]=o[d.CHAR_DATA_ATTR_INDEX],o[d.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[c]=o[1],this._data[3*c+0]=2097152|c|o[d.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*c+0]=o[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|o[d.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(c){return this._data[3*c+0]>>22}hasWidth(c){return 12582912&this._data[3*c+0]}getFg(c){return this._data[3*c+1]}getBg(c){return this._data[3*c+2]}hasContent(c){return 4194303&this._data[3*c+0]}getCodePoint(c){const o=this._data[3*c+0];return 2097152&o?this._combined[c].charCodeAt(this._combined[c].length-1):2097151&o}isCombined(c){return 2097152&this._data[3*c+0]}getString(c){const o=this._data[3*c+0];return 2097152&o?this._combined[c]:2097151&o?(0,p.stringFromCodePoint)(2097151&o):""}isProtected(c){return 536870912&this._data[3*c+2]}loadCell(c,o){return C=3*c,o.content=this._data[C+0],o.fg=this._data[C+1],o.bg=this._data[C+2],2097152&o.content&&(o.combinedData=this._combined[c]),268435456&o.bg&&(o.extended=this._extendedAttrs[c]),o}setCell(c,o){2097152&o.content&&(this._combined[c]=o.combinedData),268435456&o.bg&&(this._extendedAttrs[c]=o.extended),this._data[3*c+0]=o.content,this._data[3*c+1]=o.fg,this._data[3*c+2]=o.bg}setCellFromCodePoint(c,o,s,l,_,g){268435456&_&&(this._extendedAttrs[c]=g),this._data[3*c+0]=o|s<<22,this._data[3*c+1]=l,this._data[3*c+2]=_}addCodepointToCell(c,o){let s=this._data[3*c+0];2097152&s?this._combined[c]+=(0,p.stringFromCodePoint)(o):(2097151&s?(this._combined[c]=(0,p.stringFromCodePoint)(2097151&s)+(0,p.stringFromCodePoint)(o),s&=-2097152,s|=2097152):s=o|4194304,this._data[3*c+0]=s)}insertCells(c,o,s,l){if((c%=this.length)&&this.getWidth(c-1)===2&&this.setCellFromCodePoint(c-1,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs),o<this.length-c){const _=new S.CellData;for(let g=this.length-c-o-1;g>=0;--g)this.setCell(c+o+g,this.loadCell(c+g,_));for(let g=0;g<o;++g)this.setCell(c+g,s)}else for(let _=c;_<this.length;++_)this.setCell(_,s);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs)}deleteCells(c,o,s,l){if(c%=this.length,o<this.length-c){const _=new S.CellData;for(let g=0;g<this.length-c-o;++g)this.setCell(c+g,this.loadCell(c+o+g,_));for(let g=this.length-o;g<this.length;++g)this.setCell(g,s)}else for(let _=c;_<this.length;++_)this.setCell(_,s);c&&this.getWidth(c-1)===2&&this.setCellFromCodePoint(c-1,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs),this.getWidth(c)!==0||this.hasContent(c)||this.setCellFromCodePoint(c,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs)}replaceCells(c,o,s,l,_=!1){if(_)for(c&&this.getWidth(c-1)===2&&!this.isProtected(c-1)&&this.setCellFromCodePoint(c-1,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs),o<this.length&&this.getWidth(o-1)===2&&!this.isProtected(o)&&this.setCellFromCodePoint(o,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs);c<o&&c<this.length;)this.isProtected(c)||this.setCell(c,s),c++;else for(c&&this.getWidth(c-1)===2&&this.setCellFromCodePoint(c-1,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs),o<this.length&&this.getWidth(o-1)===2&&this.setCellFromCodePoint(o,0,1,(l==null?void 0:l.fg)||0,(l==null?void 0:l.bg)||0,(l==null?void 0:l.extended)||new f.ExtendedAttrs);c<o&&c<this.length;)this.setCell(c++,s)}resize(c,o){if(c===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const s=3*c;if(c>this.length){if(this._data.buffer.byteLength>=4*s)this._data=new Uint32Array(this._data.buffer,0,s);else{const l=new Uint32Array(s);l.set(this._data),this._data=l}for(let l=this.length;l<c;++l)this.setCell(l,o)}else{this._data=this._data.subarray(0,s);const l=Object.keys(this._combined);for(let g=0;g<l.length;g++){const E=parseInt(l[g],10);E>=c&&delete this._combined[E]}const _=Object.keys(this._extendedAttrs);for(let g=0;g<_.length;g++){const E=parseInt(_[g],10);E>=c&&delete this._extendedAttrs[E]}}return this.length=c,4*s*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const c=new Uint32Array(this._data.length);return c.set(this._data),this._data=c,1}return 0}fill(c,o=!1){if(o)for(let s=0;s<this.length;++s)this.isProtected(s)||this.setCell(s,c);else{this._combined={},this._extendedAttrs={};for(let s=0;s<this.length;++s)this.setCell(s,c)}}copyFrom(c){this.length!==c.length?this._data=new Uint32Array(c._data):this._data.set(c._data),this.length=c.length,this._combined={};for(const o in c._combined)this._combined[o]=c._combined[o];this._extendedAttrs={};for(const o in c._extendedAttrs)this._extendedAttrs[o]=c._extendedAttrs[o];this.isWrapped=c.isWrapped}clone(){const c=new w(0);c._data=new Uint32Array(this._data),c.length=this.length;for(const o in this._combined)c._combined[o]=this._combined[o];for(const o in this._extendedAttrs)c._extendedAttrs[o]=this._extendedAttrs[o];return c.isWrapped=this.isWrapped,c}getTrimmedLength(){for(let c=this.length-1;c>=0;--c)if(4194303&this._data[3*c+0])return c+(this._data[3*c+0]>>22);return 0}getNoBgTrimmedLength(){for(let c=this.length-1;c>=0;--c)if(4194303&this._data[3*c+0]||50331648&this._data[3*c+2])return c+(this._data[3*c+0]>>22);return 0}copyCellsFrom(c,o,s,l,_){const g=c._data;if(_)for(let b=l-1;b>=0;b--){for(let v=0;v<3;v++)this._data[3*(s+b)+v]=g[3*(o+b)+v];268435456&g[3*(o+b)+2]&&(this._extendedAttrs[s+b]=c._extendedAttrs[o+b])}else for(let b=0;b<l;b++){for(let v=0;v<3;v++)this._data[3*(s+b)+v]=g[3*(o+b)+v];268435456&g[3*(o+b)+2]&&(this._extendedAttrs[s+b]=c._extendedAttrs[o+b])}const E=Object.keys(c._combined);for(let b=0;b<E.length;b++){const v=parseInt(E[b],10);v>=o&&(this._combined[v-o+s]=c._combined[v])}}translateToString(c=!1,o=0,s=this.length){c&&(s=Math.min(s,this.getTrimmedLength()));let l="";for(;o<s;){const _=this._data[3*o+0],g=2097151&_;l+=2097152&_?this._combined[o]:g?(0,p.stringFromCodePoint)(g):d.WHITESPACE_CELL_CHAR,o+=_>>22||1}return l}}n.BufferLine=w},4841:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getRangeLength=void 0,n.getRangeLength=function(u,f){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return f*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(y,n)=>{function u(f,S,d){if(S===f.length-1)return f[S].getTrimmedLength();const p=!f[S].hasContent(d-1)&&f[S].getWidth(d-1)===1,C=f[S+1].getWidth(0)===2;return p&&C?d-1:d}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(f,S,d,p,C){const w=[];for(let m=0;m<f.length-1;m++){let c=m,o=f.get(++c);if(!o.isWrapped)continue;const s=[f.get(m)];for(;c<f.length&&o.isWrapped;)s.push(o),o=f.get(++c);if(p>=m&&p<c){m+=s.length-1;continue}let l=0,_=u(s,l,S),g=1,E=0;for(;g<s.length;){const v=u(s,g,S),k=v-E,R=d-_,P=Math.min(k,R);s[l].copyCellsFrom(s[g],E,_,P,!1),_+=P,_===d&&(l++,_=0),E+=P,E===v&&(g++,E=0),_===0&&l!==0&&s[l-1].getWidth(d-1)===2&&(s[l].copyCellsFrom(s[l-1],d-1,_++,1,!1),s[l-1].setCell(d-1,C))}s[l].replaceCells(_,d,C);let b=0;for(let v=s.length-1;v>0&&(v>l||s[v].getTrimmedLength()===0);v--)b++;b>0&&(w.push(m+s.length-b),w.push(b)),m+=s.length-1}return w},n.reflowLargerCreateNewLayout=function(f,S){const d=[];let p=0,C=S[p],w=0;for(let m=0;m<f.length;m++)if(C===m){const c=S[++p];f.onDeleteEmitter.fire({index:m-w,amount:c}),m+=c-1,w+=c,C=S[++p]}else d.push(m);return{layout:d,countRemoved:w}},n.reflowLargerApplyNewLayout=function(f,S){const d=[];for(let p=0;p<S.length;p++)d.push(f.get(S[p]));for(let p=0;p<d.length;p++)f.set(p,d[p]);f.length=S.length},n.reflowSmallerGetNewLineLengths=function(f,S,d){const p=[],C=f.map((o,s)=>u(f,s,S)).reduce((o,s)=>o+s);let w=0,m=0,c=0;for(;c<C;){if(C-c<d){p.push(C-c);break}w+=d;const o=u(f,m,S);w>o&&(w-=o,m++);const s=f[m].getWidth(w-1)===2;s&&w--;const l=s?d-1:d;p.push(l),c+=l}return p},n.getWrappedLineTrimmedLength=u},5295:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;const f=u(8460),S=u(844),d=u(9092);class p extends S.Disposable{constructor(w,m){super(),this._optionsService=w,this._bufferService=m,this._onBufferActivate=this.register(new f.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new d.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new d.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(w){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(w),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(w,m){this._normal.resize(w,m),this._alt.resize(w,m),this.setupTabStops(w)}setupTabStops(w){this._normal.setupTabStops(w),this._alt.setupTabStops(w)}}n.BufferSet=p},511:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const f=u(482),S=u(643),d=u(3734);class p extends d.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new d.ExtendedAttrs,this.combinedData=""}static fromCharData(w){const m=new p;return m.setFromCharData(w),m}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(w){this.fg=w[S.CHAR_DATA_ATTR_INDEX],this.bg=0;let m=!1;if(w[S.CHAR_DATA_CHAR_INDEX].length>2)m=!0;else if(w[S.CHAR_DATA_CHAR_INDEX].length===2){const c=w[S.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=c&&c<=56319){const o=w[S.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=o&&o<=57343?this.content=1024*(c-55296)+o-56320+65536|w[S.CHAR_DATA_WIDTH_INDEX]<<22:m=!0}else m=!0}else this.content=w[S.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[S.CHAR_DATA_WIDTH_INDEX]<<22;m&&(this.combinedData=w[S.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[S.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=p},643:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_EXT=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=0,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.DEFAULT_EXT=0,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},4863:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;const f=u(8460),S=u(844);class d{get id(){return this._id}constructor(C){this.line=C,this.isDisposed=!1,this._disposables=[],this._id=d._nextId++,this._onDispose=this.register(new f.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,S.disposeArray)(this._disposables),this._disposables.length=0)}register(C){return this._disposables.push(C),C}}n.Marker=d,d._nextId=1},7116:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_CHARSET=n.CHARSETS=void 0,n.CHARSETS={},n.DEFAULT_CHARSET=n.CHARSETS.B,n.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},n.CHARSETS.A={"#":"£"},n.CHARSETS.B=void 0,n.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},n.CHARSETS.C=n.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},n.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},n.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},n.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},n.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},n.CHARSETS.E=n.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},n.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},n.CHARSETS.H=n.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},n.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(y,n)=>{var u,f,S;Object.defineProperty(n,"__esModule",{value:!0}),n.C1_ESCAPED=n.C1=n.C0=void 0,function(d){d.NUL="\0",d.SOH="",d.STX="",d.ETX="",d.EOT="",d.ENQ="",d.ACK="",d.BEL="\x07",d.BS="\b",d.HT=" ",d.LF=`
|
||
`,d.VT="\v",d.FF="\f",d.CR="\r",d.SO="",d.SI="",d.DLE="",d.DC1="",d.DC2="",d.DC3="",d.DC4="",d.NAK="",d.SYN="",d.ETB="",d.CAN="",d.EM="",d.SUB="",d.ESC="\x1B",d.FS="",d.GS="",d.RS="",d.US="",d.SP=" ",d.DEL=""}(u||(n.C0=u={})),function(d){d.PAD="",d.HOP="",d.BPH="",d.NBH="",d.IND="",d.NEL="
",d.SSA="",d.ESA="",d.HTS="",d.HTJ="",d.VTS="",d.PLD="",d.PLU="",d.RI="",d.SS2="",d.SS3="",d.DCS="",d.PU1="",d.PU2="",d.STS="",d.CCH="",d.MW="",d.SPA="",d.EPA="",d.SOS="",d.SGCI="",d.SCI="",d.CSI="",d.ST="",d.OSC="",d.PM="",d.APC=""}(f||(n.C1=f={})),function(d){d.ST=`${u.ESC}\\`}(S||(n.C1_ESCAPED=S={}))},7399:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const f=u(2584),S={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};n.evaluateKeyboardEvent=function(d,p,C,w){const m={type:0,cancel:!1,key:void 0},c=(d.shiftKey?1:0)|(d.altKey?2:0)|(d.ctrlKey?4:0)|(d.metaKey?8:0);switch(d.keyCode){case 0:d.key==="UIKeyInputUpArrow"?m.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A":d.key==="UIKeyInputLeftArrow"?m.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D":d.key==="UIKeyInputRightArrow"?m.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C":d.key==="UIKeyInputDownArrow"&&(m.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:if(d.altKey){m.key=f.C0.ESC+f.C0.DEL;break}m.key=f.C0.DEL;break;case 9:if(d.shiftKey){m.key=f.C0.ESC+"[Z";break}m.key=f.C0.HT,m.cancel=!0;break;case 13:m.key=d.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,m.cancel=!0;break;case 27:m.key=f.C0.ESC,d.altKey&&(m.key=f.C0.ESC+f.C0.ESC),m.cancel=!0;break;case 37:if(d.metaKey)break;c?(m.key=f.C0.ESC+"[1;"+(c+1)+"D",m.key===f.C0.ESC+"[1;3D"&&(m.key=f.C0.ESC+(C?"b":"[1;5D"))):m.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(d.metaKey)break;c?(m.key=f.C0.ESC+"[1;"+(c+1)+"C",m.key===f.C0.ESC+"[1;3C"&&(m.key=f.C0.ESC+(C?"f":"[1;5C"))):m.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(d.metaKey)break;c?(m.key=f.C0.ESC+"[1;"+(c+1)+"A",C||m.key!==f.C0.ESC+"[1;3A"||(m.key=f.C0.ESC+"[1;5A")):m.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(d.metaKey)break;c?(m.key=f.C0.ESC+"[1;"+(c+1)+"B",C||m.key!==f.C0.ESC+"[1;3B"||(m.key=f.C0.ESC+"[1;5B")):m.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:d.shiftKey||d.ctrlKey||(m.key=f.C0.ESC+"[2~");break;case 46:m.key=c?f.C0.ESC+"[3;"+(c+1)+"~":f.C0.ESC+"[3~";break;case 36:m.key=c?f.C0.ESC+"[1;"+(c+1)+"H":p?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:m.key=c?f.C0.ESC+"[1;"+(c+1)+"F":p?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:d.shiftKey?m.type=2:d.ctrlKey?m.key=f.C0.ESC+"[5;"+(c+1)+"~":m.key=f.C0.ESC+"[5~";break;case 34:d.shiftKey?m.type=3:d.ctrlKey?m.key=f.C0.ESC+"[6;"+(c+1)+"~":m.key=f.C0.ESC+"[6~";break;case 112:m.key=c?f.C0.ESC+"[1;"+(c+1)+"P":f.C0.ESC+"OP";break;case 113:m.key=c?f.C0.ESC+"[1;"+(c+1)+"Q":f.C0.ESC+"OQ";break;case 114:m.key=c?f.C0.ESC+"[1;"+(c+1)+"R":f.C0.ESC+"OR";break;case 115:m.key=c?f.C0.ESC+"[1;"+(c+1)+"S":f.C0.ESC+"OS";break;case 116:m.key=c?f.C0.ESC+"[15;"+(c+1)+"~":f.C0.ESC+"[15~";break;case 117:m.key=c?f.C0.ESC+"[17;"+(c+1)+"~":f.C0.ESC+"[17~";break;case 118:m.key=c?f.C0.ESC+"[18;"+(c+1)+"~":f.C0.ESC+"[18~";break;case 119:m.key=c?f.C0.ESC+"[19;"+(c+1)+"~":f.C0.ESC+"[19~";break;case 120:m.key=c?f.C0.ESC+"[20;"+(c+1)+"~":f.C0.ESC+"[20~";break;case 121:m.key=c?f.C0.ESC+"[21;"+(c+1)+"~":f.C0.ESC+"[21~";break;case 122:m.key=c?f.C0.ESC+"[23;"+(c+1)+"~":f.C0.ESC+"[23~";break;case 123:m.key=c?f.C0.ESC+"[24;"+(c+1)+"~":f.C0.ESC+"[24~";break;default:if(!d.ctrlKey||d.shiftKey||d.altKey||d.metaKey)if(C&&!w||!d.altKey||d.metaKey)!C||d.altKey||d.ctrlKey||d.shiftKey||!d.metaKey?d.key&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&d.keyCode>=48&&d.key.length===1?m.key=d.key:d.key&&d.ctrlKey&&(d.key==="_"&&(m.key=f.C0.US),d.key==="@"&&(m.key=f.C0.NUL)):d.keyCode===65&&(m.type=1);else{const o=S[d.keyCode],s=o==null?void 0:o[d.shiftKey?1:0];if(s)m.key=f.C0.ESC+s;else if(d.keyCode>=65&&d.keyCode<=90){const l=d.ctrlKey?d.keyCode-64:d.keyCode+32;let _=String.fromCharCode(l);d.shiftKey&&(_=_.toUpperCase()),m.key=f.C0.ESC+_}else if(d.keyCode===32)m.key=f.C0.ESC+(d.ctrlKey?f.C0.NUL:" ");else if(d.key==="Dead"&&d.code.startsWith("Key")){let l=d.code.slice(3,4);d.shiftKey||(l=l.toLowerCase()),m.key=f.C0.ESC+l,m.cancel=!0}}else d.keyCode>=65&&d.keyCode<=90?m.key=String.fromCharCode(d.keyCode-64):d.keyCode===32?m.key=f.C0.NUL:d.keyCode>=51&&d.keyCode<=55?m.key=String.fromCharCode(d.keyCode-51+27):d.keyCode===56?m.key=f.C0.DEL:d.keyCode===219?m.key=f.C0.ESC:d.keyCode===220?m.key=f.C0.FS:d.keyCode===221&&(m.key=f.C0.GS)}return m}},482:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,f=0,S=u.length){let d="";for(let p=f;p<S;++p){let C=u[p];C>65535?(C-=65536,d+=String.fromCharCode(55296+(C>>10))+String.fromCharCode(C%1024+56320)):d+=String.fromCharCode(C)}return d},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const S=u.length;if(!S)return 0;let d=0,p=0;if(this._interim){const C=u.charCodeAt(p++);56320<=C&&C<=57343?f[d++]=1024*(this._interim-55296)+C-56320+65536:(f[d++]=this._interim,f[d++]=C),this._interim=0}for(let C=p;C<S;++C){const w=u.charCodeAt(C);if(55296<=w&&w<=56319){if(++C>=S)return this._interim=w,d;const m=u.charCodeAt(C);56320<=m&&m<=57343?f[d++]=1024*(w-55296)+m-56320+65536:(f[d++]=w,f[d++]=m)}else w!==65279&&(f[d++]=w)}return d}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const S=u.length;if(!S)return 0;let d,p,C,w,m=0,c=0,o=0;if(this.interim[0]){let _=!1,g=this.interim[0];g&=(224&g)==192?31:(240&g)==224?15:7;let E,b=0;for(;(E=63&this.interim[++b])&&b<4;)g<<=6,g|=E;const v=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,k=v-b;for(;o<k;){if(o>=S)return 0;if(E=u[o++],(192&E)!=128){o--,_=!0;break}this.interim[b++]=E,g<<=6,g|=63&E}_||(v===2?g<128?o--:f[m++]=g:v===3?g<2048||g>=55296&&g<=57343||g===65279||(f[m++]=g):g<65536||g>1114111||(f[m++]=g)),this.interim.fill(0)}const s=S-4;let l=o;for(;l<S;){for(;!(!(l<s)||128&(d=u[l])||128&(p=u[l+1])||128&(C=u[l+2])||128&(w=u[l+3]));)f[m++]=d,f[m++]=p,f[m++]=C,f[m++]=w,l+=4;if(d=u[l++],d<128)f[m++]=d;else if((224&d)==192){if(l>=S)return this.interim[0]=d,m;if(p=u[l++],(192&p)!=128){l--;continue}if(c=(31&d)<<6|63&p,c<128){l--;continue}f[m++]=c}else if((240&d)==224){if(l>=S)return this.interim[0]=d,m;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=S)return this.interim[0]=d,this.interim[1]=p,m;if(C=u[l++],(192&C)!=128){l--;continue}if(c=(15&d)<<12|(63&p)<<6|63&C,c<2048||c>=55296&&c<=57343||c===65279)continue;f[m++]=c}else if((248&d)==240){if(l>=S)return this.interim[0]=d,m;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=S)return this.interim[0]=d,this.interim[1]=p,m;if(C=u[l++],(192&C)!=128){l--;continue}if(l>=S)return this.interim[0]=d,this.interim[1]=p,this.interim[2]=C,m;if(w=u[l++],(192&w)!=128){l--;continue}if(c=(7&d)<<18|(63&p)<<12|(63&C)<<6|63&w,c<65536||c>1114111)continue;f[m++]=c}}return m}}},225:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const u=[[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]],f=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let S;n.UnicodeV6=class{constructor(){if(this.version="6",!S){S=new Uint8Array(65536),S.fill(1),S[0]=0,S.fill(0,1,32),S.fill(0,127,160),S.fill(2,4352,4448),S[9001]=2,S[9002]=2,S.fill(2,11904,42192),S[12351]=1,S.fill(2,44032,55204),S.fill(2,63744,64256),S.fill(2,65040,65050),S.fill(2,65072,65136),S.fill(2,65280,65377),S.fill(2,65504,65511);for(let d=0;d<u.length;++d)S.fill(0,u[d][0],u[d][1]+1)}}wcwidth(d){return d<32?0:d<127?1:d<65536?S[d]:function(p,C){let w,m=0,c=C.length-1;if(p<C[0][0]||p>C[c][1])return!1;for(;c>=m;)if(w=m+c>>1,p>C[w][1])m=w+1;else{if(!(p<C[w][0]))return!0;c=w-1}return!1}(d,f)?0:d>=131072&&d<=196605||d>=196608&&d<=262141?2:1}}},5981:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;const f=u(8460),S=u(844);class d extends S.Disposable{constructor(C){super(),this._action=C,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new f.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(C,w){if(w!==void 0&&this._syncCalls>w)return void(this._syncCalls=0);if(this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let m;for(this._isSyncWriting=!0;m=this._writeBuffer.shift();){this._action(m);const c=this._callbacks.shift();c&&c()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(C,w){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(w),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(w)}_innerWrite(C=0,w=!0){const m=C||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const c=this._writeBuffer[this._bufferOffset],o=this._action(c,w);if(o){const l=_=>Date.now()-m>=12?setTimeout(()=>this._innerWrite(0,_)):this._innerWrite(m,_);return void o.catch(_=>(queueMicrotask(()=>{throw _}),Promise.resolve(!1))).then(l)}const s=this._callbacks[this._bufferOffset];if(s&&s(),this._bufferOffset++,this._pendingData-=c.length,Date.now()-m>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}n.WriteBuffer=d},5941:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.toRgbString=n.parseColor=void 0;const u=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,f=/^[\da-f]+$/;function S(d,p){const C=d.toString(16),w=C.length<2?"0"+C:C;switch(p){case 4:return C[0];case 8:return w;case 12:return(w+w).slice(0,3);default:return w+w}}n.parseColor=function(d){if(!d)return;let p=d.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const C=u.exec(p);if(C){const w=C[1]?15:C[4]?255:C[7]?4095:65535;return[Math.round(parseInt(C[1]||C[4]||C[7]||C[10],16)/w*255),Math.round(parseInt(C[2]||C[5]||C[8]||C[11],16)/w*255),Math.round(parseInt(C[3]||C[6]||C[9]||C[12],16)/w*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),f.exec(p)&&[3,6,9,12].includes(p.length))){const C=p.length/3,w=[0,0,0];for(let m=0;m<3;++m){const c=parseInt(p.slice(C*m,C*m+C),16);w[m]=C===1?c<<4:C===2?c:C===3?c>>4:c>>8}return w}},n.toRgbString=function(d,p=16){const[C,w,m]=d;return`rgb:${S(C,p)}/${S(w,p)}/${S(m,p)}`}},5770:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},6351:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;const f=u(482),S=u(8742),d=u(5770),p=[];n.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(w,m){this._handlers[w]===void 0&&(this._handlers[w]=[]);const c=this._handlers[w];return c.push(m),{dispose:()=>{const o=c.indexOf(m);o!==-1&&c.splice(o,1)}}}clearHandler(w){this._handlers[w]&&delete this._handlers[w]}setHandlerFallback(w){this._handlerFb=w}reset(){if(this._active.length)for(let w=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;w>=0;--w)this._active[w].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(w,m){if(this.reset(),this._ident=w,this._active=this._handlers[w]||p,this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].hook(m);else this._handlerFb(this._ident,"HOOK",m)}put(w,m,c){if(this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].put(w,m,c);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(w,m,c))}unhook(w,m=!0){if(this._active.length){let c=!1,o=this._active.length-1,s=!1;if(this._stack.paused&&(o=this._stack.loopPosition-1,c=m,s=this._stack.fallThrough,this._stack.paused=!1),!s&&c===!1){for(;o>=0&&(c=this._active[o].unhook(w),c!==!0);o--)if(c instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!1,c;o--}for(;o>=0;o--)if(c=this._active[o].unhook(!1),c instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!0,c}else this._handlerFb(this._ident,"UNHOOK",w);this._active=p,this._ident=0}};const C=new S.Params;C.addParam(0),n.DcsHandler=class{constructor(w){this._handler=w,this._data="",this._params=C,this._hitLimit=!1}hook(w){this._params=w.length>1||w.params[0]?w.clone():C,this._data="",this._hitLimit=!1}put(w,m,c){this._hitLimit||(this._data+=(0,f.utf32ToString)(w,m,c),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(w){let m=!1;if(this._hitLimit)m=!1;else if(w&&(m=this._handler(this._data,this._params),m instanceof Promise))return m.then(c=>(this._params=C,this._data="",this._hitLimit=!1,c));return this._params=C,this._data="",this._hitLimit=!1,m}}},2015:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;const f=u(844),S=u(8742),d=u(6242),p=u(6351);class C{constructor(o){this.table=new Uint8Array(o)}setDefault(o,s){this.table.fill(o<<4|s)}add(o,s,l,_){this.table[s<<8|o]=l<<4|_}addMany(o,s,l,_){for(let g=0;g<o.length;g++)this.table[s<<8|o[g]]=l<<4|_}}n.TransitionTable=C;const w=160;n.VT500_TRANSITION_TABLE=function(){const c=new C(4095),o=Array.apply(null,Array(256)).map((b,v)=>v),s=(b,v)=>o.slice(b,v),l=s(32,127),_=s(0,24);_.push(25),_.push.apply(_,s(28,32));const g=s(0,14);let E;for(E in c.setDefault(1,0),c.addMany(l,0,2,0),g)c.addMany([24,26,153,154],E,3,0),c.addMany(s(128,144),E,3,0),c.addMany(s(144,152),E,3,0),c.add(156,E,0,0),c.add(27,E,11,1),c.add(157,E,4,8),c.addMany([152,158,159],E,0,7),c.add(155,E,11,3),c.add(144,E,11,9);return c.addMany(_,0,3,0),c.addMany(_,1,3,1),c.add(127,1,0,1),c.addMany(_,8,0,8),c.addMany(_,3,3,3),c.add(127,3,0,3),c.addMany(_,4,3,4),c.add(127,4,0,4),c.addMany(_,6,3,6),c.addMany(_,5,3,5),c.add(127,5,0,5),c.addMany(_,2,3,2),c.add(127,2,0,2),c.add(93,1,4,8),c.addMany(l,8,5,8),c.add(127,8,5,8),c.addMany([156,27,24,26,7],8,6,0),c.addMany(s(28,32),8,0,8),c.addMany([88,94,95],1,0,7),c.addMany(l,7,0,7),c.addMany(_,7,0,7),c.add(156,7,0,0),c.add(127,7,0,7),c.add(91,1,11,3),c.addMany(s(64,127),3,7,0),c.addMany(s(48,60),3,8,4),c.addMany([60,61,62,63],3,9,4),c.addMany(s(48,60),4,8,4),c.addMany(s(64,127),4,7,0),c.addMany([60,61,62,63],4,0,6),c.addMany(s(32,64),6,0,6),c.add(127,6,0,6),c.addMany(s(64,127),6,0,0),c.addMany(s(32,48),3,9,5),c.addMany(s(32,48),5,9,5),c.addMany(s(48,64),5,0,6),c.addMany(s(64,127),5,7,0),c.addMany(s(32,48),4,9,5),c.addMany(s(32,48),1,9,2),c.addMany(s(32,48),2,9,2),c.addMany(s(48,127),2,10,0),c.addMany(s(48,80),1,10,0),c.addMany(s(81,88),1,10,0),c.addMany([89,90,92],1,10,0),c.addMany(s(96,127),1,10,0),c.add(80,1,11,9),c.addMany(_,9,0,9),c.add(127,9,0,9),c.addMany(s(28,32),9,0,9),c.addMany(s(32,48),9,9,12),c.addMany(s(48,60),9,8,10),c.addMany([60,61,62,63],9,9,10),c.addMany(_,11,0,11),c.addMany(s(32,128),11,0,11),c.addMany(s(28,32),11,0,11),c.addMany(_,10,0,10),c.add(127,10,0,10),c.addMany(s(28,32),10,0,10),c.addMany(s(48,60),10,8,10),c.addMany([60,61,62,63],10,0,11),c.addMany(s(32,48),10,9,12),c.addMany(_,12,0,12),c.add(127,12,0,12),c.addMany(s(28,32),12,0,12),c.addMany(s(32,48),12,9,12),c.addMany(s(48,64),12,0,11),c.addMany(s(64,127),12,12,13),c.addMany(s(64,127),10,12,13),c.addMany(s(64,127),9,12,13),c.addMany(_,13,13,13),c.addMany(l,13,13,13),c.add(127,13,0,13),c.addMany([27,156,24,26],13,14,0),c.add(w,0,2,0),c.add(w,8,5,8),c.add(w,6,0,6),c.add(w,11,0,11),c.add(w,13,13,13),c}();class m extends f.Disposable{constructor(o=n.VT500_TRANSITION_TABLE){super(),this._transitions=o,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new S.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(s,l,_)=>{},this._executeHandlerFb=s=>{},this._csiHandlerFb=(s,l)=>{},this._escHandlerFb=s=>{},this._errorHandlerFb=s=>s,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,f.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new d.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(o,s=[64,126]){let l=0;if(o.prefix){if(o.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=o.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(o.intermediates){if(o.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let g=0;g<o.intermediates.length;++g){const E=o.intermediates.charCodeAt(g);if(32>E||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=E}}if(o.final.length!==1)throw new Error("final must be a single byte");const _=o.final.charCodeAt(0);if(s[0]>_||_>s[1])throw new Error(`final must be in range ${s[0]} .. ${s[1]}`);return l<<=8,l|=_,l}identToString(o){const s=[];for(;o;)s.push(String.fromCharCode(255&o)),o>>=8;return s.reverse().join("")}setPrintHandler(o){this._printHandler=o}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(o,s){const l=this._identifier(o,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const _=this._escHandlers[l];return _.push(s),{dispose:()=>{const g=_.indexOf(s);g!==-1&&_.splice(g,1)}}}clearEscHandler(o){this._escHandlers[this._identifier(o,[48,126])]&&delete this._escHandlers[this._identifier(o,[48,126])]}setEscHandlerFallback(o){this._escHandlerFb=o}setExecuteHandler(o,s){this._executeHandlers[o.charCodeAt(0)]=s}clearExecuteHandler(o){this._executeHandlers[o.charCodeAt(0)]&&delete this._executeHandlers[o.charCodeAt(0)]}setExecuteHandlerFallback(o){this._executeHandlerFb=o}registerCsiHandler(o,s){const l=this._identifier(o);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const _=this._csiHandlers[l];return _.push(s),{dispose:()=>{const g=_.indexOf(s);g!==-1&&_.splice(g,1)}}}clearCsiHandler(o){this._csiHandlers[this._identifier(o)]&&delete this._csiHandlers[this._identifier(o)]}setCsiHandlerFallback(o){this._csiHandlerFb=o}registerDcsHandler(o,s){return this._dcsParser.registerHandler(this._identifier(o),s)}clearDcsHandler(o){this._dcsParser.clearHandler(this._identifier(o))}setDcsHandlerFallback(o){this._dcsParser.setHandlerFallback(o)}registerOscHandler(o,s){return this._oscParser.registerHandler(o,s)}clearOscHandler(o){this._oscParser.clearHandler(o)}setOscHandlerFallback(o){this._oscParser.setHandlerFallback(o)}setErrorHandler(o){this._errorHandler=o}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.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(o,s,l,_,g){this._parseStack.state=o,this._parseStack.handlers=s,this._parseStack.handlerPos=l,this._parseStack.transition=_,this._parseStack.chunkPos=g}parse(o,s,l){let _,g=0,E=0,b=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,b=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const v=this._parseStack.handlers;let k=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&k>-1){for(;k>=0&&(_=v[k](this._params),_!==!0);k--)if(_ instanceof Promise)return this._parseStack.handlerPos=k,_}this._parseStack.handlers=[];break;case 4:if(l===!1&&k>-1){for(;k>=0&&(_=v[k](),_!==!0);k--)if(_ instanceof Promise)return this._parseStack.handlerPos=k,_}this._parseStack.handlers=[];break;case 6:if(g=o[this._parseStack.chunkPos],_=this._dcsParser.unhook(g!==24&&g!==26,l),_)return _;g===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(g=o[this._parseStack.chunkPos],_=this._oscParser.end(g!==24&&g!==26,l),_)return _;g===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,b=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(let v=b;v<s;++v){switch(g=o[v],E=this._transitions.table[this.currentState<<8|(g<160?g:w)],E>>4){case 2:for(let B=v+1;;++B){if(B>=s||(g=o[B])<32||g>126&&g<w){this._printHandler(o,v,B),v=B-1;break}if(++B>=s||(g=o[B])<32||g>126&&g<w){this._printHandler(o,v,B),v=B-1;break}if(++B>=s||(g=o[B])<32||g>126&&g<w){this._printHandler(o,v,B),v=B-1;break}if(++B>=s||(g=o[B])<32||g>126&&g<w){this._printHandler(o,v,B),v=B-1;break}}break;case 3:this._executeHandlers[g]?this._executeHandlers[g]():this._executeHandlerFb(g),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:v,code:g,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const k=this._csiHandlers[this._collect<<8|g];let R=k?k.length-1:-1;for(;R>=0&&(_=k[R](this._params),_!==!0);R--)if(_ instanceof Promise)return this._preserveStack(3,k,R,E,v),_;R<0&&this._csiHandlerFb(this._collect<<8|g,this._params),this.precedingCodepoint=0;break;case 8:do switch(g){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(g-48)}while(++v<s&&(g=o[v])>47&&g<60);v--;break;case 9:this._collect<<=8,this._collect|=g;break;case 10:const P=this._escHandlers[this._collect<<8|g];let A=P?P.length-1:-1;for(;A>=0&&(_=P[A](),_!==!0);A--)if(_ instanceof Promise)return this._preserveStack(4,P,A,E,v),_;A<0&&this._escHandlerFb(this._collect<<8|g),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|g,this._params);break;case 13:for(let B=v+1;;++B)if(B>=s||(g=o[B])===24||g===26||g===27||g>127&&g<w){this._dcsParser.put(o,v,B),v=B-1;break}break;case 14:if(_=this._dcsParser.unhook(g!==24&&g!==26),_)return this._preserveStack(6,[],0,E,v),_;g===27&&(E|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(let B=v+1;;B++)if(B>=s||(g=o[B])<32||g>127&&g<w){this._oscParser.put(o,v,B),v=B-1;break}break;case 6:if(_=this._oscParser.end(g!==24&&g!==26),_)return this._preserveStack(5,[],0,E,v),_;g===27&&(E|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&E}}}n.EscapeSequenceParser=m},6242:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;const f=u(5770),S=u(482),d=[];n.OscParser=class{constructor(){this._state=0,this._active=d,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,C){this._handlers[p]===void 0&&(this._handlers[p]=[]);const w=this._handlers[p];return w.push(C),{dispose:()=>{const m=w.indexOf(C);m!==-1&&w.splice(m,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=d}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=d,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||d,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,C,w){if(this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].put(p,C,w);else this._handlerFb(this._id,"PUT",(0,S.utf32ToString)(p,C,w))}start(){this.reset(),this._state=1}put(p,C,w){if(this._state!==3){if(this._state===1)for(;C<w;){const m=p[C++];if(m===59){this._state=2,this._start();break}if(m<48||57<m)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+m-48}this._state===2&&w-C>0&&this._put(p,C,w)}}end(p,C=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let w=!1,m=this._active.length-1,c=!1;if(this._stack.paused&&(m=this._stack.loopPosition-1,w=C,c=this._stack.fallThrough,this._stack.paused=!1),!c&&w===!1){for(;m>=0&&(w=this._active[m].end(p),w!==!0);m--)if(w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!1,w;m--}for(;m>=0;m--)if(w=this._active[m].end(!1),w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!0,w}else this._handlerFb(this._id,"END",p);this._active=d,this._id=-1,this._state=0}}},n.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,C,w){this._hitLimit||(this._data+=(0,S.utf32ToString)(p,C,w),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let C=!1;if(this._hitLimit)C=!1;else if(p&&(C=this._handler(this._data),C instanceof Promise))return C.then(w=>(this._data="",this._hitLimit=!1,w));return this._data="",this._hitLimit=!1,C}}},8742:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;const u=2147483647;class f{static fromArray(d){const p=new f;if(!d.length)return p;for(let C=Array.isArray(d[0])?1:0;C<d.length;++C){const w=d[C];if(Array.isArray(w))for(let m=0;m<w.length;++m)p.addSubParam(w[m]);else p.addParam(w)}return p}constructor(d=32,p=32){if(this.maxLength=d,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(d),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(d),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const d=new f(this.maxLength,this.maxSubParamsLength);return d.params.set(this.params),d.length=this.length,d._subParams.set(this._subParams),d._subParamsLength=this._subParamsLength,d._subParamsIdx.set(this._subParamsIdx),d._rejectDigits=this._rejectDigits,d._rejectSubDigits=this._rejectSubDigits,d._digitIsSub=this._digitIsSub,d}toArray(){const d=[];for(let p=0;p<this.length;++p){d.push(this.params[p]);const C=this._subParamsIdx[p]>>8,w=255&this._subParamsIdx[p];w-C>0&&d.push(Array.prototype.slice.call(this._subParams,C,w))}return d}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(d){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=d>u?u:d}}addSubParam(d){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=d>u?u:d,this._subParamsIdx[this.length-1]++}}hasSubParams(d){return(255&this._subParamsIdx[d])-(this._subParamsIdx[d]>>8)>0}getSubParams(d){const p=this._subParamsIdx[d]>>8,C=255&this._subParamsIdx[d];return C-p>0?this._subParams.subarray(p,C):null}getSubParamsAll(){const d={};for(let p=0;p<this.length;++p){const C=this._subParamsIdx[p]>>8,w=255&this._subParamsIdx[p];w-C>0&&(d[p]=this._subParams.slice(C,w))}return d}addDigit(d){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const C=this._digitIsSub?this._subParams:this.params,w=C[p-1];C[p-1]=~w?Math.min(10*w+d,u):d}}n.Params=f},5741:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0,n.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,f){const S={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(S),f.dispose=()=>this._wrappedAddonDispose(S),f.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let f=-1;for(let S=0;S<this._addons.length;S++)if(this._addons[S]===u){f=S;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(f,1)}}},8771:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferApiView=void 0;const f=u(3785),S=u(511);n.BufferApiView=class{constructor(d,p){this._buffer=d,this.type=p}init(d){return this._buffer=d,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(d){const p=this._buffer.lines.get(d);if(p)return new f.BufferLineApiView(p)}getNullCell(){return new S.CellData}}},3785:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLineApiView=void 0;const f=u(511);n.BufferLineApiView=class{constructor(S){this._line=S}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(S,d){if(!(S<0||S>=this._line.length))return d?(this._line.loadCell(S,d),d):this._line.loadCell(S,new f.CellData)}translateToString(S,d,p){return this._line.translateToString(S,d,p)}}},8285:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const f=u(8771),S=u(8460),d=u(844);class p extends d.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new S.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}n.BufferNamespaceApi=p},7975:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ParserApi=void 0,n.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,f){return this._core.registerCsiHandler(u,S=>f(S.toArray()))}addCsiHandler(u,f){return this.registerCsiHandler(u,f)}registerDcsHandler(u,f){return this._core.registerDcsHandler(u,(S,d)=>f(S,d.toArray()))}addDcsHandler(u,f){return this.registerDcsHandler(u,f)}registerEscHandler(u,f){return this._core.registerEscHandler(u,f)}addEscHandler(u,f){return this.registerEscHandler(u,f)}registerOscHandler(u,f){return this._core.registerOscHandler(u,f)}addOscHandler(u,f){return this.registerOscHandler(u,f)}}},7090:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeApi=void 0,n.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(y,n,u){var f=this&&this.__decorate||function(c,o,s,l){var _,g=arguments.length,E=g<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,s):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,o,s,l);else for(var b=c.length-1;b>=0;b--)(_=c[b])&&(E=(g<3?_(E):g>3?_(o,s,E):_(o,s))||E);return g>3&&E&&Object.defineProperty(o,s,E),E},S=this&&this.__param||function(c,o){return function(s,l){o(s,l,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;const d=u(8460),p=u(844),C=u(5295),w=u(2585);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;let m=n.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(c){super(),this.isUserScrolling=!1,this._onResize=this.register(new d.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new d.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(c.rawOptions.cols||0,n.MINIMUM_COLS),this.rows=Math.max(c.rawOptions.rows||0,n.MINIMUM_ROWS),this.buffers=this.register(new C.BufferSet(c,this))}resize(c,o){this.cols=c,this.rows=o,this.buffers.resize(c,o),this._onResize.fire({cols:c,rows:o})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(c,o=!1){const s=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===c.fg&&l.getBg(0)===c.bg||(l=s.getBlankLine(c,o),this._cachedBlankLine=l),l.isWrapped=o;const _=s.ybase+s.scrollTop,g=s.ybase+s.scrollBottom;if(s.scrollTop===0){const E=s.lines.isFull;g===s.lines.length-1?E?s.lines.recycle().copyFrom(l):s.lines.push(l.clone()):s.lines.splice(g+1,0,l.clone()),E?this.isUserScrolling&&(s.ydisp=Math.max(s.ydisp-1,0)):(s.ybase++,this.isUserScrolling||s.ydisp++)}else{const E=g-_+1;s.lines.shiftElements(_+1,E-1,-1),s.lines.set(g,l.clone())}this.isUserScrolling||(s.ydisp=s.ybase),this._onScroll.fire(s.ydisp)}scrollLines(c,o,s){const l=this.buffer;if(c<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else c+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const _=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+c,l.ybase),0),_!==l.ydisp&&(o||this._onScroll.fire(l.ydisp))}};n.BufferService=m=f([S(0,w.IOptionsService)],m)},7994:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CharsetService=void 0,n.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,f){this._charsets[u]=f,this.glevel===u&&(this.charset=f)}}},1753:function(y,n,u){var f=this&&this.__decorate||function(l,_,g,E){var b,v=arguments.length,k=v<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(l,_,g,E);else for(var R=l.length-1;R>=0;R--)(b=l[R])&&(k=(v<3?b(k):v>3?b(_,g,k):b(_,g))||k);return v>3&&k&&Object.defineProperty(_,g,k),k},S=this&&this.__param||function(l,_){return function(g,E){_(g,E,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;const d=u(2585),p=u(8460),C=u(844),w={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function m(l,_){let g=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(g|=64,g|=l.action):(g|=3&l.button,4&l.button&&(g|=64),8&l.button&&(g|=128),l.action===32?g|=32:l.action!==0||_||(g|=3)),g}const c=String.fromCharCode,o={DEFAULT:l=>{const _=[m(l,!1)+32,l.col+32,l.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${c(_[0])}${c(_[1])}${c(_[2])}`},SGR:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${m(l,!0)};${l.col};${l.row}${_}`},SGR_PIXELS:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${m(l,!0)};${l.x};${l.y}${_}`}};let s=n.CoreMouseService=class extends C.Disposable{constructor(l,_){super(),this._bufferService=l,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const g of Object.keys(w))this.addProtocol(g,w[g]);for(const g of Object.keys(o))this.addEncoding(g,o[g]);this.reset()}addProtocol(l,_){this._protocols[l]=_}addEncoding(l,_){this._encodings[l]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const _=this._encodings[this._activeEncoding](l);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,_,g){if(g){if(l.x!==_.x||l.y!==_.y)return!1}else if(l.col!==_.col||l.row!==_.row)return!1;return l.button===_.button&&l.action===_.action&&l.ctrl===_.ctrl&&l.alt===_.alt&&l.shift===_.shift}};n.CoreMouseService=s=f([S(0,d.IBufferService),S(1,d.ICoreService)],s)},6975:function(y,n,u){var f=this&&this.__decorate||function(s,l,_,g){var E,b=arguments.length,v=b<3?l:g===null?g=Object.getOwnPropertyDescriptor(l,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(s,l,_,g);else for(var k=s.length-1;k>=0;k--)(E=s[k])&&(v=(b<3?E(v):b>3?E(l,_,v):E(l,_))||v);return b>3&&v&&Object.defineProperty(l,_,v),v},S=this&&this.__param||function(s,l){return function(_,g){l(_,g,s)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const d=u(1439),p=u(8460),C=u(844),w=u(2585),m=Object.freeze({insertMode:!1}),c=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let o=n.CoreService=class extends C.Disposable{constructor(s,l,_){super(),this._bufferService=s,this._logService=l,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,d.clone)(m),this.decPrivateModes=(0,d.clone)(c)}reset(){this.modes=(0,d.clone)(m),this.decPrivateModes=(0,d.clone)(c)}triggerDataEvent(s,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${s}"`,()=>s.split("").map(g=>g.charCodeAt(0))),this._onData.fire(s)}triggerBinaryEvent(s){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${s}"`,()=>s.split("").map(l=>l.charCodeAt(0))),this._onBinary.fire(s))}};n.CoreService=o=f([S(0,w.IBufferService),S(1,w.ILogService),S(2,w.IOptionsService)],o)},9074:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DecorationService=void 0;const f=u(8055),S=u(8460),d=u(844),p=u(6106);let C=0,w=0;class m extends d.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList(s=>s==null?void 0:s.marker.line),this._onDecorationRegistered=this.register(new S.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new S.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,d.toDisposable)(()=>this.reset()))}registerDecoration(s){if(s.marker.isDisposed)return;const l=new c(s);if(l){const _=l.marker.onDispose(()=>l.dispose());l.onDispose(()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),_.dispose())}),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const s of this._decorations.values())s.dispose();this._decorations.clear()}*getDecorationsAtCell(s,l,_){var g,E,b;let v=0,k=0;for(const R of this._decorations.getKeyIterator(l))v=(g=R.options.x)!==null&&g!==void 0?g:0,k=v+((E=R.options.width)!==null&&E!==void 0?E:1),s>=v&&s<k&&(!_||((b=R.options.layer)!==null&&b!==void 0?b:"bottom")===_)&&(yield R)}forEachDecorationAtCell(s,l,_,g){this._decorations.forEachByKey(l,E=>{var b,v,k;C=(b=E.options.x)!==null&&b!==void 0?b:0,w=C+((v=E.options.width)!==null&&v!==void 0?v:1),s>=C&&s<w&&(!_||((k=E.options.layer)!==null&&k!==void 0?k:"bottom")===_)&&g(E)})}}n.DecorationService=m;class c extends d.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(s){super(),this.options=s,this.onRenderEmitter=this.register(new S.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new S.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=s.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;const f=u(2585),S=u(8343);class d{constructor(...C){this._entries=new Map;for(const[w,m]of C)this.set(w,m)}set(C,w){const m=this._entries.get(C);return this._entries.set(C,w),m}forEach(C){for(const[w,m]of this._entries.entries())C(w,m)}has(C){return this._entries.has(C)}get(C){return this._entries.get(C)}}n.ServiceCollection=d,n.InstantiationService=class{constructor(){this._services=new d,this._services.set(f.IInstantiationService,this)}setService(p,C){this._services.set(p,C)}getService(p){return this._services.get(p)}createInstance(p,...C){const w=(0,S.getServiceDependencies)(p).sort((o,s)=>o.index-s.index),m=[];for(const o of w){const s=this._services.get(o.id);if(!s)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${o.id}.`);m.push(s)}const c=w.length>0?w[0].index:C.length;if(C.length!==c)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${c+1} conflicts with ${C.length} static arguments`);return new p(...C,...m)}}},7866:function(y,n,u){var f=this&&this.__decorate||function(c,o,s,l){var _,g=arguments.length,E=g<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,s):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,o,s,l);else for(var b=c.length-1;b>=0;b--)(_=c[b])&&(E=(g<3?_(E):g>3?_(o,s,E):_(o,s))||E);return g>3&&E&&Object.defineProperty(o,s,E),E},S=this&&this.__param||function(c,o){return function(s,l){o(s,l,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const d=u(844),p=u(2585),C={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let w,m=n.LogService=class extends d.Disposable{get logLevel(){return this._logLevel}constructor(c){super(),this._optionsService=c,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),w=this}_updateLogLevel(){this._logLevel=C[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(c){for(let o=0;o<c.length;o++)typeof c[o]=="function"&&(c[o]=c[o]())}_log(c,o,s){this._evalLazyOptionalParams(s),c.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+o,...s)}trace(c,...o){var s,l;this._logLevel<=p.LogLevelEnum.TRACE&&this._log((l=(s=this._optionsService.options.logger)===null||s===void 0?void 0:s.trace.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.log,c,o)}debug(c,...o){var s,l;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log((l=(s=this._optionsService.options.logger)===null||s===void 0?void 0:s.debug.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.log,c,o)}info(c,...o){var s,l;this._logLevel<=p.LogLevelEnum.INFO&&this._log((l=(s=this._optionsService.options.logger)===null||s===void 0?void 0:s.info.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.info,c,o)}warn(c,...o){var s,l;this._logLevel<=p.LogLevelEnum.WARN&&this._log((l=(s=this._optionsService.options.logger)===null||s===void 0?void 0:s.warn.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.warn,c,o)}error(c,...o){var s,l;this._logLevel<=p.LogLevelEnum.ERROR&&this._log((l=(s=this._optionsService.options.logger)===null||s===void 0?void 0:s.error.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.error,c,o)}};n.LogService=m=f([S(0,p.IOptionsService)],m),n.setTraceLogger=function(c){w=c},n.traceCall=function(c,o,s){if(typeof s.value!="function")throw new Error("not supported");const l=s.value;s.value=function(..._){if(w.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,_);w.trace(`GlyphRenderer#${l.name}(${_.map(E=>JSON.stringify(E)).join(", ")})`);const g=l.apply(this,_);return w.trace(`GlyphRenderer#${l.name} return`,g),g}}},7302:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=void 0;const f=u(8460),S=u(844),d=u(6114);n.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:d.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class C extends S.Disposable{constructor(m){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const c=Object.assign({},n.DEFAULT_OPTIONS);for(const o in m)if(o in c)try{const s=m[o];c[o]=this._sanitizeAndValidateOption(o,s)}catch(s){console.error(s)}this.rawOptions=c,this.options=Object.assign({},c),this._setupOptions()}onSpecificOptionChange(m,c){return this.onOptionChange(o=>{o===m&&c(this.rawOptions[m])})}onMultipleOptionChange(m,c){return this.onOptionChange(o=>{m.indexOf(o)!==-1&&c()})}_setupOptions(){const m=o=>{if(!(o in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${o}"`);return this.rawOptions[o]},c=(o,s)=>{if(!(o in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${o}"`);s=this._sanitizeAndValidateOption(o,s),this.rawOptions[o]!==s&&(this.rawOptions[o]=s,this._onOptionChange.fire(o))};for(const o in this.rawOptions){const s={get:m.bind(this,o),set:c.bind(this,o)};Object.defineProperty(this.options,o,s)}}_sanitizeAndValidateOption(m,c){switch(m){case"cursorStyle":if(c||(c=n.DEFAULT_OPTIONS[m]),!function(o){return o==="block"||o==="underline"||o==="bar"}(c))throw new Error(`"${c}" is not a valid value for ${m}`);break;case"wordSeparator":c||(c=n.DEFAULT_OPTIONS[m]);break;case"fontWeight":case"fontWeightBold":if(typeof c=="number"&&1<=c&&c<=1e3)break;c=p.includes(c)?c:n.DEFAULT_OPTIONS[m];break;case"cursorWidth":c=Math.floor(c);case"lineHeight":case"tabStopWidth":if(c<1)throw new Error(`${m} cannot be less than 1, value: ${c}`);break;case"minimumContrastRatio":c=Math.max(1,Math.min(21,Math.round(10*c)/10));break;case"scrollback":if((c=Math.min(c,4294967295))<0)throw new Error(`${m} cannot be less than 0, value: ${c}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(c<=0)throw new Error(`${m} cannot be less than or equal to 0, value: ${c}`);break;case"rows":case"cols":if(!c&&c!==0)throw new Error(`${m} must be numeric, value: ${c}`);break;case"windowsPty":c=c??{}}return c}}n.OptionsService=C},2660:function(y,n,u){var f=this&&this.__decorate||function(C,w,m,c){var o,s=arguments.length,l=s<3?w:c===null?c=Object.getOwnPropertyDescriptor(w,m):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(C,w,m,c);else for(var _=C.length-1;_>=0;_--)(o=C[_])&&(l=(s<3?o(l):s>3?o(w,m,l):o(w,m))||l);return s>3&&l&&Object.defineProperty(w,m,l),l},S=this&&this.__param||function(C,w){return function(m,c){w(m,c,C)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkService=void 0;const d=u(2585);let p=n.OscLinkService=class{constructor(C){this._bufferService=C,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(C){const w=this._bufferService.buffer;if(C.id===void 0){const _=w.addMarker(w.ybase+w.y),g={data:C,id:this._nextId++,lines:[_]};return _.onDispose(()=>this._removeMarkerFromLink(g,_)),this._dataByLinkId.set(g.id,g),g.id}const m=C,c=this._getEntryIdKey(m),o=this._entriesWithId.get(c);if(o)return this.addLineToLink(o.id,w.ybase+w.y),o.id;const s=w.addMarker(w.ybase+w.y),l={id:this._nextId++,key:this._getEntryIdKey(m),data:m,lines:[s]};return s.onDispose(()=>this._removeMarkerFromLink(l,s)),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(C,w){const m=this._dataByLinkId.get(C);if(m&&m.lines.every(c=>c.line!==w)){const c=this._bufferService.buffer.addMarker(w);m.lines.push(c),c.onDispose(()=>this._removeMarkerFromLink(m,c))}}getLinkData(C){var w;return(w=this._dataByLinkId.get(C))===null||w===void 0?void 0:w.data}_getEntryIdKey(C){return`${C.id};;${C.uri}`}_removeMarkerFromLink(C,w){const m=C.lines.indexOf(w);m!==-1&&(C.lines.splice(m,1),C.lines.length===0&&(C.data.id!==void 0&&this._entriesWithId.delete(C.key),this._dataByLinkId.delete(C.id)))}};n.OscLinkService=p=f([S(0,d.IBufferService)],p)},8343:(y,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",f="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(S){return S[f]||[]},n.createDecorator=function(S){if(n.serviceRegistry.has(S))return n.serviceRegistry.get(S);const d=function(p,C,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(m,c,o){c[u]===c?c[f].push({id:m,index:o}):(c[f]=[{id:m,index:o}],c[u]=c)})(d,p,w)};return d.toString=()=>S,n.serviceRegistry.set(S,d),d}},2585:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IDecorationService=n.IUnicodeService=n.IOscLinkService=n.IOptionsService=n.ILogService=n.LogLevelEnum=n.IInstantiationService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;const f=u(8343);var S;n.IBufferService=(0,f.createDecorator)("BufferService"),n.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),n.ICoreService=(0,f.createDecorator)("CoreService"),n.ICharsetService=(0,f.createDecorator)("CharsetService"),n.IInstantiationService=(0,f.createDecorator)("InstantiationService"),function(d){d[d.TRACE=0]="TRACE",d[d.DEBUG=1]="DEBUG",d[d.INFO=2]="INFO",d[d.WARN=3]="WARN",d[d.ERROR=4]="ERROR",d[d.OFF=5]="OFF"}(S||(n.LogLevelEnum=S={})),n.ILogService=(0,f.createDecorator)("LogService"),n.IOptionsService=(0,f.createDecorator)("OptionsService"),n.IOscLinkService=(0,f.createDecorator)("OscLinkService"),n.IUnicodeService=(0,f.createDecorator)("UnicodeService"),n.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const f=u(8460),S=u(225);n.UnicodeService=class{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter,this.onChange=this._onChange.event;const d=new S.UnicodeV6;this.register(d),this._active=d.version,this._activeProvider=d}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(d){if(!this._providers[d])throw new Error(`unknown Unicode version "${d}"`);this._active=d,this._activeProvider=this._providers[d],this._onChange.fire(d)}register(d){this._providers[d.version]=d}wcwidth(d){return this._activeProvider.wcwidth(d)}getStringCellWidth(d){let p=0;const C=d.length;for(let w=0;w<C;++w){let m=d.charCodeAt(w);if(55296<=m&&m<=56319){if(++w>=C)return p+this.wcwidth(m);const c=d.charCodeAt(w);56320<=c&&c<=57343?m=1024*(m-55296)+c-56320+65536:p+=this.wcwidth(c)}p+=this.wcwidth(m)}return p}}}},i={};function a(y){var n=i[y];if(n!==void 0)return n.exports;var u=i[y]={exports:{}};return r[y].call(u.exports,u,u.exports,a),u.exports}var h={};return(()=>{var y=h;Object.defineProperty(y,"__esModule",{value:!0}),y.Terminal=void 0;const n=a(9042),u=a(3236),f=a(844),S=a(5741),d=a(8285),p=a(7975),C=a(7090),w=["cols","rows"];class m extends f.Disposable{constructor(o){super(),this._core=this.register(new u.Terminal(o)),this._addonManager=this.register(new S.AddonManager),this._publicOptions=Object.assign({},this._core.options);const s=_=>this._core.options[_],l=(_,g)=>{this._checkReadonlyOptions(_),this._core.options[_]=g};for(const _ in this._core.options){const g={get:s.bind(this,_),set:l.bind(this,_)};Object.defineProperty(this._publicOptions,_,g)}}_checkReadonlyOptions(o){if(w.includes(o))throw new Error(`Option "${o}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new C.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new d.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const o=this._core.coreService.decPrivateModes;let s="none";switch(this._core.coreMouseService.activeProtocol){case"X10":s="x10";break;case"VT200":s="vt200";break;case"DRAG":s="drag";break;case"ANY":s="any"}return{applicationCursorKeysMode:o.applicationCursorKeys,applicationKeypadMode:o.applicationKeypad,bracketedPasteMode:o.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:s,originMode:o.origin,reverseWraparoundMode:o.reverseWraparound,sendFocusMode:o.sendFocus,wraparoundMode:o.wraparound}}get options(){return this._publicOptions}set options(o){for(const s in o)this._publicOptions[s]=o[s]}blur(){this._core.blur()}focus(){this._core.focus()}resize(o,s){this._verifyIntegers(o,s),this._core.resize(o,s)}open(o){this._core.open(o)}attachCustomKeyEventHandler(o){this._core.attachCustomKeyEventHandler(o)}registerLinkProvider(o){return this._core.registerLinkProvider(o)}registerCharacterJoiner(o){return this._checkProposedApi(),this._core.registerCharacterJoiner(o)}deregisterCharacterJoiner(o){this._checkProposedApi(),this._core.deregisterCharacterJoiner(o)}registerMarker(o=0){return this._verifyIntegers(o),this._core.registerMarker(o)}registerDecoration(o){var s,l,_;return this._checkProposedApi(),this._verifyPositiveIntegers((s=o.x)!==null&&s!==void 0?s:0,(l=o.width)!==null&&l!==void 0?l:0,(_=o.height)!==null&&_!==void 0?_:0),this._core.registerDecoration(o)}hasSelection(){return this._core.hasSelection()}select(o,s,l){this._verifyIntegers(o,s,l),this._core.select(o,s,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(o,s){this._verifyIntegers(o,s),this._core.selectLines(o,s)}dispose(){super.dispose()}scrollLines(o){this._verifyIntegers(o),this._core.scrollLines(o)}scrollPages(o){this._verifyIntegers(o),this._core.scrollPages(o)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(o){this._verifyIntegers(o),this._core.scrollToLine(o)}clear(){this._core.clear()}write(o,s){this._core.write(o,s)}writeln(o,s){this._core.write(o),this._core.write(`\r
|
||
`,s)}paste(o){this._core.paste(o)}refresh(o,s){this._verifyIntegers(o,s),this._core.refresh(o,s)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(o){this._addonManager.loadAddon(this,o)}static get strings(){return n}_verifyIntegers(...o){for(const s of o)if(s===1/0||isNaN(s)||s%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...o){for(const s of o)if(s&&(s===1/0||isNaN(s)||s%1!=0||s<0))throw new Error("This API only accepts positive integers")}}y.Terminal=m})(),h})())})(m_);var S_={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(self,()=>(()=>{var r={};return(()=>{var i=r;Object.defineProperty(i,"__esModule",{value:!0}),i.FitAddon=void 0,i.FitAddon=class{activate(a){this._terminal=a}dispose(){}fit(){const a=this.proposeDimensions();if(!a||!this._terminal||isNaN(a.cols)||isNaN(a.rows))return;const h=this._terminal._core;this._terminal.rows===a.rows&&this._terminal.cols===a.cols||(h._renderService.clear(),this._terminal.resize(a.cols,a.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const a=this._terminal._core,h=a._renderService.dimensions;if(h.css.cell.width===0||h.css.cell.height===0)return;const y=this._terminal.options.scrollback===0?0:a.viewport.scrollBarWidth,n=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(n.getPropertyValue("height")),f=Math.max(0,parseInt(n.getPropertyValue("width"))),S=window.getComputedStyle(this._terminal.element),d=u-(parseInt(S.getPropertyValue("padding-top"))+parseInt(S.getPropertyValue("padding-bottom"))),p=f-(parseInt(S.getPropertyValue("padding-right"))+parseInt(S.getPropertyValue("padding-left")))-y;return{cols:Math.max(2,Math.floor(p/h.css.cell.width)),rows:Math.max(1,Math.floor(d/h.css.cell.height))}}}})(),r})())})(S_);function y_(){const{zoom:e}=Ci(),t={position:"fixed",inset:0,background:"#0b0e13",overflow:"hidden"};return K.jsxs("div",{style:t,children:[K.jsx(g_,{}),K.jsx(f_,{}),K.jsx(c_,{}),K.jsx(a_,{}),K.jsx(u_,{}),K.jsx("div",{style:{position:"absolute",left:"18px",bottom:"18px",background:"rgba(14,18,25,.82)",border:"1px solid rgba(140,165,200,.18)",borderRadius:"9px",padding:"6px 12px",backdropFilter:"blur(6px)"},children:K.jsxs("span",{style:{color:"#aaa",fontSize:"12px"},children:[Math.round(e*100),"%"]})}),K.jsxs("div",{style:{position:"absolute",right:"18px",bottom:"18px",color:"#888",fontSize:"12px",background:"rgba(14,18,25,.82)",padding:"8px 12px",borderRadius:"6px"},children:[K.jsx("span",{children:"Space + drag to pan"}),K.jsx("span",{style:{marginLeft:"12px"},children:"Scroll to pan"}),K.jsx("span",{style:{marginLeft:"12px"},children:"Click to spotlight"})]})]})}Rn.createRoot(document.getElementById("root")).render(K.jsx(ja.StrictMode,{children:K.jsx(y_,{})}));
|