- Add type-to-trigger Spotlight with keyboard (any character) - Add canvas click to open Spotlight - Implement keyboard navigation (↑↓ Enter Esc) - Add keyboard shortcut handlers and spotlight store - Create useSpotlight hook with fuzzy search - Create mock Kubernetes resources for initial testing - Implement krate creation with collision detection - Add Quick Actions (all pods, services, deployments, namespaces) - Create Spotlight with filter chips and result rendering - Add Spotlight state management with setQuery, setFilter, setSel - Include design specs (Krates.dc.html, server.js, support.js)
74 lines
446 KiB
JavaScript
74 lines
446 KiB
JavaScript
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const h of l)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(l){const h={};return l.integrity&&(h.integrity=l.integrity),l.referrerPolicy&&(h.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?h.credentials="include":l.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function i(l){if(l.ep)return;l.ep=!0;const h=r(l);fetch(l.href,h)}})();function Pa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ma={exports:{}},Ts={},Oa={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 Ei=Symbol.for("react.element"),Zu=Symbol.for("react.portal"),eh=Symbol.for("react.fragment"),th=Symbol.for("react.strict_mode"),rh=Symbol.for("react.profiler"),ih=Symbol.for("react.provider"),sh=Symbol.for("react.context"),nh=Symbol.for("react.forward_ref"),oh=Symbol.for("react.suspense"),lh=Symbol.for("react.memo"),ah=Symbol.for("react.lazy"),Sl=Symbol.iterator;function ch(e){return e===null||typeof e!="object"?null:(e=Sl&&e[Sl]||e["@@iterator"],typeof e=="function"?e:null)}var Ba={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ia=Object.assign,Ha={};function Tr(e,t,r){this.props=e,this.context=t,this.refs=Ha,this.updater=r||Ba}Tr.prototype.isReactComponent={};Tr.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")};Tr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Fa(){}Fa.prototype=Tr.prototype;function ko(e,t,r){this.props=e,this.context=t,this.refs=Ha,this.updater=r||Ba}var bo=ko.prototype=new Fa;bo.constructor=ko;Ia(bo,Tr.prototype);bo.isPureReactComponent=!0;var yl=Array.isArray,Na=Object.prototype.hasOwnProperty,xo={current:null},za={key:!0,ref:!0,__self:!0,__source:!0};function ja(e,t,r){var i,l={},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)Na.call(t,i)&&!za.hasOwnProperty(i)&&(l[i]=t[i]);var n=arguments.length-2;if(n===1)l.children=r;else if(1<n){for(var u=Array(n),f=0;f<n;f++)u[f]=arguments[f+2];l.children=u}if(e&&e.defaultProps)for(i in n=e.defaultProps,n)l[i]===void 0&&(l[i]=n[i]);return{$$typeof:Ei,type:e,key:h,ref:y,props:l,_owner:xo.current}}function uh(e,t){return{$$typeof:Ei,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Lo(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ei}function hh(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Cl=/\/+/g;function en(e,t){return typeof e=="object"&&e!==null&&e.key!=null?hh(""+e.key):t.toString(36)}function qi(e,t,r,i,l){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 Ei:case Zu:y=!0}}if(y)return y=e,l=l(y),e=i===""?"."+en(y,0):i,yl(l)?(r="",e!=null&&(r=e.replace(Cl,"$&/")+"/"),qi(l,t,r,"",function(f){return f})):l!=null&&(Lo(l)&&(l=uh(l,r+(!l.key||y&&y.key===l.key?"":(""+l.key).replace(Cl,"$&/")+"/")+e)),t.push(l)),1;if(y=0,i=i===""?".":i+":",yl(e))for(var n=0;n<e.length;n++){h=e[n];var u=i+en(h,n);y+=qi(h,t,r,u,l)}else if(u=ch(e),typeof u=="function")for(e=u.call(e),n=0;!(h=e.next()).done;)h=h.value,u=i+en(h,n++),y+=qi(h,t,r,u,l);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 Di(e,t,r){if(e==null)return e;var i=[],l=0;return qi(e,i,"","",function(h){return t.call(r,h,l++)}),i}function dh(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 De={current:null},Xi={transition:null},fh={ReactCurrentDispatcher:De,ReactCurrentBatchConfig:Xi,ReactCurrentOwner:xo};function Ua(){throw Error("act(...) is not supported in production builds of React.")}J.Children={map:Di,forEach:function(e,t,r){Di(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Di(e,function(){t++}),t},toArray:function(e){return Di(e,function(t){return t})||[]},only:function(e){if(!Lo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};J.Component=Tr;J.Fragment=eh;J.Profiler=rh;J.PureComponent=ko;J.StrictMode=th;J.Suspense=oh;J.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fh;J.act=Ua;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=Ia({},e.props),l=e.key,h=e.ref,y=e._owner;if(t!=null){if(t.ref!==void 0&&(h=t.ref,y=xo.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var n=e.type.defaultProps;for(u in t)Na.call(t,u)&&!za.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:Ei,type:e.type,key:l,ref:h,props:i,_owner:y}};J.createContext=function(e){return e={$$typeof:sh,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ih,_context:e},e.Consumer=e};J.createElement=ja;J.createFactory=function(e){var t=ja.bind(null,e);return t.type=e,t};J.createRef=function(){return{current:null}};J.forwardRef=function(e){return{$$typeof:nh,render:e}};J.isValidElement=Lo;J.lazy=function(e){return{$$typeof:ah,_payload:{_status:-1,_result:e},_init:dh}};J.memo=function(e,t){return{$$typeof:lh,type:e,compare:t===void 0?null:t}};J.startTransition=function(e){var t=Xi.transition;Xi.transition={};try{e()}finally{Xi.transition=t}};J.unstable_act=Ua;J.useCallback=function(e,t){return De.current.useCallback(e,t)};J.useContext=function(e){return De.current.useContext(e)};J.useDebugValue=function(){};J.useDeferredValue=function(e){return De.current.useDeferredValue(e)};J.useEffect=function(e,t){return De.current.useEffect(e,t)};J.useId=function(){return De.current.useId()};J.useImperativeHandle=function(e,t,r){return De.current.useImperativeHandle(e,t,r)};J.useInsertionEffect=function(e,t){return De.current.useInsertionEffect(e,t)};J.useLayoutEffect=function(e,t){return De.current.useLayoutEffect(e,t)};J.useMemo=function(e,t){return De.current.useMemo(e,t)};J.useReducer=function(e,t,r){return De.current.useReducer(e,t,r)};J.useRef=function(e){return De.current.useRef(e)};J.useState=function(e){return De.current.useState(e)};J.useSyncExternalStore=function(e,t,r){return De.current.useSyncExternalStore(e,t,r)};J.useTransition=function(){return De.current.useTransition()};J.version="18.3.1";Oa.exports=J;var be=Oa.exports;const Wa=Pa(be);/**
|
||
* @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 _h=be,ph=Symbol.for("react.element"),vh=Symbol.for("react.fragment"),gh=Object.prototype.hasOwnProperty,mh=_h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Sh={key:!0,ref:!0,__self:!0,__source:!0};function $a(e,t,r){var i,l={},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)gh.call(t,i)&&!Sh.hasOwnProperty(i)&&(l[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)l[i]===void 0&&(l[i]=t[i]);return{$$typeof:ph,type:e,key:h,ref:y,props:l,_owner:mh.current}}Ts.Fragment=vh;Ts.jsx=$a;Ts.jsxs=$a;Ma.exports=Ts;var $=Ma.exports,Dn={},Ka={exports:{}},je={},Va={exports:{}},qa={};/**
|
||
* @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 O=T-1>>>1,F=x[O];if(0<l(F,D))x[O]=D,x[T]=F,T=O;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 O=0,F=x.length,K=F>>>1;O<K;){var G=2*(O+1)-1,X=x[G],ee=G+1,L=x[ee];if(0>l(X,T))ee<F&&0>l(L,X)?(x[O]=L,x[ee]=T,O=ee):(x[O]=X,x[G]=T,O=G);else if(ee<F&&0>l(L,T))x[O]=L,x[ee]=T,O=ee;else break e}}return D}function l(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=[],g=1,d=null,p=3,C=!1,w=!1,S=!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 a(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(S=!1,a(x),!w)if(r(u)!==null)w=!0,U(m);else{var D=r(f);D!==null&&j(_,D.startTime-x)}}function m(x,D){w=!1,S&&(S=!1,o(v),v=-1),C=!0;var T=p;try{for(a(D),d=r(u);d!==null&&(!(d.expirationTime>D)||x&&!P());){var O=d.callback;if(typeof O=="function"){d.callback=null,p=d.priorityLevel;var F=O(d.expirationTime<=D);D=e.unstable_now(),typeof F=="function"?d.callback=F:d===r(u)&&i(u),a(D)}else i(u);d=r(u)}if(d!==null)var K=!0;else{var G=r(f);G!==null&&j(_,G.startTime-D),K=!1}return K}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?M():(E=!1,b=null)}}else E=!1}var M;if(typeof s=="function")M=function(){s(A)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,N=I.port2;I.port1.onmessage=A,M=function(){N.postMessage(null)}}else M=function(){c(A,0)};function U(x){b=x,E||(E=!0,M())}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(m))},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 O=e.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?O+T:O):T=O,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:g++,callback:D,priorityLevel:x,startTime:T,expirationTime:F,sortIndex:-1},T>O?(x.sortIndex=T,t(f,x),r(u)===null&&x===r(f)&&(S?(o(v),v=-1):S=!0,j(_,T-O))):(x.sortIndex=F,t(u,x),w||C||(w=!0,U(m))),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}}}})(qa);Va.exports=qa;var yh=Va.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 Ch=be,ze=yh;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 Xa=new Set,si={};function er(e,t){wr(e,t),wr(e+"Capture",t)}function wr(e,t){for(si[e]=t,e=0;e<t.length;e++)Xa.add(t[e])}var pt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tn=Object.prototype.hasOwnProperty,wh=/^[: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]*$/,wl={},El={};function Eh(e){return Tn.call(El,e)?!0:Tn.call(wl,e)?!1:wh.test(e)?El[e]=!0:(wl[e]=!0,!1)}function kh(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 bh(e,t,r,i){if(t===null||typeof t>"u"||kh(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 Te(e,t,r,i,l,h,y){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=l,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 Te(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 Te(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ce[e]=new Te(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ce[e]=new Te(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 Te(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ce[e]=new Te(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ce[e]=new Te(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ce[e]=new Te(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ce[e]=new Te(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ro=/[\-:]([a-z])/g;function Do(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(Ro,Do);Ce[t]=new Te(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(Ro,Do);Ce[t]=new Te(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(Ro,Do);Ce[t]=new Te(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ce[e]=new Te(e,1,!1,e.toLowerCase(),null,!1,!1)});Ce.xlinkHref=new Te("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ce[e]=new Te(e,1,!1,e.toLowerCase(),null,!0,!0)});function To(e,t,r,i){var l=Ce.hasOwnProperty(t)?Ce[t]:null;(l!==null?l.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(bh(t,r,l,i)&&(r=null),i||l===null?Eh(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):l.mustUseProperty?e[l.propertyName]=r===null?l.type===3?!1:"":r:(t=l.attributeName,i=l.attributeNamespace,r===null?e.removeAttribute(t):(l=l.type,r=l===3||l===4&&r===!0?"":""+r,i?e.setAttributeNS(i,t,r):e.setAttribute(t,r))))}var St=Ch.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ti=Symbol.for("react.element"),sr=Symbol.for("react.portal"),nr=Symbol.for("react.fragment"),Ao=Symbol.for("react.strict_mode"),An=Symbol.for("react.profiler"),Ga=Symbol.for("react.provider"),Qa=Symbol.for("react.context"),Po=Symbol.for("react.forward_ref"),Pn=Symbol.for("react.suspense"),Mn=Symbol.for("react.suspense_list"),Mo=Symbol.for("react.memo"),Et=Symbol.for("react.lazy"),Ya=Symbol.for("react.offscreen"),kl=Symbol.iterator;function Hr(e){return e===null||typeof e!="object"?null:(e=kl&&e[kl]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Object.assign,tn;function Kr(e){if(tn===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);tn=t&&t[1]||""}return`
|
||
`+tn+e}var rn=!1;function sn(e,t){if(!e||rn)return"";rn=!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 l=f.stack.split(`
|
||
`),h=i.stack.split(`
|
||
`),y=l.length-1,n=h.length-1;1<=y&&0<=n&&l[y]!==h[n];)n--;for(;1<=y&&0<=n;y--,n--)if(l[y]!==h[n]){if(y!==1||n!==1)do if(y--,n--,0>n||l[y]!==h[n]){var u=`
|
||
`+l[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{rn=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Kr(e):""}function xh(e){switch(e.tag){case 5:return Kr(e.type);case 16:return Kr("Lazy");case 13:return Kr("Suspense");case 19:return Kr("SuspenseList");case 0:case 2:case 15:return e=sn(e.type,!1),e;case 11:return e=sn(e.type.render,!1),e;case 1:return e=sn(e.type,!0),e;default:return""}}function On(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 nr:return"Fragment";case sr:return"Portal";case An:return"Profiler";case Ao:return"StrictMode";case Pn:return"Suspense";case Mn:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qa:return(e.displayName||"Context")+".Consumer";case Ga:return(e._context.displayName||"Context")+".Provider";case Po:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Mo:return t=e.displayName||null,t!==null?t:On(e.type)||"Memo";case Et:t=e._payload,e=e._init;try{return On(e(t))}catch{}}return null}function Lh(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 On(t);case 8:return t===Ao?"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 Ht(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ja(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Rh(e){var t=Ja(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 l=r.get,h=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.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 Ai(e){e._valueTracker||(e._valueTracker=Rh(e))}function Za(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Ja(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function os(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 bl(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=Ht(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 ec(e,t){t=t.checked,t!=null&&To(e,"checked",t,!1)}function In(e,t){ec(e,t);var r=Ht(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")?Hn(e,t.type,r):t.hasOwnProperty("defaultValue")&&Hn(e,t.type,Ht(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xl(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 Hn(e,t,r){(t!=="number"||os(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Vr=Array.isArray;function vr(e,t,r,i){if(e=e.options,t){t={};for(var l=0;l<r.length;l++)t["$"+r[l]]=!0;for(r=0;r<e.length;r++)l=t.hasOwnProperty("$"+e[r].value),e[r].selected!==l&&(e[r].selected=l),l&&i&&(e[r].defaultSelected=!0)}else{for(r=""+Ht(r),t=null,l=0;l<e.length;l++){if(e[l].value===r){e[l].selected=!0,i&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Fn(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(W(91));return ue({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ll(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(Vr(r)){if(1<r.length)throw Error(W(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Ht(r)}}function tc(e,t){var r=Ht(t.value),i=Ht(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 Rl(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function rc(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 Nn(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?rc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Pi,ic=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,l){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Pi=Pi||document.createElement("div"),Pi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Pi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ni(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Gr={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},Dh=["Webkit","ms","Moz","O"];Object.keys(Gr).forEach(function(e){Dh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gr[t]=Gr[e]})});function sc(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Gr.hasOwnProperty(e)&&Gr[e]?(""+t).trim():t+"px"}function nc(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,l=sc(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,l):e[r]=l}}var Th=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 zn(e,t){if(t){if(Th[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 jn(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 Un=null;function Oo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wn=null,gr=null,mr=null;function Dl(e){if(e=xi(e)){if(typeof Wn!="function")throw Error(W(280));var t=e.stateNode;t&&(t=Bs(t),Wn(e.stateNode,e.type,t))}}function oc(e){gr?mr?mr.push(e):mr=[e]:gr=e}function lc(){if(gr){var e=gr,t=mr;if(mr=gr=null,Dl(e),t)for(e=0;e<t.length;e++)Dl(t[e])}}function ac(e,t){return e(t)}function cc(){}var nn=!1;function uc(e,t,r){if(nn)return e(t,r);nn=!0;try{return ac(e,t,r)}finally{nn=!1,(gr!==null||mr!==null)&&(cc(),lc())}}function oi(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 $n=!1;if(pt)try{var Fr={};Object.defineProperty(Fr,"passive",{get:function(){$n=!0}}),window.addEventListener("test",Fr,Fr),window.removeEventListener("test",Fr,Fr)}catch{$n=!1}function Ah(e,t,r,i,l,h,y,n,u){var f=Array.prototype.slice.call(arguments,3);try{t.apply(r,f)}catch(g){this.onError(g)}}var Qr=!1,ls=null,as=!1,Kn=null,Ph={onError:function(e){Qr=!0,ls=e}};function Mh(e,t,r,i,l,h,y,n,u){Qr=!1,ls=null,Ah.apply(Ph,arguments)}function Oh(e,t,r,i,l,h,y,n,u){if(Mh.apply(this,arguments),Qr){if(Qr){var f=ls;Qr=!1,ls=null}else throw Error(W(198));as||(as=!0,Kn=f)}}function tr(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 hc(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 Tl(e){if(tr(e)!==e)throw Error(W(188))}function Bh(e){var t=e.alternate;if(!t){if(t=tr(e),t===null)throw Error(W(188));return t!==e?null:e}for(var r=e,i=t;;){var l=r.return;if(l===null)break;var h=l.alternate;if(h===null){if(i=l.return,i!==null){r=i;continue}break}if(l.child===h.child){for(h=l.child;h;){if(h===r)return Tl(l),e;if(h===i)return Tl(l),t;h=h.sibling}throw Error(W(188))}if(r.return!==i.return)r=l,i=h;else{for(var y=!1,n=l.child;n;){if(n===r){y=!0,r=l,i=h;break}if(n===i){y=!0,i=l,r=h;break}n=n.sibling}if(!y){for(n=h.child;n;){if(n===r){y=!0,r=h,i=l;break}if(n===i){y=!0,i=h,r=l;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 dc(e){return e=Bh(e),e!==null?fc(e):null}function fc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=fc(e);if(t!==null)return t;e=e.sibling}return null}var _c=ze.unstable_scheduleCallback,Al=ze.unstable_cancelCallback,Ih=ze.unstable_shouldYield,Hh=ze.unstable_requestPaint,de=ze.unstable_now,Fh=ze.unstable_getCurrentPriorityLevel,Bo=ze.unstable_ImmediatePriority,pc=ze.unstable_UserBlockingPriority,cs=ze.unstable_NormalPriority,Nh=ze.unstable_LowPriority,vc=ze.unstable_IdlePriority,As=null,at=null;function zh(e){if(at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(As,e,void 0,(e.current.flags&128)===128)}catch{}}var tt=Math.clz32?Math.clz32:Wh,jh=Math.log,Uh=Math.LN2;function Wh(e){return e>>>=0,e===0?32:31-(jh(e)/Uh|0)|0}var Mi=64,Oi=4194304;function qr(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 us(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,l=e.suspendedLanes,h=e.pingedLanes,y=r&268435455;if(y!==0){var n=y&~l;n!==0?i=qr(n):(h&=y,h!==0&&(i=qr(h)))}else y=r&~l,y!==0?i=qr(y):h!==0&&(i=qr(h));if(i===0)return 0;if(t!==0&&t!==i&&!(t&l)&&(l=i&-i,h=t&-t,l>=h||l===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-tt(t),l=1<<r,i|=e[r],t&=~l;return i}function $h(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 Kh(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,l=e.expirationTimes,h=e.pendingLanes;0<h;){var y=31-tt(h),n=1<<y,u=l[y];u===-1?(!(n&r)||n&i)&&(l[y]=$h(n,t)):u<=t&&(e.expiredLanes|=n),h&=~n}}function Vn(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function gc(){var e=Mi;return Mi<<=1,!(Mi&4194240)&&(Mi=64),e}function on(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function ki(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tt(t),e[t]=r}function Vh(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 l=31-tt(r),h=1<<l;t[l]=0,i[l]=-1,e[l]=-1,r&=~h}}function Io(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-tt(r),l=1<<i;l&t|e[i]&t&&(e[i]|=t),r&=~l}}var re=0;function mc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Sc,Ho,yc,Cc,wc,qn=!1,Bi=[],Dt=null,Tt=null,At=null,li=new Map,ai=new Map,bt=[],qh="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 Pl(e,t){switch(e){case"focusin":case"focusout":Dt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":At=null;break;case"pointerover":case"pointerout":li.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ai.delete(t.pointerId)}}function Nr(e,t,r,i,l,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:h,targetContainers:[l]},t!==null&&(t=xi(t),t!==null&&Ho(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Xh(e,t,r,i,l){switch(t){case"focusin":return Dt=Nr(Dt,e,t,r,i,l),!0;case"dragenter":return Tt=Nr(Tt,e,t,r,i,l),!0;case"mouseover":return At=Nr(At,e,t,r,i,l),!0;case"pointerover":var h=l.pointerId;return li.set(h,Nr(li.get(h)||null,e,t,r,i,l)),!0;case"gotpointercapture":return h=l.pointerId,ai.set(h,Nr(ai.get(h)||null,e,t,r,i,l)),!0}return!1}function Ec(e){var t=$t(e.target);if(t!==null){var r=tr(t);if(r!==null){if(t=r.tag,t===13){if(t=hc(r),t!==null){e.blockedOn=t,wc(e.priority,function(){yc(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 Gi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Xn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);Un=i,r.target.dispatchEvent(i),Un=null}else return t=xi(r),t!==null&&Ho(t),e.blockedOn=r,!1;t.shift()}return!0}function Ml(e,t,r){Gi(e)&&r.delete(t)}function Gh(){qn=!1,Dt!==null&&Gi(Dt)&&(Dt=null),Tt!==null&&Gi(Tt)&&(Tt=null),At!==null&&Gi(At)&&(At=null),li.forEach(Ml),ai.forEach(Ml)}function zr(e,t){e.blockedOn===t&&(e.blockedOn=null,qn||(qn=!0,ze.unstable_scheduleCallback(ze.unstable_NormalPriority,Gh)))}function ci(e){function t(l){return zr(l,e)}if(0<Bi.length){zr(Bi[0],e);for(var r=1;r<Bi.length;r++){var i=Bi[r];i.blockedOn===e&&(i.blockedOn=null)}}for(Dt!==null&&zr(Dt,e),Tt!==null&&zr(Tt,e),At!==null&&zr(At,e),li.forEach(t),ai.forEach(t),r=0;r<bt.length;r++)i=bt[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<bt.length&&(r=bt[0],r.blockedOn===null);)Ec(r),r.blockedOn===null&&bt.shift()}var Sr=St.ReactCurrentBatchConfig,hs=!0;function Qh(e,t,r,i){var l=re,h=Sr.transition;Sr.transition=null;try{re=1,Fo(e,t,r,i)}finally{re=l,Sr.transition=h}}function Yh(e,t,r,i){var l=re,h=Sr.transition;Sr.transition=null;try{re=4,Fo(e,t,r,i)}finally{re=l,Sr.transition=h}}function Fo(e,t,r,i){if(hs){var l=Xn(e,t,r,i);if(l===null)vn(e,t,i,ds,r),Pl(e,i);else if(Xh(l,e,t,r,i))i.stopPropagation();else if(Pl(e,i),t&4&&-1<qh.indexOf(e)){for(;l!==null;){var h=xi(l);if(h!==null&&Sc(h),h=Xn(e,t,r,i),h===null&&vn(e,t,i,ds,r),h===l)break;l=h}l!==null&&i.stopPropagation()}else vn(e,t,i,null,r)}}var ds=null;function Xn(e,t,r,i){if(ds=null,e=Oo(i),e=$t(e),e!==null)if(t=tr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=hc(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 ds=e,null}function kc(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(Fh()){case Bo:return 1;case pc:return 4;case cs:case Nh:return 16;case vc:return 536870912;default:return 16}default:return 16}}var Lt=null,No=null,Qi=null;function bc(){if(Qi)return Qi;var e,t=No,r=t.length,i,l="value"in Lt?Lt.value:Lt.textContent,h=l.length;for(e=0;e<r&&t[e]===l[e];e++);var y=r-e;for(i=1;i<=y&&t[r-i]===l[h-i];i++);return Qi=l.slice(e,1<i?1-i:void 0)}function Yi(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 Ii(){return!0}function Ol(){return!1}function Ue(e){function t(r,i,l,h,y){this._reactName=r,this._targetInst=l,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)?Ii:Ol,this.isPropagationStopped=Ol,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=Ii)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ii)},persist:function(){},isPersistent:Ii}),t}var Ar={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zo=Ue(Ar),bi=ue({},Ar,{view:0,detail:0}),Jh=Ue(bi),ln,an,jr,Ps=ue({},bi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jo,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!==jr&&(jr&&e.type==="mousemove"?(ln=e.screenX-jr.screenX,an=e.screenY-jr.screenY):an=ln=0,jr=e),ln)},movementY:function(e){return"movementY"in e?e.movementY:an}}),Bl=Ue(Ps),Zh=ue({},Ps,{dataTransfer:0}),ed=Ue(Zh),td=ue({},bi,{relatedTarget:0}),cn=Ue(td),rd=ue({},Ar,{animationName:0,elapsedTime:0,pseudoElement:0}),id=Ue(rd),sd=ue({},Ar,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nd=Ue(sd),od=ue({},Ar,{data:0}),Il=Ue(od),ld={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ad={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"},cd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ud(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=cd[e])?!!t[e]:!1}function jo(){return ud}var hd=ue({},bi,{key:function(e){if(e.key){var t=ld[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ad[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jo,charCode:function(e){return e.type==="keypress"?Yi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),dd=Ue(hd),fd=ue({},Ps,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hl=Ue(fd),_d=ue({},bi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jo}),pd=Ue(_d),vd=ue({},Ar,{propertyName:0,elapsedTime:0,pseudoElement:0}),gd=Ue(vd),md=ue({},Ps,{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}),Sd=Ue(md),yd=[9,13,27,32],Uo=pt&&"CompositionEvent"in window,Yr=null;pt&&"documentMode"in document&&(Yr=document.documentMode);var Cd=pt&&"TextEvent"in window&&!Yr,xc=pt&&(!Uo||Yr&&8<Yr&&11>=Yr),Fl=" ",Nl=!1;function Lc(e,t){switch(e){case"keyup":return yd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var or=!1;function wd(e,t){switch(e){case"compositionend":return Rc(t);case"keypress":return t.which!==32?null:(Nl=!0,Fl);case"textInput":return e=t.data,e===Fl&&Nl?null:e;default:return null}}function Ed(e,t){if(or)return e==="compositionend"||!Uo&&Lc(e,t)?(e=bc(),Qi=No=Lt=null,or=!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 xc&&t.locale!=="ko"?null:t.data;default:return null}}var kd={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 zl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!kd[e.type]:t==="textarea"}function Dc(e,t,r,i){oc(i),t=fs(t,"onChange"),0<t.length&&(r=new zo("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var Jr=null,ui=null;function bd(e){zc(e,0)}function Ms(e){var t=cr(e);if(Za(t))return e}function xd(e,t){if(e==="change")return t}var Tc=!1;if(pt){var un;if(pt){var hn="oninput"in document;if(!hn){var jl=document.createElement("div");jl.setAttribute("oninput","return;"),hn=typeof jl.oninput=="function"}un=hn}else un=!1;Tc=un&&(!document.documentMode||9<document.documentMode)}function Ul(){Jr&&(Jr.detachEvent("onpropertychange",Ac),ui=Jr=null)}function Ac(e){if(e.propertyName==="value"&&Ms(ui)){var t=[];Dc(t,ui,e,Oo(e)),uc(bd,t)}}function Ld(e,t,r){e==="focusin"?(Ul(),Jr=t,ui=r,Jr.attachEvent("onpropertychange",Ac)):e==="focusout"&&Ul()}function Rd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ms(ui)}function Dd(e,t){if(e==="click")return Ms(t)}function Td(e,t){if(e==="input"||e==="change")return Ms(t)}function Ad(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var it=typeof Object.is=="function"?Object.is:Ad;function hi(e,t){if(it(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 l=r[i];if(!Tn.call(t,l)||!it(e[l],t[l]))return!1}return!0}function Wl(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $l(e,t){var r=Wl(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=Wl(r)}}function Pc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mc(){for(var e=window,t=os();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=os(e.document)}return t}function Wo(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 Pd(e){var t=Mc(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Pc(r.ownerDocument.documentElement,r)){if(i!==null&&Wo(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 l=r.textContent.length,h=Math.min(i.start,l);i=i.end===void 0?h:Math.min(i.end,l),!e.extend&&h>i&&(l=i,i=h,h=l),l=$l(r,h);var y=$l(r,i);l&&y&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(t=t.createRange(),t.setStart(l.node,l.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 Md=pt&&"documentMode"in document&&11>=document.documentMode,lr=null,Gn=null,Zr=null,Qn=!1;function Kl(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Qn||lr==null||lr!==os(i)||(i=lr,"selectionStart"in i&&Wo(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}),Zr&&hi(Zr,i)||(Zr=i,i=fs(Gn,"onSelect"),0<i.length&&(t=new zo("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=lr)))}function Hi(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var ar={animationend:Hi("Animation","AnimationEnd"),animationiteration:Hi("Animation","AnimationIteration"),animationstart:Hi("Animation","AnimationStart"),transitionend:Hi("Transition","TransitionEnd")},dn={},Oc={};pt&&(Oc=document.createElement("div").style,"AnimationEvent"in window||(delete ar.animationend.animation,delete ar.animationiteration.animation,delete ar.animationstart.animation),"TransitionEvent"in window||delete ar.transitionend.transition);function Os(e){if(dn[e])return dn[e];if(!ar[e])return e;var t=ar[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Oc)return dn[e]=t[r];return e}var Bc=Os("animationend"),Ic=Os("animationiteration"),Hc=Os("animationstart"),Fc=Os("transitionend"),Nc=new Map,Vl="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 Nt(e,t){Nc.set(e,t),er(t,[e])}for(var fn=0;fn<Vl.length;fn++){var _n=Vl[fn],Od=_n.toLowerCase(),Bd=_n[0].toUpperCase()+_n.slice(1);Nt(Od,"on"+Bd)}Nt(Bc,"onAnimationEnd");Nt(Ic,"onAnimationIteration");Nt(Hc,"onAnimationStart");Nt("dblclick","onDoubleClick");Nt("focusin","onFocus");Nt("focusout","onBlur");Nt(Fc,"onTransitionEnd");wr("onMouseEnter",["mouseout","mouseover"]);wr("onMouseLeave",["mouseout","mouseover"]);wr("onPointerEnter",["pointerout","pointerover"]);wr("onPointerLeave",["pointerout","pointerover"]);er("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));er("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));er("onBeforeInput",["compositionend","keypress","textInput","paste"]);er("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));er("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));er("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xr="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(" "),Id=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xr));function ql(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,Oh(i,t,void 0,e),e.currentTarget=null}function zc(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],l=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&&l.isPropagationStopped())break e;ql(l,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&&l.isPropagationStopped())break e;ql(l,n,f),h=u}}}if(as)throw e=Kn,as=!1,Kn=null,e}function se(e,t){var r=t[to];r===void 0&&(r=t[to]=new Set);var i=e+"__bubble";r.has(i)||(jc(t,e,2,!1),r.add(i))}function pn(e,t,r){var i=0;t&&(i|=4),jc(r,e,i,t)}var Fi="_reactListening"+Math.random().toString(36).slice(2);function di(e){if(!e[Fi]){e[Fi]=!0,Xa.forEach(function(r){r!=="selectionchange"&&(Id.has(r)||pn(r,!1,e),pn(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fi]||(t[Fi]=!0,pn("selectionchange",!1,t))}}function jc(e,t,r,i){switch(kc(t)){case 1:var l=Qh;break;case 4:l=Yh;break;default:l=Fo}r=l.bind(null,t,r,e),l=void 0,!$n||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),i?l!==void 0?e.addEventListener(t,r,{capture:!0,passive:l}):e.addEventListener(t,r,!0):l!==void 0?e.addEventListener(t,r,{passive:l}):e.addEventListener(t,r,!1)}function vn(e,t,r,i,l){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===l||n.nodeType===8&&n.parentNode===l)break;if(y===4)for(y=i.return;y!==null;){var u=y.tag;if((u===3||u===4)&&(u=y.stateNode.containerInfo,u===l||u.nodeType===8&&u.parentNode===l))return;y=y.return}for(;n!==null;){if(y=$t(n),y===null)return;if(u=y.tag,u===5||u===6){i=h=y;continue e}n=n.parentNode}}i=i.return}uc(function(){var f=h,g=Oo(r),d=[];e:{var p=Nc.get(e);if(p!==void 0){var C=zo,w=e;switch(e){case"keypress":if(Yi(r)===0)break e;case"keydown":case"keyup":C=dd;break;case"focusin":w="focus",C=cn;break;case"focusout":w="blur",C=cn;break;case"beforeblur":case"afterblur":C=cn;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=ed;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":C=pd;break;case Bc:case Ic:case Hc:C=id;break;case Fc:C=gd;break;case"scroll":C=Jh;break;case"wheel":C=Sd;break;case"copy":case"cut":case"paste":C=nd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":C=Hl}var S=(t&4)!==0,c=!S&&e==="scroll",o=S?p!==null?p+"Capture":null:p;S=[];for(var s=f,a;s!==null;){a=s;var _=a.stateNode;if(a.tag===5&&_!==null&&(a=_,o!==null&&(_=oi(s,o),_!=null&&S.push(fi(s,_,a)))),c)break;s=s.return}0<S.length&&(p=new C(p,w,null,r,g),d.push({event:p,listeners:S}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",C=e==="mouseout"||e==="pointerout",p&&r!==Un&&(w=r.relatedTarget||r.fromElement)&&($t(w)||w[vt]))break e;if((C||p)&&(p=g.window===g?g:(p=g.ownerDocument)?p.defaultView||p.parentWindow:window,C?(w=r.relatedTarget||r.toElement,C=f,w=w?$t(w):null,w!==null&&(c=tr(w),w!==c||w.tag!==5&&w.tag!==6)&&(w=null)):(C=null,w=f),C!==w)){if(S=Bl,_="onMouseLeave",o="onMouseEnter",s="mouse",(e==="pointerout"||e==="pointerover")&&(S=Hl,_="onPointerLeave",o="onPointerEnter",s="pointer"),c=C==null?p:cr(C),a=w==null?p:cr(w),p=new S(_,s+"leave",C,r,g),p.target=c,p.relatedTarget=a,_=null,$t(g)===f&&(S=new S(o,s+"enter",w,r,g),S.target=a,S.relatedTarget=c,_=S),c=_,C&&w)t:{for(S=C,o=w,s=0,a=S;a;a=ir(a))s++;for(a=0,_=o;_;_=ir(_))a++;for(;0<s-a;)S=ir(S),s--;for(;0<a-s;)o=ir(o),a--;for(;s--;){if(S===o||o!==null&&S===o.alternate)break t;S=ir(S),o=ir(o)}S=null}else S=null;C!==null&&Xl(d,p,C,S,!1),w!==null&&c!==null&&Xl(d,c,w,S,!0)}}e:{if(p=f?cr(f):window,C=p.nodeName&&p.nodeName.toLowerCase(),C==="select"||C==="input"&&p.type==="file")var m=xd;else if(zl(p))if(Tc)m=Td;else{m=Rd;var E=Ld}else(C=p.nodeName)&&C.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(m=Dd);if(m&&(m=m(e,f))){Dc(d,m,r,g);break e}E&&E(e,p,f),e==="focusout"&&(E=p._wrapperState)&&E.controlled&&p.type==="number"&&Hn(p,"number",p.value)}switch(E=f?cr(f):window,e){case"focusin":(zl(E)||E.contentEditable==="true")&&(lr=E,Gn=f,Zr=null);break;case"focusout":Zr=Gn=lr=null;break;case"mousedown":Qn=!0;break;case"contextmenu":case"mouseup":case"dragend":Qn=!1,Kl(d,r,g);break;case"selectionchange":if(Md)break;case"keydown":case"keyup":Kl(d,r,g)}var b;if(Uo)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 or?Lc(e,r)&&(v="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(v="onCompositionStart");v&&(xc&&r.locale!=="ko"&&(or||v!=="onCompositionStart"?v==="onCompositionEnd"&&or&&(b=bc()):(Lt=g,No="value"in Lt?Lt.value:Lt.textContent,or=!0)),E=fs(f,v),0<E.length&&(v=new Il(v,e,null,r,g),d.push({event:v,listeners:E}),b?v.data=b:(b=Rc(r),b!==null&&(v.data=b)))),(b=Cd?wd(e,r):Ed(e,r))&&(f=fs(f,"onBeforeInput"),0<f.length&&(g=new Il("onBeforeInput","beforeinput",null,r,g),d.push({event:g,listeners:f}),g.data=b))}zc(d,t)})}function fi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function fs(e,t){for(var r=t+"Capture",i=[];e!==null;){var l=e,h=l.stateNode;l.tag===5&&h!==null&&(l=h,h=oi(e,r),h!=null&&i.unshift(fi(e,h,l)),h=oi(e,t),h!=null&&i.push(fi(e,h,l))),e=e.return}return i}function ir(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Xl(e,t,r,i,l){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,l?(u=oi(r,h),u!=null&&y.unshift(fi(r,u,n))):l||(u=oi(r,h),u!=null&&y.push(fi(r,u,n)))),r=r.return}y.length!==0&&e.push({event:t,listeners:y})}var Hd=/\r\n?/g,Fd=/\u0000|\uFFFD/g;function Gl(e){return(typeof e=="string"?e:""+e).replace(Hd,`
|
||
`).replace(Fd,"")}function Ni(e,t,r){if(t=Gl(t),Gl(e)!==t&&r)throw Error(W(425))}function _s(){}var Yn=null,Jn=null;function Zn(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 eo=typeof setTimeout=="function"?setTimeout:void 0,Nd=typeof clearTimeout=="function"?clearTimeout:void 0,Ql=typeof Promise=="function"?Promise:void 0,zd=typeof queueMicrotask=="function"?queueMicrotask:typeof Ql<"u"?function(e){return Ql.resolve(null).then(e).catch(jd)}:eo;function jd(e){setTimeout(function(){throw e})}function gn(e,t){var r=t,i=0;do{var l=r.nextSibling;if(e.removeChild(r),l&&l.nodeType===8)if(r=l.data,r==="/$"){if(i===0){e.removeChild(l),ci(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=l}while(r);ci(t)}function Pt(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 Yl(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 Pr=Math.random().toString(36).slice(2),lt="__reactFiber$"+Pr,_i="__reactProps$"+Pr,vt="__reactContainer$"+Pr,to="__reactEvents$"+Pr,Ud="__reactListeners$"+Pr,Wd="__reactHandles$"+Pr;function $t(e){var t=e[lt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[vt]||r[lt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Yl(e);e!==null;){if(r=e[lt])return r;e=Yl(e)}return t}e=r,r=e.parentNode}return null}function xi(e){return e=e[lt]||e[vt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function cr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function Bs(e){return e[_i]||null}var ro=[],ur=-1;function zt(e){return{current:e}}function ne(e){0>ur||(e.current=ro[ur],ro[ur]=null,ur--)}function ie(e,t){ur++,ro[ur]=e.current,e.current=t}var Ft={},xe=zt(Ft),Oe=zt(!1),Gt=Ft;function Er(e,t){var r=e.type.contextTypes;if(!r)return Ft;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var l={},h;for(h in r)l[h]=t[h];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Be(e){return e=e.childContextTypes,e!=null}function ps(){ne(Oe),ne(xe)}function Jl(e,t,r){if(xe.current!==Ft)throw Error(W(168));ie(xe,t),ie(Oe,r)}function Uc(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var l in i)if(!(l in t))throw Error(W(108,Lh(e)||"Unknown",l));return ue({},r,i)}function vs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ft,Gt=xe.current,ie(xe,e),ie(Oe,Oe.current),!0}function Zl(e,t,r){var i=e.stateNode;if(!i)throw Error(W(169));r?(e=Uc(e,t,Gt),i.__reactInternalMemoizedMergedChildContext=e,ne(Oe),ne(xe),ie(xe,e)):ne(Oe),ie(Oe,r)}var ht=null,Is=!1,mn=!1;function Wc(e){ht===null?ht=[e]:ht.push(e)}function $d(e){Is=!0,Wc(e)}function jt(){if(!mn&&ht!==null){mn=!0;var e=0,t=re;try{var r=ht;for(re=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}ht=null,Is=!1}catch(l){throw ht!==null&&(ht=ht.slice(e+1)),_c(Bo,jt),l}finally{re=t,mn=!1}}return null}var hr=[],dr=0,gs=null,ms=0,$e=[],Ke=0,Qt=null,dt=1,ft="";function Ut(e,t){hr[dr++]=ms,hr[dr++]=gs,gs=e,ms=t}function $c(e,t,r){$e[Ke++]=dt,$e[Ke++]=ft,$e[Ke++]=Qt,Qt=e;var i=dt;e=ft;var l=32-tt(i)-1;i&=~(1<<l),r+=1;var h=32-tt(t)+l;if(30<h){var y=l-l%5;h=(i&(1<<y)-1).toString(32),i>>=y,l-=y,dt=1<<32-tt(t)+l|r<<l|i,ft=h+e}else dt=1<<h|r<<l|i,ft=e}function $o(e){e.return!==null&&(Ut(e,1),$c(e,1,0))}function Ko(e){for(;e===gs;)gs=hr[--dr],hr[dr]=null,ms=hr[--dr],hr[dr]=null;for(;e===Qt;)Qt=$e[--Ke],$e[Ke]=null,ft=$e[--Ke],$e[Ke]=null,dt=$e[--Ke],$e[Ke]=null}var Ne=null,Fe=null,oe=!1,Ze=null;function Kc(e,t){var r=Ve(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 ea(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,Ne=e,Fe=Pt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ne=e,Fe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Qt!==null?{id:dt,overflow:ft}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Ve(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ne=e,Fe=null,!0):!1;default:return!1}}function io(e){return(e.mode&1)!==0&&(e.flags&128)===0}function so(e){if(oe){var t=Fe;if(t){var r=t;if(!ea(e,t)){if(io(e))throw Error(W(418));t=Pt(r.nextSibling);var i=Ne;t&&ea(e,t)?Kc(i,r):(e.flags=e.flags&-4097|2,oe=!1,Ne=e)}}else{if(io(e))throw Error(W(418));e.flags=e.flags&-4097|2,oe=!1,Ne=e}}}function ta(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ne=e}function zi(e){if(e!==Ne)return!1;if(!oe)return ta(e),oe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Zn(e.type,e.memoizedProps)),t&&(t=Fe)){if(io(e))throw Vc(),Error(W(418));for(;t;)Kc(e,t),t=Pt(t.nextSibling)}if(ta(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){Fe=Pt(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Fe=null}}else Fe=Ne?Pt(e.stateNode.nextSibling):null;return!0}function Vc(){for(var e=Fe;e;)e=Pt(e.nextSibling)}function kr(){Fe=Ne=null,oe=!1}function Vo(e){Ze===null?Ze=[e]:Ze.push(e)}var Kd=St.ReactCurrentBatchConfig;function Ur(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 l=i,h=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===h?t.ref:(t=function(y){var n=l.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 ji(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ra(e){var t=e._init;return t(e._payload)}function qc(e){function t(o,s){if(e){var a=o.deletions;a===null?(o.deletions=[s],o.flags|=16):a.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 l(o,s){return o=It(o,s),o.index=0,o.sibling=null,o}function h(o,s,a){return o.index=a,e?(a=o.alternate,a!==null?(a=a.index,a<s?(o.flags|=2,s):a):(o.flags|=2,s)):(o.flags|=1048576,s)}function y(o){return e&&o.alternate===null&&(o.flags|=2),o}function n(o,s,a,_){return s===null||s.tag!==6?(s=bn(a,o.mode,_),s.return=o,s):(s=l(s,a),s.return=o,s)}function u(o,s,a,_){var m=a.type;return m===nr?g(o,s,a.props.children,_,a.key):s!==null&&(s.elementType===m||typeof m=="object"&&m!==null&&m.$$typeof===Et&&ra(m)===s.type)?(_=l(s,a.props),_.ref=Ur(o,s,a),_.return=o,_):(_=ss(a.type,a.key,a.props,null,o.mode,_),_.ref=Ur(o,s,a),_.return=o,_)}function f(o,s,a,_){return s===null||s.tag!==4||s.stateNode.containerInfo!==a.containerInfo||s.stateNode.implementation!==a.implementation?(s=xn(a,o.mode,_),s.return=o,s):(s=l(s,a.children||[]),s.return=o,s)}function g(o,s,a,_,m){return s===null||s.tag!==7?(s=Xt(a,o.mode,_,m),s.return=o,s):(s=l(s,a),s.return=o,s)}function d(o,s,a){if(typeof s=="string"&&s!==""||typeof s=="number")return s=bn(""+s,o.mode,a),s.return=o,s;if(typeof s=="object"&&s!==null){switch(s.$$typeof){case Ti:return a=ss(s.type,s.key,s.props,null,o.mode,a),a.ref=Ur(o,null,s),a.return=o,a;case sr:return s=xn(s,o.mode,a),s.return=o,s;case Et:var _=s._init;return d(o,_(s._payload),a)}if(Vr(s)||Hr(s))return s=Xt(s,o.mode,a,null),s.return=o,s;ji(o,s)}return null}function p(o,s,a,_){var m=s!==null?s.key:null;if(typeof a=="string"&&a!==""||typeof a=="number")return m!==null?null:n(o,s,""+a,_);if(typeof a=="object"&&a!==null){switch(a.$$typeof){case Ti:return a.key===m?u(o,s,a,_):null;case sr:return a.key===m?f(o,s,a,_):null;case Et:return m=a._init,p(o,s,m(a._payload),_)}if(Vr(a)||Hr(a))return m!==null?null:g(o,s,a,_,null);ji(o,a)}return null}function C(o,s,a,_,m){if(typeof _=="string"&&_!==""||typeof _=="number")return o=o.get(a)||null,n(s,o,""+_,m);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Ti:return o=o.get(_.key===null?a:_.key)||null,u(s,o,_,m);case sr:return o=o.get(_.key===null?a:_.key)||null,f(s,o,_,m);case Et:var E=_._init;return C(o,s,a,E(_._payload),m)}if(Vr(_)||Hr(_))return o=o.get(a)||null,g(s,o,_,m,null);ji(s,_)}return null}function w(o,s,a,_){for(var m=null,E=null,b=s,v=s=0,k=null;b!==null&&v<a.length;v++){b.index>v?(k=b,b=null):k=b.sibling;var R=p(o,b,a[v],_);if(R===null){b===null&&(b=k);break}e&&b&&R.alternate===null&&t(o,b),s=h(R,s,v),E===null?m=R:E.sibling=R,E=R,b=k}if(v===a.length)return r(o,b),oe&&Ut(o,v),m;if(b===null){for(;v<a.length;v++)b=d(o,a[v],_),b!==null&&(s=h(b,s,v),E===null?m=b:E.sibling=b,E=b);return oe&&Ut(o,v),m}for(b=i(o,b);v<a.length;v++)k=C(b,o,v,a[v],_),k!==null&&(e&&k.alternate!==null&&b.delete(k.key===null?v:k.key),s=h(k,s,v),E===null?m=k:E.sibling=k,E=k);return e&&b.forEach(function(P){return t(o,P)}),oe&&Ut(o,v),m}function S(o,s,a,_){var m=Hr(a);if(typeof m!="function")throw Error(W(150));if(a=m.call(a),a==null)throw Error(W(151));for(var E=m=null,b=s,v=s=0,k=null,R=a.next();b!==null&&!R.done;v++,R=a.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?m=P:E.sibling=P,E=P,b=k}if(R.done)return r(o,b),oe&&Ut(o,v),m;if(b===null){for(;!R.done;v++,R=a.next())R=d(o,R.value,_),R!==null&&(s=h(R,s,v),E===null?m=R:E.sibling=R,E=R);return oe&&Ut(o,v),m}for(b=i(o,b);!R.done;v++,R=a.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?m=R:E.sibling=R,E=R);return e&&b.forEach(function(A){return t(o,A)}),oe&&Ut(o,v),m}function c(o,s,a,_){if(typeof a=="object"&&a!==null&&a.type===nr&&a.key===null&&(a=a.props.children),typeof a=="object"&&a!==null){switch(a.$$typeof){case Ti:e:{for(var m=a.key,E=s;E!==null;){if(E.key===m){if(m=a.type,m===nr){if(E.tag===7){r(o,E.sibling),s=l(E,a.props.children),s.return=o,o=s;break e}}else if(E.elementType===m||typeof m=="object"&&m!==null&&m.$$typeof===Et&&ra(m)===E.type){r(o,E.sibling),s=l(E,a.props),s.ref=Ur(o,E,a),s.return=o,o=s;break e}r(o,E);break}else t(o,E);E=E.sibling}a.type===nr?(s=Xt(a.props.children,o.mode,_,a.key),s.return=o,o=s):(_=ss(a.type,a.key,a.props,null,o.mode,_),_.ref=Ur(o,s,a),_.return=o,o=_)}return y(o);case sr:e:{for(E=a.key;s!==null;){if(s.key===E)if(s.tag===4&&s.stateNode.containerInfo===a.containerInfo&&s.stateNode.implementation===a.implementation){r(o,s.sibling),s=l(s,a.children||[]),s.return=o,o=s;break e}else{r(o,s);break}else t(o,s);s=s.sibling}s=xn(a,o.mode,_),s.return=o,o=s}return y(o);case Et:return E=a._init,c(o,s,E(a._payload),_)}if(Vr(a))return w(o,s,a,_);if(Hr(a))return S(o,s,a,_);ji(o,a)}return typeof a=="string"&&a!==""||typeof a=="number"?(a=""+a,s!==null&&s.tag===6?(r(o,s.sibling),s=l(s,a),s.return=o,o=s):(r(o,s),s=bn(a,o.mode,_),s.return=o,o=s),y(o)):r(o,s)}return c}var br=qc(!0),Xc=qc(!1),Ss=zt(null),ys=null,fr=null,qo=null;function Xo(){qo=fr=ys=null}function Go(e){var t=Ss.current;ne(Ss),e._currentValue=t}function no(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 yr(e,t){ys=e,qo=fr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Me=!0),e.firstContext=null)}function Xe(e){var t=e._currentValue;if(qo!==e)if(e={context:e,memoizedValue:t,next:null},fr===null){if(ys===null)throw Error(W(308));fr=e,ys.dependencies={lanes:0,firstContext:e}}else fr=fr.next=e;return t}var Kt=null;function Qo(e){Kt===null?Kt=[e]:Kt.push(e)}function Gc(e,t,r,i){var l=t.interleaved;return l===null?(r.next=r,Qo(t)):(r.next=l.next,l.next=r),t.interleaved=r,gt(e,i)}function gt(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 kt=!1;function Yo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qc(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 _t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Mt(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,Z&2){var l=i.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),i.pending=t,gt(e,r)}return l=i.interleaved,l===null?(t.next=t,Qo(i)):(t.next=l.next,l.next=t),i.interleaved=t,gt(e,r)}function Ji(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,Io(e,r)}}function ia(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var l=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?l=h=y:h=h.next=y,r=r.next}while(r!==null);h===null?l=h=t:h=h.next=t}else l=h=t;r={baseState:i.baseState,firstBaseUpdate:l,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 Cs(e,t,r,i){var l=e.updateQueue;kt=!1;var h=l.firstBaseUpdate,y=l.lastBaseUpdate,n=l.shared.pending;if(n!==null){l.shared.pending=null;var u=n,f=u.next;u.next=null,y===null?h=f:y.next=f,y=u;var g=e.alternate;g!==null&&(g=g.updateQueue,n=g.lastBaseUpdate,n!==y&&(n===null?g.firstBaseUpdate=f:n.next=f,g.lastBaseUpdate=u))}if(h!==null){var d=l.baseState;y=0,g=f=u=null,n=h;do{var p=n.lane,C=n.eventTime;if((i&p)===p){g!==null&&(g=g.next={eventTime:C,lane:0,tag:n.tag,payload:n.payload,callback:n.callback,next:null});e:{var w=e,S=n;switch(p=t,C=r,S.tag){case 1:if(w=S.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=S.payload,p=typeof w=="function"?w.call(C,d,p):w,p==null)break e;d=ue({},d,p);break e;case 2:kt=!0}}n.callback!==null&&n.lane!==0&&(e.flags|=64,p=l.effects,p===null?l.effects=[n]:p.push(n))}else C={eventTime:C,lane:p,tag:n.tag,payload:n.payload,callback:n.callback,next:null},g===null?(f=g=C,u=d):g=g.next=C,y|=p;if(n=n.next,n===null){if(n=l.shared.pending,n===null)break;p=n,n=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);if(g===null&&(u=d),l.baseState=u,l.firstBaseUpdate=f,l.lastBaseUpdate=g,t=l.shared.interleaved,t!==null){l=t;do y|=l.lane,l=l.next;while(l!==t)}else h===null&&(l.shared.lanes=0);Jt|=y,e.lanes=y,e.memoizedState=d}}function sa(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],l=i.callback;if(l!==null){if(i.callback=null,i=r,typeof l!="function")throw Error(W(191,l));l.call(i)}}}var Li={},ct=zt(Li),pi=zt(Li),vi=zt(Li);function Vt(e){if(e===Li)throw Error(W(174));return e}function Jo(e,t){switch(ie(vi,t),ie(pi,e),ie(ct,Li),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Nn(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Nn(t,e)}ne(ct),ie(ct,t)}function xr(){ne(ct),ne(pi),ne(vi)}function Yc(e){Vt(vi.current);var t=Vt(ct.current),r=Nn(t,e.type);t!==r&&(ie(pi,e),ie(ct,r))}function Zo(e){pi.current===e&&(ne(ct),ne(pi))}var ae=zt(0);function ws(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 Sn=[];function el(){for(var e=0;e<Sn.length;e++)Sn[e]._workInProgressVersionPrimary=null;Sn.length=0}var Zi=St.ReactCurrentDispatcher,yn=St.ReactCurrentBatchConfig,Yt=0,ce=null,_e=null,ve=null,Es=!1,ei=!1,gi=0,Vd=0;function we(){throw Error(W(321))}function tl(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!it(e[r],t[r]))return!1;return!0}function rl(e,t,r,i,l,h){if(Yt=h,ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zi.current=e===null||e.memoizedState===null?Qd:Yd,e=r(i,l),ei){h=0;do{if(ei=!1,gi=0,25<=h)throw Error(W(301));h+=1,ve=_e=null,t.updateQueue=null,Zi.current=Jd,e=r(i,l)}while(ei)}if(Zi.current=ks,t=_e!==null&&_e.next!==null,Yt=0,ve=_e=ce=null,Es=!1,t)throw Error(W(300));return e}function il(){var e=gi!==0;return gi=0,e}function ot(){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 Ge(){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 mi(e,t){return typeof t=="function"?t(e):t}function Cn(e){var t=Ge(),r=t.queue;if(r===null)throw Error(W(311));r.lastRenderedReducer=e;var i=_e,l=i.baseQueue,h=r.pending;if(h!==null){if(l!==null){var y=l.next;l.next=h.next,h.next=y}i.baseQueue=l=h,r.pending=null}if(l!==null){h=l.next,i=i.baseState;var n=y=null,u=null,f=h;do{var g=f.lane;if((Yt&g)===g)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:g,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};u===null?(n=u=d,y=i):u=u.next=d,ce.lanes|=g,Jt|=g}f=f.next}while(f!==null&&f!==h);u===null?y=i:u.next=n,it(i,t.memoizedState)||(Me=!0),t.memoizedState=i,t.baseState=y,t.baseQueue=u,r.lastRenderedState=i}if(e=r.interleaved,e!==null){l=e;do h=l.lane,ce.lanes|=h,Jt|=h,l=l.next;while(l!==e)}else l===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function wn(e){var t=Ge(),r=t.queue;if(r===null)throw Error(W(311));r.lastRenderedReducer=e;var i=r.dispatch,l=r.pending,h=t.memoizedState;if(l!==null){r.pending=null;var y=l=l.next;do h=e(h,y.action),y=y.next;while(y!==l);it(h,t.memoizedState)||(Me=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),r.lastRenderedState=h}return[h,i]}function Jc(){}function Zc(e,t){var r=ce,i=Ge(),l=t(),h=!it(i.memoizedState,l);if(h&&(i.memoizedState=l,Me=!0),i=i.queue,sl(ru.bind(null,r,i,e),[e]),i.getSnapshot!==t||h||ve!==null&&ve.memoizedState.tag&1){if(r.flags|=2048,Si(9,tu.bind(null,r,i,l,t),void 0,null),ge===null)throw Error(W(349));Yt&30||eu(r,t,l)}return l}function eu(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 tu(e,t,r,i){t.value=r,t.getSnapshot=i,iu(t)&&su(e)}function ru(e,t,r){return r(function(){iu(t)&&su(e)})}function iu(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!it(e,r)}catch{return!0}}function su(e){var t=gt(e,1);t!==null&&rt(t,e,1,-1)}function na(e){var t=ot();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:mi,lastRenderedState:e},t.queue=e,e=e.dispatch=Gd.bind(null,ce,e),[t.memoizedState,e]}function Si(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 nu(){return Ge().memoizedState}function es(e,t,r,i){var l=ot();ce.flags|=e,l.memoizedState=Si(1|t,r,void 0,i===void 0?null:i)}function Hs(e,t,r,i){var l=Ge();i=i===void 0?null:i;var h=void 0;if(_e!==null){var y=_e.memoizedState;if(h=y.destroy,i!==null&&tl(i,y.deps)){l.memoizedState=Si(t,r,h,i);return}}ce.flags|=e,l.memoizedState=Si(1|t,r,h,i)}function oa(e,t){return es(8390656,8,e,t)}function sl(e,t){return Hs(2048,8,e,t)}function ou(e,t){return Hs(4,2,e,t)}function lu(e,t){return Hs(4,4,e,t)}function au(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 cu(e,t,r){return r=r!=null?r.concat([e]):null,Hs(4,4,au.bind(null,t,e),r)}function nl(){}function uu(e,t){var r=Ge();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&tl(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function hu(e,t){var r=Ge();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&tl(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function du(e,t,r){return Yt&21?(it(r,t)||(r=gc(),ce.lanes|=r,Jt|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Me=!0),e.memoizedState=r)}function qd(e,t){var r=re;re=r!==0&&4>r?r:4,e(!0);var i=yn.transition;yn.transition={};try{e(!1),t()}finally{re=r,yn.transition=i}}function fu(){return Ge().memoizedState}function Xd(e,t,r){var i=Bt(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},_u(e))pu(t,r);else if(r=Gc(e,t,r,i),r!==null){var l=Re();rt(r,e,i,l),vu(r,t,i)}}function Gd(e,t,r){var i=Bt(e),l={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(_u(e))pu(t,l);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(l.hasEagerState=!0,l.eagerState=n,it(n,y)){var u=t.interleaved;u===null?(l.next=l,Qo(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}r=Gc(e,t,l,i),r!==null&&(l=Re(),rt(r,e,i,l),vu(r,t,i))}}function _u(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function pu(e,t){ei=Es=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function vu(e,t,r){if(r&4194240){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Io(e,r)}}var ks={readContext:Xe,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},Qd={readContext:Xe,useCallback:function(e,t){return ot().memoizedState=[e,t===void 0?null:t],e},useContext:Xe,useEffect:oa,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,es(4194308,4,au.bind(null,t,e),r)},useLayoutEffect:function(e,t){return es(4194308,4,e,t)},useInsertionEffect:function(e,t){return es(4,2,e,t)},useMemo:function(e,t){var r=ot();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=ot();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=Xd.bind(null,ce,e),[i.memoizedState,e]},useRef:function(e){var t=ot();return e={current:e},t.memoizedState=e},useState:na,useDebugValue:nl,useDeferredValue:function(e){return ot().memoizedState=e},useTransition:function(){var e=na(!1),t=e[0];return e=qd.bind(null,e[1]),ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=ce,l=ot();if(oe){if(r===void 0)throw Error(W(407));r=r()}else{if(r=t(),ge===null)throw Error(W(349));Yt&30||eu(i,t,r)}l.memoizedState=r;var h={value:r,getSnapshot:t};return l.queue=h,oa(ru.bind(null,i,h,e),[e]),i.flags|=2048,Si(9,tu.bind(null,i,h,r,t),void 0,null),r},useId:function(){var e=ot(),t=ge.identifierPrefix;if(oe){var r=ft,i=dt;r=(i&~(1<<32-tt(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=gi++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Vd++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Yd={readContext:Xe,useCallback:uu,useContext:Xe,useEffect:sl,useImperativeHandle:cu,useInsertionEffect:ou,useLayoutEffect:lu,useMemo:hu,useReducer:Cn,useRef:nu,useState:function(){return Cn(mi)},useDebugValue:nl,useDeferredValue:function(e){var t=Ge();return du(t,_e.memoizedState,e)},useTransition:function(){var e=Cn(mi)[0],t=Ge().memoizedState;return[e,t]},useMutableSource:Jc,useSyncExternalStore:Zc,useId:fu,unstable_isNewReconciler:!1},Jd={readContext:Xe,useCallback:uu,useContext:Xe,useEffect:sl,useImperativeHandle:cu,useInsertionEffect:ou,useLayoutEffect:lu,useMemo:hu,useReducer:wn,useRef:nu,useState:function(){return wn(mi)},useDebugValue:nl,useDeferredValue:function(e){var t=Ge();return _e===null?t.memoizedState=e:du(t,_e.memoizedState,e)},useTransition:function(){var e=wn(mi)[0],t=Ge().memoizedState;return[e,t]},useMutableSource:Jc,useSyncExternalStore:Zc,useId:fu,unstable_isNewReconciler:!1};function Ye(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 oo(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 Fs={isMounted:function(e){return(e=e._reactInternals)?tr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=Re(),l=Bt(e),h=_t(i,l);h.payload=t,r!=null&&(h.callback=r),t=Mt(e,h,l),t!==null&&(rt(t,e,l,i),Ji(t,e,l))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=Re(),l=Bt(e),h=_t(i,l);h.tag=1,h.payload=t,r!=null&&(h.callback=r),t=Mt(e,h,l),t!==null&&(rt(t,e,l,i),Ji(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Re(),i=Bt(e),l=_t(r,i);l.tag=2,t!=null&&(l.callback=t),t=Mt(e,l,i),t!==null&&(rt(t,e,i,r),Ji(t,e,i))}};function la(e,t,r,i,l,h,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,h,y):t.prototype&&t.prototype.isPureReactComponent?!hi(r,i)||!hi(l,h):!0}function gu(e,t,r){var i=!1,l=Ft,h=t.contextType;return typeof h=="object"&&h!==null?h=Xe(h):(l=Be(t)?Gt:xe.current,i=t.contextTypes,h=(i=i!=null)?Er(e,l):Ft),t=new t(r,h),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Fs,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=h),t}function aa(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&&Fs.enqueueReplaceState(t,t.state,null)}function lo(e,t,r,i){var l=e.stateNode;l.props=r,l.state=e.memoizedState,l.refs={},Yo(e);var h=t.contextType;typeof h=="object"&&h!==null?l.context=Xe(h):(h=Be(t)?Gt:xe.current,l.context=Er(e,h)),l.state=e.memoizedState,h=t.getDerivedStateFromProps,typeof h=="function"&&(oo(e,t,h,r),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&Fs.enqueueReplaceState(l,l.state,null),Cs(e,r,l,i),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function Lr(e,t){try{var r="",i=t;do r+=xh(i),i=i.return;while(i);var l=r}catch(h){l=`
|
||
Error generating stack: `+h.message+`
|
||
`+h.stack}return{value:e,source:t,stack:l,digest:null}}function En(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function ao(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Zd=typeof WeakMap=="function"?WeakMap:Map;function mu(e,t,r){r=_t(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){xs||(xs=!0,So=i),ao(e,t)},r}function Su(e,t,r){r=_t(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var l=t.value;r.payload=function(){return i(l)},r.callback=function(){ao(e,t)}}var h=e.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(r.callback=function(){ao(e,t),typeof i!="function"&&(Ot===null?Ot=new Set([this]):Ot.add(this));var y=t.stack;this.componentDidCatch(t.value,{componentStack:y!==null?y:""})}),r}function ca(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new Zd;var l=new Set;i.set(t,l)}else l=i.get(t),l===void 0&&(l=new Set,i.set(t,l));l.has(r)||(l.add(r),e=_f.bind(null,e,t,r),t.then(e,e))}function ua(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 ha(e,t,r,i,l){return e.mode&1?(e.flags|=65536,e.lanes=l,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=_t(-1,1),t.tag=2,Mt(r,t,1))),r.lanes|=1),e)}var ef=St.ReactCurrentOwner,Me=!1;function Le(e,t,r,i){t.child=e===null?Xc(t,null,r,i):br(t,e.child,r,i)}function da(e,t,r,i,l){r=r.render;var h=t.ref;return yr(t,l),i=rl(e,t,r,i,h,l),r=il(),e!==null&&!Me?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,mt(e,t,l)):(oe&&r&&$o(t),t.flags|=1,Le(e,t,i,l),t.child)}function fa(e,t,r,i,l){if(e===null){var h=r.type;return typeof h=="function"&&!fl(h)&&h.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=h,yu(e,t,h,i,l)):(e=ss(r.type,null,i,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!(e.lanes&l)){var y=h.memoizedProps;if(r=r.compare,r=r!==null?r:hi,r(y,i)&&e.ref===t.ref)return mt(e,t,l)}return t.flags|=1,e=It(h,i),e.ref=t.ref,e.return=t,t.child=e}function yu(e,t,r,i,l){if(e!==null){var h=e.memoizedProps;if(hi(h,i)&&e.ref===t.ref)if(Me=!1,t.pendingProps=i=h,(e.lanes&l)!==0)e.flags&131072&&(Me=!0);else return t.lanes=e.lanes,mt(e,t,l)}return co(e,t,r,i,l)}function Cu(e,t,r){var i=t.pendingProps,l=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(pr,He),He|=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(pr,He),He|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=h!==null?h.baseLanes:r,ie(pr,He),He|=i}else h!==null?(i=h.baseLanes|r,t.memoizedState=null):i=r,ie(pr,He),He|=i;return Le(e,t,l,r),t.child}function wu(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function co(e,t,r,i,l){var h=Be(r)?Gt:xe.current;return h=Er(t,h),yr(t,l),r=rl(e,t,r,i,h,l),i=il(),e!==null&&!Me?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,mt(e,t,l)):(oe&&i&&$o(t),t.flags|=1,Le(e,t,r,l),t.child)}function _a(e,t,r,i,l){if(Be(r)){var h=!0;vs(t)}else h=!1;if(yr(t,l),t.stateNode===null)ts(e,t),gu(t,r,i),lo(t,r,i,l),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=Xe(f):(f=Be(r)?Gt:xe.current,f=Er(t,f));var g=r.getDerivedStateFromProps,d=typeof g=="function"||typeof y.getSnapshotBeforeUpdate=="function";d||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(n!==i||u!==f)&&aa(t,y,i,f),kt=!1;var p=t.memoizedState;y.state=p,Cs(t,i,y,l),u=t.memoizedState,n!==i||p!==u||Oe.current||kt?(typeof g=="function"&&(oo(t,r,g,i),u=t.memoizedState),(n=kt||la(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,Qc(e,t),n=t.memoizedProps,f=t.type===t.elementType?n:Ye(t.type,n),y.props=f,d=t.pendingProps,p=y.context,u=r.contextType,typeof u=="object"&&u!==null?u=Xe(u):(u=Be(r)?Gt:xe.current,u=Er(t,u));var C=r.getDerivedStateFromProps;(g=typeof C=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(n!==d||p!==u)&&aa(t,y,i,u),kt=!1,p=t.memoizedState,y.state=p,Cs(t,i,y,l);var w=t.memoizedState;n!==d||p!==w||Oe.current||kt?(typeof C=="function"&&(oo(t,r,C,i),w=t.memoizedState),(f=kt||la(t,r,f,i,p,w,u)||!1)?(g||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 uo(e,t,r,i,h,l)}function uo(e,t,r,i,l,h){wu(e,t);var y=(t.flags&128)!==0;if(!i&&!y)return l&&Zl(t,r,!1),mt(e,t,h);i=t.stateNode,ef.current=t;var n=y&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&y?(t.child=br(t,e.child,null,h),t.child=br(t,null,n,h)):Le(e,t,n,h),t.memoizedState=i.state,l&&Zl(t,r,!0),t.child}function Eu(e){var t=e.stateNode;t.pendingContext?Jl(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Jl(e,t.context,!1),Jo(e,t.containerInfo)}function pa(e,t,r,i,l){return kr(),Vo(l),t.flags|=256,Le(e,t,r,i),t.child}var ho={dehydrated:null,treeContext:null,retryLane:0};function fo(e){return{baseLanes:e,cachePool:null,transitions:null}}function ku(e,t,r){var i=t.pendingProps,l=ae.current,h=!1,y=(t.flags&128)!==0,n;if((n=y)||(n=e!==null&&e.memoizedState===null?!1:(l&2)!==0),n?(h=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),ie(ae,l&1),e===null)return so(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=js(y,i,0,null),e=Xt(e,i,r,null),h.return=t,e.return=t,h.sibling=e,t.child=h,t.child.memoizedState=fo(r),t.memoizedState=ho,e):ol(t,y));if(l=e.memoizedState,l!==null&&(n=l.dehydrated,n!==null))return tf(e,t,y,i,n,l,r);if(h){h=i.fallback,y=t.mode,l=e.child,n=l.sibling;var u={mode:"hidden",children:i.children};return!(y&1)&&t.child!==l?(i=t.child,i.childLanes=0,i.pendingProps=u,t.deletions=null):(i=It(l,u),i.subtreeFlags=l.subtreeFlags&14680064),n!==null?h=It(n,h):(h=Xt(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?fo(r):{baseLanes:y.baseLanes|r,cachePool:null,transitions:y.transitions},h.memoizedState=y,h.childLanes=e.childLanes&~r,t.memoizedState=ho,i}return h=e.child,e=h.sibling,i=It(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 ol(e,t){return t=js({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ui(e,t,r,i){return i!==null&&Vo(i),br(t,e.child,null,r),e=ol(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tf(e,t,r,i,l,h,y){if(r)return t.flags&256?(t.flags&=-257,i=En(Error(W(422))),Ui(e,t,y,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(h=i.fallback,l=t.mode,i=js({mode:"visible",children:i.children},l,0,null),h=Xt(h,l,y,null),h.flags|=2,i.return=t,h.return=t,i.sibling=h,t.child=i,t.mode&1&&br(t,e.child,null,y),t.child.memoizedState=fo(y),t.memoizedState=ho,h);if(!(t.mode&1))return Ui(e,t,y,null);if(l.data==="$!"){if(i=l.nextSibling&&l.nextSibling.dataset,i)var n=i.dgst;return i=n,h=Error(W(419)),i=En(h,i,void 0),Ui(e,t,y,i)}if(n=(y&e.childLanes)!==0,Me||n){if(i=ge,i!==null){switch(y&-y){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(i.suspendedLanes|y)?0:l,l!==0&&l!==h.retryLane&&(h.retryLane=l,gt(e,l),rt(i,e,l,-1))}return dl(),i=En(Error(W(421))),Ui(e,t,y,i)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=pf.bind(null,e),l._reactRetry=t,null):(e=h.treeContext,Fe=Pt(l.nextSibling),Ne=t,oe=!0,Ze=null,e!==null&&($e[Ke++]=dt,$e[Ke++]=ft,$e[Ke++]=Qt,dt=e.id,ft=e.overflow,Qt=t),t=ol(t,i.children),t.flags|=4096,t)}function va(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),no(e.return,t,r)}function kn(e,t,r,i,l){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:l}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=i,h.tail=r,h.tailMode=l)}function bu(e,t,r){var i=t.pendingProps,l=i.revealOrder,h=i.tail;if(Le(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&&va(e,r,t);else if(e.tag===19)va(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(l){case"forwards":for(r=t.child,l=null;r!==null;)e=r.alternate,e!==null&&ws(e)===null&&(l=r),r=r.sibling;r=l,r===null?(l=t.child,t.child=null):(l=r.sibling,r.sibling=null),kn(t,!1,l,r,h);break;case"backwards":for(r=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&ws(e)===null){t.child=l;break}e=l.sibling,l.sibling=r,r=l,l=e}kn(t,!0,r,null,h);break;case"together":kn(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ts(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function mt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Jt|=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=It(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=It(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function rf(e,t,r){switch(t.tag){case 3:Eu(t),kr();break;case 5:Yc(t);break;case 1:Be(t.type)&&vs(t);break;case 4:Jo(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,l=t.memoizedProps.value;ie(Ss,i._currentValue),i._currentValue=l;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?ku(e,t,r):(ie(ae,ae.current&1),e=mt(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 bu(e,t,r);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ie(ae,ae.current),i)break;return null;case 22:case 23:return t.lanes=0,Cu(e,t,r)}return mt(e,t,r)}var xu,_o,Lu,Ru;xu=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}};_o=function(){};Lu=function(e,t,r,i){var l=e.memoizedProps;if(l!==i){e=t.stateNode,Vt(ct.current);var h=null;switch(r){case"input":l=Bn(e,l),i=Bn(e,i),h=[];break;case"select":l=ue({},l,{value:void 0}),i=ue({},i,{value:void 0}),h=[];break;case"textarea":l=Fn(e,l),i=Fn(e,i),h=[];break;default:typeof l.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=_s)}zn(r,i);var y;r=null;for(f in l)if(!i.hasOwnProperty(f)&&l.hasOwnProperty(f)&&l[f]!=null)if(f==="style"){var n=l[f];for(y in n)n.hasOwnProperty(y)&&(r||(r={}),r[y]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(si.hasOwnProperty(f)?h||(h=[]):(h=h||[]).push(f,null));for(f in i){var u=i[f];if(n=l!=null?l[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"&&(si.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)}};Ru=function(e,t,r,i){r!==i&&(t.flags|=4)};function Wr(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 l=e.child;l!==null;)r|=l.lanes|l.childLanes,i|=l.subtreeFlags&14680064,i|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)r|=l.lanes|l.childLanes,i|=l.subtreeFlags,i|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function sf(e,t,r){var i=t.pendingProps;switch(Ko(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)&&ps(),Ee(t),null;case 3:return i=t.stateNode,xr(),ne(Oe),ne(xe),el(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(zi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ze!==null&&(wo(Ze),Ze=null))),_o(e,t),Ee(t),null;case 5:Zo(t);var l=Vt(vi.current);if(r=t.type,e!==null&&t.stateNode!=null)Lu(e,t,r,i,l),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=Vt(ct.current),zi(t)){i=t.stateNode,r=t.type;var h=t.memoizedProps;switch(i[lt]=t,i[_i]=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(l=0;l<Xr.length;l++)se(Xr[l],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":bl(i,h),se("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!h.multiple},se("invalid",i);break;case"textarea":Ll(i,h),se("invalid",i)}zn(r,h),l=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&&Ni(i.textContent,n,e),l=["children",n]):typeof n=="number"&&i.textContent!==""+n&&(h.suppressHydrationWarning!==!0&&Ni(i.textContent,n,e),l=["children",""+n]):si.hasOwnProperty(y)&&n!=null&&y==="onScroll"&&se("scroll",i)}switch(r){case"input":Ai(i),xl(i,h,!0);break;case"textarea":Ai(i),Rl(i);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(i.onclick=_s)}i=l,t.updateQueue=i,i!==null&&(t.flags|=4)}else{y=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=rc(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[lt]=t,e[_i]=i,xu(e,t,!1,!1),t.stateNode=e;e:{switch(y=jn(r,i),r){case"dialog":se("cancel",e),se("close",e),l=i;break;case"iframe":case"object":case"embed":se("load",e),l=i;break;case"video":case"audio":for(l=0;l<Xr.length;l++)se(Xr[l],e);l=i;break;case"source":se("error",e),l=i;break;case"img":case"image":case"link":se("error",e),se("load",e),l=i;break;case"details":se("toggle",e),l=i;break;case"input":bl(e,i),l=Bn(e,i),se("invalid",e);break;case"option":l=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},l=ue({},i,{value:void 0}),se("invalid",e);break;case"textarea":Ll(e,i),l=Fn(e,i),se("invalid",e);break;default:l=i}zn(r,l),n=l;for(h in n)if(n.hasOwnProperty(h)){var u=n[h];h==="style"?nc(e,u):h==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&ic(e,u)):h==="children"?typeof u=="string"?(r!=="textarea"||u!=="")&&ni(e,u):typeof u=="number"&&ni(e,""+u):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(si.hasOwnProperty(h)?u!=null&&h==="onScroll"&&se("scroll",e):u!=null&&To(e,h,u,y))}switch(r){case"input":Ai(e),xl(e,i,!1);break;case"textarea":Ai(e),Rl(e);break;case"option":i.value!=null&&e.setAttribute("value",""+Ht(i.value));break;case"select":e.multiple=!!i.multiple,h=i.value,h!=null?vr(e,!!i.multiple,h,!1):i.defaultValue!=null&&vr(e,!!i.multiple,i.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=_s)}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)Ru(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(W(166));if(r=Vt(vi.current),Vt(ct.current),zi(t)){if(i=t.stateNode,r=t.memoizedProps,i[lt]=t,(h=i.nodeValue!==r)&&(e=Ne,e!==null))switch(e.tag){case 3:Ni(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ni(i.nodeValue,r,(e.mode&1)!==0)}h&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[lt]=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&&Fe!==null&&t.mode&1&&!(t.flags&128))Vc(),kr(),t.flags|=98560,h=!1;else if(h=zi(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[lt]=t}else kr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ee(t),h=!1}else Ze!==null&&(wo(Ze),Ze=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):dl())),t.updateQueue!==null&&(t.flags|=4),Ee(t),null);case 4:return xr(),_o(e,t),e===null&&di(t.stateNode.containerInfo),Ee(t),null;case 10:return Go(t.type._context),Ee(t),null;case 17:return Be(t.type)&&ps(),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)Wr(h,!1);else{if(pe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(y=ws(e),y!==null){for(t.flags|=128,Wr(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()>Rr&&(t.flags|=128,i=!0,Wr(h,!1),t.lanes=4194304)}else{if(!i)if(e=ws(y),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Wr(h,!0),h.tail===null&&h.tailMode==="hidden"&&!y.alternate&&!oe)return Ee(t),null}else 2*de()-h.renderingStartTime>Rr&&r!==1073741824&&(t.flags|=128,i=!0,Wr(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 hl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?He&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 nf(e,t){switch(Ko(t),t.tag){case 1:return Be(t.type)&&ps(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xr(),ne(Oe),ne(xe),el(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Zo(t),null;case 13:if(ne(ae),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));kr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(ae),null;case 4:return xr(),null;case 10:return Go(t.type._context),null;case 22:case 23:return hl(),null;case 24:return null;default:return null}}var Wi=!1,ke=!1,of=typeof WeakSet=="function"?WeakSet:Set,q=null;function _r(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 po(e,t,r){try{r()}catch(i){he(e,t,i)}}var ga=!1;function lf(e,t){if(Yn=hs,e=Mc(),Wo(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 l=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,g=0,d=e,p=null;t:for(;;){for(var C;d!==r||l!==0&&d.nodeType!==3||(n=y+l),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===l&&(n=y),p===h&&++g===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(Jn={focusedElem:e,selectionRange:r},hs=!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 S=w.memoizedProps,c=w.memoizedState,o=t.stateNode,s=o.getSnapshotBeforeUpdate(t.elementType===t.type?S:Ye(t.type,S),c);o.__reactInternalSnapshotBeforeUpdate=s}break;case 3:var a=t.stateNode.containerInfo;a.nodeType===1?a.textContent="":a.nodeType===9&&a.documentElement&&a.removeChild(a.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=ga,ga=!1,w}function ti(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var l=i=i.next;do{if((l.tag&e)===e){var h=l.destroy;l.destroy=void 0,h!==void 0&&po(t,r,h)}l=l.next}while(l!==i)}}function Ns(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 vo(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 Du(e){var t=e.alternate;t!==null&&(e.alternate=null,Du(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[lt],delete t[_i],delete t[to],delete t[Ud],delete t[Wd])),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 Tu(e){return e.tag===5||e.tag===3||e.tag===4}function ma(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tu(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 go(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=_s));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}function mo(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(mo(e,t,r),e=e.sibling;e!==null;)mo(e,t,r),e=e.sibling}var Se=null,Je=!1;function wt(e,t,r){for(r=r.child;r!==null;)Au(e,t,r),r=r.sibling}function Au(e,t,r){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(As,r)}catch{}switch(r.tag){case 5:ke||_r(r,t);case 6:var i=Se,l=Je;Se=null,wt(e,t,r),Se=i,Je=l,Se!==null&&(Je?(e=Se,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Se.removeChild(r.stateNode));break;case 18:Se!==null&&(Je?(e=Se,r=r.stateNode,e.nodeType===8?gn(e.parentNode,r):e.nodeType===1&&gn(e,r),ci(e)):gn(Se,r.stateNode));break;case 4:i=Se,l=Je,Se=r.stateNode.containerInfo,Je=!0,wt(e,t,r),Se=i,Je=l;break;case 0:case 11:case 14:case 15:if(!ke&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){l=i=i.next;do{var h=l,y=h.destroy;h=h.tag,y!==void 0&&(h&2||h&4)&&po(r,t,y),l=l.next}while(l!==i)}wt(e,t,r);break;case 1:if(!ke&&(_r(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)}wt(e,t,r);break;case 21:wt(e,t,r);break;case 22:r.mode&1?(ke=(i=ke)||r.memoizedState!==null,wt(e,t,r),ke=i):wt(e,t,r);break;default:wt(e,t,r)}}function Sa(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new of),t.forEach(function(i){var l=vf.bind(null,e,i);r.has(i)||(r.add(i),i.then(l,l))})}}function Qe(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];try{var h=e,y=t,n=y;e:for(;n!==null;){switch(n.tag){case 5:Se=n.stateNode,Je=!1;break e;case 3:Se=n.stateNode.containerInfo,Je=!0;break e;case 4:Se=n.stateNode.containerInfo,Je=!0;break e}n=n.return}if(Se===null)throw Error(W(160));Au(h,y,l),Se=null,Je=!1;var u=l.alternate;u!==null&&(u.return=null),l.return=null}catch(f){he(l,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Pu(t,e),t=t.sibling}function Pu(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Qe(t,e),nt(e),i&4){try{ti(3,e,e.return),Ns(3,e)}catch(S){he(e,e.return,S)}try{ti(5,e,e.return)}catch(S){he(e,e.return,S)}}break;case 1:Qe(t,e),nt(e),i&512&&r!==null&&_r(r,r.return);break;case 5:if(Qe(t,e),nt(e),i&512&&r!==null&&_r(r,r.return),e.flags&32){var l=e.stateNode;try{ni(l,"")}catch(S){he(e,e.return,S)}}if(i&4&&(l=e.stateNode,l!=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&&ec(l,h),jn(n,y);var f=jn(n,h);for(y=0;y<u.length;y+=2){var g=u[y],d=u[y+1];g==="style"?nc(l,d):g==="dangerouslySetInnerHTML"?ic(l,d):g==="children"?ni(l,d):To(l,g,d,f)}switch(n){case"input":In(l,h);break;case"textarea":tc(l,h);break;case"select":var p=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!h.multiple;var C=h.value;C!=null?vr(l,!!h.multiple,C,!1):p!==!!h.multiple&&(h.defaultValue!=null?vr(l,!!h.multiple,h.defaultValue,!0):vr(l,!!h.multiple,h.multiple?[]:"",!1))}l[_i]=h}catch(S){he(e,e.return,S)}}break;case 6:if(Qe(t,e),nt(e),i&4){if(e.stateNode===null)throw Error(W(162));l=e.stateNode,h=e.memoizedProps;try{l.nodeValue=h}catch(S){he(e,e.return,S)}}break;case 3:if(Qe(t,e),nt(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{ci(t.containerInfo)}catch(S){he(e,e.return,S)}break;case 4:Qe(t,e),nt(e);break;case 13:Qe(t,e),nt(e),l=e.child,l.flags&8192&&(h=l.memoizedState!==null,l.stateNode.isHidden=h,!h||l.alternate!==null&&l.alternate.memoizedState!==null||(cl=de())),i&4&&Sa(e);break;case 22:if(g=r!==null&&r.memoizedState!==null,e.mode&1?(ke=(f=ke)||g,Qe(t,e),ke=f):Qe(t,e),nt(e),i&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!g&&e.mode&1)for(q=e,g=e.child;g!==null;){for(d=q=g;q!==null;){switch(p=q,C=p.child,p.tag){case 0:case 11:case 14:case 15:ti(4,p,p.return);break;case 1:_r(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(S){he(i,r,S)}}break;case 5:_r(p,p.return);break;case 22:if(p.memoizedState!==null){Ca(d);continue}}C!==null?(C.return=p,q=C):Ca(d)}g=g.sibling}e:for(g=null,d=e;;){if(d.tag===5){if(g===null){g=d;try{l=d.stateNode,f?(h=l.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=sc("display",y))}catch(S){he(e,e.return,S)}}}else if(d.tag===6){if(g===null)try{d.stateNode.nodeValue=f?"":d.memoizedProps}catch(S){he(e,e.return,S)}}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;g===d&&(g=null),d=d.return}g===d&&(g=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Qe(t,e),nt(e),i&4&&Sa(e);break;case 21:break;default:Qe(t,e),nt(e)}}function nt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Tu(r)){var i=r;break e}r=r.return}throw Error(W(160))}switch(i.tag){case 5:var l=i.stateNode;i.flags&32&&(ni(l,""),i.flags&=-33);var h=ma(e);mo(e,h,l);break;case 3:case 4:var y=i.stateNode.containerInfo,n=ma(e);go(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 af(e,t,r){q=e,Mu(e)}function Mu(e,t,r){for(var i=(e.mode&1)!==0;q!==null;){var l=q,h=l.child;if(l.tag===22&&i){var y=l.memoizedState!==null||Wi;if(!y){var n=l.alternate,u=n!==null&&n.memoizedState!==null||ke;n=Wi;var f=ke;if(Wi=y,(ke=u)&&!f)for(q=l;q!==null;)y=q,u=y.child,y.tag===22&&y.memoizedState!==null?wa(l):u!==null?(u.return=y,q=u):wa(l);for(;h!==null;)q=h,Mu(h),h=h.sibling;q=l,Wi=n,ke=f}ya(e)}else l.subtreeFlags&8772&&h!==null?(h.return=l,q=h):ya(e)}}function ya(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||Ns(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!ke)if(r===null)i.componentDidMount();else{var l=t.elementType===t.type?r.memoizedProps:Ye(t.type,r.memoizedProps);i.componentDidUpdate(l,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var h=t.updateQueue;h!==null&&sa(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}sa(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 g=f.memoizedState;if(g!==null){var d=g.dehydrated;d!==null&&ci(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}ke||t.flags&512&&vo(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 Ca(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 wa(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Ns(4,t)}catch(u){he(t,r,u)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var l=t.return;try{i.componentDidMount()}catch(u){he(t,l,u)}}var h=t.return;try{vo(t)}catch(u){he(t,h,u)}break;case 5:var y=t.return;try{vo(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 cf=Math.ceil,bs=St.ReactCurrentDispatcher,ll=St.ReactCurrentOwner,qe=St.ReactCurrentBatchConfig,Z=0,ge=null,fe=null,ye=0,He=0,pr=zt(0),pe=0,yi=null,Jt=0,zs=0,al=0,ri=null,Pe=null,cl=0,Rr=1/0,ut=null,xs=!1,So=null,Ot=null,$i=!1,Rt=null,Ls=0,ii=0,yo=null,rs=-1,is=0;function Re(){return Z&6?de():rs!==-1?rs:rs=de()}function Bt(e){return e.mode&1?Z&2&&ye!==0?ye&-ye:Kd.transition!==null?(is===0&&(is=gc()),is):(e=re,e!==0||(e=window.event,e=e===void 0?16:kc(e.type)),e):1}function rt(e,t,r,i){if(50<ii)throw ii=0,yo=null,Error(W(185));ki(e,r,i),(!(Z&2)||e!==ge)&&(e===ge&&(!(Z&2)&&(zs|=r),pe===4&&xt(e,ye)),Ie(e,i),r===1&&Z===0&&!(t.mode&1)&&(Rr=de()+500,Is&&jt()))}function Ie(e,t){var r=e.callbackNode;Kh(e,t);var i=us(e,e===ge?ye:0);if(i===0)r!==null&&Al(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&Al(r),t===1)e.tag===0?$d(Ea.bind(null,e)):Wc(Ea.bind(null,e)),zd(function(){!(Z&6)&&jt()}),r=null;else{switch(mc(i)){case 1:r=Bo;break;case 4:r=pc;break;case 16:r=cs;break;case 536870912:r=vc;break;default:r=cs}r=ju(r,Ou.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Ou(e,t){if(rs=-1,is=0,Z&6)throw Error(W(327));var r=e.callbackNode;if(Cr()&&e.callbackNode!==r)return null;var i=us(e,e===ge?ye:0);if(i===0)return null;if(i&30||i&e.expiredLanes||t)t=Rs(e,i);else{t=i;var l=Z;Z|=2;var h=Iu();(ge!==e||ye!==t)&&(ut=null,Rr=de()+500,qt(e,t));do try{df();break}catch(n){Bu(e,n)}while(!0);Xo(),bs.current=h,Z=l,fe!==null?t=0:(ge=null,ye=0,t=pe)}if(t!==0){if(t===2&&(l=Vn(e),l!==0&&(i=l,t=Co(e,l))),t===1)throw r=yi,qt(e,0),xt(e,i),Ie(e,de()),r;if(t===6)xt(e,i);else{if(l=e.current.alternate,!(i&30)&&!uf(l)&&(t=Rs(e,i),t===2&&(h=Vn(e),h!==0&&(i=h,t=Co(e,h))),t===1))throw r=yi,qt(e,0),xt(e,i),Ie(e,de()),r;switch(e.finishedWork=l,e.finishedLanes=i,t){case 0:case 1:throw Error(W(345));case 2:Wt(e,Pe,ut);break;case 3:if(xt(e,i),(i&130023424)===i&&(t=cl+500-de(),10<t)){if(us(e,0)!==0)break;if(l=e.suspendedLanes,(l&i)!==i){Re(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=eo(Wt.bind(null,e,Pe,ut),t);break}Wt(e,Pe,ut);break;case 4:if(xt(e,i),(i&4194240)===i)break;for(t=e.eventTimes,l=-1;0<i;){var y=31-tt(i);h=1<<y,y=t[y],y>l&&(l=y),i&=~h}if(i=l,i=de()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*cf(i/1960))-i,10<i){e.timeoutHandle=eo(Wt.bind(null,e,Pe,ut),i);break}Wt(e,Pe,ut);break;case 5:Wt(e,Pe,ut);break;default:throw Error(W(329))}}}return Ie(e,de()),e.callbackNode===r?Ou.bind(null,e):null}function Co(e,t){var r=ri;return e.current.memoizedState.isDehydrated&&(qt(e,t).flags|=256),e=Rs(e,t),e!==2&&(t=Pe,Pe=r,t!==null&&wo(t)),e}function wo(e){Pe===null?Pe=e:Pe.push.apply(Pe,e)}function uf(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 l=r[i],h=l.getSnapshot;l=l.value;try{if(!it(h(),l))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 xt(e,t){for(t&=~al,t&=~zs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-tt(t),i=1<<r;e[r]=-1,t&=~i}}function Ea(e){if(Z&6)throw Error(W(327));Cr();var t=us(e,0);if(!(t&1))return Ie(e,de()),null;var r=Rs(e,t);if(e.tag!==0&&r===2){var i=Vn(e);i!==0&&(t=i,r=Co(e,i))}if(r===1)throw r=yi,qt(e,0),xt(e,t),Ie(e,de()),r;if(r===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Wt(e,Pe,ut),Ie(e,de()),null}function ul(e,t){var r=Z;Z|=1;try{return e(t)}finally{Z=r,Z===0&&(Rr=de()+500,Is&&jt())}}function Zt(e){Rt!==null&&Rt.tag===0&&!(Z&6)&&Cr();var t=Z;Z|=1;var r=qe.transition,i=re;try{if(qe.transition=null,re=1,e)return e()}finally{re=i,qe.transition=r,Z=t,!(Z&6)&&jt()}}function hl(){He=pr.current,ne(pr)}function qt(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Nd(r)),fe!==null)for(r=fe.return;r!==null;){var i=r;switch(Ko(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&ps();break;case 3:xr(),ne(Oe),ne(xe),el();break;case 5:Zo(i);break;case 4:xr();break;case 13:ne(ae);break;case 19:ne(ae);break;case 10:Go(i.type._context);break;case 22:case 23:hl()}r=r.return}if(ge=e,fe=e=It(e.current,null),ye=He=t,pe=0,yi=null,al=zs=Jt=0,Pe=ri=null,Kt!==null){for(t=0;t<Kt.length;t++)if(r=Kt[t],i=r.interleaved,i!==null){r.interleaved=null;var l=i.next,h=r.pending;if(h!==null){var y=h.next;h.next=l,i.next=y}r.pending=i}Kt=null}return e}function Bu(e,t){do{var r=fe;try{if(Xo(),Zi.current=ks,Es){for(var i=ce.memoizedState;i!==null;){var l=i.queue;l!==null&&(l.pending=null),i=i.next}Es=!1}if(Yt=0,ve=_e=ce=null,ei=!1,gi=0,ll.current=null,r===null||r.return===null){pe=1,yi=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,g=n,d=g.tag;if(!(g.mode&1)&&(d===0||d===11||d===15)){var p=g.alternate;p?(g.updateQueue=p.updateQueue,g.memoizedState=p.memoizedState,g.lanes=p.lanes):(g.updateQueue=null,g.memoizedState=null)}var C=ua(y);if(C!==null){C.flags&=-257,ha(C,y,n,h,t),C.mode&1&&ca(h,f,t),t=C,u=f;var w=t.updateQueue;if(w===null){var S=new Set;S.add(u),t.updateQueue=S}else w.add(u);break e}else{if(!(t&1)){ca(h,f,t),dl();break e}u=Error(W(426))}}else if(oe&&n.mode&1){var c=ua(y);if(c!==null){!(c.flags&65536)&&(c.flags|=256),ha(c,y,n,h,t),Vo(Lr(u,n));break e}}h=u=Lr(u,n),pe!==4&&(pe=2),ri===null?ri=[h]:ri.push(h),h=y;do{switch(h.tag){case 3:h.flags|=65536,t&=-t,h.lanes|=t;var o=mu(h,u,t);ia(h,o);break e;case 1:n=u;var s=h.type,a=h.stateNode;if(!(h.flags&128)&&(typeof s.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(Ot===null||!Ot.has(a)))){h.flags|=65536,t&=-t,h.lanes|=t;var _=Su(h,n,t);ia(h,_);break e}}h=h.return}while(h!==null)}Fu(r)}catch(m){t=m,fe===r&&r!==null&&(fe=r=r.return);continue}break}while(!0)}function Iu(){var e=bs.current;return bs.current=ks,e===null?ks:e}function dl(){(pe===0||pe===3||pe===2)&&(pe=4),ge===null||!(Jt&268435455)&&!(zs&268435455)||xt(ge,ye)}function Rs(e,t){var r=Z;Z|=2;var i=Iu();(ge!==e||ye!==t)&&(ut=null,qt(e,t));do try{hf();break}catch(l){Bu(e,l)}while(!0);if(Xo(),Z=r,bs.current=i,fe!==null)throw Error(W(261));return ge=null,ye=0,pe}function hf(){for(;fe!==null;)Hu(fe)}function df(){for(;fe!==null&&!Ih();)Hu(fe)}function Hu(e){var t=zu(e.alternate,e,He);e.memoizedProps=e.pendingProps,t===null?Fu(e):fe=t,ll.current=null}function Fu(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=nf(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=sf(r,t,He),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 Wt(e,t,r){var i=re,l=qe.transition;try{qe.transition=null,re=1,ff(e,t,r,i)}finally{qe.transition=l,re=i}return null}function ff(e,t,r,i){do Cr();while(Rt!==null);if(Z&6)throw Error(W(327));r=e.finishedWork;var l=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(Vh(e,h),e===ge&&(fe=ge=null,ye=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||$i||($i=!0,ju(cs,function(){return Cr(),null})),h=(r.flags&15990)!==0,r.subtreeFlags&15990||h){h=qe.transition,qe.transition=null;var y=re;re=1;var n=Z;Z|=4,ll.current=null,lf(e,r),Pu(r,e),Pd(Jn),hs=!!Yn,Jn=Yn=null,e.current=r,af(r),Hh(),Z=n,re=y,qe.transition=h}else e.current=r;if($i&&($i=!1,Rt=e,Ls=l),h=e.pendingLanes,h===0&&(Ot=null),zh(r.stateNode),Ie(e,de()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)l=t[r],i(l.value,{componentStack:l.stack,digest:l.digest});if(xs)throw xs=!1,e=So,So=null,e;return Ls&1&&e.tag!==0&&Cr(),h=e.pendingLanes,h&1?e===yo?ii++:(ii=0,yo=e):ii=0,jt(),null}function Cr(){if(Rt!==null){var e=mc(Ls),t=qe.transition,r=re;try{if(qe.transition=null,re=16>e?16:e,Rt===null)var i=!1;else{if(e=Rt,Rt=null,Ls=0,Z&6)throw Error(W(331));var l=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 g=q;switch(g.tag){case 0:case 11:case 15:ti(8,g,h)}var d=g.child;if(d!==null)d.return=g,q=d;else for(;q!==null;){g=q;var p=g.sibling,C=g.return;if(Du(g),g===f){q=null;break}if(p!==null){p.return=C,q=p;break}q=C}}}var w=h.alternate;if(w!==null){var S=w.child;if(S!==null){w.child=null;do{var c=S.sibling;S.sibling=null,S=c}while(S!==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:ti(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 a=y.child;if(y.subtreeFlags&2064&&a!==null)a.return=y,q=a;else e:for(y=s;q!==null;){if(n=q,n.flags&2048)try{switch(n.tag){case 0:case 11:case 15:Ns(9,n)}}catch(m){he(n,n.return,m)}if(n===y){q=null;break e}var _=n.sibling;if(_!==null){_.return=n.return,q=_;break e}q=n.return}}if(Z=l,jt(),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(As,e)}catch{}i=!0}return i}finally{re=r,qe.transition=t}}return!1}function ka(e,t,r){t=Lr(r,t),t=mu(e,t,1),e=Mt(e,t,1),t=Re(),e!==null&&(ki(e,1,t),Ie(e,t))}function he(e,t,r){if(e.tag===3)ka(e,e,r);else for(;t!==null;){if(t.tag===3){ka(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ot===null||!Ot.has(i))){e=Lr(r,e),e=Su(t,e,1),t=Mt(t,e,1),e=Re(),t!==null&&(ki(t,1,e),Ie(t,e));break}}t=t.return}}function _f(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=Re(),e.pingedLanes|=e.suspendedLanes&r,ge===e&&(ye&r)===r&&(pe===4||pe===3&&(ye&130023424)===ye&&500>de()-cl?qt(e,0):al|=r),Ie(e,t)}function Nu(e,t){t===0&&(e.mode&1?(t=Oi,Oi<<=1,!(Oi&130023424)&&(Oi=4194304)):t=1);var r=Re();e=gt(e,t),e!==null&&(ki(e,t,r),Ie(e,r))}function pf(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Nu(e,r)}function vf(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,l=e.memoizedState;l!==null&&(r=l.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(W(314))}i!==null&&i.delete(t),Nu(e,r)}var zu;zu=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Oe.current)Me=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Me=!1,rf(e,t,r);Me=!!(e.flags&131072)}else Me=!1,oe&&t.flags&1048576&&$c(t,ms,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;ts(e,t),e=t.pendingProps;var l=Er(t,xe.current);yr(t,r),l=rl(null,t,i,e,l,r);var h=il();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Be(i)?(h=!0,vs(t)):h=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Yo(t),l.updater=Fs,t.stateNode=l,l._reactInternals=t,lo(t,i,e,r),t=uo(null,t,i,!0,h,r)):(t.tag=0,oe&&h&&$o(t),Le(null,t,l,r),t=t.child),t;case 16:i=t.elementType;e:{switch(ts(e,t),e=t.pendingProps,l=i._init,i=l(i._payload),t.type=i,l=t.tag=mf(i),e=Ye(i,e),l){case 0:t=co(null,t,i,e,r);break e;case 1:t=_a(null,t,i,e,r);break e;case 11:t=da(null,t,i,e,r);break e;case 14:t=fa(null,t,i,Ye(i.type,e),r);break e}throw Error(W(306,i,""))}return t;case 0:return i=t.type,l=t.pendingProps,l=t.elementType===i?l:Ye(i,l),co(e,t,i,l,r);case 1:return i=t.type,l=t.pendingProps,l=t.elementType===i?l:Ye(i,l),_a(e,t,i,l,r);case 3:e:{if(Eu(t),e===null)throw Error(W(387));i=t.pendingProps,h=t.memoizedState,l=h.element,Qc(e,t),Cs(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){l=Lr(Error(W(423)),t),t=pa(e,t,i,r,l);break e}else if(i!==l){l=Lr(Error(W(424)),t),t=pa(e,t,i,r,l);break e}else for(Fe=Pt(t.stateNode.containerInfo.firstChild),Ne=t,oe=!0,Ze=null,r=Xc(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(kr(),i===l){t=mt(e,t,r);break e}Le(e,t,i,r)}t=t.child}return t;case 5:return Yc(t),e===null&&so(t),i=t.type,l=t.pendingProps,h=e!==null?e.memoizedProps:null,y=l.children,Zn(i,l)?y=null:h!==null&&Zn(i,h)&&(t.flags|=32),wu(e,t),Le(e,t,y,r),t.child;case 6:return e===null&&so(t),null;case 13:return ku(e,t,r);case 4:return Jo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=br(t,null,i,r):Le(e,t,i,r),t.child;case 11:return i=t.type,l=t.pendingProps,l=t.elementType===i?l:Ye(i,l),da(e,t,i,l,r);case 7:return Le(e,t,t.pendingProps,r),t.child;case 8:return Le(e,t,t.pendingProps.children,r),t.child;case 12:return Le(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,l=t.pendingProps,h=t.memoizedProps,y=l.value,ie(Ss,i._currentValue),i._currentValue=y,h!==null)if(it(h.value,y)){if(h.children===l.children&&!Oe.current){t=mt(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=_t(-1,r&-r),u.tag=2;var f=h.updateQueue;if(f!==null){f=f.shared;var g=f.pending;g===null?u.next=u:(u.next=g.next,g.next=u),f.pending=u}}h.lanes|=r,u=h.alternate,u!==null&&(u.lanes|=r),no(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),no(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}Le(e,t,l.children,r),t=t.child}return t;case 9:return l=t.type,i=t.pendingProps.children,yr(t,r),l=Xe(l),i=i(l),t.flags|=1,Le(e,t,i,r),t.child;case 14:return i=t.type,l=Ye(i,t.pendingProps),l=Ye(i.type,l),fa(e,t,i,l,r);case 15:return yu(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,l=t.pendingProps,l=t.elementType===i?l:Ye(i,l),ts(e,t),t.tag=1,Be(i)?(e=!0,vs(t)):e=!1,yr(t,r),gu(t,i,l),lo(t,i,l,r),uo(null,t,i,!0,e,r);case 19:return bu(e,t,r);case 22:return Cu(e,t,r)}throw Error(W(156,t.tag))};function ju(e,t){return _c(e,t)}function gf(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 Ve(e,t,r,i){return new gf(e,t,r,i)}function fl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mf(e){if(typeof e=="function")return fl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Po)return 11;if(e===Mo)return 14}return 2}function It(e,t){var r=e.alternate;return r===null?(r=Ve(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 ss(e,t,r,i,l,h){var y=2;if(i=e,typeof e=="function")fl(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case nr:return Xt(r.children,l,h,t);case Ao:y=8,l|=8;break;case An:return e=Ve(12,r,t,l|2),e.elementType=An,e.lanes=h,e;case Pn:return e=Ve(13,r,t,l),e.elementType=Pn,e.lanes=h,e;case Mn:return e=Ve(19,r,t,l),e.elementType=Mn,e.lanes=h,e;case Ya:return js(r,l,h,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ga:y=10;break e;case Qa:y=9;break e;case Po:y=11;break e;case Mo:y=14;break e;case Et:y=16,i=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=Ve(y,r,t,l),t.elementType=e,t.type=i,t.lanes=h,t}function Xt(e,t,r,i){return e=Ve(7,e,i,t),e.lanes=r,e}function js(e,t,r,i){return e=Ve(22,e,i,t),e.elementType=Ya,e.lanes=r,e.stateNode={isHidden:!1},e}function bn(e,t,r){return e=Ve(6,e,null,t),e.lanes=r,e}function xn(e,t,r){return t=Ve(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Sf(e,t,r,i,l){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=on(0),this.expirationTimes=on(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=on(0),this.identifierPrefix=i,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function _l(e,t,r,i,l,h,y,n,u){return e=new Sf(e,t,r,n,u),t===1?(t=1,h===!0&&(t|=8)):t=0,h=Ve(3,null,null,t),e.current=h,h.stateNode=e,h.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yo(h),e}function yf(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:sr,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function Uu(e){if(!e)return Ft;e=e._reactInternals;e:{if(tr(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 Uc(e,r,t)}return t}function Wu(e,t,r,i,l,h,y,n,u){return e=_l(r,i,!0,e,l,h,y,n,u),e.context=Uu(null),r=e.current,i=Re(),l=Bt(r),h=_t(i,l),h.callback=t??null,Mt(r,h,l),e.current.lanes=l,ki(e,l,i),Ie(e,i),e}function Us(e,t,r,i){var l=t.current,h=Re(),y=Bt(l);return r=Uu(r),t.context===null?t.context=r:t.pendingContext=r,t=_t(h,y),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=Mt(l,t,y),e!==null&&(rt(e,l,y,h),Ji(e,l,y)),y}function Ds(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 ba(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function pl(e,t){ba(e,t),(e=e.alternate)&&ba(e,t)}function Cf(){return null}var $u=typeof reportError=="function"?reportError:function(e){console.error(e)};function vl(e){this._internalRoot=e}Ws.prototype.render=vl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));Us(e,t,null,null)};Ws.prototype.unmount=vl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zt(function(){Us(null,e,null,null)}),t[vt]=null}};function Ws(e){this._internalRoot=e}Ws.prototype.unstable_scheduleHydration=function(e){if(e){var t=Cc();e={blockedOn:null,target:e,priority:t};for(var r=0;r<bt.length&&t!==0&&t<bt[r].priority;r++);bt.splice(r,0,e),r===0&&Ec(e)}};function gl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function $s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function xa(){}function wf(e,t,r,i,l){if(l){if(typeof i=="function"){var h=i;i=function(){var f=Ds(y);h.call(f)}}var y=Wu(t,i,e,0,null,!1,!1,"",xa);return e._reactRootContainer=y,e[vt]=y.current,di(e.nodeType===8?e.parentNode:e),Zt(),y}for(;l=e.lastChild;)e.removeChild(l);if(typeof i=="function"){var n=i;i=function(){var f=Ds(u);n.call(f)}}var u=_l(e,0,!1,null,null,!1,!1,"",xa);return e._reactRootContainer=u,e[vt]=u.current,di(e.nodeType===8?e.parentNode:e),Zt(function(){Us(t,u,r,i)}),u}function Ks(e,t,r,i,l){var h=r._reactRootContainer;if(h){var y=h;if(typeof l=="function"){var n=l;l=function(){var u=Ds(y);n.call(u)}}Us(t,y,e,l)}else y=wf(r,t,e,l,i);return Ds(y)}Sc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=qr(t.pendingLanes);r!==0&&(Io(t,r|1),Ie(t,de()),!(Z&6)&&(Rr=de()+500,jt()))}break;case 13:Zt(function(){var i=gt(e,1);if(i!==null){var l=Re();rt(i,e,1,l)}}),pl(e,1)}};Ho=function(e){if(e.tag===13){var t=gt(e,134217728);if(t!==null){var r=Re();rt(t,e,134217728,r)}pl(e,134217728)}};yc=function(e){if(e.tag===13){var t=Bt(e),r=gt(e,t);if(r!==null){var i=Re();rt(r,e,t,i)}pl(e,t)}};Cc=function(){return re};wc=function(e,t){var r=re;try{return re=e,t()}finally{re=r}};Wn=function(e,t,r){switch(t){case"input":if(In(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 l=Bs(i);if(!l)throw Error(W(90));Za(i),In(i,l)}}}break;case"textarea":tc(e,r);break;case"select":t=r.value,t!=null&&vr(e,!!r.multiple,t,!1)}};ac=ul;cc=Zt;var Ef={usingClientEntryPoint:!1,Events:[xi,cr,Bs,oc,lc,ul]},$r={findFiberByHostInstance:$t,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},kf={bundleType:$r.bundleType,version:$r.version,rendererPackageName:$r.rendererPackageName,rendererConfig:$r.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:St.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=dc(e),e===null?null:e.stateNode},findFiberByHostInstance:$r.findFiberByHostInstance||Cf,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 Ki=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ki.isDisabled&&Ki.supportsFiber)try{As=Ki.inject(kf),at=Ki}catch{}}je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ef;je.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!gl(t))throw Error(W(200));return yf(e,t,null,r)};je.createRoot=function(e,t){if(!gl(e))throw Error(W(299));var r=!1,i="",l=$u;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=_l(e,1,!1,null,null,r,!1,i,l),e[vt]=t.current,di(e.nodeType===8?e.parentNode:e),new vl(t)};je.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=dc(t),e=e===null?null:e.stateNode,e};je.flushSync=function(e){return Zt(e)};je.hydrate=function(e,t,r){if(!$s(t))throw Error(W(200));return Ks(null,e,t,!0,r)};je.hydrateRoot=function(e,t,r){if(!gl(e))throw Error(W(405));var i=r!=null&&r.hydratedSources||null,l=!1,h="",y=$u;if(r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(h=r.identifierPrefix),r.onRecoverableError!==void 0&&(y=r.onRecoverableError)),t=Wu(t,null,e,1,r??null,l,!1,h,y),e[vt]=t.current,di(e),i)for(e=0;e<i.length;e++)r=i[e],l=r._getVersion,l=l(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,l]:t.mutableSourceEagerHydrationData.push(r,l);return new Ws(t)};je.render=function(e,t,r){if(!$s(t))throw Error(W(200));return Ks(null,e,t,!1,r)};je.unmountComponentAtNode=function(e){if(!$s(e))throw Error(W(40));return e._reactRootContainer?(Zt(function(){Ks(null,null,e,!1,function(){e._reactRootContainer=null,e[vt]=null})}),!0):!1};je.unstable_batchedUpdates=ul;je.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!$s(r))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return Ks(e,t,r,!1,i)};je.version="18.3.1-next-f1338f8080-20240426";function Ku(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ku)}catch(e){console.error(e)}}Ku(),Ka.exports=je;var bf=Ka.exports,La=bf;Dn.createRoot=La.createRoot,Dn.hydrateRoot=La.hydrateRoot;const xf={},Ra=e=>{let t;const r=new Set,i=(g,d)=>{const p=typeof g=="function"?g(t):g;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))}},l=()=>t,u={setState:i,getState:l,getInitialState:()=>f,subscribe:g=>(r.add(g),()=>r.delete(g)),destroy:()=>{(xf?"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,l,u);return u},Lf=e=>e?Ra(e):Ra;var Vu={exports:{}},qu={},Xu={exports:{}},Gu={};/**
|
||
* @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 Dr=be;function Rf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Df=typeof Object.is=="function"?Object.is:Rf,Tf=Dr.useState,Af=Dr.useEffect,Pf=Dr.useLayoutEffect,Mf=Dr.useDebugValue;function Of(e,t){var r=t(),i=Tf({inst:{value:r,getSnapshot:t}}),l=i[0].inst,h=i[1];return Pf(function(){l.value=r,l.getSnapshot=t,Ln(l)&&h({inst:l})},[e,r,t]),Af(function(){return Ln(l)&&h({inst:l}),e(function(){Ln(l)&&h({inst:l})})},[e]),Mf(r),r}function Ln(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Df(e,r)}catch{return!0}}function Bf(e,t){return t()}var If=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Bf:Of;Gu.useSyncExternalStore=Dr.useSyncExternalStore!==void 0?Dr.useSyncExternalStore:If;Xu.exports=Gu;var Hf=Xu.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 Vs=be,Ff=Hf;function Nf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zf=typeof Object.is=="function"?Object.is:Nf,jf=Ff.useSyncExternalStore,Uf=Vs.useRef,Wf=Vs.useEffect,$f=Vs.useMemo,Kf=Vs.useDebugValue;qu.useSyncExternalStoreWithSelector=function(e,t,r,i,l){var h=Uf(null);if(h.current===null){var y={hasValue:!1,value:null};h.current=y}else y=h.current;h=$f(function(){function u(C){if(!f){if(f=!0,g=C,C=i(C),l!==void 0&&y.hasValue){var w=y.value;if(l(w,C))return d=w}return d=C}if(w=d,zf(g,C))return w;var S=i(C);return l!==void 0&&l(w,S)?(g=C,w):(g=C,d=S)}var f=!1,g,d,p=r===void 0?null:r;return[function(){return u(t())},p===null?void 0:function(){return u(p())}]},[t,r,i,l]);var n=jf(e,h[0],h[1]);return Wf(function(){y.hasValue=!0,y.value=n},[n]),Kf(n),n};Vu.exports=qu;var Vf=Vu.exports;const qf=Pa(Vf),Qu={},{useDebugValue:Xf}=Wa,{useSyncExternalStoreWithSelector:Gf}=qf;let Da=!1;const Qf=e=>e;function Yf(e,t=Qf,r){(Qu?"production":void 0)!=="production"&&r&&!Da&&(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"),Da=!0);const i=Gf(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return Xf(i),i}const Jf=e=>{(Qu?"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"?Lf(e):e,r=(i,l)=>Yf(t,i,l);return Object.assign(r,t),r},qs=e=>Jf,ns={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Eo=new Map,Vi=e=>{const t=Eo.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([r,i])=>[r,i.getState()])):{}},Zf=(e,t,r)=>{if(e===void 0)return{type:"untracked",connection:t.connect(r)};const i=Eo.get(r.name);if(i)return{type:"tracked",store:e,...i};const l={connection:t.connect(r),stores:{}};return Eo.set(r.name,l),{type:"tracked",store:e,...l}},e_=(e,t={})=>(r,i,l)=>{const{enabled:h,anonymousActionType:y,store:n,...u}=t;let f;try{f=(h??(ns?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!f)return(ns?"production":void 0)!=="production"&&h&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(r,i,l);const{connection:g,...d}=Zf(n,f,u);let p=!0;l.setState=(S,c,o)=>{const s=r(S,c);if(!p)return s;const a=o===void 0?{type:y||"anonymous"}:typeof o=="string"?{type:o}:o;return n===void 0?(g==null||g.send(a,i()),s):(g==null||g.send({...a,type:`${n}/${a.type}`},{...Vi(u.name),[n]:l.getState()}),s)};const C=(...S)=>{const c=p;p=!1,r(...S),p=c},w=e(l.setState,i,l);if(d.type==="untracked"?g==null||g.init(w):(d.stores[d.store]=l,g==null||g.init(Object.fromEntries(Object.entries(d.stores).map(([S,c])=>[S,S===d.store?w:c.getState()])))),l.dispatchFromDevtools&&typeof l.dispatch=="function"){let S=!1;const c=l.dispatch;l.dispatch=(...o)=>{(ns?"production":void 0)!=="production"&&o[0].type==="__setState"&&!S&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),S=!0),c(...o)}}return g.subscribe(S=>{var c;switch(S.type){case"ACTION":if(typeof S.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Rn(S.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(l.getState())!==JSON.stringify(s)&&C(s);return}l.dispatchFromDevtools&&typeof l.dispatch=="function"&&l.dispatch(o)});case"DISPATCH":switch(S.payload.type){case"RESET":return C(w),n===void 0?g==null?void 0:g.init(l.getState()):g==null?void 0:g.init(Vi(u.name));case"COMMIT":if(n===void 0){g==null||g.init(l.getState());return}return g==null?void 0:g.init(Vi(u.name));case"ROLLBACK":return Rn(S.state,o=>{if(n===void 0){C(o),g==null||g.init(l.getState());return}C(o[n]),g==null||g.init(Vi(u.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Rn(S.state,o=>{if(n===void 0){C(o);return}JSON.stringify(l.getState())!==JSON.stringify(o[n])&&C(o[n])});case"IMPORT_STATE":{const{nextLiftedState:o}=S.payload,s=(c=o.computedStates.slice(-1)[0])==null?void 0:c.state;if(!s)return;C(n===void 0?s:s[n]),g==null||g.send(null,o);return}case"PAUSE_RECORDING":return p=!p}return}}),w},Xs=e_,Rn=(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 t_(e,t){let r;try{r=e()}catch{return}return{getItem:l=>{var h;const y=u=>u===null?null:JSON.parse(u,void 0),n=(h=r.getItem(l))!=null?h:null;return n instanceof Promise?n.then(y):y(n)},setItem:(l,h)=>r.setItem(l,JSON.stringify(h,void 0)),removeItem:l=>r.removeItem(l)}}const Ci=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(i){return Ci(i)(r)},catch(i){return this}}}catch(r){return{then(i){return this},catch(i){return Ci(i)(r)}}}},r_=(e,t)=>(r,i,l)=>{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,l);const g=Ci(h.serialize),d=()=>{const c=h.partialize({...i()});let o;const s=g({state:c,version:h.version}).then(a=>f.setItem(h.name,a)).catch(a=>{o=a});if(o)throw o;return s},p=l.setState;l.setState=(c,o)=>{p(c,o),d()};const C=e((...c)=>{r(...c),d()},i,l);let w;const S=()=>{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 Ci(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 a;return w=h.merge(s,(a=i())!=null?a: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 l.persist={setOptions:c=>{h={...h,...c},c.getStorage&&(f=c.getStorage())},clearStorage:()=>{f==null||f.removeItem(h.name)},getOptions:()=>h,rehydrate:()=>S(),hasHydrated:()=>y,onHydrate:c=>(n.add(c),()=>{n.delete(c)}),onFinishHydration:c=>(u.add(c),()=>{u.delete(c)})},S(),w||C},i_=(e,t)=>(r,i,l)=>{let h={storage:t_(()=>localStorage),partialize:S=>S,version:0,merge:(S,c)=>({...c,...S}),...t},y=!1;const n=new Set,u=new Set;let f=h.storage;if(!f)return e((...S)=>{console.warn(`[zustand persist middleware] Unable to update item '${h.name}', the given storage is currently unavailable.`),r(...S)},i,l);const g=()=>{const S=h.partialize({...i()});return f.setItem(h.name,{state:S,version:h.version})},d=l.setState;l.setState=(S,c)=>{d(S,c),g()};const p=e((...S)=>{r(...S),g()},i,l);l.getInitialState=()=>p;let C;const w=()=>{var S,c;if(!f)return;y=!1,n.forEach(s=>{var a;return s((a=i())!=null?a:p)});const o=((c=h.onRehydrateStorage)==null?void 0:c.call(h,(S=i())!=null?S:p))||void 0;return Ci(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 a;const[_,m]=s;if(C=h.merge(m,(a=i())!=null?a:p),r(C,!0),_)return g()}).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 l.persist={setOptions:S=>{h={...h,...S},S.storage&&(f=S.storage)},clearStorage:()=>{f==null||f.removeItem(h.name)},getOptions:()=>h,rehydrate:()=>w(),hasHydrated:()=>y,onHydrate:S=>(n.add(S),()=>{n.delete(S)}),onFinishHydration:S=>(u.add(S),()=>{u.delete(S)})},h.skipHydration||w(),C||p},s_=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((ns?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),r_(e,t)):i_(e,t),n_=s_,o_={camX:0,camY:0,zoom:1,flying:!1,dragging:!1,collapsed:!1,spacePanning:!1,setCam:()=>{},setZoom:()=>{},setFlying:()=>{},setDragging:()=>{},setCollapsed:()=>{},setSpacePanning:()=>{}},wi=qs()(Xs(n_(e=>({...o_,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"}))),l_={default:"#6fb1ff","kube-system":"#9c88ff","kube-public":"#4dd6e8",production:"#6fb1ff",staging:"#4dd6e8",development:"#4dd6e8"},a_=[{name:"default",status:"Active"},{name:"kube-system",status:"Active"},{name:"kube-public",status:"Active"},{name:"production",status:"Active"},{name:"staging",status:"Active"},{name:"development",status:"Active"}],c_=[{type:"pod",name:"nginx-7d9f8",namespace:"default",status:"Running"},{type:"pod",name:"frontend-5a8b2",namespace:"default",status:"Running"},{type:"pod",name:"backend-9c3d4",namespace:"production",status:"Running"},{type:"pod",name:"api-server-2e7f1",namespace:"production",status:"Running"},{type:"pod",name:"worker-4b6c8",namespace:"production",status:"Pending"},{type:"pod",name:"cache-redis-1",namespace:"staging",status:"Running"},{type:"pod",name:"db-postgres-0",namespace:"staging",status:"Running"},{type:"pod",name:"db-postgres-1",namespace:"staging",status:"Pending"},{type:"pod",name:"monitoring-8a2b3",namespace:"kube-system",status:"Running"},{type:"pod",name:"dns-core-5d7e9",namespace:"kube-system",status:"Running"},{type:"pod",name:"log-aggregator-3c4d5",namespace:"kube-system",status:"Running"},{type:"pod",name:"gateway-7f9a2",namespace:"production",status:"Running"},{type:"pod",name:"frontend-dev-1",namespace:"development",status:"Running"},{type:"pod",name:"backend-dev-1",namespace:"development",status:"Running"},{type:"pod",name:"test-runner-6g8h9",namespace:"default",status:"Completed"}],u_=[{type:"deployment",name:"nginx",namespace:"default",status:"Ready"},{type:"deployment",name:"frontend",namespace:"default",status:"Ready"},{type:"deployment",name:"backend",namespace:"production",status:"Ready"},{type:"deployment",name:"api-server",namespace:"production",status:"Ready"},{type:"deployment",name:"worker",namespace:"production",status:"Pending"},{type:"deployment",name:"redis",namespace:"staging",status:"Ready"},{type:"deployment",name:"postgres",namespace:"staging",status:"Ready"},{type:"deployment",name:"gateway",namespace:"production",status:"Ready"}],h_=[{type:"service",name:"nginx-svc",namespace:"default",clusterIP:"10.96.0.10",ports:"80/TCP"},{type:"service",name:"frontend-svc",namespace:"default",clusterIP:"10.96.0.20",ports:"80/TCP"},{type:"service",name:"backend-svc",namespace:"production",clusterIP:"10.96.0.30",ports:"8080/TCP"},{type:"service",name:"api-server-svc",namespace:"production",clusterIP:"10.96.0.40",ports:"8080/TCP"},{type:"service",name:"redis-svc",namespace:"staging",clusterIP:"10.96.0.50",ports:"6379/TCP"},{type:"service",name:"postgres-svc",namespace:"staging",clusterIP:"10.96.0.60",ports:"5432/TCP"}];[...a_.map(e=>({type:"namespace",name:e.name,status:e.status})),...c_,...u_,...h_];const d_={krates:new Map,selectedKrateId:null,addKrate:()=>{},removeKrate:()=>{},selectKrate:()=>{},updateKrate:()=>{},createKrate:()=>{}},ml=qs()(Xs((e,t)=>({...d_,addKrate:r=>e(i=>({krates:new Map(i.krates).set(r.id,r)})),removeKrate:r=>e(i=>{const l=new Map(i.krates);return l.delete(r),{krates:l}}),selectKrate:r=>e({selectedKrateId:r}),updateKrate:(r,i)=>e(l=>{const h=l.krates.get(r);return h?{krates:new Map(l.krates).set(r,{...h,...i})}:l}),createKrate:(r,i,l,h,y)=>{const{krates:n}=t(),u=h||l&&l_[l]||"#6fb1ff",f=(S,c,o)=>{const a=R=>({x1:R.x-20,y1:R.y-20,x2:R.x+R.width+20,y2:R.y+R.height+20}),_=(R,P)=>R.x1<P.x2&&R.x2>P.x1&&R.y1<P.y2&&R.y2>P.y1,m=(R,P,A)=>{const M={x1:R-20,y1:P-20,x2:R+S+20,y2:P+c+20};for(const I of A.values()){const N=a(I);if(_(M,N))return!0}return!1};let E=100,b=100,v=0;const k=100;for(;v<k;){if(!m(E,b,o))return{x:E,y:b};E+=S/2,E>8e3&&(E=100,b+=c/2),v++}return{x:E,y:b}},{x:g,y:d}=f(800,600,n),p=new Map;(y||(i==="namespace"?[{type:"collection",title:"Status"}]:[{type:"logs",title:"Logs"},{type:"describe",title:"Describe"}])).forEach((S,c)=>{p.set(`${r}-${c}`,{id:`${r}-${c}`,type:S.type,title:S.title,state:{}})});const w={id:`krate-${Date.now()}`,type:i,title:r,x:g,y:d,width:800,height:600,color:u,minimized:!1,windowLayout:{cols:2,rows:2,cells:new Map},windows:p};e(S=>({krates:new Map(S.krates).set(w.id,w)}))}}))),f_={open:!1,query:"",filterType:null,sel:0,navigated:!1,results:[],loading:!1,error:null},et=qs()(Xs(e=>({...f_,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}),setResults:t=>e({results:t}),setLoading:t=>e({loading:t}),setError:t=>e({error:t}),toggle:()=>e(t=>({open:!t.open})),close:()=>e({open:!1,query:"",filterType:null,sel:0,navigated:!1,results:[],error:null})}))),__=({krate:e,collapsed:t})=>{const{selectKrate:r}=ml();return t?$.jsxs("div",{style:{position:"absolute",left:e.x,top:e.y,width:"230px",height:"auto",padding:"12px",background:e.color?`rgba(${Ta(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:[$.jsx("div",{style:{fontWeight:"600",color:e.color||"#6fb1ff"},children:e.title}),$.jsx("div",{style:{fontSize:"12px",color:"#888"},children:e.windows.size>0?'..."':"Empty"})]}):$.jsxs("div",{style:{position:"absolute",left:e.x,top:e.y,width:e.width,height:e.height,background:e.color?`rgba(${Ta(e.color)}, 0.04)`:"rgba(255,255,255,0.04)",border:`1px dashed ${e.color||"#6fb1ff"}4D`,borderRadius:"18px"},onMouseDown:()=>r(e.id),children:[$.jsx(p_,{krate:e,onDragStart:()=>{}}),$.jsx("div",{style:{padding:"30px",display:"grid",gridTemplateColumns:`repeat(${e.windowLayout.cols}, 1fr)`,gap:"16px"},children:Array.from(e.windows.values()).map(i=>$.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))})]})},p_=({krate:e,onDragStart:t})=>$.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:[$.jsx("span",{style:{fontWeight:"600",flex:1},children:e.title}),$.jsxs("span",{style:{fontSize:"12px",color:"#888"},children:[e.windows.size," windows"]}),$.jsx("button",{style:{background:"none",border:"none",color:"#888",cursor:"pointer",padding:"4px"},onClick:r=>{r.stopPropagation(),alert("Minimize todo")},children:"—"}),$.jsx("button",{style:{background:"none",border:"none",color:"#888",cursor:"pointer",padding:"4px"},onClick:r=>{r.stopPropagation(),alert("Delete todo")},children:"×"})]}),Ta=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}`},v_=({...e})=>{const{camX:t,camY:r,zoom:i,collapsed:l}=wi(),{krates:h}=ml(),{setOpen:y,open:n}=et(),u=be.useCallback(g=>{g.stopPropagation(),n||y(!0)},[y,n]),f={position:"absolute",width:"12000px",height:"8000px",transform:`translate(${t}px, ${r}px) scale(${i})`,transformOrigin:"0 0"};return $.jsx("div",{style:f,onMouseDown:u,...e,children:Array.from(h.values()).filter(g=>!g.minimized).map(g=>$.jsx(__,{krate:g,collapsed:l},g.id))})},g_=({...e})=>{wi();const{setOpen:t,open:r}=et(),i=be.useCallback(h=>{h.preventDefault(),h.stopPropagation(),r||t(!0)},[t,r]),l={position:"absolute",top:0,left:0,right:0,bottom:0,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 $.jsx("div",{style:l,onMouseDown:i,...e})},m_=({...e})=>{const{camX:t,camY:r,zoom:i}=wi(),{krates:l}=ml(),h=be.useRef(null),y=180,n=120,u=12e3,f=8e3,g=y/u,d=n/f,p=window.innerWidth/i,C=window.innerHeight/i,w=t*g,S=r*d,c=p*g,o=C*d,s=a=>{var k;const _=(k=h.current)==null?void 0:k.getBoundingClientRect();if(!_)return;const m=a.clientX-_.left,E=a.clientY-_.top,b=m/g-t-p/2,v=E/d-r-C/2;wi.getState().setCam(b,v)};return $.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(l.values()).map(a=>$.jsx("div",{style:{position:"absolute",left:a.x*g,top:a.y*d,width:a.width*g,height:a.height*d,backgroundColor:a.color||"#6fb1ff",opacity:.7}},a.id)),$.jsx("div",{style:{position:"absolute",left:w,top:S,width:c,height:o,border:"1px solid #4dd6e8",borderColor:"rgba(77, 214, 232, 0.4)",boxSizing:"border-box"}})]})},S_=({...e})=>{const{open:t,query:r,filterType:i,sel:l,setSel:h,results:y}=et(),{setQuery:n,close:u,setOpen:f}=et(),g=be.useRef(null),d=be.useRef(null);if(be.useEffect(()=>{t&&g.current&&g.current.focus();const C=w=>{d.current&&!d.current.contains(w.target)&&u()};return t&&document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C)}},[t]),!t)return null;const p=[{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 $.jsx("div",{ref:d,style:{position:"absolute",top:"100px",left:"50%",transform:"translateX(-50%)",width:"600px",zIndex:100},...e,children:$.jsxs("div",{style:{background:"#1a1e26",border:"1px solid rgba(140,165,200,0.18)",borderRadius:"12px",overflow:"hidden"},children:[$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px 16px",borderBottom:"1px solid rgba(140,165,200,0.18)"},children:[$.jsx("span",{style:{color:"#888"},children:"🔍"}),$.jsx("input",{ref:g,type:"text",value:r,placeholder:"Search...",autoFocus:!0,onChange:C=>n(C.target.value),onKeyDown:C=>{C.key==="ArrowDown"?(C.preventDefault(),h(Math.min(l+1,y.length-1))):C.key==="ArrowUp"?(C.preventDefault(),h(Math.max(0,l-1))):C.key==="Enter"?(C.preventDefault(),y[l]&&(f(!1),u())):C.key==="Escape"&&(C.preventDefault(),u())},style:{flex:1,background:"transparent",border:"none",color:"#fff",fontSize:"16px",outline:"none"}}),$.jsx("button",{style:{background:"none",border:"none",color:"#888",cursor:"pointer",padding:"4px"},children:"Esc"})]}),$.jsx("div",{style:{padding:"8px 16px",display:"flex",gap:"8px",flexWrap:"wrap"},children:p.map(C=>$.jsx("button",{style:{padding:"4px 12px",borderRadius:"12px",background:i===C.id?"#4dd6e8":"#2a3040",color:i===C.id?"#000":"#aaa",border:"none",cursor:"pointer",fontSize:"12px"},children:C.label},C.id))}),$.jsxs("div",{style:{padding:"8px 16px",borderTop:"1px solid rgba(140,165,200,0.1)",fontSize:"10px",color:"#6b7280",display:"flex",gap:"16px"},children:[$.jsxs("span",{children:[$.jsx("span",{style:{color:"#9fb0c8"},children:"↑↓"})," pick"]}),$.jsxs("span",{children:[$.jsx("span",{style:{color:"#9fb0c8"},children:"Enter"})," create krate"]}),$.jsxs("span",{children:[$.jsx("span",{style:{color:"#9fb0c8"},children:"Esc"})," close"]})]})]})})},y_={currentUser:{id:"local-user",name:"User"},presence:new Map},C_=qs()(Xs(e=>({...y_,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 l=i.presence.get(t);return l?{presence:new Map(i.presence).set(t,{...l,...r})}:i})}))),w_=({open:e,onClose:t,users:r})=>{if(!e)return null;const i=l=>{t(),console.log(`Spectating user: ${l}`)};return $.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:[$.jsxs("div",{style:{padding:"16px",borderBottom:"1px solid rgba(140,165,200,0.18)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[$.jsx("h2",{style:{margin:0,color:"#fff",fontSize:"16px"},children:"Users"}),$.jsx("button",{onClick:t,style:{background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:"20px"},children:"×"})]}),$.jsx("div",{style:{padding:"16px"},children:r.map(l=>$.jsx("div",{style:{marginBottom:"16px",padding:"12px",background:"rgba(255,255,255,0.02)",borderRadius:"8px"},onClick:h=>h.stopPropagation(),children:$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[$.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",background:l.color,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:"600"},children:l.name.slice(0,2).toUpperCase()}),$.jsxs("div",{style:{flex:1},children:[$.jsx("div",{style:{color:"#fff",fontWeight:"600"},children:l.name}),$.jsx("div",{style:{color:"#888",fontSize:"12px"},children:l.status})]}),$.jsx("button",{onClick:()=>i(l.userId),style:{background:"#4dd6e8",border:"none",borderRadius:"4px",padding:"6px 10px",color:"#000",fontSize:"12px",fontWeight:"600",cursor:"pointer"},children:"Spectate"})]})},l.userId))})]})},E_=()=>{const{currentUser:e,presence:t}=C_(),[r,i]=be.useState(!1),[l,h]=be.useState(!0);be.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 $.jsxs($.Fragment,{children:[$.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:10,height:"56px",display:"flex",alignItems:"center",padding:"13px 18px"},children:[$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flex:1},children:[$.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:[$.jsx("div",{style:{width:"12px",height:"12px",background:"#4dd6e8",clipPath:"polygon(50% 0,100% 50%,50% 100%,0 50%)"}}),$.jsx("span",{style:{color:"#fff",fontSize:"14px",fontWeight:"600"},children:"krates / yard"})]}),$.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:[$.jsx("span",{style:{color:"#fff",fontSize:"14px"},children:"local"}),$.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",background:"#4ad07a",boxShadow:"0 0 8px #4ad07a"}})]}),y.length>0&&$.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:$.jsxs("span",{style:{color:"#4dd6e8",fontSize:"14px"},children:[y.length," active"]})})]}),$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[$.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:[$.jsx("span",{style:{color:"#aaa",fontSize:"12px"},children:"synced"}),$.jsx("div",{style:{width:"6px",height:"6px",borderRadius:"50%",background:"#4dd6e8",opacity:l?1:.5,animation:l?"pulse 1.6s ease-in-out infinite":"none"}})]}),$.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=>$.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&&$.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]})]})]}),$.jsx(w_,{open:r,onClose:()=>i(!1),users:y})]})};var k_={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(self,()=>(()=>{var r={4567:function(y,n,u){var f=this&&this.__decorate||function(a,_,m,E){var b,v=arguments.length,k=v<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,m):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(a,_,m,E);else for(var R=a.length-1;R>=0;R--)(b=a[R])&&(k=(v<3?b(k):v>3?b(_,m,k):b(_,m))||k);return v>3&&k&&Object.defineProperty(_,m,k),k},g=this&&this.__param||function(a,_){return function(m,E){_(m,E,a)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const d=u(9042),p=u(6114),C=u(9924),w=u(844),S=u(5596),c=u(4725),o=u(3656);let s=n.AccessibilityManager=class extends w.Disposable{constructor(a,_){super(),this._terminal=a,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 m=0;m<this._terminal.rows;m++)this._rowElements[m]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[m]);if(this._topBoundaryFocusListener=m=>this._handleBoundaryFocus(m,0),this._bottomBoundaryFocusListener=m=>this._handleBoundaryFocus(m,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(m=>this._handleResize(m.rows))),this.register(this._terminal.onRender(m=>this._refreshRows(m.start,m.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(m=>this._handleChar(m))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
||
`))),this.register(this._terminal.onA11yTab(m=>this._handleTab(m))),this.register(this._terminal.onKey(m=>this._handleKey(m.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new S.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(a){for(let _=0;_<a;_++)this._handleChar(" ")}_handleChar(a){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==a&&(this._charsToAnnounce+=a):this._charsToAnnounce+=a,a===`
|
||
`&&(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(a){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(a)||this._charsToConsume.push(a)}_refreshRows(a,_){this._liveRegionDebouncer.refresh(a,_,this._terminal.rows)}_renderRows(a,_){const m=this._terminal.buffer,E=m.lines.length.toString();for(let b=a;b<=_;b++){const v=m.translateBufferLineToString(m.ydisp+b,!0),k=(m.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(a,_){const m=a.target,E=this._rowElements[_===0?1:this._rowElements.length-2];if(m.getAttribute("aria-posinset")===(_===0?"1":`${this._terminal.buffer.lines.length}`)||a.relatedTarget!==E)return;let b,v;if(_===0?(b=m,v=this._rowElements.pop(),this._rowContainer.removeChild(v)):(b=this._rowElements.shift(),v=m,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(),a.preventDefault(),a.stopImmediatePropagation()}_handleResize(a){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>a;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const a=document.createElement("div");return a.setAttribute("role","listitem"),a.tabIndex=-1,this._refreshRowDimensions(a),a}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let a=0;a<this._terminal.rows;a++)this._refreshRowDimensions(this._rowElements[a])}}_refreshRowDimensions(a){a.style.height=`${this._renderService.dimensions.css.cell.height}px`}};n.AccessibilityManager=s=f([g(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 g(p,C,w,S){p=f(p=u(p),w.decPrivateModes.bracketedPasteMode&&S.rawOptions.ignoreBracketedPasteMode!==!0),w.triggerDataEvent(p,!0),C.value=""}function d(p,C,w){const S=w.getBoundingClientRect(),c=p.clientX-S.left-10,o=p.clientY-S.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,S){p.stopPropagation(),p.clipboardData&&g(p.clipboardData.getData("text/plain"),C,w,S)},n.paste=g,n.moveTextAreaUnderMouseCursor=d,n.rightClickHandler=function(p,C,w,S,c){d(p,C,w),c&&S.rightClickSelect(p),C.value=S.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(g,d,p){this._css.set(g,d,p)}getCss(g,d){return this._css.get(g,d)}setColor(g,d,p){this._color.set(g,d,p)}getColor(g,d){return this._color.get(g,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,g,d){u.addEventListener(f,g,d);let p=!1;return{dispose:()=>{p||(p=!0,u.removeEventListener(f,g,d))}}}},6465:function(y,n,u){var f=this&&this.__decorate||function(c,o,s,a){var _,m=arguments.length,E=m<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,s):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,o,s,a);else for(var b=c.length-1;b>=0;b--)(_=c[b])&&(E=(m<3?_(E):m>3?_(o,s,E):_(o,s))||E);return m>3&&E&&Object.defineProperty(o,s,E),E},g=this&&this.__param||function(c,o){return function(s,a){o(s,a,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 S=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 a=0;a<s.length;a++){const _=s[a];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,a;this._activeProviderReplies&&o||((s=this._activeProviderReplies)===null||s===void 0||s.forEach(m=>{m==null||m.forEach(E=>{E.link.dispose&&E.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=c.y);let _=!1;for(const[m,E]of this._linkProviders.entries())o?!((a=this._activeProviderReplies)===null||a===void 0)&&a.get(m)&&(_=this._checkLinkProviderResult(m,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(m,R),_=this._checkLinkProviderResult(m,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 a=0;a<o.size;a++){const _=o.get(a);if(_)for(let m=0;m<_.length;m++){const E=_[m],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(m--,1);break}s.add(k)}}}}_checkLinkProviderResult(c,o,s){var a;if(!this._activeProviderReplies)return s;const _=this._activeProviderReplies.get(c);let m=!1;for(let E=0;E<c;E++)this._activeProviderReplies.has(E)&&!this._activeProviderReplies.get(E)||(m=!0);if(!m&&_){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=(a=this._activeProviderReplies.get(E))===null||a===void 0?void 0:a.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,a;return(a=(s=this._currentLink)===null||s===void 0?void 0:s.state)===null||a===void 0?void 0:a.decorations.pointerCursor},set:s=>{var a,_;!((a=this._currentLink)===null||a===void 0)&&a.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,a;return(a=(s=this._currentLink)===null||s===void 0?void 0:s.state)===null||a===void 0?void 0:a.decorations.underline},set:s=>{var a,_,m;!((a=this._currentLink)===null||a===void 0)&&a.state&&((m=(_=this._currentLink)===null||_===void 0?void 0:_.state)===null||m===void 0?void 0:m.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 a=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>=a&&this._currentLink.link.range.end.y<=_&&(this._clearCurrentLink(a,_),this._lastMouseEvent&&this._element)){const m=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);m&&this._askForLink(m,!1)}})))}_linkHover(c,o,s){var a;!((a=this._currentLink)===null||a===void 0)&&a.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,a=this._bufferService.buffer.ydisp,_=this._createLinkUnderlineEvent(s.start.x-1,s.start.y-a-1,s.end.x,s.end.y-a-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(_)}_linkLeave(c,o,s){var a;!((a=this._currentLink)===null||a===void 0)&&a.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,a=c.range.end.y*this._bufferService.cols+c.range.end.x,_=o.y*this._bufferService.cols+o.x;return s<=_&&_<=a}_positionFromMouseEvent(c,o,s){const a=s.getCoords(c,o,this._bufferService.cols,this._bufferService.rows);if(a)return{x:a[0],y:a[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(c,o,s,a,_){return{x1:c,y1:o,x2:s,y2:a,cols:this._bufferService.cols,fg:_}}};n.Linkifier2=S=f([g(0,w.IBufferService)],S)},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(S,c,o,s){var a,_=arguments.length,m=_<3?c:s===null?s=Object.getOwnPropertyDescriptor(c,o):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(S,c,o,s);else for(var E=S.length-1;E>=0;E--)(a=S[E])&&(m=(_<3?a(m):_>3?a(c,o,m):a(c,o))||m);return _>3&&m&&Object.defineProperty(c,o,m),m},g=this&&this.__param||function(S,c){return function(o,s){c(o,s,S)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const d=u(511),p=u(2585);let C=n.OscLinkProvider=class{constructor(S,c,o){this._bufferService=S,this._optionsService=c,this._oscLinkService=o}provideLinks(S,c){var o;const s=this._bufferService.buffer.lines.get(S-1);if(!s)return void c(void 0);const a=[],_=this._optionsService.rawOptions.linkHandler,m=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,m),m.hasExtendedAttrs()&&m.extended.urlId){if(v===-1){v=R,b=m.extended.urlId;continue}k=m.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:S},end:{x:R+(k||R!==E-1?0:1),y:S}};let M=!1;if(!(_!=null&&_.allowNonHttpProtocols))try{const I=new URL(P);["http:","https:"].includes(I.protocol)||(M=!0)}catch{M=!0}M||a.push({text:P,range:A,activate:(I,N)=>_?_.activate(I,N,A):w(0,N),hover:(I,N)=>{var U;return(U=_==null?void 0:_.hover)===null||U===void 0?void 0:U.call(_,I,N,A)},leave:(I,N)=>{var U;return(U=_==null?void 0:_.leave)===null||U===void 0?void 0:U.call(_,I,N,A)}})}k=!1,m.hasExtendedAttrs()&&m.extended.urlId?(v=R,b=m.extended.urlId):(v=-1,b=-1)}}c(a)}};function w(S,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([g(0,p.IBufferService),g(1,p.IOptionsService),g(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,g){this._rowCount=g,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 g 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=g},3236:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const f=u(3614),g=u(3656),d=u(6465),p=u(9042),C=u(3730),w=u(1680),S=u(3107),c=u(5744),o=u(2950),s=u(1296),a=u(428),_=u(4269),m=u(5114),E=u(8934),b=u(3230),v=u(9312),k=u(4725),R=u(6731),P=u(8055),A=u(8969),M=u(8460),I=u(844),N=u(6114),U=u(8437),j=u(2584),x=u(7399),D=u(5941),T=u(9074),O=u(2585),F=u(5435),K=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=N,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new I.MutableDisposable),this._onCursorMove=this.register(new M.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new M.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new M.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new M.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new M.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new M.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new M.EventEmitter),this._onBlur=this.register(new M.EventEmitter),this._onA11yCharEmitter=this.register(new M.EventEmitter),this._onA11yTabEmitter=this.register(new M.EventEmitter),this._onWillOpen=this.register(new M.EventEmitter),this._setup(),this.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(O.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((B,z)=>this.refresh(B,z))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(B=>this._reportWindowsOptions(B))),this.register(this._inputHandler.onColor(B=>this._handleColorEvent(B))),this.register((0,M.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,M.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(B=>this._afterResize(B.cols,B.rows))),this.register((0,I.toDisposable)(()=>{var B,z;this._customKeyEventHandler=void 0,(z=(B=this.element)===null||B===void 0?void 0:B.parentNode)===null||z===void 0||z.removeChild(this.element)}))}_handleColorEvent(L){if(this._themeService)for(const B of L){let z,H="";switch(B.index){case 256:z="foreground",H="10";break;case 257:z="background",H="11";break;case 258:z="cursor",H="12";break;default:z="ansi",H="4;"+B.index}switch(B.type){case 0:const Q=P.color.toColorRGB(z==="ansi"?this._themeService.colors.ansi[B.index]:this._themeService.colors[z]);this.coreService.triggerDataEvent(`${j.C0.ESC}]${H};${(0,D.toRgbString)(Q)}${j.C1_ESCAPED.ST}`);break;case 1:if(z==="ansi")this._themeService.modifyColors(V=>V.ansi[B.index]=P.rgba.toColor(...B.color));else{const V=z;this._themeService.modifyColors(te=>te[V]=P.rgba.toColor(...B.color))}break;case 2:this._themeService.restoreColor(B.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(L){L?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(K.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,B=this.buffer.lines.get(L);if(!B)return;const z=Math.min(this.buffer.x,this.cols-1),H=this._renderService.dimensions.css.cell.height,Q=B.getWidth(z),V=this._renderService.dimensions.css.cell.width*Q,te=this.buffer.y*this._renderService.dimensions.css.cell.height,me=z*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,g.addDisposableDomListener)(this.element,"copy",B=>{this.hasSelection()&&(0,f.copyHandler)(B,this._selectionService)}));const L=B=>(0,f.handlePasteEvent)(B,this.textarea,this.coreService,this.optionsService);this.register((0,g.addDisposableDomListener)(this.textarea,"paste",L)),this.register((0,g.addDisposableDomListener)(this.element,"paste",L)),N.isFirefox?this.register((0,g.addDisposableDomListener)(this.element,"mousedown",B=>{B.button===2&&(0,f.rightClickHandler)(B,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,g.addDisposableDomListener)(this.element,"contextmenu",B=>{(0,f.rightClickHandler)(B,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),N.isLinux&&this.register((0,g.addDisposableDomListener)(this.element,"auxclick",B=>{B.button===1&&(0,f.moveTextAreaUnderMouseCursor)(B,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,g.addDisposableDomListener)(this.textarea,"keyup",L=>this._keyUp(L),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"keydown",L=>this._keyDown(L),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"keypress",L=>this._keyPress(L),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionupdate",L=>this._compositionHelper.compositionupdate(L))),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,g.addDisposableDomListener)(this.textarea,"input",L=>this._inputEvent(L),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(L){var B;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 z=G.createDocumentFragment();this._viewportElement=G.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),z.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),z.appendChild(this.screenElement),this.textarea=G.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),N.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(m.CoreBrowserService,this.textarea,(B=this._document.defaultView)!==null&&B!==void 0?B:window),this._instantiationService.setService(k.ICoreBrowserService,this._coreBrowserService),this.register((0,g.addDisposableDomListener)(this.textarea,"focus",H=>this._handleTextAreaFocus(H))),this.register((0,g.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(a.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(z);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,g.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(S.BufferDecorationRenderer,this.screenElement)),this.register((0,g.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(K.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,B=this.element;function z(V){const te=L._mouseService.getMouseReportCoords(V,L.screenElement);if(!te)return!1;let me,Ae;switch(V.overrideType||V.type){case"mousemove":Ae=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":Ae=0,me=V.button<3?V.button:3;break;case"mousedown":Ae=1,me=V.button<3?V.button:3;break;case"wheel":if(L.viewport.getLinesScrolled(V)===0)return!1;Ae=V.deltaY<0?0:1,me=4;break;default:return!1}return!(Ae===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:Ae,ctrl:V.ctrlKey,alt:V.altKey,shift:V.shiftKey})}const H={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Q={mouseup:V=>(z(V),V.buttons||(this._document.removeEventListener("mouseup",H.mouseup),H.mousedrag&&this._document.removeEventListener("mousemove",H.mousedrag)),this.cancel(V)),wheel:V=>(z(V),this.cancel(V,!0)),mousedrag:V=>{V.buttons&&z(V)},mousemove:V=>{V.buttons||z(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||(B.addEventListener("mousemove",Q.mousemove),H.mousemove=Q.mousemove):(B.removeEventListener("mousemove",H.mousemove),H.mousemove=null),16&V?H.wheel||(B.addEventListener("wheel",Q.wheel,{passive:!1}),H.wheel=Q.wheel):(B.removeEventListener("wheel",H.wheel),H.wheel=null),2&V?H.mouseup||(B.addEventListener("mouseup",Q.mouseup),H.mouseup=Q.mouseup):(this._document.removeEventListener("mouseup",H.mouseup),B.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,g.addDisposableDomListener)(B,"mousedown",V=>{if(V.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(V))return z(V),H.mouseup&&this._document.addEventListener("mouseup",H.mouseup),H.mousedrag&&this._document.addEventListener("mousemove",H.mousedrag),this.cancel(V)})),this.register((0,g.addDisposableDomListener)(B,"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 Ae="";for(let rr=0;rr<Math.abs(te);rr++)Ae+=me;return this.coreService.triggerDataEvent(Ae,!0),this.cancel(V,!0)}return this.viewport.handleWheel(V)?this.cancel(V):void 0}},{passive:!1})),this.register((0,g.addDisposableDomListener)(B,"touchstart",V=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(V),this.cancel(V)},{passive:!0})),this.register((0,g.addDisposableDomListener)(B,"touchmove",V=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(V)?void 0:this.cancel(V)},{passive:!1}))}refresh(L,B){var z;(z=this._renderService)===null||z===void 0||z.refreshRows(L,B)}updateCursorStyle(L){var B;!((B=this._selectionService)===null||B===void 0)&&B.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,B,z=0){var H;z===1?(super.scrollLines(L,B,z),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 B=this._characterJoinerService.register(L);return this.refresh(0,this.rows-1),B}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,B,z){this._selectionService.setSelection(L,B,z)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var L;(L=this._selectionService)===null||L===void 0||L.clearSelection()}selectAll(){var L;(L=this._selectionService)===null||L===void 0||L.selectAll()}selectLines(L,B){var z;(z=this._selectionService)===null||z===void 0||z.selectLines(L,B)}_keyDown(L){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(L)===!1)return!1;const B=this.browser.isMac&&this.options.macOptionIsMeta&&L.altKey;if(!B&&!this._compositionHelper.keydown(L))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;B||L.key!=="Dead"&&L.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const z=(0,x.evaluateKeyboardEvent)(L,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(L),z.type===3||z.type===2){const H=this.rows-1;return this.scrollLines(z.type===2?-H:H),this.cancel(L,!0)}return z.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,L)||(z.cancel&&this.cancel(L,!0),!z.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):(z.key!==j.C0.ETX&&z.key!==j.C0.CR||(this.textarea.value=""),this._onKey.fire({key:z.key,domEvent:L}),this._showCursor(),this.coreService.triggerDataEvent(z.key,!0),!this.optionsService.rawOptions.screenReaderMode||L.altKey||L.ctrlKey?this.cancel(L,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(L,B){const z=L.isMac&&!this.options.macOptionIsMeta&&B.altKey&&!B.ctrlKey&&!B.metaKey||L.isWindows&&B.altKey&&B.ctrlKey&&!B.metaKey||L.isWindows&&B.getModifierState("AltGraph");return B.type==="keypress"?z:z&&(!B.keyCode||B.keyCode>47)}_keyUp(L){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(L)===!1||(function(B){return B.keyCode===16||B.keyCode===17||B.keyCode===18}(L)||this.focus(),this.updateCursorStyle(L),this._keyPressHandled=!1)}_keyPress(L){let B;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(L)===!1)return!1;if(this.cancel(L),L.charCode)B=L.charCode;else if(L.which===null||L.which===void 0)B=L.keyCode;else{if(L.which===0||L.charCode===0)return!1;B=L.which}return!(!B||(L.altKey||L.ctrlKey||L.metaKey)&&!this._isThirdLevelShift(this.browser,L)||(B=String.fromCharCode(B),this._onKey.fire({key:B,domEvent:L}),this._showCursor(),this.coreService.triggerDataEvent(B,!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 B=L.data;return this.coreService.triggerDataEvent(B,!0),this.cancel(L),!0}return!1}resize(L,B){L!==this.cols||B!==this.rows?super.resize(L,B):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(L,B){var z,H;(z=this._charSizeService)===null||z===void 0||z.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 B=1;B<this.rows;B++)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,B;this.options.rows=this.rows,this.options.cols=this.cols;const z=this._customKeyEventHandler;this._setup(),super.reset(),(L=this._selectionService)===null||L===void 0||L.reset(),this._decorationService.reset(),(B=this.viewport)===null||B===void 0||B.reset(),this._customKeyEventHandler=z,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 B=this._renderService.dimensions.css.canvas.width.toFixed(0),z=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${j.C0.ESC}[4;${z};${B}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,B){if(this.options.cancelEvents||B)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,g){this._rowCount=g,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,a,_){var m,E=arguments.length,b=E<3?s:_===null?_=Object.getOwnPropertyDescriptor(s,a):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(o,s,a,_);else for(var v=o.length-1;v>=0;v--)(m=o[v])&&(b=(E<3?m(b):E>3?m(s,a,b):m(s,a))||b);return E>3&&b&&Object.defineProperty(s,a,b),b},g=this&&this.__param||function(o,s){return function(a,_){s(a,_,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const d=u(3656),p=u(4725),C=u(8460),w=u(844),S=u(2585);let c=n.Viewport=class extends w.Disposable{constructor(o,s,a,_,m,E,b,v){super(),this._viewportElement=o,this._scrollArea=s,this._bufferService=a,this._optionsService=_,this._charSizeService=m,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 a=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(s<0&&this._viewportElement.scrollTop!==0||s>0&&a<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 a;let _,m="";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=(a=v.get(k+1))===null||a===void 0?void 0:a.isWrapped;if(m+=R.translateToString(!P),!P||k===v.length-1){const A=document.createElement("div");A.textContent=m,E.push(A),m.length>0&&(_=A),m=""}}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 a=this._optionsService.rawOptions.fastScrollModifier;return a==="alt"&&s.altKey||a==="ctrl"&&s.ctrlKey||a==="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([g(2,S.IBufferService),g(3,S.IOptionsService),g(4,p.ICharSizeService),g(5,p.IRenderService),g(6,p.ICoreBrowserService),g(7,p.IThemeService)],c)},3107:function(y,n,u){var f=this&&this.__decorate||function(c,o,s,a){var _,m=arguments.length,E=m<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,s):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,o,s,a);else for(var b=c.length-1;b>=0;b--)(_=c[b])&&(E=(m<3?_(E):m>3?_(o,s,E):_(o,s))||E);return m>3&&E&&Object.defineProperty(o,s,E),E},g=this&&this.__param||function(c,o){return function(s,a){o(s,a,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 S=n.BufferDecorationRenderer=class extends C.Disposable{constructor(c,o,s,a){super(),this._screenElement=c,this._bufferService=o,this._decorationService=s,this._renderService=a,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register((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 a=document.createElement("div");a.classList.add("xterm-decoration"),a.classList.toggle("xterm-decoration-top-layer",((o=c==null?void 0:c.options)===null||o===void 0?void 0:o.layer)==="top"),a.style.width=`${Math.round((c.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,a.style.height=(c.options.height||1)*this._renderService.dimensions.css.cell.height+"px",a.style.top=(c.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",a.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const _=(s=c.options.x)!==null&&s!==void 0?s:0;return _&&_>this._bufferService.cols&&(a.style.display="none"),this._refreshXPosition(c,a),a}_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 a=(s=c.options.x)!==null&&s!==void 0?s:0;(c.options.anchor||"left")==="right"?o.style.right=a?a*this._renderService.dimensions.css.cell.width+"px":"":o.style.left=a?a*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=S=f([g(1,w.IBufferService),g(2,w.IDecorationService),g(3,p.IRenderService)],S)},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,g){return f>=u.startBufferLine-this._linePadding[g||"full"]&&f<=u.endBufferLine+this._linePadding[g||"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(_,m,E,b){var v,k=arguments.length,R=k<3?m:b===null?b=Object.getOwnPropertyDescriptor(m,E):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,m,E,b);else for(var P=_.length-1;P>=0;P--)(v=_[P])&&(R=(k<3?v(R):k>3?v(m,E,R):v(m,E))||R);return k>3&&R&&Object.defineProperty(m,E,R),R},g=this&&this.__param||function(_,m){return function(E,b){m(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),S=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 a=n.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(_,m,E,b,v,k,R){var P;super(),this._viewportElement=_,this._screenElement=m,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 M;(M=this._canvas)===null||M===void 0||M.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),m=Math.ceil(this._canvas.width/3);o.full=this._canvas.width,o.left=_,o.center=m,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,m=Math.round(Math.max(Math.min(_,12),6)*this._coreBrowseService.dpr);c.left=m,c.center=m,c.right=m}_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 m of this._decorationService.decorations)this._colorZoneStore.addDecoration(m);this._ctx.lineWidth=1;const _=this._colorZoneStore.zones;for(const m of _)m.position!=="full"&&this._renderColorZone(m);for(const m of _)m.position==="full"&&this._renderColorZone(m);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(_,m){this._shouldUpdateDimensions=_||this._shouldUpdateDimensions,this._shouldUpdateAnchor=m||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowseService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};n.OverviewRulerRenderer=a=f([g(2,S.IBufferService),g(3,S.IDecorationService),g(4,C.IRenderService),g(5,S.IOptionsService),g(6,C.ICoreBrowserService)],a)},2950:function(y,n,u){var f=this&&this.__decorate||function(S,c,o,s){var a,_=arguments.length,m=_<3?c:s===null?s=Object.getOwnPropertyDescriptor(c,o):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(S,c,o,s);else for(var E=S.length-1;E>=0;E--)(a=S[E])&&(m=(_<3?a(m):_>3?a(c,o,m):a(c,o))||m);return _>3&&m&&Object.defineProperty(c,o,m),m},g=this&&this.__param||function(S,c){return function(o,s){c(o,s,S)}};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(S,c,o,s,a,_){this._textarea=S,this._compositionView=c,this._bufferService=o,this._optionsService=s,this._coreService=a,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(S){this._compositionView.textContent=S.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(S){if(this._isComposing||this._isSendingComposition){if(S.keyCode===229||S.keyCode===16||S.keyCode===17||S.keyCode===18)return!1;this._finalizeComposition(!1)}return S.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(S){if(this._compositionView.classList.remove("active"),this._isComposing=!1,S){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 S=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const c=this._textarea.value,o=c.replace(S,"");this._dataAlreadySent=o,c.length>S.length?this._coreService.triggerDataEvent(o,!0):c.length<S.length?this._coreService.triggerDataEvent(`${C.C0.DEL}`,!0):c.length===S.length&&c!==S&&this._coreService.triggerDataEvent(c,!0)}},0)}updateCompositionElements(S){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,a=c*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=a+"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=a+"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"}S||setTimeout(()=>this.updateCompositionElements(!0),0)}}};n.CompositionHelper=w=f([g(2,p.IBufferService),g(3,p.IOptionsService),g(4,p.ICoreService),g(5,d.IRenderService)],w)},9806:(y,n)=>{function u(f,g,d){const p=d.getBoundingClientRect(),C=f.getComputedStyle(d),w=parseInt(C.getPropertyValue("padding-left")),S=parseInt(C.getPropertyValue("padding-top"));return[g.clientX-p.left-w,g.clientY-p.top-S]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=u,n.getCoords=function(f,g,d,p,C,w,S,c,o){if(!w)return;const s=u(f,g,d);return s?(s[0]=Math.ceil((s[0]+(o?S/2:0))/S),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 g(c,o,s,a){const _=c-d(c,s),m=o-d(o,s),E=Math.abs(_-m)-function(b,v,k){let R=0;const P=b-d(b,k),A=v-d(v,k);for(let M=0;M<Math.abs(P-A);M++){const I=p(b,v)==="A"?-1:1,N=k.buffer.lines.get(P+I*M);N!=null&&N.isWrapped&&R++}return R}(c,o,s);return S(E,w(p(c,o),a))}function d(c,o){let s=0,a=o.buffer.lines.get(c),_=a==null?void 0:a.isWrapped;for(;_&&c>=0&&c<o.rows;)s++,a=o.buffer.lines.get(--c),_=a==null?void 0:a.isWrapped;return s}function p(c,o){return c>o?"A":"B"}function C(c,o,s,a,_,m){let E=c,b=o,v="";for(;E!==s||b!==a;)E+=_?1:-1,_&&E>m.cols-1?(v+=m.buffer.translateBufferLineToString(b,!1,c,E),E=0,c=0,b++):!_&&E<0&&(v+=m.buffer.translateBufferLineToString(b,!1,0,c+1),E=m.cols-1,c=E,b--);return v+m.buffer.translateBufferLineToString(b,!1,c,E)}function w(c,o){const s=o?"O":"[";return f.C0.ESC+s+c}function S(c,o){c=Math.floor(c);let s="";for(let a=0;a<c;a++)s+=o;return s}n.moveToCellSequence=function(c,o,s,a){const _=s.buffer.x,m=s.buffer.y;if(!s.buffer.hasScrollback)return function(v,k,R,P,A,M){return g(k,P,A,M).length===0?"":S(C(v,k,v,k-d(k,A),!1,A).length,w("D",M))}(_,m,0,o,s,a)+g(m,o,s,a)+function(v,k,R,P,A,M){let I;I=g(k,P,A,M).length>0?P-d(P,A):k;const N=P,U=function(j,x,D,T,O,F){let K;return K=g(D,T,O,F).length>0?T-d(T,O):x,j<D&&K<=T||j>=D&&K<T?"C":"D"}(v,k,R,P,A,M);return S(C(v,I,R,N,U==="C",A).length,w(U,M))}(_,m,c,o,s,a);let E;if(m===o)return E=_>c?"D":"C",S(Math.abs(_-c),w(E,a));E=m>o?"D":"C";const b=Math.abs(m-o);return S(function(v,k){return k.cols-v}(m>o?c:_,s)+(b-1)*s.cols+1+((m>o?_:c)-1),w(E,a))}},1296:function(y,n,u){var f=this&&this.__decorate||function(A,M,I,N){var U,j=arguments.length,x=j<3?M:N===null?N=Object.getOwnPropertyDescriptor(M,I):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(A,M,I,N);else for(var D=A.length-1;D>=0;D--)(U=A[D])&&(x=(j<3?U(x):j>3?U(M,I,x):U(M,I))||x);return j>3&&x&&Object.defineProperty(M,I,x),x},g=this&&this.__param||function(A,M){return function(I,N){M(I,N,A)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const d=u(3787),p=u(2550),C=u(2223),w=u(6171),S=u(4725),c=u(8055),o=u(8460),s=u(844),a=u(2585),_="xterm-dom-renderer-owner-",m="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,M,I,N,U,j,x,D,T,O){super(),this._element=A,this._screenElement=M,this._viewportElement=I,this._linkifier2=N,this._charSizeService=j,this._optionsService=x,this._bufferService=D,this._coreBrowserService=T,this._themeService=O,this._terminalClass=R++,this._rowElements=[],this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=document.createElement("div"),this._rowContainer.classList.add(m),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 M=`${this._terminalSelector} .${m} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=M,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 M=`${this._terminalSelector} .${m} { color: ${A.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;M+=`${this._terminalSelector} .${m} .xterm-dim { color: ${c.color.multiplyOpacity(A.foreground,.5).css};}`,M+=`${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;}`,M+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",M+="@keyframes blink_block_"+this._terminalClass+` { 0% { background-color: ${A.cursor.css}; color: ${A.cursorAccent.css}; } 50% { background-color: inherit; color: ${A.cursor.css}; }}`,M+=`${this._terminalSelector} .${m}.${v} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${m}.${v} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-block { background-color: ${A.cursor.css}; color: ${A.cursorAccent.css};}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${A.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${A.cursor.css} inset;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${A.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,M+=`${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,N]of A.ansi.entries())M+=`${this._terminalSelector} .${E}${I} { color: ${N.css}; }${this._terminalSelector} .${E}${I}.xterm-dim { color: ${c.color.multiplyOpacity(N,.5).css}; }${this._terminalSelector} .${b}${I} { background-color: ${N.css}; }`;M+=`${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=M}_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,M){for(let I=this._rowElements.length;I<=M;I++){const N=document.createElement("div");this._rowContainer.appendChild(N),this._rowElements.push(N)}for(;this._rowElements.length>M;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(A,M){this._refreshRowElements(A,M),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,M,I){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(A,M,I),this.renderRows(0,this._bufferService.rows-1),!A||!M)return;const N=A[1]-this._bufferService.buffer.ydisp,U=M[1]-this._bufferService.buffer.ydisp,j=Math.max(N,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]>M[0];D.appendChild(this._createSelectionElement(j,T?M[0]:A[0],T?A[0]:M[0],x-j+1))}else{const T=N===j?A[0]:0,O=j===U?M[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(j,T,O));const F=x-j-1;if(D.appendChild(this._createSelectionElement(j+1,0,this._bufferService.cols,F)),j!==x){const K=U===x?M[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(x,0,K))}}this._selectionContainer.appendChild(D)}_createSelectionElement(A,M,I,N=1){const U=document.createElement("div");return U.style.height=N*this.dimensions.css.cell.height+"px",U.style.top=A*this.dimensions.css.cell.height+"px",U.style.left=M*this.dimensions.css.cell.width+"px",U.style.width=this.dimensions.css.cell.width*(I-M)+"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,M){const I=this._bufferService.buffer,N=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<=M;T++){const O=T+I.ydisp,F=this._rowElements[T],K=I.lines.get(O);if(!F||!K)break;F.replaceChildren(...this._rowFactory.createRow(K,O,O===N,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,M,I,N,U,j){I<0&&(A=0),N<0&&(M=0);const x=this._bufferService.rows-1;I=Math.max(Math.min(I,x),0),N=Math.max(Math.min(N,x),0),U=Math.min(U,this._bufferService.cols);const D=this._bufferService.buffer,T=D.ybase+D.y,O=Math.min(D.x,U-1),F=this._optionsService.rawOptions.cursorBlink,K=this._optionsService.rawOptions.cursorStyle,G=this._optionsService.rawOptions.cursorInactiveStyle;for(let X=I;X<=N;++X){const ee=X+D.ydisp,L=this._rowElements[X],B=D.lines.get(ee);if(!L||!B)break;L.replaceChildren(...this._rowFactory.createRow(B,ee,ee===T,K,G,O,F,this.dimensions.css.cell.width,this._widthCache,j?X===I?A:0:-1,j?(X===N?M:U)-1:-1))}}};n.DomRenderer=P=f([g(4,a.IInstantiationService),g(5,S.ICharSizeService),g(6,a.IOptionsService),g(7,a.IBufferService),g(8,S.ICoreBrowserService),g(9,S.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 M=E.length-1;M>=0;M--)(R=E[M])&&(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},g=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),S=u(8055),c=u(4725),o=u(4269),s=u(6171),a=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,M,I,N,U){const j=[],x=this._characterJoinerService.getJoinedCharacters(b),D=this._themeService.colors;let T,O=E.getNoBgTrimmedLength();v&&O<P+1&&(O=P+1);let F=0,K="",G=0,X=0,ee=0,L=!1,B=0,z=!1,H=0;const Q=[],V=N!==-1&&U!==-1;for(let te=0;te<O;te++){E.loadCell(te,this._workCell);let me=this._workCell.getWidth();if(me===0)continue;let Ae=!1,rr=te,Y=this._workCell;if(x.length>0&&te===x[0][0]){Ae=!0;const le=x.shift();Y=new o.JoinedCellData(this._workCell,E.translateToString(!0,le[0],le[1]),le[1]-le[0]),rr=le[1]-1,me=Y.getWidth()}const Mr=this._isCellInSelection(te,b),Gs=v&&te===P,Qs=V&&te>=N&&te<=U;let Ys=!1;this._decorationService.forEachDecorationAtCell(te,b,void 0,le=>{Ys=!0});let Ri=Y.getChars()||p.WHITESPACE_CELL_CHAR;if(Ri===" "&&(Y.isUnderline()||Y.isOverline())&&(Ri=" "),H=me*M-I.get(Ri,Y.isBold(),Y.isItalic()),T){if(F&&(Mr&&z||!Mr&&!z&&Y.bg===G)&&(Mr&&z&&D.selectionForeground||Y.fg===X)&&Y.extended.ext===ee&&Qs===L&&H===B&&!Gs&&!Ae&&!Ys){K+=Ri,F++;continue}F&&(T.textContent=K),T=this._document.createElement("span"),F=0,K=""}else T=this._document.createElement("span");if(G=Y.bg,X=Y.fg,ee=Y.extended.ext,L=Qs,B=H,z=Mr,Ae&&P>=te&&P<=rr&&(P=te),!this._coreService.isCursorHidden&&Gs){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"),K=Y.isInvisible()?p.WHITESPACE_CELL_CHAR:Y.getChars()||p.WHITESPACE_CELL_CHAR,Y.isUnderline()&&(Q.push(`xterm-underline-${Y.extended.underlineStyle}`),K===" "&&(K=" "),!Y.isUnderlineColorDefault()))if(Y.isUnderlineColorRGB())T.style.textDecorationColor=`rgb(${a.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"),K===" "&&(K=" ")),Y.isStrikethrough()&&Q.push("xterm-strikethrough"),Qs&&(T.style.textDecoration="underline");let We=Y.getFgColor(),Or=Y.getFgColorMode(),st=Y.getBgColor(),Br=Y.getBgColorMode();const Js=!!Y.isInverse();if(Js){const le=We;We=st,st=le;const Ju=Or;Or=Br,Br=Ju}let yt,Zs,Ct,Ir=!1;switch(this._decorationService.forEachDecorationAtCell(te,b,void 0,le=>{le.options.layer!=="top"&&Ir||(le.backgroundColorRGB&&(Br=50331648,st=le.backgroundColorRGB.rgba>>8&16777215,yt=le.backgroundColorRGB),le.foregroundColorRGB&&(Or=50331648,We=le.foregroundColorRGB.rgba>>8&16777215,Zs=le.foregroundColorRGB),Ir=le.options.layer==="top")}),!Ir&&Mr&&(yt=this._coreBrowserService.isFocused?D.selectionBackgroundOpaque:D.selectionInactiveBackgroundOpaque,st=yt.rgba>>8&16777215,Br=50331648,Ir=!0,D.selectionForeground&&(Or=50331648,We=D.selectionForeground.rgba>>8&16777215,Zs=D.selectionForeground)),Ir&&Q.push("xterm-decoration-top"),Br){case 16777216:case 33554432:Ct=D.ansi[st],Q.push(`xterm-bg-${st}`);break;case 50331648:Ct=S.rgba.toColor(st>>16,st>>8&255,255&st),this._addStyle(T,`background-color:#${m((st>>>0).toString(16),"0",6)}`);break;default:Js?(Ct=D.foreground,Q.push(`xterm-bg-${d.INVERTED_DEFAULT_COLOR}`)):Ct=D.background}switch(yt||Y.isDim()&&(yt=S.color.multiplyOpacity(Ct,.5)),Or){case 16777216:case 33554432:Y.isBold()&&We<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(We+=8),this._applyMinimumContrast(T,Ct,D.ansi[We],Y,yt,void 0)||Q.push(`xterm-fg-${We}`);break;case 50331648:const le=S.rgba.toColor(We>>16&255,We>>8&255,255&We);this._applyMinimumContrast(T,Ct,le,Y,yt,Zs)||this._addStyle(T,`color:#${m(We.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(T,Ct,D.foreground,Y,yt,void 0)||Js&&Q.push(`xterm-fg-${d.INVERTED_DEFAULT_COLOR}`)}Q.length&&(T.className=Q.join(" "),Q.length=0),Gs||Ae||Ys?T.textContent=K:F++,H!==this.defaultSpacing&&(T.style.letterSpacing=`${H}px`),j.push(T),te=rr}return T&&F&&(T.textContent=K),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 M;if(R||P||(M=A.getColor(b.rgba,v.rgba)),M===void 0){const I=this._optionsService.rawOptions.minimumContrastRatio/(k.isDim()?2:1);M=S.color.ensureContrastRatio(R||b,P||v,I),A.setColor((R||b).rgba,(P||v).rgba,M??null)}return!!M&&(this._addStyle(E,`color:${M.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 m(E,b,v){for(;E.length<v;)E=b+E;return E}n.DomRendererRowFactory=_=f([g(1,c.ICharacterJoinerService),g(2,w.IOptionsService),g(3,c.ICoreBrowserService),g(4,w.ICoreService),g(5,w.IDecorationService),g(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"),g=u.createElement("span");g.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,g,d,p],this._container.appendChild(f),this._container.appendChild(g),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,g,d){u===this._font&&f===this._fontSize&&g===this._weight&&d===this._weightBold||(this._font=u,this._fontSize=f,this._weight=g,this._weightBold=d,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${g}`,this._measureElements[1].style.fontWeight=`${d}`,this._measureElements[2].style.fontWeight=`${g}`,this._measureElements[3].style.fontWeight=`${d}`,this.clear())}get(u,f,g){let d=0;if(!f&&!g&&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"),g&&(p+="I");let C=this._holey.get(p);if(C===void 0){let w=0;f&&(w|=1),g&&(w|=2),C=this._measure(u,w),this._holey.set(p,C)}return C}_measure(u,f){const g=this._measureElements[f];return g.textContent=u.repeat(32),g.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(g){return 9472<=g&&g<=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,a){var _,m=arguments.length,E=m<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,s):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,o,s,a);else for(var b=c.length-1;b>=0;b--)(_=c[b])&&(E=(m<3?_(E):m>3?_(o,s,E):_(o,s))||E);return m>3&&E&&Object.defineProperty(o,s,E),E},g=this&&this.__param||function(c,o){return function(s,a){o(s,a,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 S(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([g(2,d.IOptionsService)],w);class S{constructor(o,s,a){this._document=o,this._parentElement=s,this._optionsService=a,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,a,_){var m,E=arguments.length,b=E<3?s:_===null?_=Object.getOwnPropertyDescriptor(s,a):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(o,s,a,_);else for(var v=o.length-1;v>=0;v--)(m=o[v])&&(b=(E<3?m(b):E>3?m(s,a,b):m(s,a))||b);return E>3&&b&&Object.defineProperty(s,a,b),b},g=this&&this.__param||function(o,s){return function(a,_){s(a,_,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 S extends d.AttributeData{constructor(s,a,_){super(),this.content=0,this.combinedData="",this.fg=s.fg,this.bg=s.bg,this.combinedData=a,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=S;let c=n.CharacterJoinerService=class Yu{constructor(s){this._bufferService=s,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new C.CellData}register(s){const a={id:this._nextCharacterJoinerId++,handler:s};return this._characterJoiners.push(a),a.id}deregister(s){for(let a=0;a<this._characterJoiners.length;a++)if(this._characterJoiners[a].id===s)return this._characterJoiners.splice(a,1),!0;return!1}getJoinedCharacters(s){if(this._characterJoiners.length===0)return[];const a=this._bufferService.buffer.lines.get(s);if(!a||a.length===0)return[];const _=[],m=a.translateToString(!0);let E=0,b=0,v=0,k=a.getFg(0),R=a.getBg(0);for(let P=0;P<a.getTrimmedLength();P++)if(a.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(m,v,b,a,E);for(let M=0;M<A.length;M++)_.push(A[M])}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(m,v,b,a,E);for(let A=0;A<P.length;A++)_.push(P[A])}return _}_getJoinedRanges(s,a,_,m,E){const b=s.substring(a,_);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++)Yu._mergeRanges(v,R[P])}catch(R){console.error(R)}return this._stringRangesToCellRanges(v,m,E),v}_stringRangesToCellRanges(s,a,_){let m=0,E=!1,b=0,v=s[m];if(v){for(let k=_;k<this._bufferService.cols;k++){const R=a.getWidth(k),P=a.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[++m],!v)break;v[0]<=b?(v[0]=k,E=!0):E=!1}b+=P}}v&&(v[1]=this._bufferService.cols)}}static _mergeRanges(s,a){let _=!1;for(let m=0;m<s.length;m++){const E=s[m];if(_){if(a[1]<=E[0])return s[m-1][1]=a[1],s;if(a[1]<=E[1])return s[m-1][1]=Math.max(a[1],E[1]),s.splice(m,1),s;s.splice(m,1),m--}else{if(a[1]<=E[0])return s.splice(m,0,a),s;if(a[1]<=E[1])return E[0]=Math.min(a[0],E[0]),s;a[0]<E[1]&&(E[0]=Math.min(a[0],E[0]),_=!0)}}return _?s[s.length-1][1]=a[1]:s.push(a),s}};n.CharacterJoinerService=c=f([g(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,S,c,o){var s,a=arguments.length,_=a<3?S:o===null?o=Object.getOwnPropertyDescriptor(S,c):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(w,S,c,o);else for(var m=w.length-1;m>=0;m--)(s=w[m])&&(_=(a<3?s(_):a>3?s(S,c,_):s(S,c))||_);return a>3&&_&&Object.defineProperty(S,c,_),_},g=this&&this.__param||function(w,S){return function(c,o){S(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,S){this._renderService=w,this._charSizeService=S}getCoords(w,S,c,o,s){return(0,p.getCoords)(window,w,S,c,o,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,s)}getMouseReportCoords(w,S){const c=(0,p.getCoordsRelativeToElement)(window,w,S);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([g(0,d.IRenderService),g(1,d.ICharSizeService)],C)},3230:function(y,n,u){var f=this&&this.__decorate||function(_,m,E,b){var v,k=arguments.length,R=k<3?m:b===null?b=Object.getOwnPropertyDescriptor(m,E):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,m,E,b);else for(var P=_.length-1;P>=0;P--)(v=_[P])&&(R=(k<3?v(R):k>3?v(m,E,R):v(m,E))||R);return k>3&&R&&Object.defineProperty(m,E,R),R},g=this&&this.__param||function(_,m){return function(E,b){m(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),S=u(8460),c=u(844),o=u(7226),s=u(2585);let a=n.RenderService=class extends c.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(_,m,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 S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new p.RenderDebouncer(R.window,(A,M)=>this._renderRows(A,M)),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(M=>this._handleIntersectionChange(M[M.length-1]),{threshold:0});A.observe(m),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(_,m,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(_,m,this._rowCount))}_renderRows(_,m){this._renderer.value&&(_=Math.min(_,this._rowCount-1),m=Math.min(m,this._rowCount-1),this._renderer.value.renderRows(_,m),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:m}),this._onRender.fire({start:_,end:m}),this._isNextRenderRedrawOnly=!0)}resize(_,m){this._rowCount=m,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(m=>this.refreshRows(m.start,m.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 _,m;this._renderer.value&&((m=(_=this._renderer.value).clearTextureAtlas)===null||m===void 0||m.call(_),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(_,m){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value.handleResize(_,m)):this._renderer.value.handleResize(_,m),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(_,m,E){var b;this._selectionState.start=_,this._selectionState.end=m,this._selectionState.columnSelectMode=E,(b=this._renderer.value)===null||b===void 0||b.handleSelectionChanged(_,m,E)}handleCursorMove(){var _;(_=this._renderer.value)===null||_===void 0||_.handleCursorMove()}clear(){var _;(_=this._renderer.value)===null||_===void 0||_.clear()}};n.RenderService=a=f([g(2,s.IOptionsService),g(3,w.ICharSizeService),g(4,s.IDecorationService),g(5,s.IBufferService),g(6,w.ICoreBrowserService),g(7,w.IThemeService)],a)},9312:function(y,n,u){var f=this&&this.__decorate||function(v,k,R,P){var A,M=arguments.length,I=M<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 N=v.length-1;N>=0;N--)(A=v[N])&&(I=(M<3?A(I):M>3?A(k,R,I):A(k,R))||I);return M>3&&I&&Object.defineProperty(k,R,I),I},g=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),S=u(8460),c=u(844),o=u(6114),s=u(4841),a=u(511),_=u(2585),m=" ",E=new RegExp(m,"g");let b=n.SelectionService=class extends c.Disposable{constructor(v,k,R,P,A,M,I,N,U){super(),this._element=v,this._screenElement=k,this._linkifier=R,this._bufferService=P,this._coreService=A,this._mouseService=M,this._optionsService=I,this._renderService=N,this._coreBrowserService=U,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new a.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new S.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new S.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new S.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new S.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],M=v[0]<k[0]?k[0]:v[0];for(let I=v[1];I<=k[1];I++){const N=R.translateBufferLineToString(I,!0,A,M);P.push(N)}}else{const A=v[1]===k[1]?k[0]:void 0;P.push(R.translateBufferLineToString(v[1],!0,v[0],A));for(let M=v[1]+1;M<=k[1]-1;M++){const I=R.lines.get(M),N=R.translateBufferLineToString(M,!0);I!=null&&I.isWrapped?P[P.length-1]+=N:P.push(N)}if(v[1]!==k[1]){const M=R.lines.get(k[1]),I=R.translateBufferLineToString(k[1],!0,0,k[0]);M&&M.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 M=this._getMouseBufferCoords(v);return!!M&&(this._selectWordAt(M,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,M=A.lines.get(v[1]);if(!M)return;const I=A.translateBufferLineToString(v[1],!1);let N=this._convertViewportColToCharacterIndex(M,v[0]),U=N;const j=v[0]-N;let x=0,D=0,T=0,O=0;if(I.charAt(N)===" "){for(;N>0&&I.charAt(N-1)===" ";)N--;for(;U<I.length&&I.charAt(U+1)===" ";)U++}else{let G=v[0],X=v[0];M.getWidth(G)===0&&(x++,G--),M.getWidth(X)===2&&(D++,X++);const ee=M.getString(X).length;for(ee>1&&(O+=ee-1,U+=ee-1);G>0&&N>0&&!this._isCharWordSeparator(M.loadCell(G-1,this._workCell));){M.loadCell(G-1,this._workCell);const L=this._workCell.getChars().length;this._workCell.getWidth()===0?(x++,G--):L>1&&(T+=L-1,N-=L-1),N--,G--}for(;X<M.length&&U+1<I.length&&!this._isCharWordSeparator(M.loadCell(X+1,this._workCell));){M.loadCell(X+1,this._workCell);const L=this._workCell.getChars().length;this._workCell.getWidth()===2?(D++,X++):L>1&&(O+=L-1,U+=L-1),U++,X++}}U++;let F=N+j-x+T,K=Math.min(this._bufferService.cols,U-N+x+D-T-O);if(k||I.slice(N,U).trim()!==""){if(R&&F===0&&M.getCodePoint(0)!==32){const G=A.lines.get(v[1]-1);if(G&&M.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,K+=ee}}}if(P&&F+K===this._bufferService.cols&&M.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&&(K+=X.length)}}return{start:F,length:K}}}_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([g(3,_.IBufferService),g(4,_.ICoreService),g(5,w.IMouseService),g(6,_.IOptionsService),g(7,w.IRenderService),g(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,M=A<3?v:R===null?R=Object.getOwnPropertyDescriptor(v,k):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,v,k,R);else for(var I=b.length-1;I>=0;I--)(P=b[I])&&(M=(A<3?P(M):A>3?P(v,k,M):P(v,k))||M);return A>3&&M&&Object.defineProperty(v,k,M),M},g=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),S=u(2585),c=p.css.toColor("#ffffff"),o=p.css.toColor("#000000"),s=p.css.toColor("#ffffff"),a=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 m=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:a,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,a),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=m=f([g(0,S.IOptionsService)],m)},6349:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;const f=u(8460),g=u(844);class d extends g.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 S=0;S<Math.min(C,this.length);S++)w[S]=this._array[this._getCyclicIndex(S)];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,...S){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+S.length)]=this._array[this._getCyclicIndex(c)];for(let c=0;c<S.length;c++)this._array[this._getCyclicIndex(C+c)]=S[c];if(S.length&&this.onInsertEmitter.fire({index:C,amount:S.length}),this._length+S.length>this._maxLength){const c=this._length+S.length-this._maxLength;this._startIndex+=c,this._length=this._maxLength,this.onTrimEmitter.fire(c)}else this._length+=S.length}trimStart(C){C>this._length&&(C=this._length),this._startIndex+=C,this._length-=C,this.onTrimEmitter.fire(C)}shiftElements(C,w,S){if(!(w<=0)){if(C<0||C>=this._length)throw new Error("start argument out of range");if(C+S<0)throw new Error("Cannot shift elements in list beyond index 0");if(S>0){for(let o=w-1;o>=0;o--)this.set(C+o+S,this.get(C+o));const c=C+w+S-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+S,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,g=5){if(typeof f!="object")return f;const d=Array.isArray(f)?[]:{};for(const p in f)d[p]=g<=1?f[p]:f[p]&&u(f[p],g-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 g=0,d=0,p=0,C=0;var w,S,c,o,s;function a(m){const E=m.toString(16);return E.length<2?"0"+E:E}function _(m,E){return m<E?(E+.05)/(m+.05):(m+.05)/(E+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},function(m){m.toCss=function(E,b,v,k){return k!==void 0?`#${a(E)}${a(b)}${a(v)}${a(k)}`:`#${a(E)}${a(b)}${a(v)}`},m.toRgba=function(E,b,v,k=255){return(E<<24|b<<16|v<<8|k)>>>0}}(w||(n.channels=w={})),function(m){function E(b,v){return C=Math.round(255*v),[g,d,p]=s.toChannels(b.rgba),{css:w.toCss(g,d,p,C),rgba:w.toRgba(g,d,p,C)}}m.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,M=b.rgba>>16&255,I=b.rgba>>8&255;return g=A+Math.round((k-A)*C),d=M+Math.round((R-M)*C),p=I+Math.round((P-I)*C),{css:w.toCss(g,d,p),rgba:w.toRgba(g,d,p)}},m.isOpaque=function(b){return(255&b.rgba)==255},m.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)},m.opaque=function(b){const v=(255|b.rgba)>>>0;return[g,d,p]=s.toChannels(v),{css:w.toCss(g,d,p),rgba:v}},m.opacity=E,m.multiplyOpacity=function(b,v){return C=255&b.rgba,E(b,C*v/255)},m.toColorRGB=function(b){return[b.rgba>>24&255,b.rgba>>16&255,b.rgba>>8&255]}}(S||(n.color=S={})),function(m){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))}m.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return g=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(g,d,p);case 5:return g=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(g,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 g=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(g,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),[g,d,p,C]=E.getImageData(0,0,1,1).data,C!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:w.toRgba(g,d,p,C),css:v}}}(c||(n.css=c={})),function(m){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))}m.relativeLuminance=function(b){return E(b>>16&255,b>>8&255,255&b)},m.relativeLuminance2=E}(o||(n.rgb=o={})),function(m){function E(v,k,R){const P=v>>24&255,A=v>>16&255,M=v>>8&255;let I=k>>24&255,N=k>>16&255,U=k>>8&255,j=_(o.relativeLuminance2(I,N,U),o.relativeLuminance2(P,A,M));for(;j<R&&(I>0||N>0||U>0);)I-=Math.max(0,Math.ceil(.1*I)),N-=Math.max(0,Math.ceil(.1*N)),U-=Math.max(0,Math.ceil(.1*U)),j=_(o.relativeLuminance2(I,N,U),o.relativeLuminance2(P,A,M));return(I<<24|N<<16|U<<8|255)>>>0}function b(v,k,R){const P=v>>24&255,A=v>>16&255,M=v>>8&255;let I=k>>24&255,N=k>>16&255,U=k>>8&255,j=_(o.relativeLuminance2(I,N,U),o.relativeLuminance2(P,A,M));for(;j<R&&(I<255||N<255||U<255);)I=Math.min(255,I+Math.ceil(.1*(255-I))),N=Math.min(255,N+Math.ceil(.1*(255-N))),U=Math.min(255,U+Math.ceil(.1*(255-U))),j=_(o.relativeLuminance2(I,N,U),o.relativeLuminance2(P,A,M));return(I<<24|N<<16|U<<8|255)>>>0}m.ensureContrastRatio=function(v,k,R){const P=o.relativeLuminance(v>>8),A=o.relativeLuminance(k>>8);if(_(P,A)<R){if(A<P){const N=E(v,k,R),U=_(P,o.relativeLuminance(N>>8));if(U<R){const j=b(v,k,R);return U>_(P,o.relativeLuminance(j>>8))?N:j}return N}const M=b(v,k,R),I=_(P,o.relativeLuminance(M>>8));if(I<R){const N=E(v,k,R);return I>_(P,o.relativeLuminance(N>>8))?M:N}return M}},m.reduceLuminance=E,m.increaseLuminance=b,m.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]},m.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=a,n.contrastRatio=_},8969:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const f=u(844),g=u(2585),d=u(4348),p=u(7866),C=u(744),w=u(7302),S=u(6975),c=u(8460),o=u(1753),s=u(1480),a=u(7994),_=u(9282),m=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(g.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(C.BufferService)),this._instantiationService.setService(g.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(g.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(S.CoreService)),this._instantiationService.setService(g.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(o.CoreMouseService)),this._instantiationService.setService(g.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(s.UnicodeService)),this._instantiationService.setService(g.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(a.CharsetService),this._instantiationService.setService(g.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(b.OscLinkService),this._instantiationService.setService(g.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new m.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,M)=>this._inputHandler.parse(A,M))),this.register((0,c.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(P,A){this._writeBuffer.write(P,A)}writeSync(P,A){this._logService.logLevel<=g.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,M){this._bufferService.scrollLines(P,A,M)}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 g=[];for(let d=0;d<this._listeners.length;d++)g.push(this._listeners[d]);for(let d=0;d<g.length;d++)g[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(g=>f.fire(g))}},5435:function(y,n,u){var f=this&&this.__decorate||function(j,x,D,T){var O,F=arguments.length,K=F<3?x:T===null?T=Object.getOwnPropertyDescriptor(x,D):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")K=Reflect.decorate(j,x,D,T);else for(var G=j.length-1;G>=0;G--)(O=j[G])&&(K=(F<3?O(K):F>3?O(x,D,K):O(x,D))||K);return F>3&&K&&Object.defineProperty(x,D,K),K},g=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),S=u(482),c=u(8437),o=u(8460),s=u(643),a=u(511),_=u(3734),m=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 M=0;class I extends w.Disposable{getAttrData(){return this._curAttrData}constructor(x,D,T,O,F,K,G,X,ee=new C.EscapeSequenceParser){super(),this._bufferService=x,this._charsetService=D,this._coreService=T,this._logService=O,this._optionsService=F,this._oscLinkService=K,this._coreMouseService=G,this._unicodeService=X,this._parser=ee,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new S.StringToUtf32,this._utf8Decoder=new S.Utf8ToUtf32,this._workCell=new a.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 N(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(L=>this._activeBuffer=L.activeBuffer)),this._parser.setCsiHandlerFallback((L,B)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(L),params:B.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,B,z)=>{this._logService.debug("Unknown OSC code: ",{identifier:L,action:B,data:z})}),this._parser.setDcsHandlerFallback((L,B,z)=>{B==="HOOK"&&(z=z.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(L),action:B,payload:z})}),this._parser.setPrintHandler((L,B,z)=>this.print(L,B,z)),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,B)=>this.requestStatusString(L,B)))}_preserveStack(x,D,T,O){this._parseStack.paused=!0,this._parseStack.cursorStartX=x,this._parseStack.cursorStartY=D,this._parseStack.decodedLength=T,this._parseStack.position=O}_logSlowResolvingAsync(x){this._logService.logLevel<=m.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,O=this._activeBuffer.x,F=this._activeBuffer.y,K=0;const G=this._parseStack.paused;if(G){if(T=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,D))return this._logSlowResolvingAsync(T),T;O=this._parseStack.cursorStartX,F=this._parseStack.cursorStartY,this._parseStack.paused=!1,x.length>R&&(K=this._parseStack.position+R)}if(this._logService.logLevel<=m.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=K;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(O,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(O,F,X,0),this._logSlowResolvingAsync(T),T}this._activeBuffer.x===O&&this._activeBuffer.y===F||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowTracker.start,this._dirtyRowTracker.end)}print(x,D,T){let O,F;const K=this._charsetService.charset,G=this._optionsService.rawOptions.screenReaderMode,X=this._bufferService.cols,ee=this._coreService.decPrivateModes.wraparound,L=this._coreService.modes.insertMode,B=this._curAttrData;let z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&T-D>0&&z.getWidth(this._activeBuffer.x-1)===2&&z.setCellFromCodePoint(this._activeBuffer.x-1,0,1,B.fg,B.bg,B.extended);for(let H=D;H<T;++H){if(O=x[H],F=this._unicodeService.wcwidth(O),O<127&&K){const Q=K[String.fromCharCode(O)];Q&&(O=Q.charCodeAt(0))}if(G&&this._onA11yChar.fire((0,S.stringFromCodePoint)(O)),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;)z.setCellFromCodePoint(this._activeBuffer.x++,0,1,B.fg,B.bg,B.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),z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=X-1,F===2)continue}if(L&&(z.insertCells(this._activeBuffer.x,F,this._activeBuffer.getNullCell(B),B),z.getWidth(X-1)===2&&z.setCellFromCodePoint(X-1,s.NULL_CELL_CODE,s.NULL_CELL_WIDTH,B.fg,B.bg,B.extended)),z.setCellFromCodePoint(this._activeBuffer.x++,O,F,B.fg,B.bg,B.extended),F>0)for(;--F;)z.setCellFromCodePoint(this._activeBuffer.x++,0,0,B.fg,B.bg,B.extended)}else z.getWidth(this._activeBuffer.x-1)?z.addCodepointToCell(this._activeBuffer.x-1,O):z.addCodepointToCell(this._activeBuffer.x-2,O)}T-D>0&&(z.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&&z.getWidth(this._activeBuffer.x)===0&&!z.hasContent(this._activeBuffer.x)&&z.setCellFromCodePoint(this._activeBuffer.x,0,1,B.fg,B.bg,B.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,O=!1,F=!1){const K=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);K.replaceCells(D,T,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),F),O&&(K.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 O=this._activeBuffer.lines.length-this._bufferService.rows;O>0&&(this._activeBuffer.lines.trimStart(O),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-O,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-O,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,O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,F=this._bufferService.rows-1+this._activeBuffer.ybase-O+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 O;for(O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,O=this._bufferService.rows-1+this._activeBuffer.ybase-O;D--;)this._activeBuffer.lines.splice(T,1),this._activeBuffer.lines.splice(O,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 O=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);O.deleteCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),O.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 O=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);O.insertCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),O.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 O=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);O.insertCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),O.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 O=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);O.deleteCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),O.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 O=0;O<D;++O)T[O]=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:O,activeEncoding:F}=this._coreMouseService,K=this._coreService,{buffers:G,cols:X}=this._bufferService,{active:ee,alt:L}=G,B=this._optionsService.rawOptions,z=te=>te?1:2,H=x.params[0];return Q=H,V=D?H===2?4:H===4?z(K.modes.insertMode):H===12?3:H===20?z(B.convertEol):0:H===1?z(T.applicationCursorKeys):H===3?B.windowOptions.setWinLines?X===80?2:X===132?1:0:0:H===6?z(T.origin):H===7?z(T.wraparound):H===8?3:H===9?z(O==="X10"):H===12?z(B.cursorBlink):H===25?z(!K.isCursorHidden):H===45?z(T.reverseWraparound):H===66?z(T.applicationKeypad):H===67?4:H===1e3?z(O==="VT200"):H===1002?z(O==="DRAG"):H===1003?z(O==="ANY"):H===1004?z(T.sendFocus):H===1005?4:H===1006?z(F==="SGR"):H===1015?4:H===1016?z(F==="SGR_PIXELS"):H===1048?1:H===47||H===1047||H===1049?z(ee===L):H===2004?z(T.bracketedPasteMode):0,K.triggerDataEvent(`${d.C0.ESC}[${D?"":"?"}${Q};${V}$y`),!0;var Q,V}_updateAttrColor(x,D,T,O,F){return D===2?(x|=50331648,x&=-16777216,x|=_.AttributeData.fromColorRGB([T,O,F])):D===5&&(x&=-50331904,x|=33554432|255&T),x}_extractColor(x,D,T){const O=[0,0,-1,0,0,0];let F=0,K=0;do{if(O[K+F]=x.params[D+K],x.hasSubParams(D+K)){const G=x.getSubParams(D+K);let X=0;do O[1]===5&&(F=1),O[K+X+1+F]=G[X];while(++X<G.length&&X+K+1+F<O.length);break}if(O[1]===5&&K+F>=2||O[1]===2&&K+F>=5)break;O[1]&&(F=1)}while(++K+D<x.length&&K+F<O.length);for(let G=2;G<O.length;++G)O[G]===-1&&(O[G]=0);switch(O[0]){case 38:T.fg=this._updateAttrColor(T.fg,O[1],O[3],O[4],O[5]);break;case 48:T.bg=this._updateAttrColor(T.bg,O[1],O[3],O[4],O[5]);break;case 58:T.extended=T.extended.clone(),T.extended.underlineColor=this._updateAttrColor(T.extended.underlineColor,O[1],O[3],O[4],O[5])}return K}_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 O=this._curAttrData;for(let F=0;F<D;F++)T=x.params[F],T>=30&&T<=37?(O.fg&=-50331904,O.fg|=16777216|T-30):T>=40&&T<=47?(O.bg&=-50331904,O.bg|=16777216|T-40):T>=90&&T<=97?(O.fg&=-50331904,O.fg|=16777224|T-90):T>=100&&T<=107?(O.bg&=-50331904,O.bg|=16777224|T-100):T===0?this._processSGR0(O):T===1?O.fg|=134217728:T===3?O.bg|=67108864:T===4?(O.fg|=268435456,this._processUnderline(x.hasSubParams(F)?x.getSubParams(F)[0]:1,O)):T===5?O.fg|=536870912:T===7?O.fg|=67108864:T===8?O.fg|=1073741824:T===9?O.fg|=2147483648:T===2?O.bg|=134217728:T===21?this._processUnderline(2,O):T===22?(O.fg&=-134217729,O.bg&=-134217729):T===23?O.bg&=-67108865:T===24?(O.fg&=-268435457,this._processUnderline(0,O)):T===25?O.fg&=-536870913:T===27?O.fg&=-67108865:T===28?O.fg&=-1073741825:T===29?O.fg&=2147483647:T===39?(O.fg&=-67108864,O.fg|=16777215&c.DEFAULT_ATTR_DATA.fg):T===49?(O.bg&=-67108864,O.bg|=16777215&c.DEFAULT_ATTR_DATA.bg):T===38||T===48||T===58?F+=this._extractColor(x,F,O):T===53?O.bg|=1073741824:T===55?O.bg&=-1073741825:T===59?(O.extended=O.extended.clone(),O.extended.underlineColor=-1,O.updateExtended()):T===100?(O.fg&=-67108864,O.fg|=16777215&c.DEFAULT_ATTR_DATA.fg,O.bg&=-67108864,O.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 O=T.shift(),F=T.shift();if(/^\d+$/.exec(O)){const K=parseInt(O);if(U(K))if(F==="?")D.push({type:0,index:K});else{const G=(0,v.parseColor)(F);G&&D.push({type:1,index:K,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 O;const F=T.findIndex(K=>K.startsWith("id="));return F!==-1&&(O=T[F].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:O,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 O=0;O<T.length&&!(D>=this._specialColors.length);++O,++D)if(T[O]==="?")this._onColor.fire([{type:0,index:this._specialColors[D]}]);else{const F=(0,v.parseColor)(T[O]);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 O=0;O<T.length;++O)if(/^\d+$/.exec(T[O])){const F=parseInt(T[O]);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 a.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,O=this._activeBuffer.lines.get(T);O&&(O.fill(x),O.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(x,D){const T=this._bufferService.buffer,O=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}[O.cursorStyle]-(O.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(x,D){this._dirtyRowTracker.markRangeDirty(x,D)}}n.InputHandler=I;let N=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&&(M=j,j=x,x=M),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}N=f([g(0,m.IBufferService)],N)},844:(y,n)=>{function u(f){for(const g of f)g.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 g=this._disposables.indexOf(f);g!==-1&&this._disposables.splice(g,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var g;this._isDisposed||f===this._value||((g=this._value)===null||g===void 0||g.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(g,d,p){this._data[g]||(this._data[g]={}),this._data[g][d]=p}get(g,d){return this._data[g]?this._data[g][d]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(f,g,d,p,C){this._data.get(f,g)||this._data.set(f,g,new u),this._data.get(f,g).set(d,p,C)}get(f,g,d,p){var C;return(C=this._data.get(f,g))===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 g=u.match(/Version\/(\d+)/);return g===null||g.length<2?0:parseInt(g[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 g=this._getKey(f);if(g===void 0||(u=this._search(g),u===-1)||this._getKey(this._array[u])!==g)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])===g);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,g){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do g(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===f)}values(){return[...this._array].values()}_search(f){let g=0,d=this._array.length-1;for(;d>=g;){let p=g+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}g=p+1}}return g}}},7226:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const f=u(6114);class g{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,S=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),S=Math.max(w,S),o=C.timeRemaining(),1.5*S>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 g{_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 g{_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(g){const d=g.buffer.lines.get(g.buffer.ybase+g.buffer.y-1),p=d==null?void 0:d.get(g.cols-1),C=g.buffer.lines.get(g.buffer.ybase+g.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),g=u(7226),d=u(3734),p=u(8437),C=u(4634),w=u(511),S=u(643),c=u(4863),o=u(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(s,a,_){this._hasScrollback=s,this._optionsService=a,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,S.NULL_CELL_CHAR,S.NULL_CELL_WIDTH,S.NULL_CELL_CODE]),this._whitespaceCell=w.CellData.fromCharData([0,S.WHITESPACE_CELL_CHAR,S.WHITESPACE_CELL_WIDTH,S.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new g.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,a){return new p.BufferLine(this._bufferService.cols,this.getNullCell(s),a)}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 a=s+this._optionsService.rawOptions.scrollback;return a>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:a}fillViewportRows(s){if(this.lines.length===0){s===void 0&&(s=p.DEFAULT_ATTR_DATA);let a=this._rows;for(;a--;)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,a){const _=this.getNullCell(p.DEFAULT_ATTR_DATA);let m=0;const E=this._getCorrectBufferLength(a);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++)m+=+this.lines.get(v).resize(s,_);let b=0;if(this._rows<a)for(let v=this._rows;v<a;v++)this.lines.length<a+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>a;v--)this.lines.length>a+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,a-1),b&&(this.y+=b),this.savedX=Math.min(this.savedX,s-1),this.scrollTop=0}if(this.scrollBottom=a-1,this._isReflowEnabled&&(this._reflow(s,a),this._cols>s))for(let b=0;b<this.lines.length;b++)m+=+this.lines.get(b).resize(s,_);this._cols=s,this._rows=a,this._memoryCleanupQueue.clear(),m>.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 a=0;for(;this._memoryCleanupPosition<this.lines.length;)if(a+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),a>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,a){this._cols!==s&&(s>this._cols?this._reflowLarger(s,a):this._reflowSmaller(s,a))}_reflowLarger(s,a){const _=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,s,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(_.length>0){const m=(0,C.reflowLargerCreateNewLayout)(this.lines,_);(0,C.reflowLargerApplyNewLayout)(this.lines,m.layout),this._reflowLargerAdjustViewport(s,a,m.countRemoved)}}_reflowLargerAdjustViewport(s,a,_){const m=this.getNullCell(p.DEFAULT_ATTR_DATA);let E=_;for(;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<a&&this.lines.push(new p.BufferLine(s,m))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(s,a){const _=this.getNullCell(p.DEFAULT_ATTR_DATA),m=[];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),M=A.length-k.length;let I;I=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+M):Math.max(0,this.lines.length-this.lines.maxLength+M);const N=[];for(let O=0;O<M;O++){const F=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);N.push(F)}N.length>0&&(m.push({start:b+k.length+E,newLines:N}),E+=N.length),k.push(...N);let U=A.length-1,j=A[U];j===0&&(U--,j=A[U]);let x=k.length-M-1,D=P;for(;x>=0;){const O=Math.min(D,j);if(k[U]===void 0)break;if(k[U].copyCellsFrom(k[x],D-O,j-O,O,!0),j-=O,j===0&&(U--,j=A[U]),D-=O,D===0){x--;const F=Math.max(x,0);D=(0,C.getWrappedLineTrimmedLength)(k,F,this._cols)}}for(let O=0;O<k.length;O++)A[O]<s&&k[O].setCell(A[O],_);let T=M-I;for(;T-- >0;)this.ybase===0?this.y<a-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+E)-a&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+M,this.ybase+a-1)}if(m.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=m[P];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+E);let M=0;for(let U=Math.min(this.lines.maxLength-1,k+E-1);U>=0;U--)if(A&&A.start>R+M){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}),M+=A.newLines.length,A=m[++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 N=Math.max(0,k+E-this.lines.maxLength);N>0&&this.lines.onTrimEmitter.fire(N)}}translateBufferLineToString(s,a,_=0,m){const E=this.lines.get(s);return E?E.translateToString(a,_,m):""}getWrappedRangeForLine(s){let a=s,_=s;for(;a>0&&this.lines.get(a).isWrapped;)a--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:a,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 a=0;a<this.markers.length;a++)this.markers[a].line===s&&(this.markers[a].dispose(),this.markers.splice(a--,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 a=new c.Marker(s);return this.markers.push(a),a.register(this.lines.onTrim(_=>{a.line-=_,a.line<0&&a.dispose()})),a.register(this.lines.onInsert(_=>{a.line>=_.index&&(a.line+=_.amount)})),a.register(this.lines.onDelete(_=>{a.line>=_.index&&a.line<_.index+_.amount&&a.dispose(),a.line>_.index&&(a.line-=_.amount)})),a.register(a.onDispose(()=>this._removeMarker(a))),a}_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),g=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 a=o||g.CellData.fromCharData([0,d.NULL_CELL_CHAR,d.NULL_CELL_WIDTH,d.NULL_CELL_CODE]);for(let _=0;_<c;++_)this.setCell(_,a);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,a,_,m){268435456&_&&(this._extendedAttrs[c]=m),this._data[3*c+0]=o|s<<22,this._data[3*c+1]=a,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,a){if((c%=this.length)&&this.getWidth(c-1)===2&&this.setCellFromCodePoint(c-1,0,1,(a==null?void 0:a.fg)||0,(a==null?void 0:a.bg)||0,(a==null?void 0:a.extended)||new f.ExtendedAttrs),o<this.length-c){const _=new g.CellData;for(let m=this.length-c-o-1;m>=0;--m)this.setCell(c+o+m,this.loadCell(c+m,_));for(let m=0;m<o;++m)this.setCell(c+m,s)}else for(let _=c;_<this.length;++_)this.setCell(_,s);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(a==null?void 0:a.fg)||0,(a==null?void 0:a.bg)||0,(a==null?void 0:a.extended)||new f.ExtendedAttrs)}deleteCells(c,o,s,a){if(c%=this.length,o<this.length-c){const _=new g.CellData;for(let m=0;m<this.length-c-o;++m)this.setCell(c+m,this.loadCell(c+o+m,_));for(let m=this.length-o;m<this.length;++m)this.setCell(m,s)}else for(let _=c;_<this.length;++_)this.setCell(_,s);c&&this.getWidth(c-1)===2&&this.setCellFromCodePoint(c-1,0,1,(a==null?void 0:a.fg)||0,(a==null?void 0:a.bg)||0,(a==null?void 0:a.extended)||new f.ExtendedAttrs),this.getWidth(c)!==0||this.hasContent(c)||this.setCellFromCodePoint(c,0,1,(a==null?void 0:a.fg)||0,(a==null?void 0:a.bg)||0,(a==null?void 0:a.extended)||new f.ExtendedAttrs)}replaceCells(c,o,s,a,_=!1){if(_)for(c&&this.getWidth(c-1)===2&&!this.isProtected(c-1)&&this.setCellFromCodePoint(c-1,0,1,(a==null?void 0:a.fg)||0,(a==null?void 0:a.bg)||0,(a==null?void 0:a.extended)||new f.ExtendedAttrs),o<this.length&&this.getWidth(o-1)===2&&!this.isProtected(o)&&this.setCellFromCodePoint(o,0,1,(a==null?void 0:a.fg)||0,(a==null?void 0:a.bg)||0,(a==null?void 0:a.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,(a==null?void 0:a.fg)||0,(a==null?void 0:a.bg)||0,(a==null?void 0:a.extended)||new f.ExtendedAttrs),o<this.length&&this.getWidth(o-1)===2&&this.setCellFromCodePoint(o,0,1,(a==null?void 0:a.fg)||0,(a==null?void 0:a.bg)||0,(a==null?void 0:a.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 a=new Uint32Array(s);a.set(this._data),this._data=a}for(let a=this.length;a<c;++a)this.setCell(a,o)}else{this._data=this._data.subarray(0,s);const a=Object.keys(this._combined);for(let m=0;m<a.length;m++){const E=parseInt(a[m],10);E>=c&&delete this._combined[E]}const _=Object.keys(this._extendedAttrs);for(let m=0;m<_.length;m++){const E=parseInt(_[m],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,a,_){const m=c._data;if(_)for(let b=a-1;b>=0;b--){for(let v=0;v<3;v++)this._data[3*(s+b)+v]=m[3*(o+b)+v];268435456&m[3*(o+b)+2]&&(this._extendedAttrs[s+b]=c._extendedAttrs[o+b])}else for(let b=0;b<a;b++){for(let v=0;v<3;v++)this._data[3*(s+b)+v]=m[3*(o+b)+v];268435456&m[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 a="";for(;o<s;){const _=this._data[3*o+0],m=2097151&_;a+=2097152&_?this._combined[o]:m?(0,p.stringFromCodePoint)(m):d.WHITESPACE_CELL_CHAR,o+=_>>22||1}return a}}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,g,d){if(g===f.length-1)return f[g].getTrimmedLength();const p=!f[g].hasContent(d-1)&&f[g].getWidth(d-1)===1,C=f[g+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,g,d,p,C){const w=[];for(let S=0;S<f.length-1;S++){let c=S,o=f.get(++c);if(!o.isWrapped)continue;const s=[f.get(S)];for(;c<f.length&&o.isWrapped;)s.push(o),o=f.get(++c);if(p>=S&&p<c){S+=s.length-1;continue}let a=0,_=u(s,a,g),m=1,E=0;for(;m<s.length;){const v=u(s,m,g),k=v-E,R=d-_,P=Math.min(k,R);s[a].copyCellsFrom(s[m],E,_,P,!1),_+=P,_===d&&(a++,_=0),E+=P,E===v&&(m++,E=0),_===0&&a!==0&&s[a-1].getWidth(d-1)===2&&(s[a].copyCellsFrom(s[a-1],d-1,_++,1,!1),s[a-1].setCell(d-1,C))}s[a].replaceCells(_,d,C);let b=0;for(let v=s.length-1;v>0&&(v>a||s[v].getTrimmedLength()===0);v--)b++;b>0&&(w.push(S+s.length-b),w.push(b)),S+=s.length-1}return w},n.reflowLargerCreateNewLayout=function(f,g){const d=[];let p=0,C=g[p],w=0;for(let S=0;S<f.length;S++)if(C===S){const c=g[++p];f.onDeleteEmitter.fire({index:S-w,amount:c}),S+=c-1,w+=c,C=g[++p]}else d.push(S);return{layout:d,countRemoved:w}},n.reflowLargerApplyNewLayout=function(f,g){const d=[];for(let p=0;p<g.length;p++)d.push(f.get(g[p]));for(let p=0;p<d.length;p++)f.set(p,d[p]);f.length=g.length},n.reflowSmallerGetNewLineLengths=function(f,g,d){const p=[],C=f.map((o,s)=>u(f,s,g)).reduce((o,s)=>o+s);let w=0,S=0,c=0;for(;c<C;){if(C-c<d){p.push(C-c);break}w+=d;const o=u(f,S,g);w>o&&(w-=o,S++);const s=f[S].getWidth(w-1)===2;s&&w--;const a=s?d-1:d;p.push(a),c+=a}return p},n.getWrappedLineTrimmedLength=u},5295:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;const f=u(8460),g=u(844),d=u(9092);class p extends g.Disposable{constructor(w,S){super(),this._optionsService=w,this._bufferService=S,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,S){this._normal.resize(w,S),this._alt.resize(w,S),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),g=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 S=new p;return S.setFromCharData(w),S}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[g.CHAR_DATA_ATTR_INDEX],this.bg=0;let S=!1;if(w[g.CHAR_DATA_CHAR_INDEX].length>2)S=!0;else if(w[g.CHAR_DATA_CHAR_INDEX].length===2){const c=w[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=c&&c<=56319){const o=w[g.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=o&&o<=57343?this.content=1024*(c-55296)+o-56320+65536|w[g.CHAR_DATA_WIDTH_INDEX]<<22:S=!0}else S=!0}else this.content=w[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[g.CHAR_DATA_WIDTH_INDEX]<<22;S&&(this.combinedData=w[g.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[g.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),g=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,g.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,g;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}\\`}(g||(n.C1_ESCAPED=g={}))},7399:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const f=u(2584),g={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 S={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"?S.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A":d.key==="UIKeyInputLeftArrow"?S.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D":d.key==="UIKeyInputRightArrow"?S.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C":d.key==="UIKeyInputDownArrow"&&(S.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:if(d.altKey){S.key=f.C0.ESC+f.C0.DEL;break}S.key=f.C0.DEL;break;case 9:if(d.shiftKey){S.key=f.C0.ESC+"[Z";break}S.key=f.C0.HT,S.cancel=!0;break;case 13:S.key=d.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,S.cancel=!0;break;case 27:S.key=f.C0.ESC,d.altKey&&(S.key=f.C0.ESC+f.C0.ESC),S.cancel=!0;break;case 37:if(d.metaKey)break;c?(S.key=f.C0.ESC+"[1;"+(c+1)+"D",S.key===f.C0.ESC+"[1;3D"&&(S.key=f.C0.ESC+(C?"b":"[1;5D"))):S.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(d.metaKey)break;c?(S.key=f.C0.ESC+"[1;"+(c+1)+"C",S.key===f.C0.ESC+"[1;3C"&&(S.key=f.C0.ESC+(C?"f":"[1;5C"))):S.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(d.metaKey)break;c?(S.key=f.C0.ESC+"[1;"+(c+1)+"A",C||S.key!==f.C0.ESC+"[1;3A"||(S.key=f.C0.ESC+"[1;5A")):S.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(d.metaKey)break;c?(S.key=f.C0.ESC+"[1;"+(c+1)+"B",C||S.key!==f.C0.ESC+"[1;3B"||(S.key=f.C0.ESC+"[1;5B")):S.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:d.shiftKey||d.ctrlKey||(S.key=f.C0.ESC+"[2~");break;case 46:S.key=c?f.C0.ESC+"[3;"+(c+1)+"~":f.C0.ESC+"[3~";break;case 36:S.key=c?f.C0.ESC+"[1;"+(c+1)+"H":p?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:S.key=c?f.C0.ESC+"[1;"+(c+1)+"F":p?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:d.shiftKey?S.type=2:d.ctrlKey?S.key=f.C0.ESC+"[5;"+(c+1)+"~":S.key=f.C0.ESC+"[5~";break;case 34:d.shiftKey?S.type=3:d.ctrlKey?S.key=f.C0.ESC+"[6;"+(c+1)+"~":S.key=f.C0.ESC+"[6~";break;case 112:S.key=c?f.C0.ESC+"[1;"+(c+1)+"P":f.C0.ESC+"OP";break;case 113:S.key=c?f.C0.ESC+"[1;"+(c+1)+"Q":f.C0.ESC+"OQ";break;case 114:S.key=c?f.C0.ESC+"[1;"+(c+1)+"R":f.C0.ESC+"OR";break;case 115:S.key=c?f.C0.ESC+"[1;"+(c+1)+"S":f.C0.ESC+"OS";break;case 116:S.key=c?f.C0.ESC+"[15;"+(c+1)+"~":f.C0.ESC+"[15~";break;case 117:S.key=c?f.C0.ESC+"[17;"+(c+1)+"~":f.C0.ESC+"[17~";break;case 118:S.key=c?f.C0.ESC+"[18;"+(c+1)+"~":f.C0.ESC+"[18~";break;case 119:S.key=c?f.C0.ESC+"[19;"+(c+1)+"~":f.C0.ESC+"[19~";break;case 120:S.key=c?f.C0.ESC+"[20;"+(c+1)+"~":f.C0.ESC+"[20~";break;case 121:S.key=c?f.C0.ESC+"[21;"+(c+1)+"~":f.C0.ESC+"[21~";break;case 122:S.key=c?f.C0.ESC+"[23;"+(c+1)+"~":f.C0.ESC+"[23~";break;case 123:S.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?S.key=d.key:d.key&&d.ctrlKey&&(d.key==="_"&&(S.key=f.C0.US),d.key==="@"&&(S.key=f.C0.NUL)):d.keyCode===65&&(S.type=1);else{const o=g[d.keyCode],s=o==null?void 0:o[d.shiftKey?1:0];if(s)S.key=f.C0.ESC+s;else if(d.keyCode>=65&&d.keyCode<=90){const a=d.ctrlKey?d.keyCode-64:d.keyCode+32;let _=String.fromCharCode(a);d.shiftKey&&(_=_.toUpperCase()),S.key=f.C0.ESC+_}else if(d.keyCode===32)S.key=f.C0.ESC+(d.ctrlKey?f.C0.NUL:" ");else if(d.key==="Dead"&&d.code.startsWith("Key")){let a=d.code.slice(3,4);d.shiftKey||(a=a.toLowerCase()),S.key=f.C0.ESC+a,S.cancel=!0}}else d.keyCode>=65&&d.keyCode<=90?S.key=String.fromCharCode(d.keyCode-64):d.keyCode===32?S.key=f.C0.NUL:d.keyCode>=51&&d.keyCode<=55?S.key=String.fromCharCode(d.keyCode-51+27):d.keyCode===56?S.key=f.C0.DEL:d.keyCode===219?S.key=f.C0.ESC:d.keyCode===220?S.key=f.C0.FS:d.keyCode===221&&(S.key=f.C0.GS)}return S}},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,g=u.length){let d="";for(let p=f;p<g;++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 g=u.length;if(!g)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<g;++C){const w=u.charCodeAt(C);if(55296<=w&&w<=56319){if(++C>=g)return this._interim=w,d;const S=u.charCodeAt(C);56320<=S&&S<=57343?f[d++]=1024*(w-55296)+S-56320+65536:(f[d++]=w,f[d++]=S)}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 g=u.length;if(!g)return 0;let d,p,C,w,S=0,c=0,o=0;if(this.interim[0]){let _=!1,m=this.interim[0];m&=(224&m)==192?31:(240&m)==224?15:7;let E,b=0;for(;(E=63&this.interim[++b])&&b<4;)m<<=6,m|=E;const v=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,k=v-b;for(;o<k;){if(o>=g)return 0;if(E=u[o++],(192&E)!=128){o--,_=!0;break}this.interim[b++]=E,m<<=6,m|=63&E}_||(v===2?m<128?o--:f[S++]=m:v===3?m<2048||m>=55296&&m<=57343||m===65279||(f[S++]=m):m<65536||m>1114111||(f[S++]=m)),this.interim.fill(0)}const s=g-4;let a=o;for(;a<g;){for(;!(!(a<s)||128&(d=u[a])||128&(p=u[a+1])||128&(C=u[a+2])||128&(w=u[a+3]));)f[S++]=d,f[S++]=p,f[S++]=C,f[S++]=w,a+=4;if(d=u[a++],d<128)f[S++]=d;else if((224&d)==192){if(a>=g)return this.interim[0]=d,S;if(p=u[a++],(192&p)!=128){a--;continue}if(c=(31&d)<<6|63&p,c<128){a--;continue}f[S++]=c}else if((240&d)==224){if(a>=g)return this.interim[0]=d,S;if(p=u[a++],(192&p)!=128){a--;continue}if(a>=g)return this.interim[0]=d,this.interim[1]=p,S;if(C=u[a++],(192&C)!=128){a--;continue}if(c=(15&d)<<12|(63&p)<<6|63&C,c<2048||c>=55296&&c<=57343||c===65279)continue;f[S++]=c}else if((248&d)==240){if(a>=g)return this.interim[0]=d,S;if(p=u[a++],(192&p)!=128){a--;continue}if(a>=g)return this.interim[0]=d,this.interim[1]=p,S;if(C=u[a++],(192&C)!=128){a--;continue}if(a>=g)return this.interim[0]=d,this.interim[1]=p,this.interim[2]=C,S;if(w=u[a++],(192&w)!=128){a--;continue}if(c=(7&d)<<18|(63&p)<<12|(63&C)<<6|63&w,c<65536||c>1114111)continue;f[S++]=c}}return S}}},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 g;n.UnicodeV6=class{constructor(){if(this.version="6",!g){g=new Uint8Array(65536),g.fill(1),g[0]=0,g.fill(0,1,32),g.fill(0,127,160),g.fill(2,4352,4448),g[9001]=2,g[9002]=2,g.fill(2,11904,42192),g[12351]=1,g.fill(2,44032,55204),g.fill(2,63744,64256),g.fill(2,65040,65050),g.fill(2,65072,65136),g.fill(2,65280,65377),g.fill(2,65504,65511);for(let d=0;d<u.length;++d)g.fill(0,u[d][0],u[d][1]+1)}}wcwidth(d){return d<32?0:d<127?1:d<65536?g[d]:function(p,C){let w,S=0,c=C.length-1;if(p<C[0][0]||p>C[c][1])return!1;for(;c>=S;)if(w=S+c>>1,p>C[w][1])S=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),g=u(844);class d extends g.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 S;for(this._isSyncWriting=!0;S=this._writeBuffer.shift();){this._action(S);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 S=C||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const c=this._writeBuffer[this._bufferOffset],o=this._action(c,w);if(o){const a=_=>Date.now()-S>=12?setTimeout(()=>this._innerWrite(0,_)):this._innerWrite(S,_);return void o.catch(_=>(queueMicrotask(()=>{throw _}),Promise.resolve(!1))).then(a)}const s=this._callbacks[this._bufferOffset];if(s&&s(),this._bufferOffset++,this._pendingData-=c.length,Date.now()-S>=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 g(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 S=0;S<3;++S){const c=parseInt(p.slice(C*S,C*S+C),16);w[S]=C===1?c<<4:C===2?c:C===3?c>>4:c>>8}return w}},n.toRgbString=function(d,p=16){const[C,w,S]=d;return`rgb:${g(C,p)}/${g(w,p)}/${g(S,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),g=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,S){this._handlers[w]===void 0&&(this._handlers[w]=[]);const c=this._handlers[w];return c.push(S),{dispose:()=>{const o=c.indexOf(S);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,S){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(S);else this._handlerFb(this._ident,"HOOK",S)}put(w,S,c){if(this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].put(w,S,c);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(w,S,c))}unhook(w,S=!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=S,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 g.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,S,c){this._hitLimit||(this._data+=(0,f.utf32ToString)(w,S,c),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(w){let S=!1;if(this._hitLimit)S=!1;else if(w&&(S=this._handler(this._data,this._params),S instanceof Promise))return S.then(c=>(this._params=C,this._data="",this._hitLimit=!1,c));return this._params=C,this._data="",this._hitLimit=!1,S}}},2015:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;const f=u(844),g=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,a,_){this.table[s<<8|o]=a<<4|_}addMany(o,s,a,_){for(let m=0;m<o.length;m++)this.table[s<<8|o[m]]=a<<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),a=s(32,127),_=s(0,24);_.push(25),_.push.apply(_,s(28,32));const m=s(0,14);let E;for(E in c.setDefault(1,0),c.addMany(a,0,2,0),m)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(a,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(a,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(a,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 S 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 g.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(s,a,_)=>{},this._executeHandlerFb=s=>{},this._csiHandlerFb=(s,a)=>{},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 a=0;if(o.prefix){if(o.prefix.length>1)throw new Error("only one byte as prefix supported");if(a=o.prefix.charCodeAt(0),a&&60>a||a>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 m=0;m<o.intermediates.length;++m){const E=o.intermediates.charCodeAt(m);if(32>E||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");a<<=8,a|=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 a<<=8,a|=_,a}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 a=this._identifier(o,[48,126]);this._escHandlers[a]===void 0&&(this._escHandlers[a]=[]);const _=this._escHandlers[a];return _.push(s),{dispose:()=>{const m=_.indexOf(s);m!==-1&&_.splice(m,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 a=this._identifier(o);this._csiHandlers[a]===void 0&&(this._csiHandlers[a]=[]);const _=this._csiHandlers[a];return _.push(s),{dispose:()=>{const m=_.indexOf(s);m!==-1&&_.splice(m,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,a,_,m){this._parseStack.state=o,this._parseStack.handlers=s,this._parseStack.handlerPos=a,this._parseStack.transition=_,this._parseStack.chunkPos=m}parse(o,s,a){let _,m=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(a===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(a===!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(a===!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(m=o[this._parseStack.chunkPos],_=this._dcsParser.unhook(m!==24&&m!==26,a),_)return _;m===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(m=o[this._parseStack.chunkPos],_=this._oscParser.end(m!==24&&m!==26,a),_)return _;m===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(m=o[v],E=this._transitions.table[this.currentState<<8|(m<160?m:w)],E>>4){case 2:for(let M=v+1;;++M){if(M>=s||(m=o[M])<32||m>126&&m<w){this._printHandler(o,v,M),v=M-1;break}if(++M>=s||(m=o[M])<32||m>126&&m<w){this._printHandler(o,v,M),v=M-1;break}if(++M>=s||(m=o[M])<32||m>126&&m<w){this._printHandler(o,v,M),v=M-1;break}if(++M>=s||(m=o[M])<32||m>126&&m<w){this._printHandler(o,v,M),v=M-1;break}}break;case 3:this._executeHandlers[m]?this._executeHandlers[m]():this._executeHandlerFb(m),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:v,code:m,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const k=this._csiHandlers[this._collect<<8|m];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|m,this._params),this.precedingCodepoint=0;break;case 8:do switch(m){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(m-48)}while(++v<s&&(m=o[v])>47&&m<60);v--;break;case 9:this._collect<<=8,this._collect|=m;break;case 10:const P=this._escHandlers[this._collect<<8|m];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|m),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|m,this._params);break;case 13:for(let M=v+1;;++M)if(M>=s||(m=o[M])===24||m===26||m===27||m>127&&m<w){this._dcsParser.put(o,v,M),v=M-1;break}break;case 14:if(_=this._dcsParser.unhook(m!==24&&m!==26),_)return this._preserveStack(6,[],0,E,v),_;m===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 M=v+1;;M++)if(M>=s||(m=o[M])<32||m>127&&m<w){this._oscParser.put(o,v,M),v=M-1;break}break;case 6:if(_=this._oscParser.end(m!==24&&m!==26),_)return this._preserveStack(5,[],0,E,v),_;m===27&&(E|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&E}}}n.EscapeSequenceParser=S},6242:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;const f=u(5770),g=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 S=w.indexOf(C);S!==-1&&w.splice(S,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 S=this._active.length-1;S>=0;S--)this._active[S].put(p,C,w);else this._handlerFb(this._id,"PUT",(0,g.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 S=p[C++];if(S===59){this._state=2,this._start();break}if(S<48||57<S)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+S-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,S=this._active.length-1,c=!1;if(this._stack.paused&&(S=this._stack.loopPosition-1,w=C,c=this._stack.fallThrough,this._stack.paused=!1),!c&&w===!1){for(;S>=0&&(w=this._active[S].end(p),w!==!0);S--)if(w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!1,w;S--}for(;S>=0;S--)if(w=this._active[S].end(!1),w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,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,g.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 S=0;S<w.length;++S)p.addSubParam(w[S]);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 g={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(g),f.dispose=()=>this._wrappedAddonDispose(g),f.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let f=-1;for(let g=0;g<this._addons.length;g++)if(this._addons[g]===u){f=g;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),g=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 g.CellData}}},3785:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLineApiView=void 0;const f=u(511);n.BufferLineApiView=class{constructor(g){this._line=g}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(g,d){if(!(g<0||g>=this._line.length))return d?(this._line.loadCell(g,d),d):this._line.loadCell(g,new f.CellData)}translateToString(g,d,p){return this._line.translateToString(g,d,p)}}},8285:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const f=u(8771),g=u(8460),d=u(844);class p extends d.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new g.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,g=>f(g.toArray()))}addCsiHandler(u,f){return this.registerCsiHandler(u,f)}registerDcsHandler(u,f){return this._core.registerDcsHandler(u,(g,d)=>f(g,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,a){var _,m=arguments.length,E=m<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,s):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,o,s,a);else for(var b=c.length-1;b>=0;b--)(_=c[b])&&(E=(m<3?_(E):m>3?_(o,s,E):_(o,s))||E);return m>3&&E&&Object.defineProperty(o,s,E),E},g=this&&this.__param||function(c,o){return function(s,a){o(s,a,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 S=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 a;a=this._cachedBlankLine,a&&a.length===this.cols&&a.getFg(0)===c.fg&&a.getBg(0)===c.bg||(a=s.getBlankLine(c,o),this._cachedBlankLine=a),a.isWrapped=o;const _=s.ybase+s.scrollTop,m=s.ybase+s.scrollBottom;if(s.scrollTop===0){const E=s.lines.isFull;m===s.lines.length-1?E?s.lines.recycle().copyFrom(a):s.lines.push(a.clone()):s.lines.splice(m+1,0,a.clone()),E?this.isUserScrolling&&(s.ydisp=Math.max(s.ydisp-1,0)):(s.ybase++,this.isUserScrolling||s.ydisp++)}else{const E=m-_+1;s.lines.shiftElements(_+1,E-1,-1),s.lines.set(m,a.clone())}this.isUserScrolling||(s.ydisp=s.ybase),this._onScroll.fire(s.ydisp)}scrollLines(c,o,s){const a=this.buffer;if(c<0){if(a.ydisp===0)return;this.isUserScrolling=!0}else c+a.ydisp>=a.ybase&&(this.isUserScrolling=!1);const _=a.ydisp;a.ydisp=Math.max(Math.min(a.ydisp+c,a.ybase),0),_!==a.ydisp&&(o||this._onScroll.fire(a.ydisp))}};n.BufferService=S=f([g(0,w.IOptionsService)],S)},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(a,_,m,E){var b,v=arguments.length,k=v<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,m):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(a,_,m,E);else for(var R=a.length-1;R>=0;R--)(b=a[R])&&(k=(v<3?b(k):v>3?b(_,m,k):b(_,m))||k);return v>3&&k&&Object.defineProperty(_,m,k),k},g=this&&this.__param||function(a,_){return function(m,E){_(m,E,a)}};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:a=>a.button!==4&&a.action===1&&(a.ctrl=!1,a.alt=!1,a.shift=!1,!0)},VT200:{events:19,restrict:a=>a.action!==32},DRAG:{events:23,restrict:a=>a.action!==32||a.button!==3},ANY:{events:31,restrict:a=>!0}};function S(a,_){let m=(a.ctrl?16:0)|(a.shift?4:0)|(a.alt?8:0);return a.button===4?(m|=64,m|=a.action):(m|=3&a.button,4&a.button&&(m|=64),8&a.button&&(m|=128),a.action===32?m|=32:a.action!==0||_||(m|=3)),m}const c=String.fromCharCode,o={DEFAULT:a=>{const _=[S(a,!1)+32,a.col+32,a.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${c(_[0])}${c(_[1])}${c(_[2])}`},SGR:a=>{const _=a.action===0&&a.button!==4?"m":"M";return`\x1B[<${S(a,!0)};${a.col};${a.row}${_}`},SGR_PIXELS:a=>{const _=a.action===0&&a.button!==4?"m":"M";return`\x1B[<${S(a,!0)};${a.x};${a.y}${_}`}};let s=n.CoreMouseService=class extends C.Disposable{constructor(a,_){super(),this._bufferService=a,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 m of Object.keys(w))this.addProtocol(m,w[m]);for(const m of Object.keys(o))this.addEncoding(m,o[m]);this.reset()}addProtocol(a,_){this._protocols[a]=_}addEncoding(a,_){this._encodings[a]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(a){if(!this._protocols[a])throw new Error(`unknown protocol "${a}"`);this._activeProtocol=a,this._onProtocolChange.fire(this._protocols[a].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(a){if(!this._encodings[a])throw new Error(`unknown encoding "${a}"`);this._activeEncoding=a}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(a){if(a.col<0||a.col>=this._bufferService.cols||a.row<0||a.row>=this._bufferService.rows||a.button===4&&a.action===32||a.button===3&&a.action!==32||a.button!==4&&(a.action===2||a.action===3)||(a.col++,a.row++,a.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,a,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(a))return!1;const _=this._encodings[this._activeEncoding](a);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=a,!0}explainEvents(a){return{down:!!(1&a),up:!!(2&a),drag:!!(4&a),move:!!(8&a),wheel:!!(16&a)}}_equalEvents(a,_,m){if(m){if(a.x!==_.x||a.y!==_.y)return!1}else if(a.col!==_.col||a.row!==_.row)return!1;return a.button===_.button&&a.action===_.action&&a.ctrl===_.ctrl&&a.alt===_.alt&&a.shift===_.shift}};n.CoreMouseService=s=f([g(0,d.IBufferService),g(1,d.ICoreService)],s)},6975:function(y,n,u){var f=this&&this.__decorate||function(s,a,_,m){var E,b=arguments.length,v=b<3?a:m===null?m=Object.getOwnPropertyDescriptor(a,_):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(s,a,_,m);else for(var k=s.length-1;k>=0;k--)(E=s[k])&&(v=(b<3?E(v):b>3?E(a,_,v):E(a,_))||v);return b>3&&v&&Object.defineProperty(a,_,v),v},g=this&&this.__param||function(s,a){return function(_,m){a(_,m,s)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const d=u(1439),p=u(8460),C=u(844),w=u(2585),S=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,a,_){super(),this._bufferService=s,this._logService=a,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)(S),this.decPrivateModes=(0,d.clone)(c)}reset(){this.modes=(0,d.clone)(S),this.decPrivateModes=(0,d.clone)(c)}triggerDataEvent(s,a=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;a&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),a&&this._onUserInput.fire(),this._logService.debug(`sending data "${s}"`,()=>s.split("").map(m=>m.charCodeAt(0))),this._onData.fire(s)}triggerBinaryEvent(s){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${s}"`,()=>s.split("").map(a=>a.charCodeAt(0))),this._onBinary.fire(s))}};n.CoreService=o=f([g(0,w.IBufferService),g(1,w.ILogService),g(2,w.IOptionsService)],o)},9074:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DecorationService=void 0;const f=u(8055),g=u(8460),d=u(844),p=u(6106);let C=0,w=0;class S 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 g.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new g.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,d.toDisposable)(()=>this.reset()))}registerDecoration(s){if(s.marker.isDisposed)return;const a=new c(s);if(a){const _=a.marker.onDispose(()=>a.dispose());a.onDispose(()=>{a&&(this._decorations.delete(a)&&this._onDecorationRemoved.fire(a),_.dispose())}),this._decorations.insert(a),this._onDecorationRegistered.fire(a)}return a}reset(){for(const s of this._decorations.values())s.dispose();this._decorations.clear()}*getDecorationsAtCell(s,a,_){var m,E,b;let v=0,k=0;for(const R of this._decorations.getKeyIterator(a))v=(m=R.options.x)!==null&&m!==void 0?m: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,a,_,m){this._decorations.forEachByKey(a,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")===_)&&m(E)})}}n.DecorationService=S;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 g.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new g.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),g=u(8343);class d{constructor(...C){this._entries=new Map;for(const[w,S]of C)this.set(w,S)}set(C,w){const S=this._entries.get(C);return this._entries.set(C,w),S}forEach(C){for(const[w,S]of this._entries.entries())C(w,S)}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,g.getServiceDependencies)(p).sort((o,s)=>o.index-s.index),S=[];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}.`);S.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,...S)}}},7866:function(y,n,u){var f=this&&this.__decorate||function(c,o,s,a){var _,m=arguments.length,E=m<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,s):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,o,s,a);else for(var b=c.length-1;b>=0;b--)(_=c[b])&&(E=(m<3?_(E):m>3?_(o,s,E):_(o,s))||E);return m>3&&E&&Object.defineProperty(o,s,E),E},g=this&&this.__param||function(c,o){return function(s,a){o(s,a,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,S=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,a;this._logLevel<=p.LogLevelEnum.TRACE&&this._log((a=(s=this._optionsService.options.logger)===null||s===void 0?void 0:s.trace.bind(this._optionsService.options.logger))!==null&&a!==void 0?a:console.log,c,o)}debug(c,...o){var s,a;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log((a=(s=this._optionsService.options.logger)===null||s===void 0?void 0:s.debug.bind(this._optionsService.options.logger))!==null&&a!==void 0?a:console.log,c,o)}info(c,...o){var s,a;this._logLevel<=p.LogLevelEnum.INFO&&this._log((a=(s=this._optionsService.options.logger)===null||s===void 0?void 0:s.info.bind(this._optionsService.options.logger))!==null&&a!==void 0?a:console.info,c,o)}warn(c,...o){var s,a;this._logLevel<=p.LogLevelEnum.WARN&&this._log((a=(s=this._optionsService.options.logger)===null||s===void 0?void 0:s.warn.bind(this._optionsService.options.logger))!==null&&a!==void 0?a:console.warn,c,o)}error(c,...o){var s,a;this._logLevel<=p.LogLevelEnum.ERROR&&this._log((a=(s=this._optionsService.options.logger)===null||s===void 0?void 0:s.error.bind(this._optionsService.options.logger))!==null&&a!==void 0?a:console.error,c,o)}};n.LogService=S=f([g(0,p.IOptionsService)],S),n.setTraceLogger=function(c){w=c},n.traceCall=function(c,o,s){if(typeof s.value!="function")throw new Error("not supported");const a=s.value;s.value=function(..._){if(w.logLevel!==p.LogLevelEnum.TRACE)return a.apply(this,_);w.trace(`GlyphRenderer#${a.name}(${_.map(E=>JSON.stringify(E)).join(", ")})`);const m=a.apply(this,_);return w.trace(`GlyphRenderer#${a.name} return`,m),m}}},7302:(y,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=void 0;const f=u(8460),g=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 g.Disposable{constructor(S){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const c=Object.assign({},n.DEFAULT_OPTIONS);for(const o in S)if(o in c)try{const s=S[o];c[o]=this._sanitizeAndValidateOption(o,s)}catch(s){console.error(s)}this.rawOptions=c,this.options=Object.assign({},c),this._setupOptions()}onSpecificOptionChange(S,c){return this.onOptionChange(o=>{o===S&&c(this.rawOptions[S])})}onMultipleOptionChange(S,c){return this.onOptionChange(o=>{S.indexOf(o)!==-1&&c()})}_setupOptions(){const S=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:S.bind(this,o),set:c.bind(this,o)};Object.defineProperty(this.options,o,s)}}_sanitizeAndValidateOption(S,c){switch(S){case"cursorStyle":if(c||(c=n.DEFAULT_OPTIONS[S]),!function(o){return o==="block"||o==="underline"||o==="bar"}(c))throw new Error(`"${c}" is not a valid value for ${S}`);break;case"wordSeparator":c||(c=n.DEFAULT_OPTIONS[S]);break;case"fontWeight":case"fontWeightBold":if(typeof c=="number"&&1<=c&&c<=1e3)break;c=p.includes(c)?c:n.DEFAULT_OPTIONS[S];break;case"cursorWidth":c=Math.floor(c);case"lineHeight":case"tabStopWidth":if(c<1)throw new Error(`${S} 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(`${S} cannot be less than 0, value: ${c}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(c<=0)throw new Error(`${S} cannot be less than or equal to 0, value: ${c}`);break;case"rows":case"cols":if(!c&&c!==0)throw new Error(`${S} 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,S,c){var o,s=arguments.length,a=s<3?w:c===null?c=Object.getOwnPropertyDescriptor(w,S):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(C,w,S,c);else for(var _=C.length-1;_>=0;_--)(o=C[_])&&(a=(s<3?o(a):s>3?o(w,S,a):o(w,S))||a);return s>3&&a&&Object.defineProperty(w,S,a),a},g=this&&this.__param||function(C,w){return function(S,c){w(S,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),m={data:C,id:this._nextId++,lines:[_]};return _.onDispose(()=>this._removeMarkerFromLink(m,_)),this._dataByLinkId.set(m.id,m),m.id}const S=C,c=this._getEntryIdKey(S),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),a={id:this._nextId++,key:this._getEntryIdKey(S),data:S,lines:[s]};return s.onDispose(()=>this._removeMarkerFromLink(a,s)),this._entriesWithId.set(a.key,a),this._dataByLinkId.set(a.id,a),a.id}addLineToLink(C,w){const S=this._dataByLinkId.get(C);if(S&&S.lines.every(c=>c.line!==w)){const c=this._bufferService.buffer.addMarker(w);S.lines.push(c),c.onDispose(()=>this._removeMarkerFromLink(S,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 S=C.lines.indexOf(w);S!==-1&&(C.lines.splice(S,1),C.lines.length===0&&(C.data.id!==void 0&&this._entriesWithId.delete(C.key),this._dataByLinkId.delete(C.id)))}};n.OscLinkService=p=f([g(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(g){return g[f]||[]},n.createDecorator=function(g){if(n.serviceRegistry.has(g))return n.serviceRegistry.get(g);const d=function(p,C,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(S,c,o){c[u]===c?c[f].push({id:S,index:o}):(c[f]=[{id:S,index:o}],c[u]=c)})(d,p,w)};return d.toString=()=>g,n.serviceRegistry.set(g,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 g;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"}(g||(n.LogLevelEnum=g={})),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),g=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 g.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 S=d.charCodeAt(w);if(55296<=S&&S<=56319){if(++w>=C)return p+this.wcwidth(S);const c=d.charCodeAt(w);56320<=c&&c<=57343?S=1024*(S-55296)+c-56320+65536:p+=this.wcwidth(c)}p+=this.wcwidth(S)}return p}}}},i={};function l(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,l),u.exports}var h={};return(()=>{var y=h;Object.defineProperty(y,"__esModule",{value:!0}),y.Terminal=void 0;const n=l(9042),u=l(3236),f=l(844),g=l(5741),d=l(8285),p=l(7975),C=l(7090),w=["cols","rows"];class S extends f.Disposable{constructor(o){super(),this._core=this.register(new u.Terminal(o)),this._addonManager=this.register(new g.AddonManager),this._publicOptions=Object.assign({},this._core.options);const s=_=>this._core.options[_],a=(_,m)=>{this._checkReadonlyOptions(_),this._core.options[_]=m};for(const _ in this._core.options){const m={get:s.bind(this,_),set:a.bind(this,_)};Object.defineProperty(this._publicOptions,_,m)}}_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,a,_;return this._checkProposedApi(),this._verifyPositiveIntegers((s=o.x)!==null&&s!==void 0?s:0,(a=o.width)!==null&&a!==void 0?a:0,(_=o.height)!==null&&_!==void 0?_:0),this._core.registerDecoration(o)}hasSelection(){return this._core.hasSelection()}select(o,s,a){this._verifyIntegers(o,s,a),this._core.select(o,s,a)}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=S})(),h})())})(k_);var b_={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(l){this._terminal=l}dispose(){}fit(){const l=this.proposeDimensions();if(!l||!this._terminal||isNaN(l.cols)||isNaN(l.rows))return;const h=this._terminal._core;this._terminal.rows===l.rows&&this._terminal.cols===l.cols||(h._renderService.clear(),this._terminal.resize(l.cols,l.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const l=this._terminal._core,h=l._renderService.dimensions;if(h.css.cell.width===0||h.css.cell.height===0)return;const y=this._terminal.options.scrollback===0?0:l.viewport.scrollBarWidth,n=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(n.getPropertyValue("height")),f=Math.max(0,parseInt(n.getPropertyValue("width"))),g=window.getComputedStyle(this._terminal.element),d=u-(parseInt(g.getPropertyValue("padding-top"))+parseInt(g.getPropertyValue("padding-bottom"))),p=f-(parseInt(g.getPropertyValue("padding-right"))+parseInt(g.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})())})(b_);const x_=e=>{const{open:t,sel:r,setSel:i}=et();be.useEffect(()=>{const l=h=>{if(!(h.ctrlKey||h.metaKey||h.altKey)){if(t){if(h.key==="Escape"){e.onCloseSpotlight();return}if(h.key==="ArrowDown"){h.preventDefault(),i(Math.min(r+1,et.getState().results.length-1));return}if(h.key==="ArrowUp"){h.preventDefault(),i(Math.max(0,r-1));return}if(h.key==="PageDown"){h.preventDefault(),i(Math.min(r+10,et.getState().results.length-1));return}if(h.key==="PageUp"){h.preventDefault(),i(Math.max(0,r-10));return}if(h.key==="Home"){h.preventDefault(),i(0);return}if(h.key==="End"){h.preventDefault(),i(et.getState().results.length-1);return}if(h.key==="Enter"){e.onSelect();return}}if(!t)switch(h.key){case"k":e.onNavigateUp();break;case"j":e.onNavigateDown();break;case"h":e.onNavigateLeft();break;case"l":e.onNavigateRight();break}}};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[t,r,e,i])};function L_(){const{zoom:e}=wi(),{setQuery:t,setFilter:r,setSel:i,close:l}=et();be.useEffect(()=>{const y=n=>{const{query:u}=n.detail;t(u),r(null),i(0),et.getState().setOpen(!0)};return window.addEventListener("spotlight-trigger",y),()=>window.removeEventListener("spotlight-trigger",y)},[t,r,i]),x_({onOpenSpotlight:()=>{t(""),r(null),i(0),l()},onCloseSpotlight:()=>l(),onNavigateUp:()=>{},onNavigateDown:()=>{},onNavigateLeft:()=>{},onNavigateRight:()=>{},onSelect:()=>{}});const h={position:"fixed",inset:0,background:"#0b0e13",overflow:"hidden"};return $.jsxs("div",{style:h,children:[$.jsx(E_,{}),$.jsx(S_,{}),$.jsx(g_,{}),$.jsx(v_,{}),$.jsx(m_,{}),$.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:$.jsxs("span",{style:{color:"#aaa",fontSize:"12px"},children:[Math.round(e*100),"%"]})}),$.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:[$.jsx("span",{children:"Space + drag to pan"}),$.jsx("span",{style:{marginLeft:"12px"},children:"Scroll to pan"}),$.jsx("span",{style:{marginLeft:"12px"},children:"Type to spotlight"})]})]})}let Aa="";const R_=e=>{const{open:t}=et.getState();if(e.ctrlKey||e.metaKey||e.altKey||t)return;if(e.key.length===1&&e.key.match(/[a-zA-Z0-9]/)){Aa=e.key;const i=new CustomEvent("spotlight-trigger",{detail:{query:Aa}});window.dispatchEvent(i)}};window.addEventListener("keydown",R_);Dn.createRoot(document.getElementById("root")).render($.jsx(Wa.StrictMode,{children:$.jsx(L_,{})}));
|