agent-workbench 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,286 @@
1
+ var LR=Object.defineProperty;var MR=(w,b,O)=>b in w?LR(w,b,{enumerable:!0,configurable:!0,writable:!0,value:O}):w[b]=O;var qi=(w,b,O)=>MR(w,typeof b!="symbol"?b+"":b,O);(function(){const b=document.createElement("link").relList;if(b&&b.supports&&b.supports("modulepreload"))return;for(const U of document.querySelectorAll('link[rel="modulepreload"]'))F(U);new MutationObserver(U=>{for(const J of U)if(J.type==="childList")for(const R of J.addedNodes)R.tagName==="LINK"&&R.rel==="modulepreload"&&F(R)}).observe(document,{childList:!0,subtree:!0});function O(U){const J={};return U.integrity&&(J.integrity=U.integrity),U.referrerPolicy&&(J.referrerPolicy=U.referrerPolicy),U.crossOrigin==="use-credentials"?J.credentials="include":U.crossOrigin==="anonymous"?J.credentials="omit":J.credentials="same-origin",J}function F(U){if(U.ep)return;U.ep=!0;const J=O(U);fetch(U.href,J)}})();var xv={exports:{}},ah={},wv={exports:{}},Yl={exports:{}};Yl.exports;var a0;function OR(){return a0||(a0=1,(function(w,b){/**
2
+ * @license React
3
+ * react.development.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var O="18.3.1",F=Symbol.for("react.element"),U=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),p=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),o=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),s=Symbol.iterator,u="@@iterator";function l(j){if(j===null||typeof j!="object")return null;var te=s&&j[s]||j[u];return typeof te=="function"?te:null}var c={current:null},g={transition:null},x={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},S={current:null},N={},y=null;function D(j){y=j}N.setExtraStackFrame=function(j){y=j},N.getCurrentStack=null,N.getStackAddendum=function(){var j="";y&&(j+=y);var te=N.getCurrentStack;return te&&(j+=te()||""),j};var k=!1,I=!1,L=!1,B=!1,V=!1,X={ReactCurrentDispatcher:c,ReactCurrentBatchConfig:g,ReactCurrentOwner:S};X.ReactDebugCurrentFrame=N,X.ReactCurrentActQueue=x;function ee(j){{for(var te=arguments.length,fe=new Array(te>1?te-1:0),me=1;me<te;me++)fe[me-1]=arguments[me];ie("warn",j,fe)}}function Z(j){{for(var te=arguments.length,fe=new Array(te>1?te-1:0),me=1;me<te;me++)fe[me-1]=arguments[me];ie("error",j,fe)}}function ie(j,te,fe){{var me=X.ReactDebugCurrentFrame,Ne=me.getStackAddendum();Ne!==""&&(te+="%s",fe=fe.concat([Ne]));var Xe=fe.map(function(Ve){return String(Ve)});Xe.unshift("Warning: "+te),Function.prototype.apply.call(console[j],console,Xe)}}var P={};function H(j,te){{var fe=j.constructor,me=fe&&(fe.displayName||fe.name)||"ReactClass",Ne=me+"."+te;if(P[Ne])return;Z("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",te,me),P[Ne]=!0}}var q={isMounted:function(j){return!1},enqueueForceUpdate:function(j,te,fe){H(j,"forceUpdate")},enqueueReplaceState:function(j,te,fe,me){H(j,"replaceState")},enqueueSetState:function(j,te,fe,me){H(j,"setState")}},Y=Object.assign,re={};Object.freeze(re);function ae(j,te,fe){this.props=j,this.context=te,this.refs=re,this.updater=fe||q}ae.prototype.isReactComponent={},ae.prototype.setState=function(j,te){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,te,"setState")},ae.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};{var ve={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},ye=function(j,te){Object.defineProperty(ae.prototype,j,{get:function(){ee("%s(...) is deprecated in plain JavaScript React classes. %s",te[0],te[1])}})};for(var Q in ve)ve.hasOwnProperty(Q)&&ye(Q,ve[Q])}function $(){}$.prototype=ae.prototype;function he(j,te,fe){this.props=j,this.context=te,this.refs=re,this.updater=fe||q}var ce=he.prototype=new $;ce.constructor=he,Y(ce,ae.prototype),ce.isPureReactComponent=!0;function De(){var j={current:null};return Object.seal(j),j}var Ee=Array.isArray;function He(j){return Ee(j)}function Fe(j){{var te=typeof Symbol=="function"&&Symbol.toStringTag,fe=te&&j[Symbol.toStringTag]||j.constructor.name||"Object";return fe}}function Ge(j){try{return at(j),!1}catch{return!0}}function at(j){return""+j}function Me(j){if(Ge(j))return Z("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Fe(j)),at(j)}function tr(j,te,fe){var me=j.displayName;if(me)return me;var Ne=te.displayName||te.name||"";return Ne!==""?fe+"("+Ne+")":fe}function nr(j){return j.displayName||"Context"}function Qe(j){if(j==null)return null;if(typeof j.tag=="number"&&Z("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof j=="function")return j.displayName||j.name||null;if(typeof j=="string")return j;switch(j){case J:return"Fragment";case U:return"Portal";case a:return"Profiler";case R:return"StrictMode";case o:return"Suspense";case v:return"SuspenseList"}if(typeof j=="object")switch(j.$$typeof){case p:var te=j;return nr(te)+".Consumer";case h:var fe=j;return nr(fe._context)+".Provider";case m:return tr(j,j.render,"ForwardRef");case _:var me=j.displayName||null;return me!==null?me:Qe(j.type)||"Memo";case E:{var Ne=j,Xe=Ne._payload,Ve=Ne._init;try{return Qe(Ve(Xe))}catch{return null}}}return null}var Ue=Object.prototype.hasOwnProperty,We={key:!0,ref:!0,__self:!0,__source:!0},Ae,ot,ct;ct={};function ut(j){if(Ue.call(j,"ref")){var te=Object.getOwnPropertyDescriptor(j,"ref").get;if(te&&te.isReactWarning)return!1}return j.ref!==void 0}function jt(j){if(Ue.call(j,"key")){var te=Object.getOwnPropertyDescriptor(j,"key").get;if(te&&te.isReactWarning)return!1}return j.key!==void 0}function Ht(j,te){var fe=function(){Ae||(Ae=!0,Z("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",te))};fe.isReactWarning=!0,Object.defineProperty(j,"key",{get:fe,configurable:!0})}function Kt(j,te){var fe=function(){ot||(ot=!0,Z("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",te))};fe.isReactWarning=!0,Object.defineProperty(j,"ref",{get:fe,configurable:!0})}function Ce(j){if(typeof j.ref=="string"&&S.current&&j.__self&&S.current.stateNode!==j.__self){var te=Qe(S.current.type);ct[te]||(Z('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',te,j.ref),ct[te]=!0)}}var ke=function(j,te,fe,me,Ne,Xe,Ve){var nt={$$typeof:F,type:j,key:te,ref:fe,props:Ve,_owner:Xe};return nt._store={},Object.defineProperty(nt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(nt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:me}),Object.defineProperty(nt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ne}),Object.freeze&&(Object.freeze(nt.props),Object.freeze(nt)),nt};function Re(j,te,fe){var me,Ne={},Xe=null,Ve=null,nt=null,yt=null;if(te!=null){ut(te)&&(Ve=te.ref,Ce(te)),jt(te)&&(Me(te.key),Xe=""+te.key),nt=te.__self===void 0?null:te.__self,yt=te.__source===void 0?null:te.__source;for(me in te)Ue.call(te,me)&&!We.hasOwnProperty(me)&&(Ne[me]=te[me])}var Mt=arguments.length-2;if(Mt===1)Ne.children=fe;else if(Mt>1){for(var $t=Array(Mt),zt=0;zt<Mt;zt++)$t[zt]=arguments[zt+2];Object.freeze&&Object.freeze($t),Ne.children=$t}if(j&&j.defaultProps){var gt=j.defaultProps;for(me in gt)Ne[me]===void 0&&(Ne[me]=gt[me])}if(Xe||Ve){var Jt=typeof j=="function"?j.displayName||j.name||"Unknown":j;Xe&&Ht(Ne,Jt),Ve&&Kt(Ne,Jt)}return ke(j,Xe,Ve,nt,yt,S.current,Ne)}function mt(j,te){var fe=ke(j.type,te,j.ref,j._self,j._source,j._owner,j.props);return fe}function Dt(j,te,fe){if(j==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var me,Ne=Y({},j.props),Xe=j.key,Ve=j.ref,nt=j._self,yt=j._source,Mt=j._owner;if(te!=null){ut(te)&&(Ve=te.ref,Mt=S.current),jt(te)&&(Me(te.key),Xe=""+te.key);var $t;j.type&&j.type.defaultProps&&($t=j.type.defaultProps);for(me in te)Ue.call(te,me)&&!We.hasOwnProperty(me)&&(te[me]===void 0&&$t!==void 0?Ne[me]=$t[me]:Ne[me]=te[me])}var zt=arguments.length-2;if(zt===1)Ne.children=fe;else if(zt>1){for(var gt=Array(zt),Jt=0;Jt<zt;Jt++)gt[Jt]=arguments[Jt+2];Ne.children=gt}return ke(j.type,Xe,Ve,nt,yt,Mt,Ne)}function Tt(j){return typeof j=="object"&&j!==null&&j.$$typeof===F}var It=".",Zt=":";function Ut(j){var te=/[=:]/g,fe={"=":"=0",":":"=2"},me=j.replace(te,function(Ne){return fe[Ne]});return"$"+me}var Lt=!1,Ft=/\/+/g;function sr(j){return j.replace(Ft,"$&/")}function Ir(j,te){return typeof j=="object"&&j!==null&&j.key!=null?(Me(j.key),Ut(""+j.key)):te.toString(36)}function Nr(j,te,fe,me,Ne){var Xe=typeof j;(Xe==="undefined"||Xe==="boolean")&&(j=null);var Ve=!1;if(j===null)Ve=!0;else switch(Xe){case"string":case"number":Ve=!0;break;case"object":switch(j.$$typeof){case F:case U:Ve=!0}}if(Ve){var nt=j,yt=Ne(nt),Mt=me===""?It+Ir(nt,0):me;if(He(yt)){var $t="";Mt!=null&&($t=sr(Mt)+"/"),Nr(yt,te,$t,"",function(Sh){return Sh})}else yt!=null&&(Tt(yt)&&(yt.key&&(!nt||nt.key!==yt.key)&&Me(yt.key),yt=mt(yt,fe+(yt.key&&(!nt||nt.key!==yt.key)?sr(""+yt.key)+"/":"")+Mt)),te.push(yt));return 1}var zt,gt,Jt=0,or=me===""?It:me+Zt;if(He(j))for(var Es=0;Es<j.length;Es++)zt=j[Es],gt=or+Ir(zt,Es),Jt+=Nr(zt,te,fe,gt,Ne);else{var go=l(j);if(typeof go=="function"){var mn=j;go===mn.entries&&(Lt||ee("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Lt=!0);for(var _o=go.call(mn),bo,yh=0;!(bo=_o.next()).done;)zt=bo.value,gt=or+Ir(zt,yh++),Jt+=Nr(zt,te,fe,gt,Ne)}else if(Xe==="object"){var oc=String(j);throw new Error("Objects are not valid as a React child (found: "+(oc==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":oc)+"). If you meant to render a collection of children, use an array instead.")}}return Jt}function ki(j,te,fe){if(j==null)return j;var me=[],Ne=0;return Nr(j,me,"","",function(Xe){return te.call(fe,Xe,Ne++)}),me}function vs(j){var te=0;return ki(j,function(){te++}),te}function fn(j,te,fe){ki(j,function(){te.apply(this,arguments)},fe)}function jn(j){return ki(j,function(te){return te})||[]}function Vn(j){if(!Tt(j))throw new Error("React.Children.only expected to receive a single React element child.");return j}function Ri(j){var te={$$typeof:p,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};te.Provider={$$typeof:h,_context:te};var fe=!1,me=!1,Ne=!1;{var Xe={$$typeof:p,_context:te};Object.defineProperties(Xe,{Provider:{get:function(){return me||(me=!0,Z("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),te.Provider},set:function(Ve){te.Provider=Ve}},_currentValue:{get:function(){return te._currentValue},set:function(Ve){te._currentValue=Ve}},_currentValue2:{get:function(){return te._currentValue2},set:function(Ve){te._currentValue2=Ve}},_threadCount:{get:function(){return te._threadCount},set:function(Ve){te._threadCount=Ve}},Consumer:{get:function(){return fe||(fe=!0,Z("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),te.Consumer}},displayName:{get:function(){return te.displayName},set:function(Ve){Ne||(ee("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",Ve),Ne=!0)}}}),te.Consumer=Xe}return te._currentRenderer=null,te._currentRenderer2=null,te}var ri=-1,Fr=0,jr=1,bi=2;function Ki(j){if(j._status===ri){var te=j._result,fe=te();if(fe.then(function(Xe){if(j._status===Fr||j._status===ri){var Ve=j;Ve._status=jr,Ve._result=Xe}},function(Xe){if(j._status===Fr||j._status===ri){var Ve=j;Ve._status=bi,Ve._result=Xe}}),j._status===ri){var me=j;me._status=Fr,me._result=fe}}if(j._status===jr){var Ne=j._result;return Ne===void 0&&Z(`lazy: Expected the result of a dynamic import() call. Instead received: %s
10
+
11
+ Your code should look like:
12
+ const MyComponent = lazy(() => import('./MyComponent'))
13
+
14
+ Did you accidentally put curly braces around the import?`,Ne),"default"in Ne||Z(`lazy: Expected the result of a dynamic import() call. Instead received: %s
15
+
16
+ Your code should look like:
17
+ const MyComponent = lazy(() => import('./MyComponent'))`,Ne),Ne.default}else throw j._result}function W(j){var te={_status:ri,_result:j},fe={$$typeof:E,_payload:te,_init:Ki};{var me,Ne;Object.defineProperties(fe,{defaultProps:{configurable:!0,get:function(){return me},set:function(Xe){Z("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),me=Xe,Object.defineProperty(fe,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return Ne},set:function(Xe){Z("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Ne=Xe,Object.defineProperty(fe,"propTypes",{enumerable:!0})}}})}return fe}function ue(j){j!=null&&j.$$typeof===_?Z("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof j!="function"?Z("forwardRef requires a render function but was given %s.",j===null?"null":typeof j):j.length!==0&&j.length!==2&&Z("forwardRef render functions accept exactly two parameters: props and ref. %s",j.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),j!=null&&(j.defaultProps!=null||j.propTypes!=null)&&Z("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var te={$$typeof:m,render:j};{var fe;Object.defineProperty(te,"displayName",{enumerable:!1,configurable:!0,get:function(){return fe},set:function(me){fe=me,!j.name&&!j.displayName&&(j.displayName=me)}})}return te}var xe;xe=Symbol.for("react.module.reference");function ze(j){return!!(typeof j=="string"||typeof j=="function"||j===J||j===a||V||j===R||j===o||j===v||B||j===d||k||I||L||typeof j=="object"&&j!==null&&(j.$$typeof===E||j.$$typeof===_||j.$$typeof===h||j.$$typeof===p||j.$$typeof===m||j.$$typeof===xe||j.getModuleId!==void 0))}function ft(j,te){ze(j)||Z("memo: The first argument must be a component. Instead received: %s",j===null?"null":typeof j);var fe={$$typeof:_,type:j,compare:te===void 0?null:te};{var me;Object.defineProperty(fe,"displayName",{enumerable:!1,configurable:!0,get:function(){return me},set:function(Ne){me=Ne,!j.name&&!j.displayName&&(j.displayName=Ne)}})}return fe}function tt(){var j=c.current;return j===null&&Z(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
18
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
19
+ 2. You might be breaking the Rules of Hooks
20
+ 3. You might have more than one copy of React in the same app
21
+ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),j}function ht(j){var te=tt();if(j._context!==void 0){var fe=j._context;fe.Consumer===j?Z("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):fe.Provider===j&&Z("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return te.useContext(j)}function Ye(j){var te=tt();return te.useState(j)}function dr(j,te,fe){var me=tt();return me.useReducer(j,te,fe)}function qt(j){var te=tt();return te.useRef(j)}function Gt(j,te){var fe=tt();return fe.useEffect(j,te)}function Vr(j,te){var fe=tt();return fe.useInsertionEffect(j,te)}function Xi(j,te){var fe=tt();return fe.useLayoutEffect(j,te)}function Ai(j,te){var fe=tt();return fe.useCallback(j,te)}function fr(j,te){var fe=tt();return fe.useMemo(j,te)}function ms(j,te,fe){var me=tt();return me.useImperativeHandle(j,te,fe)}function Ti(j,te){{var fe=tt();return fe.useDebugValue(j,te)}}function pt(){var j=tt();return j.useTransition()}function gs(j){var te=tt();return te.useDeferredValue(j)}function Xl(){var j=tt();return j.useId()}function Jl(j,te,fe){var me=tt();return me.useSyncExternalStore(j,te,fe)}var Hn=0,ro,io,no,so,ao,Ql,Zl;function ea(){}ea.__reactDisabledLog=!0;function oo(){{if(Hn===0){ro=console.log,io=console.info,no=console.warn,so=console.error,ao=console.group,Ql=console.groupCollapsed,Zl=console.groupEnd;var j={configurable:!0,enumerable:!0,value:ea,writable:!0};Object.defineProperties(console,{info:j,log:j,warn:j,error:j,group:j,groupCollapsed:j,groupEnd:j})}Hn++}}function Ji(){{if(Hn--,Hn===0){var j={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},j,{value:ro}),info:Y({},j,{value:io}),warn:Y({},j,{value:no}),error:Y({},j,{value:so}),group:Y({},j,{value:ao}),groupCollapsed:Y({},j,{value:Ql}),groupEnd:Y({},j,{value:Zl})})}Hn<0&&Z("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var _s=X.ReactCurrentDispatcher,Un;function ta(j,te,fe){{if(Un===void 0)try{throw Error()}catch(Ne){var me=Ne.stack.trim().match(/\n( *(at )?)/);Un=me&&me[1]||""}return`
22
+ `+Un+j}}var bs=!1,ra;{var lo=typeof WeakMap=="function"?WeakMap:Map;ra=new lo}function ec(j,te){if(!j||bs)return"";{var fe=ra.get(j);if(fe!==void 0)return fe}var me;bs=!0;var Ne=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Xe;Xe=_s.current,_s.current=null,oo();try{if(te){var Ve=function(){throw Error()};if(Object.defineProperty(Ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ve,[])}catch(or){me=or}Reflect.construct(j,[],Ve)}else{try{Ve.call()}catch(or){me=or}j.call(Ve.prototype)}}else{try{throw Error()}catch(or){me=or}j()}}catch(or){if(or&&me&&typeof or.stack=="string"){for(var nt=or.stack.split(`
23
+ `),yt=me.stack.split(`
24
+ `),Mt=nt.length-1,$t=yt.length-1;Mt>=1&&$t>=0&&nt[Mt]!==yt[$t];)$t--;for(;Mt>=1&&$t>=0;Mt--,$t--)if(nt[Mt]!==yt[$t]){if(Mt!==1||$t!==1)do if(Mt--,$t--,$t<0||nt[Mt]!==yt[$t]){var zt=`
25
+ `+nt[Mt].replace(" at new "," at ");return j.displayName&&zt.includes("<anonymous>")&&(zt=zt.replace("<anonymous>",j.displayName)),typeof j=="function"&&ra.set(j,zt),zt}while(Mt>=1&&$t>=0);break}}}finally{bs=!1,_s.current=Xe,Ji(),Error.prepareStackTrace=Ne}var gt=j?j.displayName||j.name:"",Jt=gt?ta(gt):"";return typeof j=="function"&&ra.set(j,Jt),Jt}function co(j,te,fe){return ec(j,!1)}function vh(j){var te=j.prototype;return!!(te&&te.isReactComponent)}function ys(j,te,fe){if(j==null)return"";if(typeof j=="function")return ec(j,vh(j));if(typeof j=="string")return ta(j);switch(j){case o:return ta("Suspense");case v:return ta("SuspenseList")}if(typeof j=="object")switch(j.$$typeof){case m:return co(j.render);case _:return ys(j.type,te,fe);case E:{var me=j,Ne=me._payload,Xe=me._init;try{return ys(Xe(Ne),te,fe)}catch{}}}return""}var tc={},uo=X.ReactDebugCurrentFrame;function Nt(j){if(j){var te=j._owner,fe=ys(j.type,j._source,te?te.type:null);uo.setExtraStackFrame(fe)}else uo.setExtraStackFrame(null)}function mh(j,te,fe,me,Ne){{var Xe=Function.call.bind(Ue);for(var Ve in j)if(Xe(j,Ve)){var nt=void 0;try{if(typeof j[Ve]!="function"){var yt=Error((me||"React class")+": "+fe+" type `"+Ve+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof j[Ve]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw yt.name="Invariant Violation",yt}nt=j[Ve](te,Ve,me,fe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Mt){nt=Mt}nt&&!(nt instanceof Error)&&(Nt(Ne),Z("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",me||"React class",fe,Ve,typeof nt),Nt(null)),nt instanceof Error&&!(nt.message in tc)&&(tc[nt.message]=!0,Nt(Ne),Z("Failed %s type: %s",fe,nt.message),Nt(null))}}}function pn(j){if(j){var te=j._owner,fe=ys(j.type,j._source,te?te.type:null);D(fe)}else D(null)}var lt;lt=!1;function ho(){if(S.current){var j=Qe(S.current.type);if(j)return`
26
+
27
+ Check the render method of \``+j+"`."}return""}function Gr(j){if(j!==void 0){var te=j.fileName.replace(/^.*[\\\/]/,""),fe=j.lineNumber;return`
28
+
29
+ Check your code at `+te+":"+fe+"."}return""}function Ss(j){return j!=null?Gr(j.__source):""}var $n={};function gh(j){var te=ho();if(!te){var fe=typeof j=="string"?j:j.displayName||j.name;fe&&(te=`
30
+
31
+ Check the top-level render call using <`+fe+">.")}return te}function Cr(j,te){if(!(!j._store||j._store.validated||j.key!=null)){j._store.validated=!0;var fe=gh(te);if(!$n[fe]){$n[fe]=!0;var me="";j&&j._owner&&j._owner!==S.current&&(me=" It was passed a child from "+Qe(j._owner.type)+"."),pn(j),Z('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',fe,me),pn(null)}}}function Xt(j,te){if(typeof j=="object"){if(He(j))for(var fe=0;fe<j.length;fe++){var me=j[fe];Tt(me)&&Cr(me,te)}else if(Tt(j))j._store&&(j._store.validated=!0);else if(j){var Ne=l(j);if(typeof Ne=="function"&&Ne!==j.entries)for(var Xe=Ne.call(j),Ve;!(Ve=Xe.next()).done;)Tt(Ve.value)&&Cr(Ve.value,te)}}}function rc(j){{var te=j.type;if(te==null||typeof te=="string")return;var fe;if(typeof te=="function")fe=te.propTypes;else if(typeof te=="object"&&(te.$$typeof===m||te.$$typeof===_))fe=te.propTypes;else return;if(fe){var me=Qe(te);mh(fe,j.props,"prop",me,j)}else if(te.PropTypes!==void 0&&!lt){lt=!0;var Ne=Qe(te);Z("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ne||"Unknown")}typeof te.getDefaultProps=="function"&&!te.getDefaultProps.isReactClassApproved&&Z("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function yi(j){{for(var te=Object.keys(j.props),fe=0;fe<te.length;fe++){var me=te[fe];if(me!=="children"&&me!=="key"){pn(j),Z("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",me),pn(null);break}}j.ref!==null&&(pn(j),Z("Invalid attribute `ref` supplied to `React.Fragment`."),pn(null))}}function Yr(j,te,fe){var me=ze(j);if(!me){var Ne="";(j===void 0||typeof j=="object"&&j!==null&&Object.keys(j).length===0)&&(Ne+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Xe=Ss(te);Xe?Ne+=Xe:Ne+=ho();var Ve;j===null?Ve="null":He(j)?Ve="array":j!==void 0&&j.$$typeof===F?(Ve="<"+(Qe(j.type)||"Unknown")+" />",Ne=" Did you accidentally export a JSX literal instead of a component?"):Ve=typeof j,Z("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ve,Ne)}var nt=Re.apply(this,arguments);if(nt==null)return nt;if(me)for(var yt=2;yt<arguments.length;yt++)Xt(arguments[yt],j);return j===J?yi(nt):rc(nt),nt}var Li=!1;function _h(j){var te=Yr.bind(null,j);return te.type=j,Li||(Li=!0,ee("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(te,"type",{enumerable:!1,get:function(){return ee("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:j}),j}}),te}function fo(j,te,fe){for(var me=Dt.apply(this,arguments),Ne=2;Ne<arguments.length;Ne++)Xt(arguments[Ne],me.type);return rc(me),me}function ic(j,te){var fe=g.transition;g.transition={};var me=g.transition;g.transition._updatedFibers=new Set;try{j()}finally{if(g.transition=fe,fe===null&&me._updatedFibers){var Ne=me._updatedFibers.size;Ne>10&&ee("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),me._updatedFibers.clear()}}}var po=!1,ia=null;function bh(j){if(ia===null)try{var te=("require"+Math.random()).slice(0,7),fe=w&&w[te];ia=fe.call(w,"timers").setImmediate}catch{ia=function(Ne){po===!1&&(po=!0,typeof MessageChannel>"u"&&Z("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var Xe=new MessageChannel;Xe.port1.onmessage=Ne,Xe.port2.postMessage(void 0)}}return ia(j)}var zn=0,Cs=!1;function vo(j){{var te=zn;zn++,x.current===null&&(x.current=[]);var fe=x.isBatchingLegacy,me;try{if(x.isBatchingLegacy=!0,me=j(),!fe&&x.didScheduleLegacyUpdate){var Ne=x.current;Ne!==null&&(x.didScheduleLegacyUpdate=!1,aa(Ne))}}catch(gt){throw vn(te),gt}finally{x.isBatchingLegacy=fe}if(me!==null&&typeof me=="object"&&typeof me.then=="function"){var Xe=me,Ve=!1,nt={then:function(gt,Jt){Ve=!0,Xe.then(function(or){vn(te),zn===0?na(or,gt,Jt):gt(or)},function(or){vn(te),Jt(or)})}};return!Cs&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){Ve||(Cs=!0,Z("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),nt}else{var yt=me;if(vn(te),zn===0){var Mt=x.current;Mt!==null&&(aa(Mt),x.current=null);var $t={then:function(gt,Jt){x.current===null?(x.current=[],na(yt,gt,Jt)):gt(yt)}};return $t}else{var zt={then:function(gt,Jt){gt(yt)}};return zt}}}}function vn(j){j!==zn-1&&Z("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),zn=j}function na(j,te,fe){{var me=x.current;if(me!==null)try{aa(me),bh(function(){me.length===0?(x.current=null,te(j)):na(j,te,fe)})}catch(Ne){fe(Ne)}else te(j)}}var sa=!1;function aa(j){if(!sa){sa=!0;var te=0;try{for(;te<j.length;te++){var fe=j[te];do fe=fe(!0);while(fe!==null)}j.length=0}catch(me){throw j=j.slice(te+1),me}finally{sa=!1}}}var nc=Yr,sc=fo,mo=_h,ac={map:ki,forEach:fn,count:vs,toArray:jn,only:Vn};b.Children=ac,b.Component=ae,b.Fragment=J,b.Profiler=a,b.PureComponent=he,b.StrictMode=R,b.Suspense=o,b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=X,b.act=vo,b.cloneElement=sc,b.createContext=Ri,b.createElement=nc,b.createFactory=mo,b.createRef=De,b.forwardRef=ue,b.isValidElement=Tt,b.lazy=W,b.memo=ft,b.startTransition=ic,b.unstable_act=vo,b.useCallback=Ai,b.useContext=ht,b.useDebugValue=Ti,b.useDeferredValue=gs,b.useEffect=Gt,b.useId=Xl,b.useImperativeHandle=ms,b.useInsertionEffect=Vr,b.useLayoutEffect=Xi,b.useMemo=fr,b.useReducer=dr,b.useRef=qt,b.useState=Ye,b.useSyncExternalStore=Jl,b.useTransition=pt,b.version=O,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(Yl,Yl.exports)),Yl.exports}var o0;function Xv(){return o0||(o0=1,wv.exports=OR()),wv.exports}var l0;function BR(){if(l0)return ah;l0=1;/**
32
+ * @license React
33
+ * react-jsx-dev-runtime.development.js
34
+ *
35
+ * Copyright (c) Facebook, Inc. and its affiliates.
36
+ *
37
+ * This source code is licensed under the MIT license found in the
38
+ * LICENSE file in the root directory of this source tree.
39
+ */return(function(){var w=Xv(),b=Symbol.for("react.element"),O=Symbol.for("react.portal"),F=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),a=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),o=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),E=Symbol.iterator,d="@@iterator";function s(W){if(W===null||typeof W!="object")return null;var ue=E&&W[E]||W[d];return typeof ue=="function"?ue:null}var u=w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function l(W){{for(var ue=arguments.length,xe=new Array(ue>1?ue-1:0),ze=1;ze<ue;ze++)xe[ze-1]=arguments[ze];c("error",W,xe)}}function c(W,ue,xe){{var ze=u.ReactDebugCurrentFrame,ft=ze.getStackAddendum();ft!==""&&(ue+="%s",xe=xe.concat([ft]));var tt=xe.map(function(ht){return String(ht)});tt.unshift("Warning: "+ue),Function.prototype.apply.call(console[W],console,tt)}}var g=!1,x=!1,S=!1,N=!1,y=!1,D;D=Symbol.for("react.module.reference");function k(W){return!!(typeof W=="string"||typeof W=="function"||W===F||W===J||y||W===U||W===p||W===m||N||W===_||g||x||S||typeof W=="object"&&W!==null&&(W.$$typeof===v||W.$$typeof===o||W.$$typeof===R||W.$$typeof===a||W.$$typeof===h||W.$$typeof===D||W.getModuleId!==void 0))}function I(W,ue,xe){var ze=W.displayName;if(ze)return ze;var ft=ue.displayName||ue.name||"";return ft!==""?xe+"("+ft+")":xe}function L(W){return W.displayName||"Context"}function B(W){if(W==null)return null;if(typeof W.tag=="number"&&l("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof W=="function")return W.displayName||W.name||null;if(typeof W=="string")return W;switch(W){case F:return"Fragment";case O:return"Portal";case J:return"Profiler";case U:return"StrictMode";case p:return"Suspense";case m:return"SuspenseList"}if(typeof W=="object")switch(W.$$typeof){case a:var ue=W;return L(ue)+".Consumer";case R:var xe=W;return L(xe._context)+".Provider";case h:return I(W,W.render,"ForwardRef");case o:var ze=W.displayName||null;return ze!==null?ze:B(W.type)||"Memo";case v:{var ft=W,tt=ft._payload,ht=ft._init;try{return B(ht(tt))}catch{return null}}}return null}var V=Object.assign,X=0,ee,Z,ie,P,H,q,Y;function re(){}re.__reactDisabledLog=!0;function ae(){{if(X===0){ee=console.log,Z=console.info,ie=console.warn,P=console.error,H=console.group,q=console.groupCollapsed,Y=console.groupEnd;var W={configurable:!0,enumerable:!0,value:re,writable:!0};Object.defineProperties(console,{info:W,log:W,warn:W,error:W,group:W,groupCollapsed:W,groupEnd:W})}X++}}function ve(){{if(X--,X===0){var W={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},W,{value:ee}),info:V({},W,{value:Z}),warn:V({},W,{value:ie}),error:V({},W,{value:P}),group:V({},W,{value:H}),groupCollapsed:V({},W,{value:q}),groupEnd:V({},W,{value:Y})})}X<0&&l("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ye=u.ReactCurrentDispatcher,Q;function $(W,ue,xe){{if(Q===void 0)try{throw Error()}catch(ft){var ze=ft.stack.trim().match(/\n( *(at )?)/);Q=ze&&ze[1]||""}return`
40
+ `+Q+W}}var he=!1,ce;{var De=typeof WeakMap=="function"?WeakMap:Map;ce=new De}function Ee(W,ue){if(!W||he)return"";{var xe=ce.get(W);if(xe!==void 0)return xe}var ze;he=!0;var ft=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var tt;tt=ye.current,ye.current=null,ae();try{if(ue){var ht=function(){throw Error()};if(Object.defineProperty(ht.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ht,[])}catch(fr){ze=fr}Reflect.construct(W,[],ht)}else{try{ht.call()}catch(fr){ze=fr}W.call(ht.prototype)}}else{try{throw Error()}catch(fr){ze=fr}W()}}catch(fr){if(fr&&ze&&typeof fr.stack=="string"){for(var Ye=fr.stack.split(`
41
+ `),dr=ze.stack.split(`
42
+ `),qt=Ye.length-1,Gt=dr.length-1;qt>=1&&Gt>=0&&Ye[qt]!==dr[Gt];)Gt--;for(;qt>=1&&Gt>=0;qt--,Gt--)if(Ye[qt]!==dr[Gt]){if(qt!==1||Gt!==1)do if(qt--,Gt--,Gt<0||Ye[qt]!==dr[Gt]){var Vr=`
43
+ `+Ye[qt].replace(" at new "," at ");return W.displayName&&Vr.includes("<anonymous>")&&(Vr=Vr.replace("<anonymous>",W.displayName)),typeof W=="function"&&ce.set(W,Vr),Vr}while(qt>=1&&Gt>=0);break}}}finally{he=!1,ye.current=tt,ve(),Error.prepareStackTrace=ft}var Xi=W?W.displayName||W.name:"",Ai=Xi?$(Xi):"";return typeof W=="function"&&ce.set(W,Ai),Ai}function He(W,ue,xe){return Ee(W,!1)}function Fe(W){var ue=W.prototype;return!!(ue&&ue.isReactComponent)}function Ge(W,ue,xe){if(W==null)return"";if(typeof W=="function")return Ee(W,Fe(W));if(typeof W=="string")return $(W);switch(W){case p:return $("Suspense");case m:return $("SuspenseList")}if(typeof W=="object")switch(W.$$typeof){case h:return He(W.render);case o:return Ge(W.type,ue,xe);case v:{var ze=W,ft=ze._payload,tt=ze._init;try{return Ge(tt(ft),ue,xe)}catch{}}}return""}var at=Object.prototype.hasOwnProperty,Me={},tr=u.ReactDebugCurrentFrame;function nr(W){if(W){var ue=W._owner,xe=Ge(W.type,W._source,ue?ue.type:null);tr.setExtraStackFrame(xe)}else tr.setExtraStackFrame(null)}function Qe(W,ue,xe,ze,ft){{var tt=Function.call.bind(at);for(var ht in W)if(tt(W,ht)){var Ye=void 0;try{if(typeof W[ht]!="function"){var dr=Error((ze||"React class")+": "+xe+" type `"+ht+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof W[ht]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw dr.name="Invariant Violation",dr}Ye=W[ht](ue,ht,ze,xe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(qt){Ye=qt}Ye&&!(Ye instanceof Error)&&(nr(ft),l("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ze||"React class",xe,ht,typeof Ye),nr(null)),Ye instanceof Error&&!(Ye.message in Me)&&(Me[Ye.message]=!0,nr(ft),l("Failed %s type: %s",xe,Ye.message),nr(null))}}}var Ue=Array.isArray;function We(W){return Ue(W)}function Ae(W){{var ue=typeof Symbol=="function"&&Symbol.toStringTag,xe=ue&&W[Symbol.toStringTag]||W.constructor.name||"Object";return xe}}function ot(W){try{return ct(W),!1}catch{return!0}}function ct(W){return""+W}function ut(W){if(ot(W))return l("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ae(W)),ct(W)}var jt=u.ReactCurrentOwner,Ht={key:!0,ref:!0,__self:!0,__source:!0},Kt,Ce,ke;ke={};function Re(W){if(at.call(W,"ref")){var ue=Object.getOwnPropertyDescriptor(W,"ref").get;if(ue&&ue.isReactWarning)return!1}return W.ref!==void 0}function mt(W){if(at.call(W,"key")){var ue=Object.getOwnPropertyDescriptor(W,"key").get;if(ue&&ue.isReactWarning)return!1}return W.key!==void 0}function Dt(W,ue){if(typeof W.ref=="string"&&jt.current&&ue&&jt.current.stateNode!==ue){var xe=B(jt.current.type);ke[xe]||(l('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',B(jt.current.type),W.ref),ke[xe]=!0)}}function Tt(W,ue){{var xe=function(){Kt||(Kt=!0,l("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ue))};xe.isReactWarning=!0,Object.defineProperty(W,"key",{get:xe,configurable:!0})}}function It(W,ue){{var xe=function(){Ce||(Ce=!0,l("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ue))};xe.isReactWarning=!0,Object.defineProperty(W,"ref",{get:xe,configurable:!0})}}var Zt=function(W,ue,xe,ze,ft,tt,ht){var Ye={$$typeof:b,type:W,key:ue,ref:xe,props:ht,_owner:tt};return Ye._store={},Object.defineProperty(Ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ze}),Object.defineProperty(Ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ft}),Object.freeze&&(Object.freeze(Ye.props),Object.freeze(Ye)),Ye};function Ut(W,ue,xe,ze,ft){{var tt,ht={},Ye=null,dr=null;xe!==void 0&&(ut(xe),Ye=""+xe),mt(ue)&&(ut(ue.key),Ye=""+ue.key),Re(ue)&&(dr=ue.ref,Dt(ue,ft));for(tt in ue)at.call(ue,tt)&&!Ht.hasOwnProperty(tt)&&(ht[tt]=ue[tt]);if(W&&W.defaultProps){var qt=W.defaultProps;for(tt in qt)ht[tt]===void 0&&(ht[tt]=qt[tt])}if(Ye||dr){var Gt=typeof W=="function"?W.displayName||W.name||"Unknown":W;Ye&&Tt(ht,Gt),dr&&It(ht,Gt)}return Zt(W,Ye,dr,ft,ze,jt.current,ht)}}var Lt=u.ReactCurrentOwner,Ft=u.ReactDebugCurrentFrame;function sr(W){if(W){var ue=W._owner,xe=Ge(W.type,W._source,ue?ue.type:null);Ft.setExtraStackFrame(xe)}else Ft.setExtraStackFrame(null)}var Ir;Ir=!1;function Nr(W){return typeof W=="object"&&W!==null&&W.$$typeof===b}function ki(){{if(Lt.current){var W=B(Lt.current.type);if(W)return`
44
+
45
+ Check the render method of \``+W+"`."}return""}}function vs(W){{if(W!==void 0){var ue=W.fileName.replace(/^.*[\\\/]/,""),xe=W.lineNumber;return`
46
+
47
+ Check your code at `+ue+":"+xe+"."}return""}}var fn={};function jn(W){{var ue=ki();if(!ue){var xe=typeof W=="string"?W:W.displayName||W.name;xe&&(ue=`
48
+
49
+ Check the top-level render call using <`+xe+">.")}return ue}}function Vn(W,ue){{if(!W._store||W._store.validated||W.key!=null)return;W._store.validated=!0;var xe=jn(ue);if(fn[xe])return;fn[xe]=!0;var ze="";W&&W._owner&&W._owner!==Lt.current&&(ze=" It was passed a child from "+B(W._owner.type)+"."),sr(W),l('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',xe,ze),sr(null)}}function Ri(W,ue){{if(typeof W!="object")return;if(We(W))for(var xe=0;xe<W.length;xe++){var ze=W[xe];Nr(ze)&&Vn(ze,ue)}else if(Nr(W))W._store&&(W._store.validated=!0);else if(W){var ft=s(W);if(typeof ft=="function"&&ft!==W.entries)for(var tt=ft.call(W),ht;!(ht=tt.next()).done;)Nr(ht.value)&&Vn(ht.value,ue)}}}function ri(W){{var ue=W.type;if(ue==null||typeof ue=="string")return;var xe;if(typeof ue=="function")xe=ue.propTypes;else if(typeof ue=="object"&&(ue.$$typeof===h||ue.$$typeof===o))xe=ue.propTypes;else return;if(xe){var ze=B(ue);Qe(xe,W.props,"prop",ze,W)}else if(ue.PropTypes!==void 0&&!Ir){Ir=!0;var ft=B(ue);l("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ft||"Unknown")}typeof ue.getDefaultProps=="function"&&!ue.getDefaultProps.isReactClassApproved&&l("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Fr(W){{for(var ue=Object.keys(W.props),xe=0;xe<ue.length;xe++){var ze=ue[xe];if(ze!=="children"&&ze!=="key"){sr(W),l("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ze),sr(null);break}}W.ref!==null&&(sr(W),l("Invalid attribute `ref` supplied to `React.Fragment`."),sr(null))}}var jr={};function bi(W,ue,xe,ze,ft,tt){{var ht=k(W);if(!ht){var Ye="";(W===void 0||typeof W=="object"&&W!==null&&Object.keys(W).length===0)&&(Ye+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var dr=vs(ft);dr?Ye+=dr:Ye+=ki();var qt;W===null?qt="null":We(W)?qt="array":W!==void 0&&W.$$typeof===b?(qt="<"+(B(W.type)||"Unknown")+" />",Ye=" Did you accidentally export a JSX literal instead of a component?"):qt=typeof W,l("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",qt,Ye)}var Gt=Ut(W,ue,xe,ft,tt);if(Gt==null)return Gt;if(ht){var Vr=ue.children;if(Vr!==void 0)if(ze)if(We(Vr)){for(var Xi=0;Xi<Vr.length;Xi++)Ri(Vr[Xi],W);Object.freeze&&Object.freeze(Vr)}else l("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ri(Vr,W)}if(at.call(ue,"key")){var Ai=B(W),fr=Object.keys(ue).filter(function(pt){return pt!=="key"}),ms=fr.length>0?"{key: someKey, "+fr.join(": ..., ")+": ...}":"{key: someKey}";if(!jr[Ai+ms]){var Ti=fr.length>0?"{"+fr.join(": ..., ")+": ...}":"{}";l(`A props object containing a "key" prop is being spread into JSX:
50
+ let props = %s;
51
+ <%s {...props} />
52
+ React keys must be passed directly to JSX without using spread:
53
+ let props = %s;
54
+ <%s key={someKey} {...props} />`,ms,Ai,Ti,Ai),jr[Ai+ms]=!0}}return W===F?Fr(Gt):ri(Gt),Gt}}var Ki=bi;ah.Fragment=F,ah.jsxDEV=Ki})(),ah}var c0;function PR(){return c0||(c0=1,xv.exports=BR()),xv.exports}var T=PR(),oh={},Dv={exports:{}},ci={},Nv={exports:{}},kv={},u0;function IR(){return u0||(u0=1,(function(w){/**
55
+ * @license React
56
+ * scheduler.development.js
57
+ *
58
+ * Copyright (c) Facebook, Inc. and its affiliates.
59
+ *
60
+ * This source code is licensed under the MIT license found in the
61
+ * LICENSE file in the root directory of this source tree.
62
+ */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var b=!1,O=5;function F(Ce,ke){var Re=Ce.length;Ce.push(ke),R(Ce,ke,Re)}function U(Ce){return Ce.length===0?null:Ce[0]}function J(Ce){if(Ce.length===0)return null;var ke=Ce[0],Re=Ce.pop();return Re!==ke&&(Ce[0]=Re,a(Ce,Re,0)),ke}function R(Ce,ke,Re){for(var mt=Re;mt>0;){var Dt=mt-1>>>1,Tt=Ce[Dt];if(h(Tt,ke)>0)Ce[Dt]=ke,Ce[mt]=Tt,mt=Dt;else return}}function a(Ce,ke,Re){for(var mt=Re,Dt=Ce.length,Tt=Dt>>>1;mt<Tt;){var It=(mt+1)*2-1,Zt=Ce[It],Ut=It+1,Lt=Ce[Ut];if(h(Zt,ke)<0)Ut<Dt&&h(Lt,Zt)<0?(Ce[mt]=Lt,Ce[Ut]=ke,mt=Ut):(Ce[mt]=Zt,Ce[It]=ke,mt=It);else if(Ut<Dt&&h(Lt,ke)<0)Ce[mt]=Lt,Ce[Ut]=ke,mt=Ut;else return}}function h(Ce,ke){var Re=Ce.sortIndex-ke.sortIndex;return Re!==0?Re:Ce.id-ke.id}var p=1,m=2,o=3,v=4,_=5;function E(Ce,ke){}var d=typeof performance=="object"&&typeof performance.now=="function";if(d){var s=performance;w.unstable_now=function(){return s.now()}}else{var u=Date,l=u.now();w.unstable_now=function(){return u.now()-l}}var c=1073741823,g=-1,x=250,S=5e3,N=1e4,y=c,D=[],k=[],I=1,L=null,B=o,V=!1,X=!1,ee=!1,Z=typeof setTimeout=="function"?setTimeout:null,ie=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function H(Ce){for(var ke=U(k);ke!==null;){if(ke.callback===null)J(k);else if(ke.startTime<=Ce)J(k),ke.sortIndex=ke.expirationTime,F(D,ke);else return;ke=U(k)}}function q(Ce){if(ee=!1,H(Ce),!X)if(U(D)!==null)X=!0,ct(Y);else{var ke=U(k);ke!==null&&ut(q,ke.startTime-Ce)}}function Y(Ce,ke){X=!1,ee&&(ee=!1,jt()),V=!0;var Re=B;try{var mt;if(!b)return re(Ce,ke)}finally{L=null,B=Re,V=!1}}function re(Ce,ke){var Re=ke;for(H(Re),L=U(D);L!==null&&!(L.expirationTime>Re&&(!Ce||tr()));){var mt=L.callback;if(typeof mt=="function"){L.callback=null,B=L.priorityLevel;var Dt=L.expirationTime<=Re,Tt=mt(Dt);Re=w.unstable_now(),typeof Tt=="function"?L.callback=Tt:L===U(D)&&J(D),H(Re)}else J(D);L=U(D)}if(L!==null)return!0;var It=U(k);return It!==null&&ut(q,It.startTime-Re),!1}function ae(Ce,ke){switch(Ce){case p:case m:case o:case v:case _:break;default:Ce=o}var Re=B;B=Ce;try{return ke()}finally{B=Re}}function ve(Ce){var ke;switch(B){case p:case m:case o:ke=o;break;default:ke=B;break}var Re=B;B=ke;try{return Ce()}finally{B=Re}}function ye(Ce){var ke=B;return function(){var Re=B;B=ke;try{return Ce.apply(this,arguments)}finally{B=Re}}}function Q(Ce,ke,Re){var mt=w.unstable_now(),Dt;if(typeof Re=="object"&&Re!==null){var Tt=Re.delay;typeof Tt=="number"&&Tt>0?Dt=mt+Tt:Dt=mt}else Dt=mt;var It;switch(Ce){case p:It=g;break;case m:It=x;break;case _:It=y;break;case v:It=N;break;case o:default:It=S;break}var Zt=Dt+It,Ut={id:I++,callback:ke,priorityLevel:Ce,startTime:Dt,expirationTime:Zt,sortIndex:-1};return Dt>mt?(Ut.sortIndex=Dt,F(k,Ut),U(D)===null&&Ut===U(k)&&(ee?jt():ee=!0,ut(q,Dt-mt))):(Ut.sortIndex=Zt,F(D,Ut),!X&&!V&&(X=!0,ct(Y))),Ut}function $(){}function he(){!X&&!V&&(X=!0,ct(Y))}function ce(){return U(D)}function De(Ce){Ce.callback=null}function Ee(){return B}var He=!1,Fe=null,Ge=-1,at=O,Me=-1;function tr(){var Ce=w.unstable_now()-Me;return!(Ce<at)}function nr(){}function Qe(Ce){if(Ce<0||Ce>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}Ce>0?at=Math.floor(1e3/Ce):at=O}var Ue=function(){if(Fe!==null){var Ce=w.unstable_now();Me=Ce;var ke=!0,Re=!0;try{Re=Fe(ke,Ce)}finally{Re?We():(He=!1,Fe=null)}}else He=!1},We;if(typeof P=="function")We=function(){P(Ue)};else if(typeof MessageChannel<"u"){var Ae=new MessageChannel,ot=Ae.port2;Ae.port1.onmessage=Ue,We=function(){ot.postMessage(null)}}else We=function(){Z(Ue,0)};function ct(Ce){Fe=Ce,He||(He=!0,We())}function ut(Ce,ke){Ge=Z(function(){Ce(w.unstable_now())},ke)}function jt(){ie(Ge),Ge=-1}var Ht=nr,Kt=null;w.unstable_IdlePriority=_,w.unstable_ImmediatePriority=p,w.unstable_LowPriority=v,w.unstable_NormalPriority=o,w.unstable_Profiling=Kt,w.unstable_UserBlockingPriority=m,w.unstable_cancelCallback=De,w.unstable_continueExecution=he,w.unstable_forceFrameRate=Qe,w.unstable_getCurrentPriorityLevel=Ee,w.unstable_getFirstCallbackNode=ce,w.unstable_next=ve,w.unstable_pauseExecution=$,w.unstable_requestPaint=Ht,w.unstable_runWithPriority=ae,w.unstable_scheduleCallback=Q,w.unstable_shouldYield=tr,w.unstable_wrapCallback=ye,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(kv)),kv}var h0;function FR(){return h0||(h0=1,Nv.exports=IR()),Nv.exports}var d0;function jR(){if(d0)return ci;d0=1;/**
63
+ * @license React
64
+ * react-dom.development.js
65
+ *
66
+ * Copyright (c) Facebook, Inc. and its affiliates.
67
+ *
68
+ * This source code is licensed under the MIT license found in the
69
+ * LICENSE file in the root directory of this source tree.
70
+ */return(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var w=Xv(),b=FR(),O=w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,F=!1;function U(e){F=e}function J(e){if(!F){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];a("warn",e,r)}}function R(e){if(!F){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];a("error",e,r)}}function a(e,t,r){{var i=O.ReactDebugCurrentFrame,n=i.getStackAddendum();n!==""&&(t+="%s",r=r.concat([n]));var f=r.map(function(C){return String(C)});f.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,f)}}var h=0,p=1,m=2,o=3,v=4,_=5,E=6,d=7,s=8,u=9,l=10,c=11,g=12,x=13,S=14,N=15,y=16,D=17,k=18,I=19,L=21,B=22,V=23,X=24,ee=25,Z=!0,ie=!1,P=!1,H=!1,q=!1,Y=!0,re=!0,ae=!0,ve=!0,ye=new Set,Q={},$={};function he(e,t){ce(e,t),ce(e+"Capture",t)}function ce(e,t){Q[e]&&R("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),Q[e]=t;{var r=e.toLowerCase();$[r]=e,e==="onDoubleClick"&&($.ondblclick=e)}for(var i=0;i<t.length;i++)ye.add(t[i])}var De=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ee=Object.prototype.hasOwnProperty;function He(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function Fe(e){try{return Ge(e),!1}catch{return!0}}function Ge(e){return""+e}function at(e,t){if(Fe(e))return R("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",t,He(e)),Ge(e)}function Me(e){if(Fe(e))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",He(e)),Ge(e)}function tr(e,t){if(Fe(e))return R("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",t,He(e)),Ge(e)}function nr(e,t){if(Fe(e))return R("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",t,He(e)),Ge(e)}function Qe(e){if(Fe(e))return R("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",He(e)),Ge(e)}function Ue(e){if(Fe(e))return R("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.",He(e)),Ge(e)}var We=0,Ae=1,ot=2,ct=3,ut=4,jt=5,Ht=6,Kt=":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",Ce=Kt+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ke=new RegExp("^["+Kt+"]["+Ce+"]*$"),Re={},mt={};function Dt(e){return Ee.call(mt,e)?!0:Ee.call(Re,e)?!1:ke.test(e)?(mt[e]=!0,!0):(Re[e]=!0,R("Invalid attribute name: `%s`",e),!1)}function Tt(e,t,r){return t!==null?t.type===We:r?!1:e.length>2&&(e[0]==="o"||e[0]==="O")&&(e[1]==="n"||e[1]==="N")}function It(e,t,r,i){if(r!==null&&r.type===We)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":{if(i)return!1;if(r!==null)return!r.acceptsBooleans;var n=e.toLowerCase().slice(0,5);return n!=="data-"&&n!=="aria-"}default:return!1}}function Zt(e,t,r,i){if(t===null||typeof t>"u"||It(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case ct:return!t;case ut:return t===!1;case jt:return isNaN(t);case Ht:return isNaN(t)||t<1}return!1}function Ut(e){return Ft.hasOwnProperty(e)?Ft[e]:null}function Lt(e,t,r,i,n,f,C){this.acceptsBooleans=t===ot||t===ct||t===ut,this.attributeName=i,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=f,this.removeEmptyString=C}var Ft={},sr=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];sr.forEach(function(e){Ft[e]=new Lt(e,We,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0],r=e[1];Ft[t]=new Lt(t,Ae,!1,r,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ft[e]=new Lt(e,ot,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ft[e]=new Lt(e,ot,!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"].forEach(function(e){Ft[e]=new Lt(e,ct,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Ft[e]=new Lt(e,ct,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Ft[e]=new Lt(e,ut,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Ft[e]=new Lt(e,Ht,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Ft[e]=new Lt(e,jt,!1,e.toLowerCase(),null,!1,!1)});var Ir=/[\-\:]([a-z])/g,Nr=function(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"].forEach(function(e){var t=e.replace(Ir,Nr);Ft[t]=new Lt(t,Ae,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(Ir,Nr);Ft[t]=new Lt(t,Ae,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ir,Nr);Ft[t]=new Lt(t,Ae,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Ft[e]=new Lt(e,Ae,!1,e.toLowerCase(),null,!1,!1)});var ki="xlinkHref";Ft[ki]=new Lt("xlinkHref",Ae,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Ft[e]=new Lt(e,Ae,!1,e.toLowerCase(),null,!0,!0)});var vs=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,fn=!1;function jn(e){!fn&&vs.test(e)&&(fn=!0,R("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(e)))}function Vn(e,t,r,i){if(i.mustUseProperty){var n=i.propertyName;return e[n]}else{at(r,t),i.sanitizeURL&&jn(""+r);var f=i.attributeName,C=null;if(i.type===ut){if(e.hasAttribute(f)){var A=e.getAttribute(f);return A===""?!0:Zt(t,r,i,!1)?A:A===""+r?r:A}}else if(e.hasAttribute(f)){if(Zt(t,r,i,!1))return e.getAttribute(f);if(i.type===ct)return r;C=e.getAttribute(f)}return Zt(t,r,i,!1)?C===null?r:C:C===""+r?r:C}}function Ri(e,t,r,i){{if(!Dt(t))return;if(!e.hasAttribute(t))return r===void 0?void 0:null;var n=e.getAttribute(t);return at(r,t),n===""+r?r:n}}function ri(e,t,r,i){var n=Ut(t);if(!Tt(t,n,i)){if(Zt(t,r,n,i)&&(r=null),i||n===null){if(Dt(t)){var f=t;r===null?e.removeAttribute(f):(at(r,t),e.setAttribute(f,""+r))}return}var C=n.mustUseProperty;if(C){var A=n.propertyName;if(r===null){var M=n.type;e[A]=M===ct?!1:""}else e[A]=r;return}var z=n.attributeName,G=n.attributeNamespace;if(r===null)e.removeAttribute(z);else{var se=n.type,ne;se===ct||se===ut&&r===!0?ne="":(at(r,z),ne=""+r,n.sanitizeURL&&jn(ne.toString())),G?e.setAttributeNS(G,z,ne):e.setAttribute(z,ne)}}}var Fr=Symbol.for("react.element"),jr=Symbol.for("react.portal"),bi=Symbol.for("react.fragment"),Ki=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),ue=Symbol.for("react.provider"),xe=Symbol.for("react.context"),ze=Symbol.for("react.forward_ref"),ft=Symbol.for("react.suspense"),tt=Symbol.for("react.suspense_list"),ht=Symbol.for("react.memo"),Ye=Symbol.for("react.lazy"),dr=Symbol.for("react.scope"),qt=Symbol.for("react.debug_trace_mode"),Gt=Symbol.for("react.offscreen"),Vr=Symbol.for("react.legacy_hidden"),Xi=Symbol.for("react.cache"),Ai=Symbol.for("react.tracing_marker"),fr=Symbol.iterator,ms="@@iterator";function Ti(e){if(e===null||typeof e!="object")return null;var t=fr&&e[fr]||e[ms];return typeof t=="function"?t:null}var pt=Object.assign,gs=0,Xl,Jl,Hn,ro,io,no,so;function ao(){}ao.__reactDisabledLog=!0;function Ql(){{if(gs===0){Xl=console.log,Jl=console.info,Hn=console.warn,ro=console.error,io=console.group,no=console.groupCollapsed,so=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ao,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}gs++}}function Zl(){{if(gs--,gs===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:pt({},e,{value:Xl}),info:pt({},e,{value:Jl}),warn:pt({},e,{value:Hn}),error:pt({},e,{value:ro}),group:pt({},e,{value:io}),groupCollapsed:pt({},e,{value:no}),groupEnd:pt({},e,{value:so})})}gs<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ea=O.ReactCurrentDispatcher,oo;function Ji(e,t,r){{if(oo===void 0)try{throw Error()}catch(n){var i=n.stack.trim().match(/\n( *(at )?)/);oo=i&&i[1]||""}return`
71
+ `+oo+e}}var _s=!1,Un;{var ta=typeof WeakMap=="function"?WeakMap:Map;Un=new ta}function bs(e,t){if(!e||_s)return"";{var r=Un.get(e);if(r!==void 0)return r}var i;_s=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var f;f=ea.current,ea.current=null,Ql();try{if(t){var C=function(){throw Error()};if(Object.defineProperty(C.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(C,[])}catch(pe){i=pe}Reflect.construct(e,[],C)}else{try{C.call()}catch(pe){i=pe}e.call(C.prototype)}}else{try{throw Error()}catch(pe){i=pe}e()}}catch(pe){if(pe&&i&&typeof pe.stack=="string"){for(var A=pe.stack.split(`
72
+ `),M=i.stack.split(`
73
+ `),z=A.length-1,G=M.length-1;z>=1&&G>=0&&A[z]!==M[G];)G--;for(;z>=1&&G>=0;z--,G--)if(A[z]!==M[G]){if(z!==1||G!==1)do if(z--,G--,G<0||A[z]!==M[G]){var se=`
74
+ `+A[z].replace(" at new "," at ");return e.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",e.displayName)),typeof e=="function"&&Un.set(e,se),se}while(z>=1&&G>=0);break}}}finally{_s=!1,ea.current=f,Zl(),Error.prepareStackTrace=n}var ne=e?e.displayName||e.name:"",de=ne?Ji(ne):"";return typeof e=="function"&&Un.set(e,de),de}function ra(e,t,r){return bs(e,!0)}function lo(e,t,r){return bs(e,!1)}function ec(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function co(e,t,r){if(e==null)return"";if(typeof e=="function")return bs(e,ec(e));if(typeof e=="string")return Ji(e);switch(e){case ft:return Ji("Suspense");case tt:return Ji("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case ze:return lo(e.render);case ht:return co(e.type,t,r);case Ye:{var i=e,n=i._payload,f=i._init;try{return co(f(n),t,r)}catch{}}}return""}function vh(e){switch(e._debugOwner&&e._debugOwner.type,e._debugSource,e.tag){case _:return Ji(e.type);case y:return Ji("Lazy");case x:return Ji("Suspense");case I:return Ji("SuspenseList");case h:case m:case N:return lo(e.type);case c:return lo(e.type.render);case p:return ra(e.type);default:return""}}function ys(e){try{var t="",r=e;do t+=vh(r),r=r.return;while(r);return t}catch(i){return`
75
+ Error generating stack: `+i.message+`
76
+ `+i.stack}}function tc(e,t,r){var i=e.displayName;if(i)return i;var n=t.displayName||t.name||"";return n!==""?r+"("+n+")":r}function uo(e){return e.displayName||"Context"}function Nt(e){if(e==null)return null;if(typeof e.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case bi:return"Fragment";case jr:return"Portal";case W:return"Profiler";case Ki:return"StrictMode";case ft:return"Suspense";case tt:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xe:var t=e;return uo(t)+".Consumer";case ue:var r=e;return uo(r._context)+".Provider";case ze:return tc(e,e.render,"ForwardRef");case ht:var i=e.displayName||null;return i!==null?i:Nt(e.type)||"Memo";case Ye:{var n=e,f=n._payload,C=n._init;try{return Nt(C(f))}catch{return null}}}return null}function mh(e,t,r){var i=t.displayName||t.name||"";return e.displayName||(i!==""?r+"("+i+")":r)}function pn(e){return e.displayName||"Context"}function lt(e){var t=e.tag,r=e.type;switch(t){case X:return"Cache";case u:var i=r;return pn(i)+".Consumer";case l:var n=r;return pn(n._context)+".Provider";case k:return"DehydratedFragment";case c:return mh(r,r.render,"ForwardRef");case d:return"Fragment";case _:return r;case v:return"Portal";case o:return"Root";case E:return"Text";case y:return Nt(r);case s:return r===Ki?"StrictMode":"Mode";case B:return"Offscreen";case g:return"Profiler";case L:return"Scope";case x:return"Suspense";case I:return"SuspenseList";case ee:return"TracingMarker";case p:case h:case D:case m:case S:case N:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;break}return null}var ho=O.ReactDebugCurrentFrame,Gr=null,Ss=!1;function $n(){{if(Gr===null)return null;var e=Gr._debugOwner;if(e!==null&&typeof e<"u")return lt(e)}return null}function gh(){return Gr===null?"":ys(Gr)}function Cr(){ho.getCurrentStack=null,Gr=null,Ss=!1}function Xt(e){ho.getCurrentStack=e===null?null:gh,Gr=e,Ss=!1}function rc(){return Gr}function yi(e){Ss=e}function Yr(e){return""+e}function Li(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return Ue(e),e;default:return""}}var _h={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function fo(e,t){_h[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||R("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),t.onChange||t.readOnly||t.disabled||t.checked==null||R("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function ic(e){var t=e.type,r=e.nodeName;return r&&r.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function po(e){return e._valueTracker}function ia(e){e._valueTracker=null}function bh(e){var t="";return e&&(ic(e)?t=e.checked?"true":"false":t=e.value),t}function zn(e){var t=ic(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);Ue(e[t]);var i=""+e[t];if(!(e.hasOwnProperty(t)||typeof r>"u"||typeof r.get!="function"||typeof r.set!="function")){var n=r.get,f=r.set;Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(A){Ue(A),i=""+A,f.call(this,A)}}),Object.defineProperty(e,t,{enumerable:r.enumerable});var C={getValue:function(){return i},setValue:function(A){Ue(A),i=""+A},stopTracking:function(){ia(e),delete e[t]}};return C}}function Cs(e){po(e)||(e._valueTracker=zn(e))}function vo(e){if(!e)return!1;var t=po(e);if(!t)return!0;var r=t.getValue(),i=bh(e);return i!==r?(t.setValue(i),!0):!1}function vn(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var na=!1,sa=!1,aa=!1,nc=!1;function sc(e){var t=e.type==="checkbox"||e.type==="radio";return t?e.checked!=null:e.value!=null}function mo(e,t){var r=e,i=t.checked,n=pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??r._wrapperState.initialChecked});return n}function ac(e,t){fo("input",t),t.checked!==void 0&&t.defaultChecked!==void 0&&!sa&&(R("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",$n()||"A component",t.type),sa=!0),t.value!==void 0&&t.defaultValue!==void 0&&!na&&(R("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",$n()||"A component",t.type),na=!0);var r=e,i=t.defaultValue==null?"":t.defaultValue;r._wrapperState={initialChecked:t.checked!=null?t.checked:t.defaultChecked,initialValue:Li(t.value!=null?t.value:i),controlled:sc(t)}}function j(e,t){var r=e,i=t.checked;i!=null&&ri(r,"checked",i,!1)}function te(e,t){var r=e;{var i=sc(t);!r._wrapperState.controlled&&i&&!nc&&(R("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),nc=!0),r._wrapperState.controlled&&!i&&!aa&&(R("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),aa=!0)}j(e,t);var n=Li(t.value),f=t.type;if(n!=null)f==="number"?(n===0&&r.value===""||r.value!=n)&&(r.value=Yr(n)):r.value!==Yr(n)&&(r.value=Yr(n));else if(f==="submit"||f==="reset"){r.removeAttribute("value");return}t.hasOwnProperty("value")?Xe(r,t.type,n):t.hasOwnProperty("defaultValue")&&Xe(r,t.type,Li(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(r.defaultChecked=!!t.defaultChecked)}function fe(e,t,r){var i=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type,f=n==="submit"||n==="reset";if(f&&(t.value===void 0||t.value===null))return;var C=Yr(i._wrapperState.initialValue);r||C!==i.value&&(i.value=C),i.defaultValue=C}var A=i.name;A!==""&&(i.name=""),i.defaultChecked=!i.defaultChecked,i.defaultChecked=!!i._wrapperState.initialChecked,A!==""&&(i.name=A)}function me(e,t){var r=e;te(r,t),Ne(r,t)}function Ne(e,t){var r=t.name;if(t.type==="radio"&&r!=null){for(var i=e;i.parentNode;)i=i.parentNode;at(r,"name");for(var n=i.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),f=0;f<n.length;f++){var C=n[f];if(!(C===e||C.form!==e.form)){var A=qc(C);if(!A)throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");vo(C),te(C,A)}}}}function Xe(e,t,r){(t!=="number"||vn(e.ownerDocument)!==e)&&(r==null?e.defaultValue=Yr(e._wrapperState.initialValue):e.defaultValue!==Yr(r)&&(e.defaultValue=Yr(r)))}var Ve=!1,nt=!1,yt=!1;function Mt(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?w.Children.forEach(t.children,function(r){r!=null&&(typeof r=="string"||typeof r=="number"||nt||(nt=!0,R("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}):t.dangerouslySetInnerHTML!=null&&(yt||(yt=!0,R("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),t.selected!=null&&!Ve&&(R("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),Ve=!0)}function $t(e,t){t.value!=null&&e.setAttribute("value",Yr(Li(t.value)))}var zt=Array.isArray;function gt(e){return zt(e)}var Jt;Jt=!1;function or(){var e=$n();return e?`
77
+
78
+ Check the render method of \``+e+"`.":""}var Es=["value","defaultValue"];function go(e){{fo("select",e);for(var t=0;t<Es.length;t++){var r=Es[t];if(e[r]!=null){var i=gt(e[r]);e.multiple&&!i?R("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",r,or()):!e.multiple&&i&&R("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",r,or())}}}}function mn(e,t,r,i){var n=e.options;if(t){for(var f=r,C={},A=0;A<f.length;A++)C["$"+f[A]]=!0;for(var M=0;M<n.length;M++){var z=C.hasOwnProperty("$"+n[M].value);n[M].selected!==z&&(n[M].selected=z),z&&i&&(n[M].defaultSelected=!0)}}else{for(var G=Yr(Li(r)),se=null,ne=0;ne<n.length;ne++){if(n[ne].value===G){n[ne].selected=!0,i&&(n[ne].defaultSelected=!0);return}se===null&&!n[ne].disabled&&(se=n[ne])}se!==null&&(se.selected=!0)}}function _o(e,t){return pt({},t,{value:void 0})}function bo(e,t){var r=e;go(t),r._wrapperState={wasMultiple:!!t.multiple},t.value!==void 0&&t.defaultValue!==void 0&&!Jt&&(R("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),Jt=!0)}function yh(e,t){var r=e;r.multiple=!!t.multiple;var i=t.value;i!=null?mn(r,!!t.multiple,i,!1):t.defaultValue!=null&&mn(r,!!t.multiple,t.defaultValue,!0)}function oc(e,t){var r=e,i=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!t.multiple;var n=t.value;n!=null?mn(r,!!t.multiple,n,!1):i!==!!t.multiple&&(t.defaultValue!=null?mn(r,!!t.multiple,t.defaultValue,!0):mn(r,!!t.multiple,t.multiple?[]:"",!1))}function Sh(e,t){var r=e,i=t.value;i!=null&&mn(r,!!t.multiple,i,!1)}var Qv=!1;function Ch(e,t){var r=e;if(t.dangerouslySetInnerHTML!=null)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var i=pt({},t,{value:void 0,defaultValue:void 0,children:Yr(r._wrapperState.initialValue)});return i}function Zv(e,t){var r=e;fo("textarea",t),t.value!==void 0&&t.defaultValue!==void 0&&!Qv&&(R("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",$n()||"A component"),Qv=!0);var i=t.value;if(i==null){var n=t.children,f=t.defaultValue;if(n!=null){R("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(f!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(gt(n)){if(n.length>1)throw new Error("<textarea> can only have at most one child.");n=n[0]}f=n}}f==null&&(f=""),i=f}r._wrapperState={initialValue:Li(i)}}function em(e,t){var r=e,i=Li(t.value),n=Li(t.defaultValue);if(i!=null){var f=Yr(i);f!==r.value&&(r.value=f),t.defaultValue==null&&r.defaultValue!==f&&(r.defaultValue=f)}n!=null&&(r.defaultValue=Yr(n))}function tm(e,t){var r=e,i=r.textContent;i===r._wrapperState.initialValue&&i!==""&&i!==null&&(r.value=i)}function bS(e,t){em(e,t)}var gn="http://www.w3.org/1999/xhtml",yS="http://www.w3.org/1998/Math/MathML",Eh="http://www.w3.org/2000/svg";function xh(e){switch(e){case"svg":return Eh;case"math":return yS;default:return gn}}function wh(e,t){return e==null||e===gn?xh(t):e===Eh&&t==="foreignObject"?gn:e}var SS=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,n){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,n)})}:e},lc,rm=SS(function(e,t){if(e.namespaceURI===Eh&&!("innerHTML"in e)){lc=lc||document.createElement("div"),lc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";for(var r=lc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;r.firstChild;)e.appendChild(r.firstChild);return}e.innerHTML=t}),ii=1,_n=3,lr=8,bn=9,Dh=11,cc=function(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===_n){r.nodeValue=t;return}}e.textContent=t},CS={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},yo={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};function ES(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var xS=["Webkit","ms","Moz","O"];Object.keys(yo).forEach(function(e){xS.forEach(function(t){yo[ES(t,e)]=yo[e]})});function Nh(e,t,r){var i=t==null||typeof t=="boolean"||t==="";return i?"":!r&&typeof t=="number"&&t!==0&&!(yo.hasOwnProperty(e)&&yo[e])?t+"px":(nr(t,e),(""+t).trim())}var wS=/([A-Z])/g,DS=/^ms-/;function NS(e){return e.replace(wS,"-$1").toLowerCase().replace(DS,"-ms-")}var im=function(){};{var kS=/^(?:webkit|moz|o)[A-Z]/,RS=/^-ms-/,AS=/-(.)/g,nm=/;\s*$/,oa={},kh={},sm=!1,am=!1,TS=function(e){return e.replace(AS,function(t,r){return r.toUpperCase()})},LS=function(e){oa.hasOwnProperty(e)&&oa[e]||(oa[e]=!0,R("Unsupported style property %s. Did you mean %s?",e,TS(e.replace(RS,"ms-"))))},MS=function(e){oa.hasOwnProperty(e)&&oa[e]||(oa[e]=!0,R("Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))},OS=function(e,t){kh.hasOwnProperty(t)&&kh[t]||(kh[t]=!0,R(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,e,t.replace(nm,"")))},BS=function(e,t){sm||(sm=!0,R("`NaN` is an invalid value for the `%s` css style property.",e))},PS=function(e,t){am||(am=!0,R("`Infinity` is an invalid value for the `%s` css style property.",e))};im=function(e,t){e.indexOf("-")>-1?LS(e):kS.test(e)?MS(e):nm.test(t)&&OS(e,t),typeof t=="number"&&(isNaN(t)?BS(e,t):isFinite(t)||PS(e,t))}}var IS=im;function FS(e){{var t="",r="";for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(n!=null){var f=i.indexOf("--")===0;t+=r+(f?i:NS(i))+":",t+=Nh(i,n,f),r=";"}}return t||null}}function om(e,t){var r=e.style;for(var i in t)if(t.hasOwnProperty(i)){var n=i.indexOf("--")===0;n||IS(i,t[i]);var f=Nh(i,t[i],n);i==="float"&&(i="cssFloat"),n?r.setProperty(i,f):r[i]=f}}function jS(e){return e==null||typeof e=="boolean"||e===""}function lm(e){var t={};for(var r in e)for(var i=CS[r]||[r],n=0;n<i.length;n++)t[i[n]]=r;return t}function VS(e,t){{if(!t)return;var r=lm(e),i=lm(t),n={};for(var f in r){var C=r[f],A=i[f];if(A&&C!==A){var M=C+","+A;if(n[M])continue;n[M]=!0,R("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",jS(e[C])?"Removing":"Updating",C,A)}}}}var HS={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},US=pt({menuitem:!0},HS),$S="__html";function Rh(e,t){if(t){if(US[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw new Error(e+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof t.dangerouslySetInnerHTML!="object"||!($S in t.dangerouslySetInnerHTML))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!t.suppressContentEditableWarning&&t.contentEditable&&t.children!=null&&R("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),t.style!=null&&typeof t.style!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}}function xs(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 uc={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},cm={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},la={},zS=new RegExp("^(aria)-["+Ce+"]*$"),WS=new RegExp("^(aria)[A-Z]["+Ce+"]*$");function qS(e,t){{if(Ee.call(la,t)&&la[t])return!0;if(WS.test(t)){var r="aria-"+t.slice(4).toLowerCase(),i=cm.hasOwnProperty(r)?r:null;if(i==null)return R("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),la[t]=!0,!0;if(t!==i)return R("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,i),la[t]=!0,!0}if(zS.test(t)){var n=t.toLowerCase(),f=cm.hasOwnProperty(n)?n:null;if(f==null)return la[t]=!0,!1;if(t!==f)return R("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,f),la[t]=!0,!0}}return!0}function GS(e,t){{var r=[];for(var i in t){var n=qS(e,i);n||r.push(i)}var f=r.map(function(C){return"`"+C+"`"}).join(", ");r.length===1?R("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",f,e):r.length>1&&R("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",f,e)}}function YS(e,t){xs(e,t)||GS(e,t)}var um=!1;function KS(e,t){{if(e!=="input"&&e!=="textarea"&&e!=="select")return;t!=null&&t.value===null&&!um&&(um=!0,e==="select"&&t.multiple?R("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):R("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e))}}var hm=function(){};{var Kr={},dm=/^on./,XS=/^on[^A-Z]/,JS=new RegExp("^(aria)-["+Ce+"]*$"),QS=new RegExp("^(aria)[A-Z]["+Ce+"]*$");hm=function(e,t,r,i){if(Ee.call(Kr,t)&&Kr[t])return!0;var n=t.toLowerCase();if(n==="onfocusin"||n==="onfocusout")return R("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Kr[t]=!0,!0;if(i!=null){var f=i.registrationNameDependencies,C=i.possibleRegistrationNames;if(f.hasOwnProperty(t))return!0;var A=C.hasOwnProperty(n)?C[n]:null;if(A!=null)return R("Invalid event handler property `%s`. Did you mean `%s`?",t,A),Kr[t]=!0,!0;if(dm.test(t))return R("Unknown event handler property `%s`. It will be ignored.",t),Kr[t]=!0,!0}else if(dm.test(t))return XS.test(t)&&R("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),Kr[t]=!0,!0;if(JS.test(t)||QS.test(t))return!0;if(n==="innerhtml")return R("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Kr[t]=!0,!0;if(n==="aria")return R("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Kr[t]=!0,!0;if(n==="is"&&r!==null&&r!==void 0&&typeof r!="string")return R("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof r),Kr[t]=!0,!0;if(typeof r=="number"&&isNaN(r))return R("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),Kr[t]=!0,!0;var M=Ut(t),z=M!==null&&M.type===We;if(uc.hasOwnProperty(n)){var G=uc[n];if(G!==t)return R("Invalid DOM property `%s`. Did you mean `%s`?",t,G),Kr[t]=!0,!0}else if(!z&&t!==n)return R("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,n),Kr[t]=!0,!0;return typeof r=="boolean"&&It(t,r,M,!1)?(r?R('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',r,t,t,r,t):R('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',r,t,t,r,t,t,t),Kr[t]=!0,!0):z?!0:It(t,r,M,!1)?(Kr[t]=!0,!1):((r==="false"||r==="true")&&M!==null&&M.type===ct&&(R("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",r,t,r==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,r),Kr[t]=!0),!0)}}var ZS=function(e,t,r){{var i=[];for(var n in t){var f=hm(e,n,t[n],r);f||i.push(n)}var C=i.map(function(A){return"`"+A+"`"}).join(", ");i.length===1?R("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",C,e):i.length>1&&R("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",C,e)}};function eC(e,t,r){xs(e,t)||ZS(e,t,r)}var fm=1,Ah=2,So=4,tC=fm|Ah|So,Co=null;function rC(e){Co!==null&&R("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),Co=e}function iC(){Co===null&&R("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),Co=null}function nC(e){return e===Co}function Th(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===_n?t.parentNode:t}var Lh=null,ca=null,ua=null;function pm(e){var t=Zn(e);if(t){if(typeof Lh!="function")throw new Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var r=t.stateNode;if(r){var i=qc(r);Lh(t.stateNode,t.type,i)}}}function sC(e){Lh=e}function vm(e){ca?ua?ua.push(e):ua=[e]:ca=e}function aC(){return ca!==null||ua!==null}function mm(){if(ca){var e=ca,t=ua;if(ca=null,ua=null,pm(e),t)for(var r=0;r<t.length;r++)pm(t[r])}}var gm=function(e,t){return e(t)},_m=function(){},Mh=!1;function oC(){var e=aC();e&&(_m(),mm())}function bm(e,t,r){if(Mh)return e(t,r);Mh=!0;try{return gm(e,t,r)}finally{Mh=!1,oC()}}function lC(e,t,r){gm=e,_m=r}function cC(e){return e==="button"||e==="input"||e==="select"||e==="textarea"}function uC(e,t,r){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!!(r.disabled&&cC(t));default:return!1}}function Eo(e,t){var r=e.stateNode;if(r===null)return null;var i=qc(r);if(i===null)return null;var n=i[t];if(uC(t,e.type,i))return null;if(n&&typeof n!="function")throw new Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof n+"` type.");return n}var Oh=!1;if(De)try{var xo={};Object.defineProperty(xo,"passive",{get:function(){Oh=!0}}),window.addEventListener("test",xo,xo),window.removeEventListener("test",xo,xo)}catch{Oh=!1}function ym(e,t,r,i,n,f,C,A,M){var z=Array.prototype.slice.call(arguments,3);try{t.apply(r,z)}catch(G){this.onError(G)}}var Sm=ym;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var Bh=document.createElement("react");Sm=function(t,r,i,n,f,C,A,M,z){if(typeof document>"u"||document===null)throw new Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var G=document.createEvent("Event"),se=!1,ne=!0,de=window.event,pe=Object.getOwnPropertyDescriptor(window,"event");function ge(){Bh.removeEventListener(_e,qe,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=de)}var Le=Array.prototype.slice.call(arguments,3);function qe(){se=!0,ge(),r.apply(i,Le),ne=!1}var $e,Et=!1,_t=!1;function oe(le){if($e=le.error,Et=!0,$e===null&&le.colno===0&&le.lineno===0&&(_t=!0),le.defaultPrevented&&$e!=null&&typeof $e=="object")try{$e._suppressLogging=!0}catch{}}var _e="react-"+(t||"invokeguardedcallback");if(window.addEventListener("error",oe),Bh.addEventListener(_e,qe,!1),G.initEvent(_e,!1,!1),Bh.dispatchEvent(G),pe&&Object.defineProperty(window,"event",pe),se&&ne&&(Et?_t&&($e=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):$e=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError($e)),window.removeEventListener("error",oe),!se)return ge(),ym.apply(this,arguments)}}var hC=Sm,ha=!1,hc=null,dc=!1,Ph=null,dC={onError:function(e){ha=!0,hc=e}};function Ih(e,t,r,i,n,f,C,A,M){ha=!1,hc=null,hC.apply(dC,arguments)}function fC(e,t,r,i,n,f,C,A,M){if(Ih.apply(this,arguments),ha){var z=Fh();dc||(dc=!0,Ph=z)}}function pC(){if(dc){var e=Ph;throw dc=!1,Ph=null,e}}function vC(){return ha}function Fh(){if(ha){var e=hc;return ha=!1,hc=null,e}else throw new Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function da(e){return e._reactInternals}function mC(e){return e._reactInternals!==void 0}function gC(e,t){e._reactInternals=t}var Je=0,fa=1,cr=2,kt=4,ws=16,wo=32,Cm=64,Rt=128,yn=256,Ds=512,pa=1024,Wn=2048,Sn=4096,Ns=8192,jh=16384,_C=32767,fc=32768,Xr=65536,Vh=131072,Em=1048576,Hh=2097152,ks=4194304,Uh=8388608,qn=16777216,$h=33554432,zh=kt|pa|0,Wh=cr|kt|ws|wo|Ds|Sn|Ns,Do=kt|Cm|Ds|Ns,va=Wn|ws,Cn=ks|Uh|Hh,bC=O.ReactCurrentOwner;function Rs(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{var i=t;do t=i,(t.flags&(cr|Sn))!==Je&&(r=t.return),i=t.return;while(i)}return t.tag===o?r:null}function xm(e){if(e.tag===x){var t=e.memoizedState;if(t===null){var r=e.alternate;r!==null&&(t=r.memoizedState)}if(t!==null)return t.dehydrated}return null}function wm(e){return e.tag===o?e.stateNode.containerInfo:null}function yC(e){return Rs(e)===e}function SC(e){{var t=bC.current;if(t!==null&&t.tag===p){var r=t,i=r.stateNode;i._warnedAboutRefsInRender||R("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",lt(r)||"A component"),i._warnedAboutRefsInRender=!0}}var n=da(e);return n?Rs(n)===n:!1}function Dm(e){if(Rs(e)!==e)throw new Error("Unable to find node on an unmounted component.")}function Nm(e){var t=e.alternate;if(!t){var r=Rs(e);if(r===null)throw new Error("Unable to find node on an unmounted component.");return r!==e?null:e}for(var i=e,n=t;;){var f=i.return;if(f===null)break;var C=f.alternate;if(C===null){var A=f.return;if(A!==null){i=n=A;continue}break}if(f.child===C.child){for(var M=f.child;M;){if(M===i)return Dm(f),e;if(M===n)return Dm(f),t;M=M.sibling}throw new Error("Unable to find node on an unmounted component.")}if(i.return!==n.return)i=f,n=C;else{for(var z=!1,G=f.child;G;){if(G===i){z=!0,i=f,n=C;break}if(G===n){z=!0,n=f,i=C;break}G=G.sibling}if(!z){for(G=C.child;G;){if(G===i){z=!0,i=C,n=f;break}if(G===n){z=!0,n=C,i=f;break}G=G.sibling}if(!z)throw new Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(i.alternate!==n)throw new Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(i.tag!==o)throw new Error("Unable to find node on an unmounted component.");return i.stateNode.current===i?e:t}function km(e){var t=Nm(e);return t!==null?Rm(t):null}function Rm(e){if(e.tag===_||e.tag===E)return e;for(var t=e.child;t!==null;){var r=Rm(t);if(r!==null)return r;t=t.sibling}return null}function CC(e){var t=Nm(e);return t!==null?Am(t):null}function Am(e){if(e.tag===_||e.tag===E)return e;for(var t=e.child;t!==null;){if(t.tag!==v){var r=Am(t);if(r!==null)return r}t=t.sibling}return null}var Tm=b.unstable_scheduleCallback,EC=b.unstable_cancelCallback,xC=b.unstable_shouldYield,wC=b.unstable_requestPaint,Er=b.unstable_now,DC=b.unstable_getCurrentPriorityLevel,pc=b.unstable_ImmediatePriority,qh=b.unstable_UserBlockingPriority,As=b.unstable_NormalPriority,NC=b.unstable_LowPriority,Gh=b.unstable_IdlePriority,kC=b.unstable_yieldValue,RC=b.unstable_setDisableYieldValue,ma=null,Hr=null,Be=null,Qi=!1,Mi=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function AC(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return R("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{re&&(e=pt({},e,{getLaneLabelMap:PC,injectProfilingHooks:BC})),ma=t.inject(e),Hr=t}catch(r){R("React instrumentation encountered an error: %s.",r)}return!!t.checkDCE}function TC(e,t){if(Hr&&typeof Hr.onScheduleFiberRoot=="function")try{Hr.onScheduleFiberRoot(ma,e,t)}catch(r){Qi||(Qi=!0,R("React instrumentation encountered an error: %s",r))}}function LC(e,t){if(Hr&&typeof Hr.onCommitFiberRoot=="function")try{var r=(e.current.flags&Rt)===Rt;if(ae){var i;switch(t){case di:i=pc;break;case xn:i=qh;break;case wn:i=As;break;case Sc:i=Gh;break;default:i=As;break}Hr.onCommitFiberRoot(ma,e,i,r)}}catch(n){Qi||(Qi=!0,R("React instrumentation encountered an error: %s",n))}}function MC(e){if(Hr&&typeof Hr.onPostCommitFiberRoot=="function")try{Hr.onPostCommitFiberRoot(ma,e)}catch(t){Qi||(Qi=!0,R("React instrumentation encountered an error: %s",t))}}function OC(e){if(Hr&&typeof Hr.onCommitFiberUnmount=="function")try{Hr.onCommitFiberUnmount(ma,e)}catch(t){Qi||(Qi=!0,R("React instrumentation encountered an error: %s",t))}}function xr(e){if(typeof kC=="function"&&(RC(e),U(e)),Hr&&typeof Hr.setStrictMode=="function")try{Hr.setStrictMode(ma,e)}catch(t){Qi||(Qi=!0,R("React instrumentation encountered an error: %s",t))}}function BC(e){Be=e}function PC(){{for(var e=new Map,t=1,r=0;r<Kh;r++){var i=rE(t);e.set(t,i),t*=2}return e}}function IC(e){Be!==null&&typeof Be.markCommitStarted=="function"&&Be.markCommitStarted(e)}function Lm(){Be!==null&&typeof Be.markCommitStopped=="function"&&Be.markCommitStopped()}function No(e){Be!==null&&typeof Be.markComponentRenderStarted=="function"&&Be.markComponentRenderStarted(e)}function ga(){Be!==null&&typeof Be.markComponentRenderStopped=="function"&&Be.markComponentRenderStopped()}function FC(e){Be!==null&&typeof Be.markComponentPassiveEffectMountStarted=="function"&&Be.markComponentPassiveEffectMountStarted(e)}function jC(){Be!==null&&typeof Be.markComponentPassiveEffectMountStopped=="function"&&Be.markComponentPassiveEffectMountStopped()}function VC(e){Be!==null&&typeof Be.markComponentPassiveEffectUnmountStarted=="function"&&Be.markComponentPassiveEffectUnmountStarted(e)}function HC(){Be!==null&&typeof Be.markComponentPassiveEffectUnmountStopped=="function"&&Be.markComponentPassiveEffectUnmountStopped()}function UC(e){Be!==null&&typeof Be.markComponentLayoutEffectMountStarted=="function"&&Be.markComponentLayoutEffectMountStarted(e)}function $C(){Be!==null&&typeof Be.markComponentLayoutEffectMountStopped=="function"&&Be.markComponentLayoutEffectMountStopped()}function Mm(e){Be!==null&&typeof Be.markComponentLayoutEffectUnmountStarted=="function"&&Be.markComponentLayoutEffectUnmountStarted(e)}function Om(){Be!==null&&typeof Be.markComponentLayoutEffectUnmountStopped=="function"&&Be.markComponentLayoutEffectUnmountStopped()}function zC(e,t,r){Be!==null&&typeof Be.markComponentErrored=="function"&&Be.markComponentErrored(e,t,r)}function WC(e,t,r){Be!==null&&typeof Be.markComponentSuspended=="function"&&Be.markComponentSuspended(e,t,r)}function qC(e){Be!==null&&typeof Be.markLayoutEffectsStarted=="function"&&Be.markLayoutEffectsStarted(e)}function GC(){Be!==null&&typeof Be.markLayoutEffectsStopped=="function"&&Be.markLayoutEffectsStopped()}function YC(e){Be!==null&&typeof Be.markPassiveEffectsStarted=="function"&&Be.markPassiveEffectsStarted(e)}function KC(){Be!==null&&typeof Be.markPassiveEffectsStopped=="function"&&Be.markPassiveEffectsStopped()}function Bm(e){Be!==null&&typeof Be.markRenderStarted=="function"&&Be.markRenderStarted(e)}function XC(){Be!==null&&typeof Be.markRenderYielded=="function"&&Be.markRenderYielded()}function Pm(){Be!==null&&typeof Be.markRenderStopped=="function"&&Be.markRenderStopped()}function JC(e){Be!==null&&typeof Be.markRenderScheduled=="function"&&Be.markRenderScheduled(e)}function QC(e,t){Be!==null&&typeof Be.markForceUpdateScheduled=="function"&&Be.markForceUpdateScheduled(e,t)}function Yh(e,t){Be!==null&&typeof Be.markStateUpdateScheduled=="function"&&Be.markStateUpdateScheduled(e,t)}var Ke=0,St=1,Ot=2,rr=8,Zi=16,Im=Math.clz32?Math.clz32:tE,ZC=Math.log,eE=Math.LN2;function tE(e){var t=e>>>0;return t===0?32:31-(ZC(t)/eE|0)|0}var Kh=31,Se=0,wr=0,rt=1,_a=2,En=4,Ts=8,en=16,ko=32,ba=4194240,Ro=64,Xh=128,Jh=256,Qh=512,Zh=1024,ed=2048,td=4096,rd=8192,id=16384,nd=32768,sd=65536,ad=131072,od=262144,ld=524288,cd=1048576,ud=2097152,vc=130023424,ya=4194304,hd=8388608,dd=16777216,fd=33554432,pd=67108864,Fm=ya,Ao=134217728,jm=268435455,To=268435456,Ls=536870912,ui=1073741824;function rE(e){{if(e&rt)return"Sync";if(e&_a)return"InputContinuousHydration";if(e&En)return"InputContinuous";if(e&Ts)return"DefaultHydration";if(e&en)return"Default";if(e&ko)return"TransitionHydration";if(e&ba)return"Transition";if(e&vc)return"Retry";if(e&Ao)return"SelectiveHydration";if(e&To)return"IdleHydration";if(e&Ls)return"Idle";if(e&ui)return"Offscreen"}}var Wt=-1,mc=Ro,gc=ya;function Lo(e){switch(Ms(e)){case rt:return rt;case _a:return _a;case En:return En;case Ts:return Ts;case en:return en;case ko:return ko;case Ro:case Xh:case Jh:case Qh:case Zh:case ed:case td:case rd:case id:case nd:case sd:case ad:case od:case ld:case cd:case ud:return e&ba;case ya:case hd:case dd:case fd:case pd:return e&vc;case Ao:return Ao;case To:return To;case Ls:return Ls;case ui:return ui;default:return R("Should have found matching lanes. This is a bug in React."),e}}function _c(e,t){var r=e.pendingLanes;if(r===Se)return Se;var i=Se,n=e.suspendedLanes,f=e.pingedLanes,C=r&jm;if(C!==Se){var A=C&~n;if(A!==Se)i=Lo(A);else{var M=C&f;M!==Se&&(i=Lo(M))}}else{var z=r&~n;z!==Se?i=Lo(z):f!==Se&&(i=Lo(f))}if(i===Se)return Se;if(t!==Se&&t!==i&&(t&n)===Se){var G=Ms(i),se=Ms(t);if(G>=se||G===en&&(se&ba)!==Se)return t}(i&En)!==Se&&(i|=r&en);var ne=e.entangledLanes;if(ne!==Se)for(var de=e.entanglements,pe=i&ne;pe>0;){var ge=Os(pe),Le=1<<ge;i|=de[ge],pe&=~Le}return i}function iE(e,t){for(var r=e.eventTimes,i=Wt;t>0;){var n=Os(t),f=1<<n,C=r[n];C>i&&(i=C),t&=~f}return i}function nE(e,t){switch(e){case rt:case _a:case En:return t+250;case Ts:case en:case ko:case Ro:case Xh:case Jh:case Qh:case Zh:case ed:case td:case rd:case id:case nd:case sd:case ad:case od:case ld:case cd:case ud:return t+5e3;case ya:case hd:case dd:case fd:case pd:return Wt;case Ao:case To:case Ls:case ui:return Wt;default:return R("Should have found matching lanes. This is a bug in React."),Wt}}function sE(e,t){for(var r=e.pendingLanes,i=e.suspendedLanes,n=e.pingedLanes,f=e.expirationTimes,C=r;C>0;){var A=Os(C),M=1<<A,z=f[A];z===Wt?((M&i)===Se||(M&n)!==Se)&&(f[A]=nE(M,t)):z<=t&&(e.expiredLanes|=M),C&=~M}}function aE(e){return Lo(e.pendingLanes)}function vd(e){var t=e.pendingLanes&~ui;return t!==Se?t:t&ui?ui:Se}function oE(e){return(e&rt)!==Se}function md(e){return(e&jm)!==Se}function Vm(e){return(e&vc)===e}function lE(e){var t=rt|En|en;return(e&t)===Se}function cE(e){return(e&ba)===e}function bc(e,t){var r=_a|En|Ts|en;return(t&r)!==Se}function uE(e,t){return(t&e.expiredLanes)!==Se}function Hm(e){return(e&ba)!==Se}function Um(){var e=mc;return mc<<=1,(mc&ba)===Se&&(mc=Ro),e}function hE(){var e=gc;return gc<<=1,(gc&vc)===Se&&(gc=ya),e}function Ms(e){return e&-e}function Mo(e){return Ms(e)}function Os(e){return 31-Im(e)}function gd(e){return Os(e)}function hi(e,t){return(e&t)!==Se}function Sa(e,t){return(e&t)===t}function dt(e,t){return e|t}function yc(e,t){return e&~t}function $m(e,t){return e&t}function NT(e){return e}function dE(e,t){return e!==wr&&e<t?e:t}function _d(e){for(var t=[],r=0;r<Kh;r++)t.push(e);return t}function Oo(e,t,r){e.pendingLanes|=t,t!==Ls&&(e.suspendedLanes=Se,e.pingedLanes=Se);var i=e.eventTimes,n=gd(t);i[n]=r}function fE(e,t){e.suspendedLanes|=t,e.pingedLanes&=~t;for(var r=e.expirationTimes,i=t;i>0;){var n=Os(i),f=1<<n;r[n]=Wt,i&=~f}}function zm(e,t,r){e.pingedLanes|=e.suspendedLanes&t}function pE(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=Se,e.pingedLanes=Se,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t;for(var i=e.entanglements,n=e.eventTimes,f=e.expirationTimes,C=r;C>0;){var A=Os(C),M=1<<A;i[A]=Se,n[A]=Wt,f[A]=Wt,C&=~M}}function bd(e,t){for(var r=e.entangledLanes|=t,i=e.entanglements,n=r;n;){var f=Os(n),C=1<<f;C&t|i[f]&t&&(i[f]|=t),n&=~C}}function vE(e,t){var r=Ms(t),i;switch(r){case En:i=_a;break;case en:i=Ts;break;case Ro:case Xh:case Jh:case Qh:case Zh:case ed:case td:case rd:case id:case nd:case sd:case ad:case od:case ld:case cd:case ud:case ya:case hd:case dd:case fd:case pd:i=ko;break;case Ls:i=To;break;default:i=wr;break}return(i&(e.suspendedLanes|t))!==wr?wr:i}function Wm(e,t,r){if(Mi)for(var i=e.pendingUpdatersLaneMap;r>0;){var n=gd(r),f=1<<n,C=i[n];C.add(t),r&=~f}}function qm(e,t){if(Mi)for(var r=e.pendingUpdatersLaneMap,i=e.memoizedUpdaters;t>0;){var n=gd(t),f=1<<n,C=r[n];C.size>0&&(C.forEach(function(A){var M=A.alternate;(M===null||!i.has(M))&&i.add(A)}),C.clear()),t&=~f}}function Gm(e,t){return null}var di=rt,xn=En,wn=en,Sc=Ls,Bo=wr;function Oi(){return Bo}function Dr(e){Bo=e}function mE(e,t){var r=Bo;try{return Bo=e,t()}finally{Bo=r}}function gE(e,t){return e!==0&&e<t?e:t}function _E(e,t){return e>t?e:t}function yd(e,t){return e!==0&&e<t}function Ym(e){var t=Ms(e);return yd(di,t)?yd(xn,t)?md(t)?wn:Sc:xn:di}function Cc(e){var t=e.current.memoizedState;return t.isDehydrated}var Km;function bE(e){Km=e}function yE(e){Km(e)}var Sd;function SE(e){Sd=e}var Xm;function CE(e){Xm=e}var Jm;function EE(e){Jm=e}var Qm;function xE(e){Qm=e}var Cd=!1,Ec=[],Gn=null,Yn=null,Kn=null,Po=new Map,Io=new Map,Xn=[],wE=["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"];function DE(e){return wE.indexOf(e)>-1}function NE(e,t,r,i,n){return{blockedOn:e,domEventName:t,eventSystemFlags:r,nativeEvent:n,targetContainers:[i]}}function Zm(e,t){switch(e){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Yn=null;break;case"mouseover":case"mouseout":Kn=null;break;case"pointerover":case"pointerout":{var r=t.pointerId;Po.delete(r);break}case"gotpointercapture":case"lostpointercapture":{var i=t.pointerId;Io.delete(i);break}}}function Fo(e,t,r,i,n,f){if(e===null||e.nativeEvent!==f){var C=NE(t,r,i,n,f);if(t!==null){var A=Zn(t);A!==null&&Sd(A)}return C}e.eventSystemFlags|=i;var M=e.targetContainers;return n!==null&&M.indexOf(n)===-1&&M.push(n),e}function kE(e,t,r,i,n){switch(t){case"focusin":{var f=n;return Gn=Fo(Gn,e,t,r,i,f),!0}case"dragenter":{var C=n;return Yn=Fo(Yn,e,t,r,i,C),!0}case"mouseover":{var A=n;return Kn=Fo(Kn,e,t,r,i,A),!0}case"pointerover":{var M=n,z=M.pointerId;return Po.set(z,Fo(Po.get(z)||null,e,t,r,i,M)),!0}case"gotpointercapture":{var G=n,se=G.pointerId;return Io.set(se,Fo(Io.get(se)||null,e,t,r,i,G)),!0}}return!1}function eg(e){var t=Is(e.target);if(t!==null){var r=Rs(t);if(r!==null){var i=r.tag;if(i===x){var n=xm(r);if(n!==null){e.blockedOn=n,Qm(e.priority,function(){Xm(r)});return}}else if(i===o){var f=r.stateNode;if(Cc(f)){e.blockedOn=wm(r);return}}}}e.blockedOn=null}function RE(e){for(var t=Jm(),r={blockedOn:null,target:e,priority:t},i=0;i<Xn.length&&yd(t,Xn[i].priority);i++);Xn.splice(i,0,r),i===0&&eg(r)}function xc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;t.length>0;){var r=t[0],i=wd(e.domEventName,e.eventSystemFlags,r,e.nativeEvent);if(i===null){var n=e.nativeEvent,f=new n.constructor(n.type,n);rC(f),n.target.dispatchEvent(f),iC()}else{var C=Zn(i);return C!==null&&Sd(C),e.blockedOn=i,!1}t.shift()}return!0}function tg(e,t,r){xc(e)&&r.delete(t)}function AE(){Cd=!1,Gn!==null&&xc(Gn)&&(Gn=null),Yn!==null&&xc(Yn)&&(Yn=null),Kn!==null&&xc(Kn)&&(Kn=null),Po.forEach(tg),Io.forEach(tg)}function jo(e,t){e.blockedOn===t&&(e.blockedOn=null,Cd||(Cd=!0,b.unstable_scheduleCallback(b.unstable_NormalPriority,AE)))}function Vo(e){if(Ec.length>0){jo(Ec[0],e);for(var t=1;t<Ec.length;t++){var r=Ec[t];r.blockedOn===e&&(r.blockedOn=null)}}Gn!==null&&jo(Gn,e),Yn!==null&&jo(Yn,e),Kn!==null&&jo(Kn,e);var i=function(A){return jo(A,e)};Po.forEach(i),Io.forEach(i);for(var n=0;n<Xn.length;n++){var f=Xn[n];f.blockedOn===e&&(f.blockedOn=null)}for(;Xn.length>0;){var C=Xn[0];if(C.blockedOn!==null)break;eg(C),C.blockedOn===null&&Xn.shift()}}var Ca=O.ReactCurrentBatchConfig,Ed=!0;function rg(e){Ed=!!e}function TE(){return Ed}function LE(e,t,r){var i=ig(t),n;switch(i){case di:n=ME;break;case xn:n=OE;break;case wn:default:n=xd;break}return n.bind(null,t,r,e)}function ME(e,t,r,i){var n=Oi(),f=Ca.transition;Ca.transition=null;try{Dr(di),xd(e,t,r,i)}finally{Dr(n),Ca.transition=f}}function OE(e,t,r,i){var n=Oi(),f=Ca.transition;Ca.transition=null;try{Dr(xn),xd(e,t,r,i)}finally{Dr(n),Ca.transition=f}}function xd(e,t,r,i){Ed&&BE(e,t,r,i)}function BE(e,t,r,i){var n=wd(e,t,r,i);if(n===null){jd(e,t,i,wc,r),Zm(e,i);return}if(kE(n,e,t,r,i)){i.stopPropagation();return}if(Zm(e,i),t&So&&DE(e)){for(;n!==null;){var f=Zn(n);f!==null&&yE(f);var C=wd(e,t,r,i);if(C===null&&jd(e,t,i,wc,r),C===n)break;n=C}n!==null&&i.stopPropagation();return}jd(e,t,i,null,r)}var wc=null;function wd(e,t,r,i){wc=null;var n=Th(i),f=Is(n);if(f!==null){var C=Rs(f);if(C===null)f=null;else{var A=C.tag;if(A===x){var M=xm(C);if(M!==null)return M;f=null}else if(A===o){var z=C.stateNode;if(Cc(z))return wm(C);f=null}else C!==f&&(f=null)}}return wc=f,null}function ig(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 di;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 xn;case"message":{var t=DC();switch(t){case pc:return di;case qh:return xn;case As:case NC:return wn;case Gh:return Sc;default:return wn}}default:return wn}}function PE(e,t,r){return e.addEventListener(t,r,!1),r}function IE(e,t,r){return e.addEventListener(t,r,!0),r}function FE(e,t,r,i){return e.addEventListener(t,r,{capture:!0,passive:i}),r}function jE(e,t,r,i){return e.addEventListener(t,r,{passive:i}),r}var Ho=null,Dd=null,Uo=null;function VE(e){return Ho=e,Dd=sg(),!0}function HE(){Ho=null,Dd=null,Uo=null}function ng(){if(Uo)return Uo;var e,t=Dd,r=t.length,i,n=sg(),f=n.length;for(e=0;e<r&&t[e]===n[e];e++);var C=r-e;for(i=1;i<=C&&t[r-i]===n[f-i];i++);var A=i>1?1-i:void 0;return Uo=n.slice(e,A),Uo}function sg(){return"value"in Ho?Ho.value:Ho.textContent}function Dc(e){var t,r=e.keyCode;return"charCode"in e?(t=e.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),t>=32||t===13?t:0}function Nc(){return!0}function ag(){return!1}function fi(e){function t(r,i,n,f,C){this._reactName=r,this._targetInst=n,this.type=i,this.nativeEvent=f,this.target=C,this.currentTarget=null;for(var A in e)if(e.hasOwnProperty(A)){var M=e[A];M?this[A]=M(f):this[A]=f[A]}var z=f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1;return z?this.isDefaultPrevented=Nc:this.isDefaultPrevented=ag,this.isPropagationStopped=ag,this}return pt(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=Nc)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Nc)},persist:function(){},isPersistent:Nc}),t}var Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nd=fi(Ea),$o=pt({},Ea,{view:0,detail:0}),UE=fi($o),kd,Rd,zo;function $E(e){e!==zo&&(zo&&e.type==="mousemove"?(kd=e.screenX-zo.screenX,Rd=e.screenY-zo.screenY):(kd=0,Rd=0),zo=e)}var kc=pt({},$o,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Td,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(e),kd)},movementY:function(e){return"movementY"in e?e.movementY:Rd}}),og=fi(kc),zE=pt({},kc,{dataTransfer:0}),WE=fi(zE),qE=pt({},$o,{relatedTarget:0}),Ad=fi(qE),GE=pt({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),YE=fi(GE),KE=pt({},Ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),XE=fi(KE),JE=pt({},Ea,{data:0}),lg=fi(JE),QE=lg,ZE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ex={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"};function tx(e){if(e.key){var t=ZE[e.key]||e.key;if(t!=="Unidentified")return t}if(e.type==="keypress"){var r=Dc(e);return r===13?"Enter":String.fromCharCode(r)}return e.type==="keydown"||e.type==="keyup"?ex[e.keyCode]||"Unidentified":""}var rx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ix(e){var t=this,r=t.nativeEvent;if(r.getModifierState)return r.getModifierState(e);var i=rx[e];return i?!!r[i]:!1}function Td(e){return ix}var nx=pt({},$o,{key:tx,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Td,charCode:function(e){return e.type==="keypress"?Dc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Dc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sx=fi(nx),ax=pt({},kc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cg=fi(ax),ox=pt({},$o,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Td}),lx=fi(ox),cx=pt({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),ux=fi(cx),hx=pt({},kc,{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}),dx=fi(hx),fx=[9,13,27,32],ug=229,Ld=De&&"CompositionEvent"in window,Wo=null;De&&"documentMode"in document&&(Wo=document.documentMode);var px=De&&"TextEvent"in window&&!Wo,hg=De&&(!Ld||Wo&&Wo>8&&Wo<=11),dg=32,fg=String.fromCharCode(dg);function vx(){he("onBeforeInput",["compositionend","keypress","textInput","paste"]),he("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),he("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),he("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var pg=!1;function mx(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function gx(e){switch(e){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function _x(e,t){return e==="keydown"&&t.keyCode===ug}function vg(e,t){switch(e){case"keyup":return fx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==ug;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mg(e){var t=e.detail;return typeof t=="object"&&"data"in t?t.data:null}function gg(e){return e.locale==="ko"}var xa=!1;function bx(e,t,r,i,n){var f,C;if(Ld?f=gx(t):xa?vg(t,i)&&(f="onCompositionEnd"):_x(t,i)&&(f="onCompositionStart"),!f)return null;hg&&!gg(i)&&(!xa&&f==="onCompositionStart"?xa=VE(n):f==="onCompositionEnd"&&xa&&(C=ng()));var A=Mc(r,f);if(A.length>0){var M=new lg(f,t,null,i,n);if(e.push({event:M,listeners:A}),C)M.data=C;else{var z=mg(i);z!==null&&(M.data=z)}}}function yx(e,t){switch(e){case"compositionend":return mg(t);case"keypress":var r=t.which;return r!==dg?null:(pg=!0,fg);case"textInput":var i=t.data;return i===fg&&pg?null:i;default:return null}}function Sx(e,t){if(xa){if(e==="compositionend"||!Ld&&vg(e,t)){var r=ng();return HE(),xa=!1,r}return null}switch(e){case"paste":return null;case"keypress":if(!mx(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return hg&&!gg(t)?null:t.data;default:return null}}function Cx(e,t,r,i,n){var f;if(px?f=yx(t,i):f=Sx(t,i),!f)return null;var C=Mc(r,"onBeforeInput");if(C.length>0){var A=new QE("onBeforeInput","beforeinput",null,i,n);e.push({event:A,listeners:C}),A.data=f}}function Ex(e,t,r,i,n,f,C){bx(e,t,r,i,n),Cx(e,t,r,i,n)}var xx={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 _g(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xx[e.type]:t==="textarea"}/**
79
+ * Checks if an event is supported in the current execution environment.
80
+ *
81
+ * NOTE: This will not work correctly for non-generic events such as `change`,
82
+ * `reset`, `load`, `error`, and `select`.
83
+ *
84
+ * Borrows from Modernizr.
85
+ *
86
+ * @param {string} eventNameSuffix Event name, e.g. "click".
87
+ * @return {boolean} True if the event is supported.
88
+ * @internal
89
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
90
+ */function wx(e){if(!De)return!1;var t="on"+e,r=t in document;if(!r){var i=document.createElement("div");i.setAttribute(t,"return;"),r=typeof i[t]=="function"}return r}function Dx(){he("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function bg(e,t,r,i){vm(i);var n=Mc(t,"onChange");if(n.length>0){var f=new Nd("onChange","change",null,r,i);e.push({event:f,listeners:n})}}var qo=null,Go=null;function Nx(e){var t=e.nodeName&&e.nodeName.toLowerCase();return t==="select"||t==="input"&&e.type==="file"}function kx(e){var t=[];bg(t,Go,e,Th(e)),bm(Rx,t)}function Rx(e){Ig(e,0)}function Rc(e){var t=Aa(e);if(vo(t))return e}function Ax(e,t){if(e==="change")return t}var yg=!1;De&&(yg=wx("input")&&(!document.documentMode||document.documentMode>9));function Tx(e,t){qo=e,Go=t,qo.attachEvent("onpropertychange",Cg)}function Sg(){qo&&(qo.detachEvent("onpropertychange",Cg),qo=null,Go=null)}function Cg(e){e.propertyName==="value"&&Rc(Go)&&kx(e)}function Lx(e,t,r){e==="focusin"?(Sg(),Tx(t,r)):e==="focusout"&&Sg()}function Mx(e,t){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Rc(Go)}function Ox(e){var t=e.nodeName;return t&&t.toLowerCase()==="input"&&(e.type==="checkbox"||e.type==="radio")}function Bx(e,t){if(e==="click")return Rc(t)}function Px(e,t){if(e==="input"||e==="change")return Rc(t)}function Ix(e){var t=e._wrapperState;!t||!t.controlled||e.type!=="number"||Xe(e,"number",e.value)}function Fx(e,t,r,i,n,f,C){var A=r?Aa(r):window,M,z;if(Nx(A)?M=Ax:_g(A)?yg?M=Px:(M=Mx,z=Lx):Ox(A)&&(M=Bx),M){var G=M(t,r);if(G){bg(e,G,i,n);return}}z&&z(t,A,r),t==="focusout"&&Ix(A)}function jx(){ce("onMouseEnter",["mouseout","mouseover"]),ce("onMouseLeave",["mouseout","mouseover"]),ce("onPointerEnter",["pointerout","pointerover"]),ce("onPointerLeave",["pointerout","pointerover"])}function Vx(e,t,r,i,n,f,C){var A=t==="mouseover"||t==="pointerover",M=t==="mouseout"||t==="pointerout";if(A&&!nC(i)){var z=i.relatedTarget||i.fromElement;if(z&&(Is(z)||ll(z)))return}if(!(!M&&!A)){var G;if(n.window===n)G=n;else{var se=n.ownerDocument;se?G=se.defaultView||se.parentWindow:G=window}var ne,de;if(M){var pe=i.relatedTarget||i.toElement;if(ne=r,de=pe?Is(pe):null,de!==null){var ge=Rs(de);(de!==ge||de.tag!==_&&de.tag!==E)&&(de=null)}}else ne=null,de=r;if(ne!==de){var Le=og,qe="onMouseLeave",$e="onMouseEnter",Et="mouse";(t==="pointerout"||t==="pointerover")&&(Le=cg,qe="onPointerLeave",$e="onPointerEnter",Et="pointer");var _t=ne==null?G:Aa(ne),oe=de==null?G:Aa(de),_e=new Le(qe,Et+"leave",ne,i,n);_e.target=_t,_e.relatedTarget=oe;var le=null,we=Is(n);if(we===r){var Ie=new Le($e,Et+"enter",de,i,n);Ie.target=oe,Ie.relatedTarget=_t,le=Ie}uw(e,_e,le,ne,de)}}}function Hx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pi=typeof Object.is=="function"?Object.is:Hx;function Yo(e,t){if(pi(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(var n=0;n<r.length;n++){var f=r[n];if(!Ee.call(t,f)||!pi(e[f],t[f]))return!1}return!0}function Eg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ux(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function xg(e,t){for(var r=Eg(e),i=0,n=0;r;){if(r.nodeType===_n){if(n=i+r.textContent.length,i<=t&&n>=t)return{node:r,offset:t-i};i=n}r=Eg(Ux(r))}}function $x(e){var t=e.ownerDocument,r=t&&t.defaultView||window,i=r.getSelection&&r.getSelection();if(!i||i.rangeCount===0)return null;var n=i.anchorNode,f=i.anchorOffset,C=i.focusNode,A=i.focusOffset;try{n.nodeType,C.nodeType}catch{return null}return zx(e,n,f,C,A)}function zx(e,t,r,i,n){var f=0,C=-1,A=-1,M=0,z=0,G=e,se=null;e:for(;;){for(var ne=null;G===t&&(r===0||G.nodeType===_n)&&(C=f+r),G===i&&(n===0||G.nodeType===_n)&&(A=f+n),G.nodeType===_n&&(f+=G.nodeValue.length),(ne=G.firstChild)!==null;)se=G,G=ne;for(;;){if(G===e)break e;if(se===t&&++M===r&&(C=f),se===i&&++z===n&&(A=f),(ne=G.nextSibling)!==null)break;G=se,se=G.parentNode}G=ne}return C===-1||A===-1?null:{start:C,end:A}}function Wx(e,t){var r=e.ownerDocument||document,i=r&&r.defaultView||window;if(i.getSelection){var n=i.getSelection(),f=e.textContent.length,C=Math.min(t.start,f),A=t.end===void 0?C:Math.min(t.end,f);if(!n.extend&&C>A){var M=A;A=C,C=M}var z=xg(e,C),G=xg(e,A);if(z&&G){if(n.rangeCount===1&&n.anchorNode===z.node&&n.anchorOffset===z.offset&&n.focusNode===G.node&&n.focusOffset===G.offset)return;var se=r.createRange();se.setStart(z.node,z.offset),n.removeAllRanges(),C>A?(n.addRange(se),n.extend(G.node,G.offset)):(se.setEnd(G.node,G.offset),n.addRange(se))}}}function wg(e){return e&&e.nodeType===_n}function Dg(e,t){return!e||!t?!1:e===t?!0:wg(e)?!1:wg(t)?Dg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1}function qx(e){return e&&e.ownerDocument&&Dg(e.ownerDocument.documentElement,e)}function Gx(e){try{return typeof e.contentWindow.location.href=="string"}catch{return!1}}function Ng(){for(var e=window,t=vn();t instanceof e.HTMLIFrameElement;){if(Gx(t))e=t.contentWindow;else return t;t=vn(e.document)}return t}function Md(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 Yx(){var e=Ng();return{focusedElem:e,selectionRange:Md(e)?Xx(e):null}}function Kx(e){var t=Ng(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&qx(r)){i!==null&&Md(r)&&Jx(r,i);for(var n=[],f=r;f=f.parentNode;)f.nodeType===ii&&n.push({element:f,left:f.scrollLeft,top:f.scrollTop});typeof r.focus=="function"&&r.focus();for(var C=0;C<n.length;C++){var A=n[C];A.element.scrollLeft=A.left,A.element.scrollTop=A.top}}}function Xx(e){var t;return"selectionStart"in e?t={start:e.selectionStart,end:e.selectionEnd}:t=$x(e),t||{start:0,end:0}}function Jx(e,t){var r=t.start,i=t.end;i===void 0&&(i=r),"selectionStart"in e?(e.selectionStart=r,e.selectionEnd=Math.min(i,e.value.length)):Wx(e,t)}var Qx=De&&"documentMode"in document&&document.documentMode<=11;function Zx(){he("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var wa=null,Od=null,Ko=null,Bd=!1;function ew(e){if("selectionStart"in e&&Md(e))return{start:e.selectionStart,end:e.selectionEnd};var t=e.ownerDocument&&e.ownerDocument.defaultView||window,r=t.getSelection();return{anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}}function tw(e){return e.window===e?e.document:e.nodeType===bn?e:e.ownerDocument}function kg(e,t,r){var i=tw(r);if(!(Bd||wa==null||wa!==vn(i))){var n=ew(wa);if(!Ko||!Yo(Ko,n)){Ko=n;var f=Mc(Od,"onSelect");if(f.length>0){var C=new Nd("onSelect","select",null,t,r);e.push({event:C,listeners:f}),C.target=wa}}}}function rw(e,t,r,i,n,f,C){var A=r?Aa(r):window;switch(t){case"focusin":(_g(A)||A.contentEditable==="true")&&(wa=A,Od=r,Ko=null);break;case"focusout":wa=null,Od=null,Ko=null;break;case"mousedown":Bd=!0;break;case"contextmenu":case"mouseup":case"dragend":Bd=!1,kg(e,i,n);break;case"selectionchange":if(Qx)break;case"keydown":case"keyup":kg(e,i,n)}}function Ac(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Da={animationend:Ac("Animation","AnimationEnd"),animationiteration:Ac("Animation","AnimationIteration"),animationstart:Ac("Animation","AnimationStart"),transitionend:Ac("Transition","TransitionEnd")},Pd={},Rg={};De&&(Rg=document.createElement("div").style,"AnimationEvent"in window||(delete Da.animationend.animation,delete Da.animationiteration.animation,delete Da.animationstart.animation),"TransitionEvent"in window||delete Da.transitionend.transition);function Tc(e){if(Pd[e])return Pd[e];if(!Da[e])return e;var t=Da[e];for(var r in t)if(t.hasOwnProperty(r)&&r in Rg)return Pd[e]=t[r];return e}var Ag=Tc("animationend"),Tg=Tc("animationiteration"),Lg=Tc("animationstart"),Mg=Tc("transitionend"),Og=new Map,Bg=["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"];function Jn(e,t){Og.set(e,t),he(t,[e])}function iw(){for(var e=0;e<Bg.length;e++){var t=Bg[e],r=t.toLowerCase(),i=t[0].toUpperCase()+t.slice(1);Jn(r,"on"+i)}Jn(Ag,"onAnimationEnd"),Jn(Tg,"onAnimationIteration"),Jn(Lg,"onAnimationStart"),Jn("dblclick","onDoubleClick"),Jn("focusin","onFocus"),Jn("focusout","onBlur"),Jn(Mg,"onTransitionEnd")}function nw(e,t,r,i,n,f,C){var A=Og.get(t);if(A!==void 0){var M=Nd,z=t;switch(t){case"keypress":if(Dc(i)===0)return;case"keydown":case"keyup":M=sx;break;case"focusin":z="focus",M=Ad;break;case"focusout":z="blur",M=Ad;break;case"beforeblur":case"afterblur":M=Ad;break;case"click":if(i.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":M=og;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=WE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=lx;break;case Ag:case Tg:case Lg:M=YE;break;case Mg:M=ux;break;case"scroll":M=UE;break;case"wheel":M=dx;break;case"copy":case"cut":case"paste":M=XE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=cg;break}var G=(f&So)!==0;{var se=!G&&t==="scroll",ne=lw(r,A,i.type,G,se);if(ne.length>0){var de=new M(A,z,null,i,n);e.push({event:de,listeners:ne})}}}}iw(),jx(),Dx(),Zx(),vx();function sw(e,t,r,i,n,f,C){nw(e,t,r,i,n,f);var A=(f&tC)===0;A&&(Vx(e,t,r,i,n),Fx(e,t,r,i,n),rw(e,t,r,i,n),Ex(e,t,r,i,n))}var Xo=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],Id=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Xo));function Pg(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,fC(i,t,void 0,e),e.currentTarget=null}function aw(e,t,r){var i;if(r)for(var n=t.length-1;n>=0;n--){var f=t[n],C=f.instance,A=f.currentTarget,M=f.listener;if(C!==i&&e.isPropagationStopped())return;Pg(e,M,A),i=C}else for(var z=0;z<t.length;z++){var G=t[z],se=G.instance,ne=G.currentTarget,de=G.listener;if(se!==i&&e.isPropagationStopped())return;Pg(e,de,ne),i=se}}function Ig(e,t){for(var r=(t&So)!==0,i=0;i<e.length;i++){var n=e[i],f=n.event,C=n.listeners;aw(f,C,r)}pC()}function ow(e,t,r,i,n){var f=Th(r),C=[];sw(C,e,i,r,f,t),Ig(C,t)}function Yt(e,t){Id.has(e)||R('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var r=!1,i=I1(t),n=hw(e);i.has(n)||(Fg(t,e,Ah,r),i.add(n))}function Fd(e,t,r){Id.has(e)&&!t&&R('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var i=0;t&&(i|=So),Fg(r,e,i,t)}var Lc="_reactListening"+Math.random().toString(36).slice(2);function Jo(e){if(!e[Lc]){e[Lc]=!0,ye.forEach(function(r){r!=="selectionchange"&&(Id.has(r)||Fd(r,!1,e),Fd(r,!0,e))});var t=e.nodeType===bn?e:e.ownerDocument;t!==null&&(t[Lc]||(t[Lc]=!0,Fd("selectionchange",!1,t)))}}function Fg(e,t,r,i,n){var f=LE(e,t,r),C=void 0;Oh&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(C=!0),e=e,i?C!==void 0?FE(e,t,f,C):IE(e,t,f):C!==void 0?jE(e,t,f,C):PE(e,t,f)}function jg(e,t){return e===t||e.nodeType===lr&&e.parentNode===t}function jd(e,t,r,i,n){var f=i;if((t&fm)===0&&(t&Ah)===0){var C=n;if(i!==null){var A=i;e:for(;;){if(A===null)return;var M=A.tag;if(M===o||M===v){var z=A.stateNode.containerInfo;if(jg(z,C))break;if(M===v)for(var G=A.return;G!==null;){var se=G.tag;if(se===o||se===v){var ne=G.stateNode.containerInfo;if(jg(ne,C))return}G=G.return}for(;z!==null;){var de=Is(z);if(de===null)return;var pe=de.tag;if(pe===_||pe===E){A=f=de;continue e}z=z.parentNode}}A=A.return}}}bm(function(){return ow(e,t,r,f)})}function Qo(e,t,r){return{instance:e,listener:t,currentTarget:r}}function lw(e,t,r,i,n,f){for(var C=t!==null?t+"Capture":null,A=i?C:t,M=[],z=e,G=null;z!==null;){var se=z,ne=se.stateNode,de=se.tag;if(de===_&&ne!==null&&(G=ne,A!==null)){var pe=Eo(z,A);pe!=null&&M.push(Qo(z,pe,G))}if(n)break;z=z.return}return M}function Mc(e,t){for(var r=t+"Capture",i=[],n=e;n!==null;){var f=n,C=f.stateNode,A=f.tag;if(A===_&&C!==null){var M=C,z=Eo(n,r);z!=null&&i.unshift(Qo(n,z,M));var G=Eo(n,t);G!=null&&i.push(Qo(n,G,M))}n=n.return}return i}function Na(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==_);return e||null}function cw(e,t){for(var r=e,i=t,n=0,f=r;f;f=Na(f))n++;for(var C=0,A=i;A;A=Na(A))C++;for(;n-C>0;)r=Na(r),n--;for(;C-n>0;)i=Na(i),C--;for(var M=n;M--;){if(r===i||i!==null&&r===i.alternate)return r;r=Na(r),i=Na(i)}return null}function Vg(e,t,r,i,n){for(var f=t._reactName,C=[],A=r;A!==null&&A!==i;){var M=A,z=M.alternate,G=M.stateNode,se=M.tag;if(z!==null&&z===i)break;if(se===_&&G!==null){var ne=G;if(n){var de=Eo(A,f);de!=null&&C.unshift(Qo(A,de,ne))}else if(!n){var pe=Eo(A,f);pe!=null&&C.push(Qo(A,pe,ne))}}A=A.return}C.length!==0&&e.push({event:t,listeners:C})}function uw(e,t,r,i,n){var f=i&&n?cw(i,n):null;i!==null&&Vg(e,t,i,f,!1),n!==null&&r!==null&&Vg(e,r,n,f,!0)}function hw(e,t){return e+"__bubble"}var ni=!1,Zo="dangerouslySetInnerHTML",Oc="suppressContentEditableWarning",Qn="suppressHydrationWarning",Hg="autoFocus",Bs="children",Ps="style",Bc="__html",Vd,Pc,el,Ug,Ic,$g,zg;Vd={dialog:!0,webview:!0},Pc=function(e,t){YS(e,t),KS(e,t),eC(e,t,{registrationNameDependencies:Q,possibleRegistrationNames:$})},$g=De&&!document.documentMode,el=function(e,t,r){if(!ni){var i=Fc(r),n=Fc(t);n!==i&&(ni=!0,R("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(n),JSON.stringify(i)))}},Ug=function(e){if(!ni){ni=!0;var t=[];e.forEach(function(r){t.push(r)}),R("Extra attributes from the server: %s",t)}},Ic=function(e,t){t===!1?R("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):R("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},zg=function(e,t){var r=e.namespaceURI===gn?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return r.innerHTML=t,r.innerHTML};var dw=/\r\n?/g,fw=/\u0000|\uFFFD/g;function Fc(e){Qe(e);var t=typeof e=="string"?e:""+e;return t.replace(dw,`
91
+ `).replace(fw,"")}function jc(e,t,r,i){var n=Fc(t),f=Fc(e);if(f!==n&&(i&&(ni||(ni=!0,R('Text content did not match. Server: "%s" Client: "%s"',f,n))),r&&Z))throw new Error("Text content does not match server-rendered HTML.")}function Wg(e){return e.nodeType===bn?e:e.ownerDocument}function pw(){}function Vc(e){e.onclick=pw}function vw(e,t,r,i,n){for(var f in i)if(i.hasOwnProperty(f)){var C=i[f];if(f===Ps)C&&Object.freeze(C),om(t,C);else if(f===Zo){var A=C?C[Bc]:void 0;A!=null&&rm(t,A)}else if(f===Bs)if(typeof C=="string"){var M=e!=="textarea"||C!=="";M&&cc(t,C)}else typeof C=="number"&&cc(t,""+C);else f===Oc||f===Qn||f===Hg||(Q.hasOwnProperty(f)?C!=null&&(typeof C!="function"&&Ic(f,C),f==="onScroll"&&Yt("scroll",t)):C!=null&&ri(t,f,C,n))}}function mw(e,t,r,i){for(var n=0;n<t.length;n+=2){var f=t[n],C=t[n+1];f===Ps?om(e,C):f===Zo?rm(e,C):f===Bs?cc(e,C):ri(e,f,C,i)}}function gw(e,t,r,i){var n,f=Wg(r),C,A=i;if(A===gn&&(A=xh(e)),A===gn){if(n=xs(e,t),!n&&e!==e.toLowerCase()&&R("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),e==="script"){var M=f.createElement("div");M.innerHTML="<script><\/script>";var z=M.firstChild;C=M.removeChild(z)}else if(typeof t.is=="string")C=f.createElement(e,{is:t.is});else if(C=f.createElement(e),e==="select"){var G=C;t.multiple?G.multiple=!0:t.size&&(G.size=t.size)}}else C=f.createElementNS(A,e);return A===gn&&!n&&Object.prototype.toString.call(C)==="[object HTMLUnknownElement]"&&!Ee.call(Vd,e)&&(Vd[e]=!0,R("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e)),C}function _w(e,t){return Wg(t).createTextNode(e)}function bw(e,t,r,i){var n=xs(t,r);Pc(t,r);var f;switch(t){case"dialog":Yt("cancel",e),Yt("close",e),f=r;break;case"iframe":case"object":case"embed":Yt("load",e),f=r;break;case"video":case"audio":for(var C=0;C<Xo.length;C++)Yt(Xo[C],e);f=r;break;case"source":Yt("error",e),f=r;break;case"img":case"image":case"link":Yt("error",e),Yt("load",e),f=r;break;case"details":Yt("toggle",e),f=r;break;case"input":ac(e,r),f=mo(e,r),Yt("invalid",e);break;case"option":Mt(e,r),f=r;break;case"select":bo(e,r),f=_o(e,r),Yt("invalid",e);break;case"textarea":Zv(e,r),f=Ch(e,r),Yt("invalid",e);break;default:f=r}switch(Rh(t,f),vw(t,e,i,f,n),t){case"input":Cs(e),fe(e,r,!1);break;case"textarea":Cs(e),tm(e);break;case"option":$t(e,r);break;case"select":yh(e,r);break;default:typeof f.onClick=="function"&&Vc(e);break}}function yw(e,t,r,i,n){Pc(t,i);var f=null,C,A;switch(t){case"input":C=mo(e,r),A=mo(e,i),f=[];break;case"select":C=_o(e,r),A=_o(e,i),f=[];break;case"textarea":C=Ch(e,r),A=Ch(e,i),f=[];break;default:C=r,A=i,typeof C.onClick!="function"&&typeof A.onClick=="function"&&Vc(e);break}Rh(t,A);var M,z,G=null;for(M in C)if(!(A.hasOwnProperty(M)||!C.hasOwnProperty(M)||C[M]==null))if(M===Ps){var se=C[M];for(z in se)se.hasOwnProperty(z)&&(G||(G={}),G[z]="")}else M===Zo||M===Bs||M===Oc||M===Qn||M===Hg||(Q.hasOwnProperty(M)?f||(f=[]):(f=f||[]).push(M,null));for(M in A){var ne=A[M],de=C!=null?C[M]:void 0;if(!(!A.hasOwnProperty(M)||ne===de||ne==null&&de==null))if(M===Ps)if(ne&&Object.freeze(ne),de){for(z in de)de.hasOwnProperty(z)&&(!ne||!ne.hasOwnProperty(z))&&(G||(G={}),G[z]="");for(z in ne)ne.hasOwnProperty(z)&&de[z]!==ne[z]&&(G||(G={}),G[z]=ne[z])}else G||(f||(f=[]),f.push(M,G)),G=ne;else if(M===Zo){var pe=ne?ne[Bc]:void 0,ge=de?de[Bc]:void 0;pe!=null&&ge!==pe&&(f=f||[]).push(M,pe)}else M===Bs?(typeof ne=="string"||typeof ne=="number")&&(f=f||[]).push(M,""+ne):M===Oc||M===Qn||(Q.hasOwnProperty(M)?(ne!=null&&(typeof ne!="function"&&Ic(M,ne),M==="onScroll"&&Yt("scroll",e)),!f&&de!==ne&&(f=[])):(f=f||[]).push(M,ne))}return G&&(VS(G,A[Ps]),(f=f||[]).push(Ps,G)),f}function Sw(e,t,r,i,n){r==="input"&&n.type==="radio"&&n.name!=null&&j(e,n);var f=xs(r,i),C=xs(r,n);switch(mw(e,t,f,C),r){case"input":te(e,n);break;case"textarea":em(e,n);break;case"select":oc(e,n);break}}function Cw(e){{var t=e.toLowerCase();return uc.hasOwnProperty(t)&&uc[t]||null}}function Ew(e,t,r,i,n,f,C){var A,M;switch(A=xs(t,r),Pc(t,r),t){case"dialog":Yt("cancel",e),Yt("close",e);break;case"iframe":case"object":case"embed":Yt("load",e);break;case"video":case"audio":for(var z=0;z<Xo.length;z++)Yt(Xo[z],e);break;case"source":Yt("error",e);break;case"img":case"image":case"link":Yt("error",e),Yt("load",e);break;case"details":Yt("toggle",e);break;case"input":ac(e,r),Yt("invalid",e);break;case"option":Mt(e,r);break;case"select":bo(e,r),Yt("invalid",e);break;case"textarea":Zv(e,r),Yt("invalid",e);break}Rh(t,r);{M=new Set;for(var G=e.attributes,se=0;se<G.length;se++){var ne=G[se].name.toLowerCase();switch(ne){case"value":break;case"checked":break;case"selected":break;default:M.add(G[se].name)}}}var de=null;for(var pe in r)if(r.hasOwnProperty(pe)){var ge=r[pe];if(pe===Bs)typeof ge=="string"?e.textContent!==ge&&(r[Qn]!==!0&&jc(e.textContent,ge,f,C),de=[Bs,ge]):typeof ge=="number"&&e.textContent!==""+ge&&(r[Qn]!==!0&&jc(e.textContent,ge,f,C),de=[Bs,""+ge]);else if(Q.hasOwnProperty(pe))ge!=null&&(typeof ge!="function"&&Ic(pe,ge),pe==="onScroll"&&Yt("scroll",e));else if(C&&typeof A=="boolean"){var Le=void 0,qe=Ut(pe);if(r[Qn]!==!0){if(!(pe===Oc||pe===Qn||pe==="value"||pe==="checked"||pe==="selected")){if(pe===Zo){var $e=e.innerHTML,Et=ge?ge[Bc]:void 0;if(Et!=null){var _t=zg(e,Et);_t!==$e&&el(pe,$e,_t)}}else if(pe===Ps){if(M.delete(pe),$g){var oe=FS(ge);Le=e.getAttribute("style"),oe!==Le&&el(pe,Le,oe)}}else if(A&&!q)M.delete(pe.toLowerCase()),Le=Ri(e,pe,ge),ge!==Le&&el(pe,Le,ge);else if(!Tt(pe,qe,A)&&!Zt(pe,ge,qe,A)){var _e=!1;if(qe!==null)M.delete(qe.attributeName),Le=Vn(e,pe,ge,qe);else{var le=i;if(le===gn&&(le=xh(t)),le===gn)M.delete(pe.toLowerCase());else{var we=Cw(pe);we!==null&&we!==pe&&(_e=!0,M.delete(we)),M.delete(pe)}Le=Ri(e,pe,ge)}var Ie=q;!Ie&&ge!==Le&&!_e&&el(pe,Le,ge)}}}}}switch(C&&M.size>0&&r[Qn]!==!0&&Ug(M),t){case"input":Cs(e),fe(e,r,!0);break;case"textarea":Cs(e),tm(e);break;case"select":case"option":break;default:typeof r.onClick=="function"&&Vc(e);break}return de}function xw(e,t,r){var i=e.nodeValue!==t;return i}function Hd(e,t){{if(ni)return;ni=!0,R("Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase())}}function Ud(e,t){{if(ni)return;ni=!0,R('Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase())}}function $d(e,t,r){{if(ni)return;ni=!0,R("Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase())}}function zd(e,t){{if(t===""||ni)return;ni=!0,R('Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())}}function ww(e,t,r){switch(t){case"input":me(e,r);return;case"textarea":bS(e,r);return;case"select":Sh(e,r);return}}var tl=function(){},rl=function(){};{var Dw=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],qg=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],Nw=qg.concat(["button"]),kw=["dd","dt","li","option","optgroup","p","rp","rt"],Gg={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};rl=function(e,t){var r=pt({},e||Gg),i={tag:t};return qg.indexOf(t)!==-1&&(r.aTagInScope=null,r.buttonTagInScope=null,r.nobrTagInScope=null),Nw.indexOf(t)!==-1&&(r.pTagInButtonScope=null),Dw.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(r.listItemTagAutoclosing=null,r.dlItemTagAutoclosing=null),r.current=i,t==="form"&&(r.formTag=i),t==="a"&&(r.aTagInScope=i),t==="button"&&(r.buttonTagInScope=i),t==="nobr"&&(r.nobrTagInScope=i),t==="p"&&(r.pTagInButtonScope=i),t==="li"&&(r.listItemTagAutoclosing=i),(t==="dd"||t==="dt")&&(r.dlItemTagAutoclosing=i),r};var Rw=function(e,t){switch(t){case"select":return e==="option"||e==="optgroup"||e==="#text";case"optgroup":return e==="option"||e==="#text";case"option":return e==="#text";case"tr":return e==="th"||e==="td"||e==="style"||e==="script"||e==="template";case"tbody":case"thead":case"tfoot":return e==="tr"||e==="style"||e==="script"||e==="template";case"colgroup":return e==="col"||e==="template";case"table":return e==="caption"||e==="colgroup"||e==="tbody"||e==="tfoot"||e==="thead"||e==="style"||e==="script"||e==="template";case"head":return e==="base"||e==="basefont"||e==="bgsound"||e==="link"||e==="meta"||e==="title"||e==="noscript"||e==="noframes"||e==="style"||e==="script"||e==="template";case"html":return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":return e==="html"}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6";case"rp":case"rt":return kw.indexOf(t)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return t==null}return!0},Aw=function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null},Yg={};tl=function(e,t,r){r=r||Gg;var i=r.current,n=i&&i.tag;t!=null&&(e!=null&&R("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var f=Rw(e,n)?null:i,C=f?null:Aw(e,r),A=f||C;if(A){var M=A.tag,z=!!f+"|"+e+"|"+M;if(!Yg[z]){Yg[z]=!0;var G=e,se="";if(e==="#text"?/\S/.test(t)?G="Text nodes":(G="Whitespace text nodes",se=" Make sure you don't have any extra whitespace between tags on each line of your source code."):G="<"+e+">",f){var ne="";M==="table"&&e==="tr"&&(ne+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),R("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",G,M,se,ne)}else R("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",G,M)}}}}var Hc="suppressHydrationWarning",Uc="$",$c="/$",il="$?",nl="$!",Tw="style",Wd=null,qd=null;function Lw(e){var t,r,i=e.nodeType;switch(i){case bn:case Dh:{t=i===bn?"#document":"#fragment";var n=e.documentElement;r=n?n.namespaceURI:wh(null,"");break}default:{var f=i===lr?e.parentNode:e,C=f.namespaceURI||null;t=f.tagName,r=wh(C,t);break}}{var A=t.toLowerCase(),M=rl(null,A);return{namespace:r,ancestorInfo:M}}}function Mw(e,t,r){{var i=e,n=wh(i.namespace,t),f=rl(i.ancestorInfo,t);return{namespace:n,ancestorInfo:f}}}function kT(e){return e}function Ow(e){Wd=TE(),qd=Yx();var t=null;return rg(!1),t}function Bw(e){Kx(qd),rg(Wd),Wd=null,qd=null}function Pw(e,t,r,i,n){var f;{var C=i;if(tl(e,null,C.ancestorInfo),typeof t.children=="string"||typeof t.children=="number"){var A=""+t.children,M=rl(C.ancestorInfo,e);tl(null,A,M)}f=C.namespace}var z=gw(e,t,r,f);return ol(n,z),ef(z,t),z}function Iw(e,t){e.appendChild(t)}function Fw(e,t,r,i,n){switch(bw(e,t,r,i),t){case"button":case"input":case"select":case"textarea":return!!r.autoFocus;case"img":return!0;default:return!1}}function jw(e,t,r,i,n,f){{var C=f;if(typeof i.children!=typeof r.children&&(typeof i.children=="string"||typeof i.children=="number")){var A=""+i.children,M=rl(C.ancestorInfo,t);tl(null,A,M)}}return yw(e,t,r,i)}function Gd(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}function Vw(e,t,r,i){{var n=r;tl(null,e,n.ancestorInfo)}var f=_w(e,t);return ol(i,f),f}function Hw(){var e=window.event;return e===void 0?wn:ig(e.type)}var Yd=typeof setTimeout=="function"?setTimeout:void 0,Uw=typeof clearTimeout=="function"?clearTimeout:void 0,Kd=-1,Kg=typeof Promise=="function"?Promise:void 0,$w=typeof queueMicrotask=="function"?queueMicrotask:typeof Kg<"u"?function(e){return Kg.resolve(null).then(e).catch(zw)}:Yd;function zw(e){setTimeout(function(){throw e})}function Ww(e,t,r,i){switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&e.focus();return;case"img":{r.src&&(e.src=r.src);return}}}function qw(e,t,r,i,n,f){Sw(e,t,r,i,n),ef(e,n)}function Xg(e){cc(e,"")}function Gw(e,t,r){e.nodeValue=r}function Yw(e,t){e.appendChild(t)}function Kw(e,t){var r;e.nodeType===lr?(r=e.parentNode,r.insertBefore(t,e)):(r=e,r.appendChild(t));var i=e._reactRootContainer;i==null&&r.onclick===null&&Vc(r)}function Xw(e,t,r){e.insertBefore(t,r)}function Jw(e,t,r){e.nodeType===lr?e.parentNode.insertBefore(t,r):e.insertBefore(t,r)}function Qw(e,t){e.removeChild(t)}function Zw(e,t){e.nodeType===lr?e.parentNode.removeChild(t):e.removeChild(t)}function Xd(e,t){var r=t,i=0;do{var n=r.nextSibling;if(e.removeChild(r),n&&n.nodeType===lr){var f=n.data;if(f===$c)if(i===0){e.removeChild(n),Vo(t);return}else i--;else(f===Uc||f===il||f===nl)&&i++}r=n}while(r);Vo(t)}function e1(e,t){e.nodeType===lr?Xd(e.parentNode,t):e.nodeType===ii&&Xd(e,t),Vo(e)}function t1(e){e=e;var t=e.style;typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function r1(e){e.nodeValue=""}function i1(e,t){e=e;var r=t[Tw],i=r!=null&&r.hasOwnProperty("display")?r.display:null;e.style.display=Nh("display",i)}function n1(e,t){e.nodeValue=t}function s1(e){e.nodeType===ii?e.textContent="":e.nodeType===bn&&e.documentElement&&e.removeChild(e.documentElement)}function a1(e,t,r){return e.nodeType!==ii||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}function o1(e,t){return t===""||e.nodeType!==_n?null:e}function l1(e){return e.nodeType!==lr?null:e}function Jg(e){return e.data===il}function Jd(e){return e.data===nl}function c1(e){var t=e.nextSibling&&e.nextSibling.dataset,r,i,n;return t&&(r=t.dgst,i=t.msg,n=t.stck),{message:i,digest:r,stack:n}}function u1(e,t){e._reactRetry=t}function zc(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===ii||t===_n)break;if(t===lr){var r=e.data;if(r===Uc||r===nl||r===il)break;if(r===$c)return null}}return e}function sl(e){return zc(e.nextSibling)}function h1(e){return zc(e.firstChild)}function d1(e){return zc(e.firstChild)}function f1(e){return zc(e.nextSibling)}function p1(e,t,r,i,n,f,C){ol(f,e),ef(e,r);var A;{var M=n;A=M.namespace}var z=(f.mode&St)!==Ke;return Ew(e,t,r,A,i,z,C)}function v1(e,t,r,i){return ol(r,e),r.mode&St,xw(e,t)}function m1(e,t){ol(t,e)}function g1(e){for(var t=e.nextSibling,r=0;t;){if(t.nodeType===lr){var i=t.data;if(i===$c){if(r===0)return sl(t);r--}else(i===Uc||i===nl||i===il)&&r++}t=t.nextSibling}return null}function Qg(e){for(var t=e.previousSibling,r=0;t;){if(t.nodeType===lr){var i=t.data;if(i===Uc||i===nl||i===il){if(r===0)return t;r--}else i===$c&&r++}t=t.previousSibling}return null}function _1(e){Vo(e)}function b1(e){Vo(e)}function y1(e){return e!=="head"&&e!=="body"}function S1(e,t,r,i){var n=!0;jc(t.nodeValue,r,i,n)}function C1(e,t,r,i,n,f){if(t[Hc]!==!0){var C=!0;jc(i.nodeValue,n,f,C)}}function E1(e,t){t.nodeType===ii?Hd(e,t):t.nodeType===lr||Ud(e,t)}function x1(e,t){{var r=e.parentNode;r!==null&&(t.nodeType===ii?Hd(r,t):t.nodeType===lr||Ud(r,t))}}function w1(e,t,r,i,n){(n||t[Hc]!==!0)&&(i.nodeType===ii?Hd(r,i):i.nodeType===lr||Ud(r,i))}function D1(e,t,r){$d(e,t)}function N1(e,t){zd(e,t)}function k1(e,t,r){{var i=e.parentNode;i!==null&&$d(i,t)}}function R1(e,t){{var r=e.parentNode;r!==null&&zd(r,t)}}function A1(e,t,r,i,n,f){(f||t[Hc]!==!0)&&$d(r,i)}function T1(e,t,r,i,n){(n||t[Hc]!==!0)&&zd(r,i)}function L1(e){R("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",e.nodeName.toLowerCase())}function M1(e){Jo(e)}var ka=Math.random().toString(36).slice(2),Ra="__reactFiber$"+ka,Qd="__reactProps$"+ka,al="__reactContainer$"+ka,Zd="__reactEvents$"+ka,O1="__reactListeners$"+ka,B1="__reactHandles$"+ka;function P1(e){delete e[Ra],delete e[Qd],delete e[Zd],delete e[O1],delete e[B1]}function ol(e,t){t[Ra]=e}function Wc(e,t){t[al]=e}function Zg(e){e[al]=null}function ll(e){return!!e[al]}function Is(e){var t=e[Ra];if(t)return t;for(var r=e.parentNode;r;){if(t=r[al]||r[Ra],t){var i=t.alternate;if(t.child!==null||i!==null&&i.child!==null)for(var n=Qg(e);n!==null;){var f=n[Ra];if(f)return f;n=Qg(n)}return t}e=r,r=e.parentNode}return null}function Zn(e){var t=e[Ra]||e[al];return t&&(t.tag===_||t.tag===E||t.tag===x||t.tag===o)?t:null}function Aa(e){if(e.tag===_||e.tag===E)return e.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function qc(e){return e[Qd]||null}function ef(e,t){e[Qd]=t}function I1(e){var t=e[Zd];return t===void 0&&(t=e[Zd]=new Set),t}var e_={},t_=O.ReactDebugCurrentFrame;function Gc(e){if(e){var t=e._owner,r=co(e.type,e._source,t?t.type:null);t_.setExtraStackFrame(r)}else t_.setExtraStackFrame(null)}function Bi(e,t,r,i,n){{var f=Function.call.bind(Ee);for(var C in e)if(f(e,C)){var A=void 0;try{if(typeof e[C]!="function"){var M=Error((i||"React class")+": "+r+" type `"+C+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[C]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw M.name="Invariant Violation",M}A=e[C](t,C,i,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(z){A=z}A&&!(A instanceof Error)&&(Gc(n),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",i||"React class",r,C,typeof A),Gc(null)),A instanceof Error&&!(A.message in e_)&&(e_[A.message]=!0,Gc(n),R("Failed %s type: %s",r,A.message),Gc(null))}}}var tf=[],Yc;Yc=[];var Dn=-1;function es(e){return{current:e}}function Ur(e,t){if(Dn<0){R("Unexpected pop.");return}t!==Yc[Dn]&&R("Unexpected Fiber popped."),e.current=tf[Dn],tf[Dn]=null,Yc[Dn]=null,Dn--}function $r(e,t,r){Dn++,tf[Dn]=e.current,Yc[Dn]=r,e.current=t}var rf;rf={};var vi={};Object.freeze(vi);var Nn=es(vi),tn=es(!1),nf=vi;function Ta(e,t,r){return r&&rn(t)?nf:Nn.current}function r_(e,t,r){{var i=e.stateNode;i.__reactInternalMemoizedUnmaskedChildContext=t,i.__reactInternalMemoizedMaskedChildContext=r}}function La(e,t){{var r=e.type,i=r.contextTypes;if(!i)return vi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var f={};for(var C in i)f[C]=t[C];{var A=lt(e)||"Unknown";Bi(i,f,"context",A)}return n&&r_(e,t,f),f}}function Kc(){return tn.current}function rn(e){{var t=e.childContextTypes;return t!=null}}function Xc(e){Ur(tn,e),Ur(Nn,e)}function sf(e){Ur(tn,e),Ur(Nn,e)}function i_(e,t,r){{if(Nn.current!==vi)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");$r(Nn,t,e),$r(tn,r,e)}}function n_(e,t,r){{var i=e.stateNode,n=t.childContextTypes;if(typeof i.getChildContext!="function"){{var f=lt(e)||"Unknown";rf[f]||(rf[f]=!0,R("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",f,f))}return r}var C=i.getChildContext();for(var A in C)if(!(A in n))throw new Error((lt(e)||"Unknown")+'.getChildContext(): key "'+A+'" is not defined in childContextTypes.');{var M=lt(e)||"Unknown";Bi(n,C,"child context",M)}return pt({},r,C)}}function Jc(e){{var t=e.stateNode,r=t&&t.__reactInternalMemoizedMergedChildContext||vi;return nf=Nn.current,$r(Nn,r,e),$r(tn,tn.current,e),!0}}function s_(e,t,r){{var i=e.stateNode;if(!i)throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(r){var n=n_(e,t,nf);i.__reactInternalMemoizedMergedChildContext=n,Ur(tn,e),Ur(Nn,e),$r(Nn,n,e),$r(tn,r,e)}else Ur(tn,e),$r(tn,r,e)}}function F1(e){{if(!yC(e)||e.tag!==p)throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var t=e;do{switch(t.tag){case o:return t.stateNode.context;case p:{var r=t.type;if(rn(r))return t.stateNode.__reactInternalMemoizedMergedChildContext;break}}t=t.return}while(t!==null);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var ts=0,Qc=1,kn=null,af=!1,of=!1;function a_(e){kn===null?kn=[e]:kn.push(e)}function j1(e){af=!0,a_(e)}function o_(){af&&rs()}function rs(){if(!of&&kn!==null){of=!0;var e=0,t=Oi();try{var r=!0,i=kn;for(Dr(di);e<i.length;e++){var n=i[e];do n=n(r);while(n!==null)}kn=null,af=!1}catch(f){throw kn!==null&&(kn=kn.slice(e+1)),Tm(pc,rs),f}finally{Dr(t),of=!1}}return null}var Ma=[],Oa=0,Zc=null,eu=0,Si=[],Ci=0,Fs=null,Rn=1,An="";function V1(e){return Vs(),(e.flags&Em)!==Je}function H1(e){return Vs(),eu}function U1(){var e=An,t=Rn,r=t&~$1(t);return r.toString(32)+e}function js(e,t){Vs(),Ma[Oa++]=eu,Ma[Oa++]=Zc,Zc=e,eu=t}function l_(e,t,r){Vs(),Si[Ci++]=Rn,Si[Ci++]=An,Si[Ci++]=Fs,Fs=e;var i=Rn,n=An,f=tu(i)-1,C=i&~(1<<f),A=r+1,M=tu(t)+f;if(M>30){var z=f-f%5,G=(1<<z)-1,se=(C&G).toString(32),ne=C>>z,de=f-z,pe=tu(t)+de,ge=A<<de,Le=ge|ne,qe=se+n;Rn=1<<pe|Le,An=qe}else{var $e=A<<f,Et=$e|C,_t=n;Rn=1<<M|Et,An=_t}}function lf(e){Vs();var t=e.return;if(t!==null){var r=1,i=0;js(e,r),l_(e,r,i)}}function tu(e){return 32-Im(e)}function $1(e){return 1<<tu(e)-1}function cf(e){for(;e===Zc;)Zc=Ma[--Oa],Ma[Oa]=null,eu=Ma[--Oa],Ma[Oa]=null;for(;e===Fs;)Fs=Si[--Ci],Si[Ci]=null,An=Si[--Ci],Si[Ci]=null,Rn=Si[--Ci],Si[Ci]=null}function z1(){return Vs(),Fs!==null?{id:Rn,overflow:An}:null}function W1(e,t){Vs(),Si[Ci++]=Rn,Si[Ci++]=An,Si[Ci++]=Fs,Rn=t.id,An=t.overflow,Fs=e}function Vs(){Rr()||R("Expected to be hydrating. This is a bug in React. Please file an issue.")}var kr=null,Ei=null,Pi=!1,Hs=!1,is=null;function q1(){Pi&&R("We should not be hydrating here. This is a bug in React. Please file a bug.")}function c_(){Hs=!0}function G1(){return Hs}function Y1(e){var t=e.stateNode.containerInfo;return Ei=d1(t),kr=e,Pi=!0,is=null,Hs=!1,!0}function K1(e,t,r){return Ei=f1(t),kr=e,Pi=!0,is=null,Hs=!1,r!==null&&W1(e,r),!0}function u_(e,t){switch(e.tag){case o:{E1(e.stateNode.containerInfo,t);break}case _:{var r=(e.mode&St)!==Ke;w1(e.type,e.memoizedProps,e.stateNode,t,r);break}case x:{var i=e.memoizedState;i.dehydrated!==null&&x1(i.dehydrated,t);break}}}function h_(e,t){u_(e,t);var r=Zk();r.stateNode=t,r.return=e;var i=e.deletions;i===null?(e.deletions=[r],e.flags|=ws):i.push(r)}function uf(e,t){{if(Hs)return;switch(e.tag){case o:{var r=e.stateNode.containerInfo;switch(t.tag){case _:var i=t.type;t.pendingProps,D1(r,i);break;case E:var n=t.pendingProps;N1(r,n);break}break}case _:{var f=e.type,C=e.memoizedProps,A=e.stateNode;switch(t.tag){case _:{var M=t.type,z=t.pendingProps,G=(e.mode&St)!==Ke;A1(f,C,A,M,z,G);break}case E:{var se=t.pendingProps,ne=(e.mode&St)!==Ke;T1(f,C,A,se,ne);break}}break}case x:{var de=e.memoizedState,pe=de.dehydrated;if(pe!==null)switch(t.tag){case _:var ge=t.type;t.pendingProps,k1(pe,ge);break;case E:var Le=t.pendingProps;R1(pe,Le);break}break}default:return}}}function d_(e,t){t.flags=t.flags&~Sn|cr,uf(e,t)}function f_(e,t){switch(e.tag){case _:{var r=e.type;e.pendingProps;var i=a1(t,r);return i!==null?(e.stateNode=i,kr=e,Ei=h1(i),!0):!1}case E:{var n=e.pendingProps,f=o1(t,n);return f!==null?(e.stateNode=f,kr=e,Ei=null,!0):!1}case x:{var C=l1(t);if(C!==null){var A={dehydrated:C,treeContext:z1(),retryLane:ui};e.memoizedState=A;var M=eR(C);return M.return=e,e.child=M,kr=e,Ei=null,!0}return!1}default:return!1}}function hf(e){return(e.mode&St)!==Ke&&(e.flags&Rt)===Je}function df(e){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function ff(e){if(Pi){var t=Ei;if(!t){hf(e)&&(uf(kr,e),df()),d_(kr,e),Pi=!1,kr=e;return}var r=t;if(!f_(e,t)){hf(e)&&(uf(kr,e),df()),t=sl(r);var i=kr;if(!t||!f_(e,t)){d_(kr,e),Pi=!1,kr=e;return}h_(i,r)}}}function X1(e,t,r){var i=e.stateNode,n=!Hs,f=p1(i,e.type,e.memoizedProps,t,r,e,n);return e.updateQueue=f,f!==null}function J1(e){var t=e.stateNode,r=e.memoizedProps,i=v1(t,r,e);if(i){var n=kr;if(n!==null)switch(n.tag){case o:{var f=n.stateNode.containerInfo,C=(n.mode&St)!==Ke;S1(f,t,r,C);break}case _:{var A=n.type,M=n.memoizedProps,z=n.stateNode,G=(n.mode&St)!==Ke;C1(A,M,z,t,r,G);break}}}return i}function Q1(e){var t=e.memoizedState,r=t!==null?t.dehydrated:null;if(!r)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");m1(r,e)}function Z1(e){var t=e.memoizedState,r=t!==null?t.dehydrated:null;if(!r)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return g1(r)}function p_(e){for(var t=e.return;t!==null&&t.tag!==_&&t.tag!==o&&t.tag!==x;)t=t.return;kr=t}function ru(e){if(e!==kr)return!1;if(!Pi)return p_(e),Pi=!0,!1;if(e.tag!==o&&(e.tag!==_||y1(e.type)&&!Gd(e.type,e.memoizedProps))){var t=Ei;if(t)if(hf(e))v_(e),df();else for(;t;)h_(e,t),t=sl(t)}return p_(e),e.tag===x?Ei=Z1(e):Ei=kr?sl(e.stateNode):null,!0}function eD(){return Pi&&Ei!==null}function v_(e){for(var t=Ei;t;)u_(e,t),t=sl(t)}function Ba(){kr=null,Ei=null,Pi=!1,Hs=!1}function m_(){is!==null&&(cy(is),is=null)}function Rr(){return Pi}function pf(e){is===null?is=[e]:is.push(e)}var tD=O.ReactCurrentBatchConfig,rD=null;function iD(){return tD.transition}var Ii={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var nD=function(e){for(var t=null,r=e;r!==null;)r.mode&rr&&(t=r),r=r.return;return t},Us=function(e){var t=[];return e.forEach(function(r){t.push(r)}),t.sort().join(", ")},cl=[],ul=[],hl=[],dl=[],fl=[],pl=[],$s=new Set;Ii.recordUnsafeLifecycleWarnings=function(e,t){$s.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&cl.push(e),e.mode&rr&&typeof t.UNSAFE_componentWillMount=="function"&&ul.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&hl.push(e),e.mode&rr&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&dl.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&fl.push(e),e.mode&rr&&typeof t.UNSAFE_componentWillUpdate=="function"&&pl.push(e))},Ii.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;cl.length>0&&(cl.forEach(function(ne){e.add(lt(ne)||"Component"),$s.add(ne.type)}),cl=[]);var t=new Set;ul.length>0&&(ul.forEach(function(ne){t.add(lt(ne)||"Component"),$s.add(ne.type)}),ul=[]);var r=new Set;hl.length>0&&(hl.forEach(function(ne){r.add(lt(ne)||"Component"),$s.add(ne.type)}),hl=[]);var i=new Set;dl.length>0&&(dl.forEach(function(ne){i.add(lt(ne)||"Component"),$s.add(ne.type)}),dl=[]);var n=new Set;fl.length>0&&(fl.forEach(function(ne){n.add(lt(ne)||"Component"),$s.add(ne.type)}),fl=[]);var f=new Set;if(pl.length>0&&(pl.forEach(function(ne){f.add(lt(ne)||"Component"),$s.add(ne.type)}),pl=[]),t.size>0){var C=Us(t);R(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
92
+
93
+ * Move code with side effects to componentDidMount, and set initial state in the constructor.
94
+
95
+ Please update the following components: %s`,C)}if(i.size>0){var A=Us(i);R(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
96
+
97
+ * Move data fetching code or side effects to componentDidUpdate.
98
+ * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
99
+
100
+ Please update the following components: %s`,A)}if(f.size>0){var M=Us(f);R(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
101
+
102
+ * Move data fetching code or side effects to componentDidUpdate.
103
+
104
+ Please update the following components: %s`,M)}if(e.size>0){var z=Us(e);J(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
105
+
106
+ * Move code with side effects to componentDidMount, and set initial state in the constructor.
107
+ * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
108
+
109
+ Please update the following components: %s`,z)}if(r.size>0){var G=Us(r);J(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
110
+
111
+ * Move data fetching code or side effects to componentDidUpdate.
112
+ * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
113
+ * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
114
+
115
+ Please update the following components: %s`,G)}if(n.size>0){var se=Us(n);J(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
116
+
117
+ * Move data fetching code or side effects to componentDidUpdate.
118
+ * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
119
+
120
+ Please update the following components: %s`,se)}};var iu=new Map,g_=new Set;Ii.recordLegacyContextWarning=function(e,t){var r=nD(e);if(r===null){R("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!g_.has(e.type)){var i=iu.get(r);(e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(i===void 0&&(i=[],iu.set(r,i)),i.push(e))}},Ii.flushLegacyContextWarning=function(){iu.forEach(function(e,t){if(e.length!==0){var r=e[0],i=new Set;e.forEach(function(f){i.add(lt(f)||"Component"),g_.add(f.type)});var n=Us(i);try{Xt(r),R(`Legacy context API has been detected within a strict-mode tree.
121
+
122
+ The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
123
+
124
+ Please update the following components: %s
125
+
126
+ Learn more about this warning here: https://reactjs.org/link/legacy-context`,n)}finally{Cr()}}})},Ii.discardPendingWarnings=function(){cl=[],ul=[],hl=[],dl=[],fl=[],pl=[],iu=new Map}}var vf,mf,gf,_f,bf,__=function(e,t){};vf=!1,mf=!1,gf={},_f={},bf={},__=function(e,t){if(!(e===null||typeof e!="object")&&!(!e._store||e._store.validated||e.key!=null)){if(typeof e._store!="object")throw new Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");e._store.validated=!0;var r=lt(t)||"Component";_f[r]||(_f[r]=!0,R('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};function sD(e){return e.prototype&&e.prototype.isReactComponent}function vl(e,t,r){var i=r.ref;if(i!==null&&typeof i!="function"&&typeof i!="object"){if((e.mode&rr||Y)&&!(r._owner&&r._self&&r._owner.stateNode!==r._self)&&!(r._owner&&r._owner.tag!==p)&&!(typeof r.type=="function"&&!sD(r.type))&&r._owner){var n=lt(e)||"Component";gf[n]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',n,i),gf[n]=!0)}if(r._owner){var f=r._owner,C;if(f){var A=f;if(A.tag!==p)throw new Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");C=A.stateNode}if(!C)throw new Error("Missing owner for string ref "+i+". This error is likely caused by a bug in React. Please file an issue.");var M=C;tr(i,"ref");var z=""+i;if(t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===z)return t.ref;var G=function(se){var ne=M.refs;se===null?delete ne[z]:ne[z]=se};return G._stringRef=z,G}else{if(typeof i!="string")throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!r._owner)throw new Error("Element ref was specified as a string ("+i+`) but no owner was set. This could happen for one of the following reasons:
127
+ 1. You may be adding a ref to a function component
128
+ 2. You may be adding a ref to a component that was not created inside a component's render method
129
+ 3. You have multiple copies of React loaded
130
+ See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return i}function nu(e,t){var r=Object.prototype.toString.call(t);throw new Error("Objects are not valid as a React child (found: "+(r==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}function su(e){{var t=lt(e)||"Component";if(bf[t])return;bf[t]=!0,R("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function b_(e){var t=e._payload,r=e._init;return r(t)}function y_(e){function t(oe,_e){if(e){var le=oe.deletions;le===null?(oe.deletions=[_e],oe.flags|=ws):le.push(_e)}}function r(oe,_e){if(!e)return null;for(var le=_e;le!==null;)t(oe,le),le=le.sibling;return null}function i(oe,_e){for(var le=new Map,we=_e;we!==null;)we.key!==null?le.set(we.key,we):le.set(we.index,we),we=we.sibling;return le}function n(oe,_e){var le=Qs(oe,_e);return le.index=0,le.sibling=null,le}function f(oe,_e,le){if(oe.index=le,!e)return oe.flags|=Em,_e;var we=oe.alternate;if(we!==null){var Ie=we.index;return Ie<_e?(oe.flags|=cr,_e):Ie}else return oe.flags|=cr,_e}function C(oe){return e&&oe.alternate===null&&(oe.flags|=cr),oe}function A(oe,_e,le,we){if(_e===null||_e.tag!==E){var Ie=pv(le,oe.mode,we);return Ie.return=oe,Ie}else{var Oe=n(_e,le);return Oe.return=oe,Oe}}function M(oe,_e,le,we){var Ie=le.type;if(Ie===bi)return G(oe,_e,le.props.children,we,le.key);if(_e!==null&&(_e.elementType===Ie||wy(_e,le)||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===Ye&&b_(Ie)===_e.type)){var Oe=n(_e,le.props);return Oe.ref=vl(oe,_e,le),Oe.return=oe,Oe._debugSource=le._source,Oe._debugOwner=le._owner,Oe}var Ze=fv(le,oe.mode,we);return Ze.ref=vl(oe,_e,le),Ze.return=oe,Ze}function z(oe,_e,le,we){if(_e===null||_e.tag!==v||_e.stateNode.containerInfo!==le.containerInfo||_e.stateNode.implementation!==le.implementation){var Ie=vv(le,oe.mode,we);return Ie.return=oe,Ie}else{var Oe=n(_e,le.children||[]);return Oe.return=oe,Oe}}function G(oe,_e,le,we,Ie){if(_e===null||_e.tag!==d){var Oe=ps(le,oe.mode,we,Ie);return Oe.return=oe,Oe}else{var Ze=n(_e,le);return Ze.return=oe,Ze}}function se(oe,_e,le){if(typeof _e=="string"&&_e!==""||typeof _e=="number"){var we=pv(""+_e,oe.mode,le);return we.return=oe,we}if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case Fr:{var Ie=fv(_e,oe.mode,le);return Ie.ref=vl(oe,null,_e),Ie.return=oe,Ie}case jr:{var Oe=vv(_e,oe.mode,le);return Oe.return=oe,Oe}case Ye:{var Ze=_e._payload,st=_e._init;return se(oe,st(Ze),le)}}if(gt(_e)||Ti(_e)){var Pt=ps(_e,oe.mode,le,null);return Pt.return=oe,Pt}nu(oe,_e)}return typeof _e=="function"&&su(oe),null}function ne(oe,_e,le,we){var Ie=_e!==null?_e.key:null;if(typeof le=="string"&&le!==""||typeof le=="number")return Ie!==null?null:A(oe,_e,""+le,we);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case Fr:return le.key===Ie?M(oe,_e,le,we):null;case jr:return le.key===Ie?z(oe,_e,le,we):null;case Ye:{var Oe=le._payload,Ze=le._init;return ne(oe,_e,Ze(Oe),we)}}if(gt(le)||Ti(le))return Ie!==null?null:G(oe,_e,le,we,null);nu(oe,le)}return typeof le=="function"&&su(oe),null}function de(oe,_e,le,we,Ie){if(typeof we=="string"&&we!==""||typeof we=="number"){var Oe=oe.get(le)||null;return A(_e,Oe,""+we,Ie)}if(typeof we=="object"&&we!==null){switch(we.$$typeof){case Fr:{var Ze=oe.get(we.key===null?le:we.key)||null;return M(_e,Ze,we,Ie)}case jr:{var st=oe.get(we.key===null?le:we.key)||null;return z(_e,st,we,Ie)}case Ye:var Pt=we._payload,xt=we._init;return de(oe,_e,le,xt(Pt),Ie)}if(gt(we)||Ti(we)){var ar=oe.get(le)||null;return G(_e,ar,we,Ie,null)}nu(_e,we)}return typeof we=="function"&&su(_e),null}function pe(oe,_e,le){{if(typeof oe!="object"||oe===null)return _e;switch(oe.$$typeof){case Fr:case jr:__(oe,le);var we=oe.key;if(typeof we!="string")break;if(_e===null){_e=new Set,_e.add(we);break}if(!_e.has(we)){_e.add(we);break}R("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",we);break;case Ye:var Ie=oe._payload,Oe=oe._init;pe(Oe(Ie),_e,le);break}}return _e}function ge(oe,_e,le,we){for(var Ie=null,Oe=0;Oe<le.length;Oe++){var Ze=le[Oe];Ie=pe(Ze,Ie,oe)}for(var st=null,Pt=null,xt=_e,ar=0,wt=0,ir=null;xt!==null&&wt<le.length;wt++){xt.index>wt?(ir=xt,xt=null):ir=xt.sibling;var Wr=ne(oe,xt,le[wt],we);if(Wr===null){xt===null&&(xt=ir);break}e&&xt&&Wr.alternate===null&&t(oe,xt),ar=f(Wr,ar,wt),Pt===null?st=Wr:Pt.sibling=Wr,Pt=Wr,xt=ir}if(wt===le.length){if(r(oe,xt),Rr()){var Pr=wt;js(oe,Pr)}return st}if(xt===null){for(;wt<le.length;wt++){var gi=se(oe,le[wt],we);gi!==null&&(ar=f(gi,ar,wt),Pt===null?st=gi:Pt.sibling=gi,Pt=gi)}if(Rr()){var ei=wt;js(oe,ei)}return st}for(var ti=i(oe,xt);wt<le.length;wt++){var qr=de(ti,oe,wt,le[wt],we);qr!==null&&(e&&qr.alternate!==null&&ti.delete(qr.key===null?wt:qr.key),ar=f(qr,ar,wt),Pt===null?st=qr:Pt.sibling=qr,Pt=qr)}if(e&&ti.forEach(function(eo){return t(oe,eo)}),Rr()){var In=wt;js(oe,In)}return st}function Le(oe,_e,le,we){var Ie=Ti(le);if(typeof Ie!="function")throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{typeof Symbol=="function"&&le[Symbol.toStringTag]==="Generator"&&(mf||R("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),mf=!0),le.entries===Ie&&(vf||R("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),vf=!0);var Oe=Ie.call(le);if(Oe)for(var Ze=null,st=Oe.next();!st.done;st=Oe.next()){var Pt=st.value;Ze=pe(Pt,Ze,oe)}}var xt=Ie.call(le);if(xt==null)throw new Error("An iterable object provided no iterator.");for(var ar=null,wt=null,ir=_e,Wr=0,Pr=0,gi=null,ei=xt.next();ir!==null&&!ei.done;Pr++,ei=xt.next()){ir.index>Pr?(gi=ir,ir=null):gi=ir.sibling;var ti=ne(oe,ir,ei.value,we);if(ti===null){ir===null&&(ir=gi);break}e&&ir&&ti.alternate===null&&t(oe,ir),Wr=f(ti,Wr,Pr),wt===null?ar=ti:wt.sibling=ti,wt=ti,ir=gi}if(ei.done){if(r(oe,ir),Rr()){var qr=Pr;js(oe,qr)}return ar}if(ir===null){for(;!ei.done;Pr++,ei=xt.next()){var In=se(oe,ei.value,we);In!==null&&(Wr=f(In,Wr,Pr),wt===null?ar=In:wt.sibling=In,wt=In)}if(Rr()){var eo=Pr;js(oe,eo)}return ar}for(var Gl=i(oe,ir);!ei.done;Pr++,ei=xt.next()){var hn=de(Gl,oe,Pr,ei.value,we);hn!==null&&(e&&hn.alternate!==null&&Gl.delete(hn.key===null?Pr:hn.key),Wr=f(hn,Wr,Pr),wt===null?ar=hn:wt.sibling=hn,wt=hn)}if(e&&Gl.forEach(function(TR){return t(oe,TR)}),Rr()){var AR=Pr;js(oe,AR)}return ar}function qe(oe,_e,le,we){if(_e!==null&&_e.tag===E){r(oe,_e.sibling);var Ie=n(_e,le);return Ie.return=oe,Ie}r(oe,_e);var Oe=pv(le,oe.mode,we);return Oe.return=oe,Oe}function $e(oe,_e,le,we){for(var Ie=le.key,Oe=_e;Oe!==null;){if(Oe.key===Ie){var Ze=le.type;if(Ze===bi){if(Oe.tag===d){r(oe,Oe.sibling);var st=n(Oe,le.props.children);return st.return=oe,st._debugSource=le._source,st._debugOwner=le._owner,st}}else if(Oe.elementType===Ze||wy(Oe,le)||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===Ye&&b_(Ze)===Oe.type){r(oe,Oe.sibling);var Pt=n(Oe,le.props);return Pt.ref=vl(oe,Oe,le),Pt.return=oe,Pt._debugSource=le._source,Pt._debugOwner=le._owner,Pt}r(oe,Oe);break}else t(oe,Oe);Oe=Oe.sibling}if(le.type===bi){var xt=ps(le.props.children,oe.mode,we,le.key);return xt.return=oe,xt}else{var ar=fv(le,oe.mode,we);return ar.ref=vl(oe,_e,le),ar.return=oe,ar}}function Et(oe,_e,le,we){for(var Ie=le.key,Oe=_e;Oe!==null;){if(Oe.key===Ie)if(Oe.tag===v&&Oe.stateNode.containerInfo===le.containerInfo&&Oe.stateNode.implementation===le.implementation){r(oe,Oe.sibling);var Ze=n(Oe,le.children||[]);return Ze.return=oe,Ze}else{r(oe,Oe);break}else t(oe,Oe);Oe=Oe.sibling}var st=vv(le,oe.mode,we);return st.return=oe,st}function _t(oe,_e,le,we){var Ie=typeof le=="object"&&le!==null&&le.type===bi&&le.key===null;if(Ie&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case Fr:return C($e(oe,_e,le,we));case jr:return C(Et(oe,_e,le,we));case Ye:var Oe=le._payload,Ze=le._init;return _t(oe,_e,Ze(Oe),we)}if(gt(le))return ge(oe,_e,le,we);if(Ti(le))return Le(oe,_e,le,we);nu(oe,le)}return typeof le=="string"&&le!==""||typeof le=="number"?C(qe(oe,_e,""+le,we)):(typeof le=="function"&&su(oe),r(oe,_e))}return _t}var Pa=y_(!0),S_=y_(!1);function aD(e,t){if(e!==null&&t.child!==e.child)throw new Error("Resuming work not yet implemented.");if(t.child!==null){var r=t.child,i=Qs(r,r.pendingProps);for(t.child=i,i.return=t;r.sibling!==null;)r=r.sibling,i=i.sibling=Qs(r,r.pendingProps),i.return=t;i.sibling=null}}function oD(e,t){for(var r=e.child;r!==null;)Yk(r,t),r=r.sibling}var yf=es(null),Sf;Sf={};var au=null,Ia=null,Cf=null,ou=!1;function lu(){au=null,Ia=null,Cf=null,ou=!1}function C_(){ou=!0}function E_(){ou=!1}function x_(e,t,r){$r(yf,t._currentValue,e),t._currentValue=r,t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==Sf&&R("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=Sf}function Ef(e,t){var r=yf.current;Ur(yf,t),e._currentValue=r}function xf(e,t,r){for(var i=e;i!==null;){var n=i.alternate;if(Sa(i.childLanes,t)?n!==null&&!Sa(n.childLanes,t)&&(n.childLanes=dt(n.childLanes,t)):(i.childLanes=dt(i.childLanes,t),n!==null&&(n.childLanes=dt(n.childLanes,t))),i===r)break;i=i.return}i!==r&&R("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function lD(e,t,r){cD(e,t,r)}function cD(e,t,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var n=void 0,f=i.dependencies;if(f!==null){n=i.child;for(var C=f.firstContext;C!==null;){if(C.context===t){if(i.tag===p){var A=Mo(r),M=Tn(Wt,A);M.tag=uu;var z=i.updateQueue;if(z!==null){var G=z.shared,se=G.pending;se===null?M.next=M:(M.next=se.next,se.next=M),G.pending=M}}i.lanes=dt(i.lanes,r);var ne=i.alternate;ne!==null&&(ne.lanes=dt(ne.lanes,r)),xf(i.return,r,e),f.lanes=dt(f.lanes,r);break}C=C.next}}else if(i.tag===l)n=i.type===e.type?null:i.child;else if(i.tag===k){var de=i.return;if(de===null)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");de.lanes=dt(de.lanes,r);var pe=de.alternate;pe!==null&&(pe.lanes=dt(pe.lanes,r)),xf(de,r,e),n=i.sibling}else n=i.child;if(n!==null)n.return=i;else for(n=i;n!==null;){if(n===e){n=null;break}var ge=n.sibling;if(ge!==null){ge.return=n.return,n=ge;break}n=n.return}i=n}}function Fa(e,t){au=e,Ia=null,Cf=null;var r=e.dependencies;if(r!==null){var i=r.firstContext;i!==null&&(hi(r.lanes,t)&&Al(),r.firstContext=null)}}function ur(e){ou&&R("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var t=e._currentValue;if(Cf!==e){var r={context:e,memoizedValue:t,next:null};if(Ia===null){if(au===null)throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Ia=r,au.dependencies={lanes:Se,firstContext:r}}else Ia=Ia.next=r}return t}var zs=null;function wf(e){zs===null?zs=[e]:zs.push(e)}function uD(){if(zs!==null){for(var e=0;e<zs.length;e++){var t=zs[e],r=t.interleaved;if(r!==null){t.interleaved=null;var i=r.next,n=t.pending;if(n!==null){var f=n.next;n.next=i,r.next=f}t.pending=r}}zs=null}}function w_(e,t,r,i){var n=t.interleaved;return n===null?(r.next=r,wf(t)):(r.next=n.next,n.next=r),t.interleaved=r,cu(e,i)}function hD(e,t,r,i){var n=t.interleaved;n===null?(r.next=r,wf(t)):(r.next=n.next,n.next=r),t.interleaved=r}function dD(e,t,r,i){var n=t.interleaved;return n===null?(r.next=r,wf(t)):(r.next=n.next,n.next=r),t.interleaved=r,cu(e,i)}function si(e,t){return cu(e,t)}var fD=cu;function cu(e,t){e.lanes=dt(e.lanes,t);var r=e.alternate;r!==null&&(r.lanes=dt(r.lanes,t)),r===null&&(e.flags&(cr|Sn))!==Je&&Sy(e);for(var i=e,n=e.return;n!==null;)n.childLanes=dt(n.childLanes,t),r=n.alternate,r!==null?r.childLanes=dt(r.childLanes,t):(n.flags&(cr|Sn))!==Je&&Sy(e),i=n,n=n.return;if(i.tag===o){var f=i.stateNode;return f}else return null}var D_=0,N_=1,uu=2,Df=3,hu=!1,Nf,du;Nf=!1,du=null;function kf(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:Se},effects:null};e.updateQueue=t}function k_(e,t){var r=t.updateQueue,i=e.updateQueue;if(r===i){var n={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects};t.updateQueue=n}}function Tn(e,t){var r={eventTime:e,lane:t,tag:D_,payload:null,callback:null,next:null};return r}function ns(e,t,r){var i=e.updateQueue;if(i===null)return null;var n=i.shared;if(du===n&&!Nf&&(R("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),Nf=!0),hk()){var f=n.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),n.pending=t,fD(e,r)}else return dD(e,n,t,r)}function fu(e,t,r){var i=t.updateQueue;if(i!==null){var n=i.shared;if(Hm(r)){var f=n.lanes;f=$m(f,e.pendingLanes);var C=dt(f,r);n.lanes=C,bd(e,C)}}}function Rf(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null){var n=i.updateQueue;if(r===n){var f=null,C=null,A=r.firstBaseUpdate;if(A!==null){var M=A;do{var z={eventTime:M.eventTime,lane:M.lane,tag:M.tag,payload:M.payload,callback:M.callback,next:null};C===null?f=C=z:(C.next=z,C=z),M=M.next}while(M!==null);C===null?f=C=t:(C.next=t,C=t)}else f=C=t;r={baseState:n.baseState,firstBaseUpdate:f,lastBaseUpdate:C,shared:n.shared,effects:n.effects},e.updateQueue=r;return}}var G=r.lastBaseUpdate;G===null?r.firstBaseUpdate=t:G.next=t,r.lastBaseUpdate=t}function pD(e,t,r,i,n,f){switch(r.tag){case N_:{var C=r.payload;if(typeof C=="function"){C_();var A=C.call(f,i,n);{if(e.mode&rr){xr(!0);try{C.call(f,i,n)}finally{xr(!1)}}E_()}return A}return C}case Df:e.flags=e.flags&~Xr|Rt;case D_:{var M=r.payload,z;if(typeof M=="function"){C_(),z=M.call(f,i,n);{if(e.mode&rr){xr(!0);try{M.call(f,i,n)}finally{xr(!1)}}E_()}}else z=M;return z==null?i:pt({},i,z)}case uu:return hu=!0,i}return i}function pu(e,t,r,i){var n=e.updateQueue;hu=!1,du=n.shared;var f=n.firstBaseUpdate,C=n.lastBaseUpdate,A=n.shared.pending;if(A!==null){n.shared.pending=null;var M=A,z=M.next;M.next=null,C===null?f=z:C.next=z,C=M;var G=e.alternate;if(G!==null){var se=G.updateQueue,ne=se.lastBaseUpdate;ne!==C&&(ne===null?se.firstBaseUpdate=z:ne.next=z,se.lastBaseUpdate=M)}}if(f!==null){var de=n.baseState,pe=Se,ge=null,Le=null,qe=null,$e=f;do{var Et=$e.lane,_t=$e.eventTime;if(Sa(i,Et)){if(qe!==null){var _e={eventTime:_t,lane:wr,tag:$e.tag,payload:$e.payload,callback:$e.callback,next:null};qe=qe.next=_e}de=pD(e,n,$e,de,t,r);var le=$e.callback;if(le!==null&&$e.lane!==wr){e.flags|=Cm;var we=n.effects;we===null?n.effects=[$e]:we.push($e)}}else{var oe={eventTime:_t,lane:Et,tag:$e.tag,payload:$e.payload,callback:$e.callback,next:null};qe===null?(Le=qe=oe,ge=de):qe=qe.next=oe,pe=dt(pe,Et)}if($e=$e.next,$e===null){if(A=n.shared.pending,A===null)break;var Ie=A,Oe=Ie.next;Ie.next=null,$e=Oe,n.lastBaseUpdate=Ie,n.shared.pending=null}}while(!0);qe===null&&(ge=de),n.baseState=ge,n.firstBaseUpdate=Le,n.lastBaseUpdate=qe;var Ze=n.shared.interleaved;if(Ze!==null){var st=Ze;do pe=dt(pe,st.lane),st=st.next;while(st!==Ze)}else f===null&&(n.shared.lanes=Se);Ul(pe),e.lanes=pe,e.memoizedState=de}du=null}function vD(e,t){if(typeof e!="function")throw new Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+e));e.call(t)}function R_(){hu=!1}function vu(){return hu}function A_(e,t,r){var i=t.effects;if(t.effects=null,i!==null)for(var n=0;n<i.length;n++){var f=i[n],C=f.callback;C!==null&&(f.callback=null,vD(C,r))}}var ml={},ss=es(ml),gl=es(ml),mu=es(ml);function gu(e){if(e===ml)throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return e}function T_(){var e=gu(mu.current);return e}function Af(e,t){$r(mu,t,e),$r(gl,e,e),$r(ss,ml,e);var r=Lw(t);Ur(ss,e),$r(ss,r,e)}function ja(e){Ur(ss,e),Ur(gl,e),Ur(mu,e)}function Tf(){var e=gu(ss.current);return e}function L_(e){gu(mu.current);var t=gu(ss.current),r=Mw(t,e.type);t!==r&&($r(gl,e,e),$r(ss,r,e))}function Lf(e){gl.current===e&&(Ur(ss,e),Ur(gl,e))}var mD=0,M_=1,O_=1,_l=2,Fi=es(mD);function Mf(e,t){return(e&t)!==0}function Va(e){return e&M_}function Of(e,t){return e&M_|t}function gD(e,t){return e|t}function as(e,t){$r(Fi,t,e)}function Ha(e){Ur(Fi,e)}function _D(e,t){var r=e.memoizedState;return r!==null?r.dehydrated!==null:(e.memoizedProps,!0)}function _u(e){for(var t=e;t!==null;){if(t.tag===x){var r=t.memoizedState;if(r!==null){var i=r.dehydrated;if(i===null||Jg(i)||Jd(i))return t}}else if(t.tag===I&&t.memoizedProps.revealOrder!==void 0){var n=(t.flags&Rt)!==Je;if(n)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)return null;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 ai=0,pr=1,nn=2,vr=4,Ar=8,Bf=[];function Pf(){for(var e=0;e<Bf.length;e++){var t=Bf[e];t._workInProgressVersionPrimary=null}Bf.length=0}function bD(e,t){var r=t._getVersion,i=r(t._source);e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,i]:e.mutableSourceEagerHydrationData.push(t,i)}var Pe=O.ReactCurrentDispatcher,bl=O.ReactCurrentBatchConfig,If,Ua;If=new Set;var Ws=Se,Bt=null,mr=null,gr=null,bu=!1,yl=!1,Sl=0,yD=0,SD=25,be=null,xi=null,os=-1,Ff=!1;function At(){{var e=be;xi===null?xi=[e]:xi.push(e)}}function Te(){{var e=be;xi!==null&&(os++,xi[os]!==e&&CD(e))}}function $a(e){e!=null&&!gt(e)&&R("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",be,typeof e)}function CD(e){{var t=lt(Bt);if(!If.has(t)&&(If.add(t),xi!==null)){for(var r="",i=30,n=0;n<=os;n++){for(var f=xi[n],C=n===os?e:f,A=n+1+". "+f;A.length<i;)A+=" ";A+=C+`
131
+ `,r+=A}R(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks
132
+
133
+ Previous render Next render
134
+ ------------------------------------------------------
135
+ %s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136
+ `,t,r)}}}function zr(){throw new Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
137
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
138
+ 2. You might be breaking the Rules of Hooks
139
+ 3. You might have more than one copy of React in the same app
140
+ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function jf(e,t){if(Ff)return!1;if(t===null)return R("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",be),!1;e.length!==t.length&&R(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
141
+
142
+ Previous: %s
143
+ Incoming: %s`,be,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var r=0;r<t.length&&r<e.length;r++)if(!pi(e[r],t[r]))return!1;return!0}function za(e,t,r,i,n,f){Ws=f,Bt=t,xi=e!==null?e._debugHookTypes:null,os=-1,Ff=e!==null&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=Se,e!==null&&e.memoizedState!==null?Pe.current=rb:xi!==null?Pe.current=tb:Pe.current=eb;var C=r(i,n);if(yl){var A=0;do{if(yl=!1,Sl=0,A>=SD)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");A+=1,Ff=!1,mr=null,gr=null,t.updateQueue=null,os=-1,Pe.current=ib,C=r(i,n)}while(yl)}Pe.current=Lu,t._debugHookTypes=xi;var M=mr!==null&&mr.next!==null;if(Ws=Se,Bt=null,mr=null,gr=null,be=null,xi=null,os=-1,e!==null&&(e.flags&Cn)!==(t.flags&Cn)&&(e.mode&St)!==Ke&&R("Internal React error: Expected static flag was missing. Please notify the React team."),bu=!1,M)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return C}function Wa(){var e=Sl!==0;return Sl=0,e}function B_(e,t,r){t.updateQueue=e.updateQueue,(t.mode&Zi)!==Ke?t.flags&=-50333701:t.flags&=-2053,e.lanes=yc(e.lanes,r)}function P_(){if(Pe.current=Lu,bu){for(var e=Bt.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bu=!1}Ws=Se,Bt=null,mr=null,gr=null,xi=null,os=-1,be=null,K_=!1,yl=!1,Sl=0}function sn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gr===null?Bt.memoizedState=gr=e:gr=gr.next=e,gr}function wi(){var e;if(mr===null){var t=Bt.alternate;t!==null?e=t.memoizedState:e=null}else e=mr.next;var r;if(gr===null?r=Bt.memoizedState:r=gr.next,r!==null)gr=r,r=gr.next,mr=e;else{if(e===null)throw new Error("Rendered more hooks than during the previous render.");mr=e;var i={memoizedState:mr.memoizedState,baseState:mr.baseState,baseQueue:mr.baseQueue,queue:mr.queue,next:null};gr===null?Bt.memoizedState=gr=i:gr=gr.next=i}return gr}function I_(){return{lastEffect:null,stores:null}}function Vf(e,t){return typeof t=="function"?t(e):t}function Hf(e,t,r){var i=sn(),n;r!==void 0?n=r(t):n=t,i.memoizedState=i.baseState=n;var f={pending:null,interleaved:null,lanes:Se,dispatch:null,lastRenderedReducer:e,lastRenderedState:n};i.queue=f;var C=f.dispatch=DD.bind(null,Bt,f);return[i.memoizedState,C]}function Uf(e,t,r){var i=wi(),n=i.queue;if(n===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");n.lastRenderedReducer=e;var f=mr,C=f.baseQueue,A=n.pending;if(A!==null){if(C!==null){var M=C.next,z=A.next;C.next=z,A.next=M}f.baseQueue!==C&&R("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),f.baseQueue=C=A,n.pending=null}if(C!==null){var G=C.next,se=f.baseState,ne=null,de=null,pe=null,ge=G;do{var Le=ge.lane;if(Sa(Ws,Le)){if(pe!==null){var $e={lane:wr,action:ge.action,hasEagerState:ge.hasEagerState,eagerState:ge.eagerState,next:null};pe=pe.next=$e}if(ge.hasEagerState)se=ge.eagerState;else{var Et=ge.action;se=e(se,Et)}}else{var qe={lane:Le,action:ge.action,hasEagerState:ge.hasEagerState,eagerState:ge.eagerState,next:null};pe===null?(de=pe=qe,ne=se):pe=pe.next=qe,Bt.lanes=dt(Bt.lanes,Le),Ul(Le)}ge=ge.next}while(ge!==null&&ge!==G);pe===null?ne=se:pe.next=de,pi(se,i.memoizedState)||Al(),i.memoizedState=se,i.baseState=ne,i.baseQueue=pe,n.lastRenderedState=se}var _t=n.interleaved;if(_t!==null){var oe=_t;do{var _e=oe.lane;Bt.lanes=dt(Bt.lanes,_e),Ul(_e),oe=oe.next}while(oe!==_t)}else C===null&&(n.lanes=Se);var le=n.dispatch;return[i.memoizedState,le]}function $f(e,t,r){var i=wi(),n=i.queue;if(n===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");n.lastRenderedReducer=e;var f=n.dispatch,C=n.pending,A=i.memoizedState;if(C!==null){n.pending=null;var M=C.next,z=M;do{var G=z.action;A=e(A,G),z=z.next}while(z!==M);pi(A,i.memoizedState)||Al(),i.memoizedState=A,i.baseQueue===null&&(i.baseState=A),n.lastRenderedState=A}return[A,f]}function RT(e,t,r){}function AT(e,t,r){}function zf(e,t,r){var i=Bt,n=sn(),f,C=Rr();if(C){if(r===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");f=r(),Ua||f!==r()&&(R("The result of getServerSnapshot should be cached to avoid an infinite loop"),Ua=!0)}else{if(f=t(),!Ua){var A=t();pi(f,A)||(R("The result of getSnapshot should be cached to avoid an infinite loop"),Ua=!0)}var M=Ju();if(M===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");bc(M,Ws)||F_(i,t,f)}n.memoizedState=f;var z={value:f,getSnapshot:t};return n.queue=z,xu(V_.bind(null,i,z,e),[e]),i.flags|=Wn,Cl(pr|Ar,j_.bind(null,i,z,f,t),void 0,null),f}function yu(e,t,r){var i=Bt,n=wi(),f=t();if(!Ua){var C=t();pi(f,C)||(R("The result of getSnapshot should be cached to avoid an infinite loop"),Ua=!0)}var A=n.memoizedState,M=!pi(A,f);M&&(n.memoizedState=f,Al());var z=n.queue;if(xl(V_.bind(null,i,z,e),[e]),z.getSnapshot!==t||M||gr!==null&&gr.memoizedState.tag&pr){i.flags|=Wn,Cl(pr|Ar,j_.bind(null,i,z,f,t),void 0,null);var G=Ju();if(G===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");bc(G,Ws)||F_(i,t,f)}return f}function F_(e,t,r){e.flags|=jh;var i={getSnapshot:t,value:r},n=Bt.updateQueue;if(n===null)n=I_(),Bt.updateQueue=n,n.stores=[i];else{var f=n.stores;f===null?n.stores=[i]:f.push(i)}}function j_(e,t,r,i){t.value=r,t.getSnapshot=i,H_(t)&&U_(e)}function V_(e,t,r){var i=function(){H_(t)&&U_(e)};return r(i)}function H_(e){var t=e.getSnapshot,r=e.value;try{var i=t();return!pi(r,i)}catch{return!0}}function U_(e){var t=si(e,rt);t!==null&&Sr(t,e,rt,Wt)}function Su(e){var t=sn();typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e;var r={pending:null,interleaved:null,lanes:Se,dispatch:null,lastRenderedReducer:Vf,lastRenderedState:e};t.queue=r;var i=r.dispatch=ND.bind(null,Bt,r);return[t.memoizedState,i]}function Wf(e){return Uf(Vf)}function qf(e){return $f(Vf)}function Cl(e,t,r,i){var n={tag:e,create:t,destroy:r,deps:i,next:null},f=Bt.updateQueue;if(f===null)f=I_(),Bt.updateQueue=f,f.lastEffect=n.next=n;else{var C=f.lastEffect;if(C===null)f.lastEffect=n.next=n;else{var A=C.next;C.next=n,n.next=A,f.lastEffect=n}}return n}function Gf(e){var t=sn();{var r={current:e};return t.memoizedState=r,r}}function Cu(e){var t=wi();return t.memoizedState}function El(e,t,r,i){var n=sn(),f=i===void 0?null:i;Bt.flags|=e,n.memoizedState=Cl(pr|t,r,void 0,f)}function Eu(e,t,r,i){var n=wi(),f=i===void 0?null:i,C=void 0;if(mr!==null){var A=mr.memoizedState;if(C=A.destroy,f!==null){var M=A.deps;if(jf(f,M)){n.memoizedState=Cl(t,r,C,f);return}}}Bt.flags|=e,n.memoizedState=Cl(pr|t,r,C,f)}function xu(e,t){return(Bt.mode&Zi)!==Ke?El($h|Wn|Uh,Ar,e,t):El(Wn|Uh,Ar,e,t)}function xl(e,t){return Eu(Wn,Ar,e,t)}function Yf(e,t){return El(kt,nn,e,t)}function wu(e,t){return Eu(kt,nn,e,t)}function Kf(e,t){var r=kt;return r|=ks,(Bt.mode&Zi)!==Ke&&(r|=qn),El(r,vr,e,t)}function Du(e,t){return Eu(kt,vr,e,t)}function $_(e,t){if(typeof t=="function"){var r=t,i=e();return r(i),function(){r(null)}}else if(t!=null){var n=t;n.hasOwnProperty("current")||R("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(n).join(", ")+"}");var f=e();return n.current=f,function(){n.current=null}}}function Xf(e,t,r){typeof t!="function"&&R("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var i=r!=null?r.concat([e]):null,n=kt;return n|=ks,(Bt.mode&Zi)!==Ke&&(n|=qn),El(n,vr,$_.bind(null,t,e),i)}function Nu(e,t,r){typeof t!="function"&&R("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var i=r!=null?r.concat([e]):null;return Eu(kt,vr,$_.bind(null,t,e),i)}function ED(e,t){}var ku=ED;function Jf(e,t){var r=sn(),i=t===void 0?null:t;return r.memoizedState=[e,i],e}function Ru(e,t){var r=wi(),i=t===void 0?null:t,n=r.memoizedState;if(n!==null&&i!==null){var f=n[1];if(jf(i,f))return n[0]}return r.memoizedState=[e,i],e}function Qf(e,t){var r=sn(),i=t===void 0?null:t,n=e();return r.memoizedState=[n,i],n}function Au(e,t){var r=wi(),i=t===void 0?null:t,n=r.memoizedState;if(n!==null&&i!==null){var f=n[1];if(jf(i,f))return n[0]}var C=e();return r.memoizedState=[C,i],C}function Zf(e){var t=sn();return t.memoizedState=e,e}function z_(e){var t=wi(),r=mr,i=r.memoizedState;return q_(t,i,e)}function W_(e){var t=wi();if(mr===null)return t.memoizedState=e,e;var r=mr.memoizedState;return q_(t,r,e)}function q_(e,t,r){var i=!lE(Ws);if(i){if(!pi(r,t)){var n=Um();Bt.lanes=dt(Bt.lanes,n),Ul(n),e.baseState=!0}return t}else return e.baseState&&(e.baseState=!1,Al()),e.memoizedState=r,r}function xD(e,t,r){var i=Oi();Dr(gE(i,xn)),e(!0);var n=bl.transition;bl.transition={};var f=bl.transition;bl.transition._updatedFibers=new Set;try{e(!1),t()}finally{if(Dr(i),bl.transition=n,n===null&&f._updatedFibers){var C=f._updatedFibers.size;C>10&&J("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),f._updatedFibers.clear()}}}function ep(){var e=Su(!1),t=e[0],r=e[1],i=xD.bind(null,r),n=sn();return n.memoizedState=i,[t,i]}function G_(){var e=Wf(),t=e[0],r=wi(),i=r.memoizedState;return[t,i]}function Y_(){var e=qf(),t=e[0],r=wi(),i=r.memoizedState;return[t,i]}var K_=!1;function wD(){return K_}function tp(){var e=sn(),t=Ju(),r=t.identifierPrefix,i;if(Rr()){var n=U1();i=":"+r+"R"+n;var f=Sl++;f>0&&(i+="H"+f.toString(32)),i+=":"}else{var C=yD++;i=":"+r+"r"+C.toString(32)+":"}return e.memoizedState=i,i}function Tu(){var e=wi(),t=e.memoizedState;return t}function DD(e,t,r){typeof arguments[3]=="function"&&R("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var i=ds(e),n={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(X_(e))J_(t,n);else{var f=w_(e,t,n,i);if(f!==null){var C=Zr();Sr(f,e,i,C),Q_(f,t,i)}}Z_(e,i)}function ND(e,t,r){typeof arguments[3]=="function"&&R("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var i=ds(e),n={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(X_(e))J_(t,n);else{var f=e.alternate;if(e.lanes===Se&&(f===null||f.lanes===Se)){var C=t.lastRenderedReducer;if(C!==null){var A;A=Pe.current,Pe.current=ji;try{var M=t.lastRenderedState,z=C(M,r);if(n.hasEagerState=!0,n.eagerState=z,pi(z,M)){hD(e,t,n,i);return}}catch{}finally{Pe.current=A}}}var G=w_(e,t,n,i);if(G!==null){var se=Zr();Sr(G,e,i,se),Q_(G,t,i)}}Z_(e,i)}function X_(e){var t=e.alternate;return e===Bt||t!==null&&t===Bt}function J_(e,t){yl=bu=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Q_(e,t,r){if(Hm(r)){var i=t.lanes;i=$m(i,e.pendingLanes);var n=dt(i,r);t.lanes=n,bd(e,n)}}function Z_(e,t,r){Yh(e,t)}var Lu={readContext:ur,useCallback:zr,useContext:zr,useEffect:zr,useImperativeHandle:zr,useInsertionEffect:zr,useLayoutEffect:zr,useMemo:zr,useReducer:zr,useRef:zr,useState:zr,useDebugValue:zr,useDeferredValue:zr,useTransition:zr,useMutableSource:zr,useSyncExternalStore:zr,useId:zr,unstable_isNewReconciler:ie},eb=null,tb=null,rb=null,ib=null,an=null,ji=null,Mu=null;{var rp=function(){R("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},it=function(){R("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};eb={readContext:function(e){return ur(e)},useCallback:function(e,t){return be="useCallback",At(),$a(t),Jf(e,t)},useContext:function(e){return be="useContext",At(),ur(e)},useEffect:function(e,t){return be="useEffect",At(),$a(t),xu(e,t)},useImperativeHandle:function(e,t,r){return be="useImperativeHandle",At(),$a(r),Xf(e,t,r)},useInsertionEffect:function(e,t){return be="useInsertionEffect",At(),$a(t),Yf(e,t)},useLayoutEffect:function(e,t){return be="useLayoutEffect",At(),$a(t),Kf(e,t)},useMemo:function(e,t){be="useMemo",At(),$a(t);var r=Pe.current;Pe.current=an;try{return Qf(e,t)}finally{Pe.current=r}},useReducer:function(e,t,r){be="useReducer",At();var i=Pe.current;Pe.current=an;try{return Hf(e,t,r)}finally{Pe.current=i}},useRef:function(e){return be="useRef",At(),Gf(e)},useState:function(e){be="useState",At();var t=Pe.current;Pe.current=an;try{return Su(e)}finally{Pe.current=t}},useDebugValue:function(e,t){return be="useDebugValue",At(),void 0},useDeferredValue:function(e){return be="useDeferredValue",At(),Zf(e)},useTransition:function(){return be="useTransition",At(),ep()},useMutableSource:function(e,t,r){return be="useMutableSource",At(),void 0},useSyncExternalStore:function(e,t,r){return be="useSyncExternalStore",At(),zf(e,t,r)},useId:function(){return be="useId",At(),tp()},unstable_isNewReconciler:ie},tb={readContext:function(e){return ur(e)},useCallback:function(e,t){return be="useCallback",Te(),Jf(e,t)},useContext:function(e){return be="useContext",Te(),ur(e)},useEffect:function(e,t){return be="useEffect",Te(),xu(e,t)},useImperativeHandle:function(e,t,r){return be="useImperativeHandle",Te(),Xf(e,t,r)},useInsertionEffect:function(e,t){return be="useInsertionEffect",Te(),Yf(e,t)},useLayoutEffect:function(e,t){return be="useLayoutEffect",Te(),Kf(e,t)},useMemo:function(e,t){be="useMemo",Te();var r=Pe.current;Pe.current=an;try{return Qf(e,t)}finally{Pe.current=r}},useReducer:function(e,t,r){be="useReducer",Te();var i=Pe.current;Pe.current=an;try{return Hf(e,t,r)}finally{Pe.current=i}},useRef:function(e){return be="useRef",Te(),Gf(e)},useState:function(e){be="useState",Te();var t=Pe.current;Pe.current=an;try{return Su(e)}finally{Pe.current=t}},useDebugValue:function(e,t){return be="useDebugValue",Te(),void 0},useDeferredValue:function(e){return be="useDeferredValue",Te(),Zf(e)},useTransition:function(){return be="useTransition",Te(),ep()},useMutableSource:function(e,t,r){return be="useMutableSource",Te(),void 0},useSyncExternalStore:function(e,t,r){return be="useSyncExternalStore",Te(),zf(e,t,r)},useId:function(){return be="useId",Te(),tp()},unstable_isNewReconciler:ie},rb={readContext:function(e){return ur(e)},useCallback:function(e,t){return be="useCallback",Te(),Ru(e,t)},useContext:function(e){return be="useContext",Te(),ur(e)},useEffect:function(e,t){return be="useEffect",Te(),xl(e,t)},useImperativeHandle:function(e,t,r){return be="useImperativeHandle",Te(),Nu(e,t,r)},useInsertionEffect:function(e,t){return be="useInsertionEffect",Te(),wu(e,t)},useLayoutEffect:function(e,t){return be="useLayoutEffect",Te(),Du(e,t)},useMemo:function(e,t){be="useMemo",Te();var r=Pe.current;Pe.current=ji;try{return Au(e,t)}finally{Pe.current=r}},useReducer:function(e,t,r){be="useReducer",Te();var i=Pe.current;Pe.current=ji;try{return Uf(e,t,r)}finally{Pe.current=i}},useRef:function(e){return be="useRef",Te(),Cu()},useState:function(e){be="useState",Te();var t=Pe.current;Pe.current=ji;try{return Wf(e)}finally{Pe.current=t}},useDebugValue:function(e,t){return be="useDebugValue",Te(),ku()},useDeferredValue:function(e){return be="useDeferredValue",Te(),z_(e)},useTransition:function(){return be="useTransition",Te(),G_()},useMutableSource:function(e,t,r){return be="useMutableSource",Te(),void 0},useSyncExternalStore:function(e,t,r){return be="useSyncExternalStore",Te(),yu(e,t)},useId:function(){return be="useId",Te(),Tu()},unstable_isNewReconciler:ie},ib={readContext:function(e){return ur(e)},useCallback:function(e,t){return be="useCallback",Te(),Ru(e,t)},useContext:function(e){return be="useContext",Te(),ur(e)},useEffect:function(e,t){return be="useEffect",Te(),xl(e,t)},useImperativeHandle:function(e,t,r){return be="useImperativeHandle",Te(),Nu(e,t,r)},useInsertionEffect:function(e,t){return be="useInsertionEffect",Te(),wu(e,t)},useLayoutEffect:function(e,t){return be="useLayoutEffect",Te(),Du(e,t)},useMemo:function(e,t){be="useMemo",Te();var r=Pe.current;Pe.current=Mu;try{return Au(e,t)}finally{Pe.current=r}},useReducer:function(e,t,r){be="useReducer",Te();var i=Pe.current;Pe.current=Mu;try{return $f(e,t,r)}finally{Pe.current=i}},useRef:function(e){return be="useRef",Te(),Cu()},useState:function(e){be="useState",Te();var t=Pe.current;Pe.current=Mu;try{return qf(e)}finally{Pe.current=t}},useDebugValue:function(e,t){return be="useDebugValue",Te(),ku()},useDeferredValue:function(e){return be="useDeferredValue",Te(),W_(e)},useTransition:function(){return be="useTransition",Te(),Y_()},useMutableSource:function(e,t,r){return be="useMutableSource",Te(),void 0},useSyncExternalStore:function(e,t,r){return be="useSyncExternalStore",Te(),yu(e,t)},useId:function(){return be="useId",Te(),Tu()},unstable_isNewReconciler:ie},an={readContext:function(e){return rp(),ur(e)},useCallback:function(e,t){return be="useCallback",it(),At(),Jf(e,t)},useContext:function(e){return be="useContext",it(),At(),ur(e)},useEffect:function(e,t){return be="useEffect",it(),At(),xu(e,t)},useImperativeHandle:function(e,t,r){return be="useImperativeHandle",it(),At(),Xf(e,t,r)},useInsertionEffect:function(e,t){return be="useInsertionEffect",it(),At(),Yf(e,t)},useLayoutEffect:function(e,t){return be="useLayoutEffect",it(),At(),Kf(e,t)},useMemo:function(e,t){be="useMemo",it(),At();var r=Pe.current;Pe.current=an;try{return Qf(e,t)}finally{Pe.current=r}},useReducer:function(e,t,r){be="useReducer",it(),At();var i=Pe.current;Pe.current=an;try{return Hf(e,t,r)}finally{Pe.current=i}},useRef:function(e){return be="useRef",it(),At(),Gf(e)},useState:function(e){be="useState",it(),At();var t=Pe.current;Pe.current=an;try{return Su(e)}finally{Pe.current=t}},useDebugValue:function(e,t){return be="useDebugValue",it(),At(),void 0},useDeferredValue:function(e){return be="useDeferredValue",it(),At(),Zf(e)},useTransition:function(){return be="useTransition",it(),At(),ep()},useMutableSource:function(e,t,r){return be="useMutableSource",it(),At(),void 0},useSyncExternalStore:function(e,t,r){return be="useSyncExternalStore",it(),At(),zf(e,t,r)},useId:function(){return be="useId",it(),At(),tp()},unstable_isNewReconciler:ie},ji={readContext:function(e){return rp(),ur(e)},useCallback:function(e,t){return be="useCallback",it(),Te(),Ru(e,t)},useContext:function(e){return be="useContext",it(),Te(),ur(e)},useEffect:function(e,t){return be="useEffect",it(),Te(),xl(e,t)},useImperativeHandle:function(e,t,r){return be="useImperativeHandle",it(),Te(),Nu(e,t,r)},useInsertionEffect:function(e,t){return be="useInsertionEffect",it(),Te(),wu(e,t)},useLayoutEffect:function(e,t){return be="useLayoutEffect",it(),Te(),Du(e,t)},useMemo:function(e,t){be="useMemo",it(),Te();var r=Pe.current;Pe.current=ji;try{return Au(e,t)}finally{Pe.current=r}},useReducer:function(e,t,r){be="useReducer",it(),Te();var i=Pe.current;Pe.current=ji;try{return Uf(e,t,r)}finally{Pe.current=i}},useRef:function(e){return be="useRef",it(),Te(),Cu()},useState:function(e){be="useState",it(),Te();var t=Pe.current;Pe.current=ji;try{return Wf(e)}finally{Pe.current=t}},useDebugValue:function(e,t){return be="useDebugValue",it(),Te(),ku()},useDeferredValue:function(e){return be="useDeferredValue",it(),Te(),z_(e)},useTransition:function(){return be="useTransition",it(),Te(),G_()},useMutableSource:function(e,t,r){return be="useMutableSource",it(),Te(),void 0},useSyncExternalStore:function(e,t,r){return be="useSyncExternalStore",it(),Te(),yu(e,t)},useId:function(){return be="useId",it(),Te(),Tu()},unstable_isNewReconciler:ie},Mu={readContext:function(e){return rp(),ur(e)},useCallback:function(e,t){return be="useCallback",it(),Te(),Ru(e,t)},useContext:function(e){return be="useContext",it(),Te(),ur(e)},useEffect:function(e,t){return be="useEffect",it(),Te(),xl(e,t)},useImperativeHandle:function(e,t,r){return be="useImperativeHandle",it(),Te(),Nu(e,t,r)},useInsertionEffect:function(e,t){return be="useInsertionEffect",it(),Te(),wu(e,t)},useLayoutEffect:function(e,t){return be="useLayoutEffect",it(),Te(),Du(e,t)},useMemo:function(e,t){be="useMemo",it(),Te();var r=Pe.current;Pe.current=ji;try{return Au(e,t)}finally{Pe.current=r}},useReducer:function(e,t,r){be="useReducer",it(),Te();var i=Pe.current;Pe.current=ji;try{return $f(e,t,r)}finally{Pe.current=i}},useRef:function(e){return be="useRef",it(),Te(),Cu()},useState:function(e){be="useState",it(),Te();var t=Pe.current;Pe.current=ji;try{return qf(e)}finally{Pe.current=t}},useDebugValue:function(e,t){return be="useDebugValue",it(),Te(),ku()},useDeferredValue:function(e){return be="useDeferredValue",it(),Te(),W_(e)},useTransition:function(){return be="useTransition",it(),Te(),Y_()},useMutableSource:function(e,t,r){return be="useMutableSource",it(),Te(),void 0},useSyncExternalStore:function(e,t,r){return be="useSyncExternalStore",it(),Te(),yu(e,t)},useId:function(){return be="useId",it(),Te(),Tu()},unstable_isNewReconciler:ie}}var ls=b.unstable_now,nb=0,Ou=-1,wl=-1,Bu=-1,ip=!1,Pu=!1;function sb(){return ip}function kD(){Pu=!0}function RD(){ip=!1,Pu=!1}function AD(){ip=Pu,Pu=!1}function ab(){return nb}function ob(){nb=ls()}function np(e){wl=ls(),e.actualStartTime<0&&(e.actualStartTime=ls())}function lb(e){wl=-1}function Iu(e,t){if(wl>=0){var r=ls()-wl;e.actualDuration+=r,t&&(e.selfBaseDuration=r),wl=-1}}function on(e){if(Ou>=0){var t=ls()-Ou;Ou=-1;for(var r=e.return;r!==null;){switch(r.tag){case o:var i=r.stateNode;i.effectDuration+=t;return;case g:var n=r.stateNode;n.effectDuration+=t;return}r=r.return}}}function sp(e){if(Bu>=0){var t=ls()-Bu;Bu=-1;for(var r=e.return;r!==null;){switch(r.tag){case o:var i=r.stateNode;i!==null&&(i.passiveEffectDuration+=t);return;case g:var n=r.stateNode;n!==null&&(n.passiveEffectDuration+=t);return}r=r.return}}}function ln(){Ou=ls()}function ap(){Bu=ls()}function op(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function Vi(e,t){if(e&&e.defaultProps){var r=pt({},t),i=e.defaultProps;for(var n in i)r[n]===void 0&&(r[n]=i[n]);return r}return t}var lp={},cp,up,hp,dp,fp,cb,Fu,pp,vp,mp,Dl;{cp=new Set,up=new Set,hp=new Set,dp=new Set,pp=new Set,fp=new Set,vp=new Set,mp=new Set,Dl=new Set;var ub=new Set;Fu=function(e,t){if(!(e===null||typeof e=="function")){var r=t+"_"+e;ub.has(r)||(ub.add(r),R("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},cb=function(e,t){if(t===void 0){var r=Nt(e)||"Component";fp.has(r)||(fp.add(r),R("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",r))}},Object.defineProperty(lp,"_processChildContext",{enumerable:!1,value:function(){throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(lp)}function gp(e,t,r,i){var n=e.memoizedState,f=r(i,n);{if(e.mode&rr){xr(!0);try{f=r(i,n)}finally{xr(!1)}}cb(t,f)}var C=f==null?n:pt({},n,f);if(e.memoizedState=C,e.lanes===Se){var A=e.updateQueue;A.baseState=C}}var _p={isMounted:SC,enqueueSetState:function(e,t,r){var i=da(e),n=Zr(),f=ds(i),C=Tn(n,f);C.payload=t,r!=null&&(Fu(r,"setState"),C.callback=r);var A=ns(i,C,f);A!==null&&(Sr(A,i,f,n),fu(A,i,f)),Yh(i,f)},enqueueReplaceState:function(e,t,r){var i=da(e),n=Zr(),f=ds(i),C=Tn(n,f);C.tag=N_,C.payload=t,r!=null&&(Fu(r,"replaceState"),C.callback=r);var A=ns(i,C,f);A!==null&&(Sr(A,i,f,n),fu(A,i,f)),Yh(i,f)},enqueueForceUpdate:function(e,t){var r=da(e),i=Zr(),n=ds(r),f=Tn(i,n);f.tag=uu,t!=null&&(Fu(t,"forceUpdate"),f.callback=t);var C=ns(r,f,n);C!==null&&(Sr(C,r,n,i),fu(C,r,n)),QC(r,n)}};function hb(e,t,r,i,n,f,C){var A=e.stateNode;if(typeof A.shouldComponentUpdate=="function"){var M=A.shouldComponentUpdate(i,f,C);{if(e.mode&rr){xr(!0);try{M=A.shouldComponentUpdate(i,f,C)}finally{xr(!1)}}M===void 0&&R("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",Nt(t)||"Component")}return M}return t.prototype&&t.prototype.isPureReactComponent?!Yo(r,i)||!Yo(n,f):!0}function TD(e,t,r){var i=e.stateNode;{var n=Nt(t)||"Component",f=i.render;f||(t.prototype&&typeof t.prototype.render=="function"?R("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",n):R("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",n)),i.getInitialState&&!i.getInitialState.isReactClassApproved&&!i.state&&R("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",n),i.getDefaultProps&&!i.getDefaultProps.isReactClassApproved&&R("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",n),i.propTypes&&R("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",n),i.contextType&&R("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",n),t.childContextTypes&&!Dl.has(t)&&(e.mode&rr)===Ke&&(Dl.add(t),R(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead
144
+
145
+ .Learn more about this warning here: https://reactjs.org/link/legacy-context`,n)),t.contextTypes&&!Dl.has(t)&&(e.mode&rr)===Ke&&(Dl.add(t),R(`%s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() with static contextType instead.
146
+
147
+ Learn more about this warning here: https://reactjs.org/link/legacy-context`,n)),i.contextTypes&&R("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",n),t.contextType&&t.contextTypes&&!vp.has(t)&&(vp.add(t),R("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",n)),typeof i.componentShouldUpdate=="function"&&R("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",n),t.prototype&&t.prototype.isPureReactComponent&&typeof i.shouldComponentUpdate<"u"&&R("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",Nt(t)||"A pure component"),typeof i.componentDidUnmount=="function"&&R("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",n),typeof i.componentDidReceiveProps=="function"&&R("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",n),typeof i.componentWillRecieveProps=="function"&&R("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",n),typeof i.UNSAFE_componentWillRecieveProps=="function"&&R("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",n);var C=i.props!==r;i.props!==void 0&&C&&R("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",n,n),i.defaultProps&&R("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",n,n),typeof i.getSnapshotBeforeUpdate=="function"&&typeof i.componentDidUpdate!="function"&&!hp.has(t)&&(hp.add(t),R("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Nt(t))),typeof i.getDerivedStateFromProps=="function"&&R("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",n),typeof i.getDerivedStateFromError=="function"&&R("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",n),typeof t.getSnapshotBeforeUpdate=="function"&&R("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",n);var A=i.state;A&&(typeof A!="object"||gt(A))&&R("%s.state: must be set to an object or null",n),typeof i.getChildContext=="function"&&typeof t.childContextTypes!="object"&&R("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",n)}}function db(e,t){t.updater=_p,e.stateNode=t,gC(t,e),t._reactInternalInstance=lp}function fb(e,t,r){var i=!1,n=vi,f=vi,C=t.contextType;if("contextType"in t){var A=C===null||C!==void 0&&C.$$typeof===xe&&C._context===void 0;if(!A&&!mp.has(t)){mp.add(t);var M="";C===void 0?M=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof C!="object"?M=" However, it is set to a "+typeof C+".":C.$$typeof===ue?M=" Did you accidentally pass the Context.Provider instead?":C._context!==void 0?M=" Did you accidentally pass the Context.Consumer instead?":M=" However, it is set to an object with keys {"+Object.keys(C).join(", ")+"}.",R("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",Nt(t)||"Component",M)}}if(typeof C=="object"&&C!==null)f=ur(C);else{n=Ta(e,t,!0);var z=t.contextTypes;i=z!=null,f=i?La(e,n):vi}var G=new t(r,f);if(e.mode&rr){xr(!0);try{G=new t(r,f)}finally{xr(!1)}}var se=e.memoizedState=G.state!==null&&G.state!==void 0?G.state:null;db(e,G);{if(typeof t.getDerivedStateFromProps=="function"&&se===null){var ne=Nt(t)||"Component";up.has(ne)||(up.add(ne),R("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",ne,G.state===null?"null":"undefined",ne))}if(typeof t.getDerivedStateFromProps=="function"||typeof G.getSnapshotBeforeUpdate=="function"){var de=null,pe=null,ge=null;if(typeof G.componentWillMount=="function"&&G.componentWillMount.__suppressDeprecationWarning!==!0?de="componentWillMount":typeof G.UNSAFE_componentWillMount=="function"&&(de="UNSAFE_componentWillMount"),typeof G.componentWillReceiveProps=="function"&&G.componentWillReceiveProps.__suppressDeprecationWarning!==!0?pe="componentWillReceiveProps":typeof G.UNSAFE_componentWillReceiveProps=="function"&&(pe="UNSAFE_componentWillReceiveProps"),typeof G.componentWillUpdate=="function"&&G.componentWillUpdate.__suppressDeprecationWarning!==!0?ge="componentWillUpdate":typeof G.UNSAFE_componentWillUpdate=="function"&&(ge="UNSAFE_componentWillUpdate"),de!==null||pe!==null||ge!==null){var Le=Nt(t)||"Component",qe=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";dp.has(Le)||(dp.add(Le),R(`Unsafe legacy lifecycles will not be called for components using new component APIs.
148
+
149
+ %s uses %s but also contains the following legacy lifecycles:%s%s%s
150
+
151
+ The above lifecycles should be removed. Learn more about this warning here:
152
+ https://reactjs.org/link/unsafe-component-lifecycles`,Le,qe,de!==null?`
153
+ `+de:"",pe!==null?`
154
+ `+pe:"",ge!==null?`
155
+ `+ge:""))}}}return i&&r_(e,n,f),G}function LD(e,t){var r=t.state;typeof t.componentWillMount=="function"&&t.componentWillMount(),typeof t.UNSAFE_componentWillMount=="function"&&t.UNSAFE_componentWillMount(),r!==t.state&&(R("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",lt(e)||"Component"),_p.enqueueReplaceState(t,t.state,null))}function pb(e,t,r,i){var n=t.state;if(typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==n){{var f=lt(e)||"Component";cp.has(f)||(cp.add(f),R("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",f))}_p.enqueueReplaceState(t,t.state,null)}}function bp(e,t,r,i){TD(e,t,r);var n=e.stateNode;n.props=r,n.state=e.memoizedState,n.refs={},kf(e);var f=t.contextType;if(typeof f=="object"&&f!==null)n.context=ur(f);else{var C=Ta(e,t,!0);n.context=La(e,C)}{if(n.state===r){var A=Nt(t)||"Component";pp.has(A)||(pp.add(A),R("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",A))}e.mode&rr&&Ii.recordLegacyContextWarning(e,n),Ii.recordUnsafeLifecycleWarnings(e,n)}n.state=e.memoizedState;var M=t.getDerivedStateFromProps;if(typeof M=="function"&&(gp(e,t,M,r),n.state=e.memoizedState),typeof t.getDerivedStateFromProps!="function"&&typeof n.getSnapshotBeforeUpdate!="function"&&(typeof n.UNSAFE_componentWillMount=="function"||typeof n.componentWillMount=="function")&&(LD(e,n),pu(e,r,n,i),n.state=e.memoizedState),typeof n.componentDidMount=="function"){var z=kt;z|=ks,(e.mode&Zi)!==Ke&&(z|=qn),e.flags|=z}}function MD(e,t,r,i){var n=e.stateNode,f=e.memoizedProps;n.props=f;var C=n.context,A=t.contextType,M=vi;if(typeof A=="object"&&A!==null)M=ur(A);else{var z=Ta(e,t,!0);M=La(e,z)}var G=t.getDerivedStateFromProps,se=typeof G=="function"||typeof n.getSnapshotBeforeUpdate=="function";!se&&(typeof n.UNSAFE_componentWillReceiveProps=="function"||typeof n.componentWillReceiveProps=="function")&&(f!==r||C!==M)&&pb(e,n,r,M),R_();var ne=e.memoizedState,de=n.state=ne;if(pu(e,r,n,i),de=e.memoizedState,f===r&&ne===de&&!Kc()&&!vu()){if(typeof n.componentDidMount=="function"){var pe=kt;pe|=ks,(e.mode&Zi)!==Ke&&(pe|=qn),e.flags|=pe}return!1}typeof G=="function"&&(gp(e,t,G,r),de=e.memoizedState);var ge=vu()||hb(e,t,f,r,ne,de,M);if(ge){if(!se&&(typeof n.UNSAFE_componentWillMount=="function"||typeof n.componentWillMount=="function")&&(typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount()),typeof n.componentDidMount=="function"){var Le=kt;Le|=ks,(e.mode&Zi)!==Ke&&(Le|=qn),e.flags|=Le}}else{if(typeof n.componentDidMount=="function"){var qe=kt;qe|=ks,(e.mode&Zi)!==Ke&&(qe|=qn),e.flags|=qe}e.memoizedProps=r,e.memoizedState=de}return n.props=r,n.state=de,n.context=M,ge}function OD(e,t,r,i,n){var f=t.stateNode;k_(e,t);var C=t.memoizedProps,A=t.type===t.elementType?C:Vi(t.type,C);f.props=A;var M=t.pendingProps,z=f.context,G=r.contextType,se=vi;if(typeof G=="object"&&G!==null)se=ur(G);else{var ne=Ta(t,r,!0);se=La(t,ne)}var de=r.getDerivedStateFromProps,pe=typeof de=="function"||typeof f.getSnapshotBeforeUpdate=="function";!pe&&(typeof f.UNSAFE_componentWillReceiveProps=="function"||typeof f.componentWillReceiveProps=="function")&&(C!==M||z!==se)&&pb(t,f,i,se),R_();var ge=t.memoizedState,Le=f.state=ge;if(pu(t,i,f,n),Le=t.memoizedState,C===M&&ge===Le&&!Kc()&&!vu()&&!P)return typeof f.componentDidUpdate=="function"&&(C!==e.memoizedProps||ge!==e.memoizedState)&&(t.flags|=kt),typeof f.getSnapshotBeforeUpdate=="function"&&(C!==e.memoizedProps||ge!==e.memoizedState)&&(t.flags|=pa),!1;typeof de=="function"&&(gp(t,r,de,i),Le=t.memoizedState);var qe=vu()||hb(t,r,A,i,ge,Le,se)||P;return qe?(!pe&&(typeof f.UNSAFE_componentWillUpdate=="function"||typeof f.componentWillUpdate=="function")&&(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(i,Le,se),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(i,Le,se)),typeof f.componentDidUpdate=="function"&&(t.flags|=kt),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=pa)):(typeof f.componentDidUpdate=="function"&&(C!==e.memoizedProps||ge!==e.memoizedState)&&(t.flags|=kt),typeof f.getSnapshotBeforeUpdate=="function"&&(C!==e.memoizedProps||ge!==e.memoizedState)&&(t.flags|=pa),t.memoizedProps=i,t.memoizedState=Le),f.props=i,f.state=Le,f.context=se,qe}function qs(e,t){return{value:e,source:t,stack:ys(t),digest:null}}function yp(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function BD(e,t){return!0}function Sp(e,t){try{var r=BD(e,t);if(r===!1)return;var i=t.value,n=t.source,f=t.stack,C=f!==null?f:"";if(i!=null&&i._suppressLogging){if(e.tag===p)return;console.error(i)}var A=n?lt(n):null,M=A?"The above error occurred in the <"+A+"> component:":"The above error occurred in one of your React components:",z;if(e.tag===o)z=`Consider adding an error boundary to your tree to customize error handling behavior.
156
+ Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;else{var G=lt(e)||"Anonymous";z="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+G+".")}var se=M+`
157
+ `+C+`
158
+
159
+ `+(""+z);console.error(se)}catch(ne){setTimeout(function(){throw ne})}}var PD=typeof WeakMap=="function"?WeakMap:Map;function vb(e,t,r){var i=Tn(Wt,r);i.tag=Df,i.payload={element:null};var n=t.value;return i.callback=function(){kk(n),Sp(e,t)},i}function Cp(e,t,r){var i=Tn(Wt,r);i.tag=Df;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var f=t.value;i.payload=function(){return n(f)},i.callback=function(){Dy(e),Sp(e,t)}}var C=e.stateNode;return C!==null&&typeof C.componentDidCatch=="function"&&(i.callback=function(){Dy(e),Sp(e,t),typeof n!="function"&&Dk(this);var M=t.value,z=t.stack;this.componentDidCatch(M,{componentStack:z!==null?z:""}),typeof n!="function"&&(hi(e.lanes,rt)||R("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",lt(e)||"Unknown"))}),i}function mb(e,t,r){var i=e.pingCache,n;if(i===null?(i=e.pingCache=new PD,n=new Set,i.set(t,n)):(n=i.get(t),n===void 0&&(n=new Set,i.set(t,n))),!n.has(r)){n.add(r);var f=Rk.bind(null,e,t,r);Mi&&$l(e,r),t.then(f,f)}}function ID(e,t,r,i){var n=e.updateQueue;if(n===null){var f=new Set;f.add(r),e.updateQueue=f}else n.add(r)}function FD(e,t){var r=e.tag;if((e.mode&St)===Ke&&(r===h||r===c||r===N)){var i=e.alternate;i?(e.updateQueue=i.updateQueue,e.memoizedState=i.memoizedState,e.lanes=i.lanes):(e.updateQueue=null,e.memoizedState=null)}}function gb(e){var t=e;do{if(t.tag===x&&_D(t))return t;t=t.return}while(t!==null);return null}function _b(e,t,r,i,n){if((e.mode&St)===Ke){if(e===t)e.flags|=Xr;else{if(e.flags|=Rt,r.flags|=Vh,r.flags&=-52805,r.tag===p){var f=r.alternate;if(f===null)r.tag=D;else{var C=Tn(Wt,rt);C.tag=uu,ns(r,C,rt)}}r.lanes=dt(r.lanes,rt)}return e}return e.flags|=Xr,e.lanes=n,e}function jD(e,t,r,i,n){if(r.flags|=fc,Mi&&$l(e,n),i!==null&&typeof i=="object"&&typeof i.then=="function"){var f=i;FD(r),Rr()&&r.mode&St&&c_();var C=gb(t);if(C!==null){C.flags&=~yn,_b(C,t,r,e,n),C.mode&St&&mb(e,f,n),ID(C,e,f);return}else{if(!oE(n)){mb(e,f,n),tv();return}var A=new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");i=A}}else if(Rr()&&r.mode&St){c_();var M=gb(t);if(M!==null){(M.flags&Xr)===Je&&(M.flags|=yn),_b(M,t,r,e,n),pf(qs(i,r));return}}i=qs(i,r),_k(i);var z=t;do{switch(z.tag){case o:{var G=i;z.flags|=Xr;var se=Mo(n);z.lanes=dt(z.lanes,se);var ne=vb(z,G,se);Rf(z,ne);return}case p:var de=i,pe=z.type,ge=z.stateNode;if((z.flags&Rt)===Je&&(typeof pe.getDerivedStateFromError=="function"||ge!==null&&typeof ge.componentDidCatch=="function"&&!gy(ge))){z.flags|=Xr;var Le=Mo(n);z.lanes=dt(z.lanes,Le);var qe=Cp(z,de,Le);Rf(z,qe);return}break}z=z.return}while(z!==null)}function VD(){return null}var Nl=O.ReactCurrentOwner,Hi=!1,Ep,kl,xp,wp,Dp,Gs,Np,ju,Rl;Ep={},kl={},xp={},wp={},Dp={},Gs=!1,Np={},ju={},Rl={};function Jr(e,t,r,i){e===null?t.child=S_(t,null,r,i):t.child=Pa(t,e.child,r,i)}function HD(e,t,r,i){t.child=Pa(t,e.child,null,i),t.child=Pa(t,null,r,i)}function bb(e,t,r,i,n){if(t.type!==t.elementType){var f=r.propTypes;f&&Bi(f,i,"prop",Nt(r))}var C=r.render,A=t.ref,M,z;Fa(t,n),No(t);{if(Nl.current=t,yi(!0),M=za(e,t,C,i,A,n),z=Wa(),t.mode&rr){xr(!0);try{M=za(e,t,C,i,A,n),z=Wa()}finally{xr(!1)}}yi(!1)}return ga(),e!==null&&!Hi?(B_(e,t,n),Ln(e,t,n)):(Rr()&&z&&lf(t),t.flags|=fa,Jr(e,t,M,n),t.child)}function yb(e,t,r,i,n){if(e===null){var f=r.type;if(qk(f)&&r.compare===null&&r.defaultProps===void 0){var C=f;return C=Za(f),t.tag=N,t.type=C,Ap(t,f),Sb(e,t,C,i,n)}{var A=f.propTypes;if(A&&Bi(A,i,"prop",Nt(f)),r.defaultProps!==void 0){var M=Nt(f)||"Unknown";Rl[M]||(R("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",M),Rl[M]=!0)}}var z=dv(r.type,null,i,t,t.mode,n);return z.ref=t.ref,z.return=t,t.child=z,z}{var G=r.type,se=G.propTypes;se&&Bi(se,i,"prop",Nt(G))}var ne=e.child,de=Pp(e,n);if(!de){var pe=ne.memoizedProps,ge=r.compare;if(ge=ge!==null?ge:Yo,ge(pe,i)&&e.ref===t.ref)return Ln(e,t,n)}t.flags|=fa;var Le=Qs(ne,i);return Le.ref=t.ref,Le.return=t,t.child=Le,Le}function Sb(e,t,r,i,n){if(t.type!==t.elementType){var f=t.elementType;if(f.$$typeof===Ye){var C=f,A=C._payload,M=C._init;try{f=M(A)}catch{f=null}var z=f&&f.propTypes;z&&Bi(z,i,"prop",Nt(f))}}if(e!==null){var G=e.memoizedProps;if(Yo(G,i)&&e.ref===t.ref&&t.type===e.type)if(Hi=!1,t.pendingProps=i=G,Pp(e,n))(e.flags&Vh)!==Je&&(Hi=!0);else return t.lanes=e.lanes,Ln(e,t,n)}return kp(e,t,r,i,n)}function Cb(e,t,r){var i=t.pendingProps,n=i.children,f=e!==null?e.memoizedState:null;if(i.mode==="hidden"||H)if((t.mode&St)===Ke){var C={baseLanes:Se,cachePool:null,transitions:null};t.memoizedState=C,Qu(t,r)}else if(hi(r,ui)){var se={baseLanes:Se,cachePool:null,transitions:null};t.memoizedState=se;var ne=f!==null?f.baseLanes:r;Qu(t,ne)}else{var A=null,M;if(f!==null){var z=f.baseLanes;M=dt(z,r)}else M=r;t.lanes=t.childLanes=ui;var G={baseLanes:M,cachePool:A,transitions:null};return t.memoizedState=G,t.updateQueue=null,Qu(t,M),null}else{var de;f!==null?(de=dt(f.baseLanes,r),t.memoizedState=null):de=r,Qu(t,de)}return Jr(e,t,n,r),t.child}function UD(e,t,r){var i=t.pendingProps;return Jr(e,t,i,r),t.child}function $D(e,t,r){var i=t.pendingProps.children;return Jr(e,t,i,r),t.child}function zD(e,t,r){{t.flags|=kt;{var i=t.stateNode;i.effectDuration=0,i.passiveEffectDuration=0}}var n=t.pendingProps,f=n.children;return Jr(e,t,f,r),t.child}function Eb(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=Ds,t.flags|=Hh)}function kp(e,t,r,i,n){if(t.type!==t.elementType){var f=r.propTypes;f&&Bi(f,i,"prop",Nt(r))}var C;{var A=Ta(t,r,!0);C=La(t,A)}var M,z;Fa(t,n),No(t);{if(Nl.current=t,yi(!0),M=za(e,t,r,i,C,n),z=Wa(),t.mode&rr){xr(!0);try{M=za(e,t,r,i,C,n),z=Wa()}finally{xr(!1)}}yi(!1)}return ga(),e!==null&&!Hi?(B_(e,t,n),Ln(e,t,n)):(Rr()&&z&&lf(t),t.flags|=fa,Jr(e,t,M,n),t.child)}function xb(e,t,r,i,n){{switch(oR(t)){case!1:{var f=t.stateNode,C=t.type,A=new C(t.memoizedProps,f.context),M=A.state;f.updater.enqueueSetState(f,M,null);break}case!0:{t.flags|=Rt,t.flags|=Xr;var z=new Error("Simulated error coming from DevTools"),G=Mo(n);t.lanes=dt(t.lanes,G);var se=Cp(t,qs(z,t),G);Rf(t,se);break}}if(t.type!==t.elementType){var ne=r.propTypes;ne&&Bi(ne,i,"prop",Nt(r))}}var de;rn(r)?(de=!0,Jc(t)):de=!1,Fa(t,n);var pe=t.stateNode,ge;pe===null?(Hu(e,t),fb(t,r,i),bp(t,r,i,n),ge=!0):e===null?ge=MD(t,r,i,n):ge=OD(e,t,r,i,n);var Le=Rp(e,t,r,ge,de,n);{var qe=t.stateNode;ge&&qe.props!==i&&(Gs||R("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",lt(t)||"a component"),Gs=!0)}return Le}function Rp(e,t,r,i,n,f){Eb(e,t);var C=(t.flags&Rt)!==Je;if(!i&&!C)return n&&s_(t,r,!1),Ln(e,t,f);var A=t.stateNode;Nl.current=t;var M;if(C&&typeof r.getDerivedStateFromError!="function")M=null,lb();else{No(t);{if(yi(!0),M=A.render(),t.mode&rr){xr(!0);try{A.render()}finally{xr(!1)}}yi(!1)}ga()}return t.flags|=fa,e!==null&&C?HD(e,t,M,f):Jr(e,t,M,f),t.memoizedState=A.state,n&&s_(t,r,!0),t.child}function wb(e){var t=e.stateNode;t.pendingContext?i_(e,t.pendingContext,t.pendingContext!==t.context):t.context&&i_(e,t.context,!1),Af(e,t.containerInfo)}function WD(e,t,r){if(wb(t),e===null)throw new Error("Should have a current fiber. This is a bug in React.");var i=t.pendingProps,n=t.memoizedState,f=n.element;k_(e,t),pu(t,i,null,r);var C=t.memoizedState;t.stateNode;var A=C.element;if(n.isDehydrated){var M={element:A,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},z=t.updateQueue;if(z.baseState=M,t.memoizedState=M,t.flags&yn){var G=qs(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),t);return Db(e,t,A,r,G)}else if(A!==f){var se=qs(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t);return Db(e,t,A,r,se)}else{Y1(t);var ne=S_(t,null,A,r);t.child=ne;for(var de=ne;de;)de.flags=de.flags&~cr|Sn,de=de.sibling}}else{if(Ba(),A===f)return Ln(e,t,r);Jr(e,t,A,r)}return t.child}function Db(e,t,r,i,n){return Ba(),pf(n),t.flags|=yn,Jr(e,t,r,i),t.child}function qD(e,t,r){L_(t),e===null&&ff(t);var i=t.type,n=t.pendingProps,f=e!==null?e.memoizedProps:null,C=n.children,A=Gd(i,n);return A?C=null:f!==null&&Gd(i,f)&&(t.flags|=wo),Eb(e,t),Jr(e,t,C,r),t.child}function GD(e,t){return e===null&&ff(t),null}function YD(e,t,r,i){Hu(e,t);var n=t.pendingProps,f=r,C=f._payload,A=f._init,M=A(C);t.type=M;var z=t.tag=Gk(M),G=Vi(M,n),se;switch(z){case h:return Ap(t,M),t.type=M=Za(M),se=kp(null,t,M,G,i),se;case p:return t.type=M=av(M),se=xb(null,t,M,G,i),se;case c:return t.type=M=ov(M),se=bb(null,t,M,G,i),se;case S:{if(t.type!==t.elementType){var ne=M.propTypes;ne&&Bi(ne,G,"prop",Nt(M))}return se=yb(null,t,M,Vi(M.type,G),i),se}}var de="";throw M!==null&&typeof M=="object"&&M.$$typeof===Ye&&(de=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+M+". "+("Lazy element type must resolve to a class or function."+de))}function KD(e,t,r,i,n){Hu(e,t),t.tag=p;var f;return rn(r)?(f=!0,Jc(t)):f=!1,Fa(t,n),fb(t,r,i),bp(t,r,i,n),Rp(null,t,r,!0,f,n)}function XD(e,t,r,i){Hu(e,t);var n=t.pendingProps,f;{var C=Ta(t,r,!1);f=La(t,C)}Fa(t,i);var A,M;No(t);{if(r.prototype&&typeof r.prototype.render=="function"){var z=Nt(r)||"Unknown";Ep[z]||(R("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",z,z),Ep[z]=!0)}t.mode&rr&&Ii.recordLegacyContextWarning(t,null),yi(!0),Nl.current=t,A=za(null,t,r,n,f,i),M=Wa(),yi(!1)}if(ga(),t.flags|=fa,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0){var G=Nt(r)||"Unknown";kl[G]||(R("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",G,G,G),kl[G]=!0)}if(typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0){{var se=Nt(r)||"Unknown";kl[se]||(R("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",se,se,se),kl[se]=!0)}t.tag=p,t.memoizedState=null,t.updateQueue=null;var ne=!1;return rn(r)?(ne=!0,Jc(t)):ne=!1,t.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,kf(t),db(t,A),bp(t,r,n,i),Rp(null,t,r,!0,ne,i)}else{if(t.tag=h,t.mode&rr){xr(!0);try{A=za(null,t,r,n,f,i),M=Wa()}finally{xr(!1)}}return Rr()&&M&&lf(t),Jr(null,t,A,i),Ap(t,r),t.child}}function Ap(e,t){{if(t&&t.childContextTypes&&R("%s(...): childContextTypes cannot be defined on a function component.",t.displayName||t.name||"Component"),e.ref!==null){var r="",i=$n();i&&(r+=`
160
+
161
+ Check the render method of \``+i+"`.");var n=i||"",f=e._debugSource;f&&(n=f.fileName+":"+f.lineNumber),Dp[n]||(Dp[n]=!0,R("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",r))}if(t.defaultProps!==void 0){var C=Nt(t)||"Unknown";Rl[C]||(R("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",C),Rl[C]=!0)}if(typeof t.getDerivedStateFromProps=="function"){var A=Nt(t)||"Unknown";wp[A]||(R("%s: Function components do not support getDerivedStateFromProps.",A),wp[A]=!0)}if(typeof t.contextType=="object"&&t.contextType!==null){var M=Nt(t)||"Unknown";xp[M]||(R("%s: Function components do not support contextType.",M),xp[M]=!0)}}}var Tp={dehydrated:null,treeContext:null,retryLane:wr};function Lp(e){return{baseLanes:e,cachePool:VD(),transitions:null}}function JD(e,t){var r=null;return{baseLanes:dt(e.baseLanes,t),cachePool:r,transitions:e.transitions}}function QD(e,t,r,i){if(t!==null){var n=t.memoizedState;if(n===null)return!1}return Mf(e,_l)}function ZD(e,t){return yc(e.childLanes,t)}function Nb(e,t,r){var i=t.pendingProps;lR(t)&&(t.flags|=Rt);var n=Fi.current,f=!1,C=(t.flags&Rt)!==Je;if(C||QD(n,e)?(f=!0,t.flags&=~Rt):(e===null||e.memoizedState!==null)&&(n=gD(n,O_)),n=Va(n),as(t,n),e===null){ff(t);var A=t.memoizedState;if(A!==null){var M=A.dehydrated;if(M!==null)return nN(t,M)}var z=i.children,G=i.fallback;if(f){var se=eN(t,z,G,r),ne=t.child;return ne.memoizedState=Lp(r),t.memoizedState=Tp,se}else return Mp(t,z)}else{var de=e.memoizedState;if(de!==null){var pe=de.dehydrated;if(pe!==null)return sN(e,t,C,i,pe,de,r)}if(f){var ge=i.fallback,Le=i.children,qe=rN(e,t,Le,ge,r),$e=t.child,Et=e.child.memoizedState;return $e.memoizedState=Et===null?Lp(r):JD(Et,r),$e.childLanes=ZD(e,r),t.memoizedState=Tp,qe}else{var _t=i.children,oe=tN(e,t,_t,r);return t.memoizedState=null,oe}}}function Mp(e,t,r){var i=e.mode,n={mode:"visible",children:t},f=Op(n,i);return f.return=e,e.child=f,f}function eN(e,t,r,i){var n=e.mode,f=e.child,C={mode:"hidden",children:t},A,M;return(n&St)===Ke&&f!==null?(A=f,A.childLanes=Se,A.pendingProps=C,e.mode&Ot&&(A.actualDuration=0,A.actualStartTime=-1,A.selfBaseDuration=0,A.treeBaseDuration=0),M=ps(r,n,i,null)):(A=Op(C,n),M=ps(r,n,i,null)),A.return=e,M.return=e,A.sibling=M,e.child=A,M}function Op(e,t,r){return ky(e,t,Se,null)}function kb(e,t){return Qs(e,t)}function tN(e,t,r,i){var n=e.child,f=n.sibling,C=kb(n,{mode:"visible",children:r});if((t.mode&St)===Ke&&(C.lanes=i),C.return=t,C.sibling=null,f!==null){var A=t.deletions;A===null?(t.deletions=[f],t.flags|=ws):A.push(f)}return t.child=C,C}function rN(e,t,r,i,n){var f=t.mode,C=e.child,A=C.sibling,M={mode:"hidden",children:r},z;if((f&St)===Ke&&t.child!==C){var G=t.child;z=G,z.childLanes=Se,z.pendingProps=M,t.mode&Ot&&(z.actualDuration=0,z.actualStartTime=-1,z.selfBaseDuration=C.selfBaseDuration,z.treeBaseDuration=C.treeBaseDuration),t.deletions=null}else z=kb(C,M),z.subtreeFlags=C.subtreeFlags&Cn;var se;return A!==null?se=Qs(A,i):(se=ps(i,f,n,null),se.flags|=cr),se.return=t,z.return=t,z.sibling=se,t.child=z,se}function Vu(e,t,r,i){i!==null&&pf(i),Pa(t,e.child,null,r);var n=t.pendingProps,f=n.children,C=Mp(t,f);return C.flags|=cr,t.memoizedState=null,C}function iN(e,t,r,i,n){var f=t.mode,C={mode:"visible",children:r},A=Op(C,f),M=ps(i,f,n,null);return M.flags|=cr,A.return=t,M.return=t,A.sibling=M,t.child=A,(t.mode&St)!==Ke&&Pa(t,e.child,null,n),M}function nN(e,t,r){return(e.mode&St)===Ke?(R("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),e.lanes=rt):Jd(t)?e.lanes=Ts:e.lanes=ui,null}function sN(e,t,r,i,n,f,C){if(r)if(t.flags&yn){t.flags&=~yn;var oe=yp(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return Vu(e,t,C,oe)}else{if(t.memoizedState!==null)return t.child=e.child,t.flags|=Rt,null;var _e=i.children,le=i.fallback,we=iN(e,t,_e,le,C),Ie=t.child;return Ie.memoizedState=Lp(C),t.memoizedState=Tp,we}else{if(q1(),(t.mode&St)===Ke)return Vu(e,t,C,null);if(Jd(n)){var A,M,z;{var G=c1(n);A=G.digest,M=G.message,z=G.stack}var se;M?se=new Error(M):se=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var ne=yp(se,A,z);return Vu(e,t,C,ne)}var de=hi(C,e.childLanes);if(Hi||de){var pe=Ju();if(pe!==null){var ge=vE(pe,C);if(ge!==wr&&ge!==f.retryLane){f.retryLane=ge;var Le=Wt;si(e,ge),Sr(pe,e,ge,Le)}}tv();var qe=yp(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return Vu(e,t,C,qe)}else if(Jg(n)){t.flags|=Rt,t.child=e.child;var $e=Ak.bind(null,e);return u1(n,$e),null}else{K1(t,n,f.treeContext);var Et=i.children,_t=Mp(t,Et);return _t.flags|=Sn,_t}}}function Rb(e,t,r){e.lanes=dt(e.lanes,t);var i=e.alternate;i!==null&&(i.lanes=dt(i.lanes,t)),xf(e.return,t,r)}function aN(e,t,r){for(var i=t;i!==null;){if(i.tag===x){var n=i.memoizedState;n!==null&&Rb(i,r,e)}else if(i.tag===I)Rb(i,r,e);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)return;for(;i.sibling===null;){if(i.return===null||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function oN(e){for(var t=e,r=null;t!==null;){var i=t.alternate;i!==null&&_u(i)===null&&(r=t),t=t.sibling}return r}function lN(e){if(e!==void 0&&e!=="forwards"&&e!=="backwards"&&e!=="together"&&!Np[e])if(Np[e]=!0,typeof e=="string")switch(e.toLowerCase()){case"together":case"forwards":case"backwards":{R('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',e,e.toLowerCase());break}case"forward":case"backward":{R('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',e,e.toLowerCase());break}default:R('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e);break}else R('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}function cN(e,t){e!==void 0&&!ju[e]&&(e!=="collapsed"&&e!=="hidden"?(ju[e]=!0,R('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):t!=="forwards"&&t!=="backwards"&&(ju[e]=!0,R('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}function Ab(e,t){{var r=gt(e),i=!r&&typeof Ti(e)=="function";if(r||i){var n=r?"array":"iterable";return R("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",n,t,n),!1}}return!0}function uN(e,t){if((t==="forwards"||t==="backwards")&&e!==void 0&&e!==null&&e!==!1)if(gt(e)){for(var r=0;r<e.length;r++)if(!Ab(e[r],r))return}else{var i=Ti(e);if(typeof i=="function"){var n=i.call(e);if(n)for(var f=n.next(),C=0;!f.done;f=n.next()){if(!Ab(f.value,C))return;C++}}else R('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',t)}}function Bp(e,t,r,i,n){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:n}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=i,f.tail=r,f.tailMode=n)}function Tb(e,t,r){var i=t.pendingProps,n=i.revealOrder,f=i.tail,C=i.children;lN(n),cN(f,n),uN(C,n),Jr(e,t,C,r);var A=Fi.current,M=Mf(A,_l);if(M)A=Of(A,_l),t.flags|=Rt;else{var z=e!==null&&(e.flags&Rt)!==Je;z&&aN(t,t.child,r),A=Va(A)}if(as(t,A),(t.mode&St)===Ke)t.memoizedState=null;else switch(n){case"forwards":{var G=oN(t.child),se;G===null?(se=t.child,t.child=null):(se=G.sibling,G.sibling=null),Bp(t,!1,se,G,f);break}case"backwards":{var ne=null,de=t.child;for(t.child=null;de!==null;){var pe=de.alternate;if(pe!==null&&_u(pe)===null){t.child=de;break}var ge=de.sibling;de.sibling=ne,ne=de,de=ge}Bp(t,!0,ne,null,f);break}case"together":{Bp(t,!1,null,null,void 0);break}default:t.memoizedState=null}return t.child}function hN(e,t,r){Af(t,t.stateNode.containerInfo);var i=t.pendingProps;return e===null?t.child=Pa(t,null,i,r):Jr(e,t,i,r),t.child}var Lb=!1;function dN(e,t,r){var i=t.type,n=i._context,f=t.pendingProps,C=t.memoizedProps,A=f.value;{"value"in f||Lb||(Lb=!0,R("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var M=t.type.propTypes;M&&Bi(M,f,"prop","Context.Provider")}if(x_(t,n,A),C!==null){var z=C.value;if(pi(z,A)){if(C.children===f.children&&!Kc())return Ln(e,t,r)}else lD(t,n,r)}var G=f.children;return Jr(e,t,G,r),t.child}var Mb=!1;function fN(e,t,r){var i=t.type;i._context===void 0?i!==i.Consumer&&(Mb||(Mb=!0,R("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):i=i._context;var n=t.pendingProps,f=n.children;typeof f!="function"&&R("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Fa(t,r);var C=ur(i);No(t);var A;return Nl.current=t,yi(!0),A=f(C),yi(!1),ga(),t.flags|=fa,Jr(e,t,A,r),t.child}function Al(){Hi=!0}function Hu(e,t){(t.mode&St)===Ke&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=cr)}function Ln(e,t,r){return e!==null&&(t.dependencies=e.dependencies),lb(),Ul(t.lanes),hi(r,t.childLanes)?(aD(e,t),t.child):null}function pN(e,t,r){{var i=t.return;if(i===null)throw new Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,r.index=t.index,r.sibling=t.sibling,r.return=t.return,r.ref=t.ref,t===i.child)i.child=r;else{var n=i.child;if(n===null)throw new Error("Expected parent to have a child.");for(;n.sibling!==t;)if(n=n.sibling,n===null)throw new Error("Expected to find the previous sibling.");n.sibling=r}var f=i.deletions;return f===null?(i.deletions=[e],i.flags|=ws):f.push(e),r.flags|=cr,r}}function Pp(e,t){var r=e.lanes;return!!hi(r,t)}function vN(e,t,r){switch(t.tag){case o:wb(t),t.stateNode,Ba();break;case _:L_(t);break;case p:{var i=t.type;rn(i)&&Jc(t);break}case v:Af(t,t.stateNode.containerInfo);break;case l:{var n=t.memoizedProps.value,f=t.type._context;x_(t,f,n);break}case g:{var C=hi(r,t.childLanes);C&&(t.flags|=kt);{var A=t.stateNode;A.effectDuration=0,A.passiveEffectDuration=0}}break;case x:{var M=t.memoizedState;if(M!==null){if(M.dehydrated!==null)return as(t,Va(Fi.current)),t.flags|=Rt,null;var z=t.child,G=z.childLanes;if(hi(r,G))return Nb(e,t,r);as(t,Va(Fi.current));var se=Ln(e,t,r);return se!==null?se.sibling:null}else as(t,Va(Fi.current));break}case I:{var ne=(e.flags&Rt)!==Je,de=hi(r,t.childLanes);if(ne){if(de)return Tb(e,t,r);t.flags|=Rt}var pe=t.memoizedState;if(pe!==null&&(pe.rendering=null,pe.tail=null,pe.lastEffect=null),as(t,Fi.current),de)break;return null}case B:case V:return t.lanes=Se,Cb(e,t,r)}return Ln(e,t,r)}function Ob(e,t,r){if(t._debugNeedsRemount&&e!==null)return pN(e,t,dv(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(e!==null){var i=e.memoizedProps,n=t.pendingProps;if(i!==n||Kc()||t.type!==e.type)Hi=!0;else{var f=Pp(e,r);if(!f&&(t.flags&Rt)===Je)return Hi=!1,vN(e,t,r);(e.flags&Vh)!==Je?Hi=!0:Hi=!1}}else if(Hi=!1,Rr()&&V1(t)){var C=t.index,A=H1();l_(t,A,C)}switch(t.lanes=Se,t.tag){case m:return XD(e,t,t.type,r);case y:{var M=t.elementType;return YD(e,t,M,r)}case h:{var z=t.type,G=t.pendingProps,se=t.elementType===z?G:Vi(z,G);return kp(e,t,z,se,r)}case p:{var ne=t.type,de=t.pendingProps,pe=t.elementType===ne?de:Vi(ne,de);return xb(e,t,ne,pe,r)}case o:return WD(e,t,r);case _:return qD(e,t,r);case E:return GD(e,t);case x:return Nb(e,t,r);case v:return hN(e,t,r);case c:{var ge=t.type,Le=t.pendingProps,qe=t.elementType===ge?Le:Vi(ge,Le);return bb(e,t,ge,qe,r)}case d:return UD(e,t,r);case s:return $D(e,t,r);case g:return zD(e,t,r);case l:return dN(e,t,r);case u:return fN(e,t,r);case S:{var $e=t.type,Et=t.pendingProps,_t=Vi($e,Et);if(t.type!==t.elementType){var oe=$e.propTypes;oe&&Bi(oe,_t,"prop",Nt($e))}return _t=Vi($e.type,_t),yb(e,t,$e,_t,r)}case N:return Sb(e,t,t.type,t.pendingProps,r);case D:{var _e=t.type,le=t.pendingProps,we=t.elementType===_e?le:Vi(_e,le);return KD(e,t,_e,we,r)}case I:return Tb(e,t,r);case L:break;case B:return Cb(e,t,r)}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function qa(e){e.flags|=kt}function Bb(e){e.flags|=Ds,e.flags|=Hh}var Pb,Ip,Ib,Fb;Pb=function(e,t,r,i){for(var n=t.child;n!==null;){if(n.tag===_||n.tag===E)Iw(e,n.stateNode);else if(n.tag!==v){if(n.child!==null){n.child.return=n,n=n.child;continue}}if(n===t)return;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ip=function(e,t){},Ib=function(e,t,r,i,n){var f=e.memoizedProps;if(f!==i){var C=t.stateNode,A=Tf(),M=jw(C,r,f,i,n,A);t.updateQueue=M,M&&qa(t)}},Fb=function(e,t,r,i){r!==i&&qa(t)};function Tl(e,t){if(!Rr())switch(e.tailMode){case"hidden":{for(var r=e.tail,i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?e.tail=null:i.sibling=null;break}case"collapsed":{for(var n=e.tail,f=null;n!==null;)n.alternate!==null&&(f=n),n=n.sibling;f===null?!t&&e.tail!==null?e.tail.sibling=null:e.tail=null:f.sibling=null;break}}}function Tr(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=Se,i=Je;if(t){if((e.mode&Ot)!==Ke){for(var M=e.selfBaseDuration,z=e.child;z!==null;)r=dt(r,dt(z.lanes,z.childLanes)),i|=z.subtreeFlags&Cn,i|=z.flags&Cn,M+=z.treeBaseDuration,z=z.sibling;e.treeBaseDuration=M}else for(var G=e.child;G!==null;)r=dt(r,dt(G.lanes,G.childLanes)),i|=G.subtreeFlags&Cn,i|=G.flags&Cn,G.return=e,G=G.sibling;e.subtreeFlags|=i}else{if((e.mode&Ot)!==Ke){for(var n=e.actualDuration,f=e.selfBaseDuration,C=e.child;C!==null;)r=dt(r,dt(C.lanes,C.childLanes)),i|=C.subtreeFlags,i|=C.flags,n+=C.actualDuration,f+=C.treeBaseDuration,C=C.sibling;e.actualDuration=n,e.treeBaseDuration=f}else for(var A=e.child;A!==null;)r=dt(r,dt(A.lanes,A.childLanes)),i|=A.subtreeFlags,i|=A.flags,A.return=e,A=A.sibling;e.subtreeFlags|=i}return e.childLanes=r,t}function mN(e,t,r){if(eD()&&(t.mode&St)!==Ke&&(t.flags&Rt)===Je)return v_(t),Ba(),t.flags|=yn|fc|Xr,!1;var i=ru(t);if(r!==null&&r.dehydrated!==null)if(e===null){if(!i)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(Q1(t),Tr(t),(t.mode&Ot)!==Ke){var n=r!==null;if(n){var f=t.child;f!==null&&(t.treeBaseDuration-=f.treeBaseDuration)}}return!1}else{if(Ba(),(t.flags&Rt)===Je&&(t.memoizedState=null),t.flags|=kt,Tr(t),(t.mode&Ot)!==Ke){var C=r!==null;if(C){var A=t.child;A!==null&&(t.treeBaseDuration-=A.treeBaseDuration)}}return!1}else return m_(),!0}function jb(e,t,r){var i=t.pendingProps;switch(cf(t),t.tag){case m:case y:case N:case h:case c:case d:case s:case g:case u:case S:return Tr(t),null;case p:{var n=t.type;return rn(n)&&Xc(t),Tr(t),null}case o:{var f=t.stateNode;if(ja(t),sf(t),Pf(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),e===null||e.child===null){var C=ru(t);if(C)qa(t);else if(e!==null){var A=e.memoizedState;(!A.isDehydrated||(t.flags&yn)!==Je)&&(t.flags|=pa,m_())}}return Ip(e,t),Tr(t),null}case _:{Lf(t);var M=T_(),z=t.type;if(e!==null&&t.stateNode!=null)Ib(e,t,z,i,M),e.ref!==t.ref&&Bb(t);else{if(!i){if(t.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Tr(t),null}var G=Tf(),se=ru(t);if(se)X1(t,M,G)&&qa(t);else{var ne=Pw(z,i,M,G,t);Pb(ne,t,!1,!1),t.stateNode=ne,Fw(ne,z,i,M)&&qa(t)}t.ref!==null&&Bb(t)}return Tr(t),null}case E:{var de=i;if(e&&t.stateNode!=null){var pe=e.memoizedProps;Fb(e,t,pe,de)}else{if(typeof de!="string"&&t.stateNode===null)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var ge=T_(),Le=Tf(),qe=ru(t);qe?J1(t)&&qa(t):t.stateNode=Vw(de,ge,Le,t)}return Tr(t),null}case x:{Ha(t);var $e=t.memoizedState;if(e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){var Et=mN(e,t,$e);if(!Et)return t.flags&Xr?t:null}if((t.flags&Rt)!==Je)return t.lanes=r,(t.mode&Ot)!==Ke&&op(t),t;var _t=$e!==null,oe=e!==null&&e.memoizedState!==null;if(_t!==oe&&_t){var _e=t.child;if(_e.flags|=Ns,(t.mode&St)!==Ke){var le=e===null&&(t.memoizedProps.unstable_avoidThisFallback!==!0||!0);le||Mf(Fi.current,O_)?gk():tv()}}var we=t.updateQueue;if(we!==null&&(t.flags|=kt),Tr(t),(t.mode&Ot)!==Ke&&_t){var Ie=t.child;Ie!==null&&(t.treeBaseDuration-=Ie.treeBaseDuration)}return null}case v:return ja(t),Ip(e,t),e===null&&M1(t.stateNode.containerInfo),Tr(t),null;case l:var Oe=t.type._context;return Ef(Oe,t),Tr(t),null;case D:{var Ze=t.type;return rn(Ze)&&Xc(t),Tr(t),null}case I:{Ha(t);var st=t.memoizedState;if(st===null)return Tr(t),null;var Pt=(t.flags&Rt)!==Je,xt=st.rendering;if(xt===null)if(Pt)Tl(st,!1);else{var ar=bk()&&(e===null||(e.flags&Rt)===Je);if(!ar)for(var wt=t.child;wt!==null;){var ir=_u(wt);if(ir!==null){Pt=!0,t.flags|=Rt,Tl(st,!1);var Wr=ir.updateQueue;return Wr!==null&&(t.updateQueue=Wr,t.flags|=kt),t.subtreeFlags=Je,oD(t,r),as(t,Of(Fi.current,_l)),t.child}wt=wt.sibling}st.tail!==null&&Er()>ay()&&(t.flags|=Rt,Pt=!0,Tl(st,!1),t.lanes=Fm)}else{if(!Pt){var Pr=_u(xt);if(Pr!==null){t.flags|=Rt,Pt=!0;var gi=Pr.updateQueue;if(gi!==null&&(t.updateQueue=gi,t.flags|=kt),Tl(st,!0),st.tail===null&&st.tailMode==="hidden"&&!xt.alternate&&!Rr())return Tr(t),null}else Er()*2-st.renderingStartTime>ay()&&r!==ui&&(t.flags|=Rt,Pt=!0,Tl(st,!1),t.lanes=Fm)}if(st.isBackwards)xt.sibling=t.child,t.child=xt;else{var ei=st.last;ei!==null?ei.sibling=xt:t.child=xt,st.last=xt}}if(st.tail!==null){var ti=st.tail;st.rendering=ti,st.tail=ti.sibling,st.renderingStartTime=Er(),ti.sibling=null;var qr=Fi.current;return Pt?qr=Of(qr,_l):qr=Va(qr),as(t,qr),ti}return Tr(t),null}case L:break;case B:case V:{ev(t);var In=t.memoizedState,eo=In!==null;if(e!==null){var Gl=e.memoizedState,hn=Gl!==null;hn!==eo&&!H&&(t.flags|=Ns)}return!eo||(t.mode&St)===Ke?Tr(t):hi(un,ui)&&(Tr(t),t.subtreeFlags&(cr|kt)&&(t.flags|=Ns)),null}case X:return null;case ee:return null}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function gN(e,t,r){switch(cf(t),t.tag){case p:{var i=t.type;rn(i)&&Xc(t);var n=t.flags;return n&Xr?(t.flags=n&~Xr|Rt,(t.mode&Ot)!==Ke&&op(t),t):null}case o:{t.stateNode,ja(t),sf(t),Pf();var f=t.flags;return(f&Xr)!==Je&&(f&Rt)===Je?(t.flags=f&~Xr|Rt,t):null}case _:return Lf(t),null;case x:{Ha(t);var C=t.memoizedState;if(C!==null&&C.dehydrated!==null){if(t.alternate===null)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Ba()}var A=t.flags;return A&Xr?(t.flags=A&~Xr|Rt,(t.mode&Ot)!==Ke&&op(t),t):null}case I:return Ha(t),null;case v:return ja(t),null;case l:var M=t.type._context;return Ef(M,t),null;case B:case V:return ev(t),null;case X:return null;default:return null}}function Vb(e,t,r){switch(cf(t),t.tag){case p:{var i=t.type.childContextTypes;i!=null&&Xc(t);break}case o:{t.stateNode,ja(t),sf(t),Pf();break}case _:{Lf(t);break}case v:ja(t);break;case x:Ha(t);break;case I:Ha(t);break;case l:var n=t.type._context;Ef(n,t);break;case B:case V:ev(t);break}}var Hb=null;Hb=new Set;var Uu=!1,Lr=!1,_N=typeof WeakSet=="function"?WeakSet:Set,je=null,Ga=null,Ya=null;function bN(e){Ih(null,function(){throw e}),Fh()}var yN=function(e,t){if(t.props=e.memoizedProps,t.state=e.memoizedState,e.mode&Ot)try{ln(),t.componentWillUnmount()}finally{on(e)}else t.componentWillUnmount()};function Ub(e,t){try{cs(vr,e)}catch(r){Vt(e,t,r)}}function Fp(e,t,r){try{yN(e,r)}catch(i){Vt(e,t,i)}}function SN(e,t,r){try{r.componentDidMount()}catch(i){Vt(e,t,i)}}function $b(e,t){try{Wb(e)}catch(r){Vt(e,t,r)}}function Ka(e,t){var r=e.ref;if(r!==null)if(typeof r=="function"){var i;try{if(ae&&ve&&e.mode&Ot)try{ln(),i=r(null)}finally{on(e)}else i=r(null)}catch(n){Vt(e,t,n)}typeof i=="function"&&R("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",lt(e))}else r.current=null}function $u(e,t,r){try{r()}catch(i){Vt(e,t,i)}}var zb=!1;function CN(e,t){Ow(e.containerInfo),je=t,EN();var r=zb;return zb=!1,r}function EN(){for(;je!==null;){var e=je,t=e.child;(e.subtreeFlags&zh)!==Je&&t!==null?(t.return=e,je=t):xN()}}function xN(){for(;je!==null;){var e=je;Xt(e);try{wN(e)}catch(r){Vt(e,e.return,r)}Cr();var t=e.sibling;if(t!==null){t.return=e.return,je=t;return}je=e.return}}function wN(e){var t=e.alternate,r=e.flags;if((r&pa)!==Je){switch(Xt(e),e.tag){case h:case c:case N:break;case p:{if(t!==null){var i=t.memoizedProps,n=t.memoizedState,f=e.stateNode;e.type===e.elementType&&!Gs&&(f.props!==e.memoizedProps&&R("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",lt(e)||"instance"),f.state!==e.memoizedState&&R("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",lt(e)||"instance"));var C=f.getSnapshotBeforeUpdate(e.elementType===e.type?i:Vi(e.type,i),n);{var A=Hb;C===void 0&&!A.has(e.type)&&(A.add(e.type),R("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",lt(e)))}f.__reactInternalSnapshotBeforeUpdate=C}break}case o:{{var M=e.stateNode;s1(M.containerInfo)}break}case _:case E:case v:case D:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Cr()}}function Ui(e,t,r){var i=t.updateQueue,n=i!==null?i.lastEffect:null;if(n!==null){var f=n.next,C=f;do{if((C.tag&e)===e){var A=C.destroy;C.destroy=void 0,A!==void 0&&((e&Ar)!==ai?VC(t):(e&vr)!==ai&&Mm(t),(e&nn)!==ai&&zl(!0),$u(t,r,A),(e&nn)!==ai&&zl(!1),(e&Ar)!==ai?HC():(e&vr)!==ai&&Om())}C=C.next}while(C!==f)}}function cs(e,t){var r=t.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var n=i.next,f=n;do{if((f.tag&e)===e){(e&Ar)!==ai?FC(t):(e&vr)!==ai&&UC(t);var C=f.create;(e&nn)!==ai&&zl(!0),f.destroy=C(),(e&nn)!==ai&&zl(!1),(e&Ar)!==ai?jC():(e&vr)!==ai&&$C();{var A=f.destroy;if(A!==void 0&&typeof A!="function"){var M=void 0;(f.tag&vr)!==Je?M="useLayoutEffect":(f.tag&nn)!==Je?M="useInsertionEffect":M="useEffect";var z=void 0;A===null?z=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof A.then=="function"?z=`
162
+
163
+ It looks like you wrote `+M+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
164
+
165
+ `+M+`(() => {
166
+ async function fetchData() {
167
+ // You can await here
168
+ const response = await MyAPI.getData(someId);
169
+ // ...
170
+ }
171
+ fetchData();
172
+ }, [someId]); // Or [] if effect doesn't need props or state
173
+
174
+ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`:z=" You returned: "+A,R("%s must not return anything besides a function, which is used for clean-up.%s",M,z)}}}f=f.next}while(f!==n)}}function DN(e,t){if((t.flags&kt)!==Je)switch(t.tag){case g:{var r=t.stateNode.passiveEffectDuration,i=t.memoizedProps,n=i.id,f=i.onPostCommit,C=ab(),A=t.alternate===null?"mount":"update";sb()&&(A="nested-update"),typeof f=="function"&&f(n,A,r,C);var M=t.return;e:for(;M!==null;){switch(M.tag){case o:var z=M.stateNode;z.passiveEffectDuration+=r;break e;case g:var G=M.stateNode;G.passiveEffectDuration+=r;break e}M=M.return}break}}}function NN(e,t,r,i){if((r.flags&Do)!==Je)switch(r.tag){case h:case c:case N:{if(!Lr)if(r.mode&Ot)try{ln(),cs(vr|pr,r)}finally{on(r)}else cs(vr|pr,r);break}case p:{var n=r.stateNode;if(r.flags&kt&&!Lr)if(t===null)if(r.type===r.elementType&&!Gs&&(n.props!==r.memoizedProps&&R("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",lt(r)||"instance"),n.state!==r.memoizedState&&R("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",lt(r)||"instance")),r.mode&Ot)try{ln(),n.componentDidMount()}finally{on(r)}else n.componentDidMount();else{var f=r.elementType===r.type?t.memoizedProps:Vi(r.type,t.memoizedProps),C=t.memoizedState;if(r.type===r.elementType&&!Gs&&(n.props!==r.memoizedProps&&R("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",lt(r)||"instance"),n.state!==r.memoizedState&&R("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",lt(r)||"instance")),r.mode&Ot)try{ln(),n.componentDidUpdate(f,C,n.__reactInternalSnapshotBeforeUpdate)}finally{on(r)}else n.componentDidUpdate(f,C,n.__reactInternalSnapshotBeforeUpdate)}var A=r.updateQueue;A!==null&&(r.type===r.elementType&&!Gs&&(n.props!==r.memoizedProps&&R("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",lt(r)||"instance"),n.state!==r.memoizedState&&R("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",lt(r)||"instance")),A_(r,A,n));break}case o:{var M=r.updateQueue;if(M!==null){var z=null;if(r.child!==null)switch(r.child.tag){case _:z=r.child.stateNode;break;case p:z=r.child.stateNode;break}A_(r,M,z)}break}case _:{var G=r.stateNode;if(t===null&&r.flags&kt){var se=r.type,ne=r.memoizedProps;Ww(G,se,ne)}break}case E:break;case v:break;case g:{{var de=r.memoizedProps,pe=de.onCommit,ge=de.onRender,Le=r.stateNode.effectDuration,qe=ab(),$e=t===null?"mount":"update";sb()&&($e="nested-update"),typeof ge=="function"&&ge(r.memoizedProps.id,$e,r.actualDuration,r.treeBaseDuration,r.actualStartTime,qe);{typeof pe=="function"&&pe(r.memoizedProps.id,$e,Le,qe),xk(r);var Et=r.return;e:for(;Et!==null;){switch(Et.tag){case o:var _t=Et.stateNode;_t.effectDuration+=Le;break e;case g:var oe=Et.stateNode;oe.effectDuration+=Le;break e}Et=Et.return}}}break}case x:{BN(e,r);break}case I:case D:case L:case B:case V:case ee:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Lr||r.flags&Ds&&Wb(r)}function kN(e){switch(e.tag){case h:case c:case N:{if(e.mode&Ot)try{ln(),Ub(e,e.return)}finally{on(e)}else Ub(e,e.return);break}case p:{var t=e.stateNode;typeof t.componentDidMount=="function"&&SN(e,e.return,t),$b(e,e.return);break}case _:{$b(e,e.return);break}}}function RN(e,t){for(var r=null,i=e;;){if(i.tag===_){if(r===null){r=i;try{var n=i.stateNode;t?t1(n):i1(i.stateNode,i.memoizedProps)}catch(C){Vt(e,e.return,C)}}}else if(i.tag===E){if(r===null)try{var f=i.stateNode;t?r1(f):n1(f,i.memoizedProps)}catch(C){Vt(e,e.return,C)}}else if(!((i.tag===B||i.tag===V)&&i.memoizedState!==null&&i!==e)){if(i.child!==null){i.child.return=i,i=i.child;continue}}if(i===e)return;for(;i.sibling===null;){if(i.return===null||i.return===e)return;r===i&&(r=null),i=i.return}r===i&&(r=null),i.sibling.return=i.return,i=i.sibling}}function Wb(e){var t=e.ref;if(t!==null){var r=e.stateNode,i;switch(e.tag){case _:i=r;break;default:i=r}if(typeof t=="function"){var n;if(e.mode&Ot)try{ln(),n=t(i)}finally{on(e)}else n=t(i);typeof n=="function"&&R("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",lt(e))}else t.hasOwnProperty("current")||R("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",lt(e)),t.current=i}}function AN(e){var t=e.alternate;t!==null&&(t.return=null),e.return=null}function qb(e){var t=e.alternate;t!==null&&(e.alternate=null,qb(t));{if(e.child=null,e.deletions=null,e.sibling=null,e.tag===_){var r=e.stateNode;r!==null&&P1(r)}e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}}function TN(e){for(var t=e.return;t!==null;){if(Gb(t))return t;t=t.return}throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function Gb(e){return e.tag===_||e.tag===o||e.tag===v}function Yb(e){var t=e;e:for(;;){for(;t.sibling===null;){if(t.return===null||Gb(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==_&&t.tag!==E&&t.tag!==k;){if(t.flags&cr||t.child===null||t.tag===v)continue e;t.child.return=t,t=t.child}if(!(t.flags&cr))return t.stateNode}}function LN(e){var t=TN(e);switch(t.tag){case _:{var r=t.stateNode;t.flags&wo&&(Xg(r),t.flags&=~wo);var i=Yb(e);Vp(e,i,r);break}case o:case v:{var n=t.stateNode.containerInfo,f=Yb(e);jp(e,f,n);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function jp(e,t,r){var i=e.tag,n=i===_||i===E;if(n){var f=e.stateNode;t?Jw(r,f,t):Kw(r,f)}else if(i!==v){var C=e.child;if(C!==null){jp(C,t,r);for(var A=C.sibling;A!==null;)jp(A,t,r),A=A.sibling}}}function Vp(e,t,r){var i=e.tag,n=i===_||i===E;if(n){var f=e.stateNode;t?Xw(r,f,t):Yw(r,f)}else if(i!==v){var C=e.child;if(C!==null){Vp(C,t,r);for(var A=C.sibling;A!==null;)Vp(A,t,r),A=A.sibling}}}var Mr=null,$i=!1;function MN(e,t,r){{var i=t;e:for(;i!==null;){switch(i.tag){case _:{Mr=i.stateNode,$i=!1;break e}case o:{Mr=i.stateNode.containerInfo,$i=!0;break e}case v:{Mr=i.stateNode.containerInfo,$i=!0;break e}}i=i.return}if(Mr===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Kb(e,t,r),Mr=null,$i=!1}AN(r)}function us(e,t,r){for(var i=r.child;i!==null;)Kb(e,t,i),i=i.sibling}function Kb(e,t,r){switch(OC(r),r.tag){case _:Lr||Ka(r,t);case E:{{var i=Mr,n=$i;Mr=null,us(e,t,r),Mr=i,$i=n,Mr!==null&&($i?Zw(Mr,r.stateNode):Qw(Mr,r.stateNode))}return}case k:{Mr!==null&&($i?e1(Mr,r.stateNode):Xd(Mr,r.stateNode));return}case v:{{var f=Mr,C=$i;Mr=r.stateNode.containerInfo,$i=!0,us(e,t,r),Mr=f,$i=C}return}case h:case c:case S:case N:{if(!Lr){var A=r.updateQueue;if(A!==null){var M=A.lastEffect;if(M!==null){var z=M.next,G=z;do{var se=G,ne=se.destroy,de=se.tag;ne!==void 0&&((de&nn)!==ai?$u(r,t,ne):(de&vr)!==ai&&(Mm(r),r.mode&Ot?(ln(),$u(r,t,ne),on(r)):$u(r,t,ne),Om())),G=G.next}while(G!==z)}}}us(e,t,r);return}case p:{if(!Lr){Ka(r,t);var pe=r.stateNode;typeof pe.componentWillUnmount=="function"&&Fp(r,t,pe)}us(e,t,r);return}case L:{us(e,t,r);return}case B:{if(r.mode&St){var ge=Lr;Lr=ge||r.memoizedState!==null,us(e,t,r),Lr=ge}else us(e,t,r);break}default:{us(e,t,r);return}}}function ON(e){e.memoizedState}function BN(e,t){var r=t.memoizedState;if(r===null){var i=t.alternate;if(i!==null){var n=i.memoizedState;if(n!==null){var f=n.dehydrated;f!==null&&b1(f)}}}}function Xb(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new _N),t.forEach(function(i){var n=Tk.bind(null,e,i);if(!r.has(i)){if(r.add(i),Mi)if(Ga!==null&&Ya!==null)$l(Ya,Ga);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");i.then(n,n)}})}}function PN(e,t,r){Ga=r,Ya=e,Xt(t),Jb(t,e),Xt(t),Ga=null,Ya=null}function zi(e,t,r){var i=t.deletions;if(i!==null)for(var n=0;n<i.length;n++){var f=i[n];try{MN(e,t,f)}catch(M){Vt(f,t,M)}}var C=rc();if(t.subtreeFlags&Wh)for(var A=t.child;A!==null;)Xt(A),Jb(A,e),A=A.sibling;Xt(C)}function Jb(e,t,r){var i=e.alternate,n=e.flags;switch(e.tag){case h:case c:case S:case N:{if(zi(t,e),cn(e),n&kt){try{Ui(nn|pr,e,e.return),cs(nn|pr,e)}catch(Ze){Vt(e,e.return,Ze)}if(e.mode&Ot){try{ln(),Ui(vr|pr,e,e.return)}catch(Ze){Vt(e,e.return,Ze)}on(e)}else try{Ui(vr|pr,e,e.return)}catch(Ze){Vt(e,e.return,Ze)}}return}case p:{zi(t,e),cn(e),n&Ds&&i!==null&&Ka(i,i.return);return}case _:{zi(t,e),cn(e),n&Ds&&i!==null&&Ka(i,i.return);{if(e.flags&wo){var f=e.stateNode;try{Xg(f)}catch(Ze){Vt(e,e.return,Ze)}}if(n&kt){var C=e.stateNode;if(C!=null){var A=e.memoizedProps,M=i!==null?i.memoizedProps:A,z=e.type,G=e.updateQueue;if(e.updateQueue=null,G!==null)try{qw(C,G,z,M,A,e)}catch(Ze){Vt(e,e.return,Ze)}}}}return}case E:{if(zi(t,e),cn(e),n&kt){if(e.stateNode===null)throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var se=e.stateNode,ne=e.memoizedProps,de=i!==null?i.memoizedProps:ne;try{Gw(se,de,ne)}catch(Ze){Vt(e,e.return,Ze)}}return}case o:{if(zi(t,e),cn(e),n&kt&&i!==null){var pe=i.memoizedState;if(pe.isDehydrated)try{_1(t.containerInfo)}catch(Ze){Vt(e,e.return,Ze)}}return}case v:{zi(t,e),cn(e);return}case x:{zi(t,e),cn(e);var ge=e.child;if(ge.flags&Ns){var Le=ge.stateNode,qe=ge.memoizedState,$e=qe!==null;if(Le.isHidden=$e,$e){var Et=ge.alternate!==null&&ge.alternate.memoizedState!==null;Et||mk()}}if(n&kt){try{ON(e)}catch(Ze){Vt(e,e.return,Ze)}Xb(e)}return}case B:{var _t=i!==null&&i.memoizedState!==null;if(e.mode&St){var oe=Lr;Lr=oe||_t,zi(t,e),Lr=oe}else zi(t,e);if(cn(e),n&Ns){var _e=e.stateNode,le=e.memoizedState,we=le!==null,Ie=e;if(_e.isHidden=we,we&&!_t&&(Ie.mode&St)!==Ke){je=Ie;for(var Oe=Ie.child;Oe!==null;)je=Oe,FN(Oe),Oe=Oe.sibling}RN(Ie,we)}return}case I:{zi(t,e),cn(e),n&kt&&Xb(e);return}case L:return;default:{zi(t,e),cn(e);return}}}function cn(e){var t=e.flags;if(t&cr){try{LN(e)}catch(r){Vt(e,e.return,r)}e.flags&=~cr}t&Sn&&(e.flags&=~Sn)}function IN(e,t,r){Ga=r,Ya=t,je=e,Qb(e,t,r),Ga=null,Ya=null}function Qb(e,t,r){for(var i=(e.mode&St)!==Ke;je!==null;){var n=je,f=n.child;if(n.tag===B&&i){var C=n.memoizedState!==null,A=C||Uu;if(A){Hp(e,t,r);continue}else{var M=n.alternate,z=M!==null&&M.memoizedState!==null,G=z||Lr,se=Uu,ne=Lr;Uu=A,Lr=G,Lr&&!ne&&(je=n,jN(n));for(var de=f;de!==null;)je=de,Qb(de,t,r),de=de.sibling;je=n,Uu=se,Lr=ne,Hp(e,t,r);continue}}(n.subtreeFlags&Do)!==Je&&f!==null?(f.return=n,je=f):Hp(e,t,r)}}function Hp(e,t,r){for(;je!==null;){var i=je;if((i.flags&Do)!==Je){var n=i.alternate;Xt(i);try{NN(t,n,i,r)}catch(C){Vt(i,i.return,C)}Cr()}if(i===e){je=null;return}var f=i.sibling;if(f!==null){f.return=i.return,je=f;return}je=i.return}}function FN(e){for(;je!==null;){var t=je,r=t.child;switch(t.tag){case h:case c:case S:case N:{if(t.mode&Ot)try{ln(),Ui(vr,t,t.return)}finally{on(t)}else Ui(vr,t,t.return);break}case p:{Ka(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Fp(t,t.return,i);break}case _:{Ka(t,t.return);break}case B:{var n=t.memoizedState!==null;if(n){Zb(e);continue}break}}r!==null?(r.return=t,je=r):Zb(e)}}function Zb(e){for(;je!==null;){var t=je;if(t===e){je=null;return}var r=t.sibling;if(r!==null){r.return=t.return,je=r;return}je=t.return}}function jN(e){for(;je!==null;){var t=je,r=t.child;if(t.tag===B){var i=t.memoizedState!==null;if(i){ey(e);continue}}r!==null?(r.return=t,je=r):ey(e)}}function ey(e){for(;je!==null;){var t=je;Xt(t);try{kN(t)}catch(i){Vt(t,t.return,i)}if(Cr(),t===e){je=null;return}var r=t.sibling;if(r!==null){r.return=t.return,je=r;return}je=t.return}}function VN(e,t,r,i){je=t,HN(t,e,r,i)}function HN(e,t,r,i){for(;je!==null;){var n=je,f=n.child;(n.subtreeFlags&va)!==Je&&f!==null?(f.return=n,je=f):UN(e,t,r,i)}}function UN(e,t,r,i){for(;je!==null;){var n=je;if((n.flags&Wn)!==Je){Xt(n);try{$N(t,n,r,i)}catch(C){Vt(n,n.return,C)}Cr()}if(n===e){je=null;return}var f=n.sibling;if(f!==null){f.return=n.return,je=f;return}je=n.return}}function $N(e,t,r,i){switch(t.tag){case h:case c:case N:{if(t.mode&Ot){ap();try{cs(Ar|pr,t)}finally{sp(t)}}else cs(Ar|pr,t);break}}}function zN(e){je=e,WN()}function WN(){for(;je!==null;){var e=je,t=e.child;if((je.flags&ws)!==Je){var r=e.deletions;if(r!==null){for(var i=0;i<r.length;i++){var n=r[i];je=n,YN(n,e)}{var f=e.alternate;if(f!==null){var C=f.child;if(C!==null){f.child=null;do{var A=C.sibling;C.sibling=null,C=A}while(C!==null)}}}je=e}}(e.subtreeFlags&va)!==Je&&t!==null?(t.return=e,je=t):qN()}}function qN(){for(;je!==null;){var e=je;(e.flags&Wn)!==Je&&(Xt(e),GN(e),Cr());var t=e.sibling;if(t!==null){t.return=e.return,je=t;return}je=e.return}}function GN(e){switch(e.tag){case h:case c:case N:{e.mode&Ot?(ap(),Ui(Ar|pr,e,e.return),sp(e)):Ui(Ar|pr,e,e.return);break}}}function YN(e,t){for(;je!==null;){var r=je;Xt(r),XN(r,t),Cr();var i=r.child;i!==null?(i.return=r,je=i):KN(e)}}function KN(e){for(;je!==null;){var t=je,r=t.sibling,i=t.return;if(qb(t),t===e){je=null;return}if(r!==null){r.return=i,je=r;return}je=i}}function XN(e,t){switch(e.tag){case h:case c:case N:{e.mode&Ot?(ap(),Ui(Ar,e,t),sp(e)):Ui(Ar,e,t);break}}}function JN(e){switch(e.tag){case h:case c:case N:{try{cs(vr|pr,e)}catch(r){Vt(e,e.return,r)}break}case p:{var t=e.stateNode;try{t.componentDidMount()}catch(r){Vt(e,e.return,r)}break}}}function QN(e){switch(e.tag){case h:case c:case N:{try{cs(Ar|pr,e)}catch(t){Vt(e,e.return,t)}break}}}function ZN(e){switch(e.tag){case h:case c:case N:{try{Ui(vr|pr,e,e.return)}catch(r){Vt(e,e.return,r)}break}case p:{var t=e.stateNode;typeof t.componentWillUnmount=="function"&&Fp(e,e.return,t);break}}}function ek(e){switch(e.tag){case h:case c:case N:try{Ui(Ar|pr,e,e.return)}catch(t){Vt(e,e.return,t)}}}if(typeof Symbol=="function"&&Symbol.for){var Ll=Symbol.for;Ll("selector.component"),Ll("selector.has_pseudo_class"),Ll("selector.role"),Ll("selector.test_id"),Ll("selector.text")}var tk=[];function rk(){tk.forEach(function(e){return e()})}var ik=O.ReactCurrentActQueue;function nk(e){{var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,r=typeof jest<"u";return r&&t!==!1}}function ty(){{var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return!e&&ik.current!==null&&R("The current testing environment is not configured to support act(...)"),e}}var sk=Math.ceil,Up=O.ReactCurrentDispatcher,$p=O.ReactCurrentOwner,Or=O.ReactCurrentBatchConfig,Wi=O.ReactCurrentActQueue,_r=0,ry=1,Br=2,Di=4,Mn=0,Ml=1,Ys=2,zu=3,Ol=4,iy=5,zp=6,Ct=_r,Qr=null,er=null,br=Se,un=Se,Wp=es(Se),yr=Mn,Bl=null,Wu=Se,Pl=Se,qu=Se,Il=null,oi=null,qp=0,ny=500,sy=1/0,ak=500,On=null;function Fl(){sy=Er()+ak}function ay(){return sy}var Gu=!1,Gp=null,Xa=null,Ks=!1,hs=null,jl=Se,Yp=[],Kp=null,ok=50,Vl=0,Xp=null,Jp=!1,Yu=!1,lk=50,Ja=0,Ku=null,Hl=Wt,Xu=Se,oy=!1;function Ju(){return Qr}function Zr(){return(Ct&(Br|Di))!==_r?Er():(Hl!==Wt||(Hl=Er()),Hl)}function ds(e){var t=e.mode;if((t&St)===Ke)return rt;if((Ct&Br)!==_r&&br!==Se)return Mo(br);var r=iD()!==rD;if(r){if(Or.transition!==null){var i=Or.transition;i._updatedFibers||(i._updatedFibers=new Set),i._updatedFibers.add(e)}return Xu===wr&&(Xu=Um()),Xu}var n=Oi();if(n!==wr)return n;var f=Hw();return f}function ck(e){var t=e.mode;return(t&St)===Ke?rt:hE()}function Sr(e,t,r,i){Mk(),oy&&R("useInsertionEffect must not schedule updates."),Jp&&(Yu=!0),Oo(e,r,i),(Ct&Br)!==Se&&e===Qr?Pk(t):(Mi&&Wm(e,t,r),Ik(t),e===Qr&&((Ct&Br)===_r&&(Pl=dt(Pl,r)),yr===Ol&&fs(e,br)),li(e,i),r===rt&&Ct===_r&&(t.mode&St)===Ke&&!Wi.isBatchingLegacy&&(Fl(),o_()))}function uk(e,t,r){var i=e.current;i.lanes=t,Oo(e,t,r),li(e,r)}function hk(e){return(Ct&Br)!==_r}function li(e,t){var r=e.callbackNode;sE(e,t);var i=_c(e,e===Qr?br:Se);if(i===Se){r!==null&&Ey(r),e.callbackNode=null,e.callbackPriority=wr;return}var n=Ms(i),f=e.callbackPriority;if(f===n&&!(Wi.current!==null&&r!==nv)){r==null&&f!==rt&&R("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}r!=null&&Ey(r);var C;if(n===rt)e.tag===ts?(Wi.isBatchingLegacy!==null&&(Wi.didScheduleLegacyUpdate=!0),j1(uy.bind(null,e))):a_(uy.bind(null,e)),Wi.current!==null?Wi.current.push(rs):$w(function(){(Ct&(Br|Di))===_r&&rs()}),C=null;else{var A;switch(Ym(i)){case di:A=pc;break;case xn:A=qh;break;case wn:A=As;break;case Sc:A=Gh;break;default:A=As;break}C=sv(A,ly.bind(null,e))}e.callbackPriority=n,e.callbackNode=C}function ly(e,t){if(RD(),Hl=Wt,Xu=Se,(Ct&(Br|Di))!==_r)throw new Error("Should not already be working.");var r=e.callbackNode,i=Pn();if(i&&e.callbackNode!==r)return null;var n=_c(e,e===Qr?br:Se);if(n===Se)return null;var f=!bc(e,n)&&!uE(e,n)&&!t,C=f?Sk(e,n):Zu(e,n);if(C!==Mn){if(C===Ys){var A=vd(e);A!==Se&&(n=A,C=Qp(e,A))}if(C===Ml){var M=Bl;throw Xs(e,Se),fs(e,n),li(e,Er()),M}if(C===zp)fs(e,n);else{var z=!bc(e,n),G=e.current.alternate;if(z&&!fk(G)){if(C=Zu(e,n),C===Ys){var se=vd(e);se!==Se&&(n=se,C=Qp(e,se))}if(C===Ml){var ne=Bl;throw Xs(e,Se),fs(e,n),li(e,Er()),ne}}e.finishedWork=G,e.finishedLanes=n,dk(e,C,n)}}return li(e,Er()),e.callbackNode===r?ly.bind(null,e):null}function Qp(e,t){var r=Il;if(Cc(e)){var i=Xs(e,t);i.flags|=yn,L1(e.containerInfo)}var n=Zu(e,t);if(n!==Ys){var f=oi;oi=r,f!==null&&cy(f)}return n}function cy(e){oi===null?oi=e:oi.push.apply(oi,e)}function dk(e,t,r){switch(t){case Mn:case Ml:throw new Error("Root did not complete. This is a bug in React.");case Ys:{Js(e,oi,On);break}case zu:{if(fs(e,r),Vm(r)&&!xy()){var i=qp+ny-Er();if(i>10){var n=_c(e,Se);if(n!==Se)break;var f=e.suspendedLanes;if(!Sa(f,r)){Zr(),zm(e,f);break}e.timeoutHandle=Yd(Js.bind(null,e,oi,On),i);break}}Js(e,oi,On);break}case Ol:{if(fs(e,r),cE(r))break;if(!xy()){var C=iE(e,r),A=C,M=Er()-A,z=Lk(M)-M;if(z>10){e.timeoutHandle=Yd(Js.bind(null,e,oi,On),z);break}}Js(e,oi,On);break}case iy:{Js(e,oi,On);break}default:throw new Error("Unknown root exit status.")}}function fk(e){for(var t=e;;){if(t.flags&jh){var r=t.updateQueue;if(r!==null){var i=r.stores;if(i!==null)for(var n=0;n<i.length;n++){var f=i[n],C=f.getSnapshot,A=f.value;try{if(!pi(C(),A))return!1}catch{return!1}}}}var M=t.child;if(t.subtreeFlags&jh&&M!==null){M.return=t,t=M;continue}if(t===e)return!0;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 fs(e,t){t=yc(t,qu),t=yc(t,Pl),fE(e,t)}function uy(e){if(AD(),(Ct&(Br|Di))!==_r)throw new Error("Should not already be working.");Pn();var t=_c(e,Se);if(!hi(t,rt))return li(e,Er()),null;var r=Zu(e,t);if(e.tag!==ts&&r===Ys){var i=vd(e);i!==Se&&(t=i,r=Qp(e,i))}if(r===Ml){var n=Bl;throw Xs(e,Se),fs(e,t),li(e,Er()),n}if(r===zp)throw new Error("Root did not complete. This is a bug in React.");var f=e.current.alternate;return e.finishedWork=f,e.finishedLanes=t,Js(e,oi,On),li(e,Er()),null}function pk(e,t){t!==Se&&(bd(e,dt(t,rt)),li(e,Er()),(Ct&(Br|Di))===_r&&(Fl(),rs()))}function Zp(e,t){var r=Ct;Ct|=ry;try{return e(t)}finally{Ct=r,Ct===_r&&!Wi.isBatchingLegacy&&(Fl(),o_())}}function vk(e,t,r,i,n){var f=Oi(),C=Or.transition;try{return Or.transition=null,Dr(di),e(t,r,i,n)}finally{Dr(f),Or.transition=C,Ct===_r&&Fl()}}function Bn(e){hs!==null&&hs.tag===ts&&(Ct&(Br|Di))===_r&&Pn();var t=Ct;Ct|=ry;var r=Or.transition,i=Oi();try{return Or.transition=null,Dr(di),e?e():void 0}finally{Dr(i),Or.transition=r,Ct=t,(Ct&(Br|Di))===_r&&rs()}}function hy(){return(Ct&(Br|Di))!==_r}function Qu(e,t){$r(Wp,un,e),un=dt(un,t)}function ev(e){un=Wp.current,Ur(Wp,e)}function Xs(e,t){e.finishedWork=null,e.finishedLanes=Se;var r=e.timeoutHandle;if(r!==Kd&&(e.timeoutHandle=Kd,Uw(r)),er!==null)for(var i=er.return;i!==null;){var n=i.alternate;Vb(n,i),i=i.return}Qr=e;var f=Qs(e.current,null);return er=f,br=un=t,yr=Mn,Bl=null,Wu=Se,Pl=Se,qu=Se,Il=null,oi=null,uD(),Ii.discardPendingWarnings(),f}function dy(e,t){do{var r=er;try{if(lu(),P_(),Cr(),$p.current=null,r===null||r.return===null){yr=Ml,Bl=t,er=null;return}if(ae&&r.mode&Ot&&Iu(r,!0),re)if(ga(),t!==null&&typeof t=="object"&&typeof t.then=="function"){var i=t;WC(r,i,br)}else zC(r,t,br);jD(e,r.return,r,t,br),my(r)}catch(n){t=n,er===r&&r!==null?(r=r.return,er=r):r=er;continue}return}while(!0)}function fy(){var e=Up.current;return Up.current=Lu,e===null?Lu:e}function py(e){Up.current=e}function mk(){qp=Er()}function Ul(e){Wu=dt(e,Wu)}function gk(){yr===Mn&&(yr=zu)}function tv(){(yr===Mn||yr===zu||yr===Ys)&&(yr=Ol),Qr!==null&&(md(Wu)||md(Pl))&&fs(Qr,br)}function _k(e){yr!==Ol&&(yr=Ys),Il===null?Il=[e]:Il.push(e)}function bk(){return yr===Mn}function Zu(e,t){var r=Ct;Ct|=Br;var i=fy();if(Qr!==e||br!==t){if(Mi){var n=e.memoizedUpdaters;n.size>0&&($l(e,br),n.clear()),qm(e,t)}On=Gm(),Xs(e,t)}Bm(t);do try{yk();break}catch(f){dy(e,f)}while(!0);if(lu(),Ct=r,py(i),er!==null)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return Pm(),Qr=null,br=Se,yr}function yk(){for(;er!==null;)vy(er)}function Sk(e,t){var r=Ct;Ct|=Br;var i=fy();if(Qr!==e||br!==t){if(Mi){var n=e.memoizedUpdaters;n.size>0&&($l(e,br),n.clear()),qm(e,t)}On=Gm(),Fl(),Xs(e,t)}Bm(t);do try{Ck();break}catch(f){dy(e,f)}while(!0);return lu(),py(i),Ct=r,er!==null?(XC(),Mn):(Pm(),Qr=null,br=Se,yr)}function Ck(){for(;er!==null&&!xC();)vy(er)}function vy(e){var t=e.alternate;Xt(e);var r;(e.mode&Ot)!==Ke?(np(e),r=rv(t,e,un),Iu(e,!0)):r=rv(t,e,un),Cr(),e.memoizedProps=e.pendingProps,r===null?my(e):er=r,$p.current=null}function my(e){var t=e;do{var r=t.alternate,i=t.return;if((t.flags&fc)===Je){Xt(t);var n=void 0;if((t.mode&Ot)===Ke?n=jb(r,t,un):(np(t),n=jb(r,t,un),Iu(t,!1)),Cr(),n!==null){er=n;return}}else{var f=gN(r,t);if(f!==null){f.flags&=_C,er=f;return}if((t.mode&Ot)!==Ke){Iu(t,!1);for(var C=t.actualDuration,A=t.child;A!==null;)C+=A.actualDuration,A=A.sibling;t.actualDuration=C}if(i!==null)i.flags|=fc,i.subtreeFlags=Je,i.deletions=null;else{yr=zp,er=null;return}}var M=t.sibling;if(M!==null){er=M;return}t=i,er=t}while(t!==null);yr===Mn&&(yr=iy)}function Js(e,t,r){var i=Oi(),n=Or.transition;try{Or.transition=null,Dr(di),Ek(e,t,r,i)}finally{Or.transition=n,Dr(i)}return null}function Ek(e,t,r,i){do Pn();while(hs!==null);if(Ok(),(Ct&(Br|Di))!==_r)throw new Error("Should not already be working.");var n=e.finishedWork,f=e.finishedLanes;if(IC(f),n===null)return Lm(),null;if(f===Se&&R("root.finishedLanes should not be empty during a commit. This is a bug in React."),e.finishedWork=null,e.finishedLanes=Se,n===e.current)throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");e.callbackNode=null,e.callbackPriority=wr;var C=dt(n.lanes,n.childLanes);pE(e,C),e===Qr&&(Qr=null,er=null,br=Se),((n.subtreeFlags&va)!==Je||(n.flags&va)!==Je)&&(Ks||(Ks=!0,Kp=r,sv(As,function(){return Pn(),null})));var A=(n.subtreeFlags&(zh|Wh|Do|va))!==Je,M=(n.flags&(zh|Wh|Do|va))!==Je;if(A||M){var z=Or.transition;Or.transition=null;var G=Oi();Dr(di);var se=Ct;Ct|=Di,$p.current=null,CN(e,n),ob(),PN(e,n,f),Bw(e.containerInfo),e.current=n,qC(f),IN(n,e,f),GC(),wC(),Ct=se,Dr(G),Or.transition=z}else e.current=n,ob();var ne=Ks;if(Ks?(Ks=!1,hs=e,jl=f):(Ja=0,Ku=null),C=e.pendingLanes,C===Se&&(Xa=null),ne||yy(e.current,!1),LC(n.stateNode,i),Mi&&e.memoizedUpdaters.clear(),rk(),li(e,Er()),t!==null)for(var de=e.onRecoverableError,pe=0;pe<t.length;pe++){var ge=t[pe],Le=ge.stack,qe=ge.digest;de(ge.value,{componentStack:Le,digest:qe})}if(Gu){Gu=!1;var $e=Gp;throw Gp=null,$e}return hi(jl,rt)&&e.tag!==ts&&Pn(),C=e.pendingLanes,hi(C,rt)?(kD(),e===Xp?Vl++:(Vl=0,Xp=e)):Vl=0,rs(),Lm(),null}function Pn(){if(hs!==null){var e=Ym(jl),t=_E(wn,e),r=Or.transition,i=Oi();try{return Or.transition=null,Dr(t),wk()}finally{Dr(i),Or.transition=r}}return!1}function xk(e){Yp.push(e),Ks||(Ks=!0,sv(As,function(){return Pn(),null}))}function wk(){if(hs===null)return!1;var e=Kp;Kp=null;var t=hs,r=jl;if(hs=null,jl=Se,(Ct&(Br|Di))!==_r)throw new Error("Cannot flush passive effects while already rendering.");Jp=!0,Yu=!1,YC(r);var i=Ct;Ct|=Di,zN(t.current),VN(t,t.current,r,e);{var n=Yp;Yp=[];for(var f=0;f<n.length;f++){var C=n[f];DN(t,C)}}KC(),yy(t.current,!0),Ct=i,rs(),Yu?t===Ku?Ja++:(Ja=0,Ku=t):Ja=0,Jp=!1,Yu=!1,MC(t);{var A=t.current.stateNode;A.effectDuration=0,A.passiveEffectDuration=0}return!0}function gy(e){return Xa!==null&&Xa.has(e)}function Dk(e){Xa===null?Xa=new Set([e]):Xa.add(e)}function Nk(e){Gu||(Gu=!0,Gp=e)}var kk=Nk;function _y(e,t,r){var i=qs(r,t),n=vb(e,i,rt),f=ns(e,n,rt),C=Zr();f!==null&&(Oo(f,rt,C),li(f,C))}function Vt(e,t,r){if(bN(r),zl(!1),e.tag===o){_y(e,e,r);return}var i=null;for(i=t;i!==null;){if(i.tag===o){_y(i,e,r);return}else if(i.tag===p){var n=i.type,f=i.stateNode;if(typeof n.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&!gy(f)){var C=qs(r,e),A=Cp(i,C,rt),M=ns(i,A,rt),z=Zr();M!==null&&(Oo(M,rt,z),li(M,z));return}}i=i.return}R(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
175
+
176
+ Error message:
177
+
178
+ %s`,r)}function Rk(e,t,r){var i=e.pingCache;i!==null&&i.delete(t);var n=Zr();zm(e,r),Fk(e),Qr===e&&Sa(br,r)&&(yr===Ol||yr===zu&&Vm(br)&&Er()-qp<ny?Xs(e,Se):qu=dt(qu,r)),li(e,n)}function by(e,t){t===wr&&(t=ck(e));var r=Zr(),i=si(e,t);i!==null&&(Oo(i,t,r),li(i,r))}function Ak(e){var t=e.memoizedState,r=wr;t!==null&&(r=t.retryLane),by(e,r)}function Tk(e,t){var r=wr,i;switch(e.tag){case x:i=e.stateNode;var n=e.memoizedState;n!==null&&(r=n.retryLane);break;case I:i=e.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}i!==null&&i.delete(t),by(e,r)}function Lk(e){return e<120?120:e<480?480:e<1080?1080:e<1920?1920:e<3e3?3e3:e<4320?4320:sk(e/1960)*1960}function Mk(){if(Vl>ok)throw Vl=0,Xp=null,new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Ja>lk&&(Ja=0,Ku=null,R("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function Ok(){Ii.flushLegacyContextWarning(),Ii.flushPendingUnsafeLifecycleWarnings()}function yy(e,t){Xt(e),eh(e,qn,ZN),t&&eh(e,$h,ek),eh(e,qn,JN),t&&eh(e,$h,QN),Cr()}function eh(e,t,r){for(var i=e,n=null;i!==null;){var f=i.subtreeFlags&t;i!==n&&i.child!==null&&f!==Je?i=i.child:((i.flags&t)!==Je&&r(i),i.sibling!==null?i=i.sibling:i=n=i.return)}}var th=null;function Sy(e){{if((Ct&Br)!==_r||!(e.mode&St))return;var t=e.tag;if(t!==m&&t!==o&&t!==p&&t!==h&&t!==c&&t!==S&&t!==N)return;var r=lt(e)||"ReactComponent";if(th!==null){if(th.has(r))return;th.add(r)}else th=new Set([r]);var i=Gr;try{Xt(e),R("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{i?Xt(e):Cr()}}}var rv;{var Bk=null;rv=function(e,t,r){var i=Ry(Bk,t);try{return Ob(e,t,r)}catch(f){if(G1()||f!==null&&typeof f=="object"&&typeof f.then=="function")throw f;if(lu(),P_(),Vb(e,t),Ry(t,i),t.mode&Ot&&np(t),Ih(null,Ob,null,e,t,r),vC()){var n=Fh();typeof n=="object"&&n!==null&&n._suppressLogging&&typeof f=="object"&&f!==null&&!f._suppressLogging&&(f._suppressLogging=!0)}throw f}}}var Cy=!1,iv;iv=new Set;function Pk(e){if(Ss&&!wD())switch(e.tag){case h:case c:case N:{var t=er&&lt(er)||"Unknown",r=t;if(!iv.has(r)){iv.add(r);var i=lt(e)||"Unknown";R("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",i,t,t)}break}case p:{Cy||(R("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),Cy=!0);break}}}function $l(e,t){if(Mi){var r=e.memoizedUpdaters;r.forEach(function(i){Wm(e,i,t)})}}var nv={};function sv(e,t){{var r=Wi.current;return r!==null?(r.push(t),nv):Tm(e,t)}}function Ey(e){if(e!==nv)return EC(e)}function xy(){return Wi.current!==null}function Ik(e){{if(e.mode&St){if(!ty())return}else if(!nk()||Ct!==_r||e.tag!==h&&e.tag!==c&&e.tag!==N)return;if(Wi.current===null){var t=Gr;try{Xt(e),R(`An update to %s inside a test was not wrapped in act(...).
179
+
180
+ When testing, code that causes React state updates should be wrapped into act(...):
181
+
182
+ act(() => {
183
+ /* fire events that update state */
184
+ });
185
+ /* assert on the output */
186
+
187
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,lt(e))}finally{t?Xt(e):Cr()}}}}function Fk(e){e.tag!==ts&&ty()&&Wi.current===null&&R(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
188
+
189
+ When testing, code that resolves suspended data should be wrapped into act(...):
190
+
191
+ act(() => {
192
+ /* finish loading suspended data */
193
+ });
194
+ /* assert on the output */
195
+
196
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function zl(e){oy=e}var Ni=null,Qa=null,jk=function(e){Ni=e};function Za(e){{if(Ni===null)return e;var t=Ni(e);return t===void 0?e:t.current}}function av(e){return Za(e)}function ov(e){{if(Ni===null)return e;var t=Ni(e);if(t===void 0){if(e!=null&&typeof e.render=="function"){var r=Za(e.render);if(e.render!==r){var i={$$typeof:ze,render:r};return e.displayName!==void 0&&(i.displayName=e.displayName),i}}return e}return t.current}}function wy(e,t){{if(Ni===null)return!1;var r=e.elementType,i=t.type,n=!1,f=typeof i=="object"&&i!==null?i.$$typeof:null;switch(e.tag){case p:{typeof i=="function"&&(n=!0);break}case h:{(typeof i=="function"||f===Ye)&&(n=!0);break}case c:{(f===ze||f===Ye)&&(n=!0);break}case S:case N:{(f===ht||f===Ye)&&(n=!0);break}default:return!1}if(n){var C=Ni(r);if(C!==void 0&&C===Ni(i))return!0}return!1}}function Dy(e){{if(Ni===null||typeof WeakSet!="function")return;Qa===null&&(Qa=new WeakSet),Qa.add(e)}}var Vk=function(e,t){{if(Ni===null)return;var r=t.staleFamilies,i=t.updatedFamilies;Pn(),Bn(function(){lv(e.current,i,r)})}},Hk=function(e,t){{if(e.context!==vi)return;Pn(),Bn(function(){Wl(t,e,null,null)})}};function lv(e,t,r){{var i=e.alternate,n=e.child,f=e.sibling,C=e.tag,A=e.type,M=null;switch(C){case h:case N:case p:M=A;break;case c:M=A.render;break}if(Ni===null)throw new Error("Expected resolveFamily to be set during hot reload.");var z=!1,G=!1;if(M!==null){var se=Ni(M);se!==void 0&&(r.has(se)?G=!0:t.has(se)&&(C===p?G=!0:z=!0))}if(Qa!==null&&(Qa.has(e)||i!==null&&Qa.has(i))&&(G=!0),G&&(e._debugNeedsRemount=!0),G||z){var ne=si(e,rt);ne!==null&&Sr(ne,e,rt,Wt)}n!==null&&!G&&lv(n,t,r),f!==null&&lv(f,t,r)}}var Uk=function(e,t){{var r=new Set,i=new Set(t.map(function(n){return n.current}));return cv(e.current,i,r),r}};function cv(e,t,r){{var i=e.child,n=e.sibling,f=e.tag,C=e.type,A=null;switch(f){case h:case N:case p:A=C;break;case c:A=C.render;break}var M=!1;A!==null&&t.has(A)&&(M=!0),M?$k(e,r):i!==null&&cv(i,t,r),n!==null&&cv(n,t,r)}}function $k(e,t){{var r=zk(e,t);if(r)return;for(var i=e;;){switch(i.tag){case _:t.add(i.stateNode);return;case v:t.add(i.stateNode.containerInfo);return;case o:t.add(i.stateNode.containerInfo);return}if(i.return===null)throw new Error("Expected to reach root first.");i=i.return}}}function zk(e,t){for(var r=e,i=!1;;){if(r.tag===_)i=!0,t.add(r.stateNode);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)return i;for(;r.sibling===null;){if(r.return===null||r.return===e)return i;r=r.return}r.sibling.return=r.return,r=r.sibling}return!1}var uv;{uv=!1;try{var Ny=Object.preventExtensions({})}catch{uv=!0}}function Wk(e,t,r,i){this.tag=e,this.key=r,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=i,this.flags=Je,this.subtreeFlags=Je,this.deletions=null,this.lanes=Se,this.childLanes=Se,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!uv&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var mi=function(e,t,r,i){return new Wk(e,t,r,i)};function hv(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function qk(e){return typeof e=="function"&&!hv(e)&&e.defaultProps===void 0}function Gk(e){if(typeof e=="function")return hv(e)?p:h;if(e!=null){var t=e.$$typeof;if(t===ze)return c;if(t===ht)return S}return m}function Qs(e,t){var r=e.alternate;r===null?(r=mi(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r._debugSource=e._debugSource,r._debugOwner=e._debugOwner,r._debugHookTypes=e._debugHookTypes,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=Je,r.subtreeFlags=Je,r.deletions=null,r.actualDuration=0,r.actualStartTime=-1),r.flags=e.flags&Cn,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue;var i=e.dependencies;switch(r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.selfBaseDuration=e.selfBaseDuration,r.treeBaseDuration=e.treeBaseDuration,r._debugNeedsRemount=e._debugNeedsRemount,r.tag){case m:case h:case N:r.type=Za(e.type);break;case p:r.type=av(e.type);break;case c:r.type=ov(e.type);break}return r}function Yk(e,t){e.flags&=Cn|cr;var r=e.alternate;if(r===null)e.childLanes=Se,e.lanes=t,e.child=null,e.subtreeFlags=Je,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0;else{e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=Je,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type;var i=r.dependencies;e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},e.selfBaseDuration=r.selfBaseDuration,e.treeBaseDuration=r.treeBaseDuration}return e}function Kk(e,t,r){var i;return e===Qc?(i=St,t===!0&&(i|=rr,i|=Zi)):i=Ke,Mi&&(i|=Ot),mi(o,null,null,i)}function dv(e,t,r,i,n,f){var C=m,A=e;if(typeof e=="function")hv(e)?(C=p,A=av(A)):A=Za(A);else if(typeof e=="string")C=_;else e:switch(e){case bi:return ps(r.children,n,f,t);case Ki:C=s,n|=rr,(n&St)!==Ke&&(n|=Zi);break;case W:return Xk(r,n,f,t);case ft:return Jk(r,n,f,t);case tt:return Qk(r,n,f,t);case Gt:return ky(r,n,f,t);case Vr:case dr:case Xi:case Ai:case qt:default:{if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ue:C=l;break e;case xe:C=u;break e;case ze:C=c,A=ov(A);break e;case ht:C=S;break e;case Ye:C=y,A=null;break e}var M="";{(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(M+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var z=i?lt(i):null;z&&(M+=`
197
+
198
+ Check the render method of \``+z+"`.")}throw new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(e==null?e:typeof e)+"."+M))}}var G=mi(C,r,t,n);return G.elementType=e,G.type=A,G.lanes=f,G._debugOwner=i,G}function fv(e,t,r){var i=null;i=e._owner;var n=e.type,f=e.key,C=e.props,A=dv(n,f,C,i,t,r);return A._debugSource=e._source,A._debugOwner=e._owner,A}function ps(e,t,r,i){var n=mi(d,e,i,t);return n.lanes=r,n}function Xk(e,t,r,i){typeof e.id!="string"&&R('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id);var n=mi(g,e,i,t|Ot);return n.elementType=W,n.lanes=r,n.stateNode={effectDuration:0,passiveEffectDuration:0},n}function Jk(e,t,r,i){var n=mi(x,e,i,t);return n.elementType=ft,n.lanes=r,n}function Qk(e,t,r,i){var n=mi(I,e,i,t);return n.elementType=tt,n.lanes=r,n}function ky(e,t,r,i){var n=mi(B,e,i,t);n.elementType=Gt,n.lanes=r;var f={isHidden:!1};return n.stateNode=f,n}function pv(e,t,r){var i=mi(E,e,null,t);return i.lanes=r,i}function Zk(){var e=mi(_,null,null,Ke);return e.elementType="DELETED",e}function eR(e){var t=mi(k,null,null,Ke);return t.stateNode=e,t}function vv(e,t,r){var i=e.children!==null?e.children:[],n=mi(v,i,e.key,t);return n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Ry(e,t){return e===null&&(e=mi(m,null,null,Ke)),e.tag=t.tag,e.key=t.key,e.elementType=t.elementType,e.type=t.type,e.stateNode=t.stateNode,e.return=t.return,e.child=t.child,e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e.pendingProps=t.pendingProps,e.memoizedProps=t.memoizedProps,e.updateQueue=t.updateQueue,e.memoizedState=t.memoizedState,e.dependencies=t.dependencies,e.mode=t.mode,e.flags=t.flags,e.subtreeFlags=t.subtreeFlags,e.deletions=t.deletions,e.lanes=t.lanes,e.childLanes=t.childLanes,e.alternate=t.alternate,e.actualDuration=t.actualDuration,e.actualStartTime=t.actualStartTime,e.selfBaseDuration=t.selfBaseDuration,e.treeBaseDuration=t.treeBaseDuration,e._debugSource=t._debugSource,e._debugOwner=t._debugOwner,e._debugNeedsRemount=t._debugNeedsRemount,e._debugHookTypes=t._debugHookTypes,e}function tR(e,t,r,i,n){this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=Kd,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=wr,this.eventTimes=_d(Se),this.expirationTimes=_d(Wt),this.pendingLanes=Se,this.suspendedLanes=Se,this.pingedLanes=Se,this.expiredLanes=Se,this.mutableReadLanes=Se,this.finishedLanes=Se,this.entangledLanes=Se,this.entanglements=_d(Se),this.identifierPrefix=i,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var f=this.pendingUpdatersLaneMap=[],C=0;C<Kh;C++)f.push(new Set)}switch(t){case Qc:this._debugRootType=r?"hydrateRoot()":"createRoot()";break;case ts:this._debugRootType=r?"hydrate()":"render()";break}}function Ay(e,t,r,i,n,f,C,A,M,z){var G=new tR(e,t,r,A,M),se=Kk(t,f);G.current=se,se.stateNode=G;{var ne={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null};se.memoizedState=ne}return kf(se),G}var mv="18.3.1";function rR(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return Me(i),{$$typeof:jr,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}var gv,_v;gv=!1,_v={};function Ty(e){if(!e)return vi;var t=da(e),r=F1(t);if(t.tag===p){var i=t.type;if(rn(i))return n_(t,i,r)}return r}function iR(e,t){{var r=da(e);if(r===void 0){if(typeof e.render=="function")throw new Error("Unable to find node on an unmounted component.");var i=Object.keys(e).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+i)}var n=km(r);if(n===null)return null;if(n.mode&rr){var f=lt(r)||"Component";if(!_v[f]){_v[f]=!0;var C=Gr;try{Xt(n),r.mode&rr?R("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,f):R("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,f)}finally{C?Xt(C):Cr()}}}return n.stateNode}}function Ly(e,t,r,i,n,f,C,A){var M=!1,z=null;return Ay(e,t,M,z,r,i,n,f,C)}function My(e,t,r,i,n,f,C,A,M,z){var G=!0,se=Ay(r,i,G,e,n,f,C,A,M);se.context=Ty(null);var ne=se.current,de=Zr(),pe=ds(ne),ge=Tn(de,pe);return ge.callback=t??null,ns(ne,ge,pe),uk(se,pe,de),se}function Wl(e,t,r,i){TC(t,e);var n=t.current,f=Zr(),C=ds(n);JC(C);var A=Ty(r);t.context===null?t.context=A:t.pendingContext=A,Ss&&Gr!==null&&!gv&&(gv=!0,R(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
199
+
200
+ Check the render method of %s.`,lt(Gr)||"Unknown"));var M=Tn(f,C);M.payload={element:e},i=i===void 0?null:i,i!==null&&(typeof i!="function"&&R("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",i),M.callback=i);var z=ns(n,M,C);return z!==null&&(Sr(z,n,C,f),fu(z,n,C)),C}function rh(e){var t=e.current;if(!t.child)return null;switch(t.child.tag){case _:return t.child.stateNode;default:return t.child.stateNode}}function nR(e){switch(e.tag){case o:{var t=e.stateNode;if(Cc(t)){var r=aE(t);pk(t,r)}break}case x:{Bn(function(){var n=si(e,rt);if(n!==null){var f=Zr();Sr(n,e,rt,f)}});var i=rt;bv(e,i);break}}}function Oy(e,t){var r=e.memoizedState;r!==null&&r.dehydrated!==null&&(r.retryLane=dE(r.retryLane,t))}function bv(e,t){Oy(e,t);var r=e.alternate;r&&Oy(r,t)}function sR(e){if(e.tag===x){var t=Ao,r=si(e,t);if(r!==null){var i=Zr();Sr(r,e,t,i)}bv(e,t)}}function aR(e){if(e.tag===x){var t=ds(e),r=si(e,t);if(r!==null){var i=Zr();Sr(r,e,t,i)}bv(e,t)}}function By(e){var t=CC(e);return t===null?null:t.stateNode}var Py=function(e){return null};function oR(e){return Py(e)}var Iy=function(e){return!1};function lR(e){return Iy(e)}var Fy=null,jy=null,Vy=null,Hy=null,Uy=null,$y=null,zy=null,Wy=null,qy=null;{var Gy=function(e,t,r){var i=t[r],n=gt(e)?e.slice():pt({},e);return r+1===t.length?(gt(n)?n.splice(i,1):delete n[i],n):(n[i]=Gy(e[i],t,r+1),n)},Yy=function(e,t){return Gy(e,t,0)},Ky=function(e,t,r,i){var n=t[i],f=gt(e)?e.slice():pt({},e);if(i+1===t.length){var C=r[i];f[C]=f[n],gt(f)?f.splice(n,1):delete f[n]}else f[n]=Ky(e[n],t,r,i+1);return f},Xy=function(e,t,r){if(t.length!==r.length){J("copyWithRename() expects paths of the same length");return}else for(var i=0;i<r.length-1;i++)if(t[i]!==r[i]){J("copyWithRename() expects paths to be the same except for the deepest key");return}return Ky(e,t,r,0)},Jy=function(e,t,r,i){if(r>=t.length)return i;var n=t[r],f=gt(e)?e.slice():pt({},e);return f[n]=Jy(e[n],t,r+1,i),f},Qy=function(e,t,r){return Jy(e,t,0,r)},yv=function(e,t){for(var r=e.memoizedState;r!==null&&t>0;)r=r.next,t--;return r};Fy=function(e,t,r,i){var n=yv(e,t);if(n!==null){var f=Qy(n.memoizedState,r,i);n.memoizedState=f,n.baseState=f,e.memoizedProps=pt({},e.memoizedProps);var C=si(e,rt);C!==null&&Sr(C,e,rt,Wt)}},jy=function(e,t,r){var i=yv(e,t);if(i!==null){var n=Yy(i.memoizedState,r);i.memoizedState=n,i.baseState=n,e.memoizedProps=pt({},e.memoizedProps);var f=si(e,rt);f!==null&&Sr(f,e,rt,Wt)}},Vy=function(e,t,r,i){var n=yv(e,t);if(n!==null){var f=Xy(n.memoizedState,r,i);n.memoizedState=f,n.baseState=f,e.memoizedProps=pt({},e.memoizedProps);var C=si(e,rt);C!==null&&Sr(C,e,rt,Wt)}},Hy=function(e,t,r){e.pendingProps=Qy(e.memoizedProps,t,r),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var i=si(e,rt);i!==null&&Sr(i,e,rt,Wt)},Uy=function(e,t){e.pendingProps=Yy(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var r=si(e,rt);r!==null&&Sr(r,e,rt,Wt)},$y=function(e,t,r){e.pendingProps=Xy(e.memoizedProps,t,r),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var i=si(e,rt);i!==null&&Sr(i,e,rt,Wt)},zy=function(e){var t=si(e,rt);t!==null&&Sr(t,e,rt,Wt)},Wy=function(e){Py=e},qy=function(e){Iy=e}}function cR(e){var t=km(e);return t===null?null:t.stateNode}function uR(e){return null}function hR(){return Gr}function dR(e){var t=e.findFiberByHostInstance,r=O.ReactCurrentDispatcher;return AC({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:Fy,overrideHookStateDeletePath:jy,overrideHookStateRenamePath:Vy,overrideProps:Hy,overridePropsDeletePath:Uy,overridePropsRenamePath:$y,setErrorHandler:Wy,setSuspenseHandler:qy,scheduleUpdate:zy,currentDispatcherRef:r,findHostInstanceByFiber:cR,findFiberByHostInstance:t||uR,findHostInstancesForRefresh:Uk,scheduleRefresh:Vk,scheduleRoot:Hk,setRefreshHandler:jk,getCurrentFiber:hR,reconcilerVersion:mv})}var Zy=typeof reportError=="function"?reportError:function(e){console.error(e)};function Sv(e){this._internalRoot=e}ih.prototype.render=Sv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw new Error("Cannot update an unmounted root.");{typeof arguments[1]=="function"?R("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):nh(arguments[1])?R("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof arguments[1]<"u"&&R("You passed a second argument to root.render(...) but it only accepts one argument.");var r=t.containerInfo;if(r.nodeType!==lr){var i=By(t.current);i&&i.parentNode!==r&&R("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}Wl(e,t,null,null)},ih.prototype.unmount=Sv.prototype.unmount=function(){typeof arguments[0]=="function"&&R("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hy()&&R("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),Bn(function(){Wl(null,e,null,null)}),Zg(t)}};function fR(e,t){if(!nh(e))throw new Error("createRoot(...): Target container is not a DOM element.");e0(e);var r=!1,i=!1,n="",f=Zy;t!=null&&(t.hydrate?J("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===Fr&&R(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
201
+
202
+ let root = createRoot(domContainer);
203
+ root.render(<App />);`),t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(f=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var C=Ly(e,Qc,null,r,i,n,f);Wc(C.current,e);var A=e.nodeType===lr?e.parentNode:e;return Jo(A),new Sv(C)}function ih(e){this._internalRoot=e}function pR(e){e&&RE(e)}ih.prototype.unstable_scheduleHydration=pR;function vR(e,t,r){if(!nh(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");e0(e),t===void 0&&R("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var i=r??null,n=r!=null&&r.hydratedSources||null,f=!1,C=!1,A="",M=Zy;r!=null&&(r.unstable_strictMode===!0&&(f=!0),r.identifierPrefix!==void 0&&(A=r.identifierPrefix),r.onRecoverableError!==void 0&&(M=r.onRecoverableError));var z=My(t,null,e,Qc,i,f,C,A,M);if(Wc(z.current,e),Jo(e),n)for(var G=0;G<n.length;G++){var se=n[G];bD(z,se)}return new ih(z)}function nh(e){return!!(e&&(e.nodeType===ii||e.nodeType===bn||e.nodeType===Dh))}function ql(e){return!!(e&&(e.nodeType===ii||e.nodeType===bn||e.nodeType===Dh||e.nodeType===lr&&e.nodeValue===" react-mount-point-unstable "))}function e0(e){e.nodeType===ii&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&R("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),ll(e)&&(e._reactRootContainer?R("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):R("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var mR=O.ReactCurrentOwner,t0;t0=function(e){if(e._reactRootContainer&&e.nodeType!==lr){var t=By(e._reactRootContainer.current);t&&t.parentNode!==e&&R("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var r=!!e._reactRootContainer,i=Cv(e),n=!!(i&&Zn(i));n&&!r&&R("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===ii&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&R("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function Cv(e){return e?e.nodeType===bn?e.documentElement:e.firstChild:null}function r0(){}function gR(e,t,r,i,n){if(n){if(typeof i=="function"){var f=i;i=function(){var ne=rh(C);f.call(ne)}}var C=My(t,i,e,ts,null,!1,!1,"",r0);e._reactRootContainer=C,Wc(C.current,e);var A=e.nodeType===lr?e.parentNode:e;return Jo(A),Bn(),C}else{for(var M;M=e.lastChild;)e.removeChild(M);if(typeof i=="function"){var z=i;i=function(){var ne=rh(G);z.call(ne)}}var G=Ly(e,ts,null,!1,!1,"",r0);e._reactRootContainer=G,Wc(G.current,e);var se=e.nodeType===lr?e.parentNode:e;return Jo(se),Bn(function(){Wl(t,G,r,i)}),G}}function _R(e,t){e!==null&&typeof e!="function"&&R("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function sh(e,t,r,i,n){t0(r),_R(n===void 0?null:n,"render");var f=r._reactRootContainer,C;if(!f)C=gR(r,t,e,n,i);else{if(C=f,typeof n=="function"){var A=n;n=function(){var M=rh(C);A.call(M)}}Wl(t,C,e,n)}return rh(C)}var i0=!1;function bR(e){{i0||(i0=!0,R("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node"));var t=mR.current;if(t!==null&&t.stateNode!==null){var r=t.stateNode._warnedAboutRefsInRender;r||R("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Nt(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===ii?e:iR(e,"findDOMNode")}function yR(e,t,r){if(R("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!ql(t))throw new Error("Target container is not a DOM element.");{var i=ll(t)&&t._reactRootContainer===void 0;i&&R("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return sh(null,e,t,!0,r)}function SR(e,t,r){if(R("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!ql(t))throw new Error("Target container is not a DOM element.");{var i=ll(t)&&t._reactRootContainer===void 0;i&&R("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return sh(null,e,t,!1,r)}function CR(e,t,r,i){if(R("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!ql(r))throw new Error("Target container is not a DOM element.");if(e==null||!mC(e))throw new Error("parentComponent must be a valid React Component");return sh(e,t,r,!1,i)}var n0=!1;function ER(e){if(n0||(n0=!0,R("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot")),!ql(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=ll(e)&&e._reactRootContainer===void 0;t&&R("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var r=Cv(e),i=r&&!Zn(r);i&&R("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return Bn(function(){sh(null,null,e,!1,function(){e._reactRootContainer=null,Zg(e)})}),!0}else{{var n=Cv(e),f=!!(n&&Zn(n)),C=e.nodeType===ii&&ql(e.parentNode)&&!!e.parentNode._reactRootContainer;f&&R("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",C?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}bE(nR),SE(sR),CE(aR),EE(Oi),xE(mE),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&R("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),sC(ww),lC(Zp,vk,Bn);function xR(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!nh(t))throw new Error("Target container is not a DOM element.");return rR(e,t,null,r)}function wR(e,t,r,i){return CR(e,t,r,i)}var Ev={usingClientEntryPoint:!1,Events:[Zn,Aa,qc,vm,mm,Zp]};function DR(e,t){return Ev.usingClientEntryPoint||R('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),fR(e,t)}function NR(e,t,r){return Ev.usingClientEntryPoint||R('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),vR(e,t,r)}function kR(e){return hy()&&R("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),Bn(e)}var RR=dR({findFiberByHostInstance:Is,bundleType:1,version:mv,rendererPackageName:"react-dom"});if(!RR&&De&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var s0=window.location.protocol;/^(https?|file):$/.test(s0)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(s0==="file:"?`
204
+ You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}ci.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ev,ci.createPortal=xR,ci.createRoot=DR,ci.findDOMNode=bR,ci.flushSync=kR,ci.hydrate=yR,ci.hydrateRoot=NR,ci.render=SR,ci.unmountComponentAtNode=ER,ci.unstable_batchedUpdates=Zp,ci.unstable_renderSubtreeIntoContainer=wR,ci.version=mv,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})(),ci}var f0;function iS(){return f0||(f0=1,Dv.exports=jR()),Dv.exports}var p0;function VR(){if(p0)return oh;p0=1;var w=iS();{var b=w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;oh.createRoot=function(O,F){b.usingClientEntryPoint=!0;try{return w.createRoot(O,F)}finally{b.usingClientEntryPoint=!1}},oh.hydrateRoot=function(O,F,U){b.usingClientEntryPoint=!0;try{return w.hydrateRoot(O,F,U)}finally{b.usingClientEntryPoint=!1}}}return oh}var HR=VR(),K=Xv();function Qt(w){return typeof w=="object"&&w!==null&&!Array.isArray(w)?w:null}function vt(w){return typeof w=="string"?w:null}function et(w){return typeof w=="string"&&w.length>0?w:null}function Fn(w){return typeof w=="boolean"?w:null}function bt(w){return typeof w=="number"&&Number.isFinite(w)?w:null}function UR(w){if(!Array.isArray(w))return null;const b=[];for(const O of w){if(typeof O!="string")return null;b.push(O)}return b}function hr(w,b){if(!Array.isArray(w))return null;const O=[];for(const F of w){const U=b(F);if(U===null)return null;O.push(U)}return O}function _i(w,b){return typeof w=="string"&&b.includes(w)?w:null}function $R(w){try{return JSON.parse(w)}catch{return}}const zR=["custom","ai","first-message","none"],WR=["idle","scanning","ready"],qR=["agent","shell"];function GR(w){const b=Qt(w);if(b===null)return null;const O=et(b.sessionId),F=vt(b.title),U=_i(b.titleSource,zR),J=bt(b.updatedAt),R=bt(b.sizeBytes);return O===null||F===null||U===null||J===null||R===null?null:{sessionId:O,title:F,titleSource:U,updatedAt:J,sizeBytes:R,archived:b.archived===!0}}function YR(w){const b=Qt(w);if(b===null)return null;const O=et(b.slug),F=vt(b.cwd),U=Fn(b.cwdExists),J=hr(b.sessions,GR),R=bt(b.lastActivityAt);return O===null||F===null||U===null||J===null||R===null?null:{slug:O,cwd:F,cwdExists:U,sessions:J,lastActivityAt:R}}function KR(w){const b=Qt(w);if(b===null)return null;const O=_i(b.state,WR),F=bt(b.scannedFiles),U=bt(b.totalFiles);return O===null||F===null||U===null?null:{state:O,scannedFiles:F,totalFiles:U}}function v0(w){const b=Qt(w);if(b===null)return null;const O=et(b.terminalId),F=_i(b.kind,qR)??"agent",U=vt(b.cwd),J=vt(b.sessionId),R=vt(b.label),a=Fn(b.resumed),h=bt(b.createdAt),p=Fn(b.alive);if(O===null||U===null||J===null||R===null||a===null||h===null||p===null)return null;const m=b.exitCode;return{terminalId:O,kind:F,cwd:U,sessionId:J,label:R,resumed:a,createdAt:h,alive:p,exitCode:typeof m=="number"?m:null}}const XR=["user","assistant"],JR=["content","attachment"],Rv={lastRequestTokens:0,lastOutputTokens:0,lastModel:null,contextWindow:null,contextWindowEstimated:!1,totalInputTokens:0,totalOutputTokens:0,totalCacheReadTokens:0,assistantMessages:0},m0=["waiting","live","unavailable"];function QR(w){const b=Qt(w);if(b===null)return null;const O=bt(b.inputTokens),F=bt(b.outputTokens),U=bt(b.cacheCreationInputTokens),J=bt(b.cacheReadInputTokens);return O===null||F===null||U===null||J===null?null:{inputTokens:O,outputTokens:F,cacheCreationInputTokens:U,cacheReadInputTokens:J}}function ZR(w){const b=Qt(w);if(b===null)return null;const O=et(b.label);return O===null?null:{label:O,description:vt(b.description)??""}}function eA(w){const b=Qt(w);if(b===null)return null;const O=et(b.question),F=hr(b.options,ZR);return O===null||F===null||F.length===0?null:{question:O,header:vt(b.header)??"",multiSelect:b.multiSelect===!0,options:F}}function nS(w){const b=Qt(w);if(b===null)return null;switch(b.kind){case"text":{const O=vt(b.text),F=Fn(b.truncated);return O===null||F===null?null:{kind:"text",text:O,truncated:F}}case"tool-call":{const O=vt(b.toolUseId),F=vt(b.name),U=vt(b.input),J=Fn(b.truncated);return O===null||F===null||U===null||J===null?null:{kind:"tool-call",toolUseId:O,name:F,input:U,truncated:J}}case"tool-result":{const O=vt(b.toolUseId),F=vt(b.text),U=Fn(b.isError),J=Fn(b.truncated),R=bt(b.imageCount);return O===null||F===null||U===null||J===null||R===null?null:{kind:"tool-result",toolUseId:O,text:F,isError:U,truncated:J,imageCount:R}}case"thinking":return{kind:"thinking"};case"question":{const O=et(b.toolUseId),F=hr(b.questions,eA);return O===null||F===null||F.length===0?null:{kind:"question",toolUseId:O,questions:F}}case"image":{const O=bt(b.index),F=vt(b.mediaType);if(O===null||F===null)return null;const U=b.source==="attachment"?"attachment":"content";return{kind:"image",index:O,mediaType:F,source:U}}default:return null}}function Av(w){const b=Qt(w);if(b===null)return null;const O=et(b.eventId),F=_i(b.role,XR),U=bt(b.at),J=hr(b.parts,nS);return O===null||F===null||U===null||J===null?null:{eventId:O,role:F,at:U,parts:J,model:vt(b.model),usage:QR(b.usage),effort:vt(b.effort),durationMs:bt(b.durationMs),queued:b.queued===!0}}function g0(w){const b=Qt(w);if(b===null)return null;const O=bt(b.lastRequestTokens),F=bt(b.lastOutputTokens),U=bt(b.totalInputTokens),J=bt(b.totalOutputTokens),R=bt(b.totalCacheReadTokens),a=bt(b.assistantMessages);return O===null||F===null||U===null||J===null||R===null||a===null?null:{lastRequestTokens:O,lastOutputTokens:F,lastModel:vt(b.lastModel),contextWindow:bt(b.contextWindow),contextWindowEstimated:b.contextWindowEstimated===!0,totalInputTokens:U,totalOutputTokens:J,totalCacheReadTokens:R,assistantMessages:a}}const Jv=[{value:"default",label:"Por defecto",family:"",long:!1,window:null},{value:"opus",label:"Opus",family:"opus",long:!1,window:2e5},{value:"opus[1m]",label:"Opus",family:"opus",long:!0,window:1e6},{value:"sonnet",label:"Sonnet",family:"sonnet",long:!1,window:2e5},{value:"sonnet[1m]",label:"Sonnet",family:"sonnet",long:!0,window:1e6},{value:"haiku",label:"Haiku",family:"haiku",long:!1,window:2e5},{value:"fable",label:"Fable",family:"fable",long:!1,window:2e5},{value:"fable[1m]",label:"Fable",family:"fable",long:!0,window:1e6}];function tA(w){if(w.window===null)return w.label;const b=w.window>=1e6?`${Math.round(w.window/1e6)}M`:`${Math.round(w.window/1e3)}k`;return`${w.label} · ${b}`}const rA=[{value:"low",label:"Bajo"},{value:"medium",label:"Medio"},{value:"high",label:"Alto"},{value:"xhigh",label:"Muy alto"},{value:"max",label:"Maximo"}];function iA(w){const b=nA(w);if(b===null||w===null)return null;const O=w.includes("[1m]");return Jv.find(F=>F.family===b&&F.long===O)??null}function nA(w){var b;return w===null||w.length===0?null:((b=Jv.find(O=>O.family.length>0&&w.includes(O.family)))==null?void 0:b.family)??null}function sA(w){return`/model ${w}`}function aA(w){return`/effort ${w}`}const sS=["auto","default","acceptEdits","plan"],_0={auto:"Automatico",default:"Manual",acceptEdits:"Aceptar ediciones",plan:"Plan"},oA={auto:"La CLI decide sola que herramientas usar sin preguntar",default:"Pregunta antes de cada herramienta que no este permitida",acceptEdits:"Acepta las ediciones de archivos sin preguntar",plan:"Investiga y propone un plan, sin tocar nada hasta que lo apruebes"};function dh(w){return typeof w=="string"&&sS.includes(w)}const lA="auto",cA=["staged","unstaged","untracked","conflict"],uA=["added","modified","deleted","renamed","copied","type-changed","untracked","conflict"],hA=["ready","not-a-repo","git-missing","error"],Tv={state:"not-a-repo",message:null,repoRoot:"",branch:null,head:null,upstream:null,ahead:0,behind:0,changes:[],worktrees:[],truncated:!1,updatedAt:0},dA=["meta","hunk","context","added","removed"];function fA(w){const b=Qt(w);if(b===null)return null;const O=et(b.path),F=_i(b.kind,uA),U=_i(b.stage,cA);return O===null||F===null||U===null?null:{path:O,kind:F,stage:U,oldPath:vt(b.oldPath)}}function pA(w){const b=Qt(w);if(b===null)return null;const O=et(b.path);return O===null?null:{path:O,branch:vt(b.branch),isCurrent:b.isCurrent===!0}}function vA(w){const b=Qt(w);if(b===null)return null;const O=_i(b.state,hA),F=vt(b.repoRoot),U=bt(b.ahead),J=bt(b.behind),R=hr(b.changes,fA),a=hr(b.worktrees,pA),h=bt(b.updatedAt);return O===null||F===null||U===null||J===null||R===null||a===null||h===null?null:{state:O,message:vt(b.message),repoRoot:F,branch:vt(b.branch),head:vt(b.head),upstream:vt(b.upstream),ahead:U,behind:J,changes:R,worktrees:a,truncated:b.truncated===!0,updatedAt:h}}function mA(w){const b=Qt(w);if(b===null)return null;const O=_i(b.kind,dA),F=vt(b.text);return O===null||F===null?null:{kind:O,text:F,oldLine:bt(b.oldLine),newLine:bt(b.newLine)}}function gA(w){const b=Qt(w);if(b===null)return null;const O=et(b.path),F=Fn(b.staged),U=hr(b.lines,mA);return O===null||F===null||U===null?null:{path:O,staged:F,lines:U,truncated:b.truncated===!0,binary:b.binary===!0,message:vt(b.message)}}const _A=["dir","file"];function bA(w){const b=Qt(w);if(b===null)return null;const O=et(b.name),F=et(b.path),U=_i(b.kind,_A),J=bt(b.sizeBytes),R=bt(b.modifiedAt);return O===null||F===null||U===null||J===null||R===null?null:{name:O,path:F,kind:U,sizeBytes:J,modifiedAt:R}}function yA(w){const b=Qt(w);if(b===null)return null;const O=vt(b.path),F=hr(b.entries,bA),U=bt(b.hiddenCount);return O===null||F===null||U===null?null:{path:O,entries:F,truncated:b.truncated===!0,hiddenCount:U}}function SA(w){const b=Qt(w);if(b===null)return null;const O=et(b.path),F=vt(b.text),U=bt(b.sizeBytes),J=Fn(b.binary);return O===null||F===null||U===null||J===null?null:{path:O,language:vt(b.language),text:F,sizeBytes:U,truncated:b.truncated===!0,binary:J}}function CA(w){const b=Qt(w);if(b===null)return null;const O=et(b.pickerId),F=et(b.path),U=hr(b.entries,R=>et(R)),J=hr(b.roots,R=>et(R));return O===null||F===null||U===null||J===null?null:{pickerId:O,path:F,entries:U,roots:J,canGoUp:b.canGoUp===!0,truncated:b.truncated===!0}}const b0=20;function EA(w,b="Nota"){const O=w.text.split(`
205
+ `).map(F=>F.trim()).find(F=>F.length>0);return O===void 0?w.images.length>0?"Imagen":b:O.length>40?`${O.slice(0,40)}…`:O}function xA(w){const b=Qt(w);if(b===null)return null;const O=et(b.imageId),F=et(b.mediaType),U=bt(b.bytes);return O===null||F===null||U===null?null:{imageId:O,mediaType:F,bytes:U}}function wA(w){const b=Qt(w);if(b===null)return null;const O=et(b.noteId),F=vt(b.text),U=hr(b.images,xA),J=bt(b.createdAt),R=bt(b.updatedAt);return O===null||F===null||U===null?null:{noteId:O,text:F,images:U,createdAt:J??0,updatedAt:R??0}}const DA="/ws",Yv="token",ph=12*1024*1024,Lv=8,NA=["cli-not-found","shell-not-found","spawn-failed","bad-message","unknown-terminal","invalid-cwd","too-many-terminals","invalid-path","read-failed","submit-failed","answer-failed","mode-failed","archive-failed","notes-failed","picker-failed","internal"];function kA(w){const b={model:null,effort:null,contextWindow:null};if(typeof w!="object"||w===null)return b;const O=w;return{model:et(O.model),effort:et(O.effort),contextWindow:bt(O.contextWindow)}}function RA(w){const b=Qt($R(w));if(b===null)return null;switch(b.type){case"hello":{const O=bt(b.protocolVersion),F=vt(b.platform),U=vt(b.defaultCwd);return O===null||F===null||U===null?null:{type:"hello",protocolVersion:O,cliAvailable:b.cliAvailable===!0,cliVersion:vt(b.cliVersion),cliMissingMessage:vt(b.cliMissingMessage),platform:F,defaultCwd:U,transcriptMarkerStripped:b.transcriptMarkerStripped===!0,shellName:et(b.shellName)}}case"terminal.list":{const O=hr(b.terminals,v0),F=UR(b.order);return O===null||F===null?null:{type:"terminal.list",terminals:O,order:F}}case"terminal.opened":{const O=et(b.requestId),F=v0(b.terminal);return O===null||F===null?null:{type:"terminal.opened",requestId:O,terminal:F}}case"terminal.output":{const O=et(b.terminalId),F=vt(b.data);return O===null||F===null?null:{type:"terminal.output",terminalId:O,data:F}}case"terminal.replay":{const O=et(b.terminalId),F=vt(b.data);return O===null||F===null?null:{type:"terminal.replay",terminalId:O,data:F,truncated:b.truncated===!0}}case"terminal.exit":{const O=et(b.terminalId),F=bt(b.exitCode);if(O===null||F===null)return null;const U=b.signal;return{type:"terminal.exit",terminalId:O,exitCode:F,signal:typeof U=="number"?U:null}}case"terminal.closed":{const O=et(b.terminalId);return O===null?null:{type:"terminal.closed",terminalId:O}}case"index.status":{const O=KR(b.status);return O===null?null:{type:"index.status",status:O}}case"index.projects":{const O=hr(b.projects,YR);return O===null?null:{type:"index.projects",projects:O,replace:b.replace===!0}}case"conversation.reset":{const O=et(b.terminalId),F=et(b.sessionId),U=_i(b.state,m0),J=hr(b.events,Av),R=g0(b.usage);return O===null||F===null||U===null||J===null||R===null?null:{type:"conversation.reset",terminalId:O,sessionId:F,state:U,events:J,hasMore:b.hasMore===!0,usage:R,permissionMode:dh(b.permissionMode)?b.permissionMode:null,defaults:kA(b.defaults),waitingFor:et(b.waitingFor)}}case"conversation.append":{const O=et(b.terminalId),F=hr(b.events,Av),U=g0(b.usage);return O===null||F===null||U===null?null:{type:"conversation.append",terminalId:O,events:F,usage:U,permissionMode:dh(b.permissionMode)?b.permissionMode:null}}case"conversation.mode":{const O=et(b.terminalId),F=b.mode;return O===null||!dh(F)?null:{type:"conversation.mode",terminalId:O,mode:F}}case"conversation.waiting":{const O=et(b.terminalId);return O===null?null:{type:"conversation.waiting",terminalId:O,waitingFor:et(b.waitingFor)}}case"conversation.page":{const O=et(b.terminalId),F=hr(b.events,Av);return O===null||F===null?null:{type:"conversation.page",terminalId:O,events:F,hasMore:b.hasMore===!0}}case"conversation.turns":{const O=et(b.terminalId),F=hr(b.turns,U=>{const J=Qt(U);if(J===null)return null;const R=et(J.eventId),a=bt(J.durationMs);return R===null||a===null?null:{eventId:R,durationMs:a}});return O===null||F===null?null:{type:"conversation.turns",terminalId:O,turns:F}}case"conversation.parts":{const O=et(b.terminalId),F=hr(b.updates,U=>{const J=Qt(U);if(J===null)return null;const R=et(J.eventId),a=hr(J.parts,nS);return R===null||a===null?null:{eventId:R,parts:a}});return O===null||F===null?null:{type:"conversation.parts",terminalId:O,updates:F}}case"conversation.imageData":{const O=et(b.terminalId),F=et(b.eventId),U=bt(b.index),J=vt(b.mediaType);if(O===null||F===null||U===null||J===null)return null;const R=b.data;return{type:"conversation.imageData",terminalId:O,eventId:F,index:U,source:_i(b.source,JR)??"content",mediaType:J,data:typeof R=="string"?R:null}}case"conversation.state":{const O=et(b.terminalId),F=_i(b.state,m0);return O===null||F===null?null:{type:"conversation.state",terminalId:O,state:F}}case"git.status":{const O=et(b.terminalId),F=vA(b.status);return O===null||F===null?null:{type:"git.status",terminalId:O,status:F}}case"git.diff":{const O=et(b.terminalId),F=gA(b.diff);return O===null||F===null?null:{type:"git.diff",terminalId:O,diff:F}}case"files.listing":{const O=et(b.terminalId),F=yA(b.listing);return O===null||F===null?null:{type:"files.listing",terminalId:O,listing:F}}case"picker.listing":{const O=CA(b.listing);return O===null?null:{type:"picker.listing",listing:O}}case"files.preview":{const O=et(b.terminalId),F=SA(b.preview);return O===null||F===null?null:{type:"files.preview",terminalId:O,preview:F}}case"notes.list":{const O=hr(b.notes,wA);return O===null?null:{type:"notes.list",notes:O}}case"notes.imageData":{const O=et(b.imageId),F=vt(b.mediaType);if(O===null||F===null)return null;const U=b.data;return{type:"notes.imageData",imageId:O,mediaType:F,data:typeof U=="string"?U:null}}case"error":{const O=vt(b.message);if(O===null)return null;const U={type:"error",code:_i(b.code,NA)??"internal",message:O},J=vt(b.detail);J!==null&&(U.detail=J);const R=et(b.requestId);return R!==null&&(U.requestId=R),U}default:return null}}function y0(w){return JSON.stringify(w)}function AA({model:w,effort:b,modelProvisional:O=!1,effortProvisional:F=!1,disabled:U,onCommand:J}){const R=iA(w),a=R===null&&w!==null;return T.jsxDEV(T.Fragment,{children:[T.jsxDEV("select",{className:"agent-select",value:(R==null?void 0:R.value)??"",disabled:U,onChange:h=>{h.target.value.length>0&&J(sA(h.target.value))},title:w===null?"Modelo: todavia no hubo ninguna respuesta en esta sesion":O?`Modelo segun tu configuracion: ${w}. Todavia no hubo ninguna respuesta que lo confirme`:`Modelo en uso: ${w}. Cambiarlo manda /model a la pestaña CLI`,children:[R===null&&T.jsxDEV("option",{value:"",children:a?w??"":"modelo — sin datos"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/AgentControls.tsx",lineNumber:86,columnNumber:11},this),Jv.map(h=>T.jsxDEV("option",{value:h.value,children:tA(h)},h.value,!1,{fileName:"D:/Agent Explorer/packages/web/src/AgentControls.tsx",lineNumber:89,columnNumber:11},this))]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/AgentControls.tsx",lineNumber:65,columnNumber:7},this),T.jsxDEV("select",{className:"agent-select",value:b??"",disabled:U,onChange:h=>{h.target.value.length>0&&J(aA(h.target.value))},title:b===null?"Esfuerzo: sin datos. No todos los modelos tienen niveles — con haiku, /effort no deja rastro":F?`Esfuerzo segun tu configuracion: ${b}. Todavia no hubo ninguna respuesta que lo confirme`:`Esfuerzo en uso: ${b}. Cambiarlo manda /effort a la pestaña CLI`,children:[b===null&&T.jsxDEV("option",{value:"",children:"esfuerzo — sin datos"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/AgentControls.tsx",lineNumber:110,columnNumber:29},this),rA.map(h=>T.jsxDEV("option",{value:h.value,children:h.label},h.value,!1,{fileName:"D:/Agent Explorer/packages/web/src/AgentControls.tsx",lineNumber:112,columnNumber:11},this))]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/AgentControls.tsx",lineNumber:95,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/AgentControls.tsx",lineNumber:64,columnNumber:5},this)}function TA({mode:w,disabled:b,onChange:O}){const F=w??lA;return T.jsxDEV("select",{className:"agent-select agent-select-mode",value:F,disabled:b,onChange:U=>{dh(U.target.value)&&O(U.target.value)},title:`Modo ${_0[F]}: ${oA[F]}. Cambiarlo manda shift+tab a la pestaña CLI`,children:sS.map(U=>T.jsxDEV("option",{value:U,children:_0[U]},U,!1,{fileName:"D:/Agent Explorer/packages/web/src/ModeControl.tsx",lineNumber:61,columnNumber:9},this))},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ModeControl.tsx",lineNumber:51,columnNumber:5},this)}var LA=iS();function aS({src:w,caption:b,onClose:O}){return K.useEffect(()=>{const F=U=>{U.key==="Escape"&&(U.preventDefault(),U.stopPropagation(),O())};return window.addEventListener("keydown",F,!0),()=>window.removeEventListener("keydown",F,!0)},[O]),LA.createPortal(T.jsxDEV("div",{className:"viewer",onClick:O,role:"presentation",children:[T.jsxDEV("div",{className:"viewer-frame",onClick:F=>F.stopPropagation(),children:T.jsxDEV("img",{className:"viewer-image",src:w,alt:b},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ImageViewer.tsx",lineNumber:61,columnNumber:9},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ImageViewer.tsx",lineNumber:60,columnNumber:7},this),T.jsxDEV("div",{className:"viewer-bar",children:[T.jsxDEV("span",{className:"viewer-caption",children:b},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ImageViewer.tsx",lineNumber:64,columnNumber:9},this),T.jsxDEV("button",{className:"viewer-close",onClick:O,title:"Cerrar (Esc)",children:"×"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ImageViewer.tsx",lineNumber:65,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ImageViewer.tsx",lineNumber:63,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ImageViewer.tsx",lineNumber:59,columnNumber:5},this),document.body)}const MA=5,OA=1200;function S0(){return crypto.randomUUID()}function BA(){const[w,b]=K.useState([]),[O,F]=K.useState(null),U=K.useCallback(o=>{if(w.filter(_=>_.kind==="image").length>=Lv){F(`Hasta ${Lv} imagenes por mensaje.`);return}if(o.size>ph){F(`"${o.name||"la imagen"}" pesa ${Math.round(o.size/1024/1024)} MB; el maximo son ${ph/1024/1024} MB.`);return}const v=new FileReader;v.onload=()=>{const _=v.result;if(typeof _!="string")return;const E=_.indexOf(",");E!==-1&&b(d=>d.filter(s=>s.kind==="image").length>=Lv?d:[...d,{id:S0(),kind:"image",mediaType:o.type,base64:_.slice(E+1),dataUrl:_,bytes:o.size,name:o.name.length>0?o.name:"imagen pegada"}])},v.onerror=()=>F("No se pudo leer la imagen del portapapeles."),v.readAsDataURL(o)},[w]),J=K.useCallback(o=>{for(const v of Array.from(o))v.type.startsWith("image/")&&U(v)},[U]),R=K.useCallback(o=>{const v=Array.from(o.files).filter(d=>d.type.startsWith("image/"));if(v.length>0){for(const d of v)U(d);return!0}const _=o.getData("text/plain");if(_.length===0)return!1;const E=_.split(`
206
+ `).length;return E<MA&&_.length<OA?!1:(b(d=>[...d,{id:S0(),kind:"text",text:_,lines:E}]),!0)},[U]),a=K.useCallback(o=>{b(v=>v.filter(_=>_.id!==o))},[]),h=K.useCallback(o=>{b(o),F(null)},[]),p=K.useCallback(()=>h([]),[h]),m=K.useCallback(()=>F(null),[]);return{items:w,problem:O,acceptPaste:R,acceptFiles:J,remove:a,replace:h,clear:p,dismissProblem:m}}function fh({min:w,max:b,value:O,measure:F,onChange:U,onCommit:J,onStart:R}){const a=K.useRef(!1),h=K.useRef(O),p=K.useCallback(v=>{a.current=!0,h.current=O,R==null||R(v),v.currentTarget.setPointerCapture(v.pointerId),v.preventDefault()},[R,O]),m=K.useCallback(v=>{if(!a.current)return;const _=Math.min(b,Math.max(w,F(v)));h.current=_,U(_)},[b,w,F,U]),o=K.useCallback(v=>{a.current&&(a.current=!1,v.currentTarget.releasePointerCapture(v.pointerId),J(h.current))},[J]);return{onPointerDown:p,onPointerMove:m,onPointerUp:o,onPointerCancel:o}}function dn(w,b,O){try{const F=window.localStorage.getItem(w);return F===null?b:O(F)??b}catch{return b}}function Yi(w,b){try{window.localStorage.setItem(w,b)}catch{}}function PA(w,b,O){const F=Number.parseInt(w,10);return Number.isFinite(F)&&F>=b&&F<=O?F:null}const C0=90,IA=260,E0=720,x0="agent-workbench.composer-height",FA=4e3;function jA({connection:w,terminalId:b,alive:O,controls:F,leading:U}){const[J,R]=K.useState(""),[a,h]=K.useState(!1),p=BA(),m=K.useRef(null),[o,v]=K.useState(()=>dn(x0,IA,V=>PA(V,C0,E0))),[_,E]=K.useState(!1),d=K.useCallback(()=>{const V=m.current;if(V===null)return;V.style.height="auto";const X=_?o:Math.min(V.scrollHeight,o);V.style.height=`${X}px`},[o,_]);K.useEffect(d,[J,d]);const s=K.useRef(0),u=K.useRef(0),l=fh({min:C0,max:E0,value:o,measure:K.useCallback(V=>s.current-V.clientY-u.current,[]),onChange:v,onCommit:K.useCallback(V=>{E(!1),Yi(x0,String(V))},[]),onStart:K.useCallback(V=>{const X=m.current,ee=X==null?void 0:X.getBoundingClientRect();s.current=(ee==null?void 0:ee.bottom)??V.clientY,u.current=((ee==null?void 0:ee.bottom)??V.clientY)-V.clientY-((ee==null?void 0:ee.height)??0),E(!0)},[])}),c=K.useRef(new Map),g=K.useRef(null),x=K.useRef(J);x.current=J;const S=K.useRef(p.items);S.current=p.items;const{replace:N}=p;K.useEffect(()=>{var ee;const V=g.current;if(V===b)return;g.current=b,V!==null&&c.current.set(V,{text:x.current,items:S.current});const X=b===null?void 0:c.current.get(b);R((X==null?void 0:X.text)??""),N((X==null?void 0:X.items)??[]),b!==null&&((ee=m.current)==null||ee.focus())},[b,N]);const y=K.useCallback(()=>{if(b===null)return;const V=p.items.filter(Z=>Z.kind==="text").map(Z=>Z.text),X=p.items.filter(Z=>Z.kind==="image").map(Z=>({mediaType:Z.mediaType,data:Z.base64})),ee=[...V,J].filter(Z=>Z.trim().length>0).join(`
207
+
208
+ `);ee.length===0&&X.length===0||(w.send({type:"agent.submit",terminalId:b,text:ee,images:X}),R(""),p.clear())},[w,b,J,p]),D=K.useCallback(()=>{b!==null&&w.send({type:"agent.interrupt",terminalId:b})},[w,b]),k=K.useCallback(V=>{if(V.key==="Enter"&&!V.shiftKey&&!V.altKey){V.preventDefault(),y();return}V.key==="Escape"&&(V.preventDefault(),D())},[y,D]),I=K.useCallback(V=>{V.clipboardData!==null&&p.acceptPaste(V.clipboardData)&&V.preventDefault()},[p]),L=b===null||!O,B=J.trim().length>0||p.items.length>0;return T.jsxDEV("div",{className:`composer${a?" composer-dragging":""}`,onDragOver:V=>{Array.from(V.dataTransfer.types).includes("Files")&&(V.preventDefault(),h(!0))},onDragLeave:()=>h(!1),onDrop:V=>{V.preventDefault(),h(!1),p.acceptFiles(V.dataTransfer.files)},children:[T.jsxDEV("div",{className:"hdivider composer-divider",...l,title:"Arrastrar para cambiar el alto del cuadro"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:264,columnNumber:7},this),p.problem!==null&&T.jsxDEV("div",{className:"composer-problem",children:[T.jsxDEV("span",{children:p.problem},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:272,columnNumber:11},this),T.jsxDEV("button",{className:"icon-button",onClick:p.dismissProblem,title:"Cerrar",children:"×"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:273,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:271,columnNumber:9},this),p.items.length>0&&T.jsxDEV("div",{className:"composer-chips",children:p.items.map(V=>T.jsxDEV(VA,{item:V,onRemove:()=>p.remove(V.id)},V.id,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:282,columnNumber:13},this))},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:280,columnNumber:9},this),T.jsxDEV("textarea",{ref:m,className:"composer-input",value:J,rows:1,placeholder:L?"La sesion de esta pestana termino.":"Escribi tu mensaje.",disabled:L,onChange:V=>R(V.target.value),onKeyDown:k,onPaste:I,spellCheck:!1},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:287,columnNumber:7},this),T.jsxDEV("div",{className:"composer-bar",children:[U,T.jsxDEV("span",{className:"composer-spacer"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:319,columnNumber:9},this),F,T.jsxDEV("button",{className:"composer-stop",onClick:D,disabled:L,title:"Interrumpir lo que la CLI este haciendo (Esc)",children:"Detener"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:321,columnNumber:9},this),T.jsxDEV("button",{className:"composer-send",onClick:y,disabled:L||!B,title:"Enviar (Enter)",children:"Enviar"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:329,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:317,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:243,columnNumber:5},this)}function VA({item:w,onRemove:b}){const[O,F]=K.useState(!1);if(w.kind==="image"){const U=`${w.name} · ${HA(w.bytes)}`;return T.jsxDEV("figure",{className:"chip chip-image",title:U,children:[T.jsxDEV("img",{src:w.dataUrl,alt:w.name,onClick:()=>F(!0)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:360,columnNumber:9},this),T.jsxDEV("button",{className:"chip-remove",onClick:b,title:"Quitar",children:"×"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:361,columnNumber:9},this),O&&T.jsxDEV(aS,{src:w.dataUrl,caption:U,onClose:()=>F(!1)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:365,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:359,columnNumber:7},this)}return T.jsxDEV("div",{className:`chip chip-text${O?" chip-open":""}`,children:[T.jsxDEV("button",{className:"chip-toggle",onClick:()=>F(U=>!U),children:[T.jsxDEV("span",{className:"chip-icon",children:"¶"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:374,columnNumber:9},this),"Texto pegado · ",w.lines," lineas",T.jsxDEV("span",{className:"chip-chevron",children:O?"▾":"▸"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:376,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:373,columnNumber:7},this),T.jsxDEV("button",{className:"chip-remove",onClick:b,title:"Quitar",children:"×"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:378,columnNumber:7},this),O&&T.jsxDEV("pre",{className:"chip-preview",children:w.text.slice(0,FA)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:381,columnNumber:16},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Composer.tsx",lineNumber:372,columnNumber:5},this)}function HA(w){return w<1024?`${w} B`:w<1024*1024?`${Math.round(w/1024)} KB`:`${(w/1024/1024).toFixed(1)} MB`}var Mv={exports:{}},w0;function UA(){return w0||(w0=1,(function(w,b){(function(O,F){w.exports=F()})(self,(()=>(()=>{var O={};return(()=>{var F=O;Object.defineProperty(F,"__esModule",{value:!0}),F.FitAddon=void 0,F.FitAddon=class{activate(U){this._terminal=U}dispose(){}fit(){const U=this.proposeDimensions();if(!U||!this._terminal||isNaN(U.cols)||isNaN(U.rows))return;const J=this._terminal._core;this._terminal.rows===U.rows&&this._terminal.cols===U.cols||(J._renderService.clear(),this._terminal.resize(U.cols,U.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const U=this._terminal._core,J=U._renderService.dimensions;if(J.css.cell.width===0||J.css.cell.height===0)return;const R=this._terminal.options.scrollback===0?0:U.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),h=parseInt(a.getPropertyValue("height")),p=Math.max(0,parseInt(a.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),o=h-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),v=p-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-R;return{cols:Math.max(2,Math.floor(v/J.css.cell.width)),rows:Math.max(1,Math.floor(o/J.css.cell.height))}}}})(),O})()))})(Mv)),Mv.exports}var $A=UA(),Ov={exports:{}},D0;function zA(){return D0||(D0=1,(function(w,b){(function(O,F){w.exports=F()})(self,(()=>(()=>{var O={6:(R,a)=>{function h(m){try{const o=new URL(m),v=o.password&&o.username?`${o.protocol}//${o.username}:${o.password}@${o.host}`:o.username?`${o.protocol}//${o.username}@${o.host}`:`${o.protocol}//${o.host}`;return m.toLocaleLowerCase().startsWith(v.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(m,o,v,_={}){this._terminal=m,this._regex=o,this._handler=v,this._options=_}provideLinks(m,o){const v=p.computeLink(m,this._regex,this._terminal,this._handler);o(this._addCallbacks(v))}_addCallbacks(m){return m.map((o=>(o.leave=this._options.leave,o.hover=(v,_)=>{if(this._options.hover){const{range:E}=o;this._options.hover(v,_,E)}},o)))}};class p{static computeLink(o,v,_,E){const d=new RegExp(v.source,(v.flags||"")+"g"),[s,u]=p._getWindowedLineStrings(o-1,_),l=s.join("");let c;const g=[];for(;c=d.exec(l);){const x=c[0];if(!h(x))continue;const[S,N]=p._mapStrIdx(_,u,0,c.index),[y,D]=p._mapStrIdx(_,S,N,x.length);if(S===-1||N===-1||y===-1||D===-1)continue;const k={start:{x:N+1,y:S+1},end:{x:D,y:y+1}};g.push({range:k,text:x,activate:E})}return g}static _getWindowedLineStrings(o,v){let _,E=o,d=o,s=0,u="";const l=[];if(_=v.buffer.active.getLine(o)){const c=_.translateToString(!0);if(_.isWrapped&&c[0]!==" "){for(s=0;(_=v.buffer.active.getLine(--E))&&s<2048&&(u=_.translateToString(!0),s+=u.length,l.push(u),_.isWrapped&&u.indexOf(" ")===-1););l.reverse()}for(l.push(c),s=0;(_=v.buffer.active.getLine(++d))&&_.isWrapped&&s<2048&&(u=_.translateToString(!0),s+=u.length,l.push(u),u.indexOf(" ")===-1););}return[l,E]}static _mapStrIdx(o,v,_,E){const d=o.buffer.active,s=d.getNullCell();let u=_;for(;E;){const l=d.getLine(v);if(!l)return[-1,-1];for(let c=u;c<l.length;++c){l.getCell(c,s);const g=s.getChars();if(s.getWidth()&&(E-=g.length||1,c===l.length-1&&g==="")){const x=d.getLine(v+1);x&&x.isWrapped&&(x.getCell(0,s),s.getWidth()===2&&(E+=1))}if(E<0)return[v,c]}v++,u=0}return[v,u]}}a.LinkComputer=p}},F={};function U(R){var a=F[R];if(a!==void 0)return a.exports;var h=F[R]={exports:{}};return O[R](h,h.exports,U),h.exports}var J={};return(()=>{var R=J;Object.defineProperty(R,"__esModule",{value:!0}),R.WebLinksAddon=void 0;const a=U(6),h=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function p(m,o){const v=window.open();if(v){try{v.opener=null}catch{}v.location.href=o}else console.warn("Opening link blocked as opener could not be cleared")}R.WebLinksAddon=class{constructor(m=p,o={}){this._handler=m,this._options=o}activate(m){this._terminal=m;const o=this._options,v=o.urlRegex||h;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,v,this._handler,o))}dispose(){var m;(m=this._linkProvider)==null||m.dispose()}}})(),J})()))})(Ov)),Ov.exports}var WA=zA(),Bv={exports:{}},N0;function qA(){return N0||(N0=1,(function(w,b){(function(O,F){w.exports=F()})(self,(()=>(()=>{var O={965:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GlyphRenderer=void 0;const p=h(374),m=h(509),o=h(855),v=h(859),_=h(381),E=11,d=E*Float32Array.BYTES_PER_ELEMENT;let s,u=0,l=0,c=0;class g extends v.Disposable{constructor(S,N,y,D){super(),this._terminal=S,this._gl=N,this._dimensions=y,this._optionsService=D,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const k=this._gl;m.TextureAtlas.maxAtlasPages===void 0&&(m.TextureAtlas.maxAtlasPages=Math.min(32,(0,p.throwIfFalsy)(k.getParameter(k.MAX_TEXTURE_IMAGE_UNITS))),m.TextureAtlas.maxTextureSize=(0,p.throwIfFalsy)(k.getParameter(k.MAX_TEXTURE_SIZE))),this._program=(0,p.throwIfFalsy)((0,_.createProgram)(k,`#version 300 es
209
+ layout (location = 0) in vec2 a_unitquad;
210
+ layout (location = 1) in vec2 a_cellpos;
211
+ layout (location = 2) in vec2 a_offset;
212
+ layout (location = 3) in vec2 a_size;
213
+ layout (location = 4) in float a_texpage;
214
+ layout (location = 5) in vec2 a_texcoord;
215
+ layout (location = 6) in vec2 a_texsize;
216
+
217
+ uniform mat4 u_projection;
218
+ uniform vec2 u_resolution;
219
+
220
+ out vec2 v_texcoord;
221
+ flat out int v_texpage;
222
+
223
+ void main() {
224
+ vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
225
+ gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
226
+ v_texpage = int(a_texpage);
227
+ v_texcoord = a_texcoord + a_unitquad * a_texsize;
228
+ }`,(function(ee){let Z="";for(let ie=1;ie<ee;ie++)Z+=` else if (v_texpage == ${ie}) { outColor = texture(u_texture[${ie}], v_texcoord); }`;return`#version 300 es
229
+ precision lowp float;
230
+
231
+ in vec2 v_texcoord;
232
+ flat in int v_texpage;
233
+
234
+ uniform sampler2D u_texture[${ee}];
235
+
236
+ out vec4 outColor;
237
+
238
+ void main() {
239
+ if (v_texpage == 0) {
240
+ outColor = texture(u_texture[0], v_texcoord);
241
+ } ${Z}
242
+ }`})(m.TextureAtlas.maxAtlasPages))),this.register((0,v.toDisposable)((()=>k.deleteProgram(this._program)))),this._projectionLocation=(0,p.throwIfFalsy)(k.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,p.throwIfFalsy)(k.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,p.throwIfFalsy)(k.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=k.createVertexArray(),k.bindVertexArray(this._vertexArrayObject);const I=new Float32Array([0,0,1,0,0,1,1,1]),L=k.createBuffer();this.register((0,v.toDisposable)((()=>k.deleteBuffer(L)))),k.bindBuffer(k.ARRAY_BUFFER,L),k.bufferData(k.ARRAY_BUFFER,I,k.STATIC_DRAW),k.enableVertexAttribArray(0),k.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const B=new Uint8Array([0,1,2,3]),V=k.createBuffer();this.register((0,v.toDisposable)((()=>k.deleteBuffer(V)))),k.bindBuffer(k.ELEMENT_ARRAY_BUFFER,V),k.bufferData(k.ELEMENT_ARRAY_BUFFER,B,k.STATIC_DRAW),this._attributesBuffer=(0,p.throwIfFalsy)(k.createBuffer()),this.register((0,v.toDisposable)((()=>k.deleteBuffer(this._attributesBuffer)))),k.bindBuffer(k.ARRAY_BUFFER,this._attributesBuffer),k.enableVertexAttribArray(2),k.vertexAttribPointer(2,2,k.FLOAT,!1,d,0),k.vertexAttribDivisor(2,1),k.enableVertexAttribArray(3),k.vertexAttribPointer(3,2,k.FLOAT,!1,d,2*Float32Array.BYTES_PER_ELEMENT),k.vertexAttribDivisor(3,1),k.enableVertexAttribArray(4),k.vertexAttribPointer(4,1,k.FLOAT,!1,d,4*Float32Array.BYTES_PER_ELEMENT),k.vertexAttribDivisor(4,1),k.enableVertexAttribArray(5),k.vertexAttribPointer(5,2,k.FLOAT,!1,d,5*Float32Array.BYTES_PER_ELEMENT),k.vertexAttribDivisor(5,1),k.enableVertexAttribArray(6),k.vertexAttribPointer(6,2,k.FLOAT,!1,d,7*Float32Array.BYTES_PER_ELEMENT),k.vertexAttribDivisor(6,1),k.enableVertexAttribArray(1),k.vertexAttribPointer(1,2,k.FLOAT,!1,d,9*Float32Array.BYTES_PER_ELEMENT),k.vertexAttribDivisor(1,1),k.useProgram(this._program);const X=new Int32Array(m.TextureAtlas.maxAtlasPages);for(let ee=0;ee<m.TextureAtlas.maxAtlasPages;ee++)X[ee]=ee;k.uniform1iv(this._textureLocation,X),k.uniformMatrix4fv(this._projectionLocation,!1,_.PROJECTION_MATRIX),this._atlasTextures=[];for(let ee=0;ee<m.TextureAtlas.maxAtlasPages;ee++){const Z=new _.GLTexture((0,p.throwIfFalsy)(k.createTexture()));this.register((0,v.toDisposable)((()=>k.deleteTexture(Z.texture)))),k.activeTexture(k.TEXTURE0+ee),k.bindTexture(k.TEXTURE_2D,Z.texture),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE),k.texImage2D(k.TEXTURE_2D,0,k.RGBA,1,1,0,k.RGBA,k.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[ee]=Z}k.enable(k.BLEND),k.blendFunc(k.SRC_ALPHA,k.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(S,N,y,D,k,I,L,B,V){this._updateCell(this._vertices.attributes,S,N,y,D,k,I,L,B,V)}_updateCell(S,N,y,D,k,I,L,B,V,X){u=(y*this._terminal.cols+N)*E,D!==o.NULL_CELL_CODE&&D!==void 0?this._atlas&&(s=B&&B.length>1?this._atlas.getRasterizedGlyphCombinedChar(B,k,I,L,!1):this._atlas.getRasterizedGlyph(D,k,I,L,!1),l=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),k!==X&&s.offset.x>l?(c=s.offset.x-l,S[u]=-(s.offset.x-c)+this._dimensions.device.char.left,S[u+1]=-s.offset.y+this._dimensions.device.char.top,S[u+2]=(s.size.x-c)/this._dimensions.device.canvas.width,S[u+3]=s.size.y/this._dimensions.device.canvas.height,S[u+4]=s.texturePage,S[u+5]=s.texturePositionClipSpace.x+c/this._atlas.pages[s.texturePage].canvas.width,S[u+6]=s.texturePositionClipSpace.y,S[u+7]=s.sizeClipSpace.x-c/this._atlas.pages[s.texturePage].canvas.width,S[u+8]=s.sizeClipSpace.y):(S[u]=-s.offset.x+this._dimensions.device.char.left,S[u+1]=-s.offset.y+this._dimensions.device.char.top,S[u+2]=s.size.x/this._dimensions.device.canvas.width,S[u+3]=s.size.y/this._dimensions.device.canvas.height,S[u+4]=s.texturePage,S[u+5]=s.texturePositionClipSpace.x,S[u+6]=s.texturePositionClipSpace.y,S[u+7]=s.sizeClipSpace.x,S[u+8]=s.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,p.allowRescaling)(D,V,s.size.x,this._dimensions.device.cell.width)&&(S[u+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):S.fill(0,u,u+E-1-2)}clear(){const S=this._terminal,N=S.cols*S.rows*E;this._vertices.count!==N?this._vertices.attributes=new Float32Array(N):this._vertices.attributes.fill(0);let y=0;for(;y<this._vertices.attributesBuffers.length;y++)this._vertices.count!==N?this._vertices.attributesBuffers[y]=new Float32Array(N):this._vertices.attributesBuffers[y].fill(0);this._vertices.count=N,y=0;for(let D=0;D<S.rows;D++)for(let k=0;k<S.cols;k++)this._vertices.attributes[y+9]=k/S.cols,this._vertices.attributes[y+10]=D/S.rows,y+=E}handleResize(){const S=this._gl;S.useProgram(this._program),S.viewport(0,0,S.canvas.width,S.canvas.height),S.uniform2f(this._resolutionLocation,S.canvas.width,S.canvas.height),this.clear()}render(S){if(!this._atlas)return;const N=this._gl;N.useProgram(this._program),N.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const y=this._vertices.attributesBuffers[this._activeBuffer];let D=0;for(let k=0;k<S.lineLengths.length;k++){const I=k*this._terminal.cols*E,L=this._vertices.attributes.subarray(I,I+S.lineLengths[k]*E);y.set(L,D),D+=L.length}N.bindBuffer(N.ARRAY_BUFFER,this._attributesBuffer),N.bufferData(N.ARRAY_BUFFER,y.subarray(0,D),N.STREAM_DRAW);for(let k=0;k<this._atlas.pages.length;k++)this._atlas.pages[k].version!==this._atlasTextures[k].version&&this._bindAtlasPageTexture(N,this._atlas,k);N.drawElementsInstanced(N.TRIANGLE_STRIP,4,N.UNSIGNED_BYTE,0,D/E)}setAtlas(S){this._atlas=S;for(const N of this._atlasTextures)N.version=-1}_bindAtlasPageTexture(S,N,y){S.activeTexture(S.TEXTURE0+y),S.bindTexture(S.TEXTURE_2D,this._atlasTextures[y].texture),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,S.CLAMP_TO_EDGE),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,S.CLAMP_TO_EDGE),S.texImage2D(S.TEXTURE_2D,0,S.RGBA,S.RGBA,S.UNSIGNED_BYTE,N.pages[y].canvas),S.generateMipmap(S.TEXTURE_2D),this._atlasTextures[y].version=N.pages[y].version}setDimensions(S){this._dimensions=S}}a.GlyphRenderer=g},742:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RectangleRenderer=void 0;const p=h(374),m=h(859),o=h(310),v=h(381),_=8*Float32Array.BYTES_PER_ELEMENT;class E{constructor(){this.attributes=new Float32Array(160),this.count=0}}let d=0,s=0,u=0,l=0,c=0,g=0,x=0;class S extends m.Disposable{constructor(y,D,k,I){super(),this._terminal=y,this._gl=D,this._dimensions=k,this._themeService=I,this._vertices=new E,this._verticesCursor=new E;const L=this._gl;this._program=(0,p.throwIfFalsy)((0,v.createProgram)(L,`#version 300 es
243
+ layout (location = 0) in vec2 a_position;
244
+ layout (location = 1) in vec2 a_size;
245
+ layout (location = 2) in vec4 a_color;
246
+ layout (location = 3) in vec2 a_unitquad;
247
+
248
+ uniform mat4 u_projection;
249
+
250
+ out vec4 v_color;
251
+
252
+ void main() {
253
+ vec2 zeroToOne = a_position + (a_unitquad * a_size);
254
+ gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
255
+ v_color = a_color;
256
+ }`,`#version 300 es
257
+ precision lowp float;
258
+
259
+ in vec4 v_color;
260
+
261
+ out vec4 outColor;
262
+
263
+ void main() {
264
+ outColor = v_color;
265
+ }`)),this.register((0,m.toDisposable)((()=>L.deleteProgram(this._program)))),this._projectionLocation=(0,p.throwIfFalsy)(L.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=L.createVertexArray(),L.bindVertexArray(this._vertexArrayObject);const B=new Float32Array([0,0,1,0,0,1,1,1]),V=L.createBuffer();this.register((0,m.toDisposable)((()=>L.deleteBuffer(V)))),L.bindBuffer(L.ARRAY_BUFFER,V),L.bufferData(L.ARRAY_BUFFER,B,L.STATIC_DRAW),L.enableVertexAttribArray(3),L.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const X=new Uint8Array([0,1,2,3]),ee=L.createBuffer();this.register((0,m.toDisposable)((()=>L.deleteBuffer(ee)))),L.bindBuffer(L.ELEMENT_ARRAY_BUFFER,ee),L.bufferData(L.ELEMENT_ARRAY_BUFFER,X,L.STATIC_DRAW),this._attributesBuffer=(0,p.throwIfFalsy)(L.createBuffer()),this.register((0,m.toDisposable)((()=>L.deleteBuffer(this._attributesBuffer)))),L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.enableVertexAttribArray(0),L.vertexAttribPointer(0,2,L.FLOAT,!1,_,0),L.vertexAttribDivisor(0,1),L.enableVertexAttribArray(1),L.vertexAttribPointer(1,2,L.FLOAT,!1,_,2*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(1,1),L.enableVertexAttribArray(2),L.vertexAttribPointer(2,4,L.FLOAT,!1,_,4*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(2,1),this._updateCachedColors(I.colors),this.register(this._themeService.onChangeColors((Z=>{this._updateCachedColors(Z),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(y){const D=this._gl;D.useProgram(this._program),D.bindVertexArray(this._vertexArrayObject),D.uniformMatrix4fv(this._projectionLocation,!1,v.PROJECTION_MATRIX),D.bindBuffer(D.ARRAY_BUFFER,this._attributesBuffer),D.bufferData(D.ARRAY_BUFFER,y.attributes,D.DYNAMIC_DRAW),D.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,D.UNSIGNED_BYTE,0,y.count)}handleResize(){this._updateViewportRectangle()}setDimensions(y){this._dimensions=y}_updateCachedColors(y){this._bgFloat=this._colorToFloat32Array(y.background),this._cursorFloat=this._colorToFloat32Array(y.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(y){const D=this._terminal,k=this._vertices;let I,L,B,V,X,ee,Z,ie,P,H,q,Y=1;for(I=0;I<D.rows;I++){for(B=-1,V=0,X=0,ee=!1,L=0;L<D.cols;L++)Z=(I*D.cols+L)*o.RENDER_MODEL_INDICIES_PER_CELL,ie=y.cells[Z+o.RENDER_MODEL_BG_OFFSET],P=y.cells[Z+o.RENDER_MODEL_FG_OFFSET],H=!!(67108864&P),(ie!==V||P!==X&&(ee||H))&&((V!==0||ee&&X!==0)&&(q=8*Y++,this._updateRectangle(k,q,X,V,B,L,I)),B=L,V=ie,X=P,ee=H);(V!==0||ee&&X!==0)&&(q=8*Y++,this._updateRectangle(k,q,X,V,B,D.cols,I))}k.count=Y}updateCursor(y){const D=this._verticesCursor,k=y.cursor;if(!k||k.style==="block")return void(D.count=0);let I,L=0;k.style!=="bar"&&k.style!=="outline"||(I=8*L++,this._addRectangleFloat(D.attributes,I,k.x*this._dimensions.device.cell.width,k.y*this._dimensions.device.cell.height,k.style==="bar"?k.dpr*k.cursorWidth:k.dpr,this._dimensions.device.cell.height,this._cursorFloat)),k.style!=="underline"&&k.style!=="outline"||(I=8*L++,this._addRectangleFloat(D.attributes,I,k.x*this._dimensions.device.cell.width,(k.y+1)*this._dimensions.device.cell.height-k.dpr,k.width*this._dimensions.device.cell.width,k.dpr,this._cursorFloat)),k.style==="outline"&&(I=8*L++,this._addRectangleFloat(D.attributes,I,k.x*this._dimensions.device.cell.width,k.y*this._dimensions.device.cell.height,k.width*this._dimensions.device.cell.width,k.dpr,this._cursorFloat),I=8*L++,this._addRectangleFloat(D.attributes,I,(k.x+k.width)*this._dimensions.device.cell.width-k.dpr,k.y*this._dimensions.device.cell.height,k.dpr,this._dimensions.device.cell.height,this._cursorFloat)),D.count=L}_updateRectangle(y,D,k,I,L,B,V){if(67108864&k)switch(50331648&k){case 16777216:case 33554432:d=this._themeService.colors.ansi[255&k].rgba;break;case 50331648:d=(16777215&k)<<8;break;default:d=this._themeService.colors.foreground.rgba}else switch(50331648&I){case 16777216:case 33554432:d=this._themeService.colors.ansi[255&I].rgba;break;case 50331648:d=(16777215&I)<<8;break;default:d=this._themeService.colors.background.rgba}y.attributes.length<D+4&&(y.attributes=(0,v.expandFloat32Array)(y.attributes,this._terminal.rows*this._terminal.cols*8)),s=L*this._dimensions.device.cell.width,u=V*this._dimensions.device.cell.height,l=(d>>24&255)/255,c=(d>>16&255)/255,g=(d>>8&255)/255,x=1,this._addRectangle(y.attributes,D,s,u,(B-L)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,l,c,g,x)}_addRectangle(y,D,k,I,L,B,V,X,ee,Z){y[D]=k/this._dimensions.device.canvas.width,y[D+1]=I/this._dimensions.device.canvas.height,y[D+2]=L/this._dimensions.device.canvas.width,y[D+3]=B/this._dimensions.device.canvas.height,y[D+4]=V,y[D+5]=X,y[D+6]=ee,y[D+7]=Z}_addRectangleFloat(y,D,k,I,L,B,V){y[D]=k/this._dimensions.device.canvas.width,y[D+1]=I/this._dimensions.device.canvas.height,y[D+2]=L/this._dimensions.device.canvas.width,y[D+3]=B/this._dimensions.device.canvas.height,y[D+4]=V[0],y[D+5]=V[1],y[D+6]=V[2],y[D+7]=V[3]}_colorToFloat32Array(y){return new Float32Array([(y.rgba>>24&255)/255,(y.rgba>>16&255)/255,(y.rgba>>8&255)/255,(255&y.rgba)/255])}}a.RectangleRenderer=S},310:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderModel=a.COMBINED_CHAR_BIT_MASK=a.RENDER_MODEL_EXT_OFFSET=a.RENDER_MODEL_FG_OFFSET=a.RENDER_MODEL_BG_OFFSET=a.RENDER_MODEL_INDICIES_PER_CELL=void 0;const p=h(296);a.RENDER_MODEL_INDICIES_PER_CELL=4,a.RENDER_MODEL_BG_OFFSET=1,a.RENDER_MODEL_FG_OFFSET=2,a.RENDER_MODEL_EXT_OFFSET=3,a.COMBINED_CHAR_BIT_MASK=2147483648,a.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,p.createSelectionRenderModel)()}resize(m,o){const v=m*o*a.RENDER_MODEL_INDICIES_PER_CELL;v!==this.cells.length&&(this.cells=new Uint32Array(v),this.lineLengths=new Uint32Array(o))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.JoinedCellData=a.WebglRenderer=void 0;const p=h(820),m=h(274),o=h(627),v=h(457),_=h(56),E=h(374),d=h(345),s=h(859),u=h(147),l=h(782),c=h(855),g=h(965),x=h(742),S=h(310),N=h(733);class y extends s.Disposable{constructor(L,B,V,X,ee,Z,ie,P,H){super(),this._terminal=L,this._characterJoinerService=B,this._charSizeService=V,this._coreBrowserService=X,this._coreService=ee,this._decorationService=Z,this._optionsService=ie,this._themeService=P,this._cursorBlinkStateManager=new s.MutableDisposable,this._charAtlasDisposable=this.register(new s.MutableDisposable),this._observerDisposable=this.register(new s.MutableDisposable),this._model=new S.RenderModel,this._workCell=new l.CellData,this._workCell2=new l.CellData,this._rectangleRenderer=this.register(new s.MutableDisposable),this._glyphRenderer=this.register(new s.MutableDisposable),this._onChangeTextureAtlas=this.register(new d.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new d.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new d.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new d.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new d.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new m.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new N.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,ie,this._themeService)],this.dimensions=(0,E.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(ie.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const q={antialias:!1,depth:!1,preserveDrawingBuffer:H};if(this._gl=this._canvas.getContext("webgl2",q),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,p.addDisposableDomListener)(this._canvas,"webglcontextlost",(Y=>{console.log("webglcontextlost event received"),Y.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(Y)}),3e3)}))),this.register((0,p.addDisposableDomListener)(this._canvas,"webglcontextrestored",(Y=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,o.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,_.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((Y,re)=>this._setCanvasDevicePixelDimensions(Y,re))),this.register(this._coreBrowserService.onWindowChange((Y=>{this._observerDisposable.value=(0,_.observeDevicePixelDimensions)(this._canvas,Y,((re,ae)=>this._setCanvasDevicePixelDimensions(re,ae)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,s.toDisposable)((()=>{var Y;for(const re of this._renderLayers)re.dispose();(Y=this._canvas.parentElement)==null||Y.removeChild(this._canvas),(0,o.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var L;return(L=this._charAtlas)==null?void 0:L.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(L,B){var V,X,ee,Z;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const ie of this._renderLayers)ie.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(V=this._rectangleRenderer.value)==null||V.setDimensions(this.dimensions),(X=this._rectangleRenderer.value)==null||X.handleResize(),(ee=this._glyphRenderer.value)==null||ee.setDimensions(this.dimensions),(Z=this._glyphRenderer.value)==null||Z.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var L;for(const B of this._renderLayers)B.handleBlur(this._terminal);(L=this._cursorBlinkStateManager.value)==null||L.pause(),this._requestRedrawViewport()}handleFocus(){var L;for(const B of this._renderLayers)B.handleFocus(this._terminal);(L=this._cursorBlinkStateManager.value)==null||L.resume(),this._requestRedrawViewport()}handleSelectionChanged(L,B,V){for(const X of this._renderLayers)X.handleSelectionChanged(this._terminal,L,B,V);this._model.selection.update(this._core,L,B,V),this._requestRedrawViewport()}handleCursorMove(){var L;for(const B of this._renderLayers)B.handleCursorMove(this._terminal);(L=this._cursorBlinkStateManager.value)==null||L.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new x.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new g.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var B;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const L=(0,o.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==L&&(this._onChangeTextureAtlas.fire(L.pages[0].canvas),this._charAtlasDisposable.value=(0,s.getDisposeArrayDisposable)([(0,d.forwardEvent)(L.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,d.forwardEvent)(L.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=L,this._charAtlas.warmUp(),(B=this._glyphRenderer.value)==null||B.setAtlas(this._charAtlas)}_clearModel(L){var B;this._model.clear(),L&&((B=this._glyphRenderer.value)==null||B.clear())}clearTextureAtlas(){var L;(L=this._charAtlas)==null||L.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var L;this._clearModel(!0);for(const B of this._renderLayers)B.reset(this._terminal);(L=this._cursorBlinkStateManager.value)==null||L.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(L){return-1}deregisterCharacterJoiner(L){return!1}renderRows(L,B){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const V of this._renderLayers)V.handleGridChanged(this._terminal,L,B);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(L,B),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new v.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(L,B){const V=this._core;let X,ee,Z,ie,P,H,q,Y,re,ae,ve,ye,Q,$,he=this._workCell;L=k(L,V.rows-1,0),B=k(B,V.rows-1,0);const ce=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,De=ce-V.buffer.ydisp,Ee=Math.min(this._terminal.buffer.active.cursorX,V.cols-1);let He=-1;const Fe=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Ge=!1;for(ee=L;ee<=B;ee++)for(Z=ee+V.buffer.ydisp,ie=V.buffer.lines.get(Z),this._model.lineLengths[ee]=0,P=this._characterJoinerService.getJoinedCharacters(Z),Q=0;Q<V.cols;Q++)if(X=this._cellColorResolver.result.bg,ie.loadCell(Q,he),Q===0&&(X=this._cellColorResolver.result.bg),H=!1,q=Q,P.length>0&&Q===P[0][0]&&(H=!0,Y=P.shift(),he=new D(he,ie.translateToString(!0,Y[0],Y[1]),Y[1]-Y[0]),q=Y[1]-1),re=he.getChars(),ae=he.getCode(),ye=(ee*V.cols+Q)*S.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(he,Q,Z,this.dimensions.device.cell.width),Fe&&Z===ce&&(Q===Ee&&(this._model.cursor={x:Ee,y:De,width:he.getWidth(),style:this._coreBrowserService.isFocused?V.options.cursorStyle||"block":V.options.cursorInactiveStyle,cursorWidth:V.options.cursorWidth,dpr:this._devicePixelRatio},He=Ee+he.getWidth()-1),Q>=Ee&&Q<=He&&(this._coreBrowserService.isFocused&&(V.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&V.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),ae!==c.NULL_CELL_CODE&&(this._model.lineLengths[ee]=Q+1),(this._model.cells[ye]!==ae||this._model.cells[ye+S.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[ye+S.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[ye+S.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Ge=!0,re.length>1&&(ae|=S.COMBINED_CHAR_BIT_MASK),this._model.cells[ye]=ae,this._model.cells[ye+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[ye+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[ye+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,ve=he.getWidth(),this._glyphRenderer.value.updateCell(Q,ee,ae,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,re,ve,X),H))for(he=this._workCell,Q++;Q<q;Q++)$=(ee*V.cols+Q)*S.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(Q,ee,c.NULL_CELL_CODE,0,0,0,c.NULL_CELL_CHAR,0,0),this._model.cells[$]=c.NULL_CELL_CODE,this._model.cells[$+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[$+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[$+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Ge&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(L,B){this._canvas.width===L&&this._canvas.height===B||(this._canvas.width=L,this._canvas.height=B,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const L=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:L,end:L})}}a.WebglRenderer=y;class D extends u.AttributeData{constructor(L,B,V){super(),this.content=0,this.combinedData="",this.fg=L.fg,this.bg=L.bg,this.combinedData=B,this._width=V}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(L){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function k(I,L,B=0){return Math.max(Math.min(I,L),B)}a.JoinedCellData=D},381:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GLTexture=a.expandFloat32Array=a.createShader=a.createProgram=a.PROJECTION_MATRIX=void 0;const p=h(374);function m(o,v,_){const E=(0,p.throwIfFalsy)(o.createShader(v));if(o.shaderSource(E,_),o.compileShader(E),o.getShaderParameter(E,o.COMPILE_STATUS))return E;console.error(o.getShaderInfoLog(E)),o.deleteShader(E)}a.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),a.createProgram=function(o,v,_){const E=(0,p.throwIfFalsy)(o.createProgram());if(o.attachShader(E,(0,p.throwIfFalsy)(m(o,o.VERTEX_SHADER,v))),o.attachShader(E,(0,p.throwIfFalsy)(m(o,o.FRAGMENT_SHADER,_))),o.linkProgram(E),o.getProgramParameter(E,o.LINK_STATUS))return E;console.error(o.getProgramInfoLog(E)),o.deleteProgram(E)},a.createShader=m,a.expandFloat32Array=function(o,v){const _=Math.min(2*o.length,v),E=new Float32Array(_);for(let d=0;d<o.length;d++)E[d]=o[d];return E},a.GLTexture=class{constructor(o){this.texture=o,this.version=-1}}},592:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;const p=h(627),m=h(237),o=h(374),v=h(859);class _ extends v.Disposable{constructor(d,s,u,l,c,g,x,S){super(),this._container=s,this._alpha=c,this._coreBrowserService=g,this._optionsService=x,this._themeService=S,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${u}-layer`),this._canvas.style.zIndex=l.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((N=>{this._refreshCharAtlas(d,N),this.reset(d)}))),this.register((0,v.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,o.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(d){}handleFocus(d){}handleCursorMove(d){}handleGridChanged(d,s,u){}handleSelectionChanged(d,s,u,l=!1){}_setTransparency(d,s){if(s===this._alpha)return;const u=this._canvas;this._alpha=s,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,u),this._refreshCharAtlas(d,this._themeService.colors),this.handleGridChanged(d,0,d.rows-1)}_refreshCharAtlas(d,s){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,p.acquireTextureAtlas)(d,this._optionsService.rawOptions,s,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(d,s){this._deviceCellWidth=s.device.cell.width,this._deviceCellHeight=s.device.cell.height,this._deviceCharWidth=s.device.char.width,this._deviceCharHeight=s.device.char.height,this._deviceCharLeft=s.device.char.left,this._deviceCharTop=s.device.char.top,this._canvas.width=s.device.canvas.width,this._canvas.height=s.device.canvas.height,this._canvas.style.width=`${s.css.canvas.width}px`,this._canvas.style.height=`${s.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(d,this._themeService.colors)}_fillBottomLineAtCells(d,s,u=1){this._ctx.fillRect(d*this._deviceCellWidth,(s+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,u*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(d,s,u,l){this._alpha?this._ctx.clearRect(d*this._deviceCellWidth,s*this._deviceCellHeight,u*this._deviceCellWidth,l*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(d*this._deviceCellWidth,s*this._deviceCellHeight,u*this._deviceCellWidth,l*this._deviceCellHeight))}_fillCharTrueColor(d,s,u,l){this._ctx.font=this._getFont(d,!1,!1),this._ctx.textBaseline=m.TEXT_BASELINE,this._clipCell(u,l,s.getWidth()),this._ctx.fillText(s.getChars(),u*this._deviceCellWidth+this._deviceCharLeft,l*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(d,s,u){this._ctx.beginPath(),this._ctx.rect(d*this._deviceCellWidth,s*this._deviceCellHeight,u*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(d,s,u){return`${u?"italic":""} ${s?d.options.fontWeightBold:d.options.fontWeight} ${d.options.fontSize*this._coreBrowserService.dpr}px ${d.options.fontFamily}`}}a.BaseRenderLayer=_},733:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;const p=h(197),m=h(237),o=h(592);class v extends o.BaseRenderLayer{constructor(E,d,s,u,l,c,g){super(s,E,"link",d,!0,l,c,g),this.register(u.onShowLinkUnderline((x=>this._handleShowLinkUnderline(x)))),this.register(u.onHideLinkUnderline((x=>this._handleHideLinkUnderline(x))))}resize(E,d){super.resize(E,d),this._state=void 0}reset(E){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const E=this._state.y2-this._state.y1-1;E>0&&this._clearCells(0,this._state.y1+1,this._state.cols,E),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(E){if(E.fg===m.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:E.fg!==void 0&&(0,p.is256Color)(E.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[E.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,E.y1===E.y2)this._fillBottomLineAtCells(E.x1,E.y1,E.x2-E.x1);else{this._fillBottomLineAtCells(E.x1,E.y1,E.cols-E.x1);for(let d=E.y1+1;d<E.y2;d++)this._fillBottomLineAtCells(0,d,E.cols);this._fillBottomLineAtCells(0,E.y2,E.x2)}this._state=E}_handleHideLinkUnderline(E){this._clearCurrentLink()}}a.LinkRenderLayer=v},820:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(h,p,m,o){h.addEventListener(p,m,o);let v=!1;return{dispose:()=>{v||(v=!0,h.removeEventListener(p,m,o))}}}},274:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellColorResolver=void 0;const p=h(855),m=h(160),o=h(374);let v,_=0,E=0,d=!1,s=!1,u=!1,l=0;a.CellColorResolver=class{constructor(c,g,x,S,N,y){this._terminal=c,this._optionService=g,this._selectionRenderModel=x,this._decorationService=S,this._coreBrowserService=N,this._themeService=y,this.result={fg:0,bg:0,ext:0}}resolve(c,g,x,S){if(this.result.bg=c.bg,this.result.fg=c.fg,this.result.ext=268435456&c.bg?c.extended.ext:0,E=0,_=0,s=!1,d=!1,u=!1,v=this._themeService.colors,l=0,c.getCode()!==p.NULL_CELL_CODE&&c.extended.underlineStyle===4){const N=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));l=g*S%(2*Math.round(N))}if(this._decorationService.forEachDecorationAtCell(g,x,"bottom",(N=>{N.backgroundColorRGB&&(E=N.backgroundColorRGB.rgba>>8&16777215,s=!0),N.foregroundColorRGB&&(_=N.foregroundColorRGB.rgba>>8&16777215,d=!0)})),u=this._selectionRenderModel.isCellSelected(this._terminal,g,x),u){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:E=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:E=(16777215&this.result.fg)<<8|255;break;default:E=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:E=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:E=(16777215&this.result.bg)<<8|255}E=m.rgba.blend(E,4294967040&(this._coreBrowserService.isFocused?v.selectionBackgroundOpaque:v.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else E=(this._coreBrowserService.isFocused?v.selectionBackgroundOpaque:v.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(s=!0,v.selectionForeground&&(_=v.selectionForeground.rgba>>8&16777215,d=!0),(0,o.treatGlyphAsBackgroundColor)(c.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)_=(this._coreBrowserService.isFocused?v.selectionBackgroundOpaque:v.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:_=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:_=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:_=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:_=(16777215&this.result.fg)<<8|255;break;default:_=this._themeService.colors.foreground.rgba}_=m.rgba.blend(_,4294967040&(this._coreBrowserService.isFocused?v.selectionBackgroundOpaque:v.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}d=!0}}this._decorationService.forEachDecorationAtCell(g,x,"top",(N=>{N.backgroundColorRGB&&(E=N.backgroundColorRGB.rgba>>8&16777215,s=!0),N.foregroundColorRGB&&(_=N.foregroundColorRGB.rgba>>8&16777215,d=!0)})),s&&(E=u?-16777216&c.bg&-134217729|E|50331648:-16777216&c.bg|E|50331648),d&&(_=-16777216&c.fg&-67108865|_|50331648),67108864&this.result.fg&&(s&&!d&&(_=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&v.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,d=!0),!s&&d&&(E=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&v.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,s=!0)),v=void 0,this.result.bg=s?E:this.result.bg,this.result.fg=d?_:this.result.fg,this.result.ext&=536870911,this.result.ext|=l<<29&3758096384}}},627:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireTextureAtlas=void 0;const p=h(509),m=h(197),o=[];a.acquireTextureAtlas=function(v,_,E,d,s,u,l,c){const g=(0,m.generateConfig)(d,s,u,l,_,E,c);for(let N=0;N<o.length;N++){const y=o[N],D=y.ownedBy.indexOf(v);if(D>=0){if((0,m.configEquals)(y.config,g))return y.atlas;y.ownedBy.length===1?(y.atlas.dispose(),o.splice(N,1)):y.ownedBy.splice(D,1);break}}for(let N=0;N<o.length;N++){const y=o[N];if((0,m.configEquals)(y.config,g))return y.ownedBy.push(v),y.atlas}const x=v._core,S={atlas:new p.TextureAtlas(document,g,x.unicodeService),config:g,ownedBy:[v]};return o.push(S),S.atlas},a.removeTerminalFromCache=function(v){for(let _=0;_<o.length;_++){const E=o[_].ownedBy.indexOf(v);if(E!==-1){o[_].ownedBy.length===1?(o[_].atlas.dispose(),o.splice(_,1)):o[_].ownedBy.splice(E,1);break}}}},197:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;const p=h(160);a.generateConfig=function(m,o,v,_,E,d,s){const u={foreground:d.foreground,background:d.background,cursor:p.NULL_COLOR,cursorAccent:p.NULL_COLOR,selectionForeground:p.NULL_COLOR,selectionBackgroundTransparent:p.NULL_COLOR,selectionBackgroundOpaque:p.NULL_COLOR,selectionInactiveBackgroundTransparent:p.NULL_COLOR,selectionInactiveBackgroundOpaque:p.NULL_COLOR,ansi:d.ansi.slice(),contrastCache:d.contrastCache,halfContrastCache:d.halfContrastCache};return{customGlyphs:E.customGlyphs,devicePixelRatio:s,letterSpacing:E.letterSpacing,lineHeight:E.lineHeight,deviceCellWidth:m,deviceCellHeight:o,deviceCharWidth:v,deviceCharHeight:_,fontFamily:E.fontFamily,fontSize:E.fontSize,fontWeight:E.fontWeight,fontWeightBold:E.fontWeightBold,allowTransparency:E.allowTransparency,drawBoldTextInBrightColors:E.drawBoldTextInBrightColors,minimumContrastRatio:E.minimumContrastRatio,colors:u}},a.configEquals=function(m,o){for(let v=0;v<m.colors.ansi.length;v++)if(m.colors.ansi[v].rgba!==o.colors.ansi[v].rgba)return!1;return m.devicePixelRatio===o.devicePixelRatio&&m.customGlyphs===o.customGlyphs&&m.lineHeight===o.lineHeight&&m.letterSpacing===o.letterSpacing&&m.fontFamily===o.fontFamily&&m.fontSize===o.fontSize&&m.fontWeight===o.fontWeight&&m.fontWeightBold===o.fontWeightBold&&m.allowTransparency===o.allowTransparency&&m.deviceCharWidth===o.deviceCharWidth&&m.deviceCharHeight===o.deviceCharHeight&&m.drawBoldTextInBrightColors===o.drawBoldTextInBrightColors&&m.minimumContrastRatio===o.minimumContrastRatio&&m.colors.foreground.rgba===o.colors.foreground.rgba&&m.colors.background.rgba===o.colors.background.rgba},a.is256Color=function(m){return(50331648&m)==16777216||(50331648&m)==33554432}},237:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const p=h(399);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=p.isFirefox||p.isLegacyEdge?"bottom":"ideographic"},457:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CursorBlinkStateManager=void 0,a.CursorBlinkStateManager=class{constructor(h,p){this._renderCallback=h,this._coreBrowserService=p,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(h=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const p=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,p>0)return void this._restartInterval(p)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const p=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(p)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),h)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.powerlineDefinitions=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;const p=h(374);a.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const m={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};a.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(d,s)=>`M0,${.5-s} L1,${.5-s} M0,${.5+s} L1,${.5+s}`},"║":{1:(d,s)=>`M${.5-d},0 L${.5-d},1 M${.5+d},0 L${.5+d},1`},"╒":{1:(d,s)=>`M.5,1 L.5,${.5-s} L1,${.5-s} M.5,${.5+s} L1,${.5+s}`},"╓":{1:(d,s)=>`M${.5-d},1 L${.5-d},.5 L1,.5 M${.5+d},.5 L${.5+d},1`},"╔":{1:(d,s)=>`M1,${.5-s} L${.5-d},${.5-s} L${.5-d},1 M1,${.5+s} L${.5+d},${.5+s} L${.5+d},1`},"╕":{1:(d,s)=>`M0,${.5-s} L.5,${.5-s} L.5,1 M0,${.5+s} L.5,${.5+s}`},"╖":{1:(d,s)=>`M${.5+d},1 L${.5+d},.5 L0,.5 M${.5-d},.5 L${.5-d},1`},"╗":{1:(d,s)=>`M0,${.5+s} L${.5-d},${.5+s} L${.5-d},1 M0,${.5-s} L${.5+d},${.5-s} L${.5+d},1`},"╘":{1:(d,s)=>`M.5,0 L.5,${.5+s} L1,${.5+s} M.5,${.5-s} L1,${.5-s}`},"╙":{1:(d,s)=>`M1,.5 L${.5-d},.5 L${.5-d},0 M${.5+d},.5 L${.5+d},0`},"╚":{1:(d,s)=>`M1,${.5-s} L${.5+d},${.5-s} L${.5+d},0 M1,${.5+s} L${.5-d},${.5+s} L${.5-d},0`},"╛":{1:(d,s)=>`M0,${.5+s} L.5,${.5+s} L.5,0 M0,${.5-s} L.5,${.5-s}`},"╜":{1:(d,s)=>`M0,.5 L${.5+d},.5 L${.5+d},0 M${.5-d},.5 L${.5-d},0`},"╝":{1:(d,s)=>`M0,${.5-s} L${.5-d},${.5-s} L${.5-d},0 M0,${.5+s} L${.5+d},${.5+s} L${.5+d},0`},"╞":{1:(d,s)=>`M.5,0 L.5,1 M.5,${.5-s} L1,${.5-s} M.5,${.5+s} L1,${.5+s}`},"╟":{1:(d,s)=>`M${.5-d},0 L${.5-d},1 M${.5+d},0 L${.5+d},1 M${.5+d},.5 L1,.5`},"╠":{1:(d,s)=>`M${.5-d},0 L${.5-d},1 M1,${.5+s} L${.5+d},${.5+s} L${.5+d},1 M1,${.5-s} L${.5+d},${.5-s} L${.5+d},0`},"╡":{1:(d,s)=>`M.5,0 L.5,1 M0,${.5-s} L.5,${.5-s} M0,${.5+s} L.5,${.5+s}`},"╢":{1:(d,s)=>`M0,.5 L${.5-d},.5 M${.5-d},0 L${.5-d},1 M${.5+d},0 L${.5+d},1`},"╣":{1:(d,s)=>`M${.5+d},0 L${.5+d},1 M0,${.5+s} L${.5-d},${.5+s} L${.5-d},1 M0,${.5-s} L${.5-d},${.5-s} L${.5-d},0`},"╤":{1:(d,s)=>`M0,${.5-s} L1,${.5-s} M0,${.5+s} L1,${.5+s} M.5,${.5+s} L.5,1`},"╥":{1:(d,s)=>`M0,.5 L1,.5 M${.5-d},.5 L${.5-d},1 M${.5+d},.5 L${.5+d},1`},"╦":{1:(d,s)=>`M0,${.5-s} L1,${.5-s} M0,${.5+s} L${.5-d},${.5+s} L${.5-d},1 M1,${.5+s} L${.5+d},${.5+s} L${.5+d},1`},"╧":{1:(d,s)=>`M.5,0 L.5,${.5-s} M0,${.5-s} L1,${.5-s} M0,${.5+s} L1,${.5+s}`},"╨":{1:(d,s)=>`M0,.5 L1,.5 M${.5-d},.5 L${.5-d},0 M${.5+d},.5 L${.5+d},0`},"╩":{1:(d,s)=>`M0,${.5+s} L1,${.5+s} M0,${.5-s} L${.5-d},${.5-s} L${.5-d},0 M1,${.5-s} L${.5+d},${.5-s} L${.5+d},0`},"╪":{1:(d,s)=>`M.5,0 L.5,1 M0,${.5-s} L1,${.5-s} M0,${.5+s} L1,${.5+s}`},"╫":{1:(d,s)=>`M0,.5 L1,.5 M${.5-d},0 L${.5-d},1 M${.5+d},0 L${.5+d},1`},"╬":{1:(d,s)=>`M0,${.5+s} L${.5-d},${.5+s} L${.5-d},1 M1,${.5+s} L${.5+d},${.5+s} L${.5+d},1 M0,${.5-s} L${.5-d},${.5-s} L${.5-d},0 M1,${.5-s} L${.5+d},${.5-s} L${.5+d},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(d,s)=>`M.5,1 L.5,${.5+s/.15*.5} C.5,${.5+s/.15*.5},.5,.5,1,.5`},"╮":{1:(d,s)=>`M.5,1 L.5,${.5+s/.15*.5} C.5,${.5+s/.15*.5},.5,.5,0,.5`},"╯":{1:(d,s)=>`M.5,0 L.5,${.5-s/.15*.5} C.5,${.5-s/.15*.5},.5,.5,0,.5`},"╰":{1:(d,s)=>`M.5,0 L.5,${.5-s/.15*.5} C.5,${.5-s/.15*.5},.5,.5,1,.5`}},a.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.tryDrawCustomChar=function(d,s,u,l,c,g,x,S){const N=a.blockElementDefinitions[s];if(N)return(function(I,L,B,V,X,ee){for(let Z=0;Z<L.length;Z++){const ie=L[Z],P=X/8,H=ee/8;I.fillRect(B+ie.x*P,V+ie.y*H,ie.w*P,ie.h*H)}})(d,N,u,l,c,g),!0;const y=m[s];if(y)return(function(I,L,B,V,X,ee){let Z=o.get(L);Z||(Z=new Map,o.set(L,Z));const ie=I.fillStyle;if(typeof ie!="string")throw new Error(`Unexpected fillStyle type "${ie}"`);let P=Z.get(ie);if(!P){const H=L[0].length,q=L.length,Y=I.canvas.ownerDocument.createElement("canvas");Y.width=H,Y.height=q;const re=(0,p.throwIfFalsy)(Y.getContext("2d")),ae=new ImageData(H,q);let ve,ye,Q,$;if(ie.startsWith("#"))ve=parseInt(ie.slice(1,3),16),ye=parseInt(ie.slice(3,5),16),Q=parseInt(ie.slice(5,7),16),$=ie.length>7&&parseInt(ie.slice(7,9),16)||1;else{if(!ie.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${ie}" when drawing pattern glyph`);[ve,ye,Q,$]=ie.substring(5,ie.length-1).split(",").map((he=>parseFloat(he)))}for(let he=0;he<q;he++)for(let ce=0;ce<H;ce++)ae.data[4*(he*H+ce)]=ve,ae.data[4*(he*H+ce)+1]=ye,ae.data[4*(he*H+ce)+2]=Q,ae.data[4*(he*H+ce)+3]=L[he][ce]*(255*$);re.putImageData(ae,0,0),P=(0,p.throwIfFalsy)(I.createPattern(Y,null)),Z.set(ie,P)}I.fillStyle=P,I.fillRect(B,V,X,ee)})(d,y,u,l,c,g),!0;const D=a.boxDrawingDefinitions[s];if(D)return(function(I,L,B,V,X,ee,Z){I.strokeStyle=I.fillStyle;for(const[ie,P]of Object.entries(L)){let H;I.beginPath(),I.lineWidth=Z*Number.parseInt(ie),H=typeof P=="function"?P(.15,.15/ee*X):P;for(const q of H.split(" ")){const Y=q[0],re=_[Y];if(!re){console.error(`Could not find drawing instructions for "${Y}"`);continue}const ae=q.substring(1).split(",");ae[0]&&ae[1]&&re(I,E(ae,X,ee,B,V,!0,Z))}I.stroke(),I.closePath()}})(d,D,u,l,c,g,S),!0;const k=a.powerlineDefinitions[s];return!!k&&((function(I,L,B,V,X,ee,Z,ie){const P=new Path2D;P.rect(B,V,X,ee),I.clip(P),I.beginPath();const H=Z/12;I.lineWidth=ie*H;for(const q of L.d.split(" ")){const Y=q[0],re=_[Y];if(!re){console.error(`Could not find drawing instructions for "${Y}"`);continue}const ae=q.substring(1).split(",");ae[0]&&ae[1]&&re(I,E(ae,X,ee,B,V,!1,ie,(L.leftPadding??0)*(H/2),(L.rightPadding??0)*(H/2)))}L.type===1?(I.strokeStyle=I.fillStyle,I.stroke()):I.fill(),I.closePath()})(d,k,u,l,c,g,x,S),!0)};const o=new Map;function v(d,s,u=0){return Math.max(Math.min(d,s),u)}const _={C:(d,s)=>d.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]),L:(d,s)=>d.lineTo(s[0],s[1]),M:(d,s)=>d.moveTo(s[0],s[1])};function E(d,s,u,l,c,g,x,S=0,N=0){const y=d.map((D=>parseFloat(D)||parseInt(D)));if(y.length<2)throw new Error("Too few arguments for instruction");for(let D=0;D<y.length;D+=2)y[D]*=s-S*x-N*x,g&&y[D]!==0&&(y[D]=v(Math.round(y[D]+.5)-.5,s,0)),y[D]+=l+S*x;for(let D=1;D<y.length;D+=2)y[D]*=u,g&&y[D]!==0&&(y[D]=v(Math.round(y[D]+.5)-.5,u,0)),y[D]+=c;return y}},56:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.observeDevicePixelDimensions=void 0;const p=h(859);a.observeDevicePixelDimensions=function(m,o,v){let _=new o.ResizeObserver((E=>{const d=E.find((l=>l.target===m));if(!d)return;if(!("devicePixelContentBoxSize"in d))return _==null||_.disconnect(),void(_=void 0);const s=d.devicePixelContentBoxSize[0].inlineSize,u=d.devicePixelContentBoxSize[0].blockSize;s>0&&u>0&&v(s,u)}));try{_.observe(m,{box:["device-pixel-content-box"]})}catch{_.disconnect(),_=void 0}return(0,p.toDisposable)((()=>_==null?void 0:_.disconnect()))}},374:(R,a)=>{function h(m){return 57508<=m&&m<=57558}function p(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},a.isPowerlineGlyph=h,a.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},a.isEmoji=p,a.allowRescaling=function(m,o,v,_){return o===1&&v>Math.ceil(1.5*_)&&m!==void 0&&m>255&&!p(m)&&!h(m)&&!(function(E){return 57344<=E&&E<=63743})(m)},a.treatGlyphAsBackgroundColor=function(m){return h(m)||(function(o){return 9472<=o&&o<=9631})(m)},a.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}}}},a.computeNextVariantOffset=function(m,o,v=0){return(m-(2*Math.round(o)-v))%(2*Math.round(o))}},296:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class h{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(m,o,v,_=!1){if(this.selectionStart=o,this.selectionEnd=v,!o||!v||o[0]===v[0]&&o[1]===v[1])return void this.clear();const E=m.buffers.active.ydisp,d=o[1]-E,s=v[1]-E,u=Math.max(d,0),l=Math.min(s,m.rows-1);u>=m.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=_,this.viewportStartRow=d,this.viewportEndRow=s,this.viewportCappedStartRow=u,this.viewportCappedEndRow=l,this.startCol=o[0],this.endCol=v[0])}isCellSelected(m,o,v){return!!this.hasSelection&&(v-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?o>=this.startCol&&v>=this.viewportCappedStartRow&&o<this.endCol&&v<=this.viewportCappedEndRow:o<this.startCol&&v>=this.viewportCappedStartRow&&o>=this.endCol&&v<=this.viewportCappedEndRow:v>this.viewportStartRow&&v<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&v===this.viewportStartRow&&o>=this.startCol&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&v===this.viewportEndRow&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&v===this.viewportStartRow&&o>=this.startCol)}}a.createSelectionRenderModel=function(){return new h}},509:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TextureAtlas=void 0;const p=h(237),m=h(860),o=h(374),v=h(160),_=h(345),E=h(485),d=h(385),s=h(147),u=h(855),l={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let c;class g{get pages(){return this._pages}constructor(D,k,I){this._document=D,this._config=k,this._unicodeService=I,this._didWarmUp=!1,this._cacheMap=new E.FourKeyMap,this._cacheMapCombined=new E.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new s.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new _.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new _.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=N(D,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,o.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const D of this.pages)D.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const D=new d.IdleTaskQueue;for(let k=33;k<126;k++)D.enqueue((()=>{if(!this._cacheMap.get(k,u.DEFAULT_COLOR,u.DEFAULT_COLOR,u.DEFAULT_EXT)){const I=this._drawToCache(k,u.DEFAULT_COLOR,u.DEFAULT_COLOR,u.DEFAULT_EXT);this._cacheMap.set(k,u.DEFAULT_COLOR,u.DEFAULT_COLOR,u.DEFAULT_EXT,I)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const D of this._pages)D.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(g.maxAtlasPages&&this._pages.length>=Math.max(4,g.maxAtlasPages)){const k=this._pages.filter((Z=>2*Z.canvas.width<=(g.maxTextureSize||4096))).sort(((Z,ie)=>ie.canvas.width!==Z.canvas.width?ie.canvas.width-Z.canvas.width:ie.percentageUsed-Z.percentageUsed));let I=-1,L=0;for(let Z=0;Z<k.length;Z++)if(k[Z].canvas.width!==L)I=Z,L=k[Z].canvas.width;else if(Z-I==3)break;const B=k.slice(I,I+4),V=B.map((Z=>Z.glyphs[0].texturePage)).sort(((Z,ie)=>Z>ie?1:-1)),X=this.pages.length-B.length,ee=this._mergePages(B,X);ee.version++;for(let Z=V.length-1;Z>=0;Z--)this._deletePage(V[Z]);this.pages.push(ee),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(ee.canvas)}const D=new x(this._document,this._textureSize);return this._pages.push(D),this._activePages.push(D),this._onAddTextureAtlasCanvas.fire(D.canvas),D}_mergePages(D,k){const I=2*D[0].canvas.width,L=new x(this._document,I,D);for(const[B,V]of D.entries()){const X=B*V.canvas.width%I,ee=Math.floor(B/2)*V.canvas.height;L.ctx.drawImage(V.canvas,X,ee);for(const ie of V.glyphs)ie.texturePage=k,ie.sizeClipSpace.x=ie.size.x/I,ie.sizeClipSpace.y=ie.size.y/I,ie.texturePosition.x+=X,ie.texturePosition.y+=ee,ie.texturePositionClipSpace.x=ie.texturePosition.x/I,ie.texturePositionClipSpace.y=ie.texturePosition.y/I;this._onRemoveTextureAtlasCanvas.fire(V.canvas);const Z=this._activePages.indexOf(V);Z!==-1&&this._activePages.splice(Z,1)}return L}_deletePage(D){this._pages.splice(D,1);for(let k=D;k<this._pages.length;k++){const I=this._pages[k];for(const L of I.glyphs)L.texturePage--;I.version++}}getRasterizedGlyphCombinedChar(D,k,I,L,B){return this._getFromCacheMap(this._cacheMapCombined,D,k,I,L,B)}getRasterizedGlyph(D,k,I,L,B){return this._getFromCacheMap(this._cacheMap,D,k,I,L,B)}_getFromCacheMap(D,k,I,L,B,V=!1){return c=D.get(k,I,L,B),c||(c=this._drawToCache(k,I,L,B,V),D.set(k,I,L,B,c)),c}_getColorFromAnsiIndex(D){if(D>=this._config.colors.ansi.length)throw new Error("No color found for idx "+D);return this._config.colors.ansi[D]}_getBackgroundColor(D,k,I,L){if(this._config.allowTransparency)return v.NULL_COLOR;let B;switch(D){case 16777216:case 33554432:B=this._getColorFromAnsiIndex(k);break;case 50331648:const V=s.AttributeData.toColorRGB(k);B=v.channels.toColor(V[0],V[1],V[2]);break;default:B=I?v.color.opaque(this._config.colors.foreground):this._config.colors.background}return B}_getForegroundColor(D,k,I,L,B,V,X,ee,Z,ie){const P=this._getMinimumContrastColor(D,k,I,L,B,V,X,Z,ee,ie);if(P)return P;let H;switch(B){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&Z&&V<8&&(V+=8),H=this._getColorFromAnsiIndex(V);break;case 50331648:const q=s.AttributeData.toColorRGB(V);H=v.channels.toColor(q[0],q[1],q[2]);break;default:H=X?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(H=v.color.opaque(H)),ee&&(H=v.color.multiplyOpacity(H,p.DIM_OPACITY)),H}_resolveBackgroundRgba(D,k,I){switch(D){case 16777216:case 33554432:return this._getColorFromAnsiIndex(k).rgba;case 50331648:return k<<8;default:return I?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(D,k,I,L){switch(D){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&L&&k<8&&(k+=8),this._getColorFromAnsiIndex(k).rgba;case 50331648:return k<<8;default:return I?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(D,k,I,L,B,V,X,ee,Z,ie){if(this._config.minimumContrastRatio===1||ie)return;const P=this._getContrastCache(Z),H=P.getColor(D,L);if(H!==void 0)return H||void 0;const q=this._resolveBackgroundRgba(k,I,X),Y=this._resolveForegroundRgba(B,V,X,ee),re=v.rgba.ensureContrastRatio(q,Y,this._config.minimumContrastRatio/(Z?2:1));if(!re)return void P.setColor(D,L,null);const ae=v.channels.toColor(re>>24&255,re>>16&255,re>>8&255);return P.setColor(D,L,ae),ae}_getContrastCache(D){return D?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(D,k,I,L,B=!1){const V=typeof D=="number"?String.fromCharCode(D):D,X=Math.min(this._config.deviceCellWidth*Math.max(V.length,2)+4,this._textureSize);this._tmpCanvas.width<X&&(this._tmpCanvas.width=X);const ee=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<ee&&(this._tmpCanvas.height=ee),this._tmpCtx.save(),this._workAttributeData.fg=I,this._workAttributeData.bg=k,this._workAttributeData.extended.ext=L,this._workAttributeData.isInvisible())return l;const Z=!!this._workAttributeData.isBold(),ie=!!this._workAttributeData.isInverse(),P=!!this._workAttributeData.isDim(),H=!!this._workAttributeData.isItalic(),q=!!this._workAttributeData.isUnderline(),Y=!!this._workAttributeData.isStrikethrough(),re=!!this._workAttributeData.isOverline();let ae=this._workAttributeData.getFgColor(),ve=this._workAttributeData.getFgColorMode(),ye=this._workAttributeData.getBgColor(),Q=this._workAttributeData.getBgColorMode();if(ie){const Ae=ae;ae=ye,ye=Ae;const ot=ve;ve=Q,Q=ot}const $=this._getBackgroundColor(Q,ye,ie,P);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=$.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const he=Z?this._config.fontWeightBold:this._config.fontWeight,ce=H?"italic":"";this._tmpCtx.font=`${ce} ${he} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=p.TEXT_BASELINE;const De=V.length===1&&(0,o.isPowerlineGlyph)(V.charCodeAt(0)),Ee=V.length===1&&(0,o.isRestrictedPowerlineGlyph)(V.charCodeAt(0)),He=this._getForegroundColor(k,Q,ye,I,ve,ae,ie,P,Z,(0,o.treatGlyphAsBackgroundColor)(V.charCodeAt(0)));this._tmpCtx.fillStyle=He.css;const Fe=Ee?0:4;let Ge=!1;this._config.customGlyphs!==!1&&(Ge=(0,m.tryDrawCustomChar)(this._tmpCtx,V,Fe,Fe,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let at,Me=!De;if(at=typeof D=="number"?this._unicodeService.wcwidth(D):this._unicodeService.getStringCellWidth(D),q){this._tmpCtx.save();const Ae=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ot=Ae%2==1?.5:0;if(this._tmpCtx.lineWidth=Ae,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Me=!1,this._tmpCtx.strokeStyle=`rgb(${s.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Me=!1;let Ce=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Ce<8&&(Ce+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Ce).css}this._tmpCtx.beginPath();const ct=Fe,ut=Math.ceil(Fe+this._config.deviceCharHeight)-ot-(B?2*Ae:0),jt=ut+Ae,Ht=ut+2*Ae;let Kt=this._workAttributeData.getUnderlineVariantOffset();for(let Ce=0;Ce<at;Ce++){this._tmpCtx.save();const ke=ct+Ce*this._config.deviceCellWidth,Re=ct+(Ce+1)*this._config.deviceCellWidth,mt=ke+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(ke,ut),this._tmpCtx.lineTo(Re,ut),this._tmpCtx.moveTo(ke,Ht),this._tmpCtx.lineTo(Re,Ht);break;case 3:const Dt=Ae<=1?Ht:Math.ceil(Fe+this._config.deviceCharHeight-Ae/2)-ot,Tt=Ae<=1?ut:Math.ceil(Fe+this._config.deviceCharHeight+Ae/2)-ot,It=new Path2D;It.rect(ke,ut,this._config.deviceCellWidth,Ht-ut),this._tmpCtx.clip(It),this._tmpCtx.moveTo(ke-this._config.deviceCellWidth/2,jt),this._tmpCtx.bezierCurveTo(ke-this._config.deviceCellWidth/2,Tt,ke,Tt,ke,jt),this._tmpCtx.bezierCurveTo(ke,Dt,mt,Dt,mt,jt),this._tmpCtx.bezierCurveTo(mt,Tt,Re,Tt,Re,jt),this._tmpCtx.bezierCurveTo(Re,Dt,Re+this._config.deviceCellWidth/2,Dt,Re+this._config.deviceCellWidth/2,jt);break;case 4:const Zt=Kt===0?0:Kt>=Ae?2*Ae-Kt:Ae-Kt;Kt>=Ae||Zt===0?(this._tmpCtx.setLineDash([Math.round(Ae),Math.round(Ae)]),this._tmpCtx.moveTo(ke+Zt,ut),this._tmpCtx.lineTo(Re,ut)):(this._tmpCtx.setLineDash([Math.round(Ae),Math.round(Ae)]),this._tmpCtx.moveTo(ke,ut),this._tmpCtx.lineTo(ke+Zt,ut),this._tmpCtx.moveTo(ke+Zt+Ae,ut),this._tmpCtx.lineTo(Re,ut)),Kt=(0,o.computeNextVariantOffset)(Re-ke,Ae,Kt);break;case 5:const Ut=.6,Lt=.3,Ft=Re-ke,sr=Math.floor(Ut*Ft),Ir=Math.floor(Lt*Ft),Nr=Ft-sr-Ir;this._tmpCtx.setLineDash([sr,Ir,Nr]),this._tmpCtx.moveTo(ke,ut),this._tmpCtx.lineTo(Re,ut);break;default:this._tmpCtx.moveTo(ke,ut),this._tmpCtx.lineTo(Re,ut)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Ge&&this._config.fontSize>=12&&!this._config.allowTransparency&&V!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ce=this._tmpCtx.measureText(V);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ce&&Ce.actualBoundingBoxDescent>0){this._tmpCtx.save();const ke=new Path2D;ke.rect(ct,ut-Math.ceil(Ae/2),this._config.deviceCellWidth*at,Ht-ut+Math.ceil(Ae/2)),this._tmpCtx.clip(ke),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=$.css,this._tmpCtx.strokeText(V,Fe,Fe+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(re){const Ae=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ot=Ae%2==1?.5:0;this._tmpCtx.lineWidth=Ae,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(Fe,Fe+ot),this._tmpCtx.lineTo(Fe+this._config.deviceCharWidth*at,Fe+ot),this._tmpCtx.stroke()}if(Ge||this._tmpCtx.fillText(V,Fe,Fe+this._config.deviceCharHeight),V==="_"&&!this._config.allowTransparency){let Ae=S(this._tmpCtx.getImageData(Fe,Fe,this._config.deviceCellWidth,this._config.deviceCellHeight),$,He,Me);if(Ae)for(let ot=1;ot<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=$.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(V,Fe,Fe+this._config.deviceCharHeight-ot),Ae=S(this._tmpCtx.getImageData(Fe,Fe,this._config.deviceCellWidth,this._config.deviceCellHeight),$,He,Me),Ae);ot++);}if(Y){const Ae=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),ot=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=Ae,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(Fe,Fe+Math.floor(this._config.deviceCharHeight/2)-ot),this._tmpCtx.lineTo(Fe+this._config.deviceCharWidth*at,Fe+Math.floor(this._config.deviceCharHeight/2)-ot),this._tmpCtx.stroke()}this._tmpCtx.restore();const tr=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let nr;if(nr=this._config.allowTransparency?(function(Ae){for(let ot=0;ot<Ae.data.length;ot+=4)if(Ae.data[ot+3]>0)return!1;return!0})(tr):S(tr,$,He,Me),nr)return l;const Qe=this._findGlyphBoundingBox(tr,this._workBoundingBox,X,Ee,Ge,Fe);let Ue,We;for(;;){if(this._activePages.length===0){const Ae=this._createNewPage();Ue=Ae,We=Ae.currentRow,We.height=Qe.size.y;break}Ue=this._activePages[this._activePages.length-1],We=Ue.currentRow;for(const Ae of this._activePages)Qe.size.y<=Ae.currentRow.height&&(Ue=Ae,We=Ae.currentRow);for(let Ae=this._activePages.length-1;Ae>=0;Ae--)for(const ot of this._activePages[Ae].fixedRows)ot.height<=We.height&&Qe.size.y<=ot.height&&(Ue=this._activePages[Ae],We=ot);if(We.y+Qe.size.y>=Ue.canvas.height||We.height>Qe.size.y+2){let Ae=!1;if(Ue.currentRow.y+Ue.currentRow.height+Qe.size.y>=Ue.canvas.height){let ot;for(const ct of this._activePages)if(ct.currentRow.y+ct.currentRow.height+Qe.size.y<ct.canvas.height){ot=ct;break}if(ot)Ue=ot;else if(g.maxAtlasPages&&this._pages.length>=g.maxAtlasPages&&We.y+Qe.size.y<=Ue.canvas.height&&We.height>=Qe.size.y&&We.x+Qe.size.x<=Ue.canvas.width)Ae=!0;else{const ct=this._createNewPage();Ue=ct,We=ct.currentRow,We.height=Qe.size.y,Ae=!0}}Ae||(Ue.currentRow.height>0&&Ue.fixedRows.push(Ue.currentRow),We={x:0,y:Ue.currentRow.y+Ue.currentRow.height,height:Qe.size.y},Ue.fixedRows.push(We),Ue.currentRow={x:0,y:We.y+We.height,height:0})}if(We.x+Qe.size.x<=Ue.canvas.width)break;We===Ue.currentRow?(We.x=0,We.y+=We.height,We.height=0):Ue.fixedRows.splice(Ue.fixedRows.indexOf(We),1)}return Qe.texturePage=this._pages.indexOf(Ue),Qe.texturePosition.x=We.x,Qe.texturePosition.y=We.y,Qe.texturePositionClipSpace.x=We.x/Ue.canvas.width,Qe.texturePositionClipSpace.y=We.y/Ue.canvas.height,Qe.sizeClipSpace.x/=Ue.canvas.width,Qe.sizeClipSpace.y/=Ue.canvas.height,We.height=Math.max(We.height,Qe.size.y),We.x+=Qe.size.x,Ue.ctx.putImageData(tr,Qe.texturePosition.x-this._workBoundingBox.left,Qe.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Qe.size.x,Qe.size.y),Ue.addGlyph(Qe),Ue.version++,Qe}_findGlyphBoundingBox(D,k,I,L,B,V){k.top=0;const X=L?this._config.deviceCellHeight:this._tmpCanvas.height,ee=L?this._config.deviceCellWidth:I;let Z=!1;for(let ie=0;ie<X;ie++){for(let P=0;P<ee;P++){const H=ie*this._tmpCanvas.width*4+4*P+3;if(D.data[H]!==0){k.top=ie,Z=!0;break}}if(Z)break}k.left=0,Z=!1;for(let ie=0;ie<V+ee;ie++){for(let P=0;P<X;P++){const H=P*this._tmpCanvas.width*4+4*ie+3;if(D.data[H]!==0){k.left=ie,Z=!0;break}}if(Z)break}k.right=ee,Z=!1;for(let ie=V+ee-1;ie>=V;ie--){for(let P=0;P<X;P++){const H=P*this._tmpCanvas.width*4+4*ie+3;if(D.data[H]!==0){k.right=ie,Z=!0;break}}if(Z)break}k.bottom=X,Z=!1;for(let ie=X-1;ie>=0;ie--){for(let P=0;P<ee;P++){const H=ie*this._tmpCanvas.width*4+4*P+3;if(D.data[H]!==0){k.bottom=ie,Z=!0;break}}if(Z)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:k.right-k.left+1,y:k.bottom-k.top+1},sizeClipSpace:{x:k.right-k.left+1,y:k.bottom-k.top+1},offset:{x:-k.left+V+(L||B?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-k.top+V+(L||B?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}a.TextureAtlas=g;class x{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(D){this._glyphs.push(D),this._usedPixels+=D.size.x*D.size.y}constructor(D,k,I){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],I)for(const L of I)this._glyphs.push(...L.glyphs),this._usedPixels+=L._usedPixels;this.canvas=N(D,k,k),this.ctx=(0,o.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function S(y,D,k,I){const L=D.rgba>>>24,B=D.rgba>>>16&255,V=D.rgba>>>8&255,X=k.rgba>>>24,ee=k.rgba>>>16&255,Z=k.rgba>>>8&255,ie=Math.floor((Math.abs(L-X)+Math.abs(B-ee)+Math.abs(V-Z))/12);let P=!0;for(let H=0;H<y.data.length;H+=4)y.data[H]===L&&y.data[H+1]===B&&y.data[H+2]===V||I&&Math.abs(y.data[H]-L)+Math.abs(y.data[H+1]-B)+Math.abs(y.data[H+2]-V)<ie?y.data[H+3]=0:P=!1;return P}function N(y,D,k){const I=y.createElement("canvas");return I.width=D,I.height=k,I}},160:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let h=0,p=0,m=0,o=0;var v,_,E,d,s;function u(c){const g=c.toString(16);return g.length<2?"0"+g:g}function l(c,g){return c<g?(g+.05)/(c+.05):(c+.05)/(g+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(c){c.toCss=function(g,x,S,N){return N!==void 0?`#${u(g)}${u(x)}${u(S)}${u(N)}`:`#${u(g)}${u(x)}${u(S)}`},c.toRgba=function(g,x,S,N=255){return(g<<24|x<<16|S<<8|N)>>>0},c.toColor=function(g,x,S,N){return{css:c.toCss(g,x,S,N),rgba:c.toRgba(g,x,S,N)}}})(v||(a.channels=v={})),(function(c){function g(x,S){return o=Math.round(255*S),[h,p,m]=s.toChannels(x.rgba),{css:v.toCss(h,p,m,o),rgba:v.toRgba(h,p,m,o)}}c.blend=function(x,S){if(o=(255&S.rgba)/255,o===1)return{css:S.css,rgba:S.rgba};const N=S.rgba>>24&255,y=S.rgba>>16&255,D=S.rgba>>8&255,k=x.rgba>>24&255,I=x.rgba>>16&255,L=x.rgba>>8&255;return h=k+Math.round((N-k)*o),p=I+Math.round((y-I)*o),m=L+Math.round((D-L)*o),{css:v.toCss(h,p,m),rgba:v.toRgba(h,p,m)}},c.isOpaque=function(x){return(255&x.rgba)==255},c.ensureContrastRatio=function(x,S,N){const y=s.ensureContrastRatio(x.rgba,S.rgba,N);if(y)return v.toColor(y>>24&255,y>>16&255,y>>8&255)},c.opaque=function(x){const S=(255|x.rgba)>>>0;return[h,p,m]=s.toChannels(S),{css:v.toCss(h,p,m),rgba:S}},c.opacity=g,c.multiplyOpacity=function(x,S){return o=255&x.rgba,g(x,o*S/255)},c.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(_||(a.color=_={})),(function(c){let g,x;try{const S=document.createElement("canvas");S.width=1,S.height=1;const N=S.getContext("2d",{willReadFrequently:!0});N&&(g=N,g.globalCompositeOperation="copy",x=g.createLinearGradient(0,0,1,1))}catch{}c.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return h=parseInt(S.slice(1,2).repeat(2),16),p=parseInt(S.slice(2,3).repeat(2),16),m=parseInt(S.slice(3,4).repeat(2),16),v.toColor(h,p,m);case 5:return h=parseInt(S.slice(1,2).repeat(2),16),p=parseInt(S.slice(2,3).repeat(2),16),m=parseInt(S.slice(3,4).repeat(2),16),o=parseInt(S.slice(4,5).repeat(2),16),v.toColor(h,p,m,o);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const N=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(N)return h=parseInt(N[1]),p=parseInt(N[2]),m=parseInt(N[3]),o=Math.round(255*(N[5]===void 0?1:parseFloat(N[5]))),v.toColor(h,p,m,o);if(!g||!x)throw new Error("css.toColor: Unsupported css format");if(g.fillStyle=x,g.fillStyle=S,typeof g.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(g.fillRect(0,0,1,1),[h,p,m,o]=g.getImageData(0,0,1,1).data,o!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:v.toRgba(h,p,m,o),css:S}}})(E||(a.css=E={})),(function(c){function g(x,S,N){const y=x/255,D=S/255,k=N/255;return .2126*(y<=.03928?y/12.92:Math.pow((y+.055)/1.055,2.4))+.7152*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.0722*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))}c.relativeLuminance=function(x){return g(x>>16&255,x>>8&255,255&x)},c.relativeLuminance2=g})(d||(a.rgb=d={})),(function(c){function g(S,N,y){const D=S>>24&255,k=S>>16&255,I=S>>8&255;let L=N>>24&255,B=N>>16&255,V=N>>8&255,X=l(d.relativeLuminance2(L,B,V),d.relativeLuminance2(D,k,I));for(;X<y&&(L>0||B>0||V>0);)L-=Math.max(0,Math.ceil(.1*L)),B-=Math.max(0,Math.ceil(.1*B)),V-=Math.max(0,Math.ceil(.1*V)),X=l(d.relativeLuminance2(L,B,V),d.relativeLuminance2(D,k,I));return(L<<24|B<<16|V<<8|255)>>>0}function x(S,N,y){const D=S>>24&255,k=S>>16&255,I=S>>8&255;let L=N>>24&255,B=N>>16&255,V=N>>8&255,X=l(d.relativeLuminance2(L,B,V),d.relativeLuminance2(D,k,I));for(;X<y&&(L<255||B<255||V<255);)L=Math.min(255,L+Math.ceil(.1*(255-L))),B=Math.min(255,B+Math.ceil(.1*(255-B))),V=Math.min(255,V+Math.ceil(.1*(255-V))),X=l(d.relativeLuminance2(L,B,V),d.relativeLuminance2(D,k,I));return(L<<24|B<<16|V<<8|255)>>>0}c.blend=function(S,N){if(o=(255&N)/255,o===1)return N;const y=N>>24&255,D=N>>16&255,k=N>>8&255,I=S>>24&255,L=S>>16&255,B=S>>8&255;return h=I+Math.round((y-I)*o),p=L+Math.round((D-L)*o),m=B+Math.round((k-B)*o),v.toRgba(h,p,m)},c.ensureContrastRatio=function(S,N,y){const D=d.relativeLuminance(S>>8),k=d.relativeLuminance(N>>8);if(l(D,k)<y){if(k<D){const B=g(S,N,y),V=l(D,d.relativeLuminance(B>>8));if(V<y){const X=x(S,N,y);return V>l(D,d.relativeLuminance(X>>8))?B:X}return B}const I=x(S,N,y),L=l(D,d.relativeLuminance(I>>8));if(L<y){const B=g(S,N,y);return L>l(D,d.relativeLuminance(B>>8))?I:B}return I}},c.reduceLuminance=g,c.increaseLuminance=x,c.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}})(s||(a.rgba=s={})),a.toPaddedHex=u,a.contrastRatio=l},345:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let p=0;p<this._listeners.length;p++)if(this._listeners[p]===h)return void this._listeners.splice(p,1)}}})),this._event}fire(h,p){const m=[];for(let o=0;o<this._listeners.length;o++)m.push(this._listeners[o]);for(let o=0;o<m.length;o++)m[o].call(void 0,h,p)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(h,p){return h((m=>p.fire(m)))},a.runAndSubscribe=function(h,p){return p(void 0),h((m=>p(m)))}},859:(R,a)=>{function h(p){for(const m of p)m.dispose();p.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const p of this._disposables)p.dispose();this._disposables.length=0}register(p){return this._disposables.push(p),p}unregister(p){const m=this._disposables.indexOf(p);m!==-1&&this._disposables.splice(m,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(p){var m;this._isDisposed||p===this._value||((m=this._value)==null||m.dispose(),this._value=p)}clear(){this.value=void 0}dispose(){var p;this._isDisposed=!0,(p=this._value)==null||p.dispose(),this._value=void 0}},a.toDisposable=function(p){return{dispose:p}},a.disposeArray=h,a.getDisposeArrayDisposable=function(p){return{dispose:()=>h(p)}}},485:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class h{constructor(){this._data={}}set(m,o,v){this._data[m]||(this._data[m]={}),this._data[m][o]=v}get(m,o){return this._data[m]?this._data[m][o]:void 0}clear(){this._data={}}}a.TwoKeyMap=h,a.FourKeyMap=class{constructor(){this._data=new h}set(p,m,o,v,_){this._data.get(p,m)||this._data.set(p,m,new h),this._data.get(p,m).set(o,v,_)}get(p,m,o,v){var _;return(_=this._data.get(p,m))==null?void 0:_.get(o,v)}clear(){this._data.clear()}}},399:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const h=a.isNode?"node":navigator.userAgent,p=a.isNode?"node":navigator.platform;a.isFirefox=h.includes("Firefox"),a.isLegacyEdge=h.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(h),a.getSafariVersion=function(){if(!a.isSafari)return 0;const m=h.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(p),a.isIpad=p==="iPad",a.isIphone=p==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(p),a.isLinux=p.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(h)},385:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const p=h(399);class m{constructor(){this._tasks=[],this._i=0}enqueue(_){this._tasks.push(_),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(_){this._idleCallback=void 0;let E=0,d=0,s=_.timeRemaining(),u=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),d=Math.max(E,d),u=_.timeRemaining(),1.5*d>u)return s-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s-E))}ms`),void this._start();s=u}this.clear()}}class o extends m{_requestCallback(_){return setTimeout((()=>_(this._createDeadline(16))))}_cancelCallback(_){clearTimeout(_)}_createDeadline(_){const E=Date.now()+_;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}a.PriorityTaskQueue=o,a.IdleTaskQueue=!p.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(v){return requestIdleCallback(v)}_cancelCallback(v){cancelIdleCallback(v)}}:o,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(v){this._queue.clear(),this._queue.enqueue(v)}flush(){this._queue.flush()}}},147:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class h{constructor(){this.fg=0,this.bg=0,this.extended=new p}static toColorRGB(o){return[o>>>16&255,o>>>8&255,255&o]}static fromColorRGB(o){return(255&o[0])<<16|(255&o[1])<<8|255&o[2]}clone(){const o=new h;return o.fg=this.fg,o.bg=this.bg,o.extended=this.extended.clone(),o}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=h;class p{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(o){this._ext=o}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(o){this._ext&=-469762049,this._ext|=o<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(o){this._ext&=-67108864,this._ext|=67108863&o}get urlId(){return this._urlId}set urlId(o){this._urlId=o}get underlineVariantOffset(){const o=(3758096384&this._ext)>>29;return o<0?4294967288^o:o}set underlineVariantOffset(o){this._ext&=536870911,this._ext|=o<<29&3758096384}constructor(o=0,v=0){this._ext=0,this._urlId=0,this._ext=o,this._urlId=v}clone(){return new p(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=p},782:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const p=h(133),m=h(855),o=h(147);class v extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const d=new v;return d.setFromCharData(E),d}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,p.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(E){this.fg=E[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let d=!1;if(E[m.CHAR_DATA_CHAR_INDEX].length>2)d=!0;else if(E[m.CHAR_DATA_CHAR_INDEX].length===2){const s=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=s&&s<=56319){const u=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=u&&u<=57343?this.content=1024*(s-55296)+u-56320+65536|E[m.CHAR_DATA_WIDTH_INDEX]<<22:d=!0}else d=!0}else this.content=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[m.CHAR_DATA_WIDTH_INDEX]<<22;d&&(this.combinedData=E[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=v},855:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},133:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},a.utf32ToString=function(h,p=0,m=h.length){let o="";for(let v=p;v<m;++v){let _=h[v];_>65535?(_-=65536,o+=String.fromCharCode(55296+(_>>10))+String.fromCharCode(_%1024+56320)):o+=String.fromCharCode(_)}return o},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(h,p){const m=h.length;if(!m)return 0;let o=0,v=0;if(this._interim){const _=h.charCodeAt(v++);56320<=_&&_<=57343?p[o++]=1024*(this._interim-55296)+_-56320+65536:(p[o++]=this._interim,p[o++]=_),this._interim=0}for(let _=v;_<m;++_){const E=h.charCodeAt(_);if(55296<=E&&E<=56319){if(++_>=m)return this._interim=E,o;const d=h.charCodeAt(_);56320<=d&&d<=57343?p[o++]=1024*(E-55296)+d-56320+65536:(p[o++]=E,p[o++]=d)}else E!==65279&&(p[o++]=E)}return o}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(h,p){const m=h.length;if(!m)return 0;let o,v,_,E,d=0,s=0,u=0;if(this.interim[0]){let g=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let S,N=0;for(;(S=63&this.interim[++N])&&N<4;)x<<=6,x|=S;const y=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,D=y-N;for(;u<D;){if(u>=m)return 0;if(S=h[u++],(192&S)!=128){u--,g=!0;break}this.interim[N++]=S,x<<=6,x|=63&S}g||(y===2?x<128?u--:p[d++]=x:y===3?x<2048||x>=55296&&x<=57343||x===65279||(p[d++]=x):x<65536||x>1114111||(p[d++]=x)),this.interim.fill(0)}const l=m-4;let c=u;for(;c<m;){for(;!(!(c<l)||128&(o=h[c])||128&(v=h[c+1])||128&(_=h[c+2])||128&(E=h[c+3]));)p[d++]=o,p[d++]=v,p[d++]=_,p[d++]=E,c+=4;if(o=h[c++],o<128)p[d++]=o;else if((224&o)==192){if(c>=m)return this.interim[0]=o,d;if(v=h[c++],(192&v)!=128){c--;continue}if(s=(31&o)<<6|63&v,s<128){c--;continue}p[d++]=s}else if((240&o)==224){if(c>=m)return this.interim[0]=o,d;if(v=h[c++],(192&v)!=128){c--;continue}if(c>=m)return this.interim[0]=o,this.interim[1]=v,d;if(_=h[c++],(192&_)!=128){c--;continue}if(s=(15&o)<<12|(63&v)<<6|63&_,s<2048||s>=55296&&s<=57343||s===65279)continue;p[d++]=s}else if((248&o)==240){if(c>=m)return this.interim[0]=o,d;if(v=h[c++],(192&v)!=128){c--;continue}if(c>=m)return this.interim[0]=o,this.interim[1]=v,d;if(_=h[c++],(192&_)!=128){c--;continue}if(c>=m)return this.interim[0]=o,this.interim[1]=v,this.interim[2]=_,d;if(E=h[c++],(192&E)!=128){c--;continue}if(s=(7&o)<<18|(63&v)<<12|(63&_)<<6|63&E,s<65536||s>1114111)continue;p[d++]=s}}return d}}},776:function(R,a,h){var p=this&&this.__decorate||function(s,u,l,c){var g,x=arguments.length,S=x<3?u:c===null?c=Object.getOwnPropertyDescriptor(u,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(s,u,l,c);else for(var N=s.length-1;N>=0;N--)(g=s[N])&&(S=(x<3?g(S):x>3?g(u,l,S):g(u,l))||S);return x>3&&S&&Object.defineProperty(u,l,S),S},m=this&&this.__param||function(s,u){return function(l,c){u(l,c,s)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const o=h(859),v=h(97),_={trace:v.LogLevelEnum.TRACE,debug:v.LogLevelEnum.DEBUG,info:v.LogLevelEnum.INFO,warn:v.LogLevelEnum.WARN,error:v.LogLevelEnum.ERROR,off:v.LogLevelEnum.OFF};let E,d=a.LogService=class extends o.Disposable{get logLevel(){return this._logLevel}constructor(s){super(),this._optionsService=s,this._logLevel=v.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),E=this}_updateLogLevel(){this._logLevel=_[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(s){for(let u=0;u<s.length;u++)typeof s[u]=="function"&&(s[u]=s[u]())}_log(s,u,l){this._evalLazyOptionalParams(l),s.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+u,...l)}trace(s,...u){var l;this._logLevel<=v.LogLevelEnum.TRACE&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.trace.bind(this._optionsService.options.logger))??console.log,s,u)}debug(s,...u){var l;this._logLevel<=v.LogLevelEnum.DEBUG&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.debug.bind(this._optionsService.options.logger))??console.log,s,u)}info(s,...u){var l;this._logLevel<=v.LogLevelEnum.INFO&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.info.bind(this._optionsService.options.logger))??console.info,s,u)}warn(s,...u){var l;this._logLevel<=v.LogLevelEnum.WARN&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.warn.bind(this._optionsService.options.logger))??console.warn,s,u)}error(s,...u){var l;this._logLevel<=v.LogLevelEnum.ERROR&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.error.bind(this._optionsService.options.logger))??console.error,s,u)}};a.LogService=d=p([m(0,v.IOptionsService)],d),a.setTraceLogger=function(s){E=s},a.traceCall=function(s,u,l){if(typeof l.value!="function")throw new Error("not supported");const c=l.value;l.value=function(...g){if(E.logLevel!==v.LogLevelEnum.TRACE)return c.apply(this,g);E.trace(`GlyphRenderer#${c.name}(${g.map((S=>JSON.stringify(S))).join(", ")})`);const x=c.apply(this,g);return E.trace(`GlyphRenderer#${c.name} return`,x),x}}},726:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const h="di$target",p="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(m){return m[p]||[]},a.createDecorator=function(m){if(a.serviceRegistry.has(m))return a.serviceRegistry.get(m);const o=function(v,_,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(d,s,u){s[h]===s?s[p].push({id:d,index:u}):(s[p]=[{id:d,index:u}],s[h]=s)})(o,v,E)};return o.toString=()=>m,a.serviceRegistry.set(m,o),o}},97:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const p=h(726);var m;a.IBufferService=(0,p.createDecorator)("BufferService"),a.ICoreMouseService=(0,p.createDecorator)("CoreMouseService"),a.ICoreService=(0,p.createDecorator)("CoreService"),a.ICharsetService=(0,p.createDecorator)("CharsetService"),a.IInstantiationService=(0,p.createDecorator)("InstantiationService"),(function(o){o[o.TRACE=0]="TRACE",o[o.DEBUG=1]="DEBUG",o[o.INFO=2]="INFO",o[o.WARN=3]="WARN",o[o.ERROR=4]="ERROR",o[o.OFF=5]="OFF"})(m||(a.LogLevelEnum=m={})),a.ILogService=(0,p.createDecorator)("LogService"),a.IOptionsService=(0,p.createDecorator)("OptionsService"),a.IOscLinkService=(0,p.createDecorator)("OscLinkService"),a.IUnicodeService=(0,p.createDecorator)("UnicodeService"),a.IDecorationService=(0,p.createDecorator)("DecorationService")}},F={};function U(R){var a=F[R];if(a!==void 0)return a.exports;var h=F[R]={exports:{}};return O[R].call(h.exports,h,h.exports,U),h.exports}var J={};return(()=>{var R=J;Object.defineProperty(R,"__esModule",{value:!0}),R.WebglAddon=void 0;const a=U(345),h=U(859),p=U(399),m=U(666),o=U(776);class v extends h.Disposable{constructor(E){if(p.isSafari&&(0,p.getSafariVersion)()<16){const d={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",d))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=E,this._onChangeTextureAtlas=this.register(new a.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new a.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new a.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new a.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(E){const d=E._core;if(!E.element)return void this.register(d.onWillOpen((()=>this.activate(E))));this._terminal=E;const s=d.coreService,u=d.optionsService,l=d,c=l._renderService,g=l._characterJoinerService,x=l._charSizeService,S=l._coreBrowserService,N=l._decorationService,y=l._logService,D=l._themeService;(0,o.setTraceLogger)(y),this._renderer=this.register(new m.WebglRenderer(E,g,x,S,s,N,u,D,this._preserveDrawingBuffer)),this.register((0,a.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,a.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,a.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,a.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),c.setRenderer(this._renderer),this.register((0,h.toDisposable)((()=>{const k=this._terminal._core._renderService;k.setRenderer(this._terminal._core._createRenderer()),k.handleResize(E.cols,E.rows)})))}get textureAtlas(){var E;return(E=this._renderer)==null?void 0:E.textureAtlas}clearTextureAtlas(){var E;(E=this._renderer)==null||E.clearTextureAtlas()}}R.WebglAddon=v})(),J})()))})(Bv)),Bv.exports}var GA=qA(),Pv={exports:{}},k0;function YA(){return k0||(k0=1,(function(w,b){(function(O,F){w.exports=F()})(globalThis,(()=>(()=>{var O={4567:function(R,a,h){var p=this&&this.__decorate||function(l,c,g,x){var S,N=arguments.length,y=N<3?c:x===null?x=Object.getOwnPropertyDescriptor(c,g):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(l,c,g,x);else for(var D=l.length-1;D>=0;D--)(S=l[D])&&(y=(N<3?S(y):N>3?S(c,g,y):S(c,g))||y);return N>3&&y&&Object.defineProperty(c,g,y),y},m=this&&this.__param||function(l,c){return function(g,x){c(g,x,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const o=h(9042),v=h(9924),_=h(844),E=h(4725),d=h(2585),s=h(3656);let u=a.AccessibilityManager=class extends _.Disposable{constructor(l,c,g,x){super(),this._terminal=l,this._coreBrowserService=g,this._renderService=x,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let S=0;S<this._terminal.rows;S++)this._rowElements[S]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[S]);if(this._topBoundaryFocusListener=S=>this._handleBoundaryFocus(S,0),this._bottomBoundaryFocusListener=S=>this._handleBoundaryFocus(S,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new v.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((S=>this._handleResize(S.rows)))),this.register(this._terminal.onRender((S=>this._refreshRows(S.start,S.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((S=>this._handleChar(S)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
266
+ `)))),this.register(this._terminal.onA11yTab((S=>this._handleTab(S)))),this.register(this._terminal.onKey((S=>this._handleKey(S.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,s.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,_.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(l){for(let c=0;c<l;c++)this._handleChar(" ")}_handleChar(l){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==l&&(this._charsToAnnounce+=l):this._charsToAnnounce+=l,l===`
267
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=o.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(l){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(l)||this._charsToConsume.push(l)}_refreshRows(l,c){this._liveRegionDebouncer.refresh(l,c,this._terminal.rows)}_renderRows(l,c){const g=this._terminal.buffer,x=g.lines.length.toString();for(let S=l;S<=c;S++){const N=g.lines.get(g.ydisp+S),y=[],D=(N==null?void 0:N.translateToString(!0,void 0,void 0,y))||"",k=(g.ydisp+S+1).toString(),I=this._rowElements[S];I&&(D.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=D,this._rowColumns.set(I,y)),I.setAttribute("aria-posinset",k),I.setAttribute("aria-setsize",x))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(l,c){const g=l.target,x=this._rowElements[c===0?1:this._rowElements.length-2];if(g.getAttribute("aria-posinset")===(c===0?"1":`${this._terminal.buffer.lines.length}`)||l.relatedTarget!==x)return;let S,N;if(c===0?(S=g,N=this._rowElements.pop(),this._rowContainer.removeChild(N)):(S=this._rowElements.shift(),N=g,this._rowContainer.removeChild(S)),S.removeEventListener("focus",this._topBoundaryFocusListener),N.removeEventListener("focus",this._bottomBoundaryFocusListener),c===0){const y=this._createAccessibilityTreeNode();this._rowElements.unshift(y),this._rowContainer.insertAdjacentElement("afterbegin",y)}else{const y=this._createAccessibilityTreeNode();this._rowElements.push(y),this._rowContainer.appendChild(y)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(c===0?-1:1),this._rowElements[c===0?1:this._rowElements.length-2].focus(),l.preventDefault(),l.stopImmediatePropagation()}_handleSelectionChange(){var D;if(this._rowElements.length===0)return;const l=document.getSelection();if(!l)return;if(l.isCollapsed)return void(this._rowContainer.contains(l.anchorNode)&&this._terminal.clearSelection());if(!l.anchorNode||!l.focusNode)return void console.error("anchorNode and/or focusNode are null");let c={node:l.anchorNode,offset:l.anchorOffset},g={node:l.focusNode,offset:l.focusOffset};if((c.node.compareDocumentPosition(g.node)&Node.DOCUMENT_POSITION_PRECEDING||c.node===g.node&&c.offset>g.offset)&&([c,g]=[g,c]),c.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(c={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(c.node))return;const x=this._rowElements.slice(-1)[0];if(g.node.compareDocumentPosition(x)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(g={node:x,offset:((D=x.textContent)==null?void 0:D.length)??0}),!this._rowContainer.contains(g.node))return;const S=({node:k,offset:I})=>{const L=k instanceof Text?k.parentNode:k;let B=parseInt(L==null?void 0:L.getAttribute("aria-posinset"),10)-1;if(isNaN(B))return console.warn("row is invalid. Race condition?"),null;const V=this._rowColumns.get(L);if(!V)return console.warn("columns is null. Race condition?"),null;let X=I<V.length?V[I]:V.slice(-1)[0]+1;return X>=this._terminal.cols&&(++B,X=0),{row:B,column:X}},N=S(c),y=S(g);if(N&&y){if(N.row>y.row||N.row===y.row&&N.column>=y.column)throw new Error("invalid range");this._terminal.select(N.column,N.row,(y.row-N.row)*this._terminal.cols-N.column+y.column)}}_handleResize(l){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let c=this._rowContainer.children.length;c<this._terminal.rows;c++)this._rowElements[c]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[c]);for(;this._rowElements.length>l;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const l=this._coreBrowserService.mainDocument.createElement("div");return l.setAttribute("role","listitem"),l.tabIndex=-1,this._refreshRowDimensions(l),l}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let l=0;l<this._terminal.rows;l++)this._refreshRowDimensions(this._rowElements[l])}}_refreshRowDimensions(l){l.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=u=p([m(1,d.IInstantiationService),m(2,E.ICoreBrowserService),m(3,E.IRenderService)],u)},3614:(R,a)=>{function h(v){return v.replace(/\r?\n/g,"\r")}function p(v,_){return _?"\x1B[200~"+v+"\x1B[201~":v}function m(v,_,E,d){v=p(v=h(v),E.decPrivateModes.bracketedPasteMode&&d.rawOptions.ignoreBracketedPasteMode!==!0),E.triggerDataEvent(v,!0),_.value=""}function o(v,_,E){const d=E.getBoundingClientRect(),s=v.clientX-d.left-10,u=v.clientY-d.top-10;_.style.width="20px",_.style.height="20px",_.style.left=`${s}px`,_.style.top=`${u}px`,_.style.zIndex="1000",_.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=h,a.bracketTextForPaste=p,a.copyHandler=function(v,_){v.clipboardData&&v.clipboardData.setData("text/plain",_.selectionText),v.preventDefault()},a.handlePasteEvent=function(v,_,E,d){v.stopPropagation(),v.clipboardData&&m(v.clipboardData.getData("text/plain"),_,E,d)},a.paste=m,a.moveTextAreaUnderMouseCursor=o,a.rightClickHandler=function(v,_,E,d,s){o(v,_,E),s&&d.rightClickSelect(v),_.value=d.selectionText,_.select()}},7239:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const p=h(1505);a.ColorContrastCache=class{constructor(){this._color=new p.TwoKeyMap,this._css=new p.TwoKeyMap}setCss(m,o,v){this._css.set(m,o,v)}getCss(m,o){return this._css.get(m,o)}setColor(m,o,v){this._color.set(m,o,v)}getColor(m,o){return this._color.get(m,o)}clear(){this._color.clear(),this._css.clear()}}},3656:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(h,p,m,o){h.addEventListener(p,m,o);let v=!1;return{dispose:()=>{v||(v=!0,h.removeEventListener(p,m,o))}}}},3551:function(R,a,h){var p=this&&this.__decorate||function(u,l,c,g){var x,S=arguments.length,N=S<3?l:g===null?g=Object.getOwnPropertyDescriptor(l,c):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(u,l,c,g);else for(var y=u.length-1;y>=0;y--)(x=u[y])&&(N=(S<3?x(N):S>3?x(l,c,N):x(l,c))||N);return S>3&&N&&Object.defineProperty(l,c,N),N},m=this&&this.__param||function(u,l){return function(c,g){l(c,g,u)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const o=h(3656),v=h(8460),_=h(844),E=h(2585),d=h(4725);let s=a.Linkifier=class extends _.Disposable{get currentLink(){return this._currentLink}constructor(u,l,c,g,x){super(),this._element=u,this._mouseService=l,this._renderService=c,this._bufferService=g,this._linkProviderService=x,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new v.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new v.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,_.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,_.toDisposable)((()=>{var S;this._lastMouseEvent=void 0,(S=this._activeProviderReplies)==null||S.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,o.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,o.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(u){this._lastMouseEvent=u;const l=this._positionFromMouseEvent(u,this._element,this._mouseService);if(!l)return;this._isMouseOut=!1;const c=u.composedPath();for(let g=0;g<c.length;g++){const x=c[g];if(x.classList.contains("xterm"))break;if(x.classList.contains("xterm-hover"))return}this._lastBufferCell&&l.x===this._lastBufferCell.x&&l.y===this._lastBufferCell.y||(this._handleHover(l),this._lastBufferCell=l)}_handleHover(u){if(this._activeLine!==u.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(u,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,u)||(this._clearCurrentLink(),this._askForLink(u,!0))}_askForLink(u,l){var g,x;this._activeProviderReplies&&l||((g=this._activeProviderReplies)==null||g.forEach((S=>{S==null||S.forEach((N=>{N.link.dispose&&N.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=u.y);let c=!1;for(const[S,N]of this._linkProviderService.linkProviders.entries())l?(x=this._activeProviderReplies)!=null&&x.get(S)&&(c=this._checkLinkProviderResult(S,u,c)):N.provideLinks(u.y,(y=>{var k,I;if(this._isMouseOut)return;const D=y==null?void 0:y.map((L=>({link:L})));(k=this._activeProviderReplies)==null||k.set(S,D),c=this._checkLinkProviderResult(S,u,c),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(u.y,this._activeProviderReplies)}))}_removeIntersectingLinks(u,l){const c=new Set;for(let g=0;g<l.size;g++){const x=l.get(g);if(x)for(let S=0;S<x.length;S++){const N=x[S],y=N.link.range.start.y<u?0:N.link.range.start.x,D=N.link.range.end.y>u?this._bufferService.cols:N.link.range.end.x;for(let k=y;k<=D;k++){if(c.has(k)){x.splice(S--,1);break}c.add(k)}}}}_checkLinkProviderResult(u,l,c){var S;if(!this._activeProviderReplies)return c;const g=this._activeProviderReplies.get(u);let x=!1;for(let N=0;N<u;N++)this._activeProviderReplies.has(N)&&!this._activeProviderReplies.get(N)||(x=!0);if(!x&&g){const N=g.find((y=>this._linkAtPosition(y.link,l)));N&&(c=!0,this._handleNewLink(N))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!c)for(let N=0;N<this._activeProviderReplies.size;N++){const y=(S=this._activeProviderReplies.get(N))==null?void 0:S.find((D=>this._linkAtPosition(D.link,l)));if(y){c=!0,this._handleNewLink(y);break}}return c}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(u){if(!this._currentLink)return;const l=this._positionFromMouseEvent(u,this._element,this._mouseService);l&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,l)&&this._currentLink.link.activate(u,this._currentLink.link.text)}_clearCurrentLink(u,l){this._currentLink&&this._lastMouseEvent&&(!u||!l||this._currentLink.link.range.start.y>=u&&this._currentLink.link.range.end.y<=l)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,_.disposeArray)(this._linkCacheDisposables))}_handleNewLink(u){if(!this._lastMouseEvent)return;const l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(u.link,l)&&(this._currentLink=u,this._currentLink.state={decorations:{underline:u.link.decorations===void 0||u.link.decorations.underline,pointerCursor:u.link.decorations===void 0||u.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,u.link,this._lastMouseEvent),u.link.decorations={},Object.defineProperties(u.link.decorations,{pointerCursor:{get:()=>{var c,g;return(g=(c=this._currentLink)==null?void 0:c.state)==null?void 0:g.decorations.pointerCursor},set:c=>{var g;(g=this._currentLink)!=null&&g.state&&this._currentLink.state.decorations.pointerCursor!==c&&(this._currentLink.state.decorations.pointerCursor=c,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",c))}},underline:{get:()=>{var c,g;return(g=(c=this._currentLink)==null?void 0:c.state)==null?void 0:g.decorations.underline},set:c=>{var g,x,S;(g=this._currentLink)!=null&&g.state&&((S=(x=this._currentLink)==null?void 0:x.state)==null?void 0:S.decorations.underline)!==c&&(this._currentLink.state.decorations.underline=c,this._currentLink.state.isHovered&&this._fireUnderlineEvent(u.link,c))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((c=>{if(!this._currentLink)return;const g=c.start===0?0:c.start+1+this._bufferService.buffer.ydisp,x=this._bufferService.buffer.ydisp+1+c.end;if(this._currentLink.link.range.start.y>=g&&this._currentLink.link.range.end.y<=x&&(this._clearCurrentLink(g,x),this._lastMouseEvent)){const S=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);S&&this._askForLink(S,!1)}}))))}_linkHover(u,l,c){var g;(g=this._currentLink)!=null&&g.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(l,!0),this._currentLink.state.decorations.pointerCursor&&u.classList.add("xterm-cursor-pointer")),l.hover&&l.hover(c,l.text)}_fireUnderlineEvent(u,l){const c=u.range,g=this._bufferService.buffer.ydisp,x=this._createLinkUnderlineEvent(c.start.x-1,c.start.y-g-1,c.end.x,c.end.y-g-1,void 0);(l?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(x)}_linkLeave(u,l,c){var g;(g=this._currentLink)!=null&&g.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(l,!1),this._currentLink.state.decorations.pointerCursor&&u.classList.remove("xterm-cursor-pointer")),l.leave&&l.leave(c,l.text)}_linkAtPosition(u,l){const c=u.range.start.y*this._bufferService.cols+u.range.start.x,g=u.range.end.y*this._bufferService.cols+u.range.end.x,x=l.y*this._bufferService.cols+l.x;return c<=x&&x<=g}_positionFromMouseEvent(u,l,c){const g=c.getCoords(u,l,this._bufferService.cols,this._bufferService.rows);if(g)return{x:g[0],y:g[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(u,l,c,g,x){return{x1:u,y1:l,x2:c,y2:g,cols:this._bufferService.cols,fg:x}}};a.Linkifier=s=p([m(1,d.IMouseService),m(2,d.IRenderService),m(3,E.IBufferService),m(4,d.ILinkProviderService)],s)},9042:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(R,a,h){var p=this&&this.__decorate||function(d,s,u,l){var c,g=arguments.length,x=g<3?s:l===null?l=Object.getOwnPropertyDescriptor(s,u):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(d,s,u,l);else for(var S=d.length-1;S>=0;S--)(c=d[S])&&(x=(g<3?c(x):g>3?c(s,u,x):c(s,u))||x);return g>3&&x&&Object.defineProperty(s,u,x),x},m=this&&this.__param||function(d,s){return function(u,l){s(u,l,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const o=h(511),v=h(2585);let _=a.OscLinkProvider=class{constructor(d,s,u){this._bufferService=d,this._optionsService=s,this._oscLinkService=u}provideLinks(d,s){var D;const u=this._bufferService.buffer.lines.get(d-1);if(!u)return void s(void 0);const l=[],c=this._optionsService.rawOptions.linkHandler,g=new o.CellData,x=u.getTrimmedLength();let S=-1,N=-1,y=!1;for(let k=0;k<x;k++)if(N!==-1||u.hasContent(k)){if(u.loadCell(k,g),g.hasExtendedAttrs()&&g.extended.urlId){if(N===-1){N=k,S=g.extended.urlId;continue}y=g.extended.urlId!==S}else N!==-1&&(y=!0);if(y||N!==-1&&k===x-1){const I=(D=this._oscLinkService.getLinkData(S))==null?void 0:D.uri;if(I){const L={start:{x:N+1,y:d},end:{x:k+(y||k!==x-1?0:1),y:d}};let B=!1;if(!(c!=null&&c.allowNonHttpProtocols))try{const V=new URL(I);["http:","https:"].includes(V.protocol)||(B=!0)}catch{B=!0}B||l.push({text:I,range:L,activate:(V,X)=>c?c.activate(V,X,L):E(0,X),hover:(V,X)=>{var ee;return(ee=c==null?void 0:c.hover)==null?void 0:ee.call(c,V,X,L)},leave:(V,X)=>{var ee;return(ee=c==null?void 0:c.leave)==null?void 0:ee.call(c,V,X,L)}})}y=!1,g.hasExtendedAttrs()&&g.extended.urlId?(N=k,S=g.extended.urlId):(N=-1,S=-1)}}s(l)}};function E(d,s){if(confirm(`Do you want to navigate to ${s}?
268
+
269
+ WARNING: This link could potentially be dangerous`)){const u=window.open();if(u){try{u.opener=null}catch{}u.location.href=s}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=_=p([m(0,v.IBufferService),m(1,v.IOptionsService),m(2,v.IOscLinkService)],_)},6193:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(h,p){this._renderCallback=h,this._coreBrowserService=p,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(h){return this._refreshCallbacks.push(h),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(h,p,m){this._rowCount=m,h=h!==void 0?h:0,p=p!==void 0?p:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,p):p,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const h=Math.max(this._rowStart,0),p=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,p),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const h of this._refreshCallbacks)h(0);this._refreshCallbacks=[]}}},3236:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const p=h(3614),m=h(3656),o=h(3551),v=h(9042),_=h(3730),E=h(1680),d=h(3107),s=h(5744),u=h(2950),l=h(1296),c=h(428),g=h(4269),x=h(5114),S=h(8934),N=h(3230),y=h(9312),D=h(4725),k=h(6731),I=h(8055),L=h(8969),B=h(8460),V=h(844),X=h(6114),ee=h(8437),Z=h(2584),ie=h(7399),P=h(5941),H=h(9074),q=h(2585),Y=h(5435),re=h(4567),ae=h(779);class ve extends L.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(Q={}){super(Q),this.browser=X,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new V.MutableDisposable),this._onCursorMove=this.register(new B.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new B.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new B.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new B.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new B.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new B.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new B.EventEmitter),this._onBlur=this.register(new B.EventEmitter),this._onA11yCharEmitter=this.register(new B.EventEmitter),this._onA11yTabEmitter=this.register(new B.EventEmitter),this._onWillOpen=this.register(new B.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(H.DecorationService),this._instantiationService.setService(q.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ae.LinkProviderService),this._instantiationService.setService(D.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(_.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows((($,he)=>this.refresh($,he)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport(($=>this._reportWindowsOptions($)))),this.register(this._inputHandler.onColor(($=>this._handleColorEvent($)))),this.register((0,B.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,B.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(($=>this._afterResize($.cols,$.rows)))),this.register((0,V.toDisposable)((()=>{var $,he;this._customKeyEventHandler=void 0,(he=($=this.element)==null?void 0:$.parentNode)==null||he.removeChild(this.element)})))}_handleColorEvent(Q){if(this._themeService)for(const $ of Q){let he,ce="";switch($.index){case 256:he="foreground",ce="10";break;case 257:he="background",ce="11";break;case 258:he="cursor",ce="12";break;default:he="ansi",ce="4;"+$.index}switch($.type){case 0:const De=I.color.toColorRGB(he==="ansi"?this._themeService.colors.ansi[$.index]:this._themeService.colors[he]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${ce};${(0,P.toRgbString)(De)}${Z.C1_ESCAPED.ST}`);break;case 1:if(he==="ansi")this._themeService.modifyColors((Ee=>Ee.ansi[$.index]=I.channels.toColor(...$.color)));else{const Ee=he;this._themeService.modifyColors((He=>He[Ee]=I.channels.toColor(...$.color)))}break;case 2:this._themeService.restoreColor($.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Q){Q?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(re.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Q){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var Q;return(Q=this.textarea)==null?void 0:Q.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.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 Q=this.buffer.ybase+this.buffer.y,$=this.buffer.lines.get(Q);if(!$)return;const he=Math.min(this.buffer.x,this.cols-1),ce=this._renderService.dimensions.css.cell.height,De=$.getWidth(he),Ee=this._renderService.dimensions.css.cell.width*De,He=this.buffer.y*this._renderService.dimensions.css.cell.height,Fe=he*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Fe+"px",this.textarea.style.top=He+"px",this.textarea.style.width=Ee+"px",this.textarea.style.height=ce+"px",this.textarea.style.lineHeight=ce+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",($=>{this.hasSelection()&&(0,p.copyHandler)($,this._selectionService)})));const Q=$=>(0,p.handlePasteEvent)($,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",Q)),this.register((0,m.addDisposableDomListener)(this.element,"paste",Q)),X.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",($=>{$.button===2&&(0,p.rightClickHandler)($,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",($=>{(0,p.rightClickHandler)($,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),X.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",($=>{$.button===1&&(0,p.moveTextAreaUnderMouseCursor)($,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",(Q=>this._keyUp(Q)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",(Q=>this._keyDown(Q)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",(Q=>this._keyPress(Q)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",(Q=>this._compositionHelper.compositionupdate(Q)))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,m.addDisposableDomListener)(this.textarea,"input",(Q=>this._inputEvent(Q)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Q){var he;if(!Q)throw new Error("Terminal requires a parent element.");if(Q.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((he=this.element)==null?void 0:he.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Q.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),Q.appendChild(this.element);const $=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),$.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,m.addDisposableDomListener)(this.screenElement,"mousemove",(ce=>this.updateCursorStyle(ce)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),$.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",v.promptLabel),X.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(x.CoreBrowserService,this.textarea,Q.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(D.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",(ce=>this._handleTextAreaFocus(ce)))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(c.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(D.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(k.ThemeService),this._instantiationService.setService(D.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(g.CharacterJoinerService),this._instantiationService.setService(D.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(N.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(D.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ce=>this._onRender.fire(ce)))),this.onResize((ce=>this._renderService.resize(ce.cols,ce.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(u.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(S.MouseService),this._instantiationService.setService(D.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(o.Linkifier,this.screenElement)),this.element.appendChild($);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(E.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ce=>this.scrollLines(ce.amount,ce.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(y.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(D.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ce=>this.scrollLines(ce.amount,ce.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ce=>this._renderService.handleSelectionChanged(ce.start,ce.end,ce.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ce=>{this.textarea.value=ce,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ce=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(d.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(ce=>this._selectionService.handleMouseDown(ce)))),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(re.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ce=>this._handleScreenReaderModeOptionChange(ce)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(s.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ce=>{!this._overviewRulerRenderer&&ce&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(s.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(l.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const Q=this,$=this.element;function he(Ee){const He=Q._mouseService.getMouseReportCoords(Ee,Q.screenElement);if(!He)return!1;let Fe,Ge;switch(Ee.overrideType||Ee.type){case"mousemove":Ge=32,Ee.buttons===void 0?(Fe=3,Ee.button!==void 0&&(Fe=Ee.button<3?Ee.button:3)):Fe=1&Ee.buttons?0:4&Ee.buttons?1:2&Ee.buttons?2:3;break;case"mouseup":Ge=0,Fe=Ee.button<3?Ee.button:3;break;case"mousedown":Ge=1,Fe=Ee.button<3?Ee.button:3;break;case"wheel":if(Q._customWheelEventHandler&&Q._customWheelEventHandler(Ee)===!1||Q.viewport.getLinesScrolled(Ee)===0)return!1;Ge=Ee.deltaY<0?0:1,Fe=4;break;default:return!1}return!(Ge===void 0||Fe===void 0||Fe>4)&&Q.coreMouseService.triggerMouseEvent({col:He.col,row:He.row,x:He.x,y:He.y,button:Fe,action:Ge,ctrl:Ee.ctrlKey,alt:Ee.altKey,shift:Ee.shiftKey})}const ce={mouseup:null,wheel:null,mousedrag:null,mousemove:null},De={mouseup:Ee=>(he(Ee),Ee.buttons||(this._document.removeEventListener("mouseup",ce.mouseup),ce.mousedrag&&this._document.removeEventListener("mousemove",ce.mousedrag)),this.cancel(Ee)),wheel:Ee=>(he(Ee),this.cancel(Ee,!0)),mousedrag:Ee=>{Ee.buttons&&he(Ee)},mousemove:Ee=>{Ee.buttons||he(Ee)}};this.register(this.coreMouseService.onProtocolChange((Ee=>{Ee?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Ee)),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&Ee?ce.mousemove||($.addEventListener("mousemove",De.mousemove),ce.mousemove=De.mousemove):($.removeEventListener("mousemove",ce.mousemove),ce.mousemove=null),16&Ee?ce.wheel||($.addEventListener("wheel",De.wheel,{passive:!1}),ce.wheel=De.wheel):($.removeEventListener("wheel",ce.wheel),ce.wheel=null),2&Ee?ce.mouseup||(ce.mouseup=De.mouseup):(this._document.removeEventListener("mouseup",ce.mouseup),ce.mouseup=null),4&Ee?ce.mousedrag||(ce.mousedrag=De.mousedrag):(this._document.removeEventListener("mousemove",ce.mousedrag),ce.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)($,"mousedown",(Ee=>{if(Ee.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Ee))return he(Ee),ce.mouseup&&this._document.addEventListener("mouseup",ce.mouseup),ce.mousedrag&&this._document.addEventListener("mousemove",ce.mousedrag),this.cancel(Ee)}))),this.register((0,m.addDisposableDomListener)($,"wheel",(Ee=>{if(!ce.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Ee)===!1)return!1;if(!this.buffer.hasScrollback){const He=this.viewport.getLinesScrolled(Ee);if(He===0)return;const Fe=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Ee.deltaY<0?"A":"B");let Ge="";for(let at=0;at<Math.abs(He);at++)Ge+=Fe;return this.coreService.triggerDataEvent(Ge,!0),this.cancel(Ee,!0)}return this.viewport.handleWheel(Ee)?this.cancel(Ee):void 0}}),{passive:!1})),this.register((0,m.addDisposableDomListener)($,"touchstart",(Ee=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Ee),this.cancel(Ee)}),{passive:!0})),this.register((0,m.addDisposableDomListener)($,"touchmove",(Ee=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Ee)?void 0:this.cancel(Ee)}),{passive:!1}))}refresh(Q,$){var he;(he=this._renderService)==null||he.refreshRows(Q,$)}updateCursorStyle(Q){var $;($=this._selectionService)!=null&&$.shouldColumnSelect(Q)?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(Q,$,he=0){var ce;he===1?(super.scrollLines(Q,$,he),this.refresh(0,this.rows-1)):(ce=this.viewport)==null||ce.scrollLines(Q)}paste(Q){(0,p.paste)(Q,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Q){this._customKeyEventHandler=Q}attachCustomWheelEventHandler(Q){this._customWheelEventHandler=Q}registerLinkProvider(Q){return this._linkProviderService.registerLinkProvider(Q)}registerCharacterJoiner(Q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const $=this._characterJoinerService.register(Q);return this.refresh(0,this.rows-1),$}deregisterCharacterJoiner(Q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Q)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Q){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Q)}registerDecoration(Q){return this._decorationService.registerDecoration(Q)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Q,$,he){this._selectionService.setSelection(Q,$,he)}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 Q;(Q=this._selectionService)==null||Q.clearSelection()}selectAll(){var Q;(Q=this._selectionService)==null||Q.selectAll()}selectLines(Q,$){var he;(he=this._selectionService)==null||he.selectLines(Q,$)}_keyDown(Q){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1)return!1;const $=this.browser.isMac&&this.options.macOptionIsMeta&&Q.altKey;if(!$&&!this._compositionHelper.keydown(Q))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;$||Q.key!=="Dead"&&Q.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const he=(0,ie.evaluateKeyboardEvent)(Q,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Q),he.type===3||he.type===2){const ce=this.rows-1;return this.scrollLines(he.type===2?-ce:ce),this.cancel(Q,!0)}return he.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Q)||(he.cancel&&this.cancel(Q,!0),!he.key||!!(Q.key&&!Q.ctrlKey&&!Q.altKey&&!Q.metaKey&&Q.key.length===1&&Q.key.charCodeAt(0)>=65&&Q.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(he.key!==Z.C0.ETX&&he.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:he.key,domEvent:Q}),this._showCursor(),this.coreService.triggerDataEvent(he.key,!0),!this.optionsService.rawOptions.screenReaderMode||Q.altKey||Q.ctrlKey?this.cancel(Q,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Q,$){const he=Q.isMac&&!this.options.macOptionIsMeta&&$.altKey&&!$.ctrlKey&&!$.metaKey||Q.isWindows&&$.altKey&&$.ctrlKey&&!$.metaKey||Q.isWindows&&$.getModifierState("AltGraph");return $.type==="keypress"?he:he&&(!$.keyCode||$.keyCode>47)}_keyUp(Q){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1||((function($){return $.keyCode===16||$.keyCode===17||$.keyCode===18})(Q)||this.focus(),this.updateCursorStyle(Q),this._keyPressHandled=!1)}_keyPress(Q){let $;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1)return!1;if(this.cancel(Q),Q.charCode)$=Q.charCode;else if(Q.which===null||Q.which===void 0)$=Q.keyCode;else{if(Q.which===0||Q.charCode===0)return!1;$=Q.which}return!(!$||(Q.altKey||Q.ctrlKey||Q.metaKey)&&!this._isThirdLevelShift(this.browser,Q)||($=String.fromCharCode($),this._onKey.fire({key:$,domEvent:Q}),this._showCursor(),this.coreService.triggerDataEvent($,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Q){if(Q.data&&Q.inputType==="insertText"&&(!Q.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const $=Q.data;return this.coreService.triggerDataEvent($,!0),this.cancel(Q),!0}return!1}resize(Q,$){Q!==this.cols||$!==this.rows?super.resize(Q,$):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Q,$){var he,ce;(he=this._charSizeService)==null||he.measure(),(ce=this.viewport)==null||ce.syncScrollArea(!0)}clear(){var Q;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 $=1;$<this.rows;$++)this.buffer.lines.push(this.buffer.getBlankLine(ee.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(Q=this.viewport)==null||Q.reset(),this.refresh(0,this.rows-1)}}reset(){var $,he;this.options.rows=this.rows,this.options.cols=this.cols;const Q=this._customKeyEventHandler;this._setup(),super.reset(),($=this._selectionService)==null||$.reset(),this._decorationService.reset(),(he=this.viewport)==null||he.reset(),this._customKeyEventHandler=Q,this.refresh(0,this.rows-1)}clearTextureAtlas(){var Q;(Q=this._renderService)==null||Q.clearTextureAtlas()}_reportFocus(){var Q;(Q=this.element)!=null&&Q.classList.contains("focus")?this.coreService.triggerDataEvent(Z.C0.ESC+"[I"):this.coreService.triggerDataEvent(Z.C0.ESC+"[O")}_reportWindowsOptions(Q){if(this._renderService)switch(Q){case Y.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const $=this._renderService.dimensions.css.canvas.width.toFixed(0),he=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Z.C0.ESC}[4;${he};${$}t`);break;case Y.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ce=this._renderService.dimensions.css.cell.width.toFixed(0),De=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Z.C0.ESC}[6;${De};${ce}t`)}}cancel(Q,$){if(this.options.cancelEvents||$)return Q.preventDefault(),Q.stopPropagation(),!1}}a.Terminal=ve},9924:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(h,p=1e3){this._renderCallback=h,this._debounceThresholdMS=p,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(h,p,m){this._rowCount=m,h=h!==void 0?h:0,p=p!==void 0?p:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,p):p;const o=Date.now();if(o-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=o,this._innerRefresh();else if(!this._additionalRefreshRequested){const v=o-this._lastRefreshMs,_=this._debounceThresholdMS-v;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),_)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const h=Math.max(this._rowStart,0),p=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,p)}}},1680:function(R,a,h){var p=this&&this.__decorate||function(u,l,c,g){var x,S=arguments.length,N=S<3?l:g===null?g=Object.getOwnPropertyDescriptor(l,c):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(u,l,c,g);else for(var y=u.length-1;y>=0;y--)(x=u[y])&&(N=(S<3?x(N):S>3?x(l,c,N):x(l,c))||N);return S>3&&N&&Object.defineProperty(l,c,N),N},m=this&&this.__param||function(u,l){return function(c,g){l(c,g,u)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const o=h(3656),v=h(4725),_=h(8460),E=h(844),d=h(2585);let s=a.Viewport=class extends E.Disposable{constructor(u,l,c,g,x,S,N,y){super(),this._viewportElement=u,this._scrollArea=l,this._bufferService=c,this._optionsService=g,this._charSizeService=x,this._renderService=S,this._coreBrowserService=N,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 _.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,o.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((D=>this._activeBuffer=D.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((D=>this._renderDimensions=D))),this._handleThemeChange(y.colors),this.register(y.onChangeColors((D=>this._handleThemeChange(D)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(u){this._viewportElement.style.backgroundColor=u.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(u){if(u)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const l=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==l&&(this._lastRecordedBufferHeight=l,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const u=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==u&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=u),this._refreshAnimationFrame=null}syncScrollArea(u=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(u);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(u)}_handleScroll(u){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 l=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:l,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const u=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(u*(this._smoothScrollState.target-this._smoothScrollState.origin)),u<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(u,l){const c=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(l<0&&this._viewportElement.scrollTop!==0||l>0&&c<this._lastRecordedBufferHeight)||(u.cancelable&&u.preventDefault(),!1)}handleWheel(u){const l=this._getPixelsScrolled(u);return l!==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+l:this._smoothScrollState.target+=l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=l,this._bubbleScroll(u,l))}scrollLines(u){if(u!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const l=u*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:u,suppressScrollEvent:!1})}_getPixelsScrolled(u){if(u.deltaY===0||u.shiftKey)return 0;let l=this._applyScrollModifier(u.deltaY,u);return u.deltaMode===WheelEvent.DOM_DELTA_LINE?l*=this._currentRowHeight:u.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._currentRowHeight*this._bufferService.rows),l}getBufferElements(u,l){var y;let c,g="";const x=[],S=l??this._bufferService.buffer.lines.length,N=this._bufferService.buffer.lines;for(let D=u;D<S;D++){const k=N.get(D);if(!k)continue;const I=(y=N.get(D+1))==null?void 0:y.isWrapped;if(g+=k.translateToString(!I),!I||D===N.length-1){const L=document.createElement("div");L.textContent=g,x.push(L),g.length>0&&(c=L),g=""}}return{bufferElements:x,cursorElement:c}}getLinesScrolled(u){if(u.deltaY===0||u.shiftKey)return 0;let l=this._applyScrollModifier(u.deltaY,u);return u.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(l/=this._currentRowHeight+0,this._wheelPartialScroll+=l,l=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):u.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._bufferService.rows),l}_applyScrollModifier(u,l){const c=this._optionsService.rawOptions.fastScrollModifier;return c==="alt"&&l.altKey||c==="ctrl"&&l.ctrlKey||c==="shift"&&l.shiftKey?u*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:u*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(u){this._lastTouchY=u.touches[0].pageY}handleTouchMove(u){const l=this._lastTouchY-u.touches[0].pageY;return this._lastTouchY=u.touches[0].pageY,l!==0&&(this._viewportElement.scrollTop+=l,this._bubbleScroll(u,l))}};a.Viewport=s=p([m(2,d.IBufferService),m(3,d.IOptionsService),m(4,v.ICharSizeService),m(5,v.IRenderService),m(6,v.ICoreBrowserService),m(7,v.IThemeService)],s)},3107:function(R,a,h){var p=this&&this.__decorate||function(d,s,u,l){var c,g=arguments.length,x=g<3?s:l===null?l=Object.getOwnPropertyDescriptor(s,u):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(d,s,u,l);else for(var S=d.length-1;S>=0;S--)(c=d[S])&&(x=(g<3?c(x):g>3?c(s,u,x):c(s,u))||x);return g>3&&x&&Object.defineProperty(s,u,x),x},m=this&&this.__param||function(d,s){return function(u,l){s(u,l,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const o=h(4725),v=h(844),_=h(2585);let E=a.BufferDecorationRenderer=class extends v.Disposable{constructor(d,s,u,l,c){super(),this._screenElement=d,this._bufferService=s,this._coreBrowserService=u,this._decorationService=l,this._renderService=c,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((g=>this._removeDecoration(g)))),this.register((0,v.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 d of this._decorationService.decorations)this._renderDecoration(d);this._dimensionsChanged=!1}_renderDecoration(d){this._refreshStyle(d),this._dimensionsChanged&&this._refreshXPosition(d)}_createElement(d){var l;const s=this._coreBrowserService.mainDocument.createElement("div");s.classList.add("xterm-decoration"),s.classList.toggle("xterm-decoration-top-layer",((l=d==null?void 0:d.options)==null?void 0:l.layer)==="top"),s.style.width=`${Math.round((d.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,s.style.height=(d.options.height||1)*this._renderService.dimensions.css.cell.height+"px",s.style.top=(d.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",s.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const u=d.options.x??0;return u&&u>this._bufferService.cols&&(s.style.display="none"),this._refreshXPosition(d,s),s}_refreshStyle(d){const s=d.marker.line-this._bufferService.buffers.active.ydisp;if(s<0||s>=this._bufferService.rows)d.element&&(d.element.style.display="none",d.onRenderEmitter.fire(d.element));else{let u=this._decorationElements.get(d);u||(u=this._createElement(d),d.element=u,this._decorationElements.set(d,u),this._container.appendChild(u),d.onDispose((()=>{this._decorationElements.delete(d),u.remove()}))),u.style.top=s*this._renderService.dimensions.css.cell.height+"px",u.style.display=this._altBufferIsActive?"none":"block",d.onRenderEmitter.fire(u)}}_refreshXPosition(d,s=d.element){if(!s)return;const u=d.options.x??0;(d.options.anchor||"left")==="right"?s.style.right=u?u*this._renderService.dimensions.css.cell.width+"px":"":s.style.left=u?u*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(d){var s;(s=this._decorationElements.get(d))==null||s.remove(),this._decorationElements.delete(d),d.dispose()}};a.BufferDecorationRenderer=E=p([m(1,_.IBufferService),m(2,o.ICoreBrowserService),m(3,_.IDecorationService),m(4,o.IRenderService)],E)},5871:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.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(h){if(h.options.overviewRulerOptions){for(const p of this._zones)if(p.color===h.options.overviewRulerOptions.color&&p.position===h.options.overviewRulerOptions.position){if(this._lineIntersectsZone(p,h.marker.line))return;if(this._lineAdjacentToZone(p,h.marker.line,h.options.overviewRulerOptions.position))return void this._addLineToZone(p,h.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=h.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=h.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=h.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=h.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:h.options.overviewRulerOptions.color,position:h.options.overviewRulerOptions.position,startBufferLine:h.marker.line,endBufferLine:h.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(h){this._linePadding=h}_lineIntersectsZone(h,p){return p>=h.startBufferLine&&p<=h.endBufferLine}_lineAdjacentToZone(h,p,m){return p>=h.startBufferLine-this._linePadding[m||"full"]&&p<=h.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(h,p){h.startBufferLine=Math.min(h.startBufferLine,p),h.endBufferLine=Math.max(h.endBufferLine,p)}}},5744:function(R,a,h){var p=this&&this.__decorate||function(c,g,x,S){var N,y=arguments.length,D=y<3?g:S===null?S=Object.getOwnPropertyDescriptor(g,x):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(c,g,x,S);else for(var k=c.length-1;k>=0;k--)(N=c[k])&&(D=(y<3?N(D):y>3?N(g,x,D):N(g,x))||D);return y>3&&D&&Object.defineProperty(g,x,D),D},m=this&&this.__param||function(c,g){return function(x,S){g(x,S,c)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const o=h(5871),v=h(4725),_=h(844),E=h(2585),d={full:0,left:0,center:0,right:0},s={full:0,left:0,center:0,right:0},u={full:0,left:0,center:0,right:0};let l=a.OverviewRulerRenderer=class extends _.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(c,g,x,S,N,y,D){var I;super(),this._viewportElement=c,this._screenElement=g,this._bufferService=x,this._decorationService=S,this._renderService=N,this._optionsService=y,this._coreBrowserService=D,this._colorZoneStore=new o.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(I=this._viewportElement.parentElement)==null||I.insertBefore(this._canvas,this._viewportElement);const k=this._canvas.getContext("2d");if(!k)throw new Error("Ctx cannot be null");this._ctx=k,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,_.toDisposable)((()=>{var L;(L=this._canvas)==null||L.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const c=Math.floor(this._canvas.width/3),g=Math.ceil(this._canvas.width/3);s.full=this._canvas.width,s.left=c,s.center=g,s.right=c,this._refreshDrawHeightConstants(),u.full=0,u.left=0,u.center=s.left,u.right=s.left+s.center}_refreshDrawHeightConstants(){d.full=Math.round(2*this._coreBrowserService.dpr);const c=this._canvas.height/this._bufferService.buffer.lines.length,g=Math.round(Math.max(Math.min(c,12),6)*this._coreBrowserService.dpr);d.left=g,d.center=g,d.right=g}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*d.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*d.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*d.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*d.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const g of this._decorationService.decorations)this._colorZoneStore.addDecoration(g);this._ctx.lineWidth=1;const c=this._colorZoneStore.zones;for(const g of c)g.position!=="full"&&this._renderColorZone(g);for(const g of c)g.position==="full"&&this._renderColorZone(g);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(c){this._ctx.fillStyle=c.color,this._ctx.fillRect(u[c.position||"full"],Math.round((this._canvas.height-1)*(c.startBufferLine/this._bufferService.buffers.active.lines.length)-d[c.position||"full"]/2),s[c.position||"full"],Math.round((this._canvas.height-1)*((c.endBufferLine-c.startBufferLine)/this._bufferService.buffers.active.lines.length)+d[c.position||"full"]))}_queueRefresh(c,g){this._shouldUpdateDimensions=c||this._shouldUpdateDimensions,this._shouldUpdateAnchor=g||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=l=p([m(2,E.IBufferService),m(3,E.IDecorationService),m(4,v.IRenderService),m(5,E.IOptionsService),m(6,v.ICoreBrowserService)],l)},2950:function(R,a,h){var p=this&&this.__decorate||function(d,s,u,l){var c,g=arguments.length,x=g<3?s:l===null?l=Object.getOwnPropertyDescriptor(s,u):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(d,s,u,l);else for(var S=d.length-1;S>=0;S--)(c=d[S])&&(x=(g<3?c(x):g>3?c(s,u,x):c(s,u))||x);return g>3&&x&&Object.defineProperty(s,u,x),x},m=this&&this.__param||function(d,s){return function(u,l){s(u,l,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const o=h(4725),v=h(2585),_=h(2584);let E=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(d,s,u,l,c,g){this._textarea=d,this._compositionView=s,this._bufferService=u,this._optionsService=l,this._coreService=c,this._renderService=g,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(d){this._compositionView.textContent=d.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(d){if(this._isComposing||this._isSendingComposition){if(d.keyCode===229||d.keyCode===16||d.keyCode===17||d.keyCode===18)return!1;this._finalizeComposition(!1)}return d.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(d){if(this._compositionView.classList.remove("active"),this._isComposing=!1,d){const s={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let u;this._isSendingComposition=!1,s.start+=this._dataAlreadySent.length,u=this._isComposing?this._textarea.value.substring(s.start,s.end):this._textarea.value.substring(s.start),u.length>0&&this._coreService.triggerDataEvent(u,!0)}}),0)}else{this._isSendingComposition=!1;const s=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(s,!0)}}_handleAnyTextareaChanges(){const d=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const s=this._textarea.value,u=s.replace(d,"");this._dataAlreadySent=u,s.length>d.length?this._coreService.triggerDataEvent(u,!0):s.length<d.length?this._coreService.triggerDataEvent(`${_.C0.DEL}`,!0):s.length===d.length&&s!==d&&this._coreService.triggerDataEvent(s,!0)}}),0)}updateCompositionElements(d){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const s=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),u=this._renderService.dimensions.css.cell.height,l=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,c=s*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=c+"px",this._compositionView.style.top=l+"px",this._compositionView.style.height=u+"px",this._compositionView.style.lineHeight=u+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const g=this._compositionView.getBoundingClientRect();this._textarea.style.left=c+"px",this._textarea.style.top=l+"px",this._textarea.style.width=Math.max(g.width,1)+"px",this._textarea.style.height=Math.max(g.height,1)+"px",this._textarea.style.lineHeight=g.height+"px"}d||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=E=p([m(2,v.IBufferService),m(3,v.IOptionsService),m(4,v.ICoreService),m(5,o.IRenderService)],E)},9806:(R,a)=>{function h(p,m,o){const v=o.getBoundingClientRect(),_=p.getComputedStyle(o),E=parseInt(_.getPropertyValue("padding-left")),d=parseInt(_.getPropertyValue("padding-top"));return[m.clientX-v.left-E,m.clientY-v.top-d]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=h,a.getCoords=function(p,m,o,v,_,E,d,s,u){if(!E)return;const l=h(p,m,o);return l?(l[0]=Math.ceil((l[0]+(u?d/2:0))/d),l[1]=Math.ceil(l[1]/s),l[0]=Math.min(Math.max(l[0],1),v+(u?1:0)),l[1]=Math.min(Math.max(l[1],1),_),l):void 0}},9504:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const p=h(2584);function m(s,u,l,c){const g=s-o(s,l),x=u-o(u,l),S=Math.abs(g-x)-(function(N,y,D){let k=0;const I=N-o(N,D),L=y-o(y,D);for(let B=0;B<Math.abs(I-L);B++){const V=v(N,y)==="A"?-1:1,X=D.buffer.lines.get(I+V*B);X!=null&&X.isWrapped&&k++}return k})(s,u,l);return d(S,E(v(s,u),c))}function o(s,u){let l=0,c=u.buffer.lines.get(s),g=c==null?void 0:c.isWrapped;for(;g&&s>=0&&s<u.rows;)l++,c=u.buffer.lines.get(--s),g=c==null?void 0:c.isWrapped;return l}function v(s,u){return s>u?"A":"B"}function _(s,u,l,c,g,x){let S=s,N=u,y="";for(;S!==l||N!==c;)S+=g?1:-1,g&&S>x.cols-1?(y+=x.buffer.translateBufferLineToString(N,!1,s,S),S=0,s=0,N++):!g&&S<0&&(y+=x.buffer.translateBufferLineToString(N,!1,0,s+1),S=x.cols-1,s=S,N--);return y+x.buffer.translateBufferLineToString(N,!1,s,S)}function E(s,u){const l=u?"O":"[";return p.C0.ESC+l+s}function d(s,u){s=Math.floor(s);let l="";for(let c=0;c<s;c++)l+=u;return l}a.moveToCellSequence=function(s,u,l,c){const g=l.buffer.x,x=l.buffer.y;if(!l.buffer.hasScrollback)return(function(y,D,k,I,L,B){return m(D,I,L,B).length===0?"":d(_(y,D,y,D-o(D,L),!1,L).length,E("D",B))})(g,x,0,u,l,c)+m(x,u,l,c)+(function(y,D,k,I,L,B){let V;V=m(D,I,L,B).length>0?I-o(I,L):D;const X=I,ee=(function(Z,ie,P,H,q,Y){let re;return re=m(P,H,q,Y).length>0?H-o(H,q):ie,Z<P&&re<=H||Z>=P&&re<H?"C":"D"})(y,D,k,I,L,B);return d(_(y,V,k,X,ee==="C",L).length,E(ee,B))})(g,x,s,u,l,c);let S;if(x===u)return S=g>s?"D":"C",d(Math.abs(g-s),E(S,c));S=x>u?"D":"C";const N=Math.abs(x-u);return d((function(y,D){return D.cols-y})(x>u?s:g,l)+(N-1)*l.cols+1+((x>u?g:s)-1),E(S,c))}},1296:function(R,a,h){var p=this&&this.__decorate||function(B,V,X,ee){var Z,ie=arguments.length,P=ie<3?V:ee===null?ee=Object.getOwnPropertyDescriptor(V,X):ee;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(B,V,X,ee);else for(var H=B.length-1;H>=0;H--)(Z=B[H])&&(P=(ie<3?Z(P):ie>3?Z(V,X,P):Z(V,X))||P);return ie>3&&P&&Object.defineProperty(V,X,P),P},m=this&&this.__param||function(B,V){return function(X,ee){V(X,ee,B)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const o=h(3787),v=h(2550),_=h(2223),E=h(6171),d=h(6052),s=h(4725),u=h(8055),l=h(8460),c=h(844),g=h(2585),x="xterm-dom-renderer-owner-",S="xterm-rows",N="xterm-fg-",y="xterm-bg-",D="xterm-focus",k="xterm-selection";let I=1,L=a.DomRenderer=class extends c.Disposable{constructor(B,V,X,ee,Z,ie,P,H,q,Y,re,ae,ve){super(),this._terminal=B,this._document=V,this._element=X,this._screenElement=ee,this._viewportElement=Z,this._helperContainer=ie,this._linkifier2=P,this._charSizeService=q,this._optionsService=Y,this._bufferService=re,this._coreBrowserService=ae,this._themeService=ve,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,d.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new l.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(S),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(k),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,E.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ye=>this._injectCss(ye)))),this._injectCss(this._themeService.colors),this._rowFactory=H.createInstance(o.DomRendererRowFactory,document),this._element.classList.add(x+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ye=>this._handleLinkHover(ye)))),this.register(this._linkifier2.onHideLinkUnderline((ye=>this._handleLinkLeave(ye)))),this.register((0,c.toDisposable)((()=>{this._element.classList.remove(x+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new v.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const B=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*B,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*B),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/B),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/B),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 X of this._rowElements)X.style.width=`${this.dimensions.css.canvas.width}px`,X.style.height=`${this.dimensions.css.cell.height}px`,X.style.lineHeight=`${this.dimensions.css.cell.height}px`,X.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const V=`${this._terminalSelector} .${S} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=V,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(B){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let V=`${this._terminalSelector} .${S} { color: ${B.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;V+=`${this._terminalSelector} .${S} .xterm-dim { color: ${u.color.multiplyOpacity(B.foreground,.5).css};}`,V+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const X=`blink_underline_${this._terminalClass}`,ee=`blink_bar_${this._terminalClass}`,Z=`blink_block_${this._terminalClass}`;V+=`@keyframes ${X} { 50% { border-bottom-style: hidden; }}`,V+=`@keyframes ${ee} { 50% { box-shadow: none; }}`,V+=`@keyframes ${Z} { 0% { background-color: ${B.cursor.css}; color: ${B.cursorAccent.css}; } 50% { background-color: inherit; color: ${B.cursor.css}; }}`,V+=`${this._terminalSelector} .${S}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${S}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${ee} 1s step-end infinite;}${this._terminalSelector} .${S}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block { background-color: ${B.cursor.css}; color: ${B.cursorAccent.css};}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${B.cursor.css} !important; color: ${B.cursorAccent.css} !important;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${B.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${B.cursor.css} inset;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${B.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,V+=`${this._terminalSelector} .${k} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${k} div { position: absolute; background-color: ${B.selectionBackgroundOpaque.css};}${this._terminalSelector} .${k} div { position: absolute; background-color: ${B.selectionInactiveBackgroundOpaque.css};}`;for(const[ie,P]of B.ansi.entries())V+=`${this._terminalSelector} .${N}${ie} { color: ${P.css}; }${this._terminalSelector} .${N}${ie}.xterm-dim { color: ${u.color.multiplyOpacity(P,.5).css}; }${this._terminalSelector} .${y}${ie} { background-color: ${P.css}; }`;V+=`${this._terminalSelector} .${N}${_.INVERTED_DEFAULT_COLOR} { color: ${u.color.opaque(B.background).css}; }${this._terminalSelector} .${N}${_.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${u.color.multiplyOpacity(u.color.opaque(B.background),.5).css}; }${this._terminalSelector} .${y}${_.INVERTED_DEFAULT_COLOR} { background-color: ${B.foreground.css}; }`,this._themeStyleElement.textContent=V}_setDefaultSpacing(){const B=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${B}px`,this._rowFactory.defaultSpacing=B}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(B,V){for(let X=this._rowElements.length;X<=V;X++){const ee=this._document.createElement("div");this._rowContainer.appendChild(ee),this._rowElements.push(ee)}for(;this._rowElements.length>V;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(B,V){this._refreshRowElements(B,V),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(D),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(D),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(B,V,X){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(B,V,X),this.renderRows(0,this._bufferService.rows-1),!B||!V)return;this._selectionRenderModel.update(this._terminal,B,V,X);const ee=this._selectionRenderModel.viewportStartRow,Z=this._selectionRenderModel.viewportEndRow,ie=this._selectionRenderModel.viewportCappedStartRow,P=this._selectionRenderModel.viewportCappedEndRow;if(ie>=this._bufferService.rows||P<0)return;const H=this._document.createDocumentFragment();if(X){const q=B[0]>V[0];H.appendChild(this._createSelectionElement(ie,q?V[0]:B[0],q?B[0]:V[0],P-ie+1))}else{const q=ee===ie?B[0]:0,Y=ie===Z?V[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(ie,q,Y));const re=P-ie-1;if(H.appendChild(this._createSelectionElement(ie+1,0,this._bufferService.cols,re)),ie!==P){const ae=Z===P?V[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(P,0,ae))}}this._selectionContainer.appendChild(H)}_createSelectionElement(B,V,X,ee=1){const Z=this._document.createElement("div"),ie=V*this.dimensions.css.cell.width;let P=this.dimensions.css.cell.width*(X-V);return ie+P>this.dimensions.css.canvas.width&&(P=this.dimensions.css.canvas.width-ie),Z.style.height=ee*this.dimensions.css.cell.height+"px",Z.style.top=B*this.dimensions.css.cell.height+"px",Z.style.left=`${ie}px`,Z.style.width=`${P}px`,Z}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 B of this._rowElements)B.replaceChildren()}renderRows(B,V){const X=this._bufferService.buffer,ee=X.ybase+X.y,Z=Math.min(X.x,this._bufferService.cols-1),ie=this._optionsService.rawOptions.cursorBlink,P=this._optionsService.rawOptions.cursorStyle,H=this._optionsService.rawOptions.cursorInactiveStyle;for(let q=B;q<=V;q++){const Y=q+X.ydisp,re=this._rowElements[q],ae=X.lines.get(Y);if(!re||!ae)break;re.replaceChildren(...this._rowFactory.createRow(ae,Y,Y===ee,P,H,Z,ie,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${x}${this._terminalClass}`}_handleLinkHover(B){this._setCellUnderline(B.x1,B.x2,B.y1,B.y2,B.cols,!0)}_handleLinkLeave(B){this._setCellUnderline(B.x1,B.x2,B.y1,B.y2,B.cols,!1)}_setCellUnderline(B,V,X,ee,Z,ie){X<0&&(B=0),ee<0&&(V=0);const P=this._bufferService.rows-1;X=Math.max(Math.min(X,P),0),ee=Math.max(Math.min(ee,P),0),Z=Math.min(Z,this._bufferService.cols);const H=this._bufferService.buffer,q=H.ybase+H.y,Y=Math.min(H.x,Z-1),re=this._optionsService.rawOptions.cursorBlink,ae=this._optionsService.rawOptions.cursorStyle,ve=this._optionsService.rawOptions.cursorInactiveStyle;for(let ye=X;ye<=ee;++ye){const Q=ye+H.ydisp,$=this._rowElements[ye],he=H.lines.get(Q);if(!$||!he)break;$.replaceChildren(...this._rowFactory.createRow(he,Q,Q===q,ae,ve,Y,re,this.dimensions.css.cell.width,this._widthCache,ie?ye===X?B:0:-1,ie?(ye===ee?V:Z)-1:-1))}}};a.DomRenderer=L=p([m(7,g.IInstantiationService),m(8,s.ICharSizeService),m(9,g.IOptionsService),m(10,g.IBufferService),m(11,s.ICoreBrowserService),m(12,s.IThemeService)],L)},3787:function(R,a,h){var p=this&&this.__decorate||function(S,N,y,D){var k,I=arguments.length,L=I<3?N:D===null?D=Object.getOwnPropertyDescriptor(N,y):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(S,N,y,D);else for(var B=S.length-1;B>=0;B--)(k=S[B])&&(L=(I<3?k(L):I>3?k(N,y,L):k(N,y))||L);return I>3&&L&&Object.defineProperty(N,y,L),L},m=this&&this.__param||function(S,N){return function(y,D){N(y,D,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const o=h(2223),v=h(643),_=h(511),E=h(2585),d=h(8055),s=h(4725),u=h(4269),l=h(6171),c=h(3734);let g=a.DomRendererRowFactory=class{constructor(S,N,y,D,k,I,L){this._document=S,this._characterJoinerService=N,this._optionsService=y,this._coreBrowserService=D,this._coreService=k,this._decorationService=I,this._themeService=L,this._workCell=new _.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(S,N,y){this._selectionStart=S,this._selectionEnd=N,this._columnSelectMode=y}createRow(S,N,y,D,k,I,L,B,V,X,ee){const Z=[],ie=this._characterJoinerService.getJoinedCharacters(N),P=this._themeService.colors;let H,q=S.getNoBgTrimmedLength();y&&q<I+1&&(q=I+1);let Y=0,re="",ae=0,ve=0,ye=0,Q=!1,$=0,he=!1,ce=0;const De=[],Ee=X!==-1&&ee!==-1;for(let He=0;He<q;He++){S.loadCell(He,this._workCell);let Fe=this._workCell.getWidth();if(Fe===0)continue;let Ge=!1,at=He,Me=this._workCell;if(ie.length>0&&He===ie[0][0]){Ge=!0;const Re=ie.shift();Me=new u.JoinedCellData(this._workCell,S.translateToString(!0,Re[0],Re[1]),Re[1]-Re[0]),at=Re[1]-1,Fe=Me.getWidth()}const tr=this._isCellInSelection(He,N),nr=y&&He===I,Qe=Ee&&He>=X&&He<=ee;let Ue=!1;this._decorationService.forEachDecorationAtCell(He,N,void 0,(Re=>{Ue=!0}));let We=Me.getChars()||v.WHITESPACE_CELL_CHAR;if(We===" "&&(Me.isUnderline()||Me.isOverline())&&(We=" "),ce=Fe*B-V.get(We,Me.isBold(),Me.isItalic()),H){if(Y&&(tr&&he||!tr&&!he&&Me.bg===ae)&&(tr&&he&&P.selectionForeground||Me.fg===ve)&&Me.extended.ext===ye&&Qe===Q&&ce===$&&!nr&&!Ge&&!Ue){Me.isInvisible()?re+=v.WHITESPACE_CELL_CHAR:re+=We,Y++;continue}Y&&(H.textContent=re),H=this._document.createElement("span"),Y=0,re=""}else H=this._document.createElement("span");if(ae=Me.bg,ve=Me.fg,ye=Me.extended.ext,Q=Qe,$=ce,he=tr,Ge&&I>=He&&I<=at&&(I=He),!this._coreService.isCursorHidden&&nr&&this._coreService.isCursorInitialized){if(De.push("xterm-cursor"),this._coreBrowserService.isFocused)L&&De.push("xterm-cursor-blink"),De.push(D==="bar"?"xterm-cursor-bar":D==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(k)switch(k){case"outline":De.push("xterm-cursor-outline");break;case"block":De.push("xterm-cursor-block");break;case"bar":De.push("xterm-cursor-bar");break;case"underline":De.push("xterm-cursor-underline")}}if(Me.isBold()&&De.push("xterm-bold"),Me.isItalic()&&De.push("xterm-italic"),Me.isDim()&&De.push("xterm-dim"),re=Me.isInvisible()?v.WHITESPACE_CELL_CHAR:Me.getChars()||v.WHITESPACE_CELL_CHAR,Me.isUnderline()&&(De.push(`xterm-underline-${Me.extended.underlineStyle}`),re===" "&&(re=" "),!Me.isUnderlineColorDefault()))if(Me.isUnderlineColorRGB())H.style.textDecorationColor=`rgb(${c.AttributeData.toColorRGB(Me.getUnderlineColor()).join(",")})`;else{let Re=Me.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Me.isBold()&&Re<8&&(Re+=8),H.style.textDecorationColor=P.ansi[Re].css}Me.isOverline()&&(De.push("xterm-overline"),re===" "&&(re=" ")),Me.isStrikethrough()&&De.push("xterm-strikethrough"),Qe&&(H.style.textDecoration="underline");let Ae=Me.getFgColor(),ot=Me.getFgColorMode(),ct=Me.getBgColor(),ut=Me.getBgColorMode();const jt=!!Me.isInverse();if(jt){const Re=Ae;Ae=ct,ct=Re;const mt=ot;ot=ut,ut=mt}let Ht,Kt,Ce,ke=!1;switch(this._decorationService.forEachDecorationAtCell(He,N,void 0,(Re=>{Re.options.layer!=="top"&&ke||(Re.backgroundColorRGB&&(ut=50331648,ct=Re.backgroundColorRGB.rgba>>8&16777215,Ht=Re.backgroundColorRGB),Re.foregroundColorRGB&&(ot=50331648,Ae=Re.foregroundColorRGB.rgba>>8&16777215,Kt=Re.foregroundColorRGB),ke=Re.options.layer==="top")})),!ke&&tr&&(Ht=this._coreBrowserService.isFocused?P.selectionBackgroundOpaque:P.selectionInactiveBackgroundOpaque,ct=Ht.rgba>>8&16777215,ut=50331648,ke=!0,P.selectionForeground&&(ot=50331648,Ae=P.selectionForeground.rgba>>8&16777215,Kt=P.selectionForeground)),ke&&De.push("xterm-decoration-top"),ut){case 16777216:case 33554432:Ce=P.ansi[ct],De.push(`xterm-bg-${ct}`);break;case 50331648:Ce=d.channels.toColor(ct>>16,ct>>8&255,255&ct),this._addStyle(H,`background-color:#${x((ct>>>0).toString(16),"0",6)}`);break;default:jt?(Ce=P.foreground,De.push(`xterm-bg-${o.INVERTED_DEFAULT_COLOR}`)):Ce=P.background}switch(Ht||Me.isDim()&&(Ht=d.color.multiplyOpacity(Ce,.5)),ot){case 16777216:case 33554432:Me.isBold()&&Ae<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ae+=8),this._applyMinimumContrast(H,Ce,P.ansi[Ae],Me,Ht,void 0)||De.push(`xterm-fg-${Ae}`);break;case 50331648:const Re=d.channels.toColor(Ae>>16&255,Ae>>8&255,255&Ae);this._applyMinimumContrast(H,Ce,Re,Me,Ht,Kt)||this._addStyle(H,`color:#${x(Ae.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(H,Ce,P.foreground,Me,Ht,Kt)||jt&&De.push(`xterm-fg-${o.INVERTED_DEFAULT_COLOR}`)}De.length&&(H.className=De.join(" "),De.length=0),nr||Ge||Ue?H.textContent=re:Y++,ce!==this.defaultSpacing&&(H.style.letterSpacing=`${ce}px`),Z.push(H),He=at}return H&&Y&&(H.textContent=re),Z}_applyMinimumContrast(S,N,y,D,k,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,l.treatGlyphAsBackgroundColor)(D.getCode()))return!1;const L=this._getContrastCache(D);let B;if(k||I||(B=L.getColor(N.rgba,y.rgba)),B===void 0){const V=this._optionsService.rawOptions.minimumContrastRatio/(D.isDim()?2:1);B=d.color.ensureContrastRatio(k||N,I||y,V),L.setColor((k||N).rgba,(I||y).rgba,B??null)}return!!B&&(this._addStyle(S,`color:${B.css}`),!0)}_getContrastCache(S){return S.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(S,N){S.setAttribute("style",`${S.getAttribute("style")||""}${N};`)}_isCellInSelection(S,N){const y=this._selectionStart,D=this._selectionEnd;return!(!y||!D)&&(this._columnSelectMode?y[0]<=D[0]?S>=y[0]&&N>=y[1]&&S<D[0]&&N<=D[1]:S<y[0]&&N>=y[1]&&S>=D[0]&&N<=D[1]:N>y[1]&&N<D[1]||y[1]===D[1]&&N===y[1]&&S>=y[0]&&S<D[0]||y[1]<D[1]&&N===D[1]&&S<D[0]||y[1]<D[1]&&N===y[1]&&S>=y[0])}};function x(S,N,y){for(;S.length<y;)S=N+S;return S}a.DomRendererRowFactory=g=p([m(1,s.ICharacterJoinerService),m(2,E.IOptionsService),m(3,s.ICoreBrowserService),m(4,E.ICoreService),m(5,E.IDecorationService),m(6,s.IThemeService)],g)},2550:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(h,p){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=h.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const m=h.createElement("span");m.classList.add("xterm-char-measure-element");const o=h.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontWeight="bold";const v=h.createElement("span");v.classList.add("xterm-char-measure-element"),v.style.fontStyle="italic";const _=h.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontWeight="bold",_.style.fontStyle="italic",this._measureElements=[m,o,v,_],this._container.appendChild(m),this._container.appendChild(o),this._container.appendChild(v),this._container.appendChild(_),p.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(h,p,m,o){h===this._font&&p===this._fontSize&&m===this._weight&&o===this._weightBold||(this._font=h,this._fontSize=p,this._weight=m,this._weightBold=o,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${o}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${o}`,this.clear())}get(h,p,m){let o=0;if(!p&&!m&&h.length===1&&(o=h.charCodeAt(0))<256){if(this._flat[o]!==-9999)return this._flat[o];const E=this._measure(h,0);return E>0&&(this._flat[o]=E),E}let v=h;p&&(v+="B"),m&&(v+="I");let _=this._holey.get(v);if(_===void 0){let E=0;p&&(E|=1),m&&(E|=2),_=this._measure(h,E),_>0&&this._holey.set(v,_)}return _}_measure(h,p){const m=this._measureElements[p];return m.textContent=h.repeat(32),m.offsetWidth/32}}},2223:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const p=h(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=p.isFirefox||p.isLegacyEdge?"bottom":"ideographic"},6171:(R,a)=>{function h(m){return 57508<=m&&m<=57558}function p(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},a.isPowerlineGlyph=h,a.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},a.isEmoji=p,a.allowRescaling=function(m,o,v,_){return o===1&&v>Math.ceil(1.5*_)&&m!==void 0&&m>255&&!p(m)&&!h(m)&&!(function(E){return 57344<=E&&E<=63743})(m)},a.treatGlyphAsBackgroundColor=function(m){return h(m)||(function(o){return 9472<=o&&o<=9631})(m)},a.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}}}},a.computeNextVariantOffset=function(m,o,v=0){return(m-(2*Math.round(o)-v))%(2*Math.round(o))}},6052:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class h{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(m,o,v,_=!1){if(this.selectionStart=o,this.selectionEnd=v,!o||!v||o[0]===v[0]&&o[1]===v[1])return void this.clear();const E=m.buffers.active.ydisp,d=o[1]-E,s=v[1]-E,u=Math.max(d,0),l=Math.min(s,m.rows-1);u>=m.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=_,this.viewportStartRow=d,this.viewportEndRow=s,this.viewportCappedStartRow=u,this.viewportCappedEndRow=l,this.startCol=o[0],this.endCol=v[0])}isCellSelected(m,o,v){return!!this.hasSelection&&(v-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?o>=this.startCol&&v>=this.viewportCappedStartRow&&o<this.endCol&&v<=this.viewportCappedEndRow:o<this.startCol&&v>=this.viewportCappedStartRow&&o>=this.endCol&&v<=this.viewportCappedEndRow:v>this.viewportStartRow&&v<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&v===this.viewportStartRow&&o>=this.startCol&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&v===this.viewportEndRow&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&v===this.viewportStartRow&&o>=this.startCol)}}a.createSelectionRenderModel=function(){return new h}},456:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(h){this._bufferService=h,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 h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?h%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)-1]:[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[h,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[Math.max(h,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const h=this.selectionStart,p=this.selectionEnd;return!(!h||!p)&&(h[1]>p[1]||h[1]===p[1]&&h[0]>p[0])}handleTrim(h){return this.selectionStart&&(this.selectionStart[1]-=h),this.selectionEnd&&(this.selectionEnd[1]-=h),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(R,a,h){var p=this&&this.__decorate||function(l,c,g,x){var S,N=arguments.length,y=N<3?c:x===null?x=Object.getOwnPropertyDescriptor(c,g):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(l,c,g,x);else for(var D=l.length-1;D>=0;D--)(S=l[D])&&(y=(N<3?S(y):N>3?S(c,g,y):S(c,g))||y);return N>3&&y&&Object.defineProperty(c,g,y),y},m=this&&this.__param||function(l,c){return function(g,x){c(g,x,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const o=h(2585),v=h(8460),_=h(844);let E=a.CharSizeService=class extends _.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(l,c,g){super(),this._optionsService=g,this.width=0,this.height=0,this._onCharSizeChange=this.register(new v.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new u(this._optionsService))}catch{this._measureStrategy=this.register(new s(l,c,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const l=this._measureStrategy.measure();l.width===this.width&&l.height===this.height||(this.width=l.width,this.height=l.height,this._onCharSizeChange.fire())}};a.CharSizeService=E=p([m(2,o.IOptionsService)],E);class d extends _.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(c,g){c!==void 0&&c>0&&g!==void 0&&g>0&&(this._result.width=c,this._result.height=g)}}class s extends d{constructor(c,g,x){super(),this._document=c,this._parentElement=g,this._optionsService=x,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class u extends d{constructor(c){super(),this._optionsService=c,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const g=this._ctx.measureText("W");if(!("width"in g&&"fontBoundingBoxAscent"in g&&"fontBoundingBoxDescent"in g))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const c=this._ctx.measureText("W");return this._validateAndSet(c.width,c.fontBoundingBoxAscent+c.fontBoundingBoxDescent),this._result}}},4269:function(R,a,h){var p=this&&this.__decorate||function(u,l,c,g){var x,S=arguments.length,N=S<3?l:g===null?g=Object.getOwnPropertyDescriptor(l,c):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(u,l,c,g);else for(var y=u.length-1;y>=0;y--)(x=u[y])&&(N=(S<3?x(N):S>3?x(l,c,N):x(l,c))||N);return S>3&&N&&Object.defineProperty(l,c,N),N},m=this&&this.__param||function(u,l){return function(c,g){l(c,g,u)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const o=h(3734),v=h(643),_=h(511),E=h(2585);class d extends o.AttributeData{constructor(l,c,g){super(),this.content=0,this.combinedData="",this.fg=l.fg,this.bg=l.bg,this.combinedData=c,this._width=g}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(l){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=d;let s=a.CharacterJoinerService=class oS{constructor(l){this._bufferService=l,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new _.CellData}register(l){const c={id:this._nextCharacterJoinerId++,handler:l};return this._characterJoiners.push(c),c.id}deregister(l){for(let c=0;c<this._characterJoiners.length;c++)if(this._characterJoiners[c].id===l)return this._characterJoiners.splice(c,1),!0;return!1}getJoinedCharacters(l){if(this._characterJoiners.length===0)return[];const c=this._bufferService.buffer.lines.get(l);if(!c||c.length===0)return[];const g=[],x=c.translateToString(!0);let S=0,N=0,y=0,D=c.getFg(0),k=c.getBg(0);for(let I=0;I<c.getTrimmedLength();I++)if(c.loadCell(I,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==D||this._workCell.bg!==k){if(I-S>1){const L=this._getJoinedRanges(x,y,N,c,S);for(let B=0;B<L.length;B++)g.push(L[B])}S=I,y=N,D=this._workCell.fg,k=this._workCell.bg}N+=this._workCell.getChars().length||v.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-S>1){const I=this._getJoinedRanges(x,y,N,c,S);for(let L=0;L<I.length;L++)g.push(I[L])}return g}_getJoinedRanges(l,c,g,x,S){const N=l.substring(c,g);let y=[];try{y=this._characterJoiners[0].handler(N)}catch(D){console.error(D)}for(let D=1;D<this._characterJoiners.length;D++)try{const k=this._characterJoiners[D].handler(N);for(let I=0;I<k.length;I++)oS._mergeRanges(y,k[I])}catch(k){console.error(k)}return this._stringRangesToCellRanges(y,x,S),y}_stringRangesToCellRanges(l,c,g){let x=0,S=!1,N=0,y=l[x];if(y){for(let D=g;D<this._bufferService.cols;D++){const k=c.getWidth(D),I=c.getString(D).length||v.WHITESPACE_CELL_CHAR.length;if(k!==0){if(!S&&y[0]<=N&&(y[0]=D,S=!0),y[1]<=N){if(y[1]=D,y=l[++x],!y)break;y[0]<=N?(y[0]=D,S=!0):S=!1}N+=I}}y&&(y[1]=this._bufferService.cols)}}static _mergeRanges(l,c){let g=!1;for(let x=0;x<l.length;x++){const S=l[x];if(g){if(c[1]<=S[0])return l[x-1][1]=c[1],l;if(c[1]<=S[1])return l[x-1][1]=Math.max(c[1],S[1]),l.splice(x,1),l;l.splice(x,1),x--}else{if(c[1]<=S[0])return l.splice(x,0,c),l;if(c[1]<=S[1])return S[0]=Math.min(c[0],S[0]),l;c[0]<S[1]&&(S[0]=Math.min(c[0],S[0]),g=!0)}}return g?l[l.length-1][1]=c[1]:l.push(c),l}};a.CharacterJoinerService=s=p([m(0,E.IBufferService)],s)},5114:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const p=h(844),m=h(8460),o=h(3656);class v extends p.Disposable{constructor(d,s,u){super(),this._textarea=d,this._window=s,this.mainDocument=u,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new _(this._window),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new m.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((l=>this._screenDprMonitor.setWindow(l)))),this.register((0,m.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(d){this._window!==d&&(this._window=d,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=v;class _ extends p.Disposable{constructor(d){super(),this._parentWindow=d,this._windowResizeListener=this.register(new p.MutableDisposable),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,p.toDisposable)((()=>this.clearListener())))}setWindow(d){this._parentWindow=d,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,o.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var d;this._outerListener&&((d=this._resolutionMediaMatchList)==null||d.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const p=h(844);class m extends p.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,p.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(v){return this.linkProviders.push(v),{dispose:()=>{const _=this.linkProviders.indexOf(v);_!==-1&&this.linkProviders.splice(_,1)}}}}a.LinkProviderService=m},8934:function(R,a,h){var p=this&&this.__decorate||function(E,d,s,u){var l,c=arguments.length,g=c<3?d:u===null?u=Object.getOwnPropertyDescriptor(d,s):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(E,d,s,u);else for(var x=E.length-1;x>=0;x--)(l=E[x])&&(g=(c<3?l(g):c>3?l(d,s,g):l(d,s))||g);return c>3&&g&&Object.defineProperty(d,s,g),g},m=this&&this.__param||function(E,d){return function(s,u){d(s,u,E)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const o=h(4725),v=h(9806);let _=a.MouseService=class{constructor(E,d){this._renderService=E,this._charSizeService=d}getCoords(E,d,s,u,l){return(0,v.getCoords)(window,E,d,s,u,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,l)}getMouseReportCoords(E,d){const s=(0,v.getCoordsRelativeToElement)(window,E,d);if(this._charSizeService.hasValidSize)return s[0]=Math.min(Math.max(s[0],0),this._renderService.dimensions.css.canvas.width-1),s[1]=Math.min(Math.max(s[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(s[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(s[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(s[0]),y:Math.floor(s[1])}}};a.MouseService=_=p([m(0,o.IRenderService),m(1,o.ICharSizeService)],_)},3230:function(R,a,h){var p=this&&this.__decorate||function(l,c,g,x){var S,N=arguments.length,y=N<3?c:x===null?x=Object.getOwnPropertyDescriptor(c,g):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(l,c,g,x);else for(var D=l.length-1;D>=0;D--)(S=l[D])&&(y=(N<3?S(y):N>3?S(c,g,y):S(c,g))||y);return N>3&&y&&Object.defineProperty(c,g,y),y},m=this&&this.__param||function(l,c){return function(g,x){c(g,x,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const o=h(6193),v=h(4725),_=h(8460),E=h(844),d=h(7226),s=h(2585);let u=a.RenderService=class extends E.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(l,c,g,x,S,N,y,D){super(),this._rowCount=l,this._charSizeService=x,this._renderer=this.register(new E.MutableDisposable),this._pausedResizeTask=new d.DebouncedIdleTask,this._observerDisposable=this.register(new E.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new _.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new _.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new _.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new _.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new o.RenderDebouncer(((k,I)=>this._renderRows(k,I)),y),this.register(this._renderDebouncer),this.register(y.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(N.onResize((()=>this._fullRefresh()))),this.register(N.buffers.onBufferActivate((()=>{var k;return(k=this._renderer.value)==null?void 0:k.clear()}))),this.register(g.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(S.onDecorationRegistered((()=>this._fullRefresh()))),this.register(S.onDecorationRemoved((()=>this._fullRefresh()))),this.register(g.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(N.cols,N.rows),this._fullRefresh()}))),this.register(g.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(N.buffer.y,N.buffer.y,!0)))),this.register(D.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(y.window,c),this.register(y.onWindowChange((k=>this._registerIntersectionObserver(k,c))))}_registerIntersectionObserver(l,c){if("IntersectionObserver"in l){const g=new l.IntersectionObserver((x=>this._handleIntersectionChange(x[x.length-1])),{threshold:0});g.observe(c),this._observerDisposable.value=(0,E.toDisposable)((()=>g.disconnect()))}}_handleIntersectionChange(l){this._isPaused=l.isIntersecting===void 0?l.intersectionRatio===0:!l.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(l,c,g=!1){this._isPaused?this._needsFullRefresh=!0:(g||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(l,c,this._rowCount))}_renderRows(l,c){this._renderer.value&&(l=Math.min(l,this._rowCount-1),c=Math.min(c,this._rowCount-1),this._renderer.value.renderRows(l,c),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:l,end:c}),this._onRender.fire({start:l,end:c}),this._isNextRenderRedrawOnly=!0)}resize(l,c){this._rowCount=c,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(l){this._renderer.value=l,this._renderer.value&&(this._renderer.value.onRequestRedraw((c=>this.refreshRows(c.start,c.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(l){return this._renderDebouncer.addRefreshCallback(l)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var l,c;this._renderer.value&&((c=(l=this._renderer.value).clearTextureAtlas)==null||c.call(l),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(l,c){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var g;return(g=this._renderer.value)==null?void 0:g.handleResize(l,c)})):this._renderer.value.handleResize(l,c),this._fullRefresh())}handleCharSizeChanged(){var l;(l=this._renderer.value)==null||l.handleCharSizeChanged()}handleBlur(){var l;(l=this._renderer.value)==null||l.handleBlur()}handleFocus(){var l;(l=this._renderer.value)==null||l.handleFocus()}handleSelectionChanged(l,c,g){var x;this._selectionState.start=l,this._selectionState.end=c,this._selectionState.columnSelectMode=g,(x=this._renderer.value)==null||x.handleSelectionChanged(l,c,g)}handleCursorMove(){var l;(l=this._renderer.value)==null||l.handleCursorMove()}clear(){var l;(l=this._renderer.value)==null||l.clear()}};a.RenderService=u=p([m(2,s.IOptionsService),m(3,v.ICharSizeService),m(4,s.IDecorationService),m(5,s.IBufferService),m(6,v.ICoreBrowserService),m(7,v.IThemeService)],u)},9312:function(R,a,h){var p=this&&this.__decorate||function(y,D,k,I){var L,B=arguments.length,V=B<3?D:I===null?I=Object.getOwnPropertyDescriptor(D,k):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(y,D,k,I);else for(var X=y.length-1;X>=0;X--)(L=y[X])&&(V=(B<3?L(V):B>3?L(D,k,V):L(D,k))||V);return B>3&&V&&Object.defineProperty(D,k,V),V},m=this&&this.__param||function(y,D){return function(k,I){D(k,I,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const o=h(9806),v=h(9504),_=h(456),E=h(4725),d=h(8460),s=h(844),u=h(6114),l=h(4841),c=h(511),g=h(2585),x=" ",S=new RegExp(x,"g");let N=a.SelectionService=class extends s.Disposable{constructor(y,D,k,I,L,B,V,X,ee){super(),this._element=y,this._screenElement=D,this._linkifier=k,this._bufferService=I,this._coreService=L,this._mouseService=B,this._optionsService=V,this._renderService=X,this._coreBrowserService=ee,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new c.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new d.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new d.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new d.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new d.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Z=>this._handleMouseMove(Z),this._mouseUpListener=Z=>this._handleMouseUp(Z),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Z=>this._handleTrim(Z))),this.register(this._bufferService.buffers.onBufferActivate((Z=>this._handleBufferActivate(Z)))),this.enable(),this._model=new _.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,s.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 y=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!y||!D||y[0]===D[0]&&y[1]===D[1])}get selectionText(){const y=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;if(!y||!D)return"";const k=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(y[0]===D[0])return"";const L=y[0]<D[0]?y[0]:D[0],B=y[0]<D[0]?D[0]:y[0];for(let V=y[1];V<=D[1];V++){const X=k.translateBufferLineToString(V,!0,L,B);I.push(X)}}else{const L=y[1]===D[1]?D[0]:void 0;I.push(k.translateBufferLineToString(y[1],!0,y[0],L));for(let B=y[1]+1;B<=D[1]-1;B++){const V=k.lines.get(B),X=k.translateBufferLineToString(B,!0);V!=null&&V.isWrapped?I[I.length-1]+=X:I.push(X)}if(y[1]!==D[1]){const B=k.lines.get(D[1]),V=k.translateBufferLineToString(D[1],!0,0,D[0]);B&&B.isWrapped?I[I.length-1]+=V:I.push(V)}}return I.map((L=>L.replace(S," "))).join(u.isWindows?`\r
270
+ `:`
271
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(y){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),u.isLinux&&y&&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(y){const D=this._getMouseBufferCoords(y),k=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(k&&I&&D)&&this._areCoordsInSelection(D,k,I)}isCellInSelection(y,D){const k=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!k||!I)&&this._areCoordsInSelection([y,D],k,I)}_areCoordsInSelection(y,D,k){return y[1]>D[1]&&y[1]<k[1]||D[1]===k[1]&&y[1]===D[1]&&y[0]>=D[0]&&y[0]<k[0]||D[1]<k[1]&&y[1]===k[1]&&y[0]<k[0]||D[1]<k[1]&&y[1]===D[1]&&y[0]>=D[0]}_selectWordAtCursor(y,D){var L,B;const k=(B=(L=this._linkifier.currentLink)==null?void 0:L.link)==null?void 0:B.range;if(k)return this._model.selectionStart=[k.start.x-1,k.start.y-1],this._model.selectionStartLength=(0,l.getRangeLength)(k,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(y);return!!I&&(this._selectWordAt(I,D),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(y,D){this._model.clearSelection(),y=Math.max(y,0),D=Math.min(D,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,y],this._model.selectionEnd=[this._bufferService.cols,D],this.refresh(),this._onSelectionChange.fire()}_handleTrim(y){this._model.handleTrim(y)&&this.refresh()}_getMouseBufferCoords(y){const D=this._mouseService.getCoords(y,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(D)return D[0]--,D[1]--,D[1]+=this._bufferService.buffer.ydisp,D}_getMouseEventScrollAmount(y){let D=(0,o.getCoordsRelativeToElement)(this._coreBrowserService.window,y,this._screenElement)[1];const k=this._renderService.dimensions.css.canvas.height;return D>=0&&D<=k?0:(D>k&&(D-=k),D=Math.min(Math.max(D,-50),50),D/=50,D/Math.abs(D)+Math.round(14*D))}shouldForceSelection(y){return u.isMac?y.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:y.shiftKey}handleMouseDown(y){if(this._mouseDownTimeStamp=y.timeStamp,(y.button!==2||!this.hasSelection)&&y.button===0){if(!this._enabled){if(!this.shouldForceSelection(y))return;y.stopPropagation()}y.preventDefault(),this._dragScrollAmount=0,this._enabled&&y.shiftKey?this._handleIncrementalClick(y):y.detail===1?this._handleSingleClick(y):y.detail===2?this._handleDoubleClick(y):y.detail===3&&this._handleTripleClick(y),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(y){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(y))}_handleSingleClick(y){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(y)?3:0,this._model.selectionStart=this._getMouseBufferCoords(y),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const D=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);D&&D.length!==this._model.selectionStart[0]&&D.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(y){this._selectWordAtCursor(y,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(y){const D=this._getMouseBufferCoords(y);D&&(this._activeSelectionMode=2,this._selectLineAt(D[1]))}shouldColumnSelect(y){return y.altKey&&!(u.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(y){if(y.stopImmediatePropagation(),!this._model.selectionStart)return;const D=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(y),!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(y),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const k=this._bufferService.buffer;if(this._model.selectionEnd[1]<k.lines.length){const I=k.lines.get(this._model.selectionEnd[1]);I&&I.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}D&&D[0]===this._model.selectionEnd[0]&&D[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 y=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(y.ydisp+this._bufferService.rows,y.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=y.ydisp),this.refresh()}}_handleMouseUp(y){const D=y.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&D<500&&y.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const k=this._mouseService.getCoords(y,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(k&&k[0]!==void 0&&k[1]!==void 0){const I=(0,v.moveToCellSequence)(k[0]-1,k[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const y=this._model.finalSelectionStart,D=this._model.finalSelectionEnd,k=!(!y||!D||y[0]===D[0]&&y[1]===D[1]);k?y&&D&&(this._oldSelectionStart&&this._oldSelectionEnd&&y[0]===this._oldSelectionStart[0]&&y[1]===this._oldSelectionStart[1]&&D[0]===this._oldSelectionEnd[0]&&D[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(y,D,k)):this._oldHasSelection&&this._fireOnSelectionChange(y,D,k)}_fireOnSelectionChange(y,D,k){this._oldSelectionStart=y,this._oldSelectionEnd=D,this._oldHasSelection=k,this._onSelectionChange.fire()}_handleBufferActivate(y){this.clearSelection(),this._trimListener.dispose(),this._trimListener=y.activeBuffer.lines.onTrim((D=>this._handleTrim(D)))}_convertViewportColToCharacterIndex(y,D){let k=D;for(let I=0;D>=I;I++){const L=y.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?k--:L>1&&D!==I&&(k+=L-1)}return k}setSelection(y,D,k){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[y,D],this._model.selectionStartLength=k,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(y){this._isClickInSelection(y)||(this._selectWordAtCursor(y,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(y,D,k=!0,I=!0){if(y[0]>=this._bufferService.cols)return;const L=this._bufferService.buffer,B=L.lines.get(y[1]);if(!B)return;const V=L.translateBufferLineToString(y[1],!1);let X=this._convertViewportColToCharacterIndex(B,y[0]),ee=X;const Z=y[0]-X;let ie=0,P=0,H=0,q=0;if(V.charAt(X)===" "){for(;X>0&&V.charAt(X-1)===" ";)X--;for(;ee<V.length&&V.charAt(ee+1)===" ";)ee++}else{let ae=y[0],ve=y[0];B.getWidth(ae)===0&&(ie++,ae--),B.getWidth(ve)===2&&(P++,ve++);const ye=B.getString(ve).length;for(ye>1&&(q+=ye-1,ee+=ye-1);ae>0&&X>0&&!this._isCharWordSeparator(B.loadCell(ae-1,this._workCell));){B.loadCell(ae-1,this._workCell);const Q=this._workCell.getChars().length;this._workCell.getWidth()===0?(ie++,ae--):Q>1&&(H+=Q-1,X-=Q-1),X--,ae--}for(;ve<B.length&&ee+1<V.length&&!this._isCharWordSeparator(B.loadCell(ve+1,this._workCell));){B.loadCell(ve+1,this._workCell);const Q=this._workCell.getChars().length;this._workCell.getWidth()===2?(P++,ve++):Q>1&&(q+=Q-1,ee+=Q-1),ee++,ve++}}ee++;let Y=X+Z-ie+H,re=Math.min(this._bufferService.cols,ee-X+ie+P-H-q);if(D||V.slice(X,ee).trim()!==""){if(k&&Y===0&&B.getCodePoint(0)!==32){const ae=L.lines.get(y[1]-1);if(ae&&B.isWrapped&&ae.getCodePoint(this._bufferService.cols-1)!==32){const ve=this._getWordAt([this._bufferService.cols-1,y[1]-1],!1,!0,!1);if(ve){const ye=this._bufferService.cols-ve.start;Y-=ye,re+=ye}}}if(I&&Y+re===this._bufferService.cols&&B.getCodePoint(this._bufferService.cols-1)!==32){const ae=L.lines.get(y[1]+1);if(ae!=null&&ae.isWrapped&&ae.getCodePoint(0)!==32){const ve=this._getWordAt([0,y[1]+1],!1,!1,!0);ve&&(re+=ve.length)}}return{start:Y,length:re}}}_selectWordAt(y,D){const k=this._getWordAt(y,D);if(k){for(;k.start<0;)k.start+=this._bufferService.cols,y[1]--;this._model.selectionStart=[k.start,y[1]],this._model.selectionStartLength=k.length}}_selectToWordAt(y){const D=this._getWordAt(y,!0);if(D){let k=y[1];for(;D.start<0;)D.start+=this._bufferService.cols,k--;if(!this._model.areSelectionValuesReversed())for(;D.start+D.length>this._bufferService.cols;)D.length-=this._bufferService.cols,k++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?D.start:D.start+D.length,k]}}_isCharWordSeparator(y){return y.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(y.getChars())>=0}_selectLineAt(y){const D=this._bufferService.buffer.getWrappedRangeForLine(y),k={start:{x:0,y:D.first},end:{x:this._bufferService.cols-1,y:D.last}};this._model.selectionStart=[0,D.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,l.getRangeLength)(k,this._bufferService.cols)}};a.SelectionService=N=p([m(3,g.IBufferService),m(4,g.ICoreService),m(5,E.IMouseService),m(6,g.IOptionsService),m(7,E.IRenderService),m(8,E.ICoreBrowserService)],N)},4725:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const p=h(8343);a.ICharSizeService=(0,p.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,p.createDecorator)("CoreBrowserService"),a.IMouseService=(0,p.createDecorator)("MouseService"),a.IRenderService=(0,p.createDecorator)("RenderService"),a.ISelectionService=(0,p.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,p.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,p.createDecorator)("ThemeService"),a.ILinkProviderService=(0,p.createDecorator)("LinkProviderService")},6731:function(R,a,h){var p=this&&this.__decorate||function(N,y,D,k){var I,L=arguments.length,B=L<3?y:k===null?k=Object.getOwnPropertyDescriptor(y,D):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(N,y,D,k);else for(var V=N.length-1;V>=0;V--)(I=N[V])&&(B=(L<3?I(B):L>3?I(y,D,B):I(y,D))||B);return L>3&&B&&Object.defineProperty(y,D,B),B},m=this&&this.__param||function(N,y){return function(D,k){y(D,k,N)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const o=h(7239),v=h(8055),_=h(8460),E=h(844),d=h(2585),s=v.css.toColor("#ffffff"),u=v.css.toColor("#000000"),l=v.css.toColor("#ffffff"),c=v.css.toColor("#000000"),g={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const N=[v.css.toColor("#2e3436"),v.css.toColor("#cc0000"),v.css.toColor("#4e9a06"),v.css.toColor("#c4a000"),v.css.toColor("#3465a4"),v.css.toColor("#75507b"),v.css.toColor("#06989a"),v.css.toColor("#d3d7cf"),v.css.toColor("#555753"),v.css.toColor("#ef2929"),v.css.toColor("#8ae234"),v.css.toColor("#fce94f"),v.css.toColor("#729fcf"),v.css.toColor("#ad7fa8"),v.css.toColor("#34e2e2"),v.css.toColor("#eeeeec")],y=[0,95,135,175,215,255];for(let D=0;D<216;D++){const k=y[D/36%6|0],I=y[D/6%6|0],L=y[D%6];N.push({css:v.channels.toCss(k,I,L),rgba:v.channels.toRgba(k,I,L)})}for(let D=0;D<24;D++){const k=8+10*D;N.push({css:v.channels.toCss(k,k,k),rgba:v.channels.toRgba(k,k,k)})}return N})());let x=a.ThemeService=class extends E.Disposable{get colors(){return this._colors}constructor(N){super(),this._optionsService=N,this._contrastCache=new o.ColorContrastCache,this._halfContrastCache=new o.ColorContrastCache,this._onChangeColors=this.register(new _.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:s,background:u,cursor:l,cursorAccent:c,selectionForeground:void 0,selectionBackgroundTransparent:g,selectionBackgroundOpaque:v.color.blend(u,g),selectionInactiveBackgroundTransparent:g,selectionInactiveBackgroundOpaque:v.color.blend(u,g),ansi:a.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(N={}){const y=this._colors;if(y.foreground=S(N.foreground,s),y.background=S(N.background,u),y.cursor=S(N.cursor,l),y.cursorAccent=S(N.cursorAccent,c),y.selectionBackgroundTransparent=S(N.selectionBackground,g),y.selectionBackgroundOpaque=v.color.blend(y.background,y.selectionBackgroundTransparent),y.selectionInactiveBackgroundTransparent=S(N.selectionInactiveBackground,y.selectionBackgroundTransparent),y.selectionInactiveBackgroundOpaque=v.color.blend(y.background,y.selectionInactiveBackgroundTransparent),y.selectionForeground=N.selectionForeground?S(N.selectionForeground,v.NULL_COLOR):void 0,y.selectionForeground===v.NULL_COLOR&&(y.selectionForeground=void 0),v.color.isOpaque(y.selectionBackgroundTransparent)&&(y.selectionBackgroundTransparent=v.color.opacity(y.selectionBackgroundTransparent,.3)),v.color.isOpaque(y.selectionInactiveBackgroundTransparent)&&(y.selectionInactiveBackgroundTransparent=v.color.opacity(y.selectionInactiveBackgroundTransparent,.3)),y.ansi=a.DEFAULT_ANSI_COLORS.slice(),y.ansi[0]=S(N.black,a.DEFAULT_ANSI_COLORS[0]),y.ansi[1]=S(N.red,a.DEFAULT_ANSI_COLORS[1]),y.ansi[2]=S(N.green,a.DEFAULT_ANSI_COLORS[2]),y.ansi[3]=S(N.yellow,a.DEFAULT_ANSI_COLORS[3]),y.ansi[4]=S(N.blue,a.DEFAULT_ANSI_COLORS[4]),y.ansi[5]=S(N.magenta,a.DEFAULT_ANSI_COLORS[5]),y.ansi[6]=S(N.cyan,a.DEFAULT_ANSI_COLORS[6]),y.ansi[7]=S(N.white,a.DEFAULT_ANSI_COLORS[7]),y.ansi[8]=S(N.brightBlack,a.DEFAULT_ANSI_COLORS[8]),y.ansi[9]=S(N.brightRed,a.DEFAULT_ANSI_COLORS[9]),y.ansi[10]=S(N.brightGreen,a.DEFAULT_ANSI_COLORS[10]),y.ansi[11]=S(N.brightYellow,a.DEFAULT_ANSI_COLORS[11]),y.ansi[12]=S(N.brightBlue,a.DEFAULT_ANSI_COLORS[12]),y.ansi[13]=S(N.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),y.ansi[14]=S(N.brightCyan,a.DEFAULT_ANSI_COLORS[14]),y.ansi[15]=S(N.brightWhite,a.DEFAULT_ANSI_COLORS[15]),N.extendedAnsi){const D=Math.min(y.ansi.length-16,N.extendedAnsi.length);for(let k=0;k<D;k++)y.ansi[k+16]=S(N.extendedAnsi[k],a.DEFAULT_ANSI_COLORS[k+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(N){this._restoreColor(N),this._onChangeColors.fire(this.colors)}_restoreColor(N){if(N!==void 0)switch(N){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[N]=this._restoreColors.ansi[N]}else for(let y=0;y<this._restoreColors.ansi.length;++y)this._colors.ansi[y]=this._restoreColors.ansi[y]}modifyColors(N){N(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 S(N,y){if(N!==void 0)try{return v.css.toColor(N)}catch{}return y}a.ThemeService=x=p([m(0,d.IOptionsService)],x)},6349:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const p=h(8460),m=h(844);class o extends m.Disposable{constructor(_){super(),this._maxLength=_,this.onDeleteEmitter=this.register(new p.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new p.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new p.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(_){if(this._maxLength===_)return;const E=new Array(_);for(let d=0;d<Math.min(_,this.length);d++)E[d]=this._array[this._getCyclicIndex(d)];this._array=E,this._maxLength=_,this._startIndex=0}get length(){return this._length}set length(_){if(_>this._length)for(let E=this._length;E<_;E++)this._array[E]=void 0;this._length=_}get(_){return this._array[this._getCyclicIndex(_)]}set(_,E){this._array[this._getCyclicIndex(_)]=E}push(_){this._array[this._getCyclicIndex(this._length)]=_,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(_,E,...d){if(E){for(let s=_;s<this._length-E;s++)this._array[this._getCyclicIndex(s)]=this._array[this._getCyclicIndex(s+E)];this._length-=E,this.onDeleteEmitter.fire({index:_,amount:E})}for(let s=this._length-1;s>=_;s--)this._array[this._getCyclicIndex(s+d.length)]=this._array[this._getCyclicIndex(s)];for(let s=0;s<d.length;s++)this._array[this._getCyclicIndex(_+s)]=d[s];if(d.length&&this.onInsertEmitter.fire({index:_,amount:d.length}),this._length+d.length>this._maxLength){const s=this._length+d.length-this._maxLength;this._startIndex+=s,this._length=this._maxLength,this.onTrimEmitter.fire(s)}else this._length+=d.length}trimStart(_){_>this._length&&(_=this._length),this._startIndex+=_,this._length-=_,this.onTrimEmitter.fire(_)}shiftElements(_,E,d){if(!(E<=0)){if(_<0||_>=this._length)throw new Error("start argument out of range");if(_+d<0)throw new Error("Cannot shift elements in list beyond index 0");if(d>0){for(let u=E-1;u>=0;u--)this.set(_+u+d,this.get(_+u));const s=_+E+d-this._length;if(s>0)for(this._length+=s;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let s=0;s<E;s++)this.set(_+s+d,this.get(_+s))}}_getCyclicIndex(_){return(this._startIndex+_)%this._maxLength}}a.CircularList=o},1439:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function h(p,m=5){if(typeof p!="object")return p;const o=Array.isArray(p)?[]:{};for(const v in p)o[v]=m<=1?p[v]:p[v]&&h(p[v],m-1);return o}},8055:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let h=0,p=0,m=0,o=0;var v,_,E,d,s;function u(c){const g=c.toString(16);return g.length<2?"0"+g:g}function l(c,g){return c<g?(g+.05)/(c+.05):(c+.05)/(g+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(c){c.toCss=function(g,x,S,N){return N!==void 0?`#${u(g)}${u(x)}${u(S)}${u(N)}`:`#${u(g)}${u(x)}${u(S)}`},c.toRgba=function(g,x,S,N=255){return(g<<24|x<<16|S<<8|N)>>>0},c.toColor=function(g,x,S,N){return{css:c.toCss(g,x,S,N),rgba:c.toRgba(g,x,S,N)}}})(v||(a.channels=v={})),(function(c){function g(x,S){return o=Math.round(255*S),[h,p,m]=s.toChannels(x.rgba),{css:v.toCss(h,p,m,o),rgba:v.toRgba(h,p,m,o)}}c.blend=function(x,S){if(o=(255&S.rgba)/255,o===1)return{css:S.css,rgba:S.rgba};const N=S.rgba>>24&255,y=S.rgba>>16&255,D=S.rgba>>8&255,k=x.rgba>>24&255,I=x.rgba>>16&255,L=x.rgba>>8&255;return h=k+Math.round((N-k)*o),p=I+Math.round((y-I)*o),m=L+Math.round((D-L)*o),{css:v.toCss(h,p,m),rgba:v.toRgba(h,p,m)}},c.isOpaque=function(x){return(255&x.rgba)==255},c.ensureContrastRatio=function(x,S,N){const y=s.ensureContrastRatio(x.rgba,S.rgba,N);if(y)return v.toColor(y>>24&255,y>>16&255,y>>8&255)},c.opaque=function(x){const S=(255|x.rgba)>>>0;return[h,p,m]=s.toChannels(S),{css:v.toCss(h,p,m),rgba:S}},c.opacity=g,c.multiplyOpacity=function(x,S){return o=255&x.rgba,g(x,o*S/255)},c.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(_||(a.color=_={})),(function(c){let g,x;try{const S=document.createElement("canvas");S.width=1,S.height=1;const N=S.getContext("2d",{willReadFrequently:!0});N&&(g=N,g.globalCompositeOperation="copy",x=g.createLinearGradient(0,0,1,1))}catch{}c.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return h=parseInt(S.slice(1,2).repeat(2),16),p=parseInt(S.slice(2,3).repeat(2),16),m=parseInt(S.slice(3,4).repeat(2),16),v.toColor(h,p,m);case 5:return h=parseInt(S.slice(1,2).repeat(2),16),p=parseInt(S.slice(2,3).repeat(2),16),m=parseInt(S.slice(3,4).repeat(2),16),o=parseInt(S.slice(4,5).repeat(2),16),v.toColor(h,p,m,o);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const N=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(N)return h=parseInt(N[1]),p=parseInt(N[2]),m=parseInt(N[3]),o=Math.round(255*(N[5]===void 0?1:parseFloat(N[5]))),v.toColor(h,p,m,o);if(!g||!x)throw new Error("css.toColor: Unsupported css format");if(g.fillStyle=x,g.fillStyle=S,typeof g.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(g.fillRect(0,0,1,1),[h,p,m,o]=g.getImageData(0,0,1,1).data,o!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:v.toRgba(h,p,m,o),css:S}}})(E||(a.css=E={})),(function(c){function g(x,S,N){const y=x/255,D=S/255,k=N/255;return .2126*(y<=.03928?y/12.92:Math.pow((y+.055)/1.055,2.4))+.7152*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.0722*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))}c.relativeLuminance=function(x){return g(x>>16&255,x>>8&255,255&x)},c.relativeLuminance2=g})(d||(a.rgb=d={})),(function(c){function g(S,N,y){const D=S>>24&255,k=S>>16&255,I=S>>8&255;let L=N>>24&255,B=N>>16&255,V=N>>8&255,X=l(d.relativeLuminance2(L,B,V),d.relativeLuminance2(D,k,I));for(;X<y&&(L>0||B>0||V>0);)L-=Math.max(0,Math.ceil(.1*L)),B-=Math.max(0,Math.ceil(.1*B)),V-=Math.max(0,Math.ceil(.1*V)),X=l(d.relativeLuminance2(L,B,V),d.relativeLuminance2(D,k,I));return(L<<24|B<<16|V<<8|255)>>>0}function x(S,N,y){const D=S>>24&255,k=S>>16&255,I=S>>8&255;let L=N>>24&255,B=N>>16&255,V=N>>8&255,X=l(d.relativeLuminance2(L,B,V),d.relativeLuminance2(D,k,I));for(;X<y&&(L<255||B<255||V<255);)L=Math.min(255,L+Math.ceil(.1*(255-L))),B=Math.min(255,B+Math.ceil(.1*(255-B))),V=Math.min(255,V+Math.ceil(.1*(255-V))),X=l(d.relativeLuminance2(L,B,V),d.relativeLuminance2(D,k,I));return(L<<24|B<<16|V<<8|255)>>>0}c.blend=function(S,N){if(o=(255&N)/255,o===1)return N;const y=N>>24&255,D=N>>16&255,k=N>>8&255,I=S>>24&255,L=S>>16&255,B=S>>8&255;return h=I+Math.round((y-I)*o),p=L+Math.round((D-L)*o),m=B+Math.round((k-B)*o),v.toRgba(h,p,m)},c.ensureContrastRatio=function(S,N,y){const D=d.relativeLuminance(S>>8),k=d.relativeLuminance(N>>8);if(l(D,k)<y){if(k<D){const B=g(S,N,y),V=l(D,d.relativeLuminance(B>>8));if(V<y){const X=x(S,N,y);return V>l(D,d.relativeLuminance(X>>8))?B:X}return B}const I=x(S,N,y),L=l(D,d.relativeLuminance(I>>8));if(L<y){const B=g(S,N,y);return L>l(D,d.relativeLuminance(B>>8))?I:B}return I}},c.reduceLuminance=g,c.increaseLuminance=x,c.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}})(s||(a.rgba=s={})),a.toPaddedHex=u,a.contrastRatio=l},8969:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const p=h(844),m=h(2585),o=h(4348),v=h(7866),_=h(744),E=h(7302),d=h(6975),s=h(8460),u=h(1753),l=h(1480),c=h(7994),g=h(9282),x=h(5435),S=h(5981),N=h(2660);let y=!1;class D extends p.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new s.EventEmitter),this._onScroll.event((I=>{var L;(L=this._onScrollApi)==null||L.fire(I.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(I){for(const L in I)this.optionsService.options[L]=I[L]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new p.MutableDisposable),this._onBinary=this.register(new s.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new s.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new s.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new s.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new s.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new s.EventEmitter),this._instantiationService=new o.InstantiationService,this.optionsService=this.register(new E.OptionsService(I)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(_.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(v.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(d.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(u.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(l.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(c.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(N.OscLinkService),this._instantiationService.setService(m.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new x.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,s.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,s.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,s.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,s.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((L=>{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((L=>{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 S.WriteBuffer(((L,B)=>this._inputHandler.parse(L,B)))),this.register((0,s.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,L){this._writeBuffer.write(I,L)}writeSync(I,L){this._logService.logLevel<=m.LogLevelEnum.WARN&&!y&&(this._logService.warn("writeSync is unreliable and will be removed soon."),y=!0),this._writeBuffer.writeSync(I,L)}input(I,L=!0){this.coreService.triggerDataEvent(I,L)}resize(I,L){isNaN(I)||isNaN(L)||(I=Math.max(I,_.MINIMUM_COLS),L=Math.max(L,_.MINIMUM_ROWS),this._bufferService.resize(I,L))}scroll(I,L=!1){this._bufferService.scroll(I,L)}scrollLines(I,L,B){this._bufferService.scrollLines(I,L,B)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const L=I-this._bufferService.buffer.ydisp;L!==0&&this.scrollLines(L)}registerEscHandler(I,L){return this._inputHandler.registerEscHandler(I,L)}registerDcsHandler(I,L){return this._inputHandler.registerDcsHandler(I,L)}registerCsiHandler(I,L){return this._inputHandler.registerCsiHandler(I,L)}registerOscHandler(I,L){return this._inputHandler.registerOscHandler(I,L)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const L=this.optionsService.rawOptions.windowsPty;L&&L.buildNumber!==void 0&&L.buildNumber!==void 0?I=L.backend==="conpty"&&L.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(g.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,g.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,p.toDisposable)((()=>{for(const L of I)L.dispose()}))}}}a.CoreTerminal=D},8460:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let p=0;p<this._listeners.length;p++)if(this._listeners[p]===h)return void this._listeners.splice(p,1)}}})),this._event}fire(h,p){const m=[];for(let o=0;o<this._listeners.length;o++)m.push(this._listeners[o]);for(let o=0;o<m.length;o++)m[o].call(void 0,h,p)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(h,p){return h((m=>p.fire(m)))},a.runAndSubscribe=function(h,p){return p(void 0),h((m=>p(m)))}},5435:function(R,a,h){var p=this&&this.__decorate||function(ie,P,H,q){var Y,re=arguments.length,ae=re<3?P:q===null?q=Object.getOwnPropertyDescriptor(P,H):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(ie,P,H,q);else for(var ve=ie.length-1;ve>=0;ve--)(Y=ie[ve])&&(ae=(re<3?Y(ae):re>3?Y(P,H,ae):Y(P,H))||ae);return re>3&&ae&&Object.defineProperty(P,H,ae),ae},m=this&&this.__param||function(ie,P){return function(H,q){P(H,q,ie)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const o=h(2584),v=h(7116),_=h(2015),E=h(844),d=h(482),s=h(8437),u=h(8460),l=h(643),c=h(511),g=h(3734),x=h(2585),S=h(1480),N=h(6242),y=h(6351),D=h(5941),k={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function L(ie,P){if(ie>24)return P.setWinLines||!1;switch(ie){case 1:return!!P.restoreWin;case 2:return!!P.minimizeWin;case 3:return!!P.setWinPosition;case 4:return!!P.setWinSizePixels;case 5:return!!P.raiseWin;case 6:return!!P.lowerWin;case 7:return!!P.refreshWin;case 8:return!!P.setWinSizeChars;case 9:return!!P.maximizeWin;case 10:return!!P.fullscreenWin;case 11:return!!P.getWinState;case 13:return!!P.getWinPosition;case 14:return!!P.getWinSizePixels;case 15:return!!P.getScreenSizePixels;case 16:return!!P.getCellSizePixels;case 18:return!!P.getWinSizeChars;case 19:return!!P.getScreenSizeChars;case 20:return!!P.getIconTitle;case 21:return!!P.getWinTitle;case 22:return!!P.pushTitle;case 23:return!!P.popTitle;case 24:return!!P.setWinLines}return!1}var B;(function(ie){ie[ie.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ie[ie.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(B||(a.WindowsOptionsReportType=B={}));let V=0;class X extends E.Disposable{getAttrData(){return this._curAttrData}constructor(P,H,q,Y,re,ae,ve,ye,Q=new _.EscapeSequenceParser){super(),this._bufferService=P,this._charsetService=H,this._coreService=q,this._logService=Y,this._optionsService=re,this._oscLinkService=ae,this._coreMouseService=ve,this._unicodeService=ye,this._parser=Q,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new d.StringToUtf32,this._utf8Decoder=new d.Utf8ToUtf32,this._workCell=new c.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=s.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=s.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new u.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new u.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new u.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new u.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new u.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new u.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new u.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new u.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new u.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new u.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new u.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new u.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 ee(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(($=>this._activeBuffer=$.activeBuffer))),this._parser.setCsiHandlerFallback((($,he)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString($),params:he.toArray()})})),this._parser.setEscHandlerFallback(($=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString($)})})),this._parser.setExecuteHandlerFallback(($=>{this._logService.debug("Unknown EXECUTE code: ",{code:$})})),this._parser.setOscHandlerFallback((($,he,ce)=>{this._logService.debug("Unknown OSC code: ",{identifier:$,action:he,data:ce})})),this._parser.setDcsHandlerFallback((($,he,ce)=>{he==="HOOK"&&(ce=ce.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString($),action:he,payload:ce})})),this._parser.setPrintHandler((($,he,ce)=>this.print($,he,ce))),this._parser.registerCsiHandler({final:"@"},($=>this.insertChars($))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},($=>this.scrollLeft($))),this._parser.registerCsiHandler({final:"A"},($=>this.cursorUp($))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},($=>this.scrollRight($))),this._parser.registerCsiHandler({final:"B"},($=>this.cursorDown($))),this._parser.registerCsiHandler({final:"C"},($=>this.cursorForward($))),this._parser.registerCsiHandler({final:"D"},($=>this.cursorBackward($))),this._parser.registerCsiHandler({final:"E"},($=>this.cursorNextLine($))),this._parser.registerCsiHandler({final:"F"},($=>this.cursorPrecedingLine($))),this._parser.registerCsiHandler({final:"G"},($=>this.cursorCharAbsolute($))),this._parser.registerCsiHandler({final:"H"},($=>this.cursorPosition($))),this._parser.registerCsiHandler({final:"I"},($=>this.cursorForwardTab($))),this._parser.registerCsiHandler({final:"J"},($=>this.eraseInDisplay($,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},($=>this.eraseInDisplay($,!0))),this._parser.registerCsiHandler({final:"K"},($=>this.eraseInLine($,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},($=>this.eraseInLine($,!0))),this._parser.registerCsiHandler({final:"L"},($=>this.insertLines($))),this._parser.registerCsiHandler({final:"M"},($=>this.deleteLines($))),this._parser.registerCsiHandler({final:"P"},($=>this.deleteChars($))),this._parser.registerCsiHandler({final:"S"},($=>this.scrollUp($))),this._parser.registerCsiHandler({final:"T"},($=>this.scrollDown($))),this._parser.registerCsiHandler({final:"X"},($=>this.eraseChars($))),this._parser.registerCsiHandler({final:"Z"},($=>this.cursorBackwardTab($))),this._parser.registerCsiHandler({final:"`"},($=>this.charPosAbsolute($))),this._parser.registerCsiHandler({final:"a"},($=>this.hPositionRelative($))),this._parser.registerCsiHandler({final:"b"},($=>this.repeatPrecedingCharacter($))),this._parser.registerCsiHandler({final:"c"},($=>this.sendDeviceAttributesPrimary($))),this._parser.registerCsiHandler({prefix:">",final:"c"},($=>this.sendDeviceAttributesSecondary($))),this._parser.registerCsiHandler({final:"d"},($=>this.linePosAbsolute($))),this._parser.registerCsiHandler({final:"e"},($=>this.vPositionRelative($))),this._parser.registerCsiHandler({final:"f"},($=>this.hVPosition($))),this._parser.registerCsiHandler({final:"g"},($=>this.tabClear($))),this._parser.registerCsiHandler({final:"h"},($=>this.setMode($))),this._parser.registerCsiHandler({prefix:"?",final:"h"},($=>this.setModePrivate($))),this._parser.registerCsiHandler({final:"l"},($=>this.resetMode($))),this._parser.registerCsiHandler({prefix:"?",final:"l"},($=>this.resetModePrivate($))),this._parser.registerCsiHandler({final:"m"},($=>this.charAttributes($))),this._parser.registerCsiHandler({final:"n"},($=>this.deviceStatus($))),this._parser.registerCsiHandler({prefix:"?",final:"n"},($=>this.deviceStatusPrivate($))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},($=>this.softReset($))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},($=>this.setCursorStyle($))),this._parser.registerCsiHandler({final:"r"},($=>this.setScrollRegion($))),this._parser.registerCsiHandler({final:"s"},($=>this.saveCursor($))),this._parser.registerCsiHandler({final:"t"},($=>this.windowOptions($))),this._parser.registerCsiHandler({final:"u"},($=>this.restoreCursor($))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},($=>this.insertColumns($))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},($=>this.deleteColumns($))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},($=>this.selectProtected($))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},($=>this.requestMode($,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},($=>this.requestMode($,!1))),this._parser.setExecuteHandler(o.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(o.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(o.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(o.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(o.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(o.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(o.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(o.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(o.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new N.OscHandler(($=>(this.setTitle($),this.setIconName($),!0)))),this._parser.registerOscHandler(1,new N.OscHandler(($=>this.setIconName($)))),this._parser.registerOscHandler(2,new N.OscHandler(($=>this.setTitle($)))),this._parser.registerOscHandler(4,new N.OscHandler(($=>this.setOrReportIndexedColor($)))),this._parser.registerOscHandler(8,new N.OscHandler(($=>this.setHyperlink($)))),this._parser.registerOscHandler(10,new N.OscHandler(($=>this.setOrReportFgColor($)))),this._parser.registerOscHandler(11,new N.OscHandler(($=>this.setOrReportBgColor($)))),this._parser.registerOscHandler(12,new N.OscHandler(($=>this.setOrReportCursorColor($)))),this._parser.registerOscHandler(104,new N.OscHandler(($=>this.restoreIndexedColor($)))),this._parser.registerOscHandler(110,new N.OscHandler(($=>this.restoreFgColor($)))),this._parser.registerOscHandler(111,new N.OscHandler(($=>this.restoreBgColor($)))),this._parser.registerOscHandler(112,new N.OscHandler(($=>this.restoreCursorColor($)))),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 $ in v.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:$},(()=>this.selectCharset("("+$))),this._parser.registerEscHandler({intermediates:")",final:$},(()=>this.selectCharset(")"+$))),this._parser.registerEscHandler({intermediates:"*",final:$},(()=>this.selectCharset("*"+$))),this._parser.registerEscHandler({intermediates:"+",final:$},(()=>this.selectCharset("+"+$))),this._parser.registerEscHandler({intermediates:"-",final:$},(()=>this.selectCharset("-"+$))),this._parser.registerEscHandler({intermediates:".",final:$},(()=>this.selectCharset("."+$))),this._parser.registerEscHandler({intermediates:"/",final:$},(()=>this.selectCharset("/"+$)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler(($=>(this._logService.error("Parsing error: ",$),$))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new y.DcsHandler((($,he)=>this.requestStatusString($,he))))}_preserveStack(P,H,q,Y){this._parseStack.paused=!0,this._parseStack.cursorStartX=P,this._parseStack.cursorStartY=H,this._parseStack.decodedLength=q,this._parseStack.position=Y}_logSlowResolvingAsync(P){this._logService.logLevel<=x.LogLevelEnum.WARN&&Promise.race([P,new Promise(((H,q)=>setTimeout((()=>q("#SLOW_TIMEOUT")),5e3)))]).catch((H=>{if(H!=="#SLOW_TIMEOUT")throw H;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(P,H){let q,Y=this._activeBuffer.x,re=this._activeBuffer.y,ae=0;const ve=this._parseStack.paused;if(ve){if(q=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,H))return this._logSlowResolvingAsync(q),q;Y=this._parseStack.cursorStartX,re=this._parseStack.cursorStartY,this._parseStack.paused=!1,P.length>I&&(ae=this._parseStack.position+I)}if(this._logService.logLevel<=x.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof P=="string"?` "${P}"`:` "${Array.prototype.map.call(P,($=>String.fromCharCode($))).join("")}"`),typeof P=="string"?P.split("").map(($=>$.charCodeAt(0))):P),this._parseBuffer.length<P.length&&this._parseBuffer.length<I&&(this._parseBuffer=new Uint32Array(Math.min(P.length,I))),ve||this._dirtyRowTracker.clearRange(),P.length>I)for(let $=ae;$<P.length;$+=I){const he=$+I<P.length?$+I:P.length,ce=typeof P=="string"?this._stringDecoder.decode(P.substring($,he),this._parseBuffer):this._utf8Decoder.decode(P.subarray($,he),this._parseBuffer);if(q=this._parser.parse(this._parseBuffer,ce))return this._preserveStack(Y,re,ce,$),this._logSlowResolvingAsync(q),q}else if(!ve){const $=typeof P=="string"?this._stringDecoder.decode(P,this._parseBuffer):this._utf8Decoder.decode(P,this._parseBuffer);if(q=this._parser.parse(this._parseBuffer,$))return this._preserveStack(Y,re,$,0),this._logSlowResolvingAsync(q),q}this._activeBuffer.x===Y&&this._activeBuffer.y===re||this._onCursorMove.fire();const ye=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Q=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Q<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Q,this._bufferService.rows-1),Math.min(ye,this._bufferService.rows-1))}print(P,H,q){let Y,re;const ae=this._charsetService.charset,ve=this._optionsService.rawOptions.screenReaderMode,ye=this._bufferService.cols,Q=this._coreService.decPrivateModes.wraparound,$=this._coreService.modes.insertMode,he=this._curAttrData;let ce=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&q-H>0&&ce.getWidth(this._activeBuffer.x-1)===2&&ce.setCellFromCodepoint(this._activeBuffer.x-1,0,1,he);let De=this._parser.precedingJoinState;for(let Ee=H;Ee<q;++Ee){if(Y=P[Ee],Y<127&&ae){const at=ae[String.fromCharCode(Y)];at&&(Y=at.charCodeAt(0))}const He=this._unicodeService.charProperties(Y,De);re=S.UnicodeService.extractWidth(He);const Fe=S.UnicodeService.extractShouldJoin(He),Ge=Fe?S.UnicodeService.extractWidth(De):0;if(De=He,ve&&this._onA11yChar.fire((0,d.stringFromCodePoint)(Y)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+re-Ge>ye){if(Q){const at=ce;let Me=this._activeBuffer.x-Ge;for(this._activeBuffer.x=Ge,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),ce=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ge>0&&ce instanceof s.BufferLine&&ce.copyCellsFrom(at,Me,0,Ge,!1);Me<ye;)at.setCellFromCodepoint(Me++,0,1,he)}else if(this._activeBuffer.x=ye-1,re===2)continue}if(Fe&&this._activeBuffer.x){const at=ce.getWidth(this._activeBuffer.x-1)?1:2;ce.addCodepointToCell(this._activeBuffer.x-at,Y,re);for(let Me=re-Ge;--Me>=0;)ce.setCellFromCodepoint(this._activeBuffer.x++,0,0,he)}else if($&&(ce.insertCells(this._activeBuffer.x,re-Ge,this._activeBuffer.getNullCell(he)),ce.getWidth(ye-1)===2&&ce.setCellFromCodepoint(ye-1,l.NULL_CELL_CODE,l.NULL_CELL_WIDTH,he)),ce.setCellFromCodepoint(this._activeBuffer.x++,Y,re,he),re>0)for(;--re;)ce.setCellFromCodepoint(this._activeBuffer.x++,0,0,he)}this._parser.precedingJoinState=De,this._activeBuffer.x<ye&&q-H>0&&ce.getWidth(this._activeBuffer.x)===0&&!ce.hasContent(this._activeBuffer.x)&&ce.setCellFromCodepoint(this._activeBuffer.x,0,1,he),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(P,H){return P.final!=="t"||P.prefix||P.intermediates?this._parser.registerCsiHandler(P,H):this._parser.registerCsiHandler(P,(q=>!L(q.params[0],this._optionsService.rawOptions.windowOptions)||H(q)))}registerDcsHandler(P,H){return this._parser.registerDcsHandler(P,new y.DcsHandler(H))}registerEscHandler(P,H){return this._parser.registerEscHandler(P,H)}registerOscHandler(P,H){return this._parser.registerOscHandler(P,new N.OscHandler(H))}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 P;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&&((P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&P.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);H.hasWidth(this._activeBuffer.x)&&!H.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const P=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-P),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(P=this._bufferService.cols-1){this._activeBuffer.x=Math.min(P,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(P,H){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=P,this._activeBuffer.y=this._activeBuffer.scrollTop+H):(this._activeBuffer.x=P,this._activeBuffer.y=H),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(P,H){this._restrictCursor(),this._setCursor(this._activeBuffer.x+P,this._activeBuffer.y+H)}cursorUp(P){const H=this._activeBuffer.y-this._activeBuffer.scrollTop;return H>=0?this._moveCursor(0,-Math.min(H,P.params[0]||1)):this._moveCursor(0,-(P.params[0]||1)),!0}cursorDown(P){const H=this._activeBuffer.scrollBottom-this._activeBuffer.y;return H>=0?this._moveCursor(0,Math.min(H,P.params[0]||1)):this._moveCursor(0,P.params[0]||1),!0}cursorForward(P){return this._moveCursor(P.params[0]||1,0),!0}cursorBackward(P){return this._moveCursor(-(P.params[0]||1),0),!0}cursorNextLine(P){return this.cursorDown(P),this._activeBuffer.x=0,!0}cursorPrecedingLine(P){return this.cursorUp(P),this._activeBuffer.x=0,!0}cursorCharAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(P){return this._setCursor(P.length>=2?(P.params[1]||1)-1:0,(P.params[0]||1)-1),!0}charPosAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(P){return this._moveCursor(P.params[0]||1,0),!0}linePosAbsolute(P){return this._setCursor(this._activeBuffer.x,(P.params[0]||1)-1),!0}vPositionRelative(P){return this._moveCursor(0,P.params[0]||1),!0}hVPosition(P){return this.cursorPosition(P),!0}tabClear(P){const H=P.params[0];return H===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:H===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=P.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=P.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(P){const H=P.params[0];return H===1&&(this._curAttrData.bg|=536870912),H!==2&&H!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(P,H,q,Y=!1,re=!1){const ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);ae.replaceCells(H,q,this._activeBuffer.getNullCell(this._eraseAttrData()),re),Y&&(ae.isWrapped=!1)}_resetBufferLine(P,H=!1){const q=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);q&&(q.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),H),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+P),q.isWrapped=!1)}eraseInDisplay(P,H=!1){let q;switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:for(q=this._activeBuffer.y,this._dirtyRowTracker.markDirty(q),this._eraseInBufferLine(q++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);q<this._bufferService.rows;q++)this._resetBufferLine(q,H);this._dirtyRowTracker.markDirty(q);break;case 1:for(q=this._activeBuffer.y,this._dirtyRowTracker.markDirty(q),this._eraseInBufferLine(q,0,this._activeBuffer.x+1,!0,H),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(q+1).isWrapped=!1);q--;)this._resetBufferLine(q,H);this._dirtyRowTracker.markDirty(0);break;case 2:for(q=this._bufferService.rows,this._dirtyRowTracker.markDirty(q-1);q--;)this._resetBufferLine(q,H);this._dirtyRowTracker.markDirty(0);break;case 3:const Y=this._activeBuffer.lines.length-this._bufferService.rows;Y>0&&(this._activeBuffer.lines.trimStart(Y),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-Y,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-Y,0),this._onScroll.fire(0))}return!0}eraseInLine(P,H=!1){switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,H);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,H)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(P){this._restrictCursor();let H=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const q=this._activeBuffer.ybase+this._activeBuffer.y,Y=this._bufferService.rows-1-this._activeBuffer.scrollBottom,re=this._bufferService.rows-1+this._activeBuffer.ybase-Y+1;for(;H--;)this._activeBuffer.lines.splice(re-1,1),this._activeBuffer.lines.splice(q,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(P){this._restrictCursor();let H=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const q=this._activeBuffer.ybase+this._activeBuffer.y;let Y;for(Y=this._bufferService.rows-1-this._activeBuffer.scrollBottom,Y=this._bufferService.rows-1+this._activeBuffer.ybase-Y;H--;)this._activeBuffer.lines.splice(q,1),this._activeBuffer.lines.splice(Y,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(P){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.insertCells(this._activeBuffer.x,P.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(P){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.deleteCells(this._activeBuffer.x,P.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(P){let H=P.params[0]||1;for(;H--;)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(P){let H=P.params[0]||1;for(;H--;)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(s.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=P.params[0]||1;for(let q=this._activeBuffer.scrollTop;q<=this._activeBuffer.scrollBottom;++q){const Y=this._activeBuffer.lines.get(this._activeBuffer.ybase+q);Y.deleteCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),Y.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=P.params[0]||1;for(let q=this._activeBuffer.scrollTop;q<=this._activeBuffer.scrollBottom;++q){const Y=this._activeBuffer.lines.get(this._activeBuffer.ybase+q);Y.insertCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),Y.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=P.params[0]||1;for(let q=this._activeBuffer.scrollTop;q<=this._activeBuffer.scrollBottom;++q){const Y=this._activeBuffer.lines.get(this._activeBuffer.ybase+q);Y.insertCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),Y.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=P.params[0]||1;for(let q=this._activeBuffer.scrollTop;q<=this._activeBuffer.scrollBottom;++q){const Y=this._activeBuffer.lines.get(this._activeBuffer.ybase+q);Y.deleteCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),Y.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(P){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(P.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(P){const H=this._parser.precedingJoinState;if(!H)return!0;const q=P.params[0]||1,Y=S.UnicodeService.extractWidth(H),re=this._activeBuffer.x-Y,ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(re),ve=new Uint32Array(ae.length*q);let ye=0;for(let $=0;$<ae.length;){const he=ae.codePointAt($)||0;ve[ye++]=he,$+=he>65535?2:1}let Q=ye;for(let $=1;$<q;++$)ve.copyWithin(Q,0,ye),Q+=ye;return this.print(ve,0,Q),!0}sendDeviceAttributesPrimary(P){return P.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(o.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(o.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(P){return P.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(o.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(o.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(P.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(o.C0.ESC+"[>83;40003;0c")),!0}_is(P){return(this._optionsService.rawOptions.termName+"").indexOf(P)===0}setMode(P){for(let H=0;H<P.length;H++)switch(P.params[H]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(P){for(let H=0;H<P.length;H++)switch(P.params[H]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,v.DEFAULT_CHARSET),this._charsetService.setgCharset(1,v.DEFAULT_CHARSET),this._charsetService.setgCharset(2,v.DEFAULT_CHARSET),this._charsetService.setgCharset(3,v.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(P){for(let H=0;H<P.length;H++)switch(P.params[H]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(P){for(let H=0;H<P.length;H++)switch(P.params[H]){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(),P.params[H]===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(P,H){const q=this._coreService.decPrivateModes,{activeProtocol:Y,activeEncoding:re}=this._coreMouseService,ae=this._coreService,{buffers:ve,cols:ye}=this._bufferService,{active:Q,alt:$}=ve,he=this._optionsService.rawOptions,ce=Fe=>Fe?1:2,De=P.params[0];return Ee=De,He=H?De===2?4:De===4?ce(ae.modes.insertMode):De===12?3:De===20?ce(he.convertEol):0:De===1?ce(q.applicationCursorKeys):De===3?he.windowOptions.setWinLines?ye===80?2:ye===132?1:0:0:De===6?ce(q.origin):De===7?ce(q.wraparound):De===8?3:De===9?ce(Y==="X10"):De===12?ce(he.cursorBlink):De===25?ce(!ae.isCursorHidden):De===45?ce(q.reverseWraparound):De===66?ce(q.applicationKeypad):De===67?4:De===1e3?ce(Y==="VT200"):De===1002?ce(Y==="DRAG"):De===1003?ce(Y==="ANY"):De===1004?ce(q.sendFocus):De===1005?4:De===1006?ce(re==="SGR"):De===1015?4:De===1016?ce(re==="SGR_PIXELS"):De===1048?1:De===47||De===1047||De===1049?ce(Q===$):De===2004?ce(q.bracketedPasteMode):0,ae.triggerDataEvent(`${o.C0.ESC}[${H?"":"?"}${Ee};${He}$y`),!0;var Ee,He}_updateAttrColor(P,H,q,Y,re){return H===2?(P|=50331648,P&=-16777216,P|=g.AttributeData.fromColorRGB([q,Y,re])):H===5&&(P&=-50331904,P|=33554432|255&q),P}_extractColor(P,H,q){const Y=[0,0,-1,0,0,0];let re=0,ae=0;do{if(Y[ae+re]=P.params[H+ae],P.hasSubParams(H+ae)){const ve=P.getSubParams(H+ae);let ye=0;do Y[1]===5&&(re=1),Y[ae+ye+1+re]=ve[ye];while(++ye<ve.length&&ye+ae+1+re<Y.length);break}if(Y[1]===5&&ae+re>=2||Y[1]===2&&ae+re>=5)break;Y[1]&&(re=1)}while(++ae+H<P.length&&ae+re<Y.length);for(let ve=2;ve<Y.length;++ve)Y[ve]===-1&&(Y[ve]=0);switch(Y[0]){case 38:q.fg=this._updateAttrColor(q.fg,Y[1],Y[3],Y[4],Y[5]);break;case 48:q.bg=this._updateAttrColor(q.bg,Y[1],Y[3],Y[4],Y[5]);break;case 58:q.extended=q.extended.clone(),q.extended.underlineColor=this._updateAttrColor(q.extended.underlineColor,Y[1],Y[3],Y[4],Y[5])}return ae}_processUnderline(P,H){H.extended=H.extended.clone(),(!~P||P>5)&&(P=1),H.extended.underlineStyle=P,H.fg|=268435456,P===0&&(H.fg&=-268435457),H.updateExtended()}_processSGR0(P){P.fg=s.DEFAULT_ATTR_DATA.fg,P.bg=s.DEFAULT_ATTR_DATA.bg,P.extended=P.extended.clone(),P.extended.underlineStyle=0,P.extended.underlineColor&=-67108864,P.updateExtended()}charAttributes(P){if(P.length===1&&P.params[0]===0)return this._processSGR0(this._curAttrData),!0;const H=P.length;let q;const Y=this._curAttrData;for(let re=0;re<H;re++)q=P.params[re],q>=30&&q<=37?(Y.fg&=-50331904,Y.fg|=16777216|q-30):q>=40&&q<=47?(Y.bg&=-50331904,Y.bg|=16777216|q-40):q>=90&&q<=97?(Y.fg&=-50331904,Y.fg|=16777224|q-90):q>=100&&q<=107?(Y.bg&=-50331904,Y.bg|=16777224|q-100):q===0?this._processSGR0(Y):q===1?Y.fg|=134217728:q===3?Y.bg|=67108864:q===4?(Y.fg|=268435456,this._processUnderline(P.hasSubParams(re)?P.getSubParams(re)[0]:1,Y)):q===5?Y.fg|=536870912:q===7?Y.fg|=67108864:q===8?Y.fg|=1073741824:q===9?Y.fg|=2147483648:q===2?Y.bg|=134217728:q===21?this._processUnderline(2,Y):q===22?(Y.fg&=-134217729,Y.bg&=-134217729):q===23?Y.bg&=-67108865:q===24?(Y.fg&=-268435457,this._processUnderline(0,Y)):q===25?Y.fg&=-536870913:q===27?Y.fg&=-67108865:q===28?Y.fg&=-1073741825:q===29?Y.fg&=2147483647:q===39?(Y.fg&=-67108864,Y.fg|=16777215&s.DEFAULT_ATTR_DATA.fg):q===49?(Y.bg&=-67108864,Y.bg|=16777215&s.DEFAULT_ATTR_DATA.bg):q===38||q===48||q===58?re+=this._extractColor(P,re,Y):q===53?Y.bg|=1073741824:q===55?Y.bg&=-1073741825:q===59?(Y.extended=Y.extended.clone(),Y.extended.underlineColor=-1,Y.updateExtended()):q===100?(Y.fg&=-67108864,Y.fg|=16777215&s.DEFAULT_ATTR_DATA.fg,Y.bg&=-67108864,Y.bg|=16777215&s.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",q);return!0}deviceStatus(P){switch(P.params[0]){case 5:this._coreService.triggerDataEvent(`${o.C0.ESC}[0n`);break;case 6:const H=this._activeBuffer.y+1,q=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${o.C0.ESC}[${H};${q}R`)}return!0}deviceStatusPrivate(P){if(P.params[0]===6){const H=this._activeBuffer.y+1,q=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${o.C0.ESC}[?${H};${q}R`)}return!0}softReset(P){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=s.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(P){const H=P.params[0]||1;switch(H){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 q=H%2==1;return this._optionsService.options.cursorBlink=q,!0}setScrollRegion(P){const H=P.params[0]||1;let q;return(P.length<2||(q=P.params[1])>this._bufferService.rows||q===0)&&(q=this._bufferService.rows),q>H&&(this._activeBuffer.scrollTop=H-1,this._activeBuffer.scrollBottom=q-1,this._setCursor(0,0)),!0}windowOptions(P){if(!L(P.params[0],this._optionsService.rawOptions.windowOptions))return!0;const H=P.length>1?P.params[1]:0;switch(P.params[0]){case 14:H!==2&&this._onRequestWindowsOptionsReport.fire(B.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(B.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${o.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:H!==0&&H!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),H!==0&&H!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:H!==0&&H!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),H!==0&&H!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(P){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(P){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(P){return this._windowTitle=P,this._onTitleChange.fire(P),!0}setIconName(P){return this._iconName=P,!0}setOrReportIndexedColor(P){const H=[],q=P.split(";");for(;q.length>1;){const Y=q.shift(),re=q.shift();if(/^\d+$/.exec(Y)){const ae=parseInt(Y);if(Z(ae))if(re==="?")H.push({type:0,index:ae});else{const ve=(0,D.parseColor)(re);ve&&H.push({type:1,index:ae,color:ve})}}}return H.length&&this._onColor.fire(H),!0}setHyperlink(P){const H=P.split(";");return!(H.length<2)&&(H[1]?this._createHyperlink(H[0],H[1]):!H[0]&&this._finishHyperlink())}_createHyperlink(P,H){this._getCurrentLinkId()&&this._finishHyperlink();const q=P.split(":");let Y;const re=q.findIndex((ae=>ae.startsWith("id=")));return re!==-1&&(Y=q[re].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:Y,uri:H}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(P,H){const q=P.split(";");for(let Y=0;Y<q.length&&!(H>=this._specialColors.length);++Y,++H)if(q[Y]==="?")this._onColor.fire([{type:0,index:this._specialColors[H]}]);else{const re=(0,D.parseColor)(q[Y]);re&&this._onColor.fire([{type:1,index:this._specialColors[H],color:re}])}return!0}setOrReportFgColor(P){return this._setOrReportSpecialColor(P,0)}setOrReportBgColor(P){return this._setOrReportSpecialColor(P,1)}setOrReportCursorColor(P){return this._setOrReportSpecialColor(P,2)}restoreIndexedColor(P){if(!P)return this._onColor.fire([{type:2}]),!0;const H=[],q=P.split(";");for(let Y=0;Y<q.length;++Y)if(/^\d+$/.exec(q[Y])){const re=parseInt(q[Y]);Z(re)&&H.push({type:2,index:re})}return H.length&&this._onColor.fire(H),!0}restoreFgColor(P){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(P){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(P){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,v.DEFAULT_CHARSET),!0}selectCharset(P){return P.length!==2?(this.selectDefaultCharset(),!0):(P[0]==="/"||this._charsetService.setgCharset(k[P[0]],v.CHARSETS[P[1]]||v.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 P=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,P,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=s.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=s.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(P){return this._charsetService.setgLevel(P),!0}screenAlignmentPattern(){const P=new c.CellData;P.content=4194373,P.fg=this._curAttrData.fg,P.bg=this._curAttrData.bg,this._setCursor(0,0);for(let H=0;H<this._bufferService.rows;++H){const q=this._activeBuffer.ybase+this._activeBuffer.y+H,Y=this._activeBuffer.lines.get(q);Y&&(Y.fill(P),Y.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(P,H){const q=this._bufferService.buffer,Y=this._optionsService.rawOptions;return(re=>(this._coreService.triggerDataEvent(`${o.C0.ESC}${re}${o.C0.ESC}\\`),!0))(P==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:P==='"p'?'P1$r61;1"p':P==="r"?`P1$r${q.scrollTop+1};${q.scrollBottom+1}r`:P==="m"?"P1$r0m":P===" q"?`P1$r${{block:2,underline:4,bar:6}[Y.cursorStyle]-(Y.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(P,H){this._dirtyRowTracker.markRangeDirty(P,H)}}a.InputHandler=X;let ee=class{constructor(ie){this._bufferService=ie,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ie){ie<this.start?this.start=ie:ie>this.end&&(this.end=ie)}markRangeDirty(ie,P){ie>P&&(V=ie,ie=P,P=V),ie<this.start&&(this.start=ie),P>this.end&&(this.end=P)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(ie){return 0<=ie&&ie<256}ee=p([m(0,x.IBufferService)],ee)},844:(R,a)=>{function h(p){for(const m of p)m.dispose();p.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const p of this._disposables)p.dispose();this._disposables.length=0}register(p){return this._disposables.push(p),p}unregister(p){const m=this._disposables.indexOf(p);m!==-1&&this._disposables.splice(m,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(p){var m;this._isDisposed||p===this._value||((m=this._value)==null||m.dispose(),this._value=p)}clear(){this.value=void 0}dispose(){var p;this._isDisposed=!0,(p=this._value)==null||p.dispose(),this._value=void 0}},a.toDisposable=function(p){return{dispose:p}},a.disposeArray=h,a.getDisposeArrayDisposable=function(p){return{dispose:()=>h(p)}}},1505:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class h{constructor(){this._data={}}set(m,o,v){this._data[m]||(this._data[m]={}),this._data[m][o]=v}get(m,o){return this._data[m]?this._data[m][o]:void 0}clear(){this._data={}}}a.TwoKeyMap=h,a.FourKeyMap=class{constructor(){this._data=new h}set(p,m,o,v,_){this._data.get(p,m)||this._data.set(p,m,new h),this._data.get(p,m).set(o,v,_)}get(p,m,o,v){var _;return(_=this._data.get(p,m))==null?void 0:_.get(o,v)}clear(){this._data.clear()}}},6114:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const h=a.isNode?"node":navigator.userAgent,p=a.isNode?"node":navigator.platform;a.isFirefox=h.includes("Firefox"),a.isLegacyEdge=h.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(h),a.getSafariVersion=function(){if(!a.isSafari)return 0;const m=h.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(p),a.isIpad=p==="iPad",a.isIphone=p==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(p),a.isLinux=p.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(h)},6106:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let h=0;a.SortedList=class{constructor(p){this._getKey=p,this._array=[]}clear(){this._array.length=0}insert(p){this._array.length!==0?(h=this._search(this._getKey(p)),this._array.splice(h,0,p)):this._array.push(p)}delete(p){if(this._array.length===0)return!1;const m=this._getKey(p);if(m===void 0||(h=this._search(m),h===-1)||this._getKey(this._array[h])!==m)return!1;do if(this._array[h]===p)return this._array.splice(h,1),!0;while(++h<this._array.length&&this._getKey(this._array[h])===m);return!1}*getKeyIterator(p){if(this._array.length!==0&&(h=this._search(p),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===p))do yield this._array[h];while(++h<this._array.length&&this._getKey(this._array[h])===p)}forEachByKey(p,m){if(this._array.length!==0&&(h=this._search(p),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===p))do m(this._array[h]);while(++h<this._array.length&&this._getKey(this._array[h])===p)}values(){return[...this._array].values()}_search(p){let m=0,o=this._array.length-1;for(;o>=m;){let v=m+o>>1;const _=this._getKey(this._array[v]);if(_>p)o=v-1;else{if(!(_<p)){for(;v>0&&this._getKey(this._array[v-1])===p;)v--;return v}m=v+1}}return m}}},7226:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const p=h(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(_){this._tasks.push(_),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(_){this._idleCallback=void 0;let E=0,d=0,s=_.timeRemaining(),u=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),d=Math.max(E,d),u=_.timeRemaining(),1.5*d>u)return s-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s-E))}ms`),void this._start();s=u}this.clear()}}class o extends m{_requestCallback(_){return setTimeout((()=>_(this._createDeadline(16))))}_cancelCallback(_){clearTimeout(_)}_createDeadline(_){const E=Date.now()+_;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}a.PriorityTaskQueue=o,a.IdleTaskQueue=!p.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(v){return requestIdleCallback(v)}_cancelCallback(v){cancelIdleCallback(v)}}:o,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(v){this._queue.clear(),this._queue.enqueue(v)}flush(){this._queue.flush()}}},9282:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const p=h(643);a.updateWindowsModeWrappedState=function(m){const o=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),v=o==null?void 0:o.get(m.cols-1),_=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);_&&v&&(_.isWrapped=v[p.CHAR_DATA_CODE_INDEX]!==p.NULL_CELL_CODE&&v[p.CHAR_DATA_CODE_INDEX]!==p.WHITESPACE_CELL_CODE)}},3734:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class h{constructor(){this.fg=0,this.bg=0,this.extended=new p}static toColorRGB(o){return[o>>>16&255,o>>>8&255,255&o]}static fromColorRGB(o){return(255&o[0])<<16|(255&o[1])<<8|255&o[2]}clone(){const o=new h;return o.fg=this.fg,o.bg=this.bg,o.extended=this.extended.clone(),o}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=h;class p{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(o){this._ext=o}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(o){this._ext&=-469762049,this._ext|=o<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(o){this._ext&=-67108864,this._ext|=67108863&o}get urlId(){return this._urlId}set urlId(o){this._urlId=o}get underlineVariantOffset(){const o=(3758096384&this._ext)>>29;return o<0?4294967288^o:o}set underlineVariantOffset(o){this._ext&=536870911,this._ext|=o<<29&3758096384}constructor(o=0,v=0){this._ext=0,this._urlId=0,this._ext=o,this._urlId=v}clone(){return new p(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=p},9092:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const p=h(6349),m=h(7226),o=h(3734),v=h(8437),_=h(4634),E=h(511),d=h(643),s=h(4863),u=h(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(l,c,g){this._hasScrollback=l,this._optionsService=c,this._bufferService=g,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=v.DEFAULT_ATTR_DATA.clone(),this.savedCharset=u.DEFAULT_CHARSET,this.markers=[],this._nullCell=E.CellData.fromCharData([0,d.NULL_CELL_CHAR,d.NULL_CELL_WIDTH,d.NULL_CELL_CODE]),this._whitespaceCell=E.CellData.fromCharData([0,d.WHITESPACE_CELL_CHAR,d.WHITESPACE_CELL_WIDTH,d.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new m.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new p.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(l){return l?(this._nullCell.fg=l.fg,this._nullCell.bg=l.bg,this._nullCell.extended=l.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new o.ExtendedAttrs),this._nullCell}getWhitespaceCell(l){return l?(this._whitespaceCell.fg=l.fg,this._whitespaceCell.bg=l.bg,this._whitespaceCell.extended=l.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new o.ExtendedAttrs),this._whitespaceCell}getBlankLine(l,c){return new v.BufferLine(this._bufferService.cols,this.getNullCell(l),c)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const l=this.ybase+this.y-this.ydisp;return l>=0&&l<this._rows}_getCorrectBufferLength(l){if(!this._hasScrollback)return l;const c=l+this._optionsService.rawOptions.scrollback;return c>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:c}fillViewportRows(l){if(this.lines.length===0){l===void 0&&(l=v.DEFAULT_ATTR_DATA);let c=this._rows;for(;c--;)this.lines.push(this.getBlankLine(l))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new p.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(l,c){const g=this.getNullCell(v.DEFAULT_ATTR_DATA);let x=0;const S=this._getCorrectBufferLength(c);if(S>this.lines.maxLength&&(this.lines.maxLength=S),this.lines.length>0){if(this._cols<l)for(let y=0;y<this.lines.length;y++)x+=+this.lines.get(y).resize(l,g);let N=0;if(this._rows<c)for(let y=this._rows;y<c;y++)this.lines.length<c+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new v.BufferLine(l,g)):this.ybase>0&&this.lines.length<=this.ybase+this.y+N+1?(this.ybase--,N++,this.ydisp>0&&this.ydisp--):this.lines.push(new v.BufferLine(l,g)));else for(let y=this._rows;y>c;y--)this.lines.length>c+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(S<this.lines.maxLength){const y=this.lines.length-S;y>0&&(this.lines.trimStart(y),this.ybase=Math.max(this.ybase-y,0),this.ydisp=Math.max(this.ydisp-y,0),this.savedY=Math.max(this.savedY-y,0)),this.lines.maxLength=S}this.x=Math.min(this.x,l-1),this.y=Math.min(this.y,c-1),N&&(this.y+=N),this.savedX=Math.min(this.savedX,l-1),this.scrollTop=0}if(this.scrollBottom=c-1,this._isReflowEnabled&&(this._reflow(l,c),this._cols>l))for(let N=0;N<this.lines.length;N++)x+=+this.lines.get(N).resize(l,g);this._cols=l,this._rows=c,this._memoryCleanupQueue.clear(),x>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let l=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,l=!1);let c=0;for(;this._memoryCleanupPosition<this.lines.length;)if(c+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),c>100)return!0;return l}get _isReflowEnabled(){const l=this._optionsService.rawOptions.windowsPty;return l&&l.buildNumber?this._hasScrollback&&l.backend==="conpty"&&l.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(l,c){this._cols!==l&&(l>this._cols?this._reflowLarger(l,c):this._reflowSmaller(l,c))}_reflowLarger(l,c){const g=(0,_.reflowLargerGetLinesToRemove)(this.lines,this._cols,l,this.ybase+this.y,this.getNullCell(v.DEFAULT_ATTR_DATA));if(g.length>0){const x=(0,_.reflowLargerCreateNewLayout)(this.lines,g);(0,_.reflowLargerApplyNewLayout)(this.lines,x.layout),this._reflowLargerAdjustViewport(l,c,x.countRemoved)}}_reflowLargerAdjustViewport(l,c,g){const x=this.getNullCell(v.DEFAULT_ATTR_DATA);let S=g;for(;S-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<c&&this.lines.push(new v.BufferLine(l,x))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-g,0)}_reflowSmaller(l,c){const g=this.getNullCell(v.DEFAULT_ATTR_DATA),x=[];let S=0;for(let N=this.lines.length-1;N>=0;N--){let y=this.lines.get(N);if(!y||!y.isWrapped&&y.getTrimmedLength()<=l)continue;const D=[y];for(;y.isWrapped&&N>0;)y=this.lines.get(--N),D.unshift(y);const k=this.ybase+this.y;if(k>=N&&k<N+D.length)continue;const I=D[D.length-1].getTrimmedLength(),L=(0,_.reflowSmallerGetNewLineLengths)(D,this._cols,l),B=L.length-D.length;let V;V=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+B):Math.max(0,this.lines.length-this.lines.maxLength+B);const X=[];for(let q=0;q<B;q++){const Y=this.getBlankLine(v.DEFAULT_ATTR_DATA,!0);X.push(Y)}X.length>0&&(x.push({start:N+D.length+S,newLines:X}),S+=X.length),D.push(...X);let ee=L.length-1,Z=L[ee];Z===0&&(ee--,Z=L[ee]);let ie=D.length-B-1,P=I;for(;ie>=0;){const q=Math.min(P,Z);if(D[ee]===void 0)break;if(D[ee].copyCellsFrom(D[ie],P-q,Z-q,q,!0),Z-=q,Z===0&&(ee--,Z=L[ee]),P-=q,P===0){ie--;const Y=Math.max(ie,0);P=(0,_.getWrappedLineTrimmedLength)(D,Y,this._cols)}}for(let q=0;q<D.length;q++)L[q]<l&&D[q].setCell(L[q],g);let H=B-V;for(;H-- >0;)this.ybase===0?this.y<c-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+S)-c&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+B,this.ybase+c-1)}if(x.length>0){const N=[],y=[];for(let ee=0;ee<this.lines.length;ee++)y.push(this.lines.get(ee));const D=this.lines.length;let k=D-1,I=0,L=x[I];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+S);let B=0;for(let ee=Math.min(this.lines.maxLength-1,D+S-1);ee>=0;ee--)if(L&&L.start>k+B){for(let Z=L.newLines.length-1;Z>=0;Z--)this.lines.set(ee--,L.newLines[Z]);ee++,N.push({index:k+1,amount:L.newLines.length}),B+=L.newLines.length,L=x[++I]}else this.lines.set(ee,y[k--]);let V=0;for(let ee=N.length-1;ee>=0;ee--)N[ee].index+=V,this.lines.onInsertEmitter.fire(N[ee]),V+=N[ee].amount;const X=Math.max(0,D+S-this.lines.maxLength);X>0&&this.lines.onTrimEmitter.fire(X)}}translateBufferLineToString(l,c,g=0,x){const S=this.lines.get(l);return S?S.translateToString(c,g,x):""}getWrappedRangeForLine(l){let c=l,g=l;for(;c>0&&this.lines.get(c).isWrapped;)c--;for(;g+1<this.lines.length&&this.lines.get(g+1).isWrapped;)g++;return{first:c,last:g}}setupTabStops(l){for(l!=null?this.tabs[l]||(l=this.prevStop(l)):(this.tabs={},l=0);l<this._cols;l+=this._optionsService.rawOptions.tabStopWidth)this.tabs[l]=!0}prevStop(l){for(l==null&&(l=this.x);!this.tabs[--l]&&l>0;);return l>=this._cols?this._cols-1:l<0?0:l}nextStop(l){for(l==null&&(l=this.x);!this.tabs[++l]&&l<this._cols;);return l>=this._cols?this._cols-1:l<0?0:l}clearMarkers(l){this._isClearing=!0;for(let c=0;c<this.markers.length;c++)this.markers[c].line===l&&(this.markers[c].dispose(),this.markers.splice(c--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].dispose(),this.markers.splice(l--,1);this._isClearing=!1}addMarker(l){const c=new s.Marker(l);return this.markers.push(c),c.register(this.lines.onTrim((g=>{c.line-=g,c.line<0&&c.dispose()}))),c.register(this.lines.onInsert((g=>{c.line>=g.index&&(c.line+=g.amount)}))),c.register(this.lines.onDelete((g=>{c.line>=g.index&&c.line<g.index+g.amount&&c.dispose(),c.line>g.index&&(c.line-=g.amount)}))),c.register(c.onDispose((()=>this._removeMarker(c)))),c}_removeMarker(l){this._isClearing||this.markers.splice(this.markers.indexOf(l),1)}}},8437:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const p=h(3734),m=h(511),o=h(643),v=h(482);a.DEFAULT_ATTR_DATA=Object.freeze(new p.AttributeData);let _=0;class E{constructor(s,u,l=!1){this.isWrapped=l,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*s);const c=u||m.CellData.fromCharData([0,o.NULL_CELL_CHAR,o.NULL_CELL_WIDTH,o.NULL_CELL_CODE]);for(let g=0;g<s;++g)this.setCell(g,c);this.length=s}get(s){const u=this._data[3*s+0],l=2097151&u;return[this._data[3*s+1],2097152&u?this._combined[s]:l?(0,v.stringFromCodePoint)(l):"",u>>22,2097152&u?this._combined[s].charCodeAt(this._combined[s].length-1):l]}set(s,u){this._data[3*s+1]=u[o.CHAR_DATA_ATTR_INDEX],u[o.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[s]=u[1],this._data[3*s+0]=2097152|s|u[o.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*s+0]=u[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|u[o.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(s){return this._data[3*s+0]>>22}hasWidth(s){return 12582912&this._data[3*s+0]}getFg(s){return this._data[3*s+1]}getBg(s){return this._data[3*s+2]}hasContent(s){return 4194303&this._data[3*s+0]}getCodePoint(s){const u=this._data[3*s+0];return 2097152&u?this._combined[s].charCodeAt(this._combined[s].length-1):2097151&u}isCombined(s){return 2097152&this._data[3*s+0]}getString(s){const u=this._data[3*s+0];return 2097152&u?this._combined[s]:2097151&u?(0,v.stringFromCodePoint)(2097151&u):""}isProtected(s){return 536870912&this._data[3*s+2]}loadCell(s,u){return _=3*s,u.content=this._data[_+0],u.fg=this._data[_+1],u.bg=this._data[_+2],2097152&u.content&&(u.combinedData=this._combined[s]),268435456&u.bg&&(u.extended=this._extendedAttrs[s]),u}setCell(s,u){2097152&u.content&&(this._combined[s]=u.combinedData),268435456&u.bg&&(this._extendedAttrs[s]=u.extended),this._data[3*s+0]=u.content,this._data[3*s+1]=u.fg,this._data[3*s+2]=u.bg}setCellFromCodepoint(s,u,l,c){268435456&c.bg&&(this._extendedAttrs[s]=c.extended),this._data[3*s+0]=u|l<<22,this._data[3*s+1]=c.fg,this._data[3*s+2]=c.bg}addCodepointToCell(s,u,l){let c=this._data[3*s+0];2097152&c?this._combined[s]+=(0,v.stringFromCodePoint)(u):2097151&c?(this._combined[s]=(0,v.stringFromCodePoint)(2097151&c)+(0,v.stringFromCodePoint)(u),c&=-2097152,c|=2097152):c=u|4194304,l&&(c&=-12582913,c|=l<<22),this._data[3*s+0]=c}insertCells(s,u,l){if((s%=this.length)&&this.getWidth(s-1)===2&&this.setCellFromCodepoint(s-1,0,1,l),u<this.length-s){const c=new m.CellData;for(let g=this.length-s-u-1;g>=0;--g)this.setCell(s+u+g,this.loadCell(s+g,c));for(let g=0;g<u;++g)this.setCell(s+g,l)}else for(let c=s;c<this.length;++c)this.setCell(c,l);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,l)}deleteCells(s,u,l){if(s%=this.length,u<this.length-s){const c=new m.CellData;for(let g=0;g<this.length-s-u;++g)this.setCell(s+g,this.loadCell(s+u+g,c));for(let g=this.length-u;g<this.length;++g)this.setCell(g,l)}else for(let c=s;c<this.length;++c)this.setCell(c,l);s&&this.getWidth(s-1)===2&&this.setCellFromCodepoint(s-1,0,1,l),this.getWidth(s)!==0||this.hasContent(s)||this.setCellFromCodepoint(s,0,1,l)}replaceCells(s,u,l,c=!1){if(c)for(s&&this.getWidth(s-1)===2&&!this.isProtected(s-1)&&this.setCellFromCodepoint(s-1,0,1,l),u<this.length&&this.getWidth(u-1)===2&&!this.isProtected(u)&&this.setCellFromCodepoint(u,0,1,l);s<u&&s<this.length;)this.isProtected(s)||this.setCell(s,l),s++;else for(s&&this.getWidth(s-1)===2&&this.setCellFromCodepoint(s-1,0,1,l),u<this.length&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u,0,1,l);s<u&&s<this.length;)this.setCell(s++,l)}resize(s,u){if(s===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const l=3*s;if(s>this.length){if(this._data.buffer.byteLength>=4*l)this._data=new Uint32Array(this._data.buffer,0,l);else{const c=new Uint32Array(l);c.set(this._data),this._data=c}for(let c=this.length;c<s;++c)this.setCell(c,u)}else{this._data=this._data.subarray(0,l);const c=Object.keys(this._combined);for(let x=0;x<c.length;x++){const S=parseInt(c[x],10);S>=s&&delete this._combined[S]}const g=Object.keys(this._extendedAttrs);for(let x=0;x<g.length;x++){const S=parseInt(g[x],10);S>=s&&delete this._extendedAttrs[S]}}return this.length=s,4*l*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const s=new Uint32Array(this._data.length);return s.set(this._data),this._data=s,1}return 0}fill(s,u=!1){if(u)for(let l=0;l<this.length;++l)this.isProtected(l)||this.setCell(l,s);else{this._combined={},this._extendedAttrs={};for(let l=0;l<this.length;++l)this.setCell(l,s)}}copyFrom(s){this.length!==s.length?this._data=new Uint32Array(s._data):this._data.set(s._data),this.length=s.length,this._combined={};for(const u in s._combined)this._combined[u]=s._combined[u];this._extendedAttrs={};for(const u in s._extendedAttrs)this._extendedAttrs[u]=s._extendedAttrs[u];this.isWrapped=s.isWrapped}clone(){const s=new E(0);s._data=new Uint32Array(this._data),s.length=this.length;for(const u in this._combined)s._combined[u]=this._combined[u];for(const u in this._extendedAttrs)s._extendedAttrs[u]=this._extendedAttrs[u];return s.isWrapped=this.isWrapped,s}getTrimmedLength(){for(let s=this.length-1;s>=0;--s)if(4194303&this._data[3*s+0])return s+(this._data[3*s+0]>>22);return 0}getNoBgTrimmedLength(){for(let s=this.length-1;s>=0;--s)if(4194303&this._data[3*s+0]||50331648&this._data[3*s+2])return s+(this._data[3*s+0]>>22);return 0}copyCellsFrom(s,u,l,c,g){const x=s._data;if(g)for(let N=c-1;N>=0;N--){for(let y=0;y<3;y++)this._data[3*(l+N)+y]=x[3*(u+N)+y];268435456&x[3*(u+N)+2]&&(this._extendedAttrs[l+N]=s._extendedAttrs[u+N])}else for(let N=0;N<c;N++){for(let y=0;y<3;y++)this._data[3*(l+N)+y]=x[3*(u+N)+y];268435456&x[3*(u+N)+2]&&(this._extendedAttrs[l+N]=s._extendedAttrs[u+N])}const S=Object.keys(s._combined);for(let N=0;N<S.length;N++){const y=parseInt(S[N],10);y>=u&&(this._combined[y-u+l]=s._combined[y])}}translateToString(s,u,l,c){u=u??0,l=l??this.length,s&&(l=Math.min(l,this.getTrimmedLength())),c&&(c.length=0);let g="";for(;u<l;){const x=this._data[3*u+0],S=2097151&x,N=2097152&x?this._combined[u]:S?(0,v.stringFromCodePoint)(S):o.WHITESPACE_CELL_CHAR;if(g+=N,c)for(let y=0;y<N.length;++y)c.push(u);u+=x>>22||1}return c&&c.push(u),g}}a.BufferLine=E},4841:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(h,p){if(h.start.y>h.end.y)throw new Error(`Buffer range end (${h.end.x}, ${h.end.y}) cannot be before start (${h.start.x}, ${h.start.y})`);return p*(h.end.y-h.start.y)+(h.end.x-h.start.x+1)}},4634:(R,a)=>{function h(p,m,o){if(m===p.length-1)return p[m].getTrimmedLength();const v=!p[m].hasContent(o-1)&&p[m].getWidth(o-1)===1,_=p[m+1].getWidth(0)===2;return v&&_?o-1:o}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(p,m,o,v,_){const E=[];for(let d=0;d<p.length-1;d++){let s=d,u=p.get(++s);if(!u.isWrapped)continue;const l=[p.get(d)];for(;s<p.length&&u.isWrapped;)l.push(u),u=p.get(++s);if(v>=d&&v<s){d+=l.length-1;continue}let c=0,g=h(l,c,m),x=1,S=0;for(;x<l.length;){const y=h(l,x,m),D=y-S,k=o-g,I=Math.min(D,k);l[c].copyCellsFrom(l[x],S,g,I,!1),g+=I,g===o&&(c++,g=0),S+=I,S===y&&(x++,S=0),g===0&&c!==0&&l[c-1].getWidth(o-1)===2&&(l[c].copyCellsFrom(l[c-1],o-1,g++,1,!1),l[c-1].setCell(o-1,_))}l[c].replaceCells(g,o,_);let N=0;for(let y=l.length-1;y>0&&(y>c||l[y].getTrimmedLength()===0);y--)N++;N>0&&(E.push(d+l.length-N),E.push(N)),d+=l.length-1}return E},a.reflowLargerCreateNewLayout=function(p,m){const o=[];let v=0,_=m[v],E=0;for(let d=0;d<p.length;d++)if(_===d){const s=m[++v];p.onDeleteEmitter.fire({index:d-E,amount:s}),d+=s-1,E+=s,_=m[++v]}else o.push(d);return{layout:o,countRemoved:E}},a.reflowLargerApplyNewLayout=function(p,m){const o=[];for(let v=0;v<m.length;v++)o.push(p.get(m[v]));for(let v=0;v<o.length;v++)p.set(v,o[v]);p.length=m.length},a.reflowSmallerGetNewLineLengths=function(p,m,o){const v=[],_=p.map(((u,l)=>h(p,l,m))).reduce(((u,l)=>u+l));let E=0,d=0,s=0;for(;s<_;){if(_-s<o){v.push(_-s);break}E+=o;const u=h(p,d,m);E>u&&(E-=u,d++);const l=p[d].getWidth(E-1)===2;l&&E--;const c=l?o-1:o;v.push(c),s+=c}return v},a.getWrappedLineTrimmedLength=h},5295:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const p=h(8460),m=h(844),o=h(9092);class v extends m.Disposable{constructor(E,d){super(),this._optionsService=E,this._bufferService=d,this._onBufferActivate=this.register(new p.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 o.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new o.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(E){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(E),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(E,d){this._normal.resize(E,d),this._alt.resize(E,d),this.setupTabStops(E)}setupTabStops(E){this._normal.setupTabStops(E),this._alt.setupTabStops(E)}}a.BufferSet=v},511:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const p=h(482),m=h(643),o=h(3734);class v extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const d=new v;return d.setFromCharData(E),d}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,p.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(E){this.fg=E[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let d=!1;if(E[m.CHAR_DATA_CHAR_INDEX].length>2)d=!0;else if(E[m.CHAR_DATA_CHAR_INDEX].length===2){const s=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=s&&s<=56319){const u=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=u&&u<=57343?this.content=1024*(s-55296)+u-56320+65536|E[m.CHAR_DATA_WIDTH_INDEX]<<22:d=!0}else d=!0}else this.content=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[m.CHAR_DATA_WIDTH_INDEX]<<22;d&&(this.combinedData=E[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=v},643:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const p=h(8460),m=h(844);class o{get id(){return this._id}constructor(_){this.line=_,this.isDisposed=!1,this._disposables=[],this._id=o._nextId++,this._onDispose=this.register(new p.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,m.disposeArray)(this._disposables),this._disposables.length=0)}register(_){return this._disposables.push(_),_}}a.Marker=o,o._nextId=1},7116:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.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:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(R,a)=>{var h,p,m;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(o){o.NUL="\0",o.SOH="",o.STX="",o.ETX="",o.EOT="",o.ENQ="",o.ACK="",o.BEL="\x07",o.BS="\b",o.HT=" ",o.LF=`
272
+ `,o.VT="\v",o.FF="\f",o.CR="\r",o.SO="",o.SI="",o.DLE="",o.DC1="",o.DC2="",o.DC3="",o.DC4="",o.NAK="",o.SYN="",o.ETB="",o.CAN="",o.EM="",o.SUB="",o.ESC="\x1B",o.FS="",o.GS="",o.RS="",o.US="",o.SP=" ",o.DEL=""})(h||(a.C0=h={})),(function(o){o.PAD="€",o.HOP="",o.BPH="‚",o.NBH="ƒ",o.IND="„",o.NEL="…",o.SSA="†",o.ESA="‡",o.HTS="ˆ",o.HTJ="‰",o.VTS="Š",o.PLD="‹",o.PLU="Œ",o.RI="",o.SS2="Ž",o.SS3="",o.DCS="",o.PU1="‘",o.PU2="’",o.STS="“",o.CCH="”",o.MW="•",o.SPA="–",o.EPA="—",o.SOS="˜",o.SGCI="™",o.SCI="š",o.CSI="›",o.ST="œ",o.OSC="",o.PM="ž",o.APC="Ÿ"})(p||(a.C1=p={})),(function(o){o.ST=`${h.ESC}\\`})(m||(a.C1_ESCAPED=m={}))},7399:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const p=h(2584),m={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:["'",'"']};a.evaluateKeyboardEvent=function(o,v,_,E){const d={type:0,cancel:!1,key:void 0},s=(o.shiftKey?1:0)|(o.altKey?2:0)|(o.ctrlKey?4:0)|(o.metaKey?8:0);switch(o.keyCode){case 0:o.key==="UIKeyInputUpArrow"?d.key=v?p.C0.ESC+"OA":p.C0.ESC+"[A":o.key==="UIKeyInputLeftArrow"?d.key=v?p.C0.ESC+"OD":p.C0.ESC+"[D":o.key==="UIKeyInputRightArrow"?d.key=v?p.C0.ESC+"OC":p.C0.ESC+"[C":o.key==="UIKeyInputDownArrow"&&(d.key=v?p.C0.ESC+"OB":p.C0.ESC+"[B");break;case 8:d.key=o.ctrlKey?"\b":p.C0.DEL,o.altKey&&(d.key=p.C0.ESC+d.key);break;case 9:if(o.shiftKey){d.key=p.C0.ESC+"[Z";break}d.key=p.C0.HT,d.cancel=!0;break;case 13:d.key=o.altKey?p.C0.ESC+p.C0.CR:p.C0.CR,d.cancel=!0;break;case 27:d.key=p.C0.ESC,o.altKey&&(d.key=p.C0.ESC+p.C0.ESC),d.cancel=!0;break;case 37:if(o.metaKey)break;s?(d.key=p.C0.ESC+"[1;"+(s+1)+"D",d.key===p.C0.ESC+"[1;3D"&&(d.key=p.C0.ESC+(_?"b":"[1;5D"))):d.key=v?p.C0.ESC+"OD":p.C0.ESC+"[D";break;case 39:if(o.metaKey)break;s?(d.key=p.C0.ESC+"[1;"+(s+1)+"C",d.key===p.C0.ESC+"[1;3C"&&(d.key=p.C0.ESC+(_?"f":"[1;5C"))):d.key=v?p.C0.ESC+"OC":p.C0.ESC+"[C";break;case 38:if(o.metaKey)break;s?(d.key=p.C0.ESC+"[1;"+(s+1)+"A",_||d.key!==p.C0.ESC+"[1;3A"||(d.key=p.C0.ESC+"[1;5A")):d.key=v?p.C0.ESC+"OA":p.C0.ESC+"[A";break;case 40:if(o.metaKey)break;s?(d.key=p.C0.ESC+"[1;"+(s+1)+"B",_||d.key!==p.C0.ESC+"[1;3B"||(d.key=p.C0.ESC+"[1;5B")):d.key=v?p.C0.ESC+"OB":p.C0.ESC+"[B";break;case 45:o.shiftKey||o.ctrlKey||(d.key=p.C0.ESC+"[2~");break;case 46:d.key=s?p.C0.ESC+"[3;"+(s+1)+"~":p.C0.ESC+"[3~";break;case 36:d.key=s?p.C0.ESC+"[1;"+(s+1)+"H":v?p.C0.ESC+"OH":p.C0.ESC+"[H";break;case 35:d.key=s?p.C0.ESC+"[1;"+(s+1)+"F":v?p.C0.ESC+"OF":p.C0.ESC+"[F";break;case 33:o.shiftKey?d.type=2:o.ctrlKey?d.key=p.C0.ESC+"[5;"+(s+1)+"~":d.key=p.C0.ESC+"[5~";break;case 34:o.shiftKey?d.type=3:o.ctrlKey?d.key=p.C0.ESC+"[6;"+(s+1)+"~":d.key=p.C0.ESC+"[6~";break;case 112:d.key=s?p.C0.ESC+"[1;"+(s+1)+"P":p.C0.ESC+"OP";break;case 113:d.key=s?p.C0.ESC+"[1;"+(s+1)+"Q":p.C0.ESC+"OQ";break;case 114:d.key=s?p.C0.ESC+"[1;"+(s+1)+"R":p.C0.ESC+"OR";break;case 115:d.key=s?p.C0.ESC+"[1;"+(s+1)+"S":p.C0.ESC+"OS";break;case 116:d.key=s?p.C0.ESC+"[15;"+(s+1)+"~":p.C0.ESC+"[15~";break;case 117:d.key=s?p.C0.ESC+"[17;"+(s+1)+"~":p.C0.ESC+"[17~";break;case 118:d.key=s?p.C0.ESC+"[18;"+(s+1)+"~":p.C0.ESC+"[18~";break;case 119:d.key=s?p.C0.ESC+"[19;"+(s+1)+"~":p.C0.ESC+"[19~";break;case 120:d.key=s?p.C0.ESC+"[20;"+(s+1)+"~":p.C0.ESC+"[20~";break;case 121:d.key=s?p.C0.ESC+"[21;"+(s+1)+"~":p.C0.ESC+"[21~";break;case 122:d.key=s?p.C0.ESC+"[23;"+(s+1)+"~":p.C0.ESC+"[23~";break;case 123:d.key=s?p.C0.ESC+"[24;"+(s+1)+"~":p.C0.ESC+"[24~";break;default:if(!o.ctrlKey||o.shiftKey||o.altKey||o.metaKey)if(_&&!E||!o.altKey||o.metaKey)!_||o.altKey||o.ctrlKey||o.shiftKey||!o.metaKey?o.key&&!o.ctrlKey&&!o.altKey&&!o.metaKey&&o.keyCode>=48&&o.key.length===1?d.key=o.key:o.key&&o.ctrlKey&&(o.key==="_"&&(d.key=p.C0.US),o.key==="@"&&(d.key=p.C0.NUL)):o.keyCode===65&&(d.type=1);else{const u=m[o.keyCode],l=u==null?void 0:u[o.shiftKey?1:0];if(l)d.key=p.C0.ESC+l;else if(o.keyCode>=65&&o.keyCode<=90){const c=o.ctrlKey?o.keyCode-64:o.keyCode+32;let g=String.fromCharCode(c);o.shiftKey&&(g=g.toUpperCase()),d.key=p.C0.ESC+g}else if(o.keyCode===32)d.key=p.C0.ESC+(o.ctrlKey?p.C0.NUL:" ");else if(o.key==="Dead"&&o.code.startsWith("Key")){let c=o.code.slice(3,4);o.shiftKey||(c=c.toLowerCase()),d.key=p.C0.ESC+c,d.cancel=!0}}else o.keyCode>=65&&o.keyCode<=90?d.key=String.fromCharCode(o.keyCode-64):o.keyCode===32?d.key=p.C0.NUL:o.keyCode>=51&&o.keyCode<=55?d.key=String.fromCharCode(o.keyCode-51+27):o.keyCode===56?d.key=p.C0.DEL:o.keyCode===219?d.key=p.C0.ESC:o.keyCode===220?d.key=p.C0.FS:o.keyCode===221&&(d.key=p.C0.GS)}return d}},482:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},a.utf32ToString=function(h,p=0,m=h.length){let o="";for(let v=p;v<m;++v){let _=h[v];_>65535?(_-=65536,o+=String.fromCharCode(55296+(_>>10))+String.fromCharCode(_%1024+56320)):o+=String.fromCharCode(_)}return o},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(h,p){const m=h.length;if(!m)return 0;let o=0,v=0;if(this._interim){const _=h.charCodeAt(v++);56320<=_&&_<=57343?p[o++]=1024*(this._interim-55296)+_-56320+65536:(p[o++]=this._interim,p[o++]=_),this._interim=0}for(let _=v;_<m;++_){const E=h.charCodeAt(_);if(55296<=E&&E<=56319){if(++_>=m)return this._interim=E,o;const d=h.charCodeAt(_);56320<=d&&d<=57343?p[o++]=1024*(E-55296)+d-56320+65536:(p[o++]=E,p[o++]=d)}else E!==65279&&(p[o++]=E)}return o}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(h,p){const m=h.length;if(!m)return 0;let o,v,_,E,d=0,s=0,u=0;if(this.interim[0]){let g=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let S,N=0;for(;(S=63&this.interim[++N])&&N<4;)x<<=6,x|=S;const y=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,D=y-N;for(;u<D;){if(u>=m)return 0;if(S=h[u++],(192&S)!=128){u--,g=!0;break}this.interim[N++]=S,x<<=6,x|=63&S}g||(y===2?x<128?u--:p[d++]=x:y===3?x<2048||x>=55296&&x<=57343||x===65279||(p[d++]=x):x<65536||x>1114111||(p[d++]=x)),this.interim.fill(0)}const l=m-4;let c=u;for(;c<m;){for(;!(!(c<l)||128&(o=h[c])||128&(v=h[c+1])||128&(_=h[c+2])||128&(E=h[c+3]));)p[d++]=o,p[d++]=v,p[d++]=_,p[d++]=E,c+=4;if(o=h[c++],o<128)p[d++]=o;else if((224&o)==192){if(c>=m)return this.interim[0]=o,d;if(v=h[c++],(192&v)!=128){c--;continue}if(s=(31&o)<<6|63&v,s<128){c--;continue}p[d++]=s}else if((240&o)==224){if(c>=m)return this.interim[0]=o,d;if(v=h[c++],(192&v)!=128){c--;continue}if(c>=m)return this.interim[0]=o,this.interim[1]=v,d;if(_=h[c++],(192&_)!=128){c--;continue}if(s=(15&o)<<12|(63&v)<<6|63&_,s<2048||s>=55296&&s<=57343||s===65279)continue;p[d++]=s}else if((248&o)==240){if(c>=m)return this.interim[0]=o,d;if(v=h[c++],(192&v)!=128){c--;continue}if(c>=m)return this.interim[0]=o,this.interim[1]=v,d;if(_=h[c++],(192&_)!=128){c--;continue}if(c>=m)return this.interim[0]=o,this.interim[1]=v,this.interim[2]=_,d;if(E=h[c++],(192&E)!=128){c--;continue}if(s=(7&o)<<18|(63&v)<<12|(63&_)<<6|63&E,s<65536||s>1114111)continue;p[d++]=s}}return d}}},225:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const p=h(1480),m=[[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]],o=[[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 v;a.UnicodeV6=class{constructor(){if(this.version="6",!v){v=new Uint8Array(65536),v.fill(1),v[0]=0,v.fill(0,1,32),v.fill(0,127,160),v.fill(2,4352,4448),v[9001]=2,v[9002]=2,v.fill(2,11904,42192),v[12351]=1,v.fill(2,44032,55204),v.fill(2,63744,64256),v.fill(2,65040,65050),v.fill(2,65072,65136),v.fill(2,65280,65377),v.fill(2,65504,65511);for(let _=0;_<m.length;++_)v.fill(0,m[_][0],m[_][1]+1)}}wcwidth(_){return _<32?0:_<127?1:_<65536?v[_]:(function(E,d){let s,u=0,l=d.length-1;if(E<d[0][0]||E>d[l][1])return!1;for(;l>=u;)if(s=u+l>>1,E>d[s][1])u=s+1;else{if(!(E<d[s][0]))return!0;l=s-1}return!1})(_,o)?0:_>=131072&&_<=196605||_>=196608&&_<=262141?2:1}charProperties(_,E){let d=this.wcwidth(_),s=d===0&&E!==0;if(s){const u=p.UnicodeService.extractWidth(E);u===0?s=!1:u>d&&(d=u)}return p.UnicodeService.createPropertyValue(0,d,s)}}},5981:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const p=h(8460),m=h(844);class o extends m.Disposable{constructor(_){super(),this._action=_,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new p.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(_,E){if(E!==void 0&&this._syncCalls>E)return void(this._syncCalls=0);if(this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let d;for(this._isSyncWriting=!0;d=this._writeBuffer.shift();){this._action(d);const s=this._callbacks.shift();s&&s()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(_,E){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+=_.length,this._writeBuffer.push(_),this._callbacks.push(E),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(E)}_innerWrite(_=0,E=!0){const d=_||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const s=this._writeBuffer[this._bufferOffset],u=this._action(s,E);if(u){const c=g=>Date.now()-d>=12?setTimeout((()=>this._innerWrite(0,g))):this._innerWrite(d,g);return void u.catch((g=>(queueMicrotask((()=>{throw g})),Promise.resolve(!1)))).then(c)}const l=this._callbacks[this._bufferOffset];if(l&&l(),this._bufferOffset++,this._pendingData-=s.length,Date.now()-d>=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()}}a.WriteBuffer=o},5941:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const h=/^([\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})$/,p=/^[\da-f]+$/;function m(o,v){const _=o.toString(16),E=_.length<2?"0"+_:_;switch(v){case 4:return _[0];case 8:return E;case 12:return(E+E).slice(0,3);default:return E+E}}a.parseColor=function(o){if(!o)return;let v=o.toLowerCase();if(v.indexOf("rgb:")===0){v=v.slice(4);const _=h.exec(v);if(_){const E=_[1]?15:_[4]?255:_[7]?4095:65535;return[Math.round(parseInt(_[1]||_[4]||_[7]||_[10],16)/E*255),Math.round(parseInt(_[2]||_[5]||_[8]||_[11],16)/E*255),Math.round(parseInt(_[3]||_[6]||_[9]||_[12],16)/E*255)]}}else if(v.indexOf("#")===0&&(v=v.slice(1),p.exec(v)&&[3,6,9,12].includes(v.length))){const _=v.length/3,E=[0,0,0];for(let d=0;d<3;++d){const s=parseInt(v.slice(_*d,_*d+_),16);E[d]=_===1?s<<4:_===2?s:_===3?s>>4:s>>8}return E}},a.toRgbString=function(o,v=16){const[_,E,d]=o;return`rgb:${m(_,v)}/${m(E,v)}/${m(d,v)}`}},5770:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const p=h(482),m=h(8742),o=h(5770),v=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=v,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=v}registerHandler(E,d){this._handlers[E]===void 0&&(this._handlers[E]=[]);const s=this._handlers[E];return s.push(d),{dispose:()=>{const u=s.indexOf(d);u!==-1&&s.splice(u,1)}}}clearHandler(E){this._handlers[E]&&delete this._handlers[E]}setHandlerFallback(E){this._handlerFb=E}reset(){if(this._active.length)for(let E=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;E>=0;--E)this._active[E].unhook(!1);this._stack.paused=!1,this._active=v,this._ident=0}hook(E,d){if(this.reset(),this._ident=E,this._active=this._handlers[E]||v,this._active.length)for(let s=this._active.length-1;s>=0;s--)this._active[s].hook(d);else this._handlerFb(this._ident,"HOOK",d)}put(E,d,s){if(this._active.length)for(let u=this._active.length-1;u>=0;u--)this._active[u].put(E,d,s);else this._handlerFb(this._ident,"PUT",(0,p.utf32ToString)(E,d,s))}unhook(E,d=!0){if(this._active.length){let s=!1,u=this._active.length-1,l=!1;if(this._stack.paused&&(u=this._stack.loopPosition-1,s=d,l=this._stack.fallThrough,this._stack.paused=!1),!l&&s===!1){for(;u>=0&&(s=this._active[u].unhook(E),s!==!0);u--)if(s instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=u,this._stack.fallThrough=!1,s;u--}for(;u>=0;u--)if(s=this._active[u].unhook(!1),s instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=u,this._stack.fallThrough=!0,s}else this._handlerFb(this._ident,"UNHOOK",E);this._active=v,this._ident=0}};const _=new m.Params;_.addParam(0),a.DcsHandler=class{constructor(E){this._handler=E,this._data="",this._params=_,this._hitLimit=!1}hook(E){this._params=E.length>1||E.params[0]?E.clone():_,this._data="",this._hitLimit=!1}put(E,d,s){this._hitLimit||(this._data+=(0,p.utf32ToString)(E,d,s),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(E){let d=!1;if(this._hitLimit)d=!1;else if(E&&(d=this._handler(this._data,this._params),d instanceof Promise))return d.then((s=>(this._params=_,this._data="",this._hitLimit=!1,s)));return this._params=_,this._data="",this._hitLimit=!1,d}}},2015:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const p=h(844),m=h(8742),o=h(6242),v=h(6351);class _{constructor(u){this.table=new Uint8Array(u)}setDefault(u,l){this.table.fill(u<<4|l)}add(u,l,c,g){this.table[l<<8|u]=c<<4|g}addMany(u,l,c,g){for(let x=0;x<u.length;x++)this.table[l<<8|u[x]]=c<<4|g}}a.TransitionTable=_;const E=160;a.VT500_TRANSITION_TABLE=(function(){const s=new _(4095),u=Array.apply(null,Array(256)).map(((N,y)=>y)),l=(N,y)=>u.slice(N,y),c=l(32,127),g=l(0,24);g.push(25),g.push.apply(g,l(28,32));const x=l(0,14);let S;for(S in s.setDefault(1,0),s.addMany(c,0,2,0),x)s.addMany([24,26,153,154],S,3,0),s.addMany(l(128,144),S,3,0),s.addMany(l(144,152),S,3,0),s.add(156,S,0,0),s.add(27,S,11,1),s.add(157,S,4,8),s.addMany([152,158,159],S,0,7),s.add(155,S,11,3),s.add(144,S,11,9);return s.addMany(g,0,3,0),s.addMany(g,1,3,1),s.add(127,1,0,1),s.addMany(g,8,0,8),s.addMany(g,3,3,3),s.add(127,3,0,3),s.addMany(g,4,3,4),s.add(127,4,0,4),s.addMany(g,6,3,6),s.addMany(g,5,3,5),s.add(127,5,0,5),s.addMany(g,2,3,2),s.add(127,2,0,2),s.add(93,1,4,8),s.addMany(c,8,5,8),s.add(127,8,5,8),s.addMany([156,27,24,26,7],8,6,0),s.addMany(l(28,32),8,0,8),s.addMany([88,94,95],1,0,7),s.addMany(c,7,0,7),s.addMany(g,7,0,7),s.add(156,7,0,0),s.add(127,7,0,7),s.add(91,1,11,3),s.addMany(l(64,127),3,7,0),s.addMany(l(48,60),3,8,4),s.addMany([60,61,62,63],3,9,4),s.addMany(l(48,60),4,8,4),s.addMany(l(64,127),4,7,0),s.addMany([60,61,62,63],4,0,6),s.addMany(l(32,64),6,0,6),s.add(127,6,0,6),s.addMany(l(64,127),6,0,0),s.addMany(l(32,48),3,9,5),s.addMany(l(32,48),5,9,5),s.addMany(l(48,64),5,0,6),s.addMany(l(64,127),5,7,0),s.addMany(l(32,48),4,9,5),s.addMany(l(32,48),1,9,2),s.addMany(l(32,48),2,9,2),s.addMany(l(48,127),2,10,0),s.addMany(l(48,80),1,10,0),s.addMany(l(81,88),1,10,0),s.addMany([89,90,92],1,10,0),s.addMany(l(96,127),1,10,0),s.add(80,1,11,9),s.addMany(g,9,0,9),s.add(127,9,0,9),s.addMany(l(28,32),9,0,9),s.addMany(l(32,48),9,9,12),s.addMany(l(48,60),9,8,10),s.addMany([60,61,62,63],9,9,10),s.addMany(g,11,0,11),s.addMany(l(32,128),11,0,11),s.addMany(l(28,32),11,0,11),s.addMany(g,10,0,10),s.add(127,10,0,10),s.addMany(l(28,32),10,0,10),s.addMany(l(48,60),10,8,10),s.addMany([60,61,62,63],10,0,11),s.addMany(l(32,48),10,9,12),s.addMany(g,12,0,12),s.add(127,12,0,12),s.addMany(l(28,32),12,0,12),s.addMany(l(32,48),12,9,12),s.addMany(l(48,64),12,0,11),s.addMany(l(64,127),12,12,13),s.addMany(l(64,127),10,12,13),s.addMany(l(64,127),9,12,13),s.addMany(g,13,13,13),s.addMany(c,13,13,13),s.add(127,13,0,13),s.addMany([27,156,24,26],13,14,0),s.add(E,0,2,0),s.add(E,8,5,8),s.add(E,6,0,6),s.add(E,11,0,11),s.add(E,13,13,13),s})();class d extends p.Disposable{constructor(u=a.VT500_TRANSITION_TABLE){super(),this._transitions=u,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new m.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(l,c,g)=>{},this._executeHandlerFb=l=>{},this._csiHandlerFb=(l,c)=>{},this._escHandlerFb=l=>{},this._errorHandlerFb=l=>l,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,p.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new o.OscParser),this._dcsParser=this.register(new v.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(u,l=[64,126]){let c=0;if(u.prefix){if(u.prefix.length>1)throw new Error("only one byte as prefix supported");if(c=u.prefix.charCodeAt(0),c&&60>c||c>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(u.intermediates){if(u.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let x=0;x<u.intermediates.length;++x){const S=u.intermediates.charCodeAt(x);if(32>S||S>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");c<<=8,c|=S}}if(u.final.length!==1)throw new Error("final must be a single byte");const g=u.final.charCodeAt(0);if(l[0]>g||g>l[1])throw new Error(`final must be in range ${l[0]} .. ${l[1]}`);return c<<=8,c|=g,c}identToString(u){const l=[];for(;u;)l.push(String.fromCharCode(255&u)),u>>=8;return l.reverse().join("")}setPrintHandler(u){this._printHandler=u}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(u,l){const c=this._identifier(u,[48,126]);this._escHandlers[c]===void 0&&(this._escHandlers[c]=[]);const g=this._escHandlers[c];return g.push(l),{dispose:()=>{const x=g.indexOf(l);x!==-1&&g.splice(x,1)}}}clearEscHandler(u){this._escHandlers[this._identifier(u,[48,126])]&&delete this._escHandlers[this._identifier(u,[48,126])]}setEscHandlerFallback(u){this._escHandlerFb=u}setExecuteHandler(u,l){this._executeHandlers[u.charCodeAt(0)]=l}clearExecuteHandler(u){this._executeHandlers[u.charCodeAt(0)]&&delete this._executeHandlers[u.charCodeAt(0)]}setExecuteHandlerFallback(u){this._executeHandlerFb=u}registerCsiHandler(u,l){const c=this._identifier(u);this._csiHandlers[c]===void 0&&(this._csiHandlers[c]=[]);const g=this._csiHandlers[c];return g.push(l),{dispose:()=>{const x=g.indexOf(l);x!==-1&&g.splice(x,1)}}}clearCsiHandler(u){this._csiHandlers[this._identifier(u)]&&delete this._csiHandlers[this._identifier(u)]}setCsiHandlerFallback(u){this._csiHandlerFb=u}registerDcsHandler(u,l){return this._dcsParser.registerHandler(this._identifier(u),l)}clearDcsHandler(u){this._dcsParser.clearHandler(this._identifier(u))}setDcsHandlerFallback(u){this._dcsParser.setHandlerFallback(u)}registerOscHandler(u,l){return this._oscParser.registerHandler(u,l)}clearOscHandler(u){this._oscParser.clearHandler(u)}setOscHandlerFallback(u){this._oscParser.setHandlerFallback(u)}setErrorHandler(u){this._errorHandler=u}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(u,l,c,g,x){this._parseStack.state=u,this._parseStack.handlers=l,this._parseStack.handlerPos=c,this._parseStack.transition=g,this._parseStack.chunkPos=x}parse(u,l,c){let g,x=0,S=0,N=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,N=this._parseStack.chunkPos+1;else{if(c===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const y=this._parseStack.handlers;let D=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(c===!1&&D>-1){for(;D>=0&&(g=y[D](this._params),g!==!0);D--)if(g instanceof Promise)return this._parseStack.handlerPos=D,g}this._parseStack.handlers=[];break;case 4:if(c===!1&&D>-1){for(;D>=0&&(g=y[D](),g!==!0);D--)if(g instanceof Promise)return this._parseStack.handlerPos=D,g}this._parseStack.handlers=[];break;case 6:if(x=u[this._parseStack.chunkPos],g=this._dcsParser.unhook(x!==24&&x!==26,c),g)return g;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(x=u[this._parseStack.chunkPos],g=this._oscParser.end(x!==24&&x!==26,c),g)return g;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,N=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let y=N;y<l;++y){switch(x=u[y],S=this._transitions.table[this.currentState<<8|(x<160?x:E)],S>>4){case 2:for(let B=y+1;;++B){if(B>=l||(x=u[B])<32||x>126&&x<E){this._printHandler(u,y,B),y=B-1;break}if(++B>=l||(x=u[B])<32||x>126&&x<E){this._printHandler(u,y,B),y=B-1;break}if(++B>=l||(x=u[B])<32||x>126&&x<E){this._printHandler(u,y,B),y=B-1;break}if(++B>=l||(x=u[B])<32||x>126&&x<E){this._printHandler(u,y,B),y=B-1;break}}break;case 3:this._executeHandlers[x]?this._executeHandlers[x]():this._executeHandlerFb(x),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:y,code:x,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const D=this._csiHandlers[this._collect<<8|x];let k=D?D.length-1:-1;for(;k>=0&&(g=D[k](this._params),g!==!0);k--)if(g instanceof Promise)return this._preserveStack(3,D,k,S,y),g;k<0&&this._csiHandlerFb(this._collect<<8|x,this._params),this.precedingJoinState=0;break;case 8:do switch(x){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(x-48)}while(++y<l&&(x=u[y])>47&&x<60);y--;break;case 9:this._collect<<=8,this._collect|=x;break;case 10:const I=this._escHandlers[this._collect<<8|x];let L=I?I.length-1:-1;for(;L>=0&&(g=I[L](),g!==!0);L--)if(g instanceof Promise)return this._preserveStack(4,I,L,S,y),g;L<0&&this._escHandlerFb(this._collect<<8|x),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|x,this._params);break;case 13:for(let B=y+1;;++B)if(B>=l||(x=u[B])===24||x===26||x===27||x>127&&x<E){this._dcsParser.put(u,y,B),y=B-1;break}break;case 14:if(g=this._dcsParser.unhook(x!==24&&x!==26),g)return this._preserveStack(6,[],0,S,y),g;x===27&&(S|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let B=y+1;;B++)if(B>=l||(x=u[B])<32||x>127&&x<E){this._oscParser.put(u,y,B),y=B-1;break}break;case 6:if(g=this._oscParser.end(x!==24&&x!==26),g)return this._preserveStack(5,[],0,S,y),g;x===27&&(S|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&S}}}a.EscapeSequenceParser=d},6242:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const p=h(5770),m=h(482),o=[];a.OscParser=class{constructor(){this._state=0,this._active=o,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(v,_){this._handlers[v]===void 0&&(this._handlers[v]=[]);const E=this._handlers[v];return E.push(_),{dispose:()=>{const d=E.indexOf(_);d!==-1&&E.splice(d,1)}}}clearHandler(v){this._handlers[v]&&delete this._handlers[v]}setHandlerFallback(v){this._handlerFb=v}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=o}reset(){if(this._state===2)for(let v=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;v>=0;--v)this._active[v].end(!1);this._stack.paused=!1,this._active=o,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||o,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].start();else this._handlerFb(this._id,"START")}_put(v,_,E){if(this._active.length)for(let d=this._active.length-1;d>=0;d--)this._active[d].put(v,_,E);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(v,_,E))}start(){this.reset(),this._state=1}put(v,_,E){if(this._state!==3){if(this._state===1)for(;_<E;){const d=v[_++];if(d===59){this._state=2,this._start();break}if(d<48||57<d)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+d-48}this._state===2&&E-_>0&&this._put(v,_,E)}}end(v,_=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let E=!1,d=this._active.length-1,s=!1;if(this._stack.paused&&(d=this._stack.loopPosition-1,E=_,s=this._stack.fallThrough,this._stack.paused=!1),!s&&E===!1){for(;d>=0&&(E=this._active[d].end(v),E!==!0);d--)if(E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!1,E;d--}for(;d>=0;d--)if(E=this._active[d].end(!1),E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!0,E}else this._handlerFb(this._id,"END",v);this._active=o,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(v){this._handler=v,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(v,_,E){this._hitLimit||(this._data+=(0,m.utf32ToString)(v,_,E),this._data.length>p.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(v){let _=!1;if(this._hitLimit)_=!1;else if(v&&(_=this._handler(this._data),_ instanceof Promise))return _.then((E=>(this._data="",this._hitLimit=!1,E)));return this._data="",this._hitLimit=!1,_}}},8742:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const h=2147483647;class p{static fromArray(o){const v=new p;if(!o.length)return v;for(let _=Array.isArray(o[0])?1:0;_<o.length;++_){const E=o[_];if(Array.isArray(E))for(let d=0;d<E.length;++d)v.addSubParam(E[d]);else v.addParam(E)}return v}constructor(o=32,v=32){if(this.maxLength=o,this.maxSubParamsLength=v,v>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(o),this.length=0,this._subParams=new Int32Array(v),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(o),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const o=new p(this.maxLength,this.maxSubParamsLength);return o.params.set(this.params),o.length=this.length,o._subParams.set(this._subParams),o._subParamsLength=this._subParamsLength,o._subParamsIdx.set(this._subParamsIdx),o._rejectDigits=this._rejectDigits,o._rejectSubDigits=this._rejectSubDigits,o._digitIsSub=this._digitIsSub,o}toArray(){const o=[];for(let v=0;v<this.length;++v){o.push(this.params[v]);const _=this._subParamsIdx[v]>>8,E=255&this._subParamsIdx[v];E-_>0&&o.push(Array.prototype.slice.call(this._subParams,_,E))}return o}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(o){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(o<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=o>h?h:o}}addSubParam(o){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(o<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=o>h?h:o,this._subParamsIdx[this.length-1]++}}hasSubParams(o){return(255&this._subParamsIdx[o])-(this._subParamsIdx[o]>>8)>0}getSubParams(o){const v=this._subParamsIdx[o]>>8,_=255&this._subParamsIdx[o];return _-v>0?this._subParams.subarray(v,_):null}getSubParamsAll(){const o={};for(let v=0;v<this.length;++v){const _=this._subParamsIdx[v]>>8,E=255&this._subParamsIdx[v];E-_>0&&(o[v]=this._subParams.slice(_,E))}return o}addDigit(o){let v;if(this._rejectDigits||!(v=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const _=this._digitIsSub?this._subParams:this.params,E=_[v-1];_[v-1]=~E?Math.min(10*E+o,h):o}}a.Params=p},5741:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let h=this._addons.length-1;h>=0;h--)this._addons[h].instance.dispose()}loadAddon(h,p){const m={instance:p,dispose:p.dispose,isDisposed:!1};this._addons.push(m),p.dispose=()=>this._wrappedAddonDispose(m),p.activate(h)}_wrappedAddonDispose(h){if(h.isDisposed)return;let p=-1;for(let m=0;m<this._addons.length;m++)if(this._addons[m]===h){p=m;break}if(p===-1)throw new Error("Could not dispose an addon that has not been loaded");h.isDisposed=!0,h.dispose.apply(h.instance),this._addons.splice(p,1)}}},8771:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const p=h(3785),m=h(511);a.BufferApiView=class{constructor(o,v){this._buffer=o,this.type=v}init(o){return this._buffer=o,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(o){const v=this._buffer.lines.get(o);if(v)return new p.BufferLineApiView(v)}getNullCell(){return new m.CellData}}},3785:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const p=h(511);a.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,o){if(!(m<0||m>=this._line.length))return o?(this._line.loadCell(m,o),o):this._line.loadCell(m,new p.CellData)}translateToString(m,o,v){return this._line.translateToString(m,o,v)}}},8285:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const p=h(8771),m=h(8460),o=h(844);class v extends o.Disposable{constructor(E){super(),this._core=E,this._onBufferChange=this.register(new m.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new p.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new p.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)}}a.BufferNamespaceApi=v},7975:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(h){this._core=h}registerCsiHandler(h,p){return this._core.registerCsiHandler(h,(m=>p(m.toArray())))}addCsiHandler(h,p){return this.registerCsiHandler(h,p)}registerDcsHandler(h,p){return this._core.registerDcsHandler(h,((m,o)=>p(m,o.toArray())))}addDcsHandler(h,p){return this.registerDcsHandler(h,p)}registerEscHandler(h,p){return this._core.registerEscHandler(h,p)}addEscHandler(h,p){return this.registerEscHandler(h,p)}registerOscHandler(h,p){return this._core.registerOscHandler(h,p)}addOscHandler(h,p){return this.registerOscHandler(h,p)}}},7090:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(h){this._core=h}register(h){this._core.unicodeService.register(h)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(h){this._core.unicodeService.activeVersion=h}}},744:function(R,a,h){var p=this&&this.__decorate||function(s,u,l,c){var g,x=arguments.length,S=x<3?u:c===null?c=Object.getOwnPropertyDescriptor(u,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(s,u,l,c);else for(var N=s.length-1;N>=0;N--)(g=s[N])&&(S=(x<3?g(S):x>3?g(u,l,S):g(u,l))||S);return x>3&&S&&Object.defineProperty(u,l,S),S},m=this&&this.__param||function(s,u){return function(l,c){u(l,c,s)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const o=h(8460),v=h(844),_=h(5295),E=h(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let d=a.BufferService=class extends v.Disposable{get buffer(){return this.buffers.active}constructor(s){super(),this.isUserScrolling=!1,this._onResize=this.register(new o.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new o.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(s.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(s.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new _.BufferSet(s,this))}resize(s,u){this.cols=s,this.rows=u,this.buffers.resize(s,u),this._onResize.fire({cols:s,rows:u})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(s,u=!1){const l=this.buffer;let c;c=this._cachedBlankLine,c&&c.length===this.cols&&c.getFg(0)===s.fg&&c.getBg(0)===s.bg||(c=l.getBlankLine(s,u),this._cachedBlankLine=c),c.isWrapped=u;const g=l.ybase+l.scrollTop,x=l.ybase+l.scrollBottom;if(l.scrollTop===0){const S=l.lines.isFull;x===l.lines.length-1?S?l.lines.recycle().copyFrom(c):l.lines.push(c.clone()):l.lines.splice(x+1,0,c.clone()),S?this.isUserScrolling&&(l.ydisp=Math.max(l.ydisp-1,0)):(l.ybase++,this.isUserScrolling||l.ydisp++)}else{const S=x-g+1;l.lines.shiftElements(g+1,S-1,-1),l.lines.set(x,c.clone())}this.isUserScrolling||(l.ydisp=l.ybase),this._onScroll.fire(l.ydisp)}scrollLines(s,u,l){const c=this.buffer;if(s<0){if(c.ydisp===0)return;this.isUserScrolling=!0}else s+c.ydisp>=c.ybase&&(this.isUserScrolling=!1);const g=c.ydisp;c.ydisp=Math.max(Math.min(c.ydisp+s,c.ybase),0),g!==c.ydisp&&(u||this._onScroll.fire(c.ydisp))}};a.BufferService=d=p([m(0,E.IOptionsService)],d)},7994:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(h){this.glevel=h,this.charset=this._charsets[h]}setgCharset(h,p){this._charsets[h]=p,this.glevel===h&&(this.charset=p)}}},1753:function(R,a,h){var p=this&&this.__decorate||function(c,g,x,S){var N,y=arguments.length,D=y<3?g:S===null?S=Object.getOwnPropertyDescriptor(g,x):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(c,g,x,S);else for(var k=c.length-1;k>=0;k--)(N=c[k])&&(D=(y<3?N(D):y>3?N(g,x,D):N(g,x))||D);return y>3&&D&&Object.defineProperty(g,x,D),D},m=this&&this.__param||function(c,g){return function(x,S){g(x,S,c)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const o=h(2585),v=h(8460),_=h(844),E={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:c=>c.button!==4&&c.action===1&&(c.ctrl=!1,c.alt=!1,c.shift=!1,!0)},VT200:{events:19,restrict:c=>c.action!==32},DRAG:{events:23,restrict:c=>c.action!==32||c.button!==3},ANY:{events:31,restrict:c=>!0}};function d(c,g){let x=(c.ctrl?16:0)|(c.shift?4:0)|(c.alt?8:0);return c.button===4?(x|=64,x|=c.action):(x|=3&c.button,4&c.button&&(x|=64),8&c.button&&(x|=128),c.action===32?x|=32:c.action!==0||g||(x|=3)),x}const s=String.fromCharCode,u={DEFAULT:c=>{const g=[d(c,!1)+32,c.col+32,c.row+32];return g[0]>255||g[1]>255||g[2]>255?"":`\x1B[M${s(g[0])}${s(g[1])}${s(g[2])}`},SGR:c=>{const g=c.action===0&&c.button!==4?"m":"M";return`\x1B[<${d(c,!0)};${c.col};${c.row}${g}`},SGR_PIXELS:c=>{const g=c.action===0&&c.button!==4?"m":"M";return`\x1B[<${d(c,!0)};${c.x};${c.y}${g}`}};let l=a.CoreMouseService=class extends _.Disposable{constructor(c,g){super(),this._bufferService=c,this._coreService=g,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new v.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const x of Object.keys(E))this.addProtocol(x,E[x]);for(const x of Object.keys(u))this.addEncoding(x,u[x]);this.reset()}addProtocol(c,g){this._protocols[c]=g}addEncoding(c,g){this._encodings[c]=g}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(c){if(!this._protocols[c])throw new Error(`unknown protocol "${c}"`);this._activeProtocol=c,this._onProtocolChange.fire(this._protocols[c].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(c){if(!this._encodings[c])throw new Error(`unknown encoding "${c}"`);this._activeEncoding=c}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(c){if(c.col<0||c.col>=this._bufferService.cols||c.row<0||c.row>=this._bufferService.rows||c.button===4&&c.action===32||c.button===3&&c.action!==32||c.button!==4&&(c.action===2||c.action===3)||(c.col++,c.row++,c.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,c,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(c))return!1;const g=this._encodings[this._activeEncoding](c);return g&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(g):this._coreService.triggerDataEvent(g,!0)),this._lastEvent=c,!0}explainEvents(c){return{down:!!(1&c),up:!!(2&c),drag:!!(4&c),move:!!(8&c),wheel:!!(16&c)}}_equalEvents(c,g,x){if(x){if(c.x!==g.x||c.y!==g.y)return!1}else if(c.col!==g.col||c.row!==g.row)return!1;return c.button===g.button&&c.action===g.action&&c.ctrl===g.ctrl&&c.alt===g.alt&&c.shift===g.shift}};a.CoreMouseService=l=p([m(0,o.IBufferService),m(1,o.ICoreService)],l)},6975:function(R,a,h){var p=this&&this.__decorate||function(l,c,g,x){var S,N=arguments.length,y=N<3?c:x===null?x=Object.getOwnPropertyDescriptor(c,g):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(l,c,g,x);else for(var D=l.length-1;D>=0;D--)(S=l[D])&&(y=(N<3?S(y):N>3?S(c,g,y):S(c,g))||y);return N>3&&y&&Object.defineProperty(c,g,y),y},m=this&&this.__param||function(l,c){return function(g,x){c(g,x,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const o=h(1439),v=h(8460),_=h(844),E=h(2585),d=Object.freeze({insertMode:!1}),s=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let u=a.CoreService=class extends _.Disposable{constructor(l,c,g){super(),this._bufferService=l,this._logService=c,this._optionsService=g,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new v.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new v.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,o.clone)(d),this.decPrivateModes=(0,o.clone)(s)}reset(){this.modes=(0,o.clone)(d),this.decPrivateModes=(0,o.clone)(s)}triggerDataEvent(l,c=!1){if(this._optionsService.rawOptions.disableStdin)return;const g=this._bufferService.buffer;c&&this._optionsService.rawOptions.scrollOnUserInput&&g.ybase!==g.ydisp&&this._onRequestScrollToBottom.fire(),c&&this._onUserInput.fire(),this._logService.debug(`sending data "${l}"`,(()=>l.split("").map((x=>x.charCodeAt(0))))),this._onData.fire(l)}triggerBinaryEvent(l){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${l}"`,(()=>l.split("").map((c=>c.charCodeAt(0))))),this._onBinary.fire(l))}};a.CoreService=u=p([m(0,E.IBufferService),m(1,E.ILogService),m(2,E.IOptionsService)],u)},9074:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const p=h(8055),m=h(8460),o=h(844),v=h(6106);let _=0,E=0;class d extends o.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new v.SortedList((l=>l==null?void 0:l.marker.line)),this._onDecorationRegistered=this.register(new m.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new m.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,o.toDisposable)((()=>this.reset())))}registerDecoration(l){if(l.marker.isDisposed)return;const c=new s(l);if(c){const g=c.marker.onDispose((()=>c.dispose()));c.onDispose((()=>{c&&(this._decorations.delete(c)&&this._onDecorationRemoved.fire(c),g.dispose())})),this._decorations.insert(c),this._onDecorationRegistered.fire(c)}return c}reset(){for(const l of this._decorations.values())l.dispose();this._decorations.clear()}*getDecorationsAtCell(l,c,g){let x=0,S=0;for(const N of this._decorations.getKeyIterator(c))x=N.options.x??0,S=x+(N.options.width??1),l>=x&&l<S&&(!g||(N.options.layer??"bottom")===g)&&(yield N)}forEachDecorationAtCell(l,c,g,x){this._decorations.forEachByKey(c,(S=>{_=S.options.x??0,E=_+(S.options.width??1),l>=_&&l<E&&(!g||(S.options.layer??"bottom")===g)&&x(S)}))}}a.DecorationService=d;class s extends o.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=p.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=p.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(l){super(),this.options=l,this.onRenderEmitter=this.register(new m.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new m.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=l.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const p=h(2585),m=h(8343);class o{constructor(..._){this._entries=new Map;for(const[E,d]of _)this.set(E,d)}set(_,E){const d=this._entries.get(_);return this._entries.set(_,E),d}forEach(_){for(const[E,d]of this._entries.entries())_(E,d)}has(_){return this._entries.has(_)}get(_){return this._entries.get(_)}}a.ServiceCollection=o,a.InstantiationService=class{constructor(){this._services=new o,this._services.set(p.IInstantiationService,this)}setService(v,_){this._services.set(v,_)}getService(v){return this._services.get(v)}createInstance(v,..._){const E=(0,m.getServiceDependencies)(v).sort(((u,l)=>u.index-l.index)),d=[];for(const u of E){const l=this._services.get(u.id);if(!l)throw new Error(`[createInstance] ${v.name} depends on UNKNOWN service ${u.id}.`);d.push(l)}const s=E.length>0?E[0].index:_.length;if(_.length!==s)throw new Error(`[createInstance] First service dependency of ${v.name} at position ${s+1} conflicts with ${_.length} static arguments`);return new v(..._,...d)}}},7866:function(R,a,h){var p=this&&this.__decorate||function(s,u,l,c){var g,x=arguments.length,S=x<3?u:c===null?c=Object.getOwnPropertyDescriptor(u,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(s,u,l,c);else for(var N=s.length-1;N>=0;N--)(g=s[N])&&(S=(x<3?g(S):x>3?g(u,l,S):g(u,l))||S);return x>3&&S&&Object.defineProperty(u,l,S),S},m=this&&this.__param||function(s,u){return function(l,c){u(l,c,s)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const o=h(844),v=h(2585),_={trace:v.LogLevelEnum.TRACE,debug:v.LogLevelEnum.DEBUG,info:v.LogLevelEnum.INFO,warn:v.LogLevelEnum.WARN,error:v.LogLevelEnum.ERROR,off:v.LogLevelEnum.OFF};let E,d=a.LogService=class extends o.Disposable{get logLevel(){return this._logLevel}constructor(s){super(),this._optionsService=s,this._logLevel=v.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),E=this}_updateLogLevel(){this._logLevel=_[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(s){for(let u=0;u<s.length;u++)typeof s[u]=="function"&&(s[u]=s[u]())}_log(s,u,l){this._evalLazyOptionalParams(l),s.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+u,...l)}trace(s,...u){var l;this._logLevel<=v.LogLevelEnum.TRACE&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.trace.bind(this._optionsService.options.logger))??console.log,s,u)}debug(s,...u){var l;this._logLevel<=v.LogLevelEnum.DEBUG&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.debug.bind(this._optionsService.options.logger))??console.log,s,u)}info(s,...u){var l;this._logLevel<=v.LogLevelEnum.INFO&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.info.bind(this._optionsService.options.logger))??console.info,s,u)}warn(s,...u){var l;this._logLevel<=v.LogLevelEnum.WARN&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.warn.bind(this._optionsService.options.logger))??console.warn,s,u)}error(s,...u){var l;this._logLevel<=v.LogLevelEnum.ERROR&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.error.bind(this._optionsService.options.logger))??console.error,s,u)}};a.LogService=d=p([m(0,v.IOptionsService)],d),a.setTraceLogger=function(s){E=s},a.traceCall=function(s,u,l){if(typeof l.value!="function")throw new Error("not supported");const c=l.value;l.value=function(...g){if(E.logLevel!==v.LogLevelEnum.TRACE)return c.apply(this,g);E.trace(`GlyphRenderer#${c.name}(${g.map((S=>JSON.stringify(S))).join(", ")})`);const x=c.apply(this,g);return E.trace(`GlyphRenderer#${c.name} return`,x),x}}},7302:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const p=h(8460),m=h(844),o=h(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:o.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const v=["normal","bold","100","200","300","400","500","600","700","800","900"];class _ extends m.Disposable{constructor(d){super(),this._onOptionChange=this.register(new p.EventEmitter),this.onOptionChange=this._onOptionChange.event;const s={...a.DEFAULT_OPTIONS};for(const u in d)if(u in s)try{const l=d[u];s[u]=this._sanitizeAndValidateOption(u,l)}catch(l){console.error(l)}this.rawOptions=s,this.options={...s},this._setupOptions(),this.register((0,m.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(d,s){return this.onOptionChange((u=>{u===d&&s(this.rawOptions[d])}))}onMultipleOptionChange(d,s){return this.onOptionChange((u=>{d.indexOf(u)!==-1&&s()}))}_setupOptions(){const d=u=>{if(!(u in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${u}"`);return this.rawOptions[u]},s=(u,l)=>{if(!(u in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${u}"`);l=this._sanitizeAndValidateOption(u,l),this.rawOptions[u]!==l&&(this.rawOptions[u]=l,this._onOptionChange.fire(u))};for(const u in this.rawOptions){const l={get:d.bind(this,u),set:s.bind(this,u)};Object.defineProperty(this.options,u,l)}}_sanitizeAndValidateOption(d,s){switch(d){case"cursorStyle":if(s||(s=a.DEFAULT_OPTIONS[d]),!(function(u){return u==="block"||u==="underline"||u==="bar"})(s))throw new Error(`"${s}" is not a valid value for ${d}`);break;case"wordSeparator":s||(s=a.DEFAULT_OPTIONS[d]);break;case"fontWeight":case"fontWeightBold":if(typeof s=="number"&&1<=s&&s<=1e3)break;s=v.includes(s)?s:a.DEFAULT_OPTIONS[d];break;case"cursorWidth":s=Math.floor(s);case"lineHeight":case"tabStopWidth":if(s<1)throw new Error(`${d} cannot be less than 1, value: ${s}`);break;case"minimumContrastRatio":s=Math.max(1,Math.min(21,Math.round(10*s)/10));break;case"scrollback":if((s=Math.min(s,4294967295))<0)throw new Error(`${d} cannot be less than 0, value: ${s}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(s<=0)throw new Error(`${d} cannot be less than or equal to 0, value: ${s}`);break;case"rows":case"cols":if(!s&&s!==0)throw new Error(`${d} must be numeric, value: ${s}`);break;case"windowsPty":s=s??{}}return s}}a.OptionsService=_},2660:function(R,a,h){var p=this&&this.__decorate||function(_,E,d,s){var u,l=arguments.length,c=l<3?E:s===null?s=Object.getOwnPropertyDescriptor(E,d):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(_,E,d,s);else for(var g=_.length-1;g>=0;g--)(u=_[g])&&(c=(l<3?u(c):l>3?u(E,d,c):u(E,d))||c);return l>3&&c&&Object.defineProperty(E,d,c),c},m=this&&this.__param||function(_,E){return function(d,s){E(d,s,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const o=h(2585);let v=a.OscLinkService=class{constructor(_){this._bufferService=_,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(_){const E=this._bufferService.buffer;if(_.id===void 0){const g=E.addMarker(E.ybase+E.y),x={data:_,id:this._nextId++,lines:[g]};return g.onDispose((()=>this._removeMarkerFromLink(x,g))),this._dataByLinkId.set(x.id,x),x.id}const d=_,s=this._getEntryIdKey(d),u=this._entriesWithId.get(s);if(u)return this.addLineToLink(u.id,E.ybase+E.y),u.id;const l=E.addMarker(E.ybase+E.y),c={id:this._nextId++,key:this._getEntryIdKey(d),data:d,lines:[l]};return l.onDispose((()=>this._removeMarkerFromLink(c,l))),this._entriesWithId.set(c.key,c),this._dataByLinkId.set(c.id,c),c.id}addLineToLink(_,E){const d=this._dataByLinkId.get(_);if(d&&d.lines.every((s=>s.line!==E))){const s=this._bufferService.buffer.addMarker(E);d.lines.push(s),s.onDispose((()=>this._removeMarkerFromLink(d,s)))}}getLinkData(_){var E;return(E=this._dataByLinkId.get(_))==null?void 0:E.data}_getEntryIdKey(_){return`${_.id};;${_.uri}`}_removeMarkerFromLink(_,E){const d=_.lines.indexOf(E);d!==-1&&(_.lines.splice(d,1),_.lines.length===0&&(_.data.id!==void 0&&this._entriesWithId.delete(_.key),this._dataByLinkId.delete(_.id)))}};a.OscLinkService=v=p([m(0,o.IBufferService)],v)},8343:(R,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const h="di$target",p="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(m){return m[p]||[]},a.createDecorator=function(m){if(a.serviceRegistry.has(m))return a.serviceRegistry.get(m);const o=function(v,_,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(d,s,u){s[h]===s?s[p].push({id:d,index:u}):(s[p]=[{id:d,index:u}],s[h]=s)})(o,v,E)};return o.toString=()=>m,a.serviceRegistry.set(m,o),o}},2585:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const p=h(8343);var m;a.IBufferService=(0,p.createDecorator)("BufferService"),a.ICoreMouseService=(0,p.createDecorator)("CoreMouseService"),a.ICoreService=(0,p.createDecorator)("CoreService"),a.ICharsetService=(0,p.createDecorator)("CharsetService"),a.IInstantiationService=(0,p.createDecorator)("InstantiationService"),(function(o){o[o.TRACE=0]="TRACE",o[o.DEBUG=1]="DEBUG",o[o.INFO=2]="INFO",o[o.WARN=3]="WARN",o[o.ERROR=4]="ERROR",o[o.OFF=5]="OFF"})(m||(a.LogLevelEnum=m={})),a.ILogService=(0,p.createDecorator)("LogService"),a.IOptionsService=(0,p.createDecorator)("OptionsService"),a.IOscLinkService=(0,p.createDecorator)("OscLinkService"),a.IUnicodeService=(0,p.createDecorator)("UnicodeService"),a.IDecorationService=(0,p.createDecorator)("DecorationService")},1480:(R,a,h)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const p=h(8460),m=h(225);class o{static extractShouldJoin(_){return(1&_)!=0}static extractWidth(_){return _>>1&3}static extractCharKind(_){return _>>3}static createPropertyValue(_,E,d=!1){return(16777215&_)<<3|(3&E)<<1|(d?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new p.EventEmitter,this.onChange=this._onChange.event;const _=new m.UnicodeV6;this.register(_),this._active=_.version,this._activeProvider=_}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(_){if(!this._providers[_])throw new Error(`unknown Unicode version "${_}"`);this._active=_,this._activeProvider=this._providers[_],this._onChange.fire(_)}register(_){this._providers[_.version]=_}wcwidth(_){return this._activeProvider.wcwidth(_)}getStringCellWidth(_){let E=0,d=0;const s=_.length;for(let u=0;u<s;++u){let l=_.charCodeAt(u);if(55296<=l&&l<=56319){if(++u>=s)return E+this.wcwidth(l);const x=_.charCodeAt(u);56320<=x&&x<=57343?l=1024*(l-55296)+x-56320+65536:E+=this.wcwidth(x)}const c=this.charProperties(l,d);let g=o.extractWidth(c);o.extractShouldJoin(c)&&(g-=o.extractWidth(d)),E+=g,d=c}return E}charProperties(_,E){return this._activeProvider.charProperties(_,E)}}a.UnicodeService=o}},F={};function U(R){var a=F[R];if(a!==void 0)return a.exports;var h=F[R]={exports:{}};return O[R].call(h.exports,h,h.exports,U),h.exports}var J={};return(()=>{var R=J;Object.defineProperty(R,"__esModule",{value:!0}),R.Terminal=void 0;const a=U(9042),h=U(3236),p=U(844),m=U(5741),o=U(8285),v=U(7975),_=U(7090),E=["cols","rows"];class d extends p.Disposable{constructor(u){super(),this._core=this.register(new h.Terminal(u)),this._addonManager=this.register(new m.AddonManager),this._publicOptions={...this._core.options};const l=g=>this._core.options[g],c=(g,x)=>{this._checkReadonlyOptions(g),this._core.options[g]=x};for(const g in this._core.options){const x={get:l.bind(this,g),set:c.bind(this,g)};Object.defineProperty(this._publicOptions,g,x)}}_checkReadonlyOptions(u){if(E.includes(u))throw new Error(`Option "${u}" 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 v.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new _.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 o.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const u=this._core.coreService.decPrivateModes;let l="none";switch(this._core.coreMouseService.activeProtocol){case"X10":l="x10";break;case"VT200":l="vt200";break;case"DRAG":l="drag";break;case"ANY":l="any"}return{applicationCursorKeysMode:u.applicationCursorKeys,applicationKeypadMode:u.applicationKeypad,bracketedPasteMode:u.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:l,originMode:u.origin,reverseWraparoundMode:u.reverseWraparound,sendFocusMode:u.sendFocus,wraparoundMode:u.wraparound}}get options(){return this._publicOptions}set options(u){for(const l in u)this._publicOptions[l]=u[l]}blur(){this._core.blur()}focus(){this._core.focus()}input(u,l=!0){this._core.input(u,l)}resize(u,l){this._verifyIntegers(u,l),this._core.resize(u,l)}open(u){this._core.open(u)}attachCustomKeyEventHandler(u){this._core.attachCustomKeyEventHandler(u)}attachCustomWheelEventHandler(u){this._core.attachCustomWheelEventHandler(u)}registerLinkProvider(u){return this._core.registerLinkProvider(u)}registerCharacterJoiner(u){return this._checkProposedApi(),this._core.registerCharacterJoiner(u)}deregisterCharacterJoiner(u){this._checkProposedApi(),this._core.deregisterCharacterJoiner(u)}registerMarker(u=0){return this._verifyIntegers(u),this._core.registerMarker(u)}registerDecoration(u){return this._checkProposedApi(),this._verifyPositiveIntegers(u.x??0,u.width??0,u.height??0),this._core.registerDecoration(u)}hasSelection(){return this._core.hasSelection()}select(u,l,c){this._verifyIntegers(u,l,c),this._core.select(u,l,c)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(u,l){this._verifyIntegers(u,l),this._core.selectLines(u,l)}dispose(){super.dispose()}scrollLines(u){this._verifyIntegers(u),this._core.scrollLines(u)}scrollPages(u){this._verifyIntegers(u),this._core.scrollPages(u)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(u){this._verifyIntegers(u),this._core.scrollToLine(u)}clear(){this._core.clear()}write(u,l){this._core.write(u,l)}writeln(u,l){this._core.write(u),this._core.write(`\r
273
+ `,l)}paste(u){this._core.paste(u)}refresh(u,l){this._verifyIntegers(u,l),this._core.refresh(u,l)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(u){this._addonManager.loadAddon(this,u)}static get strings(){return a}_verifyIntegers(...u){for(const l of u)if(l===1/0||isNaN(l)||l%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...u){for(const l of u)if(l&&(l===1/0||isNaN(l)||l%1!=0||l<0))throw new Error("This API only accepts positive integers")}}R.Terminal=d})(),J})()))})(Pv)),Pv.exports}var KA=YA();const XA=60;function JA(){return new URLSearchParams(window.location.search).get("renderer")==="webgl"?"webgl":"canvas"}const R0={dark:{background:"#12141a",foreground:"#d8dee9",cursor:"#d8dee9",selectionBackground:"#2f3542"},light:{background:"#fbfbfd",foreground:"#22262e",cursor:"#22262e",selectionBackground:"#cfd8e3"}};function lS({terminalId:w,connection:b,active:O,theme:F,autoFocus:U=!0}){const J=K.useRef(null),R=K.useRef(null),a=K.useRef(null),h=K.useRef(F);return h.current=F,K.useEffect(()=>{const p=J.current;if(p===null)return;const m=new KA.Terminal({convertEol:!1,cursorBlink:!0,fontFamily:'"Cascadia Mono", "Consolas", "Menlo", "DejaVu Sans Mono", monospace',fontSize:14,lineHeight:1.2,scrollback:1e4,allowProposedApi:!0,theme:R0[h.current]});R.current=m;const o=new $A.FitAddon;a.current=o,m.loadAddon(o),m.loadAddon(new WA.WebLinksAddon),m.open(p);let v=!1;const _=()=>{if(!(v||JA()!=="webgl")){v=!0;try{const D=new GA.WebglAddon;D.onContextLoss(()=>D.dispose()),m.loadAddon(D)}catch{console.info("[terminal] WebGL no disponible; se usa el renderer por defecto.")}}};let E={cols:0,rows:0},d;const s=()=>p.clientWidth>0&&p.clientHeight>0,u=D=>{const{cols:k,rows:I}=m;k<=0||I<=0||k===E.cols&&I===E.rows||(E={cols:k,rows:I},b.send({type:"resize",terminalId:w,cols:k,rows:I}))},l=()=>{if(s()){try{o.fit()}catch{return}m.cols>0&&m.rows>0&&_(),u()}},c=()=>{window.clearTimeout(d),d=window.setTimeout(l,XA)},g=new ResizeObserver(c);g.observe(p),window.addEventListener("resize",c);const x=m.onData(D=>{b.send({type:"input",terminalId:w,data:D})}),S=b.onMessage(D=>{switch(D.type){case"terminal.output":D.terminalId===w&&m.write(D.data);break;case"terminal.replay":if(D.terminalId!==w)break;m.reset(),D.truncated&&m.write(`\x1B[90m-- salida anterior recortada --\x1B[0m\r
274
+ `),m.write(D.data);break;case"terminal.exit":if(D.terminalId!==w)break;m.write(`\r
275
+ \x1B[90m-- el proceso termino (codigo ${D.exitCode}) --\x1B[0m\r
276
+ `);break}}),N=()=>{if(s())try{o.fit()}catch{}const D=m.cols>0?m.cols:80,k=m.rows>0?m.rows:24;E={cols:D,rows:k},b.send({type:"terminal.attach",terminalId:w,cols:D,rows:k})};N();const y=b.onReopen(N);return()=>{window.clearTimeout(d),window.removeEventListener("resize",c),g.disconnect(),x.dispose(),S(),y(),b.send({type:"terminal.detach",terminalId:w}),m.dispose(),R.current=null,a.current=null}},[w,b]),K.useEffect(()=>{const p=R.current;p!==null&&(p.options.theme=R0[F])},[F]),K.useEffect(()=>{if(!O)return;const p=R.current,m=a.current;if(p===null||m===null)return;const o=window.setTimeout(()=>{const v=J.current;if(!(v===null||v.clientWidth===0||v.clientHeight===0)){try{m.fit()}catch{return}U&&p.focus(),p.cols>0&&p.rows>0&&b.send({type:"resize",terminalId:w,cols:p.cols,rows:p.rows})}},0);return()=>window.clearTimeout(o)},[O,U,w,b]),T.jsxDEV("div",{className:`terminal-surface${O?"":" terminal-surface-hidden"}`,ref:J},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/TerminalView.tsx",lineNumber:286,columnNumber:5},this)}function QA({connection:w,shells:b,activeShellId:O,cwd:F,shellName:U,theme:J,onSelect:R,onOpen:a,onCloseShell:h,onCollapse:p}){const m=U??"Consola",o=b.find(v=>v.terminalId===O)??b[0]??null;return T.jsxDEV("section",{className:"console-pane",children:[T.jsxDEV("header",{className:"console-header",children:[T.jsxDEV("div",{className:"strip-tabs",children:[b.map((v,_)=>T.jsxDEV("div",{className:`strip-tab${v.terminalId===(o==null?void 0:o.terminalId)?" is-active":""}${v.alive?"":" is-dead"}`,children:[T.jsxDEV("button",{className:"strip-tab-label",onClick:()=>R(v.terminalId),title:v.alive?`${m} ${_+1} en ${F}`:`Terminada con codigo ${v.exitCode??"?"}`,children:["Terminal ",_+1]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:84,columnNumber:15},this),T.jsxDEV("button",{className:"strip-tab-close",onClick:()=>h(v.terminalId),title:"Cerrar esta terminal y terminar su proceso",children:"×"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:95,columnNumber:15},this)]},v.terminalId,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:78,columnNumber:13},this)),U!==null&&T.jsxDEV("button",{className:"strip-tab-new",onClick:a,title:`Abrir otra ${m} en ${F}`,children:"+"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:106,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:76,columnNumber:9},this),T.jsxDEV("span",{className:"strip-spacer"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:116,columnNumber:9},this),T.jsxDEV("button",{className:"icon-button",onClick:p,title:"Plegar. Los procesos siguen vivos: para terminarlos, la × de cada terminal",children:"▾"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:117,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:75,columnNumber:7},this),T.jsxDEV("div",{className:"console-body",children:b.length===0?T.jsxDEV("div",{className:"console-empty",children:U===null?T.jsxDEV("p",{className:"panel-note",children:"No se encontró ninguna consola del sistema para abrir."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:130,columnNumber:15},this):T.jsxDEV("button",{className:"link-button",onClick:a,children:["Abrir ",m," en ",F]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:132,columnNumber:15},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:128,columnNumber:11},this):T.jsxDEV("div",{className:"terminal-stack",children:b.map(v=>T.jsxDEV(lS,{terminalId:v.terminalId,connection:w,active:v.terminalId===(o==null?void 0:o.terminalId),theme:J},v.terminalId,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:140,columnNumber:15},this))},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:138,columnNumber:11},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:126,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConsolePane.tsx",lineNumber:74,columnNumber:5},this)}const ZA=.75,e5=.9;function Gi(w){if(w<1e3)return String(w);if(w<1e6){const b=w/1e3;return`${b<100?b.toFixed(1):Math.round(b)}k`}return`${(w/1e6).toFixed(2)}M`}function t5({usage:w,fallbackWindow:b=null,compact:O=!1}){const{lastRequestTokens:F,contextWindow:U}=w;if(w.assistantMessages===0)return T.jsxDEV("div",{className:`meter meter-idle${O?" meter-compact":""}`,title:"La sesion todavia no midio ninguna respuesta. No arranca en cero: el prompt de sistema, las herramientas y el CLAUDE.md ya ocupan contexto, y el numero real aparece con la primera respuesta.",children:[T.jsxDEV("span",{className:"meter-label",children:"Contexto"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:85,columnNumber:9},this),T.jsxDEV("span",{className:`meter-bar${O?" meter-bar-inline":""}`},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:86,columnNumber:9},this),T.jsxDEV("span",{className:"meter-value",children:["sin medir",b!==null&&T.jsxDEV("span",{className:"meter-dim",children:[" / ",Gi(b)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:90,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:87,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:84,columnNumber:7},this);const J=U!==null&&U>0?Math.min(F/U,1):null,R=J===null?"unknown":J>=e5?"danger":J>=ZA?"warn":"ok",a=U===null?"":` / ${Gi(U)}${w.contextWindowEstimated?"+":""}`;if(O){const h=[w.lastModel===null?null:w.lastModel,w.contextWindowEstimated?"limite deducido de los tokens medidos":null,J===null?"modelo no reconocido: sin tamano de ventana":`${Math.round(J*100)}% de la ventana`,`salida ${Gi(w.lastOutputTokens)}`,`sesion ${Gi(w.totalOutputTokens)} out · ${Gi(w.totalCacheReadTokens)} cache · ${w.assistantMessages} resp.`].filter(p=>p!==null).join(" · ");return T.jsxDEV("div",{className:"meter meter-compact",title:h,children:[T.jsxDEV("span",{className:"meter-label",children:"Contexto"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:129,columnNumber:9},this),J!==null&&T.jsxDEV("span",{className:"meter-bar meter-bar-inline",children:T.jsxDEV("span",{className:`meter-fill meter-fill-${R}`,style:{width:`${J*100}%`}},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:132,columnNumber:13},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:131,columnNumber:11},this),T.jsxDEV("span",{className:"meter-value",children:[Gi(F),a.length>0&&T.jsxDEV("span",{className:"meter-dim",children:a},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:140,columnNumber:33},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:138,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:128,columnNumber:7},this)}return T.jsxDEV("div",{className:"meter",children:[T.jsxDEV("div",{className:"meter-row",children:[T.jsxDEV("span",{className:"meter-label",children:"Contexto"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:149,columnNumber:9},this),T.jsxDEV("span",{className:"meter-value",children:[Gi(F),U!==null&&T.jsxDEV("span",{className:"meter-dim",title:w.lastModel===null?void 0:w.contextWindowEstimated?`${w.lastModel} — limite deducido de los tokens medidos`:w.lastModel,children:[" ","/ ",Gi(U),w.contextWindowEstimated&&"+"]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:153,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:150,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:148,columnNumber:7},this),J!==null?T.jsxDEV("div",{className:"meter-bar",title:`${Math.round(J*100)}% de la ventana`,children:T.jsxDEV("div",{className:`meter-fill meter-fill-${R}`,style:{width:`${J*100}%`}},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:179,columnNumber:11},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:178,columnNumber:9},this):T.jsxDEV("div",{className:"meter-note",title:w.lastModel??void 0,children:"modelo no reconocido: se muestran los tokens, no el tamano de la ventana"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:186,columnNumber:9},this),T.jsxDEV("div",{className:"meter-row meter-row-dim",children:[T.jsxDEV("span",{title:"Ultima respuesta del modelo",children:["salida ",Gi(w.lastOutputTokens)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:192,columnNumber:9},this),T.jsxDEV("span",{title:"Acumulado de toda la sesion",children:["sesion ",Gi(w.totalOutputTokens)," out ·"," ",Gi(w.totalCacheReadTokens)," cache · ",w.assistantMessages," resp."]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:195,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:191,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ContextMeter.tsx",lineNumber:147,columnNumber:5},this)}const r5="modulepreload",i5=function(w){return"/"+w},A0={},cS=function(b,O,F){let U=Promise.resolve();if(O&&O.length>0){let R=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(o=>({status:"fulfilled",value:o}),o=>({status:"rejected",reason:o}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),h=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));U=R(O.map(p=>{if(p=i5(p),p in A0)return;A0[p]=!0;const m=p.endsWith(".css"),o=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${o}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":r5,m||(v.as="script"),v.crossOrigin="",v.href=p,h&&v.setAttribute("nonce",h),document.head.appendChild(v),m)return new Promise((_,E)=>{v.addEventListener("load",_),v.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${p}`)))})}))}function J(R){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=R,window.dispatchEvent(a),!a.defaultPrevented)throw R}return U.then(R=>{for(const a of R||[])a.status==="rejected"&&J(a.reason);return b().catch(J)})};function Zs(w,b,O){if(b.length===0)return[w];const F=w.toLowerCase(),U=b.toLowerCase(),J=[];let R=0,a=F.indexOf(U),h=0;for(;a!==-1;)a>R&&J.push(w.slice(R,a)),J.push(T.jsxDEV("mark",{children:w.slice(a,a+b.length)},`${O}-m${h++}`,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:36,columnNumber:16},this)),R=a+b.length,a=F.indexOf(U,R);return R<w.length&&J.push(w.slice(R)),J}const n5=/(`[^`\n]+`)|(\*\*[^*\n]+\*\*)|(__[^_\n]+__)|(\*[^*\n]+\*)|(~~[^~\n]+~~)|(\[[^\]\n]+\]\([^)\s]+\))/;function to(w,b,O){const F=[];let U=w,J=0;for(;U.length>0;){const R=n5.exec(U);if(R===null||R.index===void 0){F.push(...Zs(U,b,`${O}-${J++}`));break}R.index>0&&F.push(...Zs(U.slice(0,R.index),b,`${O}-${J++}`));const a=R[0],h=`${O}-i${J++}`;if(a.startsWith("`"))F.push(T.jsxDEV("code",{children:a.slice(1,-1)},h,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:75,columnNumber:18},this));else if(a.startsWith("**")||a.startsWith("__"))F.push(T.jsxDEV("strong",{children:Zs(a.slice(2,-2),b,h)},h,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:77,columnNumber:18},this));else if(a.startsWith("~~"))F.push(T.jsxDEV("del",{children:Zs(a.slice(2,-2),b,h)},h,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:79,columnNumber:18},this));else if(a.startsWith("*"))F.push(T.jsxDEV("em",{children:Zs(a.slice(1,-1),b,h)},h,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:81,columnNumber:18},this));else{const p=a.indexOf("]("),m=a.slice(1,p),o=a.slice(p+2,-1),v=/^(https?:|mailto:)/i.test(o);F.push(v?T.jsxDEV("a",{href:o,target:"_blank",rel:"noreferrer noopener",children:Zs(m,b,h)},h,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:90,columnNumber:11},this):T.jsxDEV("span",{children:Zs(a,b,h)},h,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:94,columnNumber:11},this))}U=U.slice(R.index+a.length)}return F}function s5({code:w,language:b}){const[O,F]=K.useState(null);return K.useEffect(()=>{let U=!0;return cS(async()=>{const{highlightCode:J}=await import("./highlight-B0RyEt-U.js");return{highlightCode:J}},[]).then(({highlightCode:J})=>{U&&F(J(w,b))}).catch(()=>{U&&F(null)}),()=>{U=!1}},[w,b]),T.jsxDEV("pre",{className:"md-code hljs",children:[b!==null&&T.jsxDEV("span",{className:"md-code-lang",children:b},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:127,columnNumber:29},this),O===null?T.jsxDEV("code",{children:w},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:130,columnNumber:24},this):T.jsxDEV("code",{dangerouslySetInnerHTML:{__html:O}},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:130,columnNumber:46},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:126,columnNumber:5},this)}const T0=/^(#{1,6})\s+(.*)$/,Iv=/^\s{0,3}[-*+]\s+(.*)$/,lh=/^\s{0,3}(\d{1,3})[.)]\s+(.*)$/,ch=/^>\s?(.*)$/,Fv=/^\s*```(\S*)\s*$/,L0=/^\s*(-{3,}|\*{3,}|_{3,})\s*$/,jv=/^\s*\|.*\|\s*$/,a5=/^\s*\|[\s:|-]+\|\s*$/;function M0(w){return w.trim().replace(/^\||\|$/g,"").split("|").map(b=>b.trim())}function o5({text:w,needle:b=""}){var J;const O=w.split(`
277
+ `),F=[];let U=0;for(;U<O.length;){const R=O[U]??"",a=`b${U}`,h=Fv.exec(R);if(h!==null){const o=(h[1]??"").length>0?h[1]:null,v=[];for(U+=1;U<O.length&&!Fv.test(O[U]??"");)v.push(O[U]??""),U+=1;U+=1,F.push({key:a,node:T.jsxDEV(s5,{code:v.join(`
278
+ `),language:o},a,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:186,columnNumber:15},this)});continue}if(R.trim().length===0){U+=1;continue}if(L0.test(R)){F.push({key:a,node:T.jsxDEV("hr",{className:"md-rule"},a,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:197,columnNumber:32},this)}),U+=1;continue}const p=T0.exec(R);if(p!==null){const o=Math.min((p[1]??"#").length,6);F.push({key:a,node:T.jsxDEV("p",{className:`md-heading md-h${o}`,children:to(p[2]??"",b,a)},a,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:209,columnNumber:11},this)}),U+=1;continue}if(jv.test(R)&&a5.test(O[U+1]??"")){const o=M0(R);U+=2;const v=[];for(;U<O.length&&jv.test(O[U]??"");)v.push(M0(O[U]??"")),U+=1;F.push({key:a,node:T.jsxDEV("div",{className:"md-table-wrap",children:T.jsxDEV("table",{className:"md-table",children:[T.jsxDEV("thead",{children:T.jsxDEV("tr",{children:o.map((_,E)=>T.jsxDEV("th",{children:to(_,b,`${a}-h${E}`)},E,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:235,columnNumber:21},this))},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:233,columnNumber:17},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:232,columnNumber:15},this),T.jsxDEV("tbody",{children:v.map((_,E)=>T.jsxDEV("tr",{children:_.map((d,s)=>T.jsxDEV("td",{children:to(d,b,`${a}-${E}-${s}`)},s,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:243,columnNumber:23},this))},E,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:241,columnNumber:19},this))},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:239,columnNumber:15},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:231,columnNumber:13},this)},a,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:230,columnNumber:11},this)});continue}if(ch.test(R)){const o=[];for(;U<O.length&&ch.test(O[U]??"");)o.push(((J=ch.exec(O[U]??""))==null?void 0:J[1])??""),U+=1;F.push({key:a,node:T.jsxDEV("blockquote",{className:"md-quote",children:to(o.join(`
279
+ `),b,a)},a,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:265,columnNumber:11},this)});continue}if(Iv.test(R)||lh.test(R)){const o=lh.test(R),v=[];for(;U<O.length;){const E=O[U]??"",d=Iv.exec(E),s=lh.exec(E);if(o&&s!==null)v.push(s[2]??"");else if(!o&&d!==null)v.push(d[1]??"");else if(v.length>0&&/^\s{2,}\S/.test(E)&&d===null&&s===null)v[v.length-1]=`${v[v.length-1]??""} ${E.trim()}`;else break;U+=1}const _=v.map((E,d)=>T.jsxDEV("li",{children:to(E,b,`${a}-l${d}`)},d,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:296,columnNumber:9},this));F.push({key:a,node:o?T.jsxDEV("ol",{className:"md-list",children:_},a,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:301,columnNumber:11},this):T.jsxDEV("ul",{className:"md-list",children:_},a,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:305,columnNumber:11},this)});continue}const m=[];for(;U<O.length;){const o=O[U]??"";if(o.trim().length===0||Fv.test(o)||T0.test(o)||Iv.test(o)||lh.test(o)||ch.test(o)||L0.test(o)||jv.test(o))break;m.push(o),U+=1}F.push({key:a,node:T.jsxDEV("p",{className:"md-paragraph",children:to(m.join(`
280
+ `),b,a)},a,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:335,columnNumber:9},this)})}return T.jsxDEV("div",{className:"md",children:F.map(R=>R.node)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Markdown.tsx",lineNumber:342,columnNumber:10},this)}const Vv={model:null,effort:null,contextWindow:null},l5=200,c5=2e4,u5={},h5={};function Kv(w,b,O){return`${w}:${O}:${b}`}function d5(w,b){const[O,F]=K.useState([]),[U,J]=K.useState(Rv),[R,a]=K.useState(Vv),[h,p]=K.useState("waiting"),[m,o]=K.useState(!1),[v,_]=K.useState(!1),[E,d]=K.useState({}),[s,u]=K.useState(null),[l,c]=K.useState(null),[g,x]=K.useState({}),[S,N]=K.useState({}),y=(b===null?void 0:g[b])??u5,D=(b===null?void 0:S[b])??h5,k=K.useRef(new Set),I=K.useRef(new Map),L=K.useRef(new Set),B=K.useCallback((q,Y,re)=>{N(ae=>({...ae,[q]:{...ae[q]??{},[Y]:re}}))},[]),V=K.useCallback(q=>{N(Y=>{let re=!1;const ae={};for(const[ve,ye]of Object.entries(Y))if(q in ye){const Q={...ye};delete Q[q],ae[ve]=Q,re=!0}else ae[ve]=ye;return re?ae:Y})},[]),X=K.useCallback((q,Y)=>{N(re=>{const ae=re[q];if(ae===void 0||!(Y in ae))return re;const ve={...ae};return delete ve[Y],{...re,[q]:ve}})},[]);K.useEffect(()=>{for(const q of O)for(const Y of q.parts){if(Y.kind!=="tool-result")continue;L.current.add(Y.toolUseId);const re=I.current.get(Y.toolUseId);re!==void 0&&(window.clearTimeout(re),I.current.delete(Y.toolUseId)),V(Y.toolUseId)}},[O,V]),K.useEffect(()=>{const q=I.current;return()=>{for(const Y of q.values())window.clearTimeout(Y);q.clear()}},[]);const ee=K.useRef(null);K.useEffect(()=>{if(b===null){F([]),J(Rv),a(Vv),p("waiting"),o(!1),ee.current=null;return}F([]),J(Rv),a(Vv),p("waiting"),o(!1),_(!1),d({}),u(null),c(null),k.current.clear(),ee.current=null;const q=w.onMessage(re=>{var ae;switch(re.type){case"conversation.reset":if(re.terminalId!==b)break;F(re.events),J(re.usage),a(re.defaults),u(re.permissionMode),c(re.waitingFor),p(re.state),o(re.hasMore),_(!1),ee.current=((ae=re.events[0])==null?void 0:ae.eventId)??null;break;case"conversation.append":{if(re.terminalId!==b)break;F(ve=>{var $;const ye=new Set(ve.map(he=>he.eventId)),Q=re.events.filter(he=>!ye.has(he.eventId));return Q.length===0?ve:(ee.current===null&&(ee.current=(($=Q[0])==null?void 0:$.eventId)??null),[...ve,...Q])}),J(re.usage),re.permissionMode!==null&&u(re.permissionMode),p("live");break}case"conversation.page":{if(re.terminalId!==b)break;F(ve=>{var $;const ye=new Set(ve.map(he=>he.eventId)),Q=re.events.filter(he=>!ye.has(he.eventId));return Q.length===0?ve:(ee.current=(($=Q[0])==null?void 0:$.eventId)??ee.current,[...Q,...ve])}),o(re.hasMore),_(!1);break}case"conversation.turns":{if(re.terminalId!==b)break;const ve=new Map(re.turns.map(ye=>[ye.eventId,ye.durationMs]));F(ye=>ye.map(Q=>{const $=ve.get(Q.eventId);return $===void 0?Q:{...Q,durationMs:$}}));break}case"conversation.parts":{if(re.terminalId!==b)break;const ve=new Map(re.updates.map(ye=>[ye.eventId,ye.parts]));F(ye=>ye.map(Q=>{const $=ve.get(Q.eventId);return $===void 0?Q:{...Q,parts:$}}));break}case"conversation.imageData":{if(re.terminalId!==b)break;const ve=Kv(re.eventId,re.index,re.source);d(ye=>({...ye,[ve]:re.data===null?null:`data:${re.mediaType};base64,${re.data}`}));break}case"conversation.state":if(re.terminalId!==b)break;p(re.state);break;case"conversation.mode":if(re.terminalId!==b)break;u(re.mode);break;case"conversation.waiting":if(re.terminalId!==b)break;c(re.waitingFor);break;case"error":{if(re.code!=="answer-failed"||b===null)break;for(const[ve,ye]of I.current)window.clearTimeout(ye),I.current.delete(ve),x(Q=>{const $=Q[b];if($===void 0||!(ve in $))return Q;const he={...$};return delete he[ve],{...Q,[b]:he}}),B(b,ve,re.message);break}}});w.send({type:"conversation.subscribe",terminalId:b});const Y=w.onReopen(()=>{w.send({type:"conversation.subscribe",terminalId:b})});return()=>{q(),Y(),w.send({type:"conversation.unsubscribe",terminalId:b})}},[w,b,B]);const Z=K.useCallback(()=>{const q=ee.current;b===null||q===null||v||(_(!0),w.send({type:"conversation.loadMore",terminalId:b,beforeEventId:q,limit:l5}))},[w,b,v]),ie=K.useCallback((q,Y,re)=>{if(b===null)return;const ae=Kv(q,Y,re);k.current.has(ae)||(k.current.add(ae),w.send({type:"conversation.image",terminalId:b,eventId:q,index:Y,source:re}))},[w,b]),P=K.useCallback((q,Y)=>{if(b===null)return;x(ae=>{const ve=ae[b]??{};return q in ve?ae:{...ae,[b]:{...ve,[q]:Y}}}),X(b,q),w.send({type:"agent.answer",terminalId:b,toolUseId:q,selections:Y});const re=window.setTimeout(()=>{L.current.has(q)||(x(ae=>{const ve=ae[b];if(ve===void 0||!(q in ve))return ae;const ye={...ve};return delete ye[q],{...ae,[b]:ye}}),B(b,q,"La CLI no confirmo esta respuesta. Probá de nuevo, o contestá en la solapa CLI."))},c5);I.current.set(q,re)},[w,b,B,X]),H=K.useCallback(q=>{b!==null&&w.send({type:"agent.mode",terminalId:b,mode:q})},[w,b]);return{events:O,usage:U,defaults:R,state:h,permissionMode:s,waitingFor:l,hasMore:m,loadingMore:v,loadMore:Z,images:E,requestImage:ie,answer:P,answered:y,answerFailed:D,setPermissionMode:H}}const f5=80,O0=5,p5=[{key:"shell",names:["Bash","PowerShell","BashOutput","KillShell"],label:"comandos de consola"},{key:"read",names:["Read","NotebookRead"],label:"archivos leidos"},{key:"find",names:["Glob","Grep","LS"],label:"busquedas en el proyecto"},{key:"edit",names:["Edit","Write","NotebookEdit","MultiEdit"],label:"ediciones"},{key:"web",names:["WebSearch","WebFetch","ToolSearch"],label:"busquedas"},{key:"agent",names:["Task","Agent"],label:"subagentes"},{key:"todo",names:["TodoWrite"],label:"listas de tareas"}];function Hv(w){const b=p5.find(O=>O.names.includes(w));return b===void 0?{key:`name:${w}`,label:null}:b}function uh(w){return!Array.isArray(w)}function B0(w){const b=[];for(const O of w.parts){if(O.kind!=="tool-call")return null;b.push(O.name)}return b.length>0?b:null}function v5(w){const b=[];let O=0;for(;O<w.length;){const F=w[O];if(F===void 0)break;const U=B0(F),J=U===null?null:Hv(U[0]??"");if(!(U!==null&&J!==null&&U.every(o=>Hv(o).key===J.key))||U===null||J===null){b.push({kind:"card",card:F}),O+=1;continue}const a=[F];let h=U.length,p=O+1;for(;p<w.length;){const o=w[p];if(o===void 0)break;const v=B0(o);if(v===null||!v.every(_=>Hv(_).key===J.key))break;a.push(o),h+=v.length,p+=1}if(h<2){b.push({kind:"card",card:F}),O+=1;continue}const m=J.label??`llamadas a ${U[0]??""}`;b.push({kind:"tools",id:`tools-${F.event.eventId}`,summary:`${h} ${m}`,at:F.event.at,cards:a}),O=p}return b}function m5(w){switch(w.kind){case"text":return w.text;case"tool-call":return`${w.name} ${w.input}`;case"tool-result":return w.text;case"question":return w.questions.map(b=>`${b.question} ${b.options.map(O=>O.label).join(" ")}`).join(`
281
+ `);case"thinking":case"image":return""}}function P0(w,b){const O=[];for(const F of w.parts)if(O.push(m5(F)),F.kind==="tool-call"){const U=b.get(F.toolUseId);U!==void 0&&O.push(U.text)}return O.join(`
282
+ `)}function uS(w){return w<=0?"":new Date(w).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function g5(w){if(w<1e3)return`${w} ms`;const b=Math.round(w/1e3);if(b<60)return`${b} s`;const O=Math.floor(b/60),F=b%60;return F===0?`${O} min`:`${O} min ${F} s`}function Kl(w,b){if(b.length===0)return T.jsxDEV(T.Fragment,{children:w},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:227,columnNumber:35},this);const O=w.toLowerCase(),F=b.toLowerCase(),U=[];let J=0,R=O.indexOf(F),a=0;for(;R!==-1;)R>J&&U.push(T.jsxDEV("span",{children:w.slice(J,R)},a++,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:237,columnNumber:34},this)),U.push(T.jsxDEV("mark",{children:w.slice(R,R+b.length)},a++,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:238,columnNumber:16},this)),J=R+b.length,R=O.indexOf(F,J);return J<w.length&&U.push(T.jsxDEV("span",{children:w.slice(J)},a++,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:242,columnNumber:38},this)),T.jsxDEV(T.Fragment,{children:U},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:244,columnNumber:10},this)}function _5({view:w,onRewind:b,onGoToCli:O}){const{events:F,usage:U,defaults:J,state:R,waitingFor:a,hasMore:h,loadingMore:p,loadMore:m,images:o,requestImage:v,answer:_,answered:E,answerFailed:d}=w,[s,u]=K.useState(""),[l,c]=K.useState(0),[g,x]=K.useState(null),S=K.useRef(null),N=K.useRef(new Map),y=K.useRef(!0),{cards:D,results:k}=K.useMemo(()=>{const H=new Map,q=new Set;for(const re of F)for(const ae of re.parts)ae.kind==="tool-result"?H.set(ae.toolUseId,ae):(ae.kind==="tool-call"||ae.kind==="question")&&q.add(ae.toolUseId);const Y=[];for(const re of F){const ae=re.parts.filter(ve=>ve.kind!=="thinking"&&!(ve.kind==="tool-result"&&q.has(ve.toolUseId)));ae.length!==0&&Y.push({event:re,parts:ae})}return{cards:Y,results:H}},[F]),I=K.useMemo(()=>v5(D),[D]),L=s.trim(),B=K.useMemo(()=>{if(L.length===0)return[];const H=L.toLowerCase();return D.filter(q=>P0(q,k).toLowerCase().includes(H)).map(q=>q.event.eventId)},[D,k,L]);K.useEffect(()=>{c(0)},[L]);const V=K.useMemo(()=>new Set(B),[B]),X=B[l]??null;K.useEffect(()=>{var H;X!==null&&((H=N.current.get(X))==null||H.scrollIntoView({block:"center"}))},[X]),K.useLayoutEffect(()=>{const H=S.current;H===null||!y.current||L.length>0||(H.scrollTop=H.scrollHeight)},[D.length,L]);const ee=K.useCallback(()=>{const H=S.current;if(H===null)return;const q=H.scrollHeight-H.scrollTop-H.clientHeight;y.current=q<=f5},[]),Z=K.useCallback((H,q)=>{q===null?N.current.delete(H):N.current.set(H,q)},[]),ie=K.useCallback(H=>{const q=P0(H,k);navigator.clipboard.writeText(q).then(()=>{x(H.event.eventId),window.setTimeout(()=>x(null),1200)}).catch(()=>x(null))},[k]),P=H=>{B.length!==0&&c(q=>(q+H+B.length)%B.length)};return T.jsxDEV("div",{className:"conversation-pane",children:[T.jsxDEV("div",{className:"conversation-search",children:[T.jsxDEV("input",{className:"conversation-search-input",type:"search",placeholder:"Buscar en la conversacion",value:s,onChange:H=>u(H.target.value),onKeyDown:H=>{H.key==="Enter"&&P(H.shiftKey?-1:1),H.stopPropagation()},spellCheck:!1},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:390,columnNumber:9},this),L.length>0&&T.jsxDEV(T.Fragment,{children:[T.jsxDEV("span",{className:"conversation-matches",children:B.length===0?"sin resultados":`${l+1}/${B.length}`},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:404,columnNumber:13},this),T.jsxDEV("button",{className:"icon-button",onClick:()=>P(-1),disabled:B.length===0,title:"Anterior",children:"↑"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:407,columnNumber:13},this),T.jsxDEV("button",{className:"icon-button",onClick:()=>P(1),disabled:B.length===0,title:"Siguiente",children:"↓"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:415,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:403,columnNumber:11},this),T.jsxDEV("span",{className:"conversation-spacer"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:425,columnNumber:9},this),T.jsxDEV(t5,{usage:U,fallbackWindow:J.contextWindow,compact:!0},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:426,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:389,columnNumber:7},this),T.jsxDEV("div",{className:"conversation-scroll",ref:S,onScroll:ee,children:[h&&T.jsxDEV("button",{className:"conversation-more",onClick:m,disabled:p,children:p?"Cargando...":"Cargar mensajes anteriores"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:431,columnNumber:11},this),D.length===0&&T.jsxDEV("p",{className:"conversation-empty",children:R==="unavailable"?"Esta pestana no tiene un directorio conocido, asi que no hay archivo de sesion que seguir.":R==="waiting"?"Esperando el primer mensaje. El archivo de la sesion se crea cuando la conversacion arranca.":"La sesion todavia no tiene mensajes."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:437,columnNumber:11},this),I.map(H=>{if(H.kind==="card")return T.jsxDEV(I0,{card:H.card,results:k,needle:L,isMatch:H.card.event.eventId===X,copied:g===H.card.event.eventId,images:o,onRequestImage:v,onCopy:()=>ie(H.card),onRewind:b,register:Z,answered:E,answerFailed:d,onAnswer:_},H.card.event.eventId,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:449,columnNumber:15},this);const q=H.cards.some(Y=>V.has(Y.event.eventId));return T.jsxDEV(y5,{summary:H.summary,at:H.at,open:q,children:H.cards.map(Y=>T.jsxDEV(I0,{card:Y,results:k,needle:L,isMatch:Y.event.eventId===X,copied:g===Y.event.eventId,images:o,onRequestImage:v,onCopy:()=>ie(Y),onRewind:b,register:Z,answered:E,answerFailed:d,onAnswer:_},Y.event.eventId,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:475,columnNumber:17},this))},H.id,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:473,columnNumber:13},this)})]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:429,columnNumber:7},this),T.jsxDEV(b5,{waitingFor:a,onGoToCli:O},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:497,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:388,columnNumber:5},this)}function b5({waitingFor:w,onGoToCli:b}){if(w===null)return null;const O=w==="permission prompt"?"La CLI esta esperando que autorices una herramienta.":"La CLI esta esperando una respuesta tuya.";return T.jsxDEV("div",{className:"conversation-waiting",role:"status",children:[T.jsxDEV("span",{className:"conversation-waiting-dot","aria-hidden":"true"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:533,columnNumber:7},this),T.jsxDEV("span",{children:O},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:534,columnNumber:7},this),T.jsxDEV("button",{className:"link-button",onClick:b,children:"Ir a la solapa CLI"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:535,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:532,columnNumber:5},this)}function I0({card:w,results:b,needle:O,isMatch:F,copied:U,images:J,onRequestImage:R,onCopy:a,onRewind:h,register:p,answered:m,answerFailed:o,onAnswer:v}){const{event:_}=w,E=_.role==="user",d=s=>{const u=m[s.toolUseId];return u!==void 0?u:b.has(s.toolUseId)?[]:null};return T.jsxDEV("article",{ref:s=>p(_.eventId,s),className:`turn turn-${_.role}${F?" turn-match":""}`,children:[T.jsxDEV("div",{className:"turn-actions",children:[T.jsxDEV("button",{className:"icon-button",onClick:a,title:"Copiar el texto de este mensaje",children:U?"✓":"⧉"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:604,columnNumber:9},this),E&&T.jsxDEV("button",{className:"icon-button",onClick:h,title:"Volver aqui — abre el menu de rewind de la CLI en la pestaña CLI (Esc Esc)",children:"↩"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:608,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:603,columnNumber:7},this),w.parts.map((s,u)=>T.jsxDEV(C5,{part:s,eventId:_.eventId,mine:E,result:s.kind==="tool-call"?b.get(s.toolUseId)??null:null,needle:O,images:J,onRequestImage:R,answeredAt:s.kind==="question"?d(s):null,failure:s.kind==="question"?o[s.toolUseId]??null:null,onAnswer:v},u,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:619,columnNumber:9},this)),T.jsxDEV(S5,{event:_,mine:E},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:634,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:594,columnNumber:5},this)}function y5({summary:w,at:b,open:O,children:F}){const U=uS(b);return T.jsxDEV("details",{className:"tool-group",open:O,children:[T.jsxDEV("summary",{className:"tool-group-summary",children:[T.jsxDEV("span",{className:"tool-group-chevron","aria-hidden":"true",children:"▸"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:666,columnNumber:9},this),T.jsxDEV("span",{className:"tool-group-count",children:w},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:669,columnNumber:9},this),U.length>0&&T.jsxDEV("span",{className:"tool-group-time",children:U},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:670,columnNumber:29},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:665,columnNumber:7},this),T.jsxDEV("div",{className:"tool-group-body",children:F},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:672,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:664,columnNumber:5},this)}function S5({event:w,mine:b}){const O=uS(w.at),F=[];return w.durationMs!==null&&F.push(g5(w.durationMs)),w.effort!==null&&F.push(`esfuerzo ${w.effort}`),T.jsxDEV("div",{className:"turn-meta",children:[b&&T.jsxDEV("span",{className:"turn-who",children:"Vos"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:686,columnNumber:16},this),O.length>0&&T.jsxDEV("span",{children:O},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:687,columnNumber:27},this),w.queued&&T.jsxDEV("span",{className:"turn-queued",title:"Lo escribiste con el agente trabajando: entro en el turno que ya estaba en curso",children:"enviado mientras trabajaba"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:694,columnNumber:9},this),F.map(U=>T.jsxDEV("span",{className:"turn-meta-bit",children:U},U,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:702,columnNumber:9},this))]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:685,columnNumber:5},this)}function C5({part:w,eventId:b,mine:O,result:F,needle:U,images:J,onRequestImage:R,answeredAt:a,failure:h,onAnswer:p}){switch(w.kind){case"text":return O?T.jsxDEV(x5,{text:w.text,truncated:w.truncated,needle:U},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:742,columnNumber:9},this):T.jsxDEV("div",{className:"part-text",children:[T.jsxDEV(o5,{text:w.text,needle:U},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:745,columnNumber:11},this),w.truncated&&T.jsxDEV("span",{className:"part-truncated",children:" … (recortado)"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:746,columnNumber:30},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:744,columnNumber:9},this);case"image":return T.jsxDEV(w5,{eventId:b,index:w.index,source:w.source,src:J[Kv(b,w.index,w.source)],onRequest:R},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:752,columnNumber:9},this);case"thinking":return null;case"question":return T.jsxDEV(E5,{part:w,answeredAt:a,failure:h,onAnswer:p,needle:U},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:766,columnNumber:9},this);case"tool-call":{const m=U.length>0&&`${w.name} ${w.input} ${(F==null?void 0:F.text)??""}`.toLowerCase().includes(U.toLowerCase());return T.jsxDEV("details",{className:"tool",open:m,children:[T.jsxDEV("summary",{className:"tool-summary",children:[T.jsxDEV("span",{className:"tool-name",children:w.name},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:785,columnNumber:13},this),F!==null&&F.isError&&T.jsxDEV("span",{className:"tool-error",children:"error"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:786,columnNumber:51},this),F!==null&&F.imageCount>0&&T.jsxDEV("span",{className:"tool-images",children:[F.imageCount," img"]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:788,columnNumber:15},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:784,columnNumber:11},this),T.jsxDEV("div",{className:"tool-block",children:[T.jsxDEV("span",{className:"tool-label",children:"entrada"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:793,columnNumber:13},this),T.jsxDEV("pre",{className:"tool-pre",children:[Kl(w.input,U),w.truncated&&T.jsxDEV("span",{className:"part-truncated",children:" … (recortado)"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:796,columnNumber:34},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:794,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:792,columnNumber:11},this),F!==null&&T.jsxDEV("div",{className:"tool-block",children:[T.jsxDEV("span",{className:"tool-label",children:"resultado"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:802,columnNumber:15},this),T.jsxDEV("pre",{className:`tool-pre${F.isError?" tool-pre-error":""}`,children:[F.text.length>0?Kl(F.text,U):F.imageCount>0?`(${F.imageCount} imagen(es): no se transportan al panel)`:"(sin salida)",F.truncated&&T.jsxDEV("span",{className:"part-truncated",children:" … (recortado)"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:809,columnNumber:38},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:803,columnNumber:15},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:801,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:783,columnNumber:9},this)}case"tool-result":return T.jsxDEV("div",{className:"tool-block",children:[T.jsxDEV("span",{className:"tool-label",children:"resultado suelto"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:821,columnNumber:11},this),T.jsxDEV("pre",{className:`tool-pre${w.isError?" tool-pre-error":""}`,children:Kl(w.text,U)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:822,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:820,columnNumber:9},this)}}function E5({part:w,answeredAt:b,failure:O,onAnswer:F,needle:U}){var c;const[J,R]=K.useState(()=>w.questions.map(()=>[])),[a,h]=K.useState(null),[p,m]=K.useState(""),o=b!==null,v=b??J,_=w.questions.length===1&&((c=w.questions[0])==null?void 0:c.multiSelect)===!1,E=v.every(g=>uh(g)?g.text.trim().length>0:g.length>0),d=g=>g===void 0||uh(g)?[]:g,s=(g,x)=>{if(o)return;const S=w.questions[g];if(S!==void 0){if(_){F(w.toolUseId,[[x]]);return}h(N=>N===g?null:N),R(N=>N.map((y,D)=>{if(D!==g)return y;const k=d(y);return S.multiSelect?k.includes(x)?k.filter(I=>I!==x):[...k,x]:[x]}))}},u=g=>{const x=p.trim();if(x.length===0)return;const S={kind:"free",text:x};if(_){F(w.toolUseId,[S]);return}R(N=>N.map((y,D)=>D===g?S:y)),h(null),m("")},l=g=>{if(o)return;const x=v[g];m(x!==void 0&&uh(x)?x.text:""),h(g)};return T.jsxDEV("div",{className:`question${o?" question-done":""}`,children:[w.questions.map((g,x)=>{const S=v[x],N=S!==void 0&&uh(S)?S.text:null;return T.jsxDEV("div",{className:"question-item",children:[T.jsxDEV("div",{className:"question-head",children:[g.header.length>0&&T.jsxDEV("span",{className:"question-header",children:g.header},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:951,columnNumber:17},this),T.jsxDEV("span",{className:"question-text",children:Kl(g.question,U)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:953,columnNumber:15},this),g.multiSelect&&T.jsxDEV("span",{className:"question-hint",children:"varias"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:954,columnNumber:40},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:949,columnNumber:13},this),T.jsxDEV("div",{className:"question-options",children:[g.options.map((y,D)=>{const k=d(S).includes(D);return T.jsxDEV("button",{type:"button",className:`question-option${k?" question-option-picked":""}`,disabled:o,onClick:()=>s(x,D),children:[T.jsxDEV("span",{className:"question-option-label",children:y.label},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:968,columnNumber:21},this),y.description.length>0&&T.jsxDEV("span",{className:"question-option-desc",children:y.description},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:970,columnNumber:23},this)]},D,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:961,columnNumber:19},this)}),a===x&&!o?T.jsxDEV("div",{className:"question-write",children:[T.jsxDEV("textarea",{className:"question-write-input",autoFocus:!0,rows:2,value:p,placeholder:"Escribi tu respuesta",onChange:y=>m(y.target.value),onKeyDown:y=>{y.key==="Enter"&&!y.shiftKey&&(y.preventDefault(),u(x)),y.key==="Escape"&&h(null),y.stopPropagation()}},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:983,columnNumber:19},this),T.jsxDEV("div",{className:"question-write-actions",children:[T.jsxDEV("button",{type:"button",className:"question-send",disabled:p.trim().length===0,onClick:()=>u(x),children:_?"Enviar":"Usar este texto"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1002,columnNumber:21},this),T.jsxDEV("button",{type:"button",className:"question-write-cancel",onClick:()=>h(null),children:"Cancelar"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1010,columnNumber:21},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1001,columnNumber:19},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:982,columnNumber:17},this):T.jsxDEV("button",{type:"button",className:`question-option question-option-write${N!==null?" question-option-picked":""}`,disabled:o,onClick:()=>l(x),children:[T.jsxDEV("span",{className:"question-option-label",children:N!==null?N:"Escribir otra respuesta…"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1028,columnNumber:19},this),N===null&&T.jsxDEV("span",{className:"question-option-desc",children:"Para proponer una alternativa, o dar mas contexto"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1032,columnNumber:21},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1020,columnNumber:17},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:957,columnNumber:13},this)]},x,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:948,columnNumber:11},this)}),T.jsxDEV("div",{className:"question-foot",children:[O!==null&&T.jsxDEV("span",{className:"question-failed",children:O},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1044,columnNumber:30},this),o?T.jsxDEV("span",{className:"question-sent",children:"Respondida"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1046,columnNumber:11},this):T.jsxDEV(T.Fragment,{children:[!_&&T.jsxDEV("button",{type:"button",className:"question-send",disabled:!E,onClick:()=>F(w.toolUseId,J),children:"Enviar respuestas"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1050,columnNumber:15},this),T.jsxDEV("span",{className:"question-note",children:[_?"Elegí una opción":"Elegí en cada pregunta"," · también podés responder en la solapa CLI"]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1059,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1048,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1043,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:942,columnNumber:5},this)}function x5({text:w,truncated:b,needle:O}){const[F,U]=K.useState(!1),J=w.split(`
283
+ `),R=O.length>0&&w.toLowerCase().includes(O.toLowerCase()),a=J.length>=O0&&!R,h=a&&!F?J.slice(0,O0-1).join(`
284
+ `):w;return T.jsxDEV("div",{className:"part-text part-mine",children:[Kl(h,O),b&&T.jsxDEV("span",{className:"part-truncated",children:" … (recortado)"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1095,columnNumber:21},this),a&&T.jsxDEV("button",{className:"fold-toggle",onClick:()=>U(p=>!p),children:F?"ver menos":`ver las ${J.length} lineas`},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1097,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1093,columnNumber:5},this)}function w5({eventId:w,index:b,source:O,src:F,onRequest:U}){const[J,R]=K.useState(!1);return K.useEffect(()=>{F===void 0&&U(w,b,O)},[F,w,b,O,U]),F===void 0?T.jsxDEV("div",{className:"conversation-image-placeholder",children:"cargando imagen…"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1136,columnNumber:12},this):F===null?T.jsxDEV("div",{className:"conversation-image-placeholder",children:"la imagen ya no esta en el archivo"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1139,columnNumber:12},this):T.jsxDEV(T.Fragment,{children:[T.jsxDEV("img",{className:"conversation-image",src:F,alt:"imagen del mensaje",onClick:()=>R(!0),title:"Clic para verla entera"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1144,columnNumber:7},this),J&&T.jsxDEV(aS,{src:F,caption:"imagen del mensaje",onClose:()=>R(!1)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1152,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ConversationView.tsx",lineNumber:1143,columnNumber:5},this)}function D5({connection:w,onOpen:b,onClose:O}){const[F,U]=K.useState(null),[J,R]=K.useState(null),[a,h]=K.useState(!1),[p,m]=K.useState(""),o=K.useRef(null),v=K.useRef(null);K.useEffect(()=>{const s=w.onMessage(u=>{if(u.type==="picker.listing"){o.current=u.listing.pickerId,U(u.listing),R(null),h(!1),m("");return}u.type==="error"&&u.code==="picker-failed"&&R(u.message)});return w.send({type:"picker.open"}),()=>{s();const u=o.current;u!==null&&w.send({type:"picker.close",pickerId:u})}},[w]),K.useEffect(()=>{const s=u=>{u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),O())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[O]),K.useEffect(()=>{var s;a&&((s=v.current)==null||s.focus())},[a]);const _=K.useCallback(s=>{const u=o.current;u!==null&&w.send({type:"picker.enter",pickerId:u,name:s})},[w]),E=K.useCallback(s=>{const u=o.current;u!==null&&w.send({type:"picker.root",pickerId:u,rootIndex:s})},[w]),d=K.useCallback(()=>{const s=o.current,u=p.trim();s===null||u.length===0||w.send({type:"picker.create",pickerId:s,name:u})},[w,p]);return T.jsxDEV("div",{className:"modal-backdrop",onClick:O,children:T.jsxDEV("div",{className:"modal picker-modal",role:"dialog","aria-label":"Elegir la carpeta del proyecto",onClick:s=>s.stopPropagation(),children:[T.jsxDEV("header",{className:"modal-header",children:[T.jsxDEV("span",{className:"modal-title",children:"Proyecto nuevo"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:114,columnNumber:11},this),T.jsxDEV("button",{className:"icon-button",onClick:O,title:"Cerrar",children:"×"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:115,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:113,columnNumber:9},this),F===null?T.jsxDEV("p",{className:"panel-note",children:"Leyendo el disco..."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:121,columnNumber:11},this):T.jsxDEV(T.Fragment,{children:[T.jsxDEV("div",{className:"picker-roots",children:F.roots.map((s,u)=>T.jsxDEV("button",{className:"picker-root",onClick:()=>E(u),title:`Ir a ${s}`,children:s},s,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:126,columnNumber:17},this))},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:124,columnNumber:13},this),T.jsxDEV("p",{className:"picker-path",title:F.path,children:F.path},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:138,columnNumber:13},this),T.jsxDEV("div",{className:"picker-list",children:[F.canGoUp&&T.jsxDEV("button",{className:"picker-entry picker-up",onClick:()=>_(".."),children:"‹ carpeta superior"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:144,columnNumber:17},this),F.entries.length===0&&!F.canGoUp&&T.jsxDEV("p",{className:"panel-note",children:"No hay subcarpetas aca."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:150,columnNumber:17},this),F.entries.map(s=>T.jsxDEV("button",{className:"picker-entry",onClick:()=>_(s),children:s},s,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:154,columnNumber:17},this)),F.truncated&&T.jsxDEV("p",{className:"panel-note",children:"Hay mas subcarpetas de las que entran en la lista. Entra a una para acotar."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:160,columnNumber:17},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:142,columnNumber:13},this),J!==null&&T.jsxDEV("p",{className:"picker-problem",children:J},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:166,columnNumber:34},this),T.jsxDEV("footer",{className:"picker-footer",children:[a?T.jsxDEV("div",{className:"picker-create",children:[T.jsxDEV("input",{ref:v,className:"picker-create-input",value:p,placeholder:"Nombre de la carpeta",onChange:s=>m(s.target.value),onKeyDown:s=>{s.key==="Enter"&&d(),s.key==="Escape"&&(s.stopPropagation(),h(!1)),s.stopPropagation()},spellCheck:!1},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:171,columnNumber:19},this),T.jsxDEV("button",{className:"link-button",onClick:d,children:"Crear"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:188,columnNumber:19},this),T.jsxDEV("button",{className:"link-button",onClick:()=>h(!1),children:"Cancelar"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:191,columnNumber:19},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:170,columnNumber:17},this):T.jsxDEV("button",{className:"link-button",onClick:()=>h(!0),children:"Crear una carpeta aca"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:196,columnNumber:17},this),T.jsxDEV("span",{className:"composer-spacer"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:201,columnNumber:15},this),T.jsxDEV("button",{className:"picker-open",onClick:()=>b(F.path),title:`Abrir una pestana del agente en ${F.path}`,children:"Abrir aca"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:203,columnNumber:15},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:168,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:123,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:107,columnNumber:7},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FolderPicker.tsx",lineNumber:106,columnNumber:5},this)}const N5=[{keys:"Alt + T",description:"Nueva pestaña en el directorio de la pestaña actual"},{keys:"Alt + W",description:"Cerrar la pestaña activa"},{keys:"Alt + ← / →",description:"Pestaña anterior / siguiente"},{keys:"Alt + P",description:"Mostrar u ocultar el panel derecho"},{keys:"Shift + Tab",description:"Volver a la pestaña anterior (fuera de la terminal: adentro es de la CLI)"}],k5=[{keys:"Enter",description:"Enviar el mensaje"},{keys:"Shift + Enter",description:"Salto de línea sin enviar"},{keys:"Ctrl + V",description:"Pegar texto o una imagen (queda como miniatura)"},{keys:"Esc",description:"Interrumpir lo que la CLI esté haciendo"}],R5=[{keys:"Esc",description:"Interrumpir lo que la CLI esté haciendo"},{keys:"Esc Esc",description:"Abrir el menú de rewind"},{keys:"Ctrl + C",description:"Cancelar"},{keys:"Ctrl + R",description:"Buscar en el historial de comandos"},{keys:"Ctrl + O",description:"Ver la salida completa"},{keys:"Shift + Tab",description:"Cambiar el modo de permisos (con el foco en la terminal)"},{keys:"Alt + V",description:"Pegar una imagen del portapapeles"},{keys:"Ctrl + V",description:"Pegar texto del portapapeles"}];function A5({onClose:w}){return K.useEffect(()=>{const b=O=>{O.key==="Escape"&&(O.preventDefault(),O.stopPropagation(),w())};return window.addEventListener("keydown",b,!0),()=>window.removeEventListener("keydown",b,!0)},[w]),T.jsxDEV("div",{className:"modal-backdrop",onClick:w,children:T.jsxDEV("div",{className:"modal",role:"dialog","aria-label":"Atajos de teclado",onClick:b=>b.stopPropagation(),children:[T.jsxDEV("header",{className:"modal-header",children:[T.jsxDEV("span",{className:"modal-title",children:"Atajos"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:90,columnNumber:11},this),T.jsxDEV("button",{className:"icon-button",onClick:w,title:"Cerrar",children:"×"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:91,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:89,columnNumber:9},this),T.jsxDEV("div",{className:"modal-body",children:[T.jsxDEV("h3",{className:"modal-section",children:"De la aplicación"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:97,columnNumber:11},this),T.jsxDEV(Uv,{shortcuts:N5},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:98,columnNumber:11},this),T.jsxDEV("h3",{className:"modal-section",children:"En el cuadro de escritura"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:100,columnNumber:11},this),T.jsxDEV(Uv,{shortcuts:k5},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:101,columnNumber:11},this),T.jsxDEV("h3",{className:"modal-section",children:"De la CLI, dentro de la terminal"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:103,columnNumber:11},this),T.jsxDEV("p",{className:"modal-hint",children:["Estas las maneja la CLI. La aplicación no las intercepta: le llegan tal cual. En la terminal, el salto de línea sigue siendo ",T.jsxDEV("kbd",{children:"Ctrl + J"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:106,columnNumber:54},this)," y la imagen se pega con"," ",T.jsxDEV("kbd",{children:"Alt + V"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:107,columnNumber:13},this),"; el cuadro de escritura es el que tiene las teclas de arriba."]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:104,columnNumber:11},this),T.jsxDEV(Uv,{shortcuts:R5},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:109,columnNumber:11},this),T.jsxDEV("p",{className:"modal-hint",children:[T.jsxDEV("strong",{children:"Ctrl+T"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:112,columnNumber:13},this),", ",T.jsxDEV("strong",{children:"Ctrl+W"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:112,columnNumber:38},this)," y ",T.jsxDEV("strong",{children:"Ctrl+Tab"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:112,columnNumber:64},this)," no se pueden usar: el navegador se los queda para sus propias pestañas y el evento nunca llega a la página."]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:111,columnNumber:11},this),T.jsxDEV("p",{className:"modal-hint",children:[T.jsxDEV("strong",{children:"Alt + número"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:118,columnNumber:13},this)," tampoco se usa, y es a propósito: en Windows, Alt con el teclado numérico es como se escriben los caracteres que no están en el teclado (",T.jsxDEV("kbd",{children:"Alt + 164"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:120,columnNumber:14},this)," = ñ). Interceptarlo rompe la escritura en español. Para cambiar de pestaña están ",T.jsxDEV("kbd",{children:"Alt + ←"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:121,columnNumber:38},this)," y ",T.jsxDEV("kbd",{children:"Alt + →"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:121,columnNumber:59},this),"."]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:117,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:96,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:83,columnNumber:7},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:82,columnNumber:5},this)}function Uv({shortcuts:w}){return T.jsxDEV("dl",{className:"shortcut-list",children:w.map(b=>T.jsxDEV("div",{className:"shortcut-row",children:[T.jsxDEV("dt",{children:T.jsxDEV("kbd",{children:b.keys},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:135,columnNumber:13},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:134,columnNumber:11},this),T.jsxDEV("dd",{children:b.description},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:137,columnNumber:11},this)]},b.keys,!0,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:133,columnNumber:9},this))},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ShortcutsDialog.tsx",lineNumber:131,columnNumber:5},this)}function hS(w){if(w<=0)return"";const b=Math.floor((Date.now()-w)/6e4);if(b<1)return"recien";if(b<60)return`hace ${b} min`;const O=Math.floor(b/60);if(O<24)return`hace ${O} h`;const F=Math.floor(O/24);return F<30?`hace ${F} d`:new Date(w).toLocaleDateString()}const $v="agent-workbench.notes-open",F0="agent-workbench.notes-active",j0="agent-workbench.notes-height",zv=160,T5=300;function Wv(w){try{return window.localStorage.getItem(w)}catch{return null}}function hh(w,b){try{window.localStorage.setItem(w,b)}catch{}}function L5({notes:w,onSendNote:b,sendTargetCwd:O}){const[F,U]=K.useState(()=>Wv($v)==="true"),[J,R]=K.useState(()=>{const I=Number.parseInt(Wv(j0)??"",10);return Number.isFinite(I)?Math.max(I,zv):T5}),[a,h]=K.useState(()=>Wv(F0)),[p,m]=K.useState(null),[o,v]=K.useState(null),[_,E]=K.useState(0),d=K.useMemo(()=>w.notes.length===0?null:w.notes.find(I=>I.noteId===a)??w.notes[w.notes.length-1]??null,[w.notes,a]),s=K.useCallback(I=>{h(I),hh(F0,I),m(null)},[]),u=K.useCallback(()=>{U(I=>{const L=!I;return hh($v,String(L)),L})},[]),l=K.useCallback(()=>{const I=w.create();s(I),F||(U(!0),hh($v,"true")),E(L=>L+1)},[w,F,s]),c=K.useCallback(I=>{if(I.text.trim().length===0&&I.images.length===0){w.remove(I.noteId);return}s(I.noteId),m(I.noteId)},[w,s]),g=K.useCallback(()=>{p!==null&&w.remove(p),m(null)},[p,w]),x=K.useRef(null),S=K.useCallback(I=>{x.current={startY:I.clientY,startHeight:J},I.currentTarget.setPointerCapture(I.pointerId),I.preventDefault()},[J]),N=K.useCallback(I=>{const L=x.current;if(L===null)return;const B=Math.max(zv,Math.floor(window.innerHeight*.8));R(Math.min(B,Math.max(zv,L.startHeight+L.startY-I.clientY)))},[]),y=K.useCallback(I=>{x.current!==null&&(x.current=null,I.currentTarget.releasePointerCapture(I.pointerId),hh(j0,String(J)))},[J]);K.useEffect(()=>{if(o===null)return;const I=L=>{L.key==="Escape"&&(L.stopPropagation(),v(null))};return window.addEventListener("keydown",I,!0),()=>window.removeEventListener("keydown",I,!0)},[o]);const D=o===null?void 0:w.images[o],k=w.notes.length;return T.jsxDEV("section",{className:`notes${F?" notes-open":""}`,style:F?{height:`${J}px`}:void 0,children:[F&&T.jsxDEV("div",{className:"notes-resize",onPointerDown:S,onPointerMove:N,onPointerUp:y,onPointerCancel:y,title:"Arrastrar para cambiar el alto"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:185,columnNumber:9},this),F?T.jsxDEV(T.Fragment,{children:[T.jsxDEV("div",{className:"notes-header",children:[T.jsxDEV("div",{className:"strip-tabs",role:"tablist",children:[w.notes.map(I=>{const L=I.noteId===(d==null?void 0:d.noteId),B=EA(I);return T.jsxDEV("div",{className:`strip-tab${L?" is-active":""}`,role:"tab","aria-selected":L,children:[T.jsxDEV("button",{className:"strip-tab-label",onClick:()=>s(I.noteId),title:B,children:B},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:225,columnNumber:21},this),T.jsxDEV("button",{className:"strip-tab-close",onClick:()=>c(I),title:"Cerrar la nota. Se borra, con sus imagenes",children:"×"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:232,columnNumber:21},this)]},I.noteId,!0,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:219,columnNumber:19},this)}),T.jsxDEV("button",{className:"strip-tab-new",onClick:l,title:"Nueva nota",children:"+"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:243,columnNumber:15},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:214,columnNumber:13},this),T.jsxDEV("span",{className:"strip-spacer"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:248,columnNumber:13},this),T.jsxDEV("button",{className:"icon-button",onClick:u,title:"Plegar. Las notas no se pierden: cerrarlas es la × de cada solapa",children:"▾"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:249,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:213,columnNumber:11},this),T.jsxDEV("div",{className:"notes-body",children:k===0||d===null?T.jsxDEV("p",{className:"notes-empty",children:["Sin notas. El ",T.jsxDEV("b",{children:"+"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:261,columnNumber:31},this)," abre una; sirven para anotar una idea sin salir de lo que estas haciendo."]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:260,columnNumber:15},this):T.jsxDEV(B5,{note:d,notes:w,closing:p===d.noteId,focusRequest:_,onConfirmClose:g,onCancelClose:()=>m(null),onOpenImage:v,onSend:b===null?null:()=>b(d.noteId),sendTargetCwd:O},d.noteId,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:265,columnNumber:15},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:258,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:212,columnNumber:9},this):T.jsxDEV("button",{className:"strip-collapsed",onClick:u,title:"Desplegar las notas",children:[T.jsxDEV("span",{className:"strip-collapsed-arrow",children:"▸"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:207,columnNumber:11},this),T.jsxDEV("span",{children:"Notas"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:208,columnNumber:11},this),k>0&&T.jsxDEV("span",{className:"strip-collapsed-count",children:k},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:209,columnNumber:25},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:202,columnNumber:9},this),o!==null&&T.jsxDEV("div",{className:"notes-lightbox",onClick:()=>v(null),title:"Clic para cerrar",children:typeof D=="string"?T.jsxDEV("img",{src:D,alt:"imagen de la nota"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:285,columnNumber:13},this):T.jsxDEV("span",{className:"notes-lightbox-missing",children:"la imagen no esta disponible"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:287,columnNumber:13},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:283,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:180,columnNumber:5},this)}function M5(){return T.jsxDEV("svg",{viewBox:"0 0 24 24",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:T.jsxDEV("path",{d:"M20 11.5 11.7 19.8a5 5 0 0 1-7.1-7.1l8.6-8.6a3.4 3.4 0 0 1 4.8 4.8l-8.5 8.5a1.8 1.8 0 0 1-2.5-2.5l7.9-7.9"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:330,columnNumber:7},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:319,columnNumber:5},this)}function O5(){return T.jsxDEV("svg",{viewBox:"0 0 24 24",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[T.jsxDEV("path",{d:"M21.5 2.5 11 13"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:355,columnNumber:7},this),T.jsxDEV("path",{d:"M21.5 2.5 15 21.5l-4-8.5-8.5-4z"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:356,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:344,columnNumber:5},this)}function B5({note:w,notes:b,closing:O,focusRequest:F,onConfirmClose:U,onCancelClose:J,onOpenImage:R,onSend:a,sendTargetCwd:h}){const p=K.useRef(null),[m,o]=K.useState(!1),v=w.text.trim().length===0&&w.images.length===0;K.useEffect(()=>{var d;F>0&&((d=p.current)==null||d.focus())},[F]);const _=K.useCallback(d=>{const s=Array.from(d).filter(u=>u.type.startsWith("image/"));for(const u of s)b.addImage(w.noteId,u);return s.length>0},[b,w.noteId]),E=K.useCallback(d=>{d.clipboardData!==null&&_(d.clipboardData.files)&&d.preventDefault()},[_]);return T.jsxDEV("div",{className:`note-editor${m?" note-editor-dragging":""}`,onDragOver:d=>{Array.from(d.dataTransfer.types).includes("Files")&&(d.preventDefault(),o(!0))},onDragLeave:()=>o(!1),onDrop:d=>{d.preventDefault(),o(!1),_(d.dataTransfer.files)},children:[O&&T.jsxDEV("div",{className:"note-closing",children:[T.jsxDEV("span",{children:"Cerrar esta nota la borra, con sus imagenes."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:418,columnNumber:11},this),T.jsxDEV("button",{className:"link-button link-danger",onClick:U,children:"Cerrar"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:419,columnNumber:11},this),T.jsxDEV("button",{className:"link-button",onClick:J,children:"Cancelar"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:422,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:417,columnNumber:9},this),b.problem!==null&&T.jsxDEV("div",{className:"composer-problem",children:[T.jsxDEV("span",{children:b.problem},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:430,columnNumber:11},this),T.jsxDEV("button",{className:"icon-button",onClick:b.dismissProblem,title:"Cerrar",children:"×"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:431,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:429,columnNumber:9},this),T.jsxDEV("textarea",{ref:p,className:"note-input",value:w.text,placeholder:"Anota una idea. Las imagenes se pegan o se arrastran aca.",onChange:d=>b.updateText(w.noteId,d.target.value),onPaste:E,spellCheck:!1},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:437,columnNumber:7},this),w.images.length>0&&T.jsxDEV("div",{className:"note-images",children:w.images.map(d=>T.jsxDEV(P5,{image:d,src:b.images[d.imageId],onRequest:b.requestImage,onOpen:()=>R(d.imageId),onRemove:()=>b.removeImage(w.noteId,d.imageId)},d.imageId,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:450,columnNumber:13},this))},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:448,columnNumber:9},this),T.jsxDEV("div",{className:"note-footer",children:[T.jsxDEV("span",{className:"note-meta",children:hS(w.updatedAt)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:463,columnNumber:9},this),T.jsxDEV("span",{className:"composer-spacer"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:464,columnNumber:9},this),T.jsxDEV("button",{className:"icon-button",onClick:()=>a==null?void 0:a(),disabled:a===null||v,title:a===null?"Abri una pestana primero: la conversacion se abre en su proyecto":v?"La nota esta vacia":`Mandar la nota al agente en una conversacion nueva de ${h??""}`,children:T.jsxDEV(O5,{},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:483,columnNumber:11},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:471,columnNumber:9},this),T.jsxDEV("label",{className:"icon-button note-attach",title:"Adjuntar una imagen desde un archivo",children:[T.jsxDEV(M5,{},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:486,columnNumber:11},this),T.jsxDEV("input",{type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:d=>{d.target.files!==null&&_(d.target.files),d.target.value=""}},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:487,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:485,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:462,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:401,columnNumber:5},this)}function P5({image:w,src:b,onRequest:O,onOpen:F,onRemove:U}){return K.useEffect(()=>{b===void 0&&O(w.imageId)},[b,w.imageId,O]),T.jsxDEV("figure",{className:"chip chip-image note-thumb",title:I5(w.bytes),children:[typeof b=="string"?T.jsxDEV("img",{src:b,alt:"imagen de la nota",onClick:F},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:520,columnNumber:9},this):T.jsxDEV("span",{className:"note-thumb-placeholder",children:b===null?"no esta":"…"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:522,columnNumber:9},this),T.jsxDEV("button",{className:"chip-remove",onClick:U,title:"Quitar la imagen",children:"×"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:524,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/NotesPanel.tsx",lineNumber:518,columnNumber:5},this)}function I5(w){return w<1024?`${w} B`:w<1024*1024?`${Math.round(w/1024)} KB`:`${(w/1024/1024).toFixed(1)} MB`}const V0=12;function F5(w){let b=2166136261;for(let O=0;O<w.length;O+=1)b^=w.charCodeAt(O),b=Math.imul(b,16777619);return b>>>0}function dS(w){const b=w.toLowerCase().replace(/[\\/]+/g,"/").replace(/\/+$/,"");return`hsl(${F5(b)%V0*(360/V0)} var(--project-color-s) var(--project-color-l))`}function H0(w){if(w.cwd.length===0)return w.slug;const b=w.cwd.split(/[\\/]/).filter(O=>O.length>0);return b[b.length-1]??w.cwd}function j5({out:w}){return T.jsxDEV("svg",{className:"archive-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[T.jsxDEV("rect",{x:"2.5",y:"3.5",width:"19",height:"5",rx:"1.2"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:85,columnNumber:7},this),T.jsxDEV("path",{d:"M4.5 8.5v10a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-10"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:86,columnNumber:7},this),w?T.jsxDEV("path",{d:"M12 18.5v-6M9.2 15.3 12 12.5l2.8 2.8"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:88,columnNumber:14},this):T.jsxDEV("path",{d:"M10 12.5h4"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:88,columnNumber:66},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:75,columnNumber:5},this)}function V5({projects:w,indexStatus:b,disabled:O,openSessionIds:F,onOpenProject:U,onOpenSession:J,onRefresh:R,onArchive:a,onHide:h,width:p,notes:m,onNewProject:o,onSendNote:v,sendNoteCwd:_}){const[E,d]=K.useState(new Set),[s,u]=K.useState(""),[l,c]=K.useState(!1),[g,x]=K.useState(new Set),S=K.useMemo(()=>w.reduce((V,X)=>V+X.sessions.filter(ee=>ee.archived).length,0),[w]),N=K.useMemo(()=>{const V=s.trim().toLowerCase();return w.map(X=>{const ee=l?X.sessions:X.sessions.filter(P=>!P.archived);if(ee.length===0)return null;if(V.length===0)return{...X,sessions:ee};if(H0(X).toLowerCase().includes(V)||X.cwd.toLowerCase().includes(V))return{...X,sessions:ee};const ie=ee.filter(P=>P.title.toLowerCase().includes(V));return ie.length>0?{...X,sessions:ie}:null}).filter(X=>X!==null)},[w,s,l]),y=V=>V.archived||!F.has(V.sessionId),D=V=>{x(X=>{const ee=new Set(X);return ee.has(V)?ee.delete(V):ee.add(V),ee})},k=K.useMemo(()=>{const V=[];for(const X of N)for(const ee of X.sessions)g.has(ee.sessionId)&&V.push(ee);return V},[N,g]),I=V=>{const X=k.filter(ee=>V?y(ee):!0).map(ee=>ee.sessionId);X.length>0&&a(X,V),x(new Set)},L=V=>{d(X=>{const ee=new Set(X);return ee.has(V)?ee.delete(V):ee.add(V),ee})},B=b.state==="scanning";return T.jsxDEV("aside",{className:"sidebar",style:{width:`${p}px`},children:[T.jsxDEV("div",{className:"sidebar-header",children:[T.jsxDEV("input",{className:"sidebar-filter",type:"search",placeholder:"Filtrar proyectos y sesiones",value:s,onChange:V=>u(V.target.value),spellCheck:!1},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:202,columnNumber:9},this),T.jsxDEV("button",{className:"icon-button",onClick:o,title:"Proyecto nuevo: elegir o crear una carpeta",disabled:O,children:"+"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:215,columnNumber:9},this),T.jsxDEV("button",{className:"icon-button",onClick:R,title:"Reindexar el historial",disabled:B,children:"⟳"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:223,columnNumber:9},this),T.jsxDEV("button",{className:"icon-button",onClick:h,title:"Ocultar los proyectos",children:"«"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:231,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:201,columnNumber:7},this),B&&T.jsxDEV("div",{className:"sidebar-progress",children:["Indexando ",b.scannedFiles," / ",b.totalFiles]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:237,columnNumber:9},this),S>0&&T.jsxDEV("button",{className:`sidebar-archived-toggle${l?" is-on":""}`,onClick:()=>c(V=>!V),title:"Las archivadas siguen en disco; esto solo las muestra u oculta",children:[l?"Ocultar":"Ver"," ",S," archivada",S===1?"":"s"]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:248,columnNumber:9},this),T.jsxDEV("div",{className:"sidebar-scroll",children:[N.length===0&&!B&&T.jsxDEV("p",{className:"sidebar-empty",children:w.length===0?"No se encontraron proyectos en el historial.":"Nada coincide con el filtro."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:261,columnNumber:11},this),N.map(V=>{const X=E.has(V.slug)||s.trim().length>0,ee=!O&&V.cwdExists;return T.jsxDEV("div",{className:"project",children:[T.jsxDEV("div",{className:"project-row",children:[T.jsxDEV("button",{className:"project-toggle",onClick:()=>L(V.slug),title:V.cwd.length>0?V.cwd:V.slug,children:[T.jsxDEV("span",{className:`chevron${X?" chevron-open":""}`,children:"›"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:280,columnNumber:19},this),T.jsxDEV("span",{className:"project-swatch",style:{background:dS(V.cwd)},"aria-hidden":"true"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:287,columnNumber:19},this),T.jsxDEV("span",{className:"project-name",children:H0(V)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:292,columnNumber:19},this),T.jsxDEV("span",{className:"project-count",children:V.sessions.length},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:293,columnNumber:19},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:275,columnNumber:17},this),T.jsxDEV("button",{className:"icon-button",onClick:()=>U(V.cwd),disabled:!ee,title:V.cwdExists?"Nueva sesion en este proyecto":"La carpeta ya no existe en disco",children:"+"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:295,columnNumber:17},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:274,columnNumber:15},this),!V.cwdExists&&T.jsxDEV("div",{className:"project-missing",title:V.cwd,children:"carpeta no encontrada"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:310,columnNumber:17},this),X&&T.jsxDEV("ul",{className:"session-list",children:V.sessions.map(Z=>{const ie=g.has(Z.sessionId),P=!y(Z);return T.jsxDEV("li",{className:`session-row${Z.archived?" session-archived":""}${ie?" session-selected":""}`,children:[T.jsxDEV("button",{className:"session-item",onClick:H=>{if(H.ctrlKey||H.metaKey){D(Z.sessionId);return}Z.archived&&a([Z.sessionId],!1),J(V.cwd,Z.sessionId,Z.title)},disabled:!ee,title:Z.title,children:[T.jsxDEV("span",{className:"session-title",children:Z.title},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:347,columnNumber:27},this),T.jsxDEV("span",{className:"session-meta",children:hS(Z.updatedAt)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:348,columnNumber:27},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:328,columnNumber:25},this),T.jsxDEV("button",{className:"icon-button session-action",onClick:()=>a([Z.sessionId],!Z.archived),disabled:P,title:Z.archived?"Restaurar a la lista":P?"Tiene una pestaña abierta. Cerrala primero.":"Archivar — la esconde de la lista, no borra nada",children:T.jsxDEV(j5,{out:Z.archived},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:363,columnNumber:27},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:351,columnNumber:25},this)]},Z.sessionId,!0,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:322,columnNumber:23},this)})},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:316,columnNumber:17},this)]},V.slug,!0,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:273,columnNumber:13},this)})]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:259,columnNumber:7},this),k.length>0&&T.jsxDEV("div",{className:"sidebar-selection",children:[T.jsxDEV("span",{children:[k.length," seleccionada",k.length===1?"":"s"]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:383,columnNumber:11},this),k.some(V=>!V.archived)&&T.jsxDEV("button",{className:"link-button",onClick:()=>I(!0),children:"Archivar"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:387,columnNumber:13},this),k.some(V=>V.archived)&&T.jsxDEV("button",{className:"link-button",onClick:()=>I(!1),children:"Restaurar"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:392,columnNumber:13},this),T.jsxDEV("button",{className:"link-button",onClick:()=>x(new Set),children:"Cancelar"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:396,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:382,columnNumber:9},this),T.jsxDEV(L5,{notes:m,onSendNote:v,sendTargetCwd:_},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:406,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/Sidebar.tsx",lineNumber:200,columnNumber:5},this)}function U0({x:w,y:b,items:O,onClose:F}){const U=K.useRef(null),[J,R]=K.useState({left:w,top:b});return K.useLayoutEffect(()=>{const a=U.current;if(a===null)return;const{width:h,height:p}=a.getBoundingClientRect();R({left:Math.max(4,Math.min(w,window.innerWidth-h-4)),top:Math.max(4,Math.min(b,window.innerHeight-p-4))})},[w,b]),K.useEffect(()=>{const a=h=>{h.key==="Escape"&&(h.stopPropagation(),F())};return window.addEventListener("keydown",a,!0),window.addEventListener("pointerdown",F,!0),window.addEventListener("scroll",F,!0),window.addEventListener("resize",F),()=>{window.removeEventListener("keydown",a,!0),window.removeEventListener("pointerdown",F,!0),window.removeEventListener("scroll",F,!0),window.removeEventListener("resize",F)}},[F]),T.jsxDEV("div",{ref:U,className:"context-menu",style:{left:`${J.left}px`,top:`${J.top}px`},onPointerDown:a=>a.stopPropagation(),children:O.map(a=>T.jsxDEV("button",{className:"context-menu-item",onClick:()=>{a.onSelect(),F()},children:a.label},a.label,!1,{fileName:"D:/Agent Explorer/packages/web/src/ContextMenu.tsx",lineNumber:68,columnNumber:9},this))},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/ContextMenu.tsx",lineNumber:59,columnNumber:5},this)}function H5({preview:w}){const[b,O]=K.useState(null);K.useEffect(()=>{if(w.binary||w.language===null){O(null);return}let U=!1;return cS(async()=>{const{highlightCode:J}=await import("./highlight-B0RyEt-U.js");return{highlightCode:J}},[]).then(({highlightCode:J})=>{U||O(J(w.text,w.language))}).catch(()=>{U||O(null)}),()=>{U=!0,O(null)}},[w.text,w.language,w.binary]);const F=K.useMemo(()=>w.binary?0:w.text.split(`
285
+ `).length,[w.text,w.binary]);return w.binary?T.jsxDEV("p",{className:"panel-note",children:"Archivo binario: no se previsualiza. Se puede abrir con la app del sistema desde el menú contextual del árbol."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilePreviewView.tsx",lineNumber:63,columnNumber:7},this):T.jsxDEV("div",{className:"panel-scroll",children:[T.jsxDEV("div",{className:"preview",children:[T.jsxDEV("div",{className:"preview-gutter","aria-hidden":"true",children:Array.from({length:F},(U,J)=>T.jsxDEV("span",{children:J+1},J,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilePreviewView.tsx",lineNumber:75,columnNumber:13},this))},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilePreviewView.tsx",lineNumber:73,columnNumber:9},this),b!==null?T.jsxDEV("pre",{className:"preview-code hljs",dangerouslySetInnerHTML:{__html:b}},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilePreviewView.tsx",lineNumber:79,columnNumber:11},this):T.jsxDEV("pre",{className:"preview-code",children:w.text},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilePreviewView.tsx",lineNumber:81,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FilePreviewView.tsx",lineNumber:72,columnNumber:7},this),w.truncated&&T.jsxDEV("p",{className:"panel-note",children:"El archivo se cortó por tamaño. Se ve completo abriéndolo con la app del sistema."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilePreviewView.tsx",lineNumber:86,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FilePreviewView.tsx",lineNumber:71,columnNumber:5},this)}function fS(){return T.jsxDEV("svg",{viewBox:"0 0 16 16",width:"13",height:"13","aria-hidden":"true",focusable:"false",children:T.jsxDEV("path",{d:"M1.5 3.5h4l1.2 1.6h7.8v7.4a1 1 0 0 1-1 1h-12a1 1 0 0 1-1-1V3.5z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:53,columnNumber:7},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:52,columnNumber:5},this)}function U5(){return T.jsxDEV("svg",{viewBox:"0 0 16 16",width:"13",height:"13","aria-hidden":"true",focusable:"false",children:[T.jsxDEV("rect",{x:"5.5",y:"1.5",width:"9",height:"10",rx:"1.2",fill:"none",stroke:"currentColor",strokeWidth:"1.2"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:70,columnNumber:7},this),T.jsxDEV("path",{d:"M10.5 13.2v.3a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h.3",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:80,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:69,columnNumber:5},this)}function $5(){return T.jsxDEV("svg",{viewBox:"0 0 16 16",width:"13",height:"13","aria-hidden":"true",focusable:"false",children:T.jsxDEV("path",{d:"M3 8.5l3.2 3.2L13 4.8",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:95,columnNumber:7},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:94,columnNumber:5},this)}function pS({className:w,title:b,onCopy:O}){const[F,U]=K.useState(!1),J=K.useRef(null);K.useEffect(()=>()=>{J.current!==null&&window.clearTimeout(J.current)},[]);const R=a=>{a.stopPropagation(),O(),U(!0),J.current!==null&&window.clearTimeout(J.current),J.current=window.setTimeout(()=>U(!1),1200)};return T.jsxDEV("button",{className:F?`${w} tree-action-done`:w,onClick:R,title:F?"Copiado":b,children:F?T.jsxDEV($5,{},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:149,columnNumber:15},this):T.jsxDEV(U5,{},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:149,columnNumber:31},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:144,columnNumber:5},this)}function vS(w){return w<1024?`${w} B`:w<1024*1024?`${Math.round(w/1024)} KB`:`${(w/(1024*1024)).toFixed(1)} MB`}function z5({view:w,cwd:b,platform:O,onInsert:F,onReveal:U}){const{listings:J,loading:R,preview:a,loadingPreview:h,closePreview:p,refresh:m}=w,[o,v]=K.useState(null),_=O==="win32"?"\\":"/",E=K.useCallback(c=>{const g=c.split("/").join(_);return b.length===0?g:b.endsWith(_)?`${b}${g}`:`${b}${_}${g}`},[b,_]),d=K.useCallback(c=>{navigator.clipboard.writeText(c).catch(()=>{})},[]),s=K.useCallback(c=>d(`"${E(c)}"`),[E,d]),u=K.useCallback((c,g)=>{c.preventDefault(),c.stopPropagation(),v({x:c.clientX,y:c.clientY,items:[{label:"Copiar ruta absoluta",onSelect:()=>d(E(g))},{label:"Copiar ruta relativa",onSelect:()=>d(g)},{label:"Insertar como @ruta",onSelect:()=>F(`@${g}`)},{label:"Abrir con la app del sistema",onSelect:()=>U(g)}]})},[E,d,F,U]);if(a!==null||h)return T.jsxDEV("div",{className:"panel-body",children:[T.jsxDEV("div",{className:"panel-subhead",children:[T.jsxDEV("button",{className:"link-button",onClick:p,children:"← Archivos"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:244,columnNumber:11},this),a!==null&&T.jsxDEV("span",{className:"panel-subhead-title",title:a.path,children:[a.path.split("/").pop(),T.jsxDEV("span",{className:"panel-tagline",children:[" ",vS(a.sizeBytes)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:250,columnNumber:15},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:248,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:243,columnNumber:9},this),h?T.jsxDEV("p",{className:"panel-note",children:"Leyendo el archivo…"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:255,columnNumber:11},this):a!==null&&T.jsxDEV(H5,{preview:a},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:257,columnNumber:31},this),o!==null&&T.jsxDEV(U0,{x:o.x,y:o.y,items:o.items,onClose:()=>v(null)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:260,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:242,columnNumber:7},this);const l=J.get("");return T.jsxDEV("div",{className:"panel-body",children:[T.jsxDEV("div",{className:"panel-subhead",children:[T.jsxDEV("span",{className:"panel-subhead-title",title:b,children:b.split(/[\\/]/).filter(c=>c.length>0).pop()??b},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:271,columnNumber:9},this),T.jsxDEV(pS,{className:"icon-button",title:"Copiar la ruta de esta carpeta entre comillas",onCopy:()=>s("")},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:274,columnNumber:9},this),T.jsxDEV("button",{className:"icon-button",onClick:()=>U(""),title:"Abrir esta carpeta en el explorador del sistema",children:T.jsxDEV(fS,{},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:284,columnNumber:11},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:279,columnNumber:9},this),T.jsxDEV("button",{className:"icon-button",onClick:m,title:"Releer el árbol",children:"⟳"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:286,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:270,columnNumber:7},this),T.jsxDEV("div",{className:"panel-scroll",children:l===void 0?T.jsxDEV("p",{className:"panel-note",children:R.has("")?"Leyendo el directorio…":"No se pudo leer el directorio."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:293,columnNumber:11},this):T.jsxDEV(mS,{path:"",depth:0,view:w,onContextMenu:u,onReveal:U,onCopyPath:s},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:297,columnNumber:11},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:291,columnNumber:7},this),o!==null&&T.jsxDEV(U0,{x:o.x,y:o.y,items:o.items,onClose:()=>v(null)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:309,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:269,columnNumber:5},this)}function mS({path:w,depth:b,view:O,onContextMenu:F,onReveal:U,onCopyPath:J}){const{listings:R,loading:a}=O,h=R.get(w);return h===void 0?a.has(w)?T.jsxDEV("div",{className:"tree-loading",children:"cargando…"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:336,columnNumber:32},this):null:T.jsxDEV("ul",{className:"tree",children:[h.entries.map(p=>T.jsxDEV(W5,{entry:p,depth:b,view:O,onContextMenu:F,onReveal:U,onCopyPath:J},p.path,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:342,columnNumber:9},this)),h.entries.length===0&&T.jsxDEV("li",{className:"tree-empty",style:{paddingLeft:`${b*12+8}px`},children:h.hiddenCount>0?"todo el contenido está oculto":"vacío"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:354,columnNumber:9},this),(h.truncated||h.hiddenCount>0)&&h.entries.length>0&&T.jsxDEV("li",{className:"tree-hidden",style:{paddingLeft:`${b*12+8}px`},title:"Se ocultan .git, node_modules, dist, bin, obj y lo que diga .gitignore",children:h.truncated?"hay más entradas de las que se muestran":`${h.hiddenCount} oculto(s)`},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:360,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:340,columnNumber:5},this)}function W5({entry:w,depth:b,view:O,onContextMenu:F,onReveal:U,onCopyPath:J}){const{expanded:R,toggleDirectory:a,openFile:h}=O,p=w.kind==="dir"&&R.has(w.path);return T.jsxDEV("li",{children:[T.jsxDEV("div",{className:"tree-item",children:[T.jsxDEV("button",{className:`tree-row tree-row-${w.kind}`,style:{paddingLeft:`${b*12+6}px`},onClick:()=>w.kind==="dir"?a(w.path):h(w.path),onContextMenu:m=>F(m,w.path,w.kind),title:w.path,children:[T.jsxDEV("span",{className:`tree-chevron${p?" tree-chevron-open":""}`,children:w.kind==="dir"?"›":""},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:411,columnNumber:11},this),T.jsxDEV("span",{className:"tree-name",children:w.name},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:414,columnNumber:11},this),w.kind==="file"&&T.jsxDEV("span",{className:"tree-size",children:vS(w.sizeBytes)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:416,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:402,columnNumber:9},this),T.jsxDEV(pS,{className:"tree-action",title:`Copiar la ruta de ${w.name} entre comillas`,onCopy:()=>J(w.path)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:425,columnNumber:9},this),w.kind==="dir"&&T.jsxDEV("button",{className:"tree-action",onClick:()=>U(w.path),title:`Abrir ${w.name} en el explorador del sistema`,children:T.jsxDEV(fS,{},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:437,columnNumber:13},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:432,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:401,columnNumber:7},this),p&&T.jsxDEV(mS,{path:w.path,depth:b+1,view:O,onContextMenu:F,onReveal:U,onCopyPath:J},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:443,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/FilesPanel.tsx",lineNumber:395,columnNumber:5},this)}const q5={added:"+",removed:"-",context:" ",hunk:"",meta:""};function G5({diff:w}){return w.binary?T.jsxDEV("p",{className:"panel-note",children:"Archivo binario: no hay diff que mostrar."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/DiffView.tsx",lineNumber:29,columnNumber:12},this):w.lines.length===0?T.jsxDEV("p",{className:"panel-note",children:w.message??"Sin cambios."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/DiffView.tsx",lineNumber:33,columnNumber:12},this):T.jsxDEV("div",{className:"panel-scroll",children:[T.jsxDEV("div",{className:"diff",children:w.lines.map((b,O)=>T.jsxDEV("div",{className:`diff-line diff-line-${b.kind}`,children:[T.jsxDEV("span",{className:"diff-num","aria-hidden":"true",children:b.oldLine??""},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/DiffView.tsx",lineNumber:41,columnNumber:13},this),T.jsxDEV("span",{className:"diff-num","aria-hidden":"true",children:b.newLine??""},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/DiffView.tsx",lineNumber:44,columnNumber:13},this),T.jsxDEV("span",{className:"diff-marker","aria-hidden":"true",children:q5[b.kind]},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/DiffView.tsx",lineNumber:47,columnNumber:13},this),T.jsxDEV("span",{className:"diff-text",children:b.text},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/DiffView.tsx",lineNumber:50,columnNumber:13},this)]},O,!0,{fileName:"D:/Agent Explorer/packages/web/src/DiffView.tsx",lineNumber:40,columnNumber:11},this))},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/DiffView.tsx",lineNumber:38,columnNumber:7},this),w.truncated&&T.jsxDEV("p",{className:"panel-note",children:"El diff se cortó por tamaño. El archivo completo se ve mejor fuera de este panel."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/DiffView.tsx",lineNumber:56,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/DiffView.tsx",lineNumber:37,columnNumber:5},this)}const Y5={added:"A",modified:"M",deleted:"D",renamed:"R",copied:"C","type-changed":"T",untracked:"?",conflict:"!"},K5={added:"agregado",modified:"modificado",deleted:"borrado",renamed:"renombrado",copied:"copiado","type-changed":"cambio de tipo",untracked:"sin seguimiento",conflict:"en conflicto"},X5=[{stage:"conflict",title:"En conflicto",hint:"Hay que resolverlos antes de seguir"},{stage:"staged",title:"Preparado",hint:"Ya pasó por git add"},{stage:"unstaged",title:"Sin preparar",hint:"Modificado en el árbol de trabajo"},{stage:"untracked",title:"Sin seguimiento",hint:"Archivos nuevos que git no conoce"}];function $0(w){const b=w.endsWith("/"),O=b?w.slice(0,-1):w,F=O.lastIndexOf("/"),U=F===-1?O:O.slice(F+1);return{dir:F===-1?"":O.slice(0,F+1),name:b?`${U}/`:U,isDirectory:b}}function J5({status:w}){return T.jsxDEV("div",{className:"git-headline",children:[T.jsxDEV("span",{className:"git-branch",title:w.repoRoot,children:w.branch??`HEAD desprendido${w.head!==null?` @ ${w.head}`:""}`},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:76,columnNumber:7},this),w.upstream!==null&&T.jsxDEV("span",{className:"git-upstream",title:`Rama de seguimiento: ${w.upstream}`,children:w.upstream},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:81,columnNumber:9},this),(w.ahead>0||w.behind>0)&&T.jsxDEV("span",{className:"git-ab",title:"Commits de diferencia con la rama de seguimiento",children:[w.ahead>0&&T.jsxDEV("span",{className:"git-ahead",children:["↑",w.ahead]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:88,columnNumber:32},this),w.behind>0&&T.jsxDEV("span",{className:"git-behind",children:["↓",w.behind]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:89,columnNumber:33},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:87,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:75,columnNumber:5},this)}function Q5({view:w}){const{status:b,diff:O,loadingDiff:F,openDiff:U,closeDiff:J,refresh:R}=w;if(O!==null||F)return T.jsxDEV("div",{className:"panel-body",children:[T.jsxDEV("div",{className:"panel-subhead",children:[T.jsxDEV("button",{className:"link-button",onClick:J,children:"← Cambios"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:107,columnNumber:11},this),O!==null&&T.jsxDEV("span",{className:"panel-subhead-title",title:O.path,children:[$0(O.path).name,O.staged&&T.jsxDEV("span",{className:"panel-tagline",children:" preparado"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:113,columnNumber:31},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:111,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:106,columnNumber:9},this),F?T.jsxDEV("p",{className:"panel-note",children:"Leyendo el diff…"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:118,columnNumber:11},this):O!==null&&T.jsxDEV(G5,{diff:O},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:120,columnNumber:28},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:105,columnNumber:7},this);if(b.state!=="ready")return T.jsxDEV("div",{className:"panel-body",children:T.jsxDEV("p",{className:"panel-note",children:b.message??"Todavía no se conoce el estado del repositorio."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:129,columnNumber:9},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:128,columnNumber:7},this);const a=b.worktrees.filter(h=>!h.isCurrent);return T.jsxDEV("div",{className:"panel-body",children:[T.jsxDEV("div",{className:"panel-subhead",children:[T.jsxDEV(J5,{status:b},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:141,columnNumber:9},this),T.jsxDEV("button",{className:"icon-button",onClick:R,title:"Releer el estado ahora",children:"⟳"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:142,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:140,columnNumber:7},this),T.jsxDEV("div",{className:"panel-scroll",children:[b.changes.length===0&&T.jsxDEV("p",{className:"panel-note",children:"El árbol de trabajo está limpio."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:149,columnNumber:11},this),X5.map(h=>{const p=b.changes.filter(m=>m.stage===h.stage);return p.length===0?null:T.jsxDEV("section",{className:"git-group",children:[T.jsxDEV("h3",{className:"git-group-title",title:h.hint,children:[h.title,T.jsxDEV("span",{className:"git-group-count",children:p.length},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:160,columnNumber:17},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:158,columnNumber:15},this),T.jsxDEV("ul",{className:"git-list",children:p.map(m=>{const{dir:o,name:v,isDirectory:_}=$0(m.path),E=m.oldPath!==null?`${m.oldPath} → ${m.path}`:_?`${m.path} — carpeta nueva; su contenido se ve en Archivos`:m.path,d=T.jsxDEV(T.Fragment,{children:[T.jsxDEV("span",{className:`git-badge git-badge-${m.kind}`,title:K5[m.kind],children:Y5[m.kind]},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:174,columnNumber:23},this),T.jsxDEV("span",{className:"git-path",children:[T.jsxDEV("span",{className:"git-path-name",children:v},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:181,columnNumber:25},this),o.length>0&&T.jsxDEV("span",{className:"git-path-dir",children:o},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:182,columnNumber:44},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:180,columnNumber:23},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:173,columnNumber:21},this);return T.jsxDEV("li",{children:_?T.jsxDEV("div",{className:"git-item git-item-static",title:E,children:d},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:196,columnNumber:25},this):T.jsxDEV("button",{className:"git-item",onClick:()=>U(m.path,m.stage==="staged"),title:E,children:d},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:200,columnNumber:25},this)},`${h.stage}:${m.path}`,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:188,columnNumber:21},this)})},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:162,columnNumber:15},this)]},h.stage,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:157,columnNumber:13},this)}),b.truncated&&T.jsxDEV("p",{className:"panel-note",children:["Hay más cambios de los que se muestran. Suele significar que falta una regla en"," ",T.jsxDEV("code",{children:".gitignore"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:219,columnNumber:13},this),"."]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:217,columnNumber:11},this),a.length>0&&T.jsxDEV("section",{className:"git-group",children:[T.jsxDEV("h3",{className:"git-group-title",title:"Otros árboles de trabajo de este repositorio",children:["Otros worktrees",T.jsxDEV("span",{className:"git-group-count",children:a.length},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:232,columnNumber:15},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:230,columnNumber:13},this),T.jsxDEV("ul",{className:"git-list",children:a.map(h=>T.jsxDEV("li",{children:T.jsxDEV("div",{className:"git-worktree",title:h.path,children:[T.jsxDEV("span",{className:"git-worktree-branch",children:h.branch??"detached"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:238,columnNumber:21},this),T.jsxDEV("span",{className:"git-worktree-path",children:h.path},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:239,columnNumber:21},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:237,columnNumber:19},this)},h.path,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:236,columnNumber:17},this))},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:234,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:224,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:147,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/GitPanel.tsx",lineNumber:139,columnNumber:5},this)}const Z5=[{id:"cli",label:"CLI"},{id:"git",label:"Cambios"},{id:"files",label:"Archivos"}];function eT(w){return w.state!=="ready"?0:new Set(w.changes.map(b=>b.path)).size}function tT({tab:w,hidden:b,onTabChange:O,title:F,cwd:U,platform:J,cli:R,cliUnseen:a,expanded:h,onToggleExpanded:p,git:m,files:o,onInsert:v,onReveal:_,onHide:E}){const d=eT(m.status);return T.jsxDEV("section",{className:`side-panel${b?" side-panel-hidden":""}`,"aria-hidden":b,children:[T.jsxDEV("header",{className:"side-panel-header",children:[T.jsxDEV("span",{className:"side-panel-title",title:U,children:F},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/SidePanel.tsx",lineNumber:98,columnNumber:9},this),T.jsxDEV("button",{className:"icon-button",onClick:p,title:h?"Devolver la columna a su ancho":"Ensanchar la columna — la interfaz de la CLI necesita ancho para dibujar diffs y tablas",children:h?"⇥":"⇤"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/SidePanel.tsx",lineNumber:101,columnNumber:9},this),T.jsxDEV("button",{className:"icon-button",onClick:E,title:"Ocultar el panel (Alt+P)",children:"×"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/SidePanel.tsx",lineNumber:112,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/SidePanel.tsx",lineNumber:97,columnNumber:7},this),T.jsxDEV("nav",{className:"side-panel-tabs",children:Z5.map(s=>T.jsxDEV("button",{className:`side-panel-tab${s.id===w?" side-panel-tab-active":""}`,onClick:()=>O(s.id),children:[s.label,s.id==="git"&&d>0&&T.jsxDEV("span",{className:"side-panel-badge",children:d},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/SidePanel.tsx",lineNumber:126,columnNumber:15},this),s.id==="cli"&&a&&w!=="cli"&&T.jsxDEV("span",{className:"side-panel-dot",title:"La CLI escribio algo"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/SidePanel.tsx",lineNumber:135,columnNumber:15},this)]},s.id,!0,{fileName:"D:/Agent Explorer/packages/web/src/SidePanel.tsx",lineNumber:119,columnNumber:11},this))},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/SidePanel.tsx",lineNumber:117,columnNumber:7},this),T.jsxDEV("div",{className:"side-panel-body",children:[T.jsxDEV("div",{className:`cli-slot${w==="cli"?"":" cli-slot-hidden"}`,children:R},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/SidePanel.tsx",lineNumber:143,columnNumber:9},this),w==="git"&&T.jsxDEV(Q5,{view:m},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/SidePanel.tsx",lineNumber:145,columnNumber:27},this),w==="files"&&T.jsxDEV(z5,{view:o,cwd:U,platform:J,onInsert:v,onReveal:_},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/SidePanel.tsx",lineNumber:147,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/SidePanel.tsx",lineNumber:141,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/SidePanel.tsx",lineNumber:96,columnNumber:5},this)}function z0(w){if(w.label.length>0)return w.label;const b=w.cwd.split(/[\\/]/).filter(F=>F.length>0),O=b[b.length-1]??w.cwd;return w.resumed?`${O} ↩`:O}function rT({terminals:w,activeTerminalId:b,canOpen:O,onSelect:F,onClose:U,onRename:J,onReorder:R,onNew:a}){const[h,p]=K.useState(null),[m,o]=K.useState(""),[v,_]=K.useState(null),E=K.useRef(null);K.useEffect(()=>{var l;h!==null&&((l=E.current)==null||l.select())},[h]);const d=l=>{p(l.terminalId),o(l.label.length>0?l.label:z0(l))},s=()=>{h!==null&&J(h,m.trim()),p(null)},u=l=>{if(v===null||v===l)return;const c=w.map(S=>S.terminalId),g=c.indexOf(v),x=c.indexOf(l);g===-1||x===-1||(c.splice(x,0,...c.splice(g,1)),R(c),_(null))};return T.jsxDEV("div",{className:"tab-bar",children:[w.map(l=>{const c=l.terminalId===b,g=l.terminalId===h;return T.jsxDEV("div",{className:`tab${c?" tab-active":""}${l.alive?"":" tab-dead"}`,draggable:!g,onDragStart:()=>_(l.terminalId),onDragOver:x=>x.preventDefault(),onDrop:()=>u(l.terminalId),onDragEnd:()=>_(null),onClick:()=>F(l.terminalId),onDoubleClick:()=>d(l),title:`${l.cwd}
286
+ ${l.alive?"activa":`terminada (codigo ${l.exitCode??"?"})`}`,style:{"--tab-project-color":dS(l.cwd)},children:g?T.jsxDEV("input",{ref:E,className:"tab-input",value:m,onChange:x=>o(x.target.value),onBlur:s,onKeyDown:x=>{x.key==="Enter"&&s(),x.key==="Escape"&&p(null),x.stopPropagation()},onClick:x=>x.stopPropagation()},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/TabBar.tsx",lineNumber:98,columnNumber:15},this):T.jsxDEV(T.Fragment,{children:[T.jsxDEV("span",{className:`tab-dot${l.alive?"":" tab-dot-dead"}`},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/TabBar.tsx",lineNumber:113,columnNumber:17},this),T.jsxDEV("span",{className:"tab-label",children:z0(l)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/TabBar.tsx",lineNumber:114,columnNumber:17},this),T.jsxDEV("button",{className:"tab-close",onClick:x=>{x.stopPropagation(),U(l.terminalId)},title:"Cerrar (Ctrl+W)",children:"×"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/TabBar.tsx",lineNumber:115,columnNumber:17},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/TabBar.tsx",lineNumber:112,columnNumber:15},this)},l.terminalId,!1,{fileName:"D:/Agent Explorer/packages/web/src/TabBar.tsx",lineNumber:84,columnNumber:11},this)}),T.jsxDEV("button",{className:"tab-new",onClick:a,disabled:!O,title:"Nueva pestana (Ctrl+T)",children:"+"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/TabBar.tsx",lineNumber:131,columnNumber:7},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/TabBar.tsx",lineNumber:78,columnNumber:5},this)}function iT(w,b,O){const[F,U]=K.useState(!1);return K.useEffect(()=>{if(U(!1),!(b===null||O))return w.onMessage(J=>{J.type==="terminal.output"&&J.terminalId===b&&U(!0)})},[w,b,O]),F&&!O}function nT(w,b){const[O,F]=K.useState(new Map),[U,J]=K.useState(new Set),[R,a]=K.useState(new Set),[h,p]=K.useState(null),[m,o]=K.useState(!1),v=K.useRef(new Set),_=K.useCallback(l=>{b===null||v.current.has(l)||(v.current.add(l),a(c=>new Set(c).add(l)),w.send({type:"files.list",terminalId:b,path:l}))},[w,b]);K.useEffect(()=>{if(F(new Map),J(new Set),a(new Set),p(null),o(!1),v.current=new Set,b===null)return;const l=w.onMessage(g=>{switch(g.type){case"files.listing":{if(g.terminalId!==b)break;const{listing:x}=g;v.current.delete(x.path),F(S=>new Map(S).set(x.path,x)),a(S=>{const N=new Set(S);return N.delete(x.path),N});break}case"files.preview":if(g.terminalId!==b)break;p(g.preview),o(!1);break;case"error":v.current=new Set,a(new Set),o(!1);break}});w.send({type:"files.list",terminalId:b,path:""}),v.current.add(""),a(new Set([""]));const c=w.onReopen(()=>{v.current=new Set,w.send({type:"files.list",terminalId:b,path:""})});return()=>{l(),c()}},[w,b]);const E=K.useCallback(l=>{J(c=>{const g=new Set(c);return g.has(l)?g.delete(l):(g.add(l),_(l)),g})},[_]),d=K.useCallback(l=>{b!==null&&(o(!0),p(null),w.send({type:"files.read",terminalId:b,path:l}))},[w,b]),s=K.useCallback(()=>{p(null),o(!1)},[]),u=K.useCallback(()=>{if(b===null)return;v.current=new Set;const l=["",...U];for(const c of l)v.current.add(c),w.send({type:"files.list",terminalId:b,path:c});a(new Set(l))},[w,b,U]);return{listings:O,expanded:U,loading:R,preview:h,loadingPreview:m,toggleDirectory:E,openFile:d,closePreview:s,refresh:u}}function sT(w,b){const[O,F]=K.useState(Tv),[U,J]=K.useState(null),[R,a]=K.useState(!1);K.useEffect(()=>{if(b===null){F(Tv),J(null);return}F(Tv),J(null),a(!1);const o=w.onMessage(_=>{switch(_.type){case"git.status":_.terminalId===b&&F(_.status);break;case"git.diff":if(_.terminalId!==b)break;J(_.diff),a(!1);break;case"error":a(!1);break}});w.send({type:"git.subscribe",terminalId:b});const v=w.onReopen(()=>{w.send({type:"git.subscribe",terminalId:b})});return()=>{o(),v(),w.send({type:"git.unsubscribe",terminalId:b})}},[w,b]);const h=K.useCallback((o,v)=>{b!==null&&(a(!0),J(null),w.send({type:"git.diff",terminalId:b,path:o,staged:v}))},[w,b]),p=K.useCallback(()=>{J(null),a(!1)},[]),m=K.useCallback(()=>{b!==null&&w.send({type:"git.refresh",terminalId:b})},[w,b]);return{status:O,diff:U,loadingDiff:R,openDiff:h,closeDiff:p,refresh:m}}function aT(w){const[b,O]=K.useState([]),[F,U]=K.useState({}),[J,R]=K.useState(null),a=K.useRef(new Set);K.useEffect(()=>{const s=w.onMessage(l=>{switch(l.type){case"notes.list":O(l.notes);break;case"notes.imageData":a.current.add(l.imageId),U(c=>({...c,[l.imageId]:l.data===null?null:`data:${l.mediaType};base64,${l.data}`}));break;case"error":l.code==="notes-failed"&&R(l.message);break}}),u=w.onReopen(()=>{a.current.clear()});return()=>{s(),u()}},[w]);const h=K.useCallback(s=>{a.current.has(s)||(a.current.add(s),w.send({type:"notes.image",imageId:s}))},[w]),p=K.useCallback(()=>{const s=crypto.randomUUID(),u=Date.now();return O(l=>[...l,{noteId:s,text:"",images:[],createdAt:u,updatedAt:u}]),w.send({type:"notes.create",noteId:s}),s},[w]),m=K.useCallback((s,u)=>{O(l=>l.map(c=>c.noteId===s?{...c,text:u,updatedAt:Date.now()}:c)),w.send({type:"notes.update",noteId:s,text:u})},[w]),o=K.useCallback(s=>{O(u=>u.filter(l=>l.noteId!==s)),w.send({type:"notes.delete",noteId:s})},[w]),v=K.useCallback((s,u)=>{const l=b.find(g=>g.noteId===s);if(l!==void 0&&l.images.length>=b0){R(`Hasta ${b0} imagenes por nota.`);return}if(u.size>ph){R(`"${u.name||"la imagen"}" pesa ${Math.round(u.size/1024/1024)} MB; el maximo son ${ph/1024/1024} MB.`);return}const c=new FileReader;c.onload=()=>{const g=c.result;if(typeof g!="string")return;const x=g.indexOf(",");x!==-1&&w.send({type:"notes.addImage",noteId:s,image:{mediaType:u.type,data:g.slice(x+1)}})},c.onerror=()=>R("No se pudo leer la imagen."),c.readAsDataURL(u)},[w,b]),_=K.useCallback((s,u)=>{O(l=>l.map(c=>c.noteId===s?{...c,images:c.images.filter(g=>g.imageId!==u)}:c)),w.send({type:"notes.removeImage",noteId:s,imageId:u})},[w]),E=K.useCallback((s,u)=>{w.send({type:"notes.send",noteId:s,terminalId:u})},[w]),d=K.useCallback(()=>R(null),[]);return{notes:b,images:F,problem:J,requestImage:h,create:p,updateText:m,remove:o,addImage:v,removeImage:_,sendToAgent:E,dismissProblem:d}}const gS="agent-workbench.theme",qv=["system","light","dark"],oT={system:"Tema del sistema",light:"Tema claro",dark:"Tema oscuro"},lT={system:"◐",light:"☀",dark:"☾"};function cT(){try{const w=window.localStorage.getItem(gS);if(w==="light"||w==="dark"||w==="system")return w}catch{}return"system"}function uT(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function hT(){const[w,b]=K.useState(cT),[O,F]=K.useState(uT);K.useEffect(()=>{const R=window.matchMedia("(prefers-color-scheme: dark)"),a=h=>F(h.matches);return R.addEventListener("change",a),()=>R.removeEventListener("change",a)},[]);const U=w==="system"?O?"dark":"light":w;K.useEffect(()=>{document.documentElement.dataset.theme=U,document.documentElement.style.colorScheme=U},[U]);const J=K.useCallback(()=>{b(R=>{const a=qv[(qv.indexOf(R)+1)%qv.length]??"system";try{window.localStorage.setItem(gS,a)}catch{}return a})},[]);return{preference:w,resolved:U,cycle:J}}function dT(){const w=new URLSearchParams(window.location.search),b=w.get(Yv);if(b===null||b.length===0)return null;w.delete(Yv);const O=w.toString();return window.history.replaceState(null,"",`${window.location.pathname}${O.length>0?`?${O}`:""}`),b}const W0=dT(),fT=500,pT=8e3;class vT{constructor(){qi(this,"socket",null);qi(this,"status","connecting");qi(this,"attempt",0);qi(this,"closedByUs",!1);qi(this,"hasConnectedOnce",!1);qi(this,"reconnectTimer");qi(this,"messageHandlers",new Set);qi(this,"statusHandlers",new Set);qi(this,"reopenHandlers",new Set);qi(this,"outbox",[])}getStatus(){return this.status}onMessage(b){return this.messageHandlers.add(b),()=>this.messageHandlers.delete(b)}onStatus(b){return this.statusHandlers.add(b),()=>this.statusHandlers.delete(b)}onReopen(b){return this.reopenHandlers.add(b),()=>this.reopenHandlers.delete(b)}connect(){if(this.socket!==null)return;const b=new URL(DA,window.location.href);b.protocol=window.location.protocol==="https:"?"wss:":"ws:",W0!==null&&b.searchParams.set(Yv,W0);const O=new WebSocket(b);this.socket=O,O.onopen=()=>{for(this.attempt=0,this.setStatus("open");this.outbox.length>0;){const F=this.outbox.shift();F!==void 0&&O.send(y0(F))}if(this.hasConnectedOnce)for(const F of this.reopenHandlers)F();this.hasConnectedOnce=!0},O.onmessage=F=>{const U=RA(F.data);if(U===null){console.warn("[conexion] mensaje del servidor no reconocido");return}for(const J of this.messageHandlers)J(U)},O.onclose=()=>{this.socket=null,!this.closedByUs&&(this.setStatus("reconnecting"),this.scheduleReconnect())},O.onerror=()=>{}}send(b){if(this.socket!==null&&this.socket.readyState===WebSocket.OPEN){this.socket.send(y0(b));return}b.type!=="input"&&b.type!=="resize"&&this.outbox.push(b)}close(){var b;this.closedByUs=!0,window.clearTimeout(this.reconnectTimer),(b=this.socket)==null||b.close(),this.socket=null}setStatus(b){if(this.status!==b){this.status=b;for(const O of this.statusHandlers)O(b)}}scheduleReconnect(){if(this.attempt+=1,!this.hasConnectedOnce&&this.attempt>4){this.setStatus("failed");return}const b=Math.min(fT*2**(this.attempt-1),pT);window.clearTimeout(this.reconnectTimer),this.reconnectTimer=window.setTimeout(()=>this.connect(),b)}}const mT={state:"idle",scannedFiles:0,totalFiles:0};function gT(w,b,O){const F=new Map(O?[]:w.map(U=>[U.slug,U]));for(const U of b)F.set(U.slug,U);return[...F.values()].sort((U,J)=>J.lastActivityAt-U.lastActivityAt)}function _T(){const w=K.useMemo(()=>new vT,[]),[b,O]=K.useState("connecting"),[F,U]=K.useState(!0),[J,R]=K.useState(null),[a,h]=K.useState(null),[p,m]=K.useState(""),[o,v]=K.useState(""),[_,E]=K.useState(!1),[d,s]=K.useState(null),[u,l]=K.useState([]),[c,g]=K.useState([]),[x,S]=K.useState(mT),[N,y]=K.useState(null),[D,k]=K.useState(null),I=K.useRef(new Set),L=K.useRef(new Map);K.useEffect(()=>{const re=w.onStatus(ve=>{O(ve),ve==="failed"&&k({message:"No se pudo conectar con el servidor local. Abri de nuevo la URL que imprimio al arrancar.",at:Date.now()})}),ae=w.onMessage(ve=>{switch(ve.type){case"hello":U(ve.cliAvailable),R(ve.cliVersion),h(ve.cliMissingMessage),m(ve.platform),v(ve.defaultCwd),E(ve.transcriptMarkerStripped),s(ve.shellName);break;case"terminal.list":{l(ve.terminals);const ye=ve.terminals.filter(Q=>Q.kind==="agent");y(Q=>{var $;return Q!==null&&ye.some(he=>he.terminalId===Q)?Q:(($=ye[0])==null?void 0:$.terminalId)??null});break}case"terminal.opened":{I.current.delete(ve.requestId)&&ve.terminal.kind==="agent"&&y(ve.terminal.terminalId);const ye=L.current.get(ve.requestId);ye!==void 0&&(L.current.delete(ve.requestId),ye(ve.terminal));break}case"index.status":S(ve.status);break;case"index.projects":g(ye=>gT(ye,ve.projects,ve.replace));break;case"error":k({message:ve.message,at:Date.now()}),ve.detail!==void 0&&console.error("[servidor]",ve.detail),ve.requestId!==void 0&&(I.current.delete(ve.requestId),L.current.delete(ve.requestId));break}});return w.connect(),()=>{re(),ae(),w.close()}},[w]);const B=K.useCallback(re=>{const ae=crypto.randomUUID();I.current.add(ae),re.onOpened!==void 0&&L.current.set(ae,re.onOpened),w.send({type:"terminal.open",requestId:ae,cwd:re.cwd,...re.resumeSessionId!==void 0?{resumeSessionId:re.resumeSessionId}:{},...re.label!==void 0?{label:re.label}:{}})},[w]),V=K.useCallback(re=>{w.send({type:"terminal.open",requestId:crypto.randomUUID(),cwd:re,kind:"shell"})},[w]),X=K.useCallback(re=>w.send({type:"terminal.close",terminalId:re}),[w]),ee=K.useCallback((re,ae)=>w.send({type:"terminal.rename",terminalId:re,label:ae}),[w]),Z=K.useCallback(re=>w.send({type:"tabs.reorder",terminalIds:re}),[w]),ie=K.useCallback((re,ae)=>w.send({type:"session.archive",sessionIds:re,archived:ae}),[w]),P=K.useCallback(()=>w.send({type:"index.refresh"}),[w]),H=K.useCallback(()=>k(null),[]),q=K.useMemo(()=>u.filter(re=>re.kind==="agent"),[u]),Y=K.useMemo(()=>u.filter(re=>re.kind==="shell"),[u]);return{connection:w,status:b,cliAvailable:F,cliVersion:J,cliMissingMessage:a,platform:p,defaultCwd:o,transcriptMarkerStripped:_,shellName:d,terminals:q,shells:Y,activeTerminalId:N,projects:c,indexStatus:x,error:D,dismissError:H,setActiveTerminal:y,openTerminal:B,openShell:V,closeTerminal:X,renameTerminal:ee,reorderTabs:Z,refreshIndex:P,archiveSessions:ie}}const bT={connecting:"Conectando",open:"Conectada",reconnecting:"Reconectando",failed:"Sin conexion"},q0=320,yT=1400,ST=640,G0=200,Y0=560,CT=270,ET=120,xT=720,wT=260,K0="agent-workbench.panel-width",X0="agent-workbench.panel-visible",J0="agent-workbench.panel-tab",Gv="agent-workbench.panel-expanded",Q0="agent-workbench.sidebar-visible",Z0="agent-workbench.sidebar-width",eS="agent-workbench.console-visible",tS="agent-workbench.console-height",rS="agent-workbench.marker-notice-dismissed";function DT(){var Ki;const w=_T(),{connection:b,status:O,cliAvailable:F,cliVersion:U,cliMissingMessage:J,platform:R,defaultCwd:a,transcriptMarkerStripped:h,shellName:p,terminals:m,archiveSessions:o,shells:v,activeTerminalId:_,projects:E,indexStatus:d,error:s,dismissError:u,setActiveTerminal:l,openTerminal:c,openShell:g,closeTerminal:x,renameTerminal:S,reorderTabs:N,refreshIndex:y}=w,D=hT(),k=m.find(W=>W.terminalId===_)??null,I=aT(b),L=K.useMemo(()=>new Set(m.map(W=>W.sessionId).filter(W=>W.length>0)),[m]),[B,V]=K.useState(()=>dn(X0,!0,W=>W==="true")),[X,ee]=K.useState(()=>dn(J0,"cli",W=>W==="git"||W==="files"||W==="cli"?W:W==="conversation"?"cli":null)),[Z,ie]=K.useState(()=>dn(K0,ST,W=>{const ue=Number.parseInt(W,10);return Number.isFinite(ue)?Math.max(ue,q0):null})),[P,H]=K.useState(()=>dn(Gv,!1,W=>W==="true")),[q,Y]=K.useState(()=>dn(Q0,!0,W=>W==="true")),[re,ae]=K.useState(()=>dn(Z0,CT,W=>{const ue=Number.parseInt(W,10);return Number.isFinite(ue)?Math.min(Y0,Math.max(G0,ue)):null})),[ve,ye]=K.useState(()=>dn(eS,!1,W=>W==="true")),[Q,$]=K.useState(()=>dn(tS,wT,W=>{const ue=Number.parseInt(W,10);return Number.isFinite(ue)?ue:null})),[he,ce]=K.useState(()=>dn(rS,!0,W=>W!=="true")),[De,Ee]=K.useState(!1),[He,Fe]=K.useState(!1),Ge=B&&k!==null,at=k!==null&&(B||ve),Me=K.useMemo(()=>k===null?[]:v.filter(W=>W.cwd===k.cwd),[v,k]),[tr,nr]=K.useState(null),Qe=Me.find(W=>W.terminalId===tr)??Me[0]??null,Ue=d5(b,_),We=sT(b,Ge?_:null),Ae=nT(b,Ge&&X==="files"?_:null),ot=Ge&&X==="cli",ct=Ue.usage.lastModel,ut=((Ki=[...Ue.events].reverse().find(W=>W.effort!==null))==null?void 0:Ki.effort)??null,jt=ct??Ue.defaults.model,Ht=ut??Ue.defaults.effort,Kt=ct===null&&jt!==null,Ce=ut===null&&Ht!==null,ke=iT(b,_,ot),Re=K.useCallback(()=>{V(W=>{const ue=!W;return Yi(X0,String(ue)),ue})},[]),mt=K.useCallback(()=>{Y(W=>{const ue=!W;return Yi(Q0,String(ue)),ue})},[]),Dt=K.useCallback(()=>{ye(W=>{const ue=!W;return Yi(eS,String(ue)),ue})},[]),Tt=K.useCallback(W=>{ee(W),Yi(J0,W)},[]),It=K.useCallback(()=>{H(W=>{const ue=!W;return Yi(Gv,String(ue)),ue})},[]),Zt=K.useCallback(()=>{_!==null&&b.send({type:"input",terminalId:_,data:"\x1B\x1B"})},[b,_]),Ut=K.useCallback(W=>{_!==null&&b.send({type:"input",terminalId:_,data:`${W} `})},[b,_]),Lt=K.useCallback(W=>{_!==null&&b.send({type:"agent.submit",terminalId:_,text:W,images:[]})},[b,_]),Ft=K.useCallback(W=>{_!==null&&b.send({type:"files.reveal",terminalId:_,path:W})},[b,_]),sr=K.useRef(new Set);K.useEffect(()=>{if(!ve){sr.current.clear();return}if(k===null)return;const{cwd:W}=k;if(v.some(ue=>ue.cwd===W)){sr.current.delete(W);return}sr.current.has(W)||(sr.current.add(W),g(W))},[ve,k,v,g]);const Ir=K.useCallback(W=>{const ue=Me.find(xe=>xe.terminalId===W);ue!==void 0&&sr.current.delete(ue.cwd),x(W)},[Me,x]),Nr=K.useRef(new Set);K.useEffect(()=>{const W=Me.filter(xe=>!Nr.current.has(xe.terminalId));for(const xe of Me)Nr.current.add(xe.terminalId);const ue=W[W.length-1];ue!==void 0&&nr(ue.terminalId)},[Me]);const ki=K.useCallback(()=>{k!==null&&(sr.current.add(k.cwd),g(k.cwd))},[k,g]),vs=fh({min:q0,max:yT,value:Z,measure:K.useCallback(W=>window.innerWidth-W.clientX,[]),onChange:ie,onCommit:K.useCallback(W=>Yi(K0,String(W)),[]),onStart:K.useCallback(()=>{H(!1),Yi(Gv,"false")},[])}),fn=fh({min:G0,max:Y0,value:re,measure:K.useCallback(W=>W.clientX,[]),onChange:ae,onCommit:K.useCallback(W=>Yi(Z0,String(W)),[])}),jn=fh({min:ET,max:xT,value:Q,measure:K.useCallback(W=>window.innerHeight-W.clientY,[]),onChange:$,onCommit:K.useCallback(W=>Yi(tS,String(W)),[])}),Vn=K.useCallback(()=>{ce(!1),Yi(rS,"true")},[]),Ri=K.useCallback(W=>{if(m.length===0)return;const xe=(m.findIndex(ft=>ft.terminalId===_)+W+m.length)%m.length,ze=m[xe];ze!==void 0&&l(ze.terminalId)},[m,_,l]),ri=K.useRef(null),Fr=K.useRef(null);K.useEffect(()=>{_!==Fr.current&&(ri.current=Fr.current,Fr.current=_)},[_]);const jr=K.useCallback(()=>{const W=ri.current;W===null||W===_||m.some(ue=>ue.terminalId===W)&&l(W)},[_,m,l]);K.useEffect(()=>{const W=ue=>{if(ue.key!=="Tab"||!ue.shiftKey||ue.altKey||ue.ctrlKey||ue.metaKey)return;const xe=document.activeElement;xe instanceof Element&&xe.closest(".xterm")!==null||(ue.preventDefault(),ue.stopPropagation(),jr())};return window.addEventListener("keydown",W,!0),()=>window.removeEventListener("keydown",W,!0)},[jr]),K.useEffect(()=>{const W=ue=>{if(!ue.altKey||ue.ctrlKey||ue.metaKey)return;const xe=ue.key.toLowerCase();if(xe==="t"){F&&a.length>0&&(ue.preventDefault(),ue.stopPropagation(),c({cwd:(k==null?void 0:k.cwd)??a}));return}if(xe==="w"){_!==null&&(ue.preventDefault(),ue.stopPropagation(),x(_));return}if(xe==="p"){ue.preventDefault(),ue.stopPropagation(),Re();return}if(xe==="arrowright"||xe==="pagedown"){ue.preventDefault(),ue.stopPropagation(),Ri(1);return}(xe==="arrowleft"||xe==="pageup")&&(ue.preventDefault(),ue.stopPropagation(),Ri(-1))};return window.addEventListener("keydown",W,!0),()=>window.removeEventListener("keydown",W,!0)},[k,_,F,x,Ri,a,c,Re]);const bi=k===null?"Panel":k.label.length>0?k.label:k.cwd.split(/[\\/]/).filter(W=>W.length>0).pop()??k.cwd;return T.jsxDEV("div",{className:"app",children:[T.jsxDEV("header",{className:"app-header",children:[T.jsxDEV("span",{className:"app-name",children:"Agent Workbench"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:627,columnNumber:9},this),T.jsxDEV("span",{className:`status status-${O}`,children:bT[O]},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:628,columnNumber:9},this),k!==null&&T.jsxDEV("span",{className:"meta",title:k.cwd,children:k.cwd},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:630,columnNumber:11},this),T.jsxDEV("span",{className:"header-spacer"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:634,columnNumber:9},this),U!==null&&T.jsxDEV("span",{className:"meta meta-dim",children:["CLI ",U]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:635,columnNumber:33},this),T.jsxDEV("button",{className:"icon-button",onClick:D.cycle,title:`${oT[D.preference]} — clic para cambiar`,children:lT[D.preference]},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:636,columnNumber:9},this),T.jsxDEV("button",{className:"icon-button",onClick:()=>Ee(!0),title:"Ver los atajos de teclado",children:"?"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:643,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:626,columnNumber:7},this),!F&&J!==null&&T.jsxDEV("div",{className:"banner banner-error",children:J},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:663,columnNumber:9},this),h&&he&&T.jsxDEV("div",{className:"banner banner-notice",children:[T.jsxDEV("span",{children:["Este servidor se lanzo desde dentro de una sesion de la CLI. Se quito la variable"," ",T.jsxDEV("code",{children:"CLAUDE_CODE_CHILD_SESSION"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:674,columnNumber:13},this)," del entorno de las pestanas, que apaga el guardado del historial; sin eso no habria conversacion ni medidor. El resto del entorno va intacto."]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:672,columnNumber:11},this),T.jsxDEV("button",{className:"banner-close",onClick:Vn,title:"Entendido",children:"×"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:678,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:671,columnNumber:9},this),s!==null&&T.jsxDEV("div",{className:"banner banner-error",children:[T.jsxDEV("span",{children:s.message},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:686,columnNumber:11},this),T.jsxDEV("button",{className:"banner-close",onClick:u,title:"Cerrar",children:"×"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:687,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:685,columnNumber:9},this),T.jsxDEV("div",{className:"app-body",children:[!q&&T.jsxDEV("button",{className:"panel-peek panel-peek-left",onClick:mt,title:"Mostrar la lista de proyectos",children:[T.jsxDEV("span",{className:"panel-peek-arrow",children:"›"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:708,columnNumber:13},this),T.jsxDEV("span",{className:"panel-peek-label",children:"Proyectos"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:709,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:703,columnNumber:11},this),q&&T.jsxDEV(V5,{projects:E,indexStatus:d,disabled:!F,onOpenProject:W=>c({cwd:W}),onOpenSession:(W,ue,xe)=>c({cwd:W,resumeSessionId:ue,label:xe}),onRefresh:y,openSessionIds:L,onArchive:o,onHide:mt,width:re,notes:I,onNewProject:()=>Fe(!0),onSendNote:k===null?null:W=>{const ue=k.cwd;c({cwd:ue,onOpened:xe=>b.send({type:"notes.send",noteId:W,terminalId:xe.terminalId})})},sendNoteCwd:(k==null?void 0:k.cwd)??null},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:714,columnNumber:11},this),q&&T.jsxDEV("div",{className:"divider",...fn,title:"Arrastrar para cambiar el ancho"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:756,columnNumber:11},this),T.jsxDEV("main",{className:`workspace${P&&at?" workspace-narrow":""}`,children:[T.jsxDEV(rT,{terminals:m,activeTerminalId:_,canOpen:F&&a.length>0,onSelect:l,onClose:x,onRename:S,onReorder:N,onNew:()=>c({cwd:(k==null?void 0:k.cwd)??a})},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:762,columnNumber:11},this),T.jsxDEV("div",{className:"chat-stack",children:m.length===0?T.jsxDEV("div",{className:"empty-state",children:[T.jsxDEV("p",{children:"No hay pestanas abiertas."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:776,columnNumber:17},this),T.jsxDEV("p",{className:"empty-hint",children:"Elegi un proyecto de la izquierda, o abri una sesion del historial para retomarla."},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:777,columnNumber:17},this),F&&a.length>0&&T.jsxDEV("button",{className:"primary-button",onClick:()=>c({cwd:a}),children:["Nueva sesion en ",a]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:782,columnNumber:19},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:775,columnNumber:15},this):T.jsxDEV(_5,{view:Ue,onRewind:Zt,onGoToCli:()=>{Ge||Re(),Tt("cli")}},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:791,columnNumber:15},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:773,columnNumber:11},this),k!==null&&T.jsxDEV(jA,{connection:b,terminalId:_,alive:k.alive,leading:T.jsxDEV(TA,{mode:Ue.permissionMode,disabled:!k.alive,onChange:Ue.setPermissionMode},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:809,columnNumber:17},this),controls:T.jsxDEV(AA,{model:jt,effort:Ht,modelProvisional:Kt,effortProvisional:Ce,disabled:!k.alive,onCommand:Lt},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:816,columnNumber:17},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:804,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:759,columnNumber:9},this),k!==null&&T.jsxDEV(T.Fragment,{children:[!at&&T.jsxDEV("button",{className:"panel-peek",onClick:Re,title:"Mostrar el panel derecho (Alt+P)",children:[T.jsxDEV("span",{className:"panel-peek-arrow",children:"‹"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:857,columnNumber:17},this),T.jsxDEV("span",{className:"panel-peek-label",children:"Panel"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:858,columnNumber:17},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:852,columnNumber:15},this),at&&T.jsxDEV("div",{className:"divider",...vs,title:"Arrastrar para cambiar el ancho"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:863,columnNumber:15},this),T.jsxDEV("div",{className:`panel-slot${at?"":" panel-slot-collapsed"}${at&&P?" panel-slot-expanded":""}`,style:at&&!P?{width:`${Z}px`}:void 0,children:[T.jsxDEV(tT,{tab:X,hidden:!B,onTabChange:Tt,title:bi,cwd:k.cwd,platform:R,cli:T.jsxDEV("div",{className:"terminal-stack",children:m.map(W=>T.jsxDEV(lS,{terminalId:W.terminalId,connection:b,active:W.terminalId===_,theme:D.resolved,autoFocus:!1},W.terminalId,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:885,columnNumber:23},this))},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:883,columnNumber:19},this),cliUnseen:ke,expanded:P,onToggleExpanded:It,git:We,files:Ae,onInsert:Ut,onReveal:Ft,onHide:Re},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:875,columnNumber:15},this),ve?T.jsxDEV(T.Fragment,{children:[B&&T.jsxDEV("div",{className:"hdivider",...jn,title:"Arrastrar para cambiar el alto de la consola"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:928,columnNumber:21},this),T.jsxDEV("div",{className:"console-slot",style:B?{height:`${Q}px`}:{flex:"1 1 auto"},children:T.jsxDEV(QA,{connection:b,shells:Me,activeShellId:(Qe==null?void 0:Qe.terminalId)??null,cwd:k.cwd,shellName:p,theme:D.resolved,onSelect:nr,onOpen:ki,onCloseShell:Ir,onCollapse:Dt},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:938,columnNumber:21},this)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:934,columnNumber:19},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:922,columnNumber:17},this):T.jsxDEV("button",{className:"strip-collapsed",onClick:Dt,title:`Abrir ${p??"una consola"} en ${k.cwd}`,children:[T.jsxDEV("span",{className:"strip-collapsed-arrow",children:"▸"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:967,columnNumber:19},this),T.jsxDEV("span",{children:p??"Consola"},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:968,columnNumber:19},this),Me.length>0&&T.jsxDEV("span",{className:"strip-collapsed-count",children:Me.length},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:970,columnNumber:21},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:962,columnNumber:17},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:869,columnNumber:13},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:839,columnNumber:11},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:693,columnNumber:7},this),De&&T.jsxDEV(A5,{onClose:()=>Ee(!1)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:979,columnNumber:28},this),He&&T.jsxDEV(D5,{connection:b,onOpen:W=>{Fe(!1),c({cwd:W})},onClose:()=>Fe(!1)},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:986,columnNumber:9},this)]},void 0,!0,{fileName:"D:/Agent Explorer/packages/web/src/App.tsx",lineNumber:625,columnNumber:5},this)}const _S=document.getElementById("root");if(_S===null)throw new Error("Falta el contenedor #root.");HR.createRoot(_S).render(T.jsxDEV(DT,{},void 0,!1,{fileName:"D:/Agent Explorer/packages/web/src/main.tsx",lineNumber:12,columnNumber:30},void 0));