handmux 0.13.0 → 0.15.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,330 @@
1
+ var bL=Object.defineProperty;var sx=c=>{throw TypeError(c)};var yL=(c,a,d)=>a in c?bL(c,a,{enumerable:!0,configurable:!0,writable:!0,value:d}):c[a]=d;var Gn=(c,a,d)=>yL(c,typeof a!="symbol"?a+"":a,d),wL=(c,a,d)=>a.has(c)||sx("Cannot "+d);var ax=(c,a,d)=>a.has(c)?sx("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(c):a.set(c,d);var hh=(c,a,d)=>(wL(c,a,"access private method"),d);(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const j of document.querySelectorAll('link[rel="modulepreload"]'))w(j);new MutationObserver(j=>{for(const L of j)if(L.type==="childList")for(const b of L.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&w(b)}).observe(document,{childList:!0,subtree:!0});function d(j){const L={};return j.integrity&&(L.integrity=j.integrity),j.referrerPolicy&&(L.referrerPolicy=j.referrerPolicy),j.crossOrigin==="use-credentials"?L.credentials="include":j.crossOrigin==="anonymous"?L.credentials="omit":L.credentials="same-origin",L}function w(j){if(j.ep)return;j.ep=!0;const L=d(j);fetch(j.href,L)}})();var jS={exports:{}},ag={},kS={exports:{}},Dh={exports:{}};Dh.exports;(function(c,a){/**
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 d="18.3.1",w=Symbol.for("react.element"),j=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),g=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),l=Symbol.iterator,m="@@iterator";function f(z){if(z===null||typeof z!="object")return null;var se=l&&z[l]||z[m];return typeof se=="function"?se:null}var v={current:null},C={transition:null},T={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},E={current:null},A={},D=null;function R(z){D=z}A.setExtraStackFrame=function(z){D=z},A.getCurrentStack=null,A.getStackAddendum=function(){var z="";D&&(z+=D);var se=A.getCurrentStack;return se&&(z+=se()||""),z};var M=!1,$=!1,O=!1,I=!1,Y=!1,Q={ReactCurrentDispatcher:v,ReactCurrentBatchConfig:C,ReactCurrentOwner:E};Q.ReactDebugCurrentFrame=A,Q.ReactCurrentActQueue=T;function Z(z){{for(var se=arguments.length,we=new Array(se>1?se-1:0),ke=1;ke<se;ke++)we[ke-1]=arguments[ke];oe("warn",z,we)}}function ee(z){{for(var se=arguments.length,we=new Array(se>1?se-1:0),ke=1;ke<se;ke++)we[ke-1]=arguments[ke];oe("error",z,we)}}function oe(z,se,we){{var ke=Q.ReactDebugCurrentFrame,te=ke.getStackAddendum();te!==""&&(se+="%s",we=we.concat([te]));var Ne=we.map(function(De){return String(De)});Ne.unshift("Warning: "+se),Function.prototype.apply.call(console[z],console,Ne)}}var P={};function W(z,se){{var we=z.constructor,ke=we&&(we.displayName||we.name)||"ReactClass",te=ke+"."+se;if(P[te])return;ee("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.",se,ke),P[te]=!0}}var V={isMounted:function(z){return!1},enqueueForceUpdate:function(z,se,we){W(z,"forceUpdate")},enqueueReplaceState:function(z,se,we,ke){W(z,"replaceState")},enqueueSetState:function(z,se,we,ke){W(z,"setState")}},J=Object.assign,_e={};Object.freeze(_e);function be(z,se,we){this.props=z,this.context=se,this.refs=_e,this.updater=we||V}be.prototype.isReactComponent={},be.prototype.setState=function(z,se){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,se,"setState")},be.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"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)."]},Le=function(z,se){Object.defineProperty(be.prototype,z,{get:function(){Z("%s(...) is deprecated in plain JavaScript React classes. %s",se[0],se[1])}})};for(var ie in Ve)Ve.hasOwnProperty(ie)&&Le(ie,Ve[ie])}function G(){}G.prototype=be.prototype;function pe(z,se,we){this.props=z,this.context=se,this.refs=_e,this.updater=we||V}var le=pe.prototype=new G;le.constructor=pe,J(le,be.prototype),le.isPureReactComponent=!0;function Be(){var z={current:null};return Object.seal(z),z}var Te=Array.isArray;function Xe(z){return Te(z)}function Ke(z){{var se=typeof Symbol=="function"&&Symbol.toStringTag,we=se&&z[Symbol.toStringTag]||z.constructor.name||"Object";return we}}function st(z){try{return jt(z),!1}catch{return!0}}function jt(z){return""+z}function Ye(z){if(st(z))return ee("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ke(z)),jt(z)}function $t(z,se,we){var ke=z.displayName;if(ke)return ke;var te=se.displayName||se.name||"";return te!==""?we+"("+te+")":we}function Yt(z){return z.displayName||"Context"}function dt(z){if(z==null)return null;if(typeof z.tag=="number"&&ee("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof z=="function")return z.displayName||z.name||null;if(typeof z=="string")return z;switch(z){case L:return"Fragment";case j:return"Portal";case r:return"Profiler";case b:return"StrictMode";case u:return"Suspense";case p:return"SuspenseList"}if(typeof z=="object")switch(z.$$typeof){case g:var se=z;return Yt(se)+".Consumer";case o:var we=z;return Yt(we._context)+".Provider";case y:return $t(z,z.render,"ForwardRef");case S:var ke=z.displayName||null;return ke!==null?ke:dt(z.type)||"Memo";case N:{var te=z,Ne=te._payload,De=te._init;try{return dt(De(Ne))}catch{return null}}}return null}var Je=Object.prototype.hasOwnProperty,nt={key:!0,ref:!0,__self:!0,__source:!0},ne,Fe,tt;tt={};function me(z){if(Je.call(z,"ref")){var se=Object.getOwnPropertyDescriptor(z,"ref").get;if(se&&se.isReactWarning)return!1}return z.ref!==void 0}function rt(z){if(Je.call(z,"key")){var se=Object.getOwnPropertyDescriptor(z,"key").get;if(se&&se.isReactWarning)return!1}return z.key!==void 0}function Re(z,se){var we=function(){ne||(ne=!0,ee("%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)",se))};we.isReactWarning=!0,Object.defineProperty(z,"key",{get:we,configurable:!0})}function fe(z,se){var we=function(){Fe||(Fe=!0,ee("%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)",se))};we.isReactWarning=!0,Object.defineProperty(z,"ref",{get:we,configurable:!0})}function ce(z){if(typeof z.ref=="string"&&E.current&&z.__self&&E.current.stateNode!==z.__self){var se=dt(E.current.type);tt[se]||(ee('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',se,z.ref),tt[se]=!0)}}var Ee=function(z,se,we,ke,te,Ne,De){var Ue={$$typeof:w,type:z,key:se,ref:we,props:De,_owner:Ne};return Ue._store={},Object.defineProperty(Ue._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ue,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ke}),Object.defineProperty(Ue,"_source",{configurable:!1,enumerable:!1,writable:!1,value:te}),Object.freeze&&(Object.freeze(Ue.props),Object.freeze(Ue)),Ue};function Oe(z,se,we){var ke,te={},Ne=null,De=null,Ue=null,$e=null;if(se!=null){me(se)&&(De=se.ref,ce(se)),rt(se)&&(Ye(se.key),Ne=""+se.key),Ue=se.__self===void 0?null:se.__self,$e=se.__source===void 0?null:se.__source;for(ke in se)Je.call(se,ke)&&!nt.hasOwnProperty(ke)&&(te[ke]=se[ke])}var it=arguments.length-2;if(it===1)te.children=we;else if(it>1){for(var ht=Array(it),Nt=0;Nt<it;Nt++)ht[Nt]=arguments[Nt+2];Object.freeze&&Object.freeze(ht),te.children=ht}if(z&&z.defaultProps){var Qe=z.defaultProps;for(ke in Qe)te[ke]===void 0&&(te[ke]=Qe[ke])}if(Ne||De){var nn=typeof z=="function"?z.displayName||z.name||"Unknown":z;Ne&&Re(te,nn),De&&fe(te,nn)}return Ee(z,Ne,De,Ue,$e,E.current,te)}function vt(z,se){var we=Ee(z.type,se,z.ref,z._self,z._source,z._owner,z.props);return we}function Ct(z,se,we){if(z==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var ke,te=J({},z.props),Ne=z.key,De=z.ref,Ue=z._self,$e=z._source,it=z._owner;if(se!=null){me(se)&&(De=se.ref,it=E.current),rt(se)&&(Ye(se.key),Ne=""+se.key);var ht;z.type&&z.type.defaultProps&&(ht=z.type.defaultProps);for(ke in se)Je.call(se,ke)&&!nt.hasOwnProperty(ke)&&(se[ke]===void 0&&ht!==void 0?te[ke]=ht[ke]:te[ke]=se[ke])}var Nt=arguments.length-2;if(Nt===1)te.children=we;else if(Nt>1){for(var Qe=Array(Nt),nn=0;nn<Nt;nn++)Qe[nn]=arguments[nn+2];te.children=Qe}return Ee(z.type,Ne,De,Ue,$e,it,te)}function ot(z){return typeof z=="object"&&z!==null&&z.$$typeof===w}var St=".",yn=":";function hn(z){var se=/[=:]/g,we={"=":"=0",":":"=2"},ke=z.replace(se,function(te){return we[te]});return"$"+ke}var qt=!1,It=/\/+/g;function Pt(z){return z.replace(It,"$&/")}function Un(z,se){return typeof z=="object"&&z!==null&&z.key!=null?(Ye(z.key),hn(""+z.key)):se.toString(36)}function Hn(z,se,we,ke,te){var Ne=typeof z;(Ne==="undefined"||Ne==="boolean")&&(z=null);var De=!1;if(z===null)De=!0;else switch(Ne){case"string":case"number":De=!0;break;case"object":switch(z.$$typeof){case w:case j:De=!0}}if(De){var Ue=z,$e=te(Ue),it=ke===""?St+Un(Ue,0):ke;if(Xe($e)){var ht="";it!=null&&(ht=Pt(it)+"/"),Hn($e,se,ht,"",function(ho){return ho})}else $e!=null&&(ot($e)&&($e.key&&(!Ue||Ue.key!==$e.key)&&Ye($e.key),$e=vt($e,we+($e.key&&(!Ue||Ue.key!==$e.key)?Pt(""+$e.key)+"/":"")+it)),se.push($e));return 1}var Nt,Qe,nn=0,rn=ke===""?St:ke+yn;if(Xe(z))for(var gn=0;gn<z.length;gn++)Nt=z[gn],Qe=rn+Un(Nt,gn),nn+=Hn(Nt,se,we,Qe,te);else{var xi=f(z);if(typeof xi=="function"){var ki=z;xi===ki.entries&&(qt||Z("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),qt=!0);for(var Ds=xi.call(ki),Js,Da=0;!(Js=Ds.next()).done;)Nt=Js.value,Qe=rn+Un(Nt,Da++),nn+=Hn(Nt,se,we,Qe,te)}else if(Ne==="object"){var Ar=String(z);throw new Error("Objects are not valid as a React child (found: "+(Ar==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":Ar)+"). If you meant to render a collection of children, use an array instead.")}}return nn}function ei(z,se,we){if(z==null)return z;var ke=[],te=0;return Hn(z,ke,"","",function(Ne){return se.call(we,Ne,te++)}),ke}function Di(z){var se=0;return ei(z,function(){se++}),se}function ti(z,se,we){ei(z,function(){se.apply(this,arguments)},we)}function ii(z){return ei(z,function(se){return se})||[]}function Cn(z){if(!ot(z))throw new Error("React.Children.only expected to receive a single React element child.");return z}function fn(z){var se={$$typeof:g,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};se.Provider={$$typeof:o,_context:se};var we=!1,ke=!1,te=!1;{var Ne={$$typeof:g,_context:se};Object.defineProperties(Ne,{Provider:{get:function(){return ke||(ke=!0,ee("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),se.Provider},set:function(De){se.Provider=De}},_currentValue:{get:function(){return se._currentValue},set:function(De){se._currentValue=De}},_currentValue2:{get:function(){return se._currentValue2},set:function(De){se._currentValue2=De}},_threadCount:{get:function(){return se._threadCount},set:function(De){se._threadCount=De}},Consumer:{get:function(){return we||(we=!0,ee("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),se.Consumer}},displayName:{get:function(){return se.displayName},set:function(De){te||(Z("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",De),te=!0)}}}),se.Consumer=Ne}return se._currentRenderer=null,se._currentRenderer2=null,se}var zn=-1,Zt=0,Ln=1,Rn=2;function ri(z){if(z._status===zn){var se=z._result,we=se();if(we.then(function(Ne){if(z._status===Zt||z._status===zn){var De=z;De._status=Ln,De._result=Ne}},function(Ne){if(z._status===Zt||z._status===zn){var De=z;De._status=Rn,De._result=Ne}}),z._status===zn){var ke=z;ke._status=Zt,ke._result=we}}if(z._status===Ln){var te=z._result;return te===void 0&&ee(`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?`,te),"default"in te||ee(`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'))`,te),te.default}else throw z._result}function re(z){var se={_status:zn,_result:z},we={$$typeof:N,_payload:se,_init:ri};{var ke,te;Object.defineProperties(we,{defaultProps:{configurable:!0,get:function(){return ke},set:function(Ne){ee("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."),ke=Ne,Object.defineProperty(we,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return te},set:function(Ne){ee("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."),te=Ne,Object.defineProperty(we,"propTypes",{enumerable:!0})}}})}return we}function Ie(z){z!=null&&z.$$typeof===S?ee("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof z!="function"?ee("forwardRef requires a render function but was given %s.",z===null?"null":typeof z):z.length!==0&&z.length!==2&&ee("forwardRef render functions accept exactly two parameters: props and ref. %s",z.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),z!=null&&(z.defaultProps!=null||z.propTypes!=null)&&ee("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var se={$$typeof:y,render:z};{var we;Object.defineProperty(se,"displayName",{enumerable:!1,configurable:!0,get:function(){return we},set:function(ke){we=ke,!z.name&&!z.displayName&&(z.displayName=ke)}})}return se}var Ze;Ze=Symbol.for("react.module.reference");function yt(z){return!!(typeof z=="string"||typeof z=="function"||z===L||z===r||Y||z===b||z===u||z===p||I||z===_||M||$||O||typeof z=="object"&&z!==null&&(z.$$typeof===N||z.$$typeof===S||z.$$typeof===o||z.$$typeof===g||z.$$typeof===y||z.$$typeof===Ze||z.getModuleId!==void 0))}function wt(z,se){yt(z)||ee("memo: The first argument must be a component. Instead received: %s",z===null?"null":typeof z);var we={$$typeof:S,type:z,compare:se===void 0?null:se};{var ke;Object.defineProperty(we,"displayName",{enumerable:!1,configurable:!0,get:function(){return ke},set:function(te){ke=te,!z.name&&!z.displayName&&(z.displayName=te)}})}return we}function gt(){var z=v.current;return z===null&&ee(`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.`),z}function Rt(z){var se=gt();if(z._context!==void 0){var we=z._context;we.Consumer===z?ee("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?"):we.Provider===z&&ee("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return se.useContext(z)}function bt(z){var se=gt();return se.useState(z)}function wn(z,se,we){var ke=gt();return ke.useReducer(z,se,we)}function on(z){var se=gt();return se.useRef(z)}function Wt(z,se){var we=gt();return we.useEffect(z,se)}function pn(z,se){var we=gt();return we.useInsertionEffect(z,se)}function vn(z,se){var we=gt();return we.useLayoutEffect(z,se)}function Yn(z,se){var we=gt();return we.useCallback(z,se)}function mn(z,se){var we=gt();return we.useMemo(z,se)}function ji(z,se,we){var ke=gt();return ke.useImperativeHandle(z,se,we)}function si(z,se){{var we=gt();return we.useDebugValue(z,se)}}function Vt(){var z=gt();return z.useTransition()}function ae(z){var se=gt();return se.useDeferredValue(z)}function He(){var z=gt();return z.useId()}function xe(z,se,we){var ke=gt();return ke.useSyncExternalStore(z,se,we)}var X=0,je,qe,kt,mt,Tt,tn,Xt;function Qt(){}Qt.__reactDisabledLog=!0;function On(){{if(X===0){je=console.log,qe=console.info,kt=console.warn,mt=console.error,Tt=console.group,tn=console.groupCollapsed,Xt=console.groupEnd;var z={configurable:!0,enumerable:!0,value:Qt,writable:!0};Object.defineProperties(console,{info:z,log:z,warn:z,error:z,group:z,groupCollapsed:z,groupEnd:z})}X++}}function Gt(){{if(X--,X===0){var z={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:J({},z,{value:je}),info:J({},z,{value:qe}),warn:J({},z,{value:kt}),error:J({},z,{value:mt}),group:J({},z,{value:Tt}),groupCollapsed:J({},z,{value:tn}),groupEnd:J({},z,{value:Xt})})}X<0&&ee("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var An=Q.ReactCurrentDispatcher,Xn;function ai(z,se,we){{if(Xn===void 0)try{throw Error()}catch(te){var ke=te.stack.trim().match(/\n( *(at )?)/);Xn=ke&&ke[1]||""}return`
22
+ `+Xn+z}}var Vi=!1,Hr;{var zr=typeof WeakMap=="function"?WeakMap:Map;Hr=new zr}function ss(z,se){if(!z||Vi)return"";{var we=Hr.get(z);if(we!==void 0)return we}var ke;Vi=!0;var te=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ne;Ne=An.current,An.current=null,On();try{if(se){var De=function(){throw Error()};if(Object.defineProperty(De.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(De,[])}catch(rn){ke=rn}Reflect.construct(z,[],De)}else{try{De.call()}catch(rn){ke=rn}z.call(De.prototype)}}else{try{throw Error()}catch(rn){ke=rn}z()}}catch(rn){if(rn&&ke&&typeof rn.stack=="string"){for(var Ue=rn.stack.split(`
23
+ `),$e=ke.stack.split(`
24
+ `),it=Ue.length-1,ht=$e.length-1;it>=1&&ht>=0&&Ue[it]!==$e[ht];)ht--;for(;it>=1&&ht>=0;it--,ht--)if(Ue[it]!==$e[ht]){if(it!==1||ht!==1)do if(it--,ht--,ht<0||Ue[it]!==$e[ht]){var Nt=`
25
+ `+Ue[it].replace(" at new "," at ");return z.displayName&&Nt.includes("<anonymous>")&&(Nt=Nt.replace("<anonymous>",z.displayName)),typeof z=="function"&&Hr.set(z,Nt),Nt}while(it>=1&&ht>=0);break}}}finally{Vi=!1,An.current=Ne,Gt(),Error.prepareStackTrace=te}var Qe=z?z.displayName||z.name:"",nn=Qe?ai(Qe):"";return typeof z=="function"&&Hr.set(z,nn),nn}function Ki(z,se,we){return ss(z,!1)}function $r(z){var se=z.prototype;return!!(se&&se.isReactComponent)}function Xi(z,se,we){if(z==null)return"";if(typeof z=="function")return ss(z,$r(z));if(typeof z=="string")return ai(z);switch(z){case u:return ai("Suspense");case p:return ai("SuspenseList")}if(typeof z=="object")switch(z.$$typeof){case y:return Ki(z.render);case S:return Xi(z.type,se,we);case N:{var ke=z,te=ke._payload,Ne=ke._init;try{return Xi(Ne(te),se,we)}catch{}}}return""}var Fi={},_r=Q.ReactDebugCurrentFrame;function sn(z){if(z){var se=z._owner,we=Xi(z.type,z._source,se?se.type:null);_r.setExtraStackFrame(we)}else _r.setExtraStackFrame(null)}function as(z,se,we,ke,te){{var Ne=Function.call.bind(Je);for(var De in z)if(Ne(z,De)){var Ue=void 0;try{if(typeof z[De]!="function"){var $e=Error((ke||"React class")+": "+we+" type `"+De+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof z[De]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw $e.name="Invariant Violation",$e}Ue=z[De](se,De,ke,we,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(it){Ue=it}Ue&&!(Ue instanceof Error)&&(sn(te),ee("%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).",ke||"React class",we,De,typeof Ue),sn(null)),Ue instanceof Error&&!(Ue.message in Fi)&&(Fi[Ue.message]=!0,sn(te),ee("Failed %s type: %s",we,Ue.message),sn(null))}}}function lr(z){if(z){var se=z._owner,we=Xi(z.type,z._source,se?se.type:null);R(we)}else R(null)}var At;At=!1;function Tr(){if(E.current){var z=dt(E.current.type);if(z)return`
26
+
27
+ Check the render method of \``+z+"`."}return""}function Vn(z){if(z!==void 0){var se=z.fileName.replace(/^.*[\\\/]/,""),we=z.lineNumber;return`
28
+
29
+ Check your code at `+se+":"+we+"."}return""}function cr(z){return z!=null?Vn(z.__source):""}var Ji={};function Cs(z){var se=Tr();if(!se){var we=typeof z=="string"?z:z.displayName||z.name;we&&(se=`
30
+
31
+ Check the top-level render call using <`+we+">.")}return se}function qn(z,se){if(!(!z._store||z._store.validated||z.key!=null)){z._store.validated=!0;var we=Cs(se);if(!Ji[we]){Ji[we]=!0;var ke="";z&&z._owner&&z._owner!==E.current&&(ke=" It was passed a child from "+dt(z._owner.type)+"."),lr(z),ee('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',we,ke),lr(null)}}}function En(z,se){if(typeof z=="object"){if(Xe(z))for(var we=0;we<z.length;we++){var ke=z[we];ot(ke)&&qn(ke,se)}else if(ot(z))z._store&&(z._store.validated=!0);else if(z){var te=f(z);if(typeof te=="function"&&te!==z.entries)for(var Ne=te.call(z),De;!(De=Ne.next()).done;)ot(De.value)&&qn(De.value,se)}}}function os(z){{var se=z.type;if(se==null||typeof se=="string")return;var we;if(typeof se=="function")we=se.propTypes;else if(typeof se=="object"&&(se.$$typeof===y||se.$$typeof===S))we=se.propTypes;else return;if(we){var ke=dt(se);as(we,z.props,"prop",ke,z)}else if(se.PropTypes!==void 0&&!At){At=!0;var te=dt(se);ee("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",te||"Unknown")}typeof se.getDefaultProps=="function"&&!se.getDefaultProps.isReactClassApproved&&ee("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function yi(z){{for(var se=Object.keys(z.props),we=0;we<se.length;we++){var ke=se[we];if(ke!=="children"&&ke!=="key"){lr(z),ee("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ke),lr(null);break}}z.ref!==null&&(lr(z),ee("Invalid attribute `ref` supplied to `React.Fragment`."),lr(null))}}function he(z,se,we){var ke=yt(z);if(!ke){var te="";(z===void 0||typeof z=="object"&&z!==null&&Object.keys(z).length===0)&&(te+=" 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 Ne=cr(se);Ne?te+=Ne:te+=Tr();var De;z===null?De="null":Xe(z)?De="array":z!==void 0&&z.$$typeof===w?(De="<"+(dt(z.type)||"Unknown")+" />",te=" Did you accidentally export a JSX literal instead of a component?"):De=typeof z,ee("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",De,te)}var Ue=Oe.apply(this,arguments);if(Ue==null)return Ue;if(ke)for(var $e=2;$e<arguments.length;$e++)En(arguments[$e],z);return z===L?yi(Ue):os(Ue),Ue}var Se=!1;function We(z){var se=he.bind(null,z);return se.type=z,Se||(Se=!0,Z("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(se,"type",{enumerable:!1,get:function(){return Z("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:z}),z}}),se}function et(z,se,we){for(var ke=Ct.apply(this,arguments),te=2;te<arguments.length;te++)En(arguments[te],ke.type);return os(ke),ke}function _t(z,se){var we=C.transition;C.transition={};var ke=C.transition;C.transition._updatedFibers=new Set;try{z()}finally{if(C.transition=we,we===null&&ke._updatedFibers){var te=ke._updatedFibers.size;te>10&&Z("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."),ke._updatedFibers.clear()}}}var Et=!1,Mt=null;function Kt(z){if(Mt===null)try{var se=("require"+Math.random()).slice(0,7),we=c&&c[se];Mt=we.call(c,"timers").setImmediate}catch{Mt=function(te){Et===!1&&(Et=!0,typeof MessageChannel>"u"&&ee("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 Ne=new MessageChannel;Ne.port1.onmessage=te,Ne.port2.postMessage(void 0)}}return Mt(z)}var $n=0,Pn=!1;function Zi(z){{var se=$n;$n++,T.current===null&&(T.current=[]);var we=T.isBatchingLegacy,ke;try{if(T.isBatchingLegacy=!0,ke=z(),!we&&T.didScheduleLegacyUpdate){var te=T.current;te!==null&&(T.didScheduleLegacyUpdate=!1,oi(te))}}catch(Qe){throw wi(se),Qe}finally{T.isBatchingLegacy=we}if(ke!==null&&typeof ke=="object"&&typeof ke.then=="function"){var Ne=ke,De=!1,Ue={then:function(Qe,nn){De=!0,Ne.then(function(rn){wi(se),$n===0?ur(rn,Qe,nn):Qe(rn)},function(rn){wi(se),nn(rn)})}};return!Pn&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){De||(Pn=!0,ee("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 () => ...);"))}),Ue}else{var $e=ke;if(wi(se),$n===0){var it=T.current;it!==null&&(oi(it),T.current=null);var ht={then:function(Qe,nn){T.current===null?(T.current=[],ur($e,Qe,nn)):Qe($e)}};return ht}else{var Nt={then:function(Qe,nn){Qe($e)}};return Nt}}}}function wi(z){z!==$n-1&&ee("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),$n=z}function ur(z,se,we){{var ke=T.current;if(ke!==null)try{oi(ke),Kt(function(){ke.length===0?(T.current=null,se(z)):ur(z,se,we)})}catch(te){we(te)}else se(z)}}var Lr=!1;function oi(z){if(!Lr){Lr=!0;var se=0;try{for(;se<z.length;se++){var we=z[se];do we=we(!0);while(we!==null)}z.length=0}catch(ke){throw z=z.slice(se+1),ke}finally{Lr=!1}}}var Na=he,Es=et,Ca=We,Ea={map:ei,forEach:ti,count:Di,toArray:ii,only:Cn};a.Children=Ea,a.Component=be,a.Fragment=L,a.Profiler=r,a.PureComponent=pe,a.StrictMode=b,a.Suspense=u,a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Q,a.act=Zi,a.cloneElement=Es,a.createContext=fn,a.createElement=Na,a.createFactory=Ca,a.createRef=Be,a.forwardRef=Ie,a.isValidElement=ot,a.lazy=re,a.memo=wt,a.startTransition=_t,a.unstable_act=Zi,a.useCallback=Yn,a.useContext=Rt,a.useDebugValue=si,a.useDeferredValue=ae,a.useEffect=Wt,a.useId=He,a.useImperativeHandle=ji,a.useInsertionEffect=pn,a.useLayoutEffect=vn,a.useMemo=mn,a.useReducer=wn,a.useRef=on,a.useState=bt,a.useSyncExternalStore=xe,a.useTransition=Vt,a.version=d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(Dh,Dh.exports);var xL=Dh.exports;kS.exports=xL;var H=kS.exports;/**
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
+ */(function(){var c=H,a=Symbol.for("react.element"),d=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),r=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),N=Symbol.iterator,_="@@iterator";function l(re){if(re===null||typeof re!="object")return null;var Ie=N&&re[N]||re[_];return typeof Ie=="function"?Ie:null}var m=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(re){{for(var Ie=arguments.length,Ze=new Array(Ie>1?Ie-1:0),yt=1;yt<Ie;yt++)Ze[yt-1]=arguments[yt];v("error",re,Ze)}}function v(re,Ie,Ze){{var yt=m.ReactDebugCurrentFrame,wt=yt.getStackAddendum();wt!==""&&(Ie+="%s",Ze=Ze.concat([wt]));var gt=Ze.map(function(Rt){return String(Rt)});gt.unshift("Warning: "+Ie),Function.prototype.apply.call(console[re],console,gt)}}var C=!1,T=!1,E=!1,A=!1,D=!1,R;R=Symbol.for("react.module.reference");function M(re){return!!(typeof re=="string"||typeof re=="function"||re===w||re===L||D||re===j||re===g||re===y||A||re===S||C||T||E||typeof re=="object"&&re!==null&&(re.$$typeof===p||re.$$typeof===u||re.$$typeof===b||re.$$typeof===r||re.$$typeof===o||re.$$typeof===R||re.getModuleId!==void 0))}function $(re,Ie,Ze){var yt=re.displayName;if(yt)return yt;var wt=Ie.displayName||Ie.name||"";return wt!==""?Ze+"("+wt+")":Ze}function O(re){return re.displayName||"Context"}function I(re){if(re==null)return null;if(typeof re.tag=="number"&&f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof re=="function")return re.displayName||re.name||null;if(typeof re=="string")return re;switch(re){case w:return"Fragment";case d:return"Portal";case L:return"Profiler";case j:return"StrictMode";case g:return"Suspense";case y:return"SuspenseList"}if(typeof re=="object")switch(re.$$typeof){case r:var Ie=re;return O(Ie)+".Consumer";case b:var Ze=re;return O(Ze._context)+".Provider";case o:return $(re,re.render,"ForwardRef");case u:var yt=re.displayName||null;return yt!==null?yt:I(re.type)||"Memo";case p:{var wt=re,gt=wt._payload,Rt=wt._init;try{return I(Rt(gt))}catch{return null}}}return null}var Y=Object.assign,Q=0,Z,ee,oe,P,W,V,J;function _e(){}_e.__reactDisabledLog=!0;function be(){{if(Q===0){Z=console.log,ee=console.info,oe=console.warn,P=console.error,W=console.group,V=console.groupCollapsed,J=console.groupEnd;var re={configurable:!0,enumerable:!0,value:_e,writable:!0};Object.defineProperties(console,{info:re,log:re,warn:re,error:re,group:re,groupCollapsed:re,groupEnd:re})}Q++}}function Ve(){{if(Q--,Q===0){var re={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},re,{value:Z}),info:Y({},re,{value:ee}),warn:Y({},re,{value:oe}),error:Y({},re,{value:P}),group:Y({},re,{value:W}),groupCollapsed:Y({},re,{value:V}),groupEnd:Y({},re,{value:J})})}Q<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Le=m.ReactCurrentDispatcher,ie;function G(re,Ie,Ze){{if(ie===void 0)try{throw Error()}catch(wt){var yt=wt.stack.trim().match(/\n( *(at )?)/);ie=yt&&yt[1]||""}return`
40
+ `+ie+re}}var pe=!1,le;{var Be=typeof WeakMap=="function"?WeakMap:Map;le=new Be}function Te(re,Ie){if(!re||pe)return"";{var Ze=le.get(re);if(Ze!==void 0)return Ze}var yt;pe=!0;var wt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var gt;gt=Le.current,Le.current=null,be();try{if(Ie){var Rt=function(){throw Error()};if(Object.defineProperty(Rt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Rt,[])}catch(mn){yt=mn}Reflect.construct(re,[],Rt)}else{try{Rt.call()}catch(mn){yt=mn}re.call(Rt.prototype)}}else{try{throw Error()}catch(mn){yt=mn}re()}}catch(mn){if(mn&&yt&&typeof mn.stack=="string"){for(var bt=mn.stack.split(`
41
+ `),wn=yt.stack.split(`
42
+ `),on=bt.length-1,Wt=wn.length-1;on>=1&&Wt>=0&&bt[on]!==wn[Wt];)Wt--;for(;on>=1&&Wt>=0;on--,Wt--)if(bt[on]!==wn[Wt]){if(on!==1||Wt!==1)do if(on--,Wt--,Wt<0||bt[on]!==wn[Wt]){var pn=`
43
+ `+bt[on].replace(" at new "," at ");return re.displayName&&pn.includes("<anonymous>")&&(pn=pn.replace("<anonymous>",re.displayName)),typeof re=="function"&&le.set(re,pn),pn}while(on>=1&&Wt>=0);break}}}finally{pe=!1,Le.current=gt,Ve(),Error.prepareStackTrace=wt}var vn=re?re.displayName||re.name:"",Yn=vn?G(vn):"";return typeof re=="function"&&le.set(re,Yn),Yn}function Xe(re,Ie,Ze){return Te(re,!1)}function Ke(re){var Ie=re.prototype;return!!(Ie&&Ie.isReactComponent)}function st(re,Ie,Ze){if(re==null)return"";if(typeof re=="function")return Te(re,Ke(re));if(typeof re=="string")return G(re);switch(re){case g:return G("Suspense");case y:return G("SuspenseList")}if(typeof re=="object")switch(re.$$typeof){case o:return Xe(re.render);case u:return st(re.type,Ie,Ze);case p:{var yt=re,wt=yt._payload,gt=yt._init;try{return st(gt(wt),Ie,Ze)}catch{}}}return""}var jt=Object.prototype.hasOwnProperty,Ye={},$t=m.ReactDebugCurrentFrame;function Yt(re){if(re){var Ie=re._owner,Ze=st(re.type,re._source,Ie?Ie.type:null);$t.setExtraStackFrame(Ze)}else $t.setExtraStackFrame(null)}function dt(re,Ie,Ze,yt,wt){{var gt=Function.call.bind(jt);for(var Rt in re)if(gt(re,Rt)){var bt=void 0;try{if(typeof re[Rt]!="function"){var wn=Error((yt||"React class")+": "+Ze+" type `"+Rt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof re[Rt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw wn.name="Invariant Violation",wn}bt=re[Rt](Ie,Rt,yt,Ze,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(on){bt=on}bt&&!(bt instanceof Error)&&(Yt(wt),f("%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).",yt||"React class",Ze,Rt,typeof bt),Yt(null)),bt instanceof Error&&!(bt.message in Ye)&&(Ye[bt.message]=!0,Yt(wt),f("Failed %s type: %s",Ze,bt.message),Yt(null))}}}var Je=Array.isArray;function nt(re){return Je(re)}function ne(re){{var Ie=typeof Symbol=="function"&&Symbol.toStringTag,Ze=Ie&&re[Symbol.toStringTag]||re.constructor.name||"Object";return Ze}}function Fe(re){try{return tt(re),!1}catch{return!0}}function tt(re){return""+re}function me(re){if(Fe(re))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ne(re)),tt(re)}var rt=m.ReactCurrentOwner,Re={key:!0,ref:!0,__self:!0,__source:!0},fe,ce,Ee;Ee={};function Oe(re){if(jt.call(re,"ref")){var Ie=Object.getOwnPropertyDescriptor(re,"ref").get;if(Ie&&Ie.isReactWarning)return!1}return re.ref!==void 0}function vt(re){if(jt.call(re,"key")){var Ie=Object.getOwnPropertyDescriptor(re,"key").get;if(Ie&&Ie.isReactWarning)return!1}return re.key!==void 0}function Ct(re,Ie){if(typeof re.ref=="string"&&rt.current&&Ie&&rt.current.stateNode!==Ie){var Ze=I(rt.current.type);Ee[Ze]||(f('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',I(rt.current.type),re.ref),Ee[Ze]=!0)}}function ot(re,Ie){{var Ze=function(){fe||(fe=!0,f("%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)",Ie))};Ze.isReactWarning=!0,Object.defineProperty(re,"key",{get:Ze,configurable:!0})}}function St(re,Ie){{var Ze=function(){ce||(ce=!0,f("%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)",Ie))};Ze.isReactWarning=!0,Object.defineProperty(re,"ref",{get:Ze,configurable:!0})}}var yn=function(re,Ie,Ze,yt,wt,gt,Rt){var bt={$$typeof:a,type:re,key:Ie,ref:Ze,props:Rt,_owner:gt};return bt._store={},Object.defineProperty(bt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(bt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:yt}),Object.defineProperty(bt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:wt}),Object.freeze&&(Object.freeze(bt.props),Object.freeze(bt)),bt};function hn(re,Ie,Ze,yt,wt){{var gt,Rt={},bt=null,wn=null;Ze!==void 0&&(me(Ze),bt=""+Ze),vt(Ie)&&(me(Ie.key),bt=""+Ie.key),Oe(Ie)&&(wn=Ie.ref,Ct(Ie,wt));for(gt in Ie)jt.call(Ie,gt)&&!Re.hasOwnProperty(gt)&&(Rt[gt]=Ie[gt]);if(re&&re.defaultProps){var on=re.defaultProps;for(gt in on)Rt[gt]===void 0&&(Rt[gt]=on[gt])}if(bt||wn){var Wt=typeof re=="function"?re.displayName||re.name||"Unknown":re;bt&&ot(Rt,Wt),wn&&St(Rt,Wt)}return yn(re,bt,wn,wt,yt,rt.current,Rt)}}var qt=m.ReactCurrentOwner,It=m.ReactDebugCurrentFrame;function Pt(re){if(re){var Ie=re._owner,Ze=st(re.type,re._source,Ie?Ie.type:null);It.setExtraStackFrame(Ze)}else It.setExtraStackFrame(null)}var Un;Un=!1;function Hn(re){return typeof re=="object"&&re!==null&&re.$$typeof===a}function ei(){{if(qt.current){var re=I(qt.current.type);if(re)return`
44
+
45
+ Check the render method of \``+re+"`."}return""}}function Di(re){{if(re!==void 0){var Ie=re.fileName.replace(/^.*[\\\/]/,""),Ze=re.lineNumber;return`
46
+
47
+ Check your code at `+Ie+":"+Ze+"."}return""}}var ti={};function ii(re){{var Ie=ei();if(!Ie){var Ze=typeof re=="string"?re:re.displayName||re.name;Ze&&(Ie=`
48
+
49
+ Check the top-level render call using <`+Ze+">.")}return Ie}}function Cn(re,Ie){{if(!re._store||re._store.validated||re.key!=null)return;re._store.validated=!0;var Ze=ii(Ie);if(ti[Ze])return;ti[Ze]=!0;var yt="";re&&re._owner&&re._owner!==qt.current&&(yt=" It was passed a child from "+I(re._owner.type)+"."),Pt(re),f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Ze,yt),Pt(null)}}function fn(re,Ie){{if(typeof re!="object")return;if(nt(re))for(var Ze=0;Ze<re.length;Ze++){var yt=re[Ze];Hn(yt)&&Cn(yt,Ie)}else if(Hn(re))re._store&&(re._store.validated=!0);else if(re){var wt=l(re);if(typeof wt=="function"&&wt!==re.entries)for(var gt=wt.call(re),Rt;!(Rt=gt.next()).done;)Hn(Rt.value)&&Cn(Rt.value,Ie)}}}function zn(re){{var Ie=re.type;if(Ie==null||typeof Ie=="string")return;var Ze;if(typeof Ie=="function")Ze=Ie.propTypes;else if(typeof Ie=="object"&&(Ie.$$typeof===o||Ie.$$typeof===u))Ze=Ie.propTypes;else return;if(Ze){var yt=I(Ie);dt(Ze,re.props,"prop",yt,re)}else if(Ie.PropTypes!==void 0&&!Un){Un=!0;var wt=I(Ie);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",wt||"Unknown")}typeof Ie.getDefaultProps=="function"&&!Ie.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Zt(re){{for(var Ie=Object.keys(re.props),Ze=0;Ze<Ie.length;Ze++){var yt=Ie[Ze];if(yt!=="children"&&yt!=="key"){Pt(re),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",yt),Pt(null);break}}re.ref!==null&&(Pt(re),f("Invalid attribute `ref` supplied to `React.Fragment`."),Pt(null))}}var Ln={};function Rn(re,Ie,Ze,yt,wt,gt){{var Rt=M(re);if(!Rt){var bt="";(re===void 0||typeof re=="object"&&re!==null&&Object.keys(re).length===0)&&(bt+=" 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 wn=Di(wt);wn?bt+=wn:bt+=ei();var on;re===null?on="null":nt(re)?on="array":re!==void 0&&re.$$typeof===a?(on="<"+(I(re.type)||"Unknown")+" />",bt=" Did you accidentally export a JSX literal instead of a component?"):on=typeof re,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",on,bt)}var Wt=hn(re,Ie,Ze,wt,gt);if(Wt==null)return Wt;if(Rt){var pn=Ie.children;if(pn!==void 0)if(yt)if(nt(pn)){for(var vn=0;vn<pn.length;vn++)fn(pn[vn],re);Object.freeze&&Object.freeze(pn)}else f("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 fn(pn,re)}if(jt.call(Ie,"key")){var Yn=I(re),mn=Object.keys(Ie).filter(function(Vt){return Vt!=="key"}),ji=mn.length>0?"{key: someKey, "+mn.join(": ..., ")+": ...}":"{key: someKey}";if(!Ln[Yn+ji]){var si=mn.length>0?"{"+mn.join(": ..., ")+": ...}":"{}";f(`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} />`,ji,Yn,si,Yn),Ln[Yn+ji]=!0}}return re===w?Zt(Wt):zn(Wt),Wt}}var ri=Rn;ag.Fragment=w,ag.jsxDEV=ri})();jS.exports=ag;var h=jS.exports,RS={exports:{}},Dr={},TS={exports:{}},LS={};(function(c){/**
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 a=!1,d=5;function w(ce,Ee){var Oe=ce.length;ce.push(Ee),b(ce,Ee,Oe)}function j(ce){return ce.length===0?null:ce[0]}function L(ce){if(ce.length===0)return null;var Ee=ce[0],Oe=ce.pop();return Oe!==Ee&&(ce[0]=Oe,r(ce,Oe,0)),Ee}function b(ce,Ee,Oe){for(var vt=Oe;vt>0;){var Ct=vt-1>>>1,ot=ce[Ct];if(o(ot,Ee)>0)ce[Ct]=Ee,ce[vt]=ot,vt=Ct;else return}}function r(ce,Ee,Oe){for(var vt=Oe,Ct=ce.length,ot=Ct>>>1;vt<ot;){var St=(vt+1)*2-1,yn=ce[St],hn=St+1,qt=ce[hn];if(o(yn,Ee)<0)hn<Ct&&o(qt,yn)<0?(ce[vt]=qt,ce[hn]=Ee,vt=hn):(ce[vt]=yn,ce[St]=Ee,vt=St);else if(hn<Ct&&o(qt,Ee)<0)ce[vt]=qt,ce[hn]=Ee,vt=hn;else return}}function o(ce,Ee){var Oe=ce.sortIndex-Ee.sortIndex;return Oe!==0?Oe:ce.id-Ee.id}var g=1,y=2,u=3,p=4,S=5;function N(ce,Ee){}var _=typeof performance=="object"&&typeof performance.now=="function";if(_){var l=performance;c.unstable_now=function(){return l.now()}}else{var m=Date,f=m.now();c.unstable_now=function(){return m.now()-f}}var v=1073741823,C=-1,T=250,E=5e3,A=1e4,D=v,R=[],M=[],$=1,O=null,I=u,Y=!1,Q=!1,Z=!1,ee=typeof setTimeout=="function"?setTimeout:null,oe=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 W(ce){for(var Ee=j(M);Ee!==null;){if(Ee.callback===null)L(M);else if(Ee.startTime<=ce)L(M),Ee.sortIndex=Ee.expirationTime,w(R,Ee);else return;Ee=j(M)}}function V(ce){if(Z=!1,W(ce),!Q)if(j(R)!==null)Q=!0,tt(J);else{var Ee=j(M);Ee!==null&&me(V,Ee.startTime-ce)}}function J(ce,Ee){Q=!1,Z&&(Z=!1,rt()),Y=!0;var Oe=I;try{var vt;if(!a)return _e(ce,Ee)}finally{O=null,I=Oe,Y=!1}}function _e(ce,Ee){var Oe=Ee;for(W(Oe),O=j(R);O!==null&&!(O.expirationTime>Oe&&(!ce||$t()));){var vt=O.callback;if(typeof vt=="function"){O.callback=null,I=O.priorityLevel;var Ct=O.expirationTime<=Oe,ot=vt(Ct);Oe=c.unstable_now(),typeof ot=="function"?O.callback=ot:O===j(R)&&L(R),W(Oe)}else L(R);O=j(R)}if(O!==null)return!0;var St=j(M);return St!==null&&me(V,St.startTime-Oe),!1}function be(ce,Ee){switch(ce){case g:case y:case u:case p:case S:break;default:ce=u}var Oe=I;I=ce;try{return Ee()}finally{I=Oe}}function Ve(ce){var Ee;switch(I){case g:case y:case u:Ee=u;break;default:Ee=I;break}var Oe=I;I=Ee;try{return ce()}finally{I=Oe}}function Le(ce){var Ee=I;return function(){var Oe=I;I=Ee;try{return ce.apply(this,arguments)}finally{I=Oe}}}function ie(ce,Ee,Oe){var vt=c.unstable_now(),Ct;if(typeof Oe=="object"&&Oe!==null){var ot=Oe.delay;typeof ot=="number"&&ot>0?Ct=vt+ot:Ct=vt}else Ct=vt;var St;switch(ce){case g:St=C;break;case y:St=T;break;case S:St=D;break;case p:St=A;break;case u:default:St=E;break}var yn=Ct+St,hn={id:$++,callback:Ee,priorityLevel:ce,startTime:Ct,expirationTime:yn,sortIndex:-1};return Ct>vt?(hn.sortIndex=Ct,w(M,hn),j(R)===null&&hn===j(M)&&(Z?rt():Z=!0,me(V,Ct-vt))):(hn.sortIndex=yn,w(R,hn),!Q&&!Y&&(Q=!0,tt(J))),hn}function G(){}function pe(){!Q&&!Y&&(Q=!0,tt(J))}function le(){return j(R)}function Be(ce){ce.callback=null}function Te(){return I}var Xe=!1,Ke=null,st=-1,jt=d,Ye=-1;function $t(){var ce=c.unstable_now()-Ye;return!(ce<jt)}function Yt(){}function dt(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?jt=Math.floor(1e3/ce):jt=d}var Je=function(){if(Ke!==null){var ce=c.unstable_now();Ye=ce;var Ee=!0,Oe=!0;try{Oe=Ke(Ee,ce)}finally{Oe?nt():(Xe=!1,Ke=null)}}else Xe=!1},nt;if(typeof P=="function")nt=function(){P(Je)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,Fe=ne.port2;ne.port1.onmessage=Je,nt=function(){Fe.postMessage(null)}}else nt=function(){ee(Je,0)};function tt(ce){Ke=ce,Xe||(Xe=!0,nt())}function me(ce,Ee){st=ee(function(){ce(c.unstable_now())},Ee)}function rt(){oe(st),st=-1}var Re=Yt,fe=null;c.unstable_IdlePriority=S,c.unstable_ImmediatePriority=g,c.unstable_LowPriority=p,c.unstable_NormalPriority=u,c.unstable_Profiling=fe,c.unstable_UserBlockingPriority=y,c.unstable_cancelCallback=Be,c.unstable_continueExecution=pe,c.unstable_forceFrameRate=dt,c.unstable_getCurrentPriorityLevel=Te,c.unstable_getFirstCallbackNode=le,c.unstable_next=Ve,c.unstable_pauseExecution=G,c.unstable_requestPaint=Re,c.unstable_runWithPriority=be,c.unstable_scheduleCallback=ie,c.unstable_shouldYield=$t,c.unstable_wrapCallback=Le,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(LS);TS.exports=LS;var SL=TS.exports;/**
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
+ */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var c=H,a=SL,d=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=!1;function j(e){w=e}function L(e){if(!w){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r("warn",e,n)}}function b(e){if(!w){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r("error",e,n)}}function r(e,t,n){{var i=d.ReactDebugCurrentFrame,s=i.getStackAddendum();s!==""&&(t+="%s",n=n.concat([s]));var x=n.map(function(k){return String(k)});x.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,x)}}var o=0,g=1,y=2,u=3,p=4,S=5,N=6,_=7,l=8,m=9,f=10,v=11,C=12,T=13,E=14,A=15,D=16,R=17,M=18,$=19,O=21,I=22,Y=23,Q=24,Z=25,ee=!0,oe=!1,P=!1,W=!1,V=!1,J=!0,_e=!0,be=!0,Ve=!0,Le=new Set,ie={},G={};function pe(e,t){le(e,t),le(e+"Capture",t)}function le(e,t){ie[e]&&b("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),ie[e]=t;{var n=e.toLowerCase();G[n]=e,e==="onDoubleClick"&&(G.ondblclick=e)}for(var i=0;i<t.length;i++)Le.add(t[i])}var Be=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Te=Object.prototype.hasOwnProperty;function Xe(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,n=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function Ke(e){try{return st(e),!1}catch{return!0}}function st(e){return""+e}function jt(e,t){if(Ke(e))return b("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Xe(e)),st(e)}function Ye(e){if(Ke(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(e)),st(e)}function $t(e,t){if(Ke(e))return b("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Xe(e)),st(e)}function Yt(e,t){if(Ke(e))return b("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",t,Xe(e)),st(e)}function dt(e){if(Ke(e))return b("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",Xe(e)),st(e)}function Je(e){if(Ke(e))return b("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.",Xe(e)),st(e)}var nt=0,ne=1,Fe=2,tt=3,me=4,rt=5,Re=6,fe=":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=fe+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ee=new RegExp("^["+fe+"]["+ce+"]*$"),Oe={},vt={};function Ct(e){return Te.call(vt,e)?!0:Te.call(Oe,e)?!1:Ee.test(e)?(vt[e]=!0,!0):(Oe[e]=!0,b("Invalid attribute name: `%s`",e),!1)}function ot(e,t,n){return t!==null?t.type===nt:n?!1:e.length>2&&(e[0]==="o"||e[0]==="O")&&(e[1]==="n"||e[1]==="N")}function St(e,t,n,i){if(n!==null&&n.type===nt)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":{if(i)return!1;if(n!==null)return!n.acceptsBooleans;var s=e.toLowerCase().slice(0,5);return s!=="data-"&&s!=="aria-"}default:return!1}}function yn(e,t,n,i){if(t===null||typeof t>"u"||St(e,t,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case tt:return!t;case me:return t===!1;case rt:return isNaN(t);case Re:return isNaN(t)||t<1}return!1}function hn(e){return It.hasOwnProperty(e)?It[e]:null}function qt(e,t,n,i,s,x,k){this.acceptsBooleans=t===Fe||t===tt||t===me,this.attributeName=i,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=x,this.removeEmptyString=k}var It={},Pt=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Pt.forEach(function(e){It[e]=new qt(e,nt,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0],n=e[1];It[t]=new qt(t,ne,!1,n,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){It[e]=new qt(e,Fe,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){It[e]=new qt(e,Fe,!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){It[e]=new qt(e,tt,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){It[e]=new qt(e,tt,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){It[e]=new qt(e,me,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){It[e]=new qt(e,Re,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){It[e]=new qt(e,rt,!1,e.toLowerCase(),null,!1,!1)});var Un=/[\-\:]([a-z])/g,Hn=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(Un,Hn);It[t]=new qt(t,ne,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(Un,Hn);It[t]=new qt(t,ne,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Un,Hn);It[t]=new qt(t,ne,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){It[e]=new qt(e,ne,!1,e.toLowerCase(),null,!1,!1)});var ei="xlinkHref";It[ei]=new qt("xlinkHref",ne,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){It[e]=new qt(e,ne,!1,e.toLowerCase(),null,!0,!0)});var Di=/^[\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,ti=!1;function ii(e){!ti&&Di.test(e)&&(ti=!0,b("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 Cn(e,t,n,i){if(i.mustUseProperty){var s=i.propertyName;return e[s]}else{jt(n,t),i.sanitizeURL&&ii(""+n);var x=i.attributeName,k=null;if(i.type===me){if(e.hasAttribute(x)){var U=e.getAttribute(x);return U===""?!0:yn(t,n,i,!1)?U:U===""+n?n:U}}else if(e.hasAttribute(x)){if(yn(t,n,i,!1))return e.getAttribute(x);if(i.type===tt)return n;k=e.getAttribute(x)}return yn(t,n,i,!1)?k===null?n:k:k===""+n?n:k}}function fn(e,t,n,i){{if(!Ct(t))return;if(!e.hasAttribute(t))return n===void 0?void 0:null;var s=e.getAttribute(t);return jt(n,t),s===""+n?n:s}}function zn(e,t,n,i){var s=hn(t);if(!ot(t,s,i)){if(yn(t,n,s,i)&&(n=null),i||s===null){if(Ct(t)){var x=t;n===null?e.removeAttribute(x):(jt(n,t),e.setAttribute(x,""+n))}return}var k=s.mustUseProperty;if(k){var U=s.propertyName;if(n===null){var F=s.type;e[U]=F===tt?!1:""}else e[U]=n;return}var q=s.attributeName,K=s.attributeNamespace;if(n===null)e.removeAttribute(q);else{var de=s.type,ue;de===tt||de===me&&n===!0?ue="":(jt(n,q),ue=""+n,s.sanitizeURL&&ii(ue.toString())),K?e.setAttributeNS(K,q,ue):e.setAttribute(q,ue)}}}var Zt=Symbol.for("react.element"),Ln=Symbol.for("react.portal"),Rn=Symbol.for("react.fragment"),ri=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),Ie=Symbol.for("react.provider"),Ze=Symbol.for("react.context"),yt=Symbol.for("react.forward_ref"),wt=Symbol.for("react.suspense"),gt=Symbol.for("react.suspense_list"),Rt=Symbol.for("react.memo"),bt=Symbol.for("react.lazy"),wn=Symbol.for("react.scope"),on=Symbol.for("react.debug_trace_mode"),Wt=Symbol.for("react.offscreen"),pn=Symbol.for("react.legacy_hidden"),vn=Symbol.for("react.cache"),Yn=Symbol.for("react.tracing_marker"),mn=Symbol.iterator,ji="@@iterator";function si(e){if(e===null||typeof e!="object")return null;var t=mn&&e[mn]||e[ji];return typeof t=="function"?t:null}var Vt=Object.assign,ae=0,He,xe,X,je,qe,kt,mt;function Tt(){}Tt.__reactDisabledLog=!0;function tn(){{if(ae===0){He=console.log,xe=console.info,X=console.warn,je=console.error,qe=console.group,kt=console.groupCollapsed,mt=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Tt,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}ae++}}function Xt(){{if(ae--,ae===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Vt({},e,{value:He}),info:Vt({},e,{value:xe}),warn:Vt({},e,{value:X}),error:Vt({},e,{value:je}),group:Vt({},e,{value:qe}),groupCollapsed:Vt({},e,{value:kt}),groupEnd:Vt({},e,{value:mt})})}ae<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Qt=d.ReactCurrentDispatcher,On;function Gt(e,t,n){{if(On===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);On=i&&i[1]||""}return`
71
+ `+On+e}}var An=!1,Xn;{var ai=typeof WeakMap=="function"?WeakMap:Map;Xn=new ai}function Vi(e,t){if(!e||An)return"";{var n=Xn.get(e);if(n!==void 0)return n}var i;An=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var x;x=Qt.current,Qt.current=null,tn();try{if(t){var k=function(){throw Error()};if(Object.defineProperty(k.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(k,[])}catch(Ce){i=Ce}Reflect.construct(e,[],k)}else{try{k.call()}catch(Ce){i=Ce}e.call(k.prototype)}}else{try{throw Error()}catch(Ce){i=Ce}e()}}catch(Ce){if(Ce&&i&&typeof Ce.stack=="string"){for(var U=Ce.stack.split(`
72
+ `),F=i.stack.split(`
73
+ `),q=U.length-1,K=F.length-1;q>=1&&K>=0&&U[q]!==F[K];)K--;for(;q>=1&&K>=0;q--,K--)if(U[q]!==F[K]){if(q!==1||K!==1)do if(q--,K--,K<0||U[q]!==F[K]){var de=`
74
+ `+U[q].replace(" at new "," at ");return e.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",e.displayName)),typeof e=="function"&&Xn.set(e,de),de}while(q>=1&&K>=0);break}}}finally{An=!1,Qt.current=x,Xt(),Error.prepareStackTrace=s}var ue=e?e.displayName||e.name:"",ye=ue?Gt(ue):"";return typeof e=="function"&&Xn.set(e,ye),ye}function Hr(e,t,n){return Vi(e,!0)}function zr(e,t,n){return Vi(e,!1)}function ss(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Ki(e,t,n){if(e==null)return"";if(typeof e=="function")return Vi(e,ss(e));if(typeof e=="string")return Gt(e);switch(e){case wt:return Gt("Suspense");case gt:return Gt("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case yt:return zr(e.render);case Rt:return Ki(e.type,t,n);case bt:{var i=e,s=i._payload,x=i._init;try{return Ki(x(s),t,n)}catch{}}}return""}function $r(e){switch(e._debugOwner&&e._debugOwner.type,e._debugSource,e.tag){case S:return Gt(e.type);case D:return Gt("Lazy");case T:return Gt("Suspense");case $:return Gt("SuspenseList");case o:case y:case A:return zr(e.type);case v:return zr(e.type.render);case g:return Hr(e.type);default:return""}}function Xi(e){try{var t="",n=e;do t+=$r(n),n=n.return;while(n);return t}catch(i){return`
75
+ Error generating stack: `+i.message+`
76
+ `+i.stack}}function Fi(e,t,n){var i=e.displayName;if(i)return i;var s=t.displayName||t.name||"";return s!==""?n+"("+s+")":n}function _r(e){return e.displayName||"Context"}function sn(e){if(e==null)return null;if(typeof e.tag=="number"&&b("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 Rn:return"Fragment";case Ln:return"Portal";case re:return"Profiler";case ri:return"StrictMode";case wt:return"Suspense";case gt:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ze:var t=e;return _r(t)+".Consumer";case Ie:var n=e;return _r(n._context)+".Provider";case yt:return Fi(e,e.render,"ForwardRef");case Rt:var i=e.displayName||null;return i!==null?i:sn(e.type)||"Memo";case bt:{var s=e,x=s._payload,k=s._init;try{return sn(k(x))}catch{return null}}}return null}function as(e,t,n){var i=t.displayName||t.name||"";return e.displayName||(i!==""?n+"("+i+")":n)}function lr(e){return e.displayName||"Context"}function At(e){var t=e.tag,n=e.type;switch(t){case Q:return"Cache";case m:var i=n;return lr(i)+".Consumer";case f:var s=n;return lr(s._context)+".Provider";case M:return"DehydratedFragment";case v:return as(n,n.render,"ForwardRef");case _:return"Fragment";case S:return n;case p:return"Portal";case u:return"Root";case N:return"Text";case D:return sn(n);case l:return n===ri?"StrictMode":"Mode";case I:return"Offscreen";case C:return"Profiler";case O:return"Scope";case T:return"Suspense";case $:return"SuspenseList";case Z:return"TracingMarker";case g:case o:case R:case y:case E:case A:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;break}return null}var Tr=d.ReactDebugCurrentFrame,Vn=null,cr=!1;function Ji(){{if(Vn===null)return null;var e=Vn._debugOwner;if(e!==null&&typeof e<"u")return At(e)}return null}function Cs(){return Vn===null?"":Xi(Vn)}function qn(){Tr.getCurrentStack=null,Vn=null,cr=!1}function En(e){Tr.getCurrentStack=e===null?null:Cs,Vn=e,cr=!1}function os(){return Vn}function yi(e){cr=e}function he(e){return""+e}function Se(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return Je(e),e;default:return""}}var We={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function et(e,t){We[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||b("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||b("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 _t(e){var t=e.type,n=e.nodeName;return n&&n.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Et(e){return e._valueTracker}function Mt(e){e._valueTracker=null}function Kt(e){var t="";return e&&(_t(e)?t=e.checked?"true":"false":t=e.value),t}function $n(e){var t=_t(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);Je(e[t]);var i=""+e[t];if(!(e.hasOwnProperty(t)||typeof n>"u"||typeof n.get!="function"||typeof n.set!="function")){var s=n.get,x=n.set;Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(U){Je(U),i=""+U,x.call(this,U)}}),Object.defineProperty(e,t,{enumerable:n.enumerable});var k={getValue:function(){return i},setValue:function(U){Je(U),i=""+U},stopTracking:function(){Mt(e),delete e[t]}};return k}}function Pn(e){Et(e)||(e._valueTracker=$n(e))}function Zi(e){if(!e)return!1;var t=Et(e);if(!t)return!0;var n=t.getValue(),i=Kt(e);return i!==n?(t.setValue(i),!0):!1}function wi(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 ur=!1,Lr=!1,oi=!1,Na=!1;function Es(e){var t=e.type==="checkbox"||e.type==="radio";return t?e.checked!=null:e.value!=null}function Ca(e,t){var n=e,i=t.checked,s=Vt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??n._wrapperState.initialChecked});return s}function Ea(e,t){et("input",t),t.checked!==void 0&&t.defaultChecked!==void 0&&!Lr&&(b("%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",Ji()||"A component",t.type),Lr=!0),t.value!==void 0&&t.defaultValue!==void 0&&!ur&&(b("%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",Ji()||"A component",t.type),ur=!0);var n=e,i=t.defaultValue==null?"":t.defaultValue;n._wrapperState={initialChecked:t.checked!=null?t.checked:t.defaultChecked,initialValue:Se(t.value!=null?t.value:i),controlled:Es(t)}}function z(e,t){var n=e,i=t.checked;i!=null&&zn(n,"checked",i,!1)}function se(e,t){var n=e;{var i=Es(t);!n._wrapperState.controlled&&i&&!Na&&(b("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"),Na=!0),n._wrapperState.controlled&&!i&&!oi&&(b("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"),oi=!0)}z(e,t);var s=Se(t.value),x=t.type;if(s!=null)x==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=he(s)):n.value!==he(s)&&(n.value=he(s));else if(x==="submit"||x==="reset"){n.removeAttribute("value");return}t.hasOwnProperty("value")?Ne(n,t.type,s):t.hasOwnProperty("defaultValue")&&Ne(n,t.type,Se(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(n.defaultChecked=!!t.defaultChecked)}function we(e,t,n){var i=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type,x=s==="submit"||s==="reset";if(x&&(t.value===void 0||t.value===null))return;var k=he(i._wrapperState.initialValue);n||k!==i.value&&(i.value=k),i.defaultValue=k}var U=i.name;U!==""&&(i.name=""),i.defaultChecked=!i.defaultChecked,i.defaultChecked=!!i._wrapperState.initialChecked,U!==""&&(i.name=U)}function ke(e,t){var n=e;se(n,t),te(n,t)}function te(e,t){var n=t.name;if(t.type==="radio"&&n!=null){for(var i=e;i.parentNode;)i=i.parentNode;jt(n,"name");for(var s=i.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),x=0;x<s.length;x++){var k=s[x];if(!(k===e||k.form!==e.form)){var U=Zu(k);if(!U)throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Zi(k),se(k,U)}}}}function Ne(e,t,n){(t!=="number"||wi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=he(e._wrapperState.initialValue):e.defaultValue!==he(n)&&(e.defaultValue=he(n)))}var De=!1,Ue=!1,$e=!1;function it(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?c.Children.forEach(t.children,function(n){n!=null&&(typeof n=="string"||typeof n=="number"||Ue||(Ue=!0,b("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}):t.dangerouslySetInnerHTML!=null&&($e||($e=!0,b("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),t.selected!=null&&!De&&(b("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),De=!0)}function ht(e,t){t.value!=null&&e.setAttribute("value",he(Se(t.value)))}var Nt=Array.isArray;function Qe(e){return Nt(e)}var nn;nn=!1;function rn(){var e=Ji();return e?`
77
+
78
+ Check the render method of \``+e+"`.":""}var gn=["value","defaultValue"];function xi(e){{et("select",e);for(var t=0;t<gn.length;t++){var n=gn[t];if(e[n]!=null){var i=Qe(e[n]);e.multiple&&!i?b("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,rn()):!e.multiple&&i&&b("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,rn())}}}}function ki(e,t,n,i){var s=e.options;if(t){for(var x=n,k={},U=0;U<x.length;U++)k["$"+x[U]]=!0;for(var F=0;F<s.length;F++){var q=k.hasOwnProperty("$"+s[F].value);s[F].selected!==q&&(s[F].selected=q),q&&i&&(s[F].defaultSelected=!0)}}else{for(var K=he(Se(n)),de=null,ue=0;ue<s.length;ue++){if(s[ue].value===K){s[ue].selected=!0,i&&(s[ue].defaultSelected=!0);return}de===null&&!s[ue].disabled&&(de=s[ue])}de!==null&&(de.selected=!0)}}function Ds(e,t){return Vt({},t,{value:void 0})}function Js(e,t){var n=e;xi(t),n._wrapperState={wasMultiple:!!t.multiple},t.value!==void 0&&t.defaultValue!==void 0&&!nn&&(b("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"),nn=!0)}function Da(e,t){var n=e;n.multiple=!!t.multiple;var i=t.value;i!=null?ki(n,!!t.multiple,i,!1):t.defaultValue!=null&&ki(n,!!t.multiple,t.defaultValue,!0)}function Ar(e,t){var n=e,i=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!t.multiple;var s=t.value;s!=null?ki(n,!!t.multiple,s,!1):i!==!!t.multiple&&(t.defaultValue!=null?ki(n,!!t.multiple,t.defaultValue,!0):ki(n,!!t.multiple,t.multiple?[]:"",!1))}function ho(e,t){var n=e,i=t.value;i!=null&&ki(n,!!t.multiple,i,!1)}var Jg=!1;function $h(e,t){var n=e;if(t.dangerouslySetInnerHTML!=null)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var i=Vt({},t,{value:void 0,defaultValue:void 0,children:he(n._wrapperState.initialValue)});return i}function Zg(e,t){var n=e;et("textarea",t),t.value!==void 0&&t.defaultValue!==void 0&&!Jg&&(b("%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",Ji()||"A component"),Jg=!0);var i=t.value;if(i==null){var s=t.children,x=t.defaultValue;if(s!=null){b("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(x!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Qe(s)){if(s.length>1)throw new Error("<textarea> can only have at most one child.");s=s[0]}x=s}}x==null&&(x=""),i=x}n._wrapperState={initialValue:Se(i)}}function Qg(e,t){var n=e,i=Se(t.value),s=Se(t.defaultValue);if(i!=null){var x=he(i);x!==n.value&&(n.value=x),t.defaultValue==null&&n.defaultValue!==x&&(n.defaultValue=x)}s!=null&&(n.defaultValue=he(s))}function e_(e,t){var n=e,i=n.textContent;i===n._wrapperState.initialValue&&i!==""&&i!==null&&(n.value=i)}function aN(e,t){Qg(e,t)}var js="http://www.w3.org/1999/xhtml",oN="http://www.w3.org/1998/Math/MathML",Wh="http://www.w3.org/2000/svg";function Gh(e){switch(e){case"svg":return Wh;case"math":return oN;default:return js}}function Yh(e,t){return e==null||e===js?Gh(t):e===Wh&&t==="foreignObject"?js:e}var lN=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,i,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,i,s)})}:e},mu,t_=lN(function(e,t){if(e.namespaceURI===Wh&&!("innerHTML"in e)){mu=mu||document.createElement("div"),mu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";for(var n=mu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild);return}e.innerHTML=t}),dr=1,ks=3,li=8,Rs=9,qh=11,pu=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===ks){n.nodeValue=t;return}}e.textContent=t},cN={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"]},bl={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 uN(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var dN=["Webkit","ms","Moz","O"];Object.keys(bl).forEach(function(e){dN.forEach(function(t){bl[uN(t,e)]=bl[e]})});function Kh(e,t,n){var i=t==null||typeof t=="boolean"||t==="";return i?"":!n&&typeof t=="number"&&t!==0&&!(bl.hasOwnProperty(e)&&bl[e])?t+"px":(Yt(t,e),(""+t).trim())}var hN=/([A-Z])/g,fN=/^ms-/;function mN(e){return e.replace(hN,"-$1").toLowerCase().replace(fN,"-ms-")}var n_=function(){};{var pN=/^(?:webkit|moz|o)[A-Z]/,vN=/^-ms-/,gN=/-(.)/g,i_=/;\s*$/,fo={},Xh={},r_=!1,s_=!1,_N=function(e){return e.replace(gN,function(t,n){return n.toUpperCase()})},bN=function(e){fo.hasOwnProperty(e)&&fo[e]||(fo[e]=!0,b("Unsupported style property %s. Did you mean %s?",e,_N(e.replace(vN,"ms-"))))},yN=function(e){fo.hasOwnProperty(e)&&fo[e]||(fo[e]=!0,b("Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))},wN=function(e,t){Xh.hasOwnProperty(t)&&Xh[t]||(Xh[t]=!0,b(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,e,t.replace(i_,"")))},xN=function(e,t){r_||(r_=!0,b("`NaN` is an invalid value for the `%s` css style property.",e))},SN=function(e,t){s_||(s_=!0,b("`Infinity` is an invalid value for the `%s` css style property.",e))};n_=function(e,t){e.indexOf("-")>-1?bN(e):pN.test(e)?yN(e):i_.test(t)&&wN(e,t),typeof t=="number"&&(isNaN(t)?xN(e,t):isFinite(t)||SN(e,t))}}var NN=n_;function CN(e){{var t="",n="";for(var i in e)if(e.hasOwnProperty(i)){var s=e[i];if(s!=null){var x=i.indexOf("--")===0;t+=n+(x?i:mN(i))+":",t+=Kh(i,s,x),n=";"}}return t||null}}function a_(e,t){var n=e.style;for(var i in t)if(t.hasOwnProperty(i)){var s=i.indexOf("--")===0;s||NN(i,t[i]);var x=Kh(i,t[i],s);i==="float"&&(i="cssFloat"),s?n.setProperty(i,x):n[i]=x}}function EN(e){return e==null||typeof e=="boolean"||e===""}function o_(e){var t={};for(var n in e)for(var i=cN[n]||[n],s=0;s<i.length;s++)t[i[s]]=n;return t}function DN(e,t){{if(!t)return;var n=o_(e),i=o_(t),s={};for(var x in n){var k=n[x],U=i[x];if(U&&k!==U){var F=k+","+U;if(s[F])continue;s[F]=!0,b("%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.",EN(e[k])?"Removing":"Updating",k,U)}}}}var jN={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},kN=Vt({menuitem:!0},jN),RN="__html";function Jh(e,t){if(t){if(kN[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"||!(RN 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&&b("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 ja(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 vu={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"},l_={"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},mo={},TN=new RegExp("^(aria)-["+ce+"]*$"),LN=new RegExp("^(aria)[A-Z]["+ce+"]*$");function AN(e,t){{if(Te.call(mo,t)&&mo[t])return!0;if(LN.test(t)){var n="aria-"+t.slice(4).toLowerCase(),i=l_.hasOwnProperty(n)?n:null;if(i==null)return b("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),mo[t]=!0,!0;if(t!==i)return b("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,i),mo[t]=!0,!0}if(TN.test(t)){var s=t.toLowerCase(),x=l_.hasOwnProperty(s)?s:null;if(x==null)return mo[t]=!0,!1;if(t!==x)return b("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,x),mo[t]=!0,!0}}return!0}function MN(e,t){{var n=[];for(var i in t){var s=AN(e,i);s||n.push(i)}var x=n.map(function(k){return"`"+k+"`"}).join(", ");n.length===1?b("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",x,e):n.length>1&&b("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",x,e)}}function UN(e,t){ja(e,t)||MN(e,t)}var c_=!1;function ON(e,t){{if(e!=="input"&&e!=="textarea"&&e!=="select")return;t!=null&&t.value===null&&!c_&&(c_=!0,e==="select"&&t.multiple?b("`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):b("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e))}}var u_=function(){};{var Qi={},d_=/^on./,PN=/^on[^A-Z]/,BN=new RegExp("^(aria)-["+ce+"]*$"),IN=new RegExp("^(aria)[A-Z]["+ce+"]*$");u_=function(e,t,n,i){if(Te.call(Qi,t)&&Qi[t])return!0;var s=t.toLowerCase();if(s==="onfocusin"||s==="onfocusout")return b("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."),Qi[t]=!0,!0;if(i!=null){var x=i.registrationNameDependencies,k=i.possibleRegistrationNames;if(x.hasOwnProperty(t))return!0;var U=k.hasOwnProperty(s)?k[s]:null;if(U!=null)return b("Invalid event handler property `%s`. Did you mean `%s`?",t,U),Qi[t]=!0,!0;if(d_.test(t))return b("Unknown event handler property `%s`. It will be ignored.",t),Qi[t]=!0,!0}else if(d_.test(t))return PN.test(t)&&b("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),Qi[t]=!0,!0;if(BN.test(t)||IN.test(t))return!0;if(s==="innerhtml")return b("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Qi[t]=!0,!0;if(s==="aria")return b("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Qi[t]=!0,!0;if(s==="is"&&n!==null&&n!==void 0&&typeof n!="string")return b("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof n),Qi[t]=!0,!0;if(typeof n=="number"&&isNaN(n))return b("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),Qi[t]=!0,!0;var F=hn(t),q=F!==null&&F.type===nt;if(vu.hasOwnProperty(s)){var K=vu[s];if(K!==t)return b("Invalid DOM property `%s`. Did you mean `%s`?",t,K),Qi[t]=!0,!0}else if(!q&&t!==s)return b("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,s),Qi[t]=!0,!0;return typeof n=="boolean"&&St(t,n,F,!1)?(n?b('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,t,t,n,t):b('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.',n,t,t,n,t,t,t),Qi[t]=!0,!0):q?!0:St(t,n,F,!1)?(Qi[t]=!0,!1):((n==="false"||n==="true")&&F!==null&&F.type===tt&&(b("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",n,t,n==="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,n),Qi[t]=!0),!0)}}var VN=function(e,t,n){{var i=[];for(var s in t){var x=u_(e,s,t[s],n);x||i.push(s)}var k=i.map(function(U){return"`"+U+"`"}).join(", ");i.length===1?b("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 ",k,e):i.length>1&&b("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 ",k,e)}};function FN(e,t,n){ja(e,t)||VN(e,t,n)}var h_=1,Zh=2,yl=4,HN=h_|Zh|yl,wl=null;function zN(e){wl!==null&&b("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),wl=e}function $N(){wl===null&&b("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),wl=null}function WN(e){return e===wl}function Qh(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===ks?t.parentNode:t}var ef=null,po=null,vo=null;function f_(e){var t=aa(e);if(t){if(typeof ef!="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 n=t.stateNode;if(n){var i=Zu(n);ef(t.stateNode,t.type,i)}}}function GN(e){ef=e}function m_(e){po?vo?vo.push(e):vo=[e]:po=e}function YN(){return po!==null||vo!==null}function p_(){if(po){var e=po,t=vo;if(po=null,vo=null,f_(e),t)for(var n=0;n<t.length;n++)f_(t[n])}}var v_=function(e,t){return e(t)},g_=function(){},tf=!1;function qN(){var e=YN();e&&(g_(),p_())}function __(e,t,n){if(tf)return e(t,n);tf=!0;try{return v_(e,t,n)}finally{tf=!1,qN()}}function KN(e,t,n){v_=e,g_=n}function XN(e){return e==="button"||e==="input"||e==="select"||e==="textarea"}function JN(e,t,n){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!!(n.disabled&&XN(t));default:return!1}}function xl(e,t){var n=e.stateNode;if(n===null)return null;var i=Zu(n);if(i===null)return null;var s=i[t];if(JN(t,e.type,i))return null;if(s&&typeof s!="function")throw new Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof s+"` type.");return s}var nf=!1;if(Be)try{var Sl={};Object.defineProperty(Sl,"passive",{get:function(){nf=!0}}),window.addEventListener("test",Sl,Sl),window.removeEventListener("test",Sl,Sl)}catch{nf=!1}function b_(e,t,n,i,s,x,k,U,F){var q=Array.prototype.slice.call(arguments,3);try{t.apply(n,q)}catch(K){this.onError(K)}}var y_=b_;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var rf=document.createElement("react");y_=function(t,n,i,s,x,k,U,F,q){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 K=document.createEvent("Event"),de=!1,ue=!0,ye=window.event,Ce=Object.getOwnPropertyDescriptor(window,"event");function Ae(){rf.removeEventListener(Me,Lt,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=ye)}var lt=Array.prototype.slice.call(arguments,3);function Lt(){de=!0,Ae(),n.apply(i,lt),ue=!1}var Dt,dn=!1,an=!1;function ve(ge){if(Dt=ge.error,dn=!0,Dt===null&&ge.colno===0&&ge.lineno===0&&(an=!0),ge.defaultPrevented&&Dt!=null&&typeof Dt=="object")try{Dt._suppressLogging=!0}catch{}}var Me="react-"+(t||"invokeguardedcallback");if(window.addEventListener("error",ve),rf.addEventListener(Me,Lt,!1),K.initEvent(Me,!1,!1),rf.dispatchEvent(K),Ce&&Object.defineProperty(window,"event",Ce),de&&ue&&(dn?an&&(Dt=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.")):Dt=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(Dt)),window.removeEventListener("error",ve),!de)return Ae(),b_.apply(this,arguments)}}var ZN=y_,go=!1,gu=null,_u=!1,sf=null,QN={onError:function(e){go=!0,gu=e}};function af(e,t,n,i,s,x,k,U,F){go=!1,gu=null,ZN.apply(QN,arguments)}function eC(e,t,n,i,s,x,k,U,F){if(af.apply(this,arguments),go){var q=of();_u||(_u=!0,sf=q)}}function tC(){if(_u){var e=sf;throw _u=!1,sf=null,e}}function nC(){return go}function of(){if(go){var e=gu;return go=!1,gu=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 _o(e){return e._reactInternals}function iC(e){return e._reactInternals!==void 0}function rC(e,t){e._reactInternals=t}var Ot=0,bo=1,ci=2,xn=4,ka=16,Nl=32,w_=64,Sn=128,Ts=256,Ra=512,yo=1024,Zs=2048,Ls=4096,Ta=8192,lf=16384,sC=32767,bu=32768,er=65536,cf=131072,x_=1048576,uf=2097152,La=4194304,df=8388608,Qs=16777216,hf=33554432,ff=xn|yo|0,mf=ci|xn|ka|Nl|Ra|Ls|Ta,Cl=xn|w_|Ra|Ta,wo=Zs|ka,As=La|df|uf,aC=d.ReactCurrentOwner;function Aa(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{var i=t;do t=i,(t.flags&(ci|Ls))!==Ot&&(n=t.return),i=t.return;while(i)}return t.tag===u?n:null}function S_(e){if(e.tag===T){var t=e.memoizedState;if(t===null){var n=e.alternate;n!==null&&(t=n.memoizedState)}if(t!==null)return t.dehydrated}return null}function N_(e){return e.tag===u?e.stateNode.containerInfo:null}function oC(e){return Aa(e)===e}function lC(e){{var t=aC.current;if(t!==null&&t.tag===g){var n=t,i=n.stateNode;i._warnedAboutRefsInRender||b("%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.",At(n)||"A component"),i._warnedAboutRefsInRender=!0}}var s=_o(e);return s?Aa(s)===s:!1}function C_(e){if(Aa(e)!==e)throw new Error("Unable to find node on an unmounted component.")}function E_(e){var t=e.alternate;if(!t){var n=Aa(e);if(n===null)throw new Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var i=e,s=t;;){var x=i.return;if(x===null)break;var k=x.alternate;if(k===null){var U=x.return;if(U!==null){i=s=U;continue}break}if(x.child===k.child){for(var F=x.child;F;){if(F===i)return C_(x),e;if(F===s)return C_(x),t;F=F.sibling}throw new Error("Unable to find node on an unmounted component.")}if(i.return!==s.return)i=x,s=k;else{for(var q=!1,K=x.child;K;){if(K===i){q=!0,i=x,s=k;break}if(K===s){q=!0,s=x,i=k;break}K=K.sibling}if(!q){for(K=k.child;K;){if(K===i){q=!0,i=k,s=x;break}if(K===s){q=!0,s=k,i=x;break}K=K.sibling}if(!q)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!==s)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!==u)throw new Error("Unable to find node on an unmounted component.");return i.stateNode.current===i?e:t}function D_(e){var t=E_(e);return t!==null?j_(t):null}function j_(e){if(e.tag===S||e.tag===N)return e;for(var t=e.child;t!==null;){var n=j_(t);if(n!==null)return n;t=t.sibling}return null}function cC(e){var t=E_(e);return t!==null?k_(t):null}function k_(e){if(e.tag===S||e.tag===N)return e;for(var t=e.child;t!==null;){if(t.tag!==p){var n=k_(t);if(n!==null)return n}t=t.sibling}return null}var R_=a.unstable_scheduleCallback,uC=a.unstable_cancelCallback,dC=a.unstable_shouldYield,hC=a.unstable_requestPaint,Si=a.unstable_now,fC=a.unstable_getCurrentPriorityLevel,yu=a.unstable_ImmediatePriority,pf=a.unstable_UserBlockingPriority,Ma=a.unstable_NormalPriority,mC=a.unstable_LowPriority,vf=a.unstable_IdlePriority,pC=a.unstable_yieldValue,vC=a.unstable_setDisableYieldValue,xo=null,Hi=null,ut=null,ls=!1,Wr=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function gC(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 b("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{_e&&(e=Vt({},e,{getLaneLabelMap:SC,injectProfilingHooks:xC})),xo=t.inject(e),Hi=t}catch(n){b("React instrumentation encountered an error: %s.",n)}return!!t.checkDCE}function _C(e,t){if(Hi&&typeof Hi.onScheduleFiberRoot=="function")try{Hi.onScheduleFiberRoot(xo,e,t)}catch(n){ls||(ls=!0,b("React instrumentation encountered an error: %s",n))}}function bC(e,t){if(Hi&&typeof Hi.onCommitFiberRoot=="function")try{var n=(e.current.flags&Sn)===Sn;if(be){var i;switch(t){case wr:i=yu;break;case Us:i=pf;break;case Os:i=Ma;break;case Du:i=vf;break;default:i=Ma;break}Hi.onCommitFiberRoot(xo,e,i,n)}}catch(s){ls||(ls=!0,b("React instrumentation encountered an error: %s",s))}}function yC(e){if(Hi&&typeof Hi.onPostCommitFiberRoot=="function")try{Hi.onPostCommitFiberRoot(xo,e)}catch(t){ls||(ls=!0,b("React instrumentation encountered an error: %s",t))}}function wC(e){if(Hi&&typeof Hi.onCommitFiberUnmount=="function")try{Hi.onCommitFiberUnmount(xo,e)}catch(t){ls||(ls=!0,b("React instrumentation encountered an error: %s",t))}}function Ni(e){if(typeof pC=="function"&&(vC(e),j(e)),Hi&&typeof Hi.setStrictMode=="function")try{Hi.setStrictMode(xo,e)}catch(t){ls||(ls=!0,b("React instrumentation encountered an error: %s",t))}}function xC(e){ut=e}function SC(){{for(var e=new Map,t=1,n=0;n<_f;n++){var i=zC(t);e.set(t,i),t*=2}return e}}function NC(e){ut!==null&&typeof ut.markCommitStarted=="function"&&ut.markCommitStarted(e)}function T_(){ut!==null&&typeof ut.markCommitStopped=="function"&&ut.markCommitStopped()}function El(e){ut!==null&&typeof ut.markComponentRenderStarted=="function"&&ut.markComponentRenderStarted(e)}function So(){ut!==null&&typeof ut.markComponentRenderStopped=="function"&&ut.markComponentRenderStopped()}function CC(e){ut!==null&&typeof ut.markComponentPassiveEffectMountStarted=="function"&&ut.markComponentPassiveEffectMountStarted(e)}function EC(){ut!==null&&typeof ut.markComponentPassiveEffectMountStopped=="function"&&ut.markComponentPassiveEffectMountStopped()}function DC(e){ut!==null&&typeof ut.markComponentPassiveEffectUnmountStarted=="function"&&ut.markComponentPassiveEffectUnmountStarted(e)}function jC(){ut!==null&&typeof ut.markComponentPassiveEffectUnmountStopped=="function"&&ut.markComponentPassiveEffectUnmountStopped()}function kC(e){ut!==null&&typeof ut.markComponentLayoutEffectMountStarted=="function"&&ut.markComponentLayoutEffectMountStarted(e)}function RC(){ut!==null&&typeof ut.markComponentLayoutEffectMountStopped=="function"&&ut.markComponentLayoutEffectMountStopped()}function L_(e){ut!==null&&typeof ut.markComponentLayoutEffectUnmountStarted=="function"&&ut.markComponentLayoutEffectUnmountStarted(e)}function A_(){ut!==null&&typeof ut.markComponentLayoutEffectUnmountStopped=="function"&&ut.markComponentLayoutEffectUnmountStopped()}function TC(e,t,n){ut!==null&&typeof ut.markComponentErrored=="function"&&ut.markComponentErrored(e,t,n)}function LC(e,t,n){ut!==null&&typeof ut.markComponentSuspended=="function"&&ut.markComponentSuspended(e,t,n)}function AC(e){ut!==null&&typeof ut.markLayoutEffectsStarted=="function"&&ut.markLayoutEffectsStarted(e)}function MC(){ut!==null&&typeof ut.markLayoutEffectsStopped=="function"&&ut.markLayoutEffectsStopped()}function UC(e){ut!==null&&typeof ut.markPassiveEffectsStarted=="function"&&ut.markPassiveEffectsStarted(e)}function OC(){ut!==null&&typeof ut.markPassiveEffectsStopped=="function"&&ut.markPassiveEffectsStopped()}function M_(e){ut!==null&&typeof ut.markRenderStarted=="function"&&ut.markRenderStarted(e)}function PC(){ut!==null&&typeof ut.markRenderYielded=="function"&&ut.markRenderYielded()}function U_(){ut!==null&&typeof ut.markRenderStopped=="function"&&ut.markRenderStopped()}function BC(e){ut!==null&&typeof ut.markRenderScheduled=="function"&&ut.markRenderScheduled(e)}function IC(e,t){ut!==null&&typeof ut.markForceUpdateScheduled=="function"&&ut.markForceUpdateScheduled(e,t)}function gf(e,t){ut!==null&&typeof ut.markStateUpdateScheduled=="function"&&ut.markStateUpdateScheduled(e,t)}var Ut=0,cn=1,Dn=2,Jn=8,cs=16,O_=Math.clz32?Math.clz32:HC,VC=Math.log,FC=Math.LN2;function HC(e){var t=e>>>0;return t===0?32:31-(VC(t)/FC|0)|0}var _f=31,ze=0,Ci=0,Ft=1,No=2,Ms=4,Ua=8,us=16,Dl=32,Co=4194240,jl=64,bf=128,yf=256,wf=512,xf=1024,Sf=2048,Nf=4096,Cf=8192,Ef=16384,Df=32768,jf=65536,kf=131072,Rf=262144,Tf=524288,Lf=1048576,Af=2097152,wu=130023424,Eo=4194304,Mf=8388608,Uf=16777216,Of=33554432,Pf=67108864,P_=Eo,kl=134217728,B_=268435455,Rl=268435456,Oa=536870912,br=1073741824;function zC(e){{if(e&Ft)return"Sync";if(e&No)return"InputContinuousHydration";if(e&Ms)return"InputContinuous";if(e&Ua)return"DefaultHydration";if(e&us)return"Default";if(e&Dl)return"TransitionHydration";if(e&Co)return"Transition";if(e&wu)return"Retry";if(e&kl)return"SelectiveHydration";if(e&Rl)return"IdleHydration";if(e&Oa)return"Idle";if(e&br)return"Offscreen"}}var Fn=-1,xu=jl,Su=Eo;function Tl(e){switch(Pa(e)){case Ft:return Ft;case No:return No;case Ms:return Ms;case Ua:return Ua;case us:return us;case Dl:return Dl;case jl:case bf:case yf:case wf:case xf:case Sf:case Nf:case Cf:case Ef:case Df:case jf:case kf:case Rf:case Tf:case Lf:case Af:return e&Co;case Eo:case Mf:case Uf:case Of:case Pf:return e&wu;case kl:return kl;case Rl:return Rl;case Oa:return Oa;case br:return br;default:return b("Should have found matching lanes. This is a bug in React."),e}}function Nu(e,t){var n=e.pendingLanes;if(n===ze)return ze;var i=ze,s=e.suspendedLanes,x=e.pingedLanes,k=n&B_;if(k!==ze){var U=k&~s;if(U!==ze)i=Tl(U);else{var F=k&x;F!==ze&&(i=Tl(F))}}else{var q=n&~s;q!==ze?i=Tl(q):x!==ze&&(i=Tl(x))}if(i===ze)return ze;if(t!==ze&&t!==i&&(t&s)===ze){var K=Pa(i),de=Pa(t);if(K>=de||K===us&&(de&Co)!==ze)return t}(i&Ms)!==ze&&(i|=n&us);var ue=e.entangledLanes;if(ue!==ze)for(var ye=e.entanglements,Ce=i&ue;Ce>0;){var Ae=Ba(Ce),lt=1<<Ae;i|=ye[Ae],Ce&=~lt}return i}function $C(e,t){for(var n=e.eventTimes,i=Fn;t>0;){var s=Ba(t),x=1<<s,k=n[s];k>i&&(i=k),t&=~x}return i}function WC(e,t){switch(e){case Ft:case No:case Ms:return t+250;case Ua:case us:case Dl:case jl:case bf:case yf:case wf:case xf:case Sf:case Nf:case Cf:case Ef:case Df:case jf:case kf:case Rf:case Tf:case Lf:case Af:return t+5e3;case Eo:case Mf:case Uf:case Of:case Pf:return Fn;case kl:case Rl:case Oa:case br:return Fn;default:return b("Should have found matching lanes. This is a bug in React."),Fn}}function GC(e,t){for(var n=e.pendingLanes,i=e.suspendedLanes,s=e.pingedLanes,x=e.expirationTimes,k=n;k>0;){var U=Ba(k),F=1<<U,q=x[U];q===Fn?((F&i)===ze||(F&s)!==ze)&&(x[U]=WC(F,t)):q<=t&&(e.expiredLanes|=F),k&=~F}}function YC(e){return Tl(e.pendingLanes)}function Bf(e){var t=e.pendingLanes&~br;return t!==ze?t:t&br?br:ze}function qC(e){return(e&Ft)!==ze}function If(e){return(e&B_)!==ze}function I_(e){return(e&wu)===e}function KC(e){var t=Ft|Ms|us;return(e&t)===ze}function XC(e){return(e&Co)===e}function Cu(e,t){var n=No|Ms|Ua|us;return(t&n)!==ze}function JC(e,t){return(t&e.expiredLanes)!==ze}function V_(e){return(e&Co)!==ze}function F_(){var e=xu;return xu<<=1,(xu&Co)===ze&&(xu=jl),e}function ZC(){var e=Su;return Su<<=1,(Su&wu)===ze&&(Su=Eo),e}function Pa(e){return e&-e}function Ll(e){return Pa(e)}function Ba(e){return 31-O_(e)}function Vf(e){return Ba(e)}function yr(e,t){return(e&t)!==ze}function Do(e,t){return(e&t)===t}function Jt(e,t){return e|t}function Eu(e,t){return e&~t}function H_(e,t){return e&t}function H2(e){return e}function QC(e,t){return e!==Ci&&e<t?e:t}function Ff(e){for(var t=[],n=0;n<_f;n++)t.push(e);return t}function Al(e,t,n){e.pendingLanes|=t,t!==Oa&&(e.suspendedLanes=ze,e.pingedLanes=ze);var i=e.eventTimes,s=Vf(t);i[s]=n}function eE(e,t){e.suspendedLanes|=t,e.pingedLanes&=~t;for(var n=e.expirationTimes,i=t;i>0;){var s=Ba(i),x=1<<s;n[s]=Fn,i&=~x}}function z_(e,t,n){e.pingedLanes|=e.suspendedLanes&t}function tE(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=ze,e.pingedLanes=ze,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t;for(var i=e.entanglements,s=e.eventTimes,x=e.expirationTimes,k=n;k>0;){var U=Ba(k),F=1<<U;i[U]=ze,s[U]=Fn,x[U]=Fn,k&=~F}}function Hf(e,t){for(var n=e.entangledLanes|=t,i=e.entanglements,s=n;s;){var x=Ba(s),k=1<<x;k&t|i[x]&t&&(i[x]|=t),s&=~k}}function nE(e,t){var n=Pa(t),i;switch(n){case Ms:i=No;break;case us:i=Ua;break;case jl:case bf:case yf:case wf:case xf:case Sf:case Nf:case Cf:case Ef:case Df:case jf:case kf:case Rf:case Tf:case Lf:case Af:case Eo:case Mf:case Uf:case Of:case Pf:i=Dl;break;case Oa:i=Rl;break;default:i=Ci;break}return(i&(e.suspendedLanes|t))!==Ci?Ci:i}function $_(e,t,n){if(Wr)for(var i=e.pendingUpdatersLaneMap;n>0;){var s=Vf(n),x=1<<s,k=i[s];k.add(t),n&=~x}}function W_(e,t){if(Wr)for(var n=e.pendingUpdatersLaneMap,i=e.memoizedUpdaters;t>0;){var s=Vf(t),x=1<<s,k=n[s];k.size>0&&(k.forEach(function(U){var F=U.alternate;(F===null||!i.has(F))&&i.add(U)}),k.clear()),t&=~x}}function G_(e,t){return null}var wr=Ft,Us=Ms,Os=us,Du=Oa,Ml=Ci;function Gr(){return Ml}function Ei(e){Ml=e}function iE(e,t){var n=Ml;try{return Ml=e,t()}finally{Ml=n}}function rE(e,t){return e!==0&&e<t?e:t}function sE(e,t){return e>t?e:t}function zf(e,t){return e!==0&&e<t}function Y_(e){var t=Pa(e);return zf(wr,t)?zf(Us,t)?If(t)?Os:Du:Us:wr}function ju(e){var t=e.current.memoizedState;return t.isDehydrated}var q_;function aE(e){q_=e}function oE(e){q_(e)}var $f;function lE(e){$f=e}var K_;function cE(e){K_=e}var X_;function uE(e){X_=e}var J_;function dE(e){J_=e}var Wf=!1,ku=[],ea=null,ta=null,na=null,Ul=new Map,Ol=new Map,ia=[],hE=["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 fE(e){return hE.indexOf(e)>-1}function mE(e,t,n,i,s){return{blockedOn:e,domEventName:t,eventSystemFlags:n,nativeEvent:s,targetContainers:[i]}}function Z_(e,t){switch(e){case"focusin":case"focusout":ea=null;break;case"dragenter":case"dragleave":ta=null;break;case"mouseover":case"mouseout":na=null;break;case"pointerover":case"pointerout":{var n=t.pointerId;Ul.delete(n);break}case"gotpointercapture":case"lostpointercapture":{var i=t.pointerId;Ol.delete(i);break}}}function Pl(e,t,n,i,s,x){if(e===null||e.nativeEvent!==x){var k=mE(t,n,i,s,x);if(t!==null){var U=aa(t);U!==null&&$f(U)}return k}e.eventSystemFlags|=i;var F=e.targetContainers;return s!==null&&F.indexOf(s)===-1&&F.push(s),e}function pE(e,t,n,i,s){switch(t){case"focusin":{var x=s;return ea=Pl(ea,e,t,n,i,x),!0}case"dragenter":{var k=s;return ta=Pl(ta,e,t,n,i,k),!0}case"mouseover":{var U=s;return na=Pl(na,e,t,n,i,U),!0}case"pointerover":{var F=s,q=F.pointerId;return Ul.set(q,Pl(Ul.get(q)||null,e,t,n,i,F)),!0}case"gotpointercapture":{var K=s,de=K.pointerId;return Ol.set(de,Pl(Ol.get(de)||null,e,t,n,i,K)),!0}}return!1}function Q_(e){var t=Fa(e.target);if(t!==null){var n=Aa(t);if(n!==null){var i=n.tag;if(i===T){var s=S_(n);if(s!==null){e.blockedOn=s,J_(e.priority,function(){K_(n)});return}}else if(i===u){var x=n.stateNode;if(ju(x)){e.blockedOn=N_(n);return}}}}e.blockedOn=null}function vE(e){for(var t=X_(),n={blockedOn:null,target:e,priority:t},i=0;i<ia.length&&zf(t,ia[i].priority);i++);ia.splice(i,0,n),i===0&&Q_(n)}function Ru(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;t.length>0;){var n=t[0],i=qf(e.domEventName,e.eventSystemFlags,n,e.nativeEvent);if(i===null){var s=e.nativeEvent,x=new s.constructor(s.type,s);zN(x),s.target.dispatchEvent(x),$N()}else{var k=aa(i);return k!==null&&$f(k),e.blockedOn=i,!1}t.shift()}return!0}function eb(e,t,n){Ru(e)&&n.delete(t)}function gE(){Wf=!1,ea!==null&&Ru(ea)&&(ea=null),ta!==null&&Ru(ta)&&(ta=null),na!==null&&Ru(na)&&(na=null),Ul.forEach(eb),Ol.forEach(eb)}function Bl(e,t){e.blockedOn===t&&(e.blockedOn=null,Wf||(Wf=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,gE)))}function Il(e){if(ku.length>0){Bl(ku[0],e);for(var t=1;t<ku.length;t++){var n=ku[t];n.blockedOn===e&&(n.blockedOn=null)}}ea!==null&&Bl(ea,e),ta!==null&&Bl(ta,e),na!==null&&Bl(na,e);var i=function(U){return Bl(U,e)};Ul.forEach(i),Ol.forEach(i);for(var s=0;s<ia.length;s++){var x=ia[s];x.blockedOn===e&&(x.blockedOn=null)}for(;ia.length>0;){var k=ia[0];if(k.blockedOn!==null)break;Q_(k),k.blockedOn===null&&ia.shift()}}var jo=d.ReactCurrentBatchConfig,Gf=!0;function tb(e){Gf=!!e}function _E(){return Gf}function bE(e,t,n){var i=nb(t),s;switch(i){case wr:s=yE;break;case Us:s=wE;break;case Os:default:s=Yf;break}return s.bind(null,t,n,e)}function yE(e,t,n,i){var s=Gr(),x=jo.transition;jo.transition=null;try{Ei(wr),Yf(e,t,n,i)}finally{Ei(s),jo.transition=x}}function wE(e,t,n,i){var s=Gr(),x=jo.transition;jo.transition=null;try{Ei(Us),Yf(e,t,n,i)}finally{Ei(s),jo.transition=x}}function Yf(e,t,n,i){Gf&&xE(e,t,n,i)}function xE(e,t,n,i){var s=qf(e,t,n,i);if(s===null){lm(e,t,i,Tu,n),Z_(e,i);return}if(pE(s,e,t,n,i)){i.stopPropagation();return}if(Z_(e,i),t&yl&&fE(e)){for(;s!==null;){var x=aa(s);x!==null&&oE(x);var k=qf(e,t,n,i);if(k===null&&lm(e,t,i,Tu,n),k===s)break;s=k}s!==null&&i.stopPropagation();return}lm(e,t,i,null,n)}var Tu=null;function qf(e,t,n,i){Tu=null;var s=Qh(i),x=Fa(s);if(x!==null){var k=Aa(x);if(k===null)x=null;else{var U=k.tag;if(U===T){var F=S_(k);if(F!==null)return F;x=null}else if(U===u){var q=k.stateNode;if(ju(q))return N_(k);x=null}else k!==x&&(x=null)}}return Tu=x,null}function nb(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 wr;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 Us;case"message":{var t=fC();switch(t){case yu:return wr;case pf:return Us;case Ma:case mC:return Os;case vf:return Du;default:return Os}}default:return Os}}function SE(e,t,n){return e.addEventListener(t,n,!1),n}function NE(e,t,n){return e.addEventListener(t,n,!0),n}function CE(e,t,n,i){return e.addEventListener(t,n,{capture:!0,passive:i}),n}function EE(e,t,n,i){return e.addEventListener(t,n,{passive:i}),n}var Vl=null,Kf=null,Fl=null;function DE(e){return Vl=e,Kf=rb(),!0}function jE(){Vl=null,Kf=null,Fl=null}function ib(){if(Fl)return Fl;var e,t=Kf,n=t.length,i,s=rb(),x=s.length;for(e=0;e<n&&t[e]===s[e];e++);var k=n-e;for(i=1;i<=k&&t[n-i]===s[x-i];i++);var U=i>1?1-i:void 0;return Fl=s.slice(e,U),Fl}function rb(){return"value"in Vl?Vl.value:Vl.textContent}function Lu(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),t>=32||t===13?t:0}function Au(){return!0}function sb(){return!1}function xr(e){function t(n,i,s,x,k){this._reactName=n,this._targetInst=s,this.type=i,this.nativeEvent=x,this.target=k,this.currentTarget=null;for(var U in e)if(e.hasOwnProperty(U)){var F=e[U];F?this[U]=F(x):this[U]=x[U]}var q=x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1;return q?this.isDefaultPrevented=Au:this.isDefaultPrevented=sb,this.isPropagationStopped=sb,this}return Vt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Au)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Au)},persist:function(){},isPersistent:Au}),t}var ko={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xf=xr(ko),Hl=Vt({},ko,{view:0,detail:0}),kE=xr(Hl),Jf,Zf,zl;function RE(e){e!==zl&&(zl&&e.type==="mousemove"?(Jf=e.screenX-zl.screenX,Zf=e.screenY-zl.screenY):(Jf=0,Zf=0),zl=e)}var Mu=Vt({},Hl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:em,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:(RE(e),Jf)},movementY:function(e){return"movementY"in e?e.movementY:Zf}}),ab=xr(Mu),TE=Vt({},Mu,{dataTransfer:0}),LE=xr(TE),AE=Vt({},Hl,{relatedTarget:0}),Qf=xr(AE),ME=Vt({},ko,{animationName:0,elapsedTime:0,pseudoElement:0}),UE=xr(ME),OE=Vt({},ko,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),PE=xr(OE),BE=Vt({},ko,{data:0}),ob=xr(BE),IE=ob,VE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},FE={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 HE(e){if(e.key){var t=VE[e.key]||e.key;if(t!=="Unidentified")return t}if(e.type==="keypress"){var n=Lu(e);return n===13?"Enter":String.fromCharCode(n)}return e.type==="keydown"||e.type==="keyup"?FE[e.keyCode]||"Unidentified":""}var zE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $E(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var i=zE[e];return i?!!n[i]:!1}function em(e){return $E}var WE=Vt({},Hl,{key:HE,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:em,charCode:function(e){return e.type==="keypress"?Lu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Lu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),GE=xr(WE),YE=Vt({},Mu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lb=xr(YE),qE=Vt({},Hl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:em}),KE=xr(qE),XE=Vt({},ko,{propertyName:0,elapsedTime:0,pseudoElement:0}),JE=xr(XE),ZE=Vt({},Mu,{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}),QE=xr(ZE),eD=[9,13,27,32],cb=229,tm=Be&&"CompositionEvent"in window,$l=null;Be&&"documentMode"in document&&($l=document.documentMode);var tD=Be&&"TextEvent"in window&&!$l,ub=Be&&(!tm||$l&&$l>8&&$l<=11),db=32,hb=String.fromCharCode(db);function nD(){pe("onBeforeInput",["compositionend","keypress","textInput","paste"]),pe("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),pe("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),pe("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var fb=!1;function iD(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function rD(e){switch(e){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function sD(e,t){return e==="keydown"&&t.keyCode===cb}function mb(e,t){switch(e){case"keyup":return eD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==cb;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pb(e){var t=e.detail;return typeof t=="object"&&"data"in t?t.data:null}function vb(e){return e.locale==="ko"}var Ro=!1;function aD(e,t,n,i,s){var x,k;if(tm?x=rD(t):Ro?mb(t,i)&&(x="onCompositionEnd"):sD(t,i)&&(x="onCompositionStart"),!x)return null;ub&&!vb(i)&&(!Ro&&x==="onCompositionStart"?Ro=DE(s):x==="onCompositionEnd"&&Ro&&(k=ib()));var U=Iu(n,x);if(U.length>0){var F=new ob(x,t,null,i,s);if(e.push({event:F,listeners:U}),k)F.data=k;else{var q=pb(i);q!==null&&(F.data=q)}}}function oD(e,t){switch(e){case"compositionend":return pb(t);case"keypress":var n=t.which;return n!==db?null:(fb=!0,hb);case"textInput":var i=t.data;return i===hb&&fb?null:i;default:return null}}function lD(e,t){if(Ro){if(e==="compositionend"||!tm&&mb(e,t)){var n=ib();return jE(),Ro=!1,n}return null}switch(e){case"paste":return null;case"keypress":if(!iD(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ub&&!vb(t)?null:t.data;default:return null}}function cD(e,t,n,i,s){var x;if(tD?x=oD(t,i):x=lD(t,i),!x)return null;var k=Iu(n,"onBeforeInput");if(k.length>0){var U=new IE("onBeforeInput","beforeinput",null,i,s);e.push({event:U,listeners:k}),U.data=x}}function uD(e,t,n,i,s,x,k){aD(e,t,n,i,s),cD(e,t,n,i,s)}var dD={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 gb(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!dD[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 hD(e){if(!Be)return!1;var t="on"+e,n=t in document;if(!n){var i=document.createElement("div");i.setAttribute(t,"return;"),n=typeof i[t]=="function"}return n}function fD(){pe("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function _b(e,t,n,i){m_(i);var s=Iu(t,"onChange");if(s.length>0){var x=new Xf("onChange","change",null,n,i);e.push({event:x,listeners:s})}}var Wl=null,Gl=null;function mD(e){var t=e.nodeName&&e.nodeName.toLowerCase();return t==="select"||t==="input"&&e.type==="file"}function pD(e){var t=[];_b(t,Gl,e,Qh(e)),__(vD,t)}function vD(e){Ob(e,0)}function Uu(e){var t=Oo(e);if(Zi(t))return e}function gD(e,t){if(e==="change")return t}var bb=!1;Be&&(bb=hD("input")&&(!document.documentMode||document.documentMode>9));function _D(e,t){Wl=e,Gl=t,Wl.attachEvent("onpropertychange",wb)}function yb(){Wl&&(Wl.detachEvent("onpropertychange",wb),Wl=null,Gl=null)}function wb(e){e.propertyName==="value"&&Uu(Gl)&&pD(e)}function bD(e,t,n){e==="focusin"?(yb(),_D(t,n)):e==="focusout"&&yb()}function yD(e,t){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Uu(Gl)}function wD(e){var t=e.nodeName;return t&&t.toLowerCase()==="input"&&(e.type==="checkbox"||e.type==="radio")}function xD(e,t){if(e==="click")return Uu(t)}function SD(e,t){if(e==="input"||e==="change")return Uu(t)}function ND(e){var t=e._wrapperState;!t||!t.controlled||e.type!=="number"||Ne(e,"number",e.value)}function CD(e,t,n,i,s,x,k){var U=n?Oo(n):window,F,q;if(mD(U)?F=gD:gb(U)?bb?F=SD:(F=yD,q=bD):wD(U)&&(F=xD),F){var K=F(t,n);if(K){_b(e,K,i,s);return}}q&&q(t,U,n),t==="focusout"&&ND(U)}function ED(){le("onMouseEnter",["mouseout","mouseover"]),le("onMouseLeave",["mouseout","mouseover"]),le("onPointerEnter",["pointerout","pointerover"]),le("onPointerLeave",["pointerout","pointerover"])}function DD(e,t,n,i,s,x,k){var U=t==="mouseover"||t==="pointerover",F=t==="mouseout"||t==="pointerout";if(U&&!WN(i)){var q=i.relatedTarget||i.fromElement;if(q&&(Fa(q)||oc(q)))return}if(!(!F&&!U)){var K;if(s.window===s)K=s;else{var de=s.ownerDocument;de?K=de.defaultView||de.parentWindow:K=window}var ue,ye;if(F){var Ce=i.relatedTarget||i.toElement;if(ue=n,ye=Ce?Fa(Ce):null,ye!==null){var Ae=Aa(ye);(ye!==Ae||ye.tag!==S&&ye.tag!==N)&&(ye=null)}}else ue=null,ye=n;if(ue!==ye){var lt=ab,Lt="onMouseLeave",Dt="onMouseEnter",dn="mouse";(t==="pointerout"||t==="pointerover")&&(lt=lb,Lt="onPointerLeave",Dt="onPointerEnter",dn="pointer");var an=ue==null?K:Oo(ue),ve=ye==null?K:Oo(ye),Me=new lt(Lt,dn+"leave",ue,i,s);Me.target=an,Me.relatedTarget=ve;var ge=null,Ge=Fa(s);if(Ge===n){var pt=new lt(Dt,dn+"enter",ye,i,s);pt.target=ve,pt.relatedTarget=an,ge=pt}JD(e,Me,ge,ue,ye)}}}function jD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sr=typeof Object.is=="function"?Object.is:jD;function Yl(e,t){if(Sr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var s=0;s<n.length;s++){var x=n[s];if(!Te.call(t,x)||!Sr(e[x],t[x]))return!1}return!0}function xb(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kD(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function Sb(e,t){for(var n=xb(e),i=0,s=0;n;){if(n.nodeType===ks){if(s=i+n.textContent.length,i<=t&&s>=t)return{node:n,offset:t-i};i=s}n=xb(kD(n))}}function RD(e){var t=e.ownerDocument,n=t&&t.defaultView||window,i=n.getSelection&&n.getSelection();if(!i||i.rangeCount===0)return null;var s=i.anchorNode,x=i.anchorOffset,k=i.focusNode,U=i.focusOffset;try{s.nodeType,k.nodeType}catch{return null}return TD(e,s,x,k,U)}function TD(e,t,n,i,s){var x=0,k=-1,U=-1,F=0,q=0,K=e,de=null;e:for(;;){for(var ue=null;K===t&&(n===0||K.nodeType===ks)&&(k=x+n),K===i&&(s===0||K.nodeType===ks)&&(U=x+s),K.nodeType===ks&&(x+=K.nodeValue.length),(ue=K.firstChild)!==null;)de=K,K=ue;for(;;){if(K===e)break e;if(de===t&&++F===n&&(k=x),de===i&&++q===s&&(U=x),(ue=K.nextSibling)!==null)break;K=de,de=K.parentNode}K=ue}return k===-1||U===-1?null:{start:k,end:U}}function LD(e,t){var n=e.ownerDocument||document,i=n&&n.defaultView||window;if(i.getSelection){var s=i.getSelection(),x=e.textContent.length,k=Math.min(t.start,x),U=t.end===void 0?k:Math.min(t.end,x);if(!s.extend&&k>U){var F=U;U=k,k=F}var q=Sb(e,k),K=Sb(e,U);if(q&&K){if(s.rangeCount===1&&s.anchorNode===q.node&&s.anchorOffset===q.offset&&s.focusNode===K.node&&s.focusOffset===K.offset)return;var de=n.createRange();de.setStart(q.node,q.offset),s.removeAllRanges(),k>U?(s.addRange(de),s.extend(K.node,K.offset)):(de.setEnd(K.node,K.offset),s.addRange(de))}}}function Nb(e){return e&&e.nodeType===ks}function Cb(e,t){return!e||!t?!1:e===t?!0:Nb(e)?!1:Nb(t)?Cb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1}function AD(e){return e&&e.ownerDocument&&Cb(e.ownerDocument.documentElement,e)}function MD(e){try{return typeof e.contentWindow.location.href=="string"}catch{return!1}}function Eb(){for(var e=window,t=wi();t instanceof e.HTMLIFrameElement;){if(MD(t))e=t.contentWindow;else return t;t=wi(e.document)}return t}function nm(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 UD(){var e=Eb();return{focusedElem:e,selectionRange:nm(e)?PD(e):null}}function OD(e){var t=Eb(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&AD(n)){i!==null&&nm(n)&&BD(n,i);for(var s=[],x=n;x=x.parentNode;)x.nodeType===dr&&s.push({element:x,left:x.scrollLeft,top:x.scrollTop});typeof n.focus=="function"&&n.focus();for(var k=0;k<s.length;k++){var U=s[k];U.element.scrollLeft=U.left,U.element.scrollTop=U.top}}}function PD(e){var t;return"selectionStart"in e?t={start:e.selectionStart,end:e.selectionEnd}:t=RD(e),t||{start:0,end:0}}function BD(e,t){var n=t.start,i=t.end;i===void 0&&(i=n),"selectionStart"in e?(e.selectionStart=n,e.selectionEnd=Math.min(i,e.value.length)):LD(e,t)}var ID=Be&&"documentMode"in document&&document.documentMode<=11;function VD(){pe("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var To=null,im=null,ql=null,rm=!1;function FD(e){if("selectionStart"in e&&nm(e))return{start:e.selectionStart,end:e.selectionEnd};var t=e.ownerDocument&&e.ownerDocument.defaultView||window,n=t.getSelection();return{anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}}function HD(e){return e.window===e?e.document:e.nodeType===Rs?e:e.ownerDocument}function Db(e,t,n){var i=HD(n);if(!(rm||To==null||To!==wi(i))){var s=FD(To);if(!ql||!Yl(ql,s)){ql=s;var x=Iu(im,"onSelect");if(x.length>0){var k=new Xf("onSelect","select",null,t,n);e.push({event:k,listeners:x}),k.target=To}}}}function zD(e,t,n,i,s,x,k){var U=n?Oo(n):window;switch(t){case"focusin":(gb(U)||U.contentEditable==="true")&&(To=U,im=n,ql=null);break;case"focusout":To=null,im=null,ql=null;break;case"mousedown":rm=!0;break;case"contextmenu":case"mouseup":case"dragend":rm=!1,Db(e,i,s);break;case"selectionchange":if(ID)break;case"keydown":case"keyup":Db(e,i,s)}}function Ou(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Lo={animationend:Ou("Animation","AnimationEnd"),animationiteration:Ou("Animation","AnimationIteration"),animationstart:Ou("Animation","AnimationStart"),transitionend:Ou("Transition","TransitionEnd")},sm={},jb={};Be&&(jb=document.createElement("div").style,"AnimationEvent"in window||(delete Lo.animationend.animation,delete Lo.animationiteration.animation,delete Lo.animationstart.animation),"TransitionEvent"in window||delete Lo.transitionend.transition);function Pu(e){if(sm[e])return sm[e];if(!Lo[e])return e;var t=Lo[e];for(var n in t)if(t.hasOwnProperty(n)&&n in jb)return sm[e]=t[n];return e}var kb=Pu("animationend"),Rb=Pu("animationiteration"),Tb=Pu("animationstart"),Lb=Pu("transitionend"),Ab=new Map,Mb=["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 ra(e,t){Ab.set(e,t),pe(t,[e])}function $D(){for(var e=0;e<Mb.length;e++){var t=Mb[e],n=t.toLowerCase(),i=t[0].toUpperCase()+t.slice(1);ra(n,"on"+i)}ra(kb,"onAnimationEnd"),ra(Rb,"onAnimationIteration"),ra(Tb,"onAnimationStart"),ra("dblclick","onDoubleClick"),ra("focusin","onFocus"),ra("focusout","onBlur"),ra(Lb,"onTransitionEnd")}function WD(e,t,n,i,s,x,k){var U=Ab.get(t);if(U!==void 0){var F=Xf,q=t;switch(t){case"keypress":if(Lu(i)===0)return;case"keydown":case"keyup":F=GE;break;case"focusin":q="focus",F=Qf;break;case"focusout":q="blur",F=Qf;break;case"beforeblur":case"afterblur":F=Qf;break;case"click":if(i.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":F=ab;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":F=LE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":F=KE;break;case kb:case Rb:case Tb:F=UE;break;case Lb:F=JE;break;case"scroll":F=kE;break;case"wheel":F=QE;break;case"copy":case"cut":case"paste":F=PE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":F=lb;break}var K=(x&yl)!==0;{var de=!K&&t==="scroll",ue=KD(n,U,i.type,K,de);if(ue.length>0){var ye=new F(U,q,null,i,s);e.push({event:ye,listeners:ue})}}}}$D(),ED(),fD(),VD(),nD();function GD(e,t,n,i,s,x,k){WD(e,t,n,i,s,x);var U=(x&HN)===0;U&&(DD(e,t,n,i,s),CD(e,t,n,i,s),zD(e,t,n,i,s),uD(e,t,n,i,s))}var Kl=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],am=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Kl));function Ub(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,eC(i,t,void 0,e),e.currentTarget=null}function YD(e,t,n){var i;if(n)for(var s=t.length-1;s>=0;s--){var x=t[s],k=x.instance,U=x.currentTarget,F=x.listener;if(k!==i&&e.isPropagationStopped())return;Ub(e,F,U),i=k}else for(var q=0;q<t.length;q++){var K=t[q],de=K.instance,ue=K.currentTarget,ye=K.listener;if(de!==i&&e.isPropagationStopped())return;Ub(e,ye,ue),i=de}}function Ob(e,t){for(var n=(t&yl)!==0,i=0;i<e.length;i++){var s=e[i],x=s.event,k=s.listeners;YD(x,k,n)}tC()}function qD(e,t,n,i,s){var x=Qh(n),k=[];GD(k,e,i,n,x,t),Ob(k,t)}function Wn(e,t){am.has(e)||b('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var n=!1,i=Nk(t),s=ZD(e);i.has(s)||(Pb(t,e,Zh,n),i.add(s))}function om(e,t,n){am.has(e)&&!t&&b('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|=yl),Pb(n,e,i,t)}var Bu="_reactListening"+Math.random().toString(36).slice(2);function Xl(e){if(!e[Bu]){e[Bu]=!0,Le.forEach(function(n){n!=="selectionchange"&&(am.has(n)||om(n,!1,e),om(n,!0,e))});var t=e.nodeType===Rs?e:e.ownerDocument;t!==null&&(t[Bu]||(t[Bu]=!0,om("selectionchange",!1,t)))}}function Pb(e,t,n,i,s){var x=bE(e,t,n),k=void 0;nf&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(k=!0),e=e,i?k!==void 0?CE(e,t,x,k):NE(e,t,x):k!==void 0?EE(e,t,x,k):SE(e,t,x)}function Bb(e,t){return e===t||e.nodeType===li&&e.parentNode===t}function lm(e,t,n,i,s){var x=i;if(!(t&h_)&&!(t&Zh)){var k=s;if(i!==null){var U=i;e:for(;;){if(U===null)return;var F=U.tag;if(F===u||F===p){var q=U.stateNode.containerInfo;if(Bb(q,k))break;if(F===p)for(var K=U.return;K!==null;){var de=K.tag;if(de===u||de===p){var ue=K.stateNode.containerInfo;if(Bb(ue,k))return}K=K.return}for(;q!==null;){var ye=Fa(q);if(ye===null)return;var Ce=ye.tag;if(Ce===S||Ce===N){U=x=ye;continue e}q=q.parentNode}}U=U.return}}}__(function(){return qD(e,t,n,x)})}function Jl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function KD(e,t,n,i,s,x){for(var k=t!==null?t+"Capture":null,U=i?k:t,F=[],q=e,K=null;q!==null;){var de=q,ue=de.stateNode,ye=de.tag;if(ye===S&&ue!==null&&(K=ue,U!==null)){var Ce=xl(q,U);Ce!=null&&F.push(Jl(q,Ce,K))}if(s)break;q=q.return}return F}function Iu(e,t){for(var n=t+"Capture",i=[],s=e;s!==null;){var x=s,k=x.stateNode,U=x.tag;if(U===S&&k!==null){var F=k,q=xl(s,n);q!=null&&i.unshift(Jl(s,q,F));var K=xl(s,t);K!=null&&i.push(Jl(s,K,F))}s=s.return}return i}function Ao(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==S);return e||null}function XD(e,t){for(var n=e,i=t,s=0,x=n;x;x=Ao(x))s++;for(var k=0,U=i;U;U=Ao(U))k++;for(;s-k>0;)n=Ao(n),s--;for(;k-s>0;)i=Ao(i),k--;for(var F=s;F--;){if(n===i||i!==null&&n===i.alternate)return n;n=Ao(n),i=Ao(i)}return null}function Ib(e,t,n,i,s){for(var x=t._reactName,k=[],U=n;U!==null&&U!==i;){var F=U,q=F.alternate,K=F.stateNode,de=F.tag;if(q!==null&&q===i)break;if(de===S&&K!==null){var ue=K;if(s){var ye=xl(U,x);ye!=null&&k.unshift(Jl(U,ye,ue))}else if(!s){var Ce=xl(U,x);Ce!=null&&k.push(Jl(U,Ce,ue))}}U=U.return}k.length!==0&&e.push({event:t,listeners:k})}function JD(e,t,n,i,s){var x=i&&s?XD(i,s):null;i!==null&&Ib(e,t,i,x,!1),s!==null&&n!==null&&Ib(e,n,s,x,!0)}function ZD(e,t){return e+"__bubble"}var hr=!1,Zl="dangerouslySetInnerHTML",Vu="suppressContentEditableWarning",sa="suppressHydrationWarning",Vb="autoFocus",Ia="children",Va="style",Fu="__html",cm,Hu,Ql,Fb,zu,Hb,zb;cm={dialog:!0,webview:!0},Hu=function(e,t){UN(e,t),ON(e,t),FN(e,t,{registrationNameDependencies:ie,possibleRegistrationNames:G})},Hb=Be&&!document.documentMode,Ql=function(e,t,n){if(!hr){var i=$u(n),s=$u(t);s!==i&&(hr=!0,b("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(s),JSON.stringify(i)))}},Fb=function(e){if(!hr){hr=!0;var t=[];e.forEach(function(n){t.push(n)}),b("Extra attributes from the server: %s",t)}},zu=function(e,t){t===!1?b("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):b("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},zb=function(e,t){var n=e.namespaceURI===js?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return n.innerHTML=t,n.innerHTML};var QD=/\r\n?/g,ej=/\u0000|\uFFFD/g;function $u(e){dt(e);var t=typeof e=="string"?e:""+e;return t.replace(QD,`
91
+ `).replace(ej,"")}function Wu(e,t,n,i){var s=$u(t),x=$u(e);if(x!==s&&(i&&(hr||(hr=!0,b('Text content did not match. Server: "%s" Client: "%s"',x,s))),n&&ee))throw new Error("Text content does not match server-rendered HTML.")}function $b(e){return e.nodeType===Rs?e:e.ownerDocument}function tj(){}function Gu(e){e.onclick=tj}function nj(e,t,n,i,s){for(var x in i)if(i.hasOwnProperty(x)){var k=i[x];if(x===Va)k&&Object.freeze(k),a_(t,k);else if(x===Zl){var U=k?k[Fu]:void 0;U!=null&&t_(t,U)}else if(x===Ia)if(typeof k=="string"){var F=e!=="textarea"||k!=="";F&&pu(t,k)}else typeof k=="number"&&pu(t,""+k);else x===Vu||x===sa||x===Vb||(ie.hasOwnProperty(x)?k!=null&&(typeof k!="function"&&zu(x,k),x==="onScroll"&&Wn("scroll",t)):k!=null&&zn(t,x,k,s))}}function ij(e,t,n,i){for(var s=0;s<t.length;s+=2){var x=t[s],k=t[s+1];x===Va?a_(e,k):x===Zl?t_(e,k):x===Ia?pu(e,k):zn(e,x,k,i)}}function rj(e,t,n,i){var s,x=$b(n),k,U=i;if(U===js&&(U=Gh(e)),U===js){if(s=ja(e,t),!s&&e!==e.toLowerCase()&&b("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),e==="script"){var F=x.createElement("div");F.innerHTML="<script><\/script>";var q=F.firstChild;k=F.removeChild(q)}else if(typeof t.is=="string")k=x.createElement(e,{is:t.is});else if(k=x.createElement(e),e==="select"){var K=k;t.multiple?K.multiple=!0:t.size&&(K.size=t.size)}}else k=x.createElementNS(U,e);return U===js&&!s&&Object.prototype.toString.call(k)==="[object HTMLUnknownElement]"&&!Te.call(cm,e)&&(cm[e]=!0,b("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e)),k}function sj(e,t){return $b(t).createTextNode(e)}function aj(e,t,n,i){var s=ja(t,n);Hu(t,n);var x;switch(t){case"dialog":Wn("cancel",e),Wn("close",e),x=n;break;case"iframe":case"object":case"embed":Wn("load",e),x=n;break;case"video":case"audio":for(var k=0;k<Kl.length;k++)Wn(Kl[k],e);x=n;break;case"source":Wn("error",e),x=n;break;case"img":case"image":case"link":Wn("error",e),Wn("load",e),x=n;break;case"details":Wn("toggle",e),x=n;break;case"input":Ea(e,n),x=Ca(e,n),Wn("invalid",e);break;case"option":it(e,n),x=n;break;case"select":Js(e,n),x=Ds(e,n),Wn("invalid",e);break;case"textarea":Zg(e,n),x=$h(e,n),Wn("invalid",e);break;default:x=n}switch(Jh(t,x),nj(t,e,i,x,s),t){case"input":Pn(e),we(e,n,!1);break;case"textarea":Pn(e),e_(e);break;case"option":ht(e,n);break;case"select":Da(e,n);break;default:typeof x.onClick=="function"&&Gu(e);break}}function oj(e,t,n,i,s){Hu(t,i);var x=null,k,U;switch(t){case"input":k=Ca(e,n),U=Ca(e,i),x=[];break;case"select":k=Ds(e,n),U=Ds(e,i),x=[];break;case"textarea":k=$h(e,n),U=$h(e,i),x=[];break;default:k=n,U=i,typeof k.onClick!="function"&&typeof U.onClick=="function"&&Gu(e);break}Jh(t,U);var F,q,K=null;for(F in k)if(!(U.hasOwnProperty(F)||!k.hasOwnProperty(F)||k[F]==null))if(F===Va){var de=k[F];for(q in de)de.hasOwnProperty(q)&&(K||(K={}),K[q]="")}else F===Zl||F===Ia||F===Vu||F===sa||F===Vb||(ie.hasOwnProperty(F)?x||(x=[]):(x=x||[]).push(F,null));for(F in U){var ue=U[F],ye=k!=null?k[F]:void 0;if(!(!U.hasOwnProperty(F)||ue===ye||ue==null&&ye==null))if(F===Va)if(ue&&Object.freeze(ue),ye){for(q in ye)ye.hasOwnProperty(q)&&(!ue||!ue.hasOwnProperty(q))&&(K||(K={}),K[q]="");for(q in ue)ue.hasOwnProperty(q)&&ye[q]!==ue[q]&&(K||(K={}),K[q]=ue[q])}else K||(x||(x=[]),x.push(F,K)),K=ue;else if(F===Zl){var Ce=ue?ue[Fu]:void 0,Ae=ye?ye[Fu]:void 0;Ce!=null&&Ae!==Ce&&(x=x||[]).push(F,Ce)}else F===Ia?(typeof ue=="string"||typeof ue=="number")&&(x=x||[]).push(F,""+ue):F===Vu||F===sa||(ie.hasOwnProperty(F)?(ue!=null&&(typeof ue!="function"&&zu(F,ue),F==="onScroll"&&Wn("scroll",e)),!x&&ye!==ue&&(x=[])):(x=x||[]).push(F,ue))}return K&&(DN(K,U[Va]),(x=x||[]).push(Va,K)),x}function lj(e,t,n,i,s){n==="input"&&s.type==="radio"&&s.name!=null&&z(e,s);var x=ja(n,i),k=ja(n,s);switch(ij(e,t,x,k),n){case"input":se(e,s);break;case"textarea":Qg(e,s);break;case"select":Ar(e,s);break}}function cj(e){{var t=e.toLowerCase();return vu.hasOwnProperty(t)&&vu[t]||null}}function uj(e,t,n,i,s,x,k){var U,F;switch(U=ja(t,n),Hu(t,n),t){case"dialog":Wn("cancel",e),Wn("close",e);break;case"iframe":case"object":case"embed":Wn("load",e);break;case"video":case"audio":for(var q=0;q<Kl.length;q++)Wn(Kl[q],e);break;case"source":Wn("error",e);break;case"img":case"image":case"link":Wn("error",e),Wn("load",e);break;case"details":Wn("toggle",e);break;case"input":Ea(e,n),Wn("invalid",e);break;case"option":it(e,n);break;case"select":Js(e,n),Wn("invalid",e);break;case"textarea":Zg(e,n),Wn("invalid",e);break}Jh(t,n);{F=new Set;for(var K=e.attributes,de=0;de<K.length;de++){var ue=K[de].name.toLowerCase();switch(ue){case"value":break;case"checked":break;case"selected":break;default:F.add(K[de].name)}}}var ye=null;for(var Ce in n)if(n.hasOwnProperty(Ce)){var Ae=n[Ce];if(Ce===Ia)typeof Ae=="string"?e.textContent!==Ae&&(n[sa]!==!0&&Wu(e.textContent,Ae,x,k),ye=[Ia,Ae]):typeof Ae=="number"&&e.textContent!==""+Ae&&(n[sa]!==!0&&Wu(e.textContent,Ae,x,k),ye=[Ia,""+Ae]);else if(ie.hasOwnProperty(Ce))Ae!=null&&(typeof Ae!="function"&&zu(Ce,Ae),Ce==="onScroll"&&Wn("scroll",e));else if(k&&typeof U=="boolean"){var lt=void 0,Lt=hn(Ce);if(n[sa]!==!0){if(!(Ce===Vu||Ce===sa||Ce==="value"||Ce==="checked"||Ce==="selected")){if(Ce===Zl){var Dt=e.innerHTML,dn=Ae?Ae[Fu]:void 0;if(dn!=null){var an=zb(e,dn);an!==Dt&&Ql(Ce,Dt,an)}}else if(Ce===Va){if(F.delete(Ce),Hb){var ve=CN(Ae);lt=e.getAttribute("style"),ve!==lt&&Ql(Ce,lt,ve)}}else if(U&&!V)F.delete(Ce.toLowerCase()),lt=fn(e,Ce,Ae),Ae!==lt&&Ql(Ce,lt,Ae);else if(!ot(Ce,Lt,U)&&!yn(Ce,Ae,Lt,U)){var Me=!1;if(Lt!==null)F.delete(Lt.attributeName),lt=Cn(e,Ce,Ae,Lt);else{var ge=i;if(ge===js&&(ge=Gh(t)),ge===js)F.delete(Ce.toLowerCase());else{var Ge=cj(Ce);Ge!==null&&Ge!==Ce&&(Me=!0,F.delete(Ge)),F.delete(Ce)}lt=fn(e,Ce,Ae)}var pt=V;!pt&&Ae!==lt&&!Me&&Ql(Ce,lt,Ae)}}}}}switch(k&&F.size>0&&n[sa]!==!0&&Fb(F),t){case"input":Pn(e),we(e,n,!0);break;case"textarea":Pn(e),e_(e);break;case"select":case"option":break;default:typeof n.onClick=="function"&&Gu(e);break}return ye}function dj(e,t,n){var i=e.nodeValue!==t;return i}function um(e,t){{if(hr)return;hr=!0,b("Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase())}}function dm(e,t){{if(hr)return;hr=!0,b('Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase())}}function hm(e,t,n){{if(hr)return;hr=!0,b("Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase())}}function fm(e,t){{if(t===""||hr)return;hr=!0,b('Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())}}function hj(e,t,n){switch(t){case"input":ke(e,n);return;case"textarea":aN(e,n);return;case"select":ho(e,n);return}}var ec=function(){},tc=function(){};{var fj=["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"],Wb=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],mj=Wb.concat(["button"]),pj=["dd","dt","li","option","optgroup","p","rp","rt"],Gb={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};tc=function(e,t){var n=Vt({},e||Gb),i={tag:t};return Wb.indexOf(t)!==-1&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),mj.indexOf(t)!==-1&&(n.pTagInButtonScope=null),fj.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(n.listItemTagAutoclosing=null,n.dlItemTagAutoclosing=null),n.current=i,t==="form"&&(n.formTag=i),t==="a"&&(n.aTagInScope=i),t==="button"&&(n.buttonTagInScope=i),t==="nobr"&&(n.nobrTagInScope=i),t==="p"&&(n.pTagInButtonScope=i),t==="li"&&(n.listItemTagAutoclosing=i),(t==="dd"||t==="dt")&&(n.dlItemTagAutoclosing=i),n};var vj=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 pj.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},gj=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},Yb={};ec=function(e,t,n){n=n||Gb;var i=n.current,s=i&&i.tag;t!=null&&(e!=null&&b("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var x=vj(e,s)?null:i,k=x?null:gj(e,n),U=x||k;if(U){var F=U.tag,q=!!x+"|"+e+"|"+F;if(!Yb[q]){Yb[q]=!0;var K=e,de="";if(e==="#text"?/\S/.test(t)?K="Text nodes":(K="Whitespace text nodes",de=" Make sure you don't have any extra whitespace between tags on each line of your source code."):K="<"+e+">",x){var ue="";F==="table"&&e==="tr"&&(ue+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),b("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",K,F,de,ue)}else b("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",K,F)}}}}var Yu="suppressHydrationWarning",qu="$",Ku="/$",nc="$?",ic="$!",_j="style",mm=null,pm=null;function bj(e){var t,n,i=e.nodeType;switch(i){case Rs:case qh:{t=i===Rs?"#document":"#fragment";var s=e.documentElement;n=s?s.namespaceURI:Yh(null,"");break}default:{var x=i===li?e.parentNode:e,k=x.namespaceURI||null;t=x.tagName,n=Yh(k,t);break}}{var U=t.toLowerCase(),F=tc(null,U);return{namespace:n,ancestorInfo:F}}}function yj(e,t,n){{var i=e,s=Yh(i.namespace,t),x=tc(i.ancestorInfo,t);return{namespace:s,ancestorInfo:x}}}function z2(e){return e}function wj(e){mm=_E(),pm=UD();var t=null;return tb(!1),t}function xj(e){OD(pm),tb(mm),mm=null,pm=null}function Sj(e,t,n,i,s){var x;{var k=i;if(ec(e,null,k.ancestorInfo),typeof t.children=="string"||typeof t.children=="number"){var U=""+t.children,F=tc(k.ancestorInfo,e);ec(null,U,F)}x=k.namespace}var q=rj(e,t,n,x);return ac(s,q),Sm(q,t),q}function Nj(e,t){e.appendChild(t)}function Cj(e,t,n,i,s){switch(aj(e,t,n,i),t){case"button":case"input":case"select":case"textarea":return!!n.autoFocus;case"img":return!0;default:return!1}}function Ej(e,t,n,i,s,x){{var k=x;if(typeof i.children!=typeof n.children&&(typeof i.children=="string"||typeof i.children=="number")){var U=""+i.children,F=tc(k.ancestorInfo,t);ec(null,U,F)}}return oj(e,t,n,i)}function vm(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 Dj(e,t,n,i){{var s=n;ec(null,e,s.ancestorInfo)}var x=sj(e,t);return ac(i,x),x}function jj(){var e=window.event;return e===void 0?Os:nb(e.type)}var gm=typeof setTimeout=="function"?setTimeout:void 0,kj=typeof clearTimeout=="function"?clearTimeout:void 0,_m=-1,qb=typeof Promise=="function"?Promise:void 0,Rj=typeof queueMicrotask=="function"?queueMicrotask:typeof qb<"u"?function(e){return qb.resolve(null).then(e).catch(Tj)}:gm;function Tj(e){setTimeout(function(){throw e})}function Lj(e,t,n,i){switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&e.focus();return;case"img":{n.src&&(e.src=n.src);return}}}function Aj(e,t,n,i,s,x){lj(e,t,n,i,s),Sm(e,s)}function Kb(e){pu(e,"")}function Mj(e,t,n){e.nodeValue=n}function Uj(e,t){e.appendChild(t)}function Oj(e,t){var n;e.nodeType===li?(n=e.parentNode,n.insertBefore(t,e)):(n=e,n.appendChild(t));var i=e._reactRootContainer;i==null&&n.onclick===null&&Gu(n)}function Pj(e,t,n){e.insertBefore(t,n)}function Bj(e,t,n){e.nodeType===li?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)}function Ij(e,t){e.removeChild(t)}function Vj(e,t){e.nodeType===li?e.parentNode.removeChild(t):e.removeChild(t)}function bm(e,t){var n=t,i=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===li){var x=s.data;if(x===Ku)if(i===0){e.removeChild(s),Il(t);return}else i--;else(x===qu||x===nc||x===ic)&&i++}n=s}while(n);Il(t)}function Fj(e,t){e.nodeType===li?bm(e.parentNode,t):e.nodeType===dr&&bm(e,t),Il(e)}function Hj(e){e=e;var t=e.style;typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function zj(e){e.nodeValue=""}function $j(e,t){e=e;var n=t[_j],i=n!=null&&n.hasOwnProperty("display")?n.display:null;e.style.display=Kh("display",i)}function Wj(e,t){e.nodeValue=t}function Gj(e){e.nodeType===dr?e.textContent="":e.nodeType===Rs&&e.documentElement&&e.removeChild(e.documentElement)}function Yj(e,t,n){return e.nodeType!==dr||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}function qj(e,t){return t===""||e.nodeType!==ks?null:e}function Kj(e){return e.nodeType!==li?null:e}function Xb(e){return e.data===nc}function ym(e){return e.data===ic}function Xj(e){var t=e.nextSibling&&e.nextSibling.dataset,n,i,s;return t&&(n=t.dgst,i=t.msg,s=t.stck),{message:i,digest:n,stack:s}}function Jj(e,t){e._reactRetry=t}function Xu(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===dr||t===ks)break;if(t===li){var n=e.data;if(n===qu||n===ic||n===nc)break;if(n===Ku)return null}}return e}function rc(e){return Xu(e.nextSibling)}function Zj(e){return Xu(e.firstChild)}function Qj(e){return Xu(e.firstChild)}function ek(e){return Xu(e.nextSibling)}function tk(e,t,n,i,s,x,k){ac(x,e),Sm(e,n);var U;{var F=s;U=F.namespace}var q=(x.mode&cn)!==Ut;return uj(e,t,n,U,i,q,k)}function nk(e,t,n,i){return ac(n,e),n.mode&cn,dj(e,t)}function ik(e,t){ac(t,e)}function rk(e){for(var t=e.nextSibling,n=0;t;){if(t.nodeType===li){var i=t.data;if(i===Ku){if(n===0)return rc(t);n--}else(i===qu||i===ic||i===nc)&&n++}t=t.nextSibling}return null}function Jb(e){for(var t=e.previousSibling,n=0;t;){if(t.nodeType===li){var i=t.data;if(i===qu||i===ic||i===nc){if(n===0)return t;n--}else i===Ku&&n++}t=t.previousSibling}return null}function sk(e){Il(e)}function ak(e){Il(e)}function ok(e){return e!=="head"&&e!=="body"}function lk(e,t,n,i){var s=!0;Wu(t.nodeValue,n,i,s)}function ck(e,t,n,i,s,x){if(t[Yu]!==!0){var k=!0;Wu(i.nodeValue,s,x,k)}}function uk(e,t){t.nodeType===dr?um(e,t):t.nodeType===li||dm(e,t)}function dk(e,t){{var n=e.parentNode;n!==null&&(t.nodeType===dr?um(n,t):t.nodeType===li||dm(n,t))}}function hk(e,t,n,i,s){(s||t[Yu]!==!0)&&(i.nodeType===dr?um(n,i):i.nodeType===li||dm(n,i))}function fk(e,t,n){hm(e,t)}function mk(e,t){fm(e,t)}function pk(e,t,n){{var i=e.parentNode;i!==null&&hm(i,t)}}function vk(e,t){{var n=e.parentNode;n!==null&&fm(n,t)}}function gk(e,t,n,i,s,x){(x||t[Yu]!==!0)&&hm(n,i)}function _k(e,t,n,i,s){(s||t[Yu]!==!0)&&fm(n,i)}function bk(e){b("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",e.nodeName.toLowerCase())}function yk(e){Xl(e)}var Mo=Math.random().toString(36).slice(2),Uo="__reactFiber$"+Mo,wm="__reactProps$"+Mo,sc="__reactContainer$"+Mo,xm="__reactEvents$"+Mo,wk="__reactListeners$"+Mo,xk="__reactHandles$"+Mo;function Sk(e){delete e[Uo],delete e[wm],delete e[xm],delete e[wk],delete e[xk]}function ac(e,t){t[Uo]=e}function Ju(e,t){t[sc]=e}function Zb(e){e[sc]=null}function oc(e){return!!e[sc]}function Fa(e){var t=e[Uo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[sc]||n[Uo],t){var i=t.alternate;if(t.child!==null||i!==null&&i.child!==null)for(var s=Jb(e);s!==null;){var x=s[Uo];if(x)return x;s=Jb(s)}return t}e=n,n=e.parentNode}return null}function aa(e){var t=e[Uo]||e[sc];return t&&(t.tag===S||t.tag===N||t.tag===T||t.tag===u)?t:null}function Oo(e){if(e.tag===S||e.tag===N)return e.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function Zu(e){return e[wm]||null}function Sm(e,t){e[wm]=t}function Nk(e){var t=e[xm];return t===void 0&&(t=e[xm]=new Set),t}var Qb={},ey=d.ReactDebugCurrentFrame;function Qu(e){if(e){var t=e._owner,n=Ki(e.type,e._source,t?t.type:null);ey.setExtraStackFrame(n)}else ey.setExtraStackFrame(null)}function Yr(e,t,n,i,s){{var x=Function.call.bind(Te);for(var k in e)if(x(e,k)){var U=void 0;try{if(typeof e[k]!="function"){var F=Error((i||"React class")+": "+n+" type `"+k+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[k]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw F.name="Invariant Violation",F}U=e[k](t,k,i,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(q){U=q}U&&!(U instanceof Error)&&(Qu(s),b("%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",n,k,typeof U),Qu(null)),U instanceof Error&&!(U.message in Qb)&&(Qb[U.message]=!0,Qu(s),b("Failed %s type: %s",n,U.message),Qu(null))}}}var Nm=[],ed;ed=[];var Ps=-1;function oa(e){return{current:e}}function zi(e,t){if(Ps<0){b("Unexpected pop.");return}t!==ed[Ps]&&b("Unexpected Fiber popped."),e.current=Nm[Ps],Nm[Ps]=null,ed[Ps]=null,Ps--}function $i(e,t,n){Ps++,Nm[Ps]=e.current,ed[Ps]=n,e.current=t}var Cm;Cm={};var Nr={};Object.freeze(Nr);var Bs=oa(Nr),ds=oa(!1),Em=Nr;function Po(e,t,n){return n&&hs(t)?Em:Bs.current}function ty(e,t,n){{var i=e.stateNode;i.__reactInternalMemoizedUnmaskedChildContext=t,i.__reactInternalMemoizedMaskedChildContext=n}}function Bo(e,t){{var n=e.type,i=n.contextTypes;if(!i)return Nr;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var x={};for(var k in i)x[k]=t[k];{var U=At(e)||"Unknown";Yr(i,x,"context",U)}return s&&ty(e,t,x),x}}function td(){return ds.current}function hs(e){{var t=e.childContextTypes;return t!=null}}function nd(e){zi(ds,e),zi(Bs,e)}function Dm(e){zi(ds,e),zi(Bs,e)}function ny(e,t,n){{if(Bs.current!==Nr)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");$i(Bs,t,e),$i(ds,n,e)}}function iy(e,t,n){{var i=e.stateNode,s=t.childContextTypes;if(typeof i.getChildContext!="function"){{var x=At(e)||"Unknown";Cm[x]||(Cm[x]=!0,b("%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.",x,x))}return n}var k=i.getChildContext();for(var U in k)if(!(U in s))throw new Error((At(e)||"Unknown")+'.getChildContext(): key "'+U+'" is not defined in childContextTypes.');{var F=At(e)||"Unknown";Yr(s,k,"child context",F)}return Vt({},n,k)}}function id(e){{var t=e.stateNode,n=t&&t.__reactInternalMemoizedMergedChildContext||Nr;return Em=Bs.current,$i(Bs,n,e),$i(ds,ds.current,e),!0}}function ry(e,t,n){{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(n){var s=iy(e,t,Em);i.__reactInternalMemoizedMergedChildContext=s,zi(ds,e),zi(Bs,e),$i(Bs,s,e),$i(ds,n,e)}else zi(ds,e),$i(ds,n,e)}}function Ck(e){{if(!oC(e)||e.tag!==g)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 u:return t.stateNode.context;case g:{var n=t.type;if(hs(n))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 la=0,rd=1,Is=null,jm=!1,km=!1;function sy(e){Is===null?Is=[e]:Is.push(e)}function Ek(e){jm=!0,sy(e)}function ay(){jm&&ca()}function ca(){if(!km&&Is!==null){km=!0;var e=0,t=Gr();try{var n=!0,i=Is;for(Ei(wr);e<i.length;e++){var s=i[e];do s=s(n);while(s!==null)}Is=null,jm=!1}catch(x){throw Is!==null&&(Is=Is.slice(e+1)),R_(yu,ca),x}finally{Ei(t),km=!1}}return null}var Io=[],Vo=0,sd=null,ad=0,Mr=[],Ur=0,Ha=null,Vs=1,Fs="";function Dk(e){return $a(),(e.flags&x_)!==Ot}function jk(e){return $a(),ad}function kk(){var e=Fs,t=Vs,n=t&~Rk(t);return n.toString(32)+e}function za(e,t){$a(),Io[Vo++]=ad,Io[Vo++]=sd,sd=e,ad=t}function oy(e,t,n){$a(),Mr[Ur++]=Vs,Mr[Ur++]=Fs,Mr[Ur++]=Ha,Ha=e;var i=Vs,s=Fs,x=od(i)-1,k=i&~(1<<x),U=n+1,F=od(t)+x;if(F>30){var q=x-x%5,K=(1<<q)-1,de=(k&K).toString(32),ue=k>>q,ye=x-q,Ce=od(t)+ye,Ae=U<<ye,lt=Ae|ue,Lt=de+s;Vs=1<<Ce|lt,Fs=Lt}else{var Dt=U<<x,dn=Dt|k,an=s;Vs=1<<F|dn,Fs=an}}function Rm(e){$a();var t=e.return;if(t!==null){var n=1,i=0;za(e,n),oy(e,n,i)}}function od(e){return 32-O_(e)}function Rk(e){return 1<<od(e)-1}function Tm(e){for(;e===sd;)sd=Io[--Vo],Io[Vo]=null,ad=Io[--Vo],Io[Vo]=null;for(;e===Ha;)Ha=Mr[--Ur],Mr[Ur]=null,Fs=Mr[--Ur],Mr[Ur]=null,Vs=Mr[--Ur],Mr[Ur]=null}function Tk(){return $a(),Ha!==null?{id:Vs,overflow:Fs}:null}function Lk(e,t){$a(),Mr[Ur++]=Vs,Mr[Ur++]=Fs,Mr[Ur++]=Ha,Vs=t.id,Fs=t.overflow,Ha=e}function $a(){Ti()||b("Expected to be hydrating. This is a bug in React. Please file an issue.")}var Ri=null,Or=null,qr=!1,Wa=!1,ua=null;function Ak(){qr&&b("We should not be hydrating here. This is a bug in React. Please file a bug.")}function ly(){Wa=!0}function Mk(){return Wa}function Uk(e){var t=e.stateNode.containerInfo;return Or=Qj(t),Ri=e,qr=!0,ua=null,Wa=!1,!0}function Ok(e,t,n){return Or=ek(t),Ri=e,qr=!0,ua=null,Wa=!1,n!==null&&Lk(e,n),!0}function cy(e,t){switch(e.tag){case u:{uk(e.stateNode.containerInfo,t);break}case S:{var n=(e.mode&cn)!==Ut;hk(e.type,e.memoizedProps,e.stateNode,t,n);break}case T:{var i=e.memoizedState;i.dehydrated!==null&&dk(i.dehydrated,t);break}}}function uy(e,t){cy(e,t);var n=V5();n.stateNode=t,n.return=e;var i=e.deletions;i===null?(e.deletions=[n],e.flags|=ka):i.push(n)}function Lm(e,t){{if(Wa)return;switch(e.tag){case u:{var n=e.stateNode.containerInfo;switch(t.tag){case S:var i=t.type;t.pendingProps,fk(n,i);break;case N:var s=t.pendingProps;mk(n,s);break}break}case S:{var x=e.type,k=e.memoizedProps,U=e.stateNode;switch(t.tag){case S:{var F=t.type,q=t.pendingProps,K=(e.mode&cn)!==Ut;gk(x,k,U,F,q,K);break}case N:{var de=t.pendingProps,ue=(e.mode&cn)!==Ut;_k(x,k,U,de,ue);break}}break}case T:{var ye=e.memoizedState,Ce=ye.dehydrated;if(Ce!==null)switch(t.tag){case S:var Ae=t.type;t.pendingProps,pk(Ce,Ae);break;case N:var lt=t.pendingProps;vk(Ce,lt);break}break}default:return}}}function dy(e,t){t.flags=t.flags&~Ls|ci,Lm(e,t)}function hy(e,t){switch(e.tag){case S:{var n=e.type;e.pendingProps;var i=Yj(t,n);return i!==null?(e.stateNode=i,Ri=e,Or=Zj(i),!0):!1}case N:{var s=e.pendingProps,x=qj(t,s);return x!==null?(e.stateNode=x,Ri=e,Or=null,!0):!1}case T:{var k=Kj(t);if(k!==null){var U={dehydrated:k,treeContext:Tk(),retryLane:br};e.memoizedState=U;var F=F5(k);return F.return=e,e.child=F,Ri=e,Or=null,!0}return!1}default:return!1}}function Am(e){return(e.mode&cn)!==Ut&&(e.flags&Sn)===Ot}function Mm(e){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function Um(e){if(qr){var t=Or;if(!t){Am(e)&&(Lm(Ri,e),Mm()),dy(Ri,e),qr=!1,Ri=e;return}var n=t;if(!hy(e,t)){Am(e)&&(Lm(Ri,e),Mm()),t=rc(n);var i=Ri;if(!t||!hy(e,t)){dy(Ri,e),qr=!1,Ri=e;return}uy(i,n)}}}function Pk(e,t,n){var i=e.stateNode,s=!Wa,x=tk(i,e.type,e.memoizedProps,t,n,e,s);return e.updateQueue=x,x!==null}function Bk(e){var t=e.stateNode,n=e.memoizedProps,i=nk(t,n,e);if(i){var s=Ri;if(s!==null)switch(s.tag){case u:{var x=s.stateNode.containerInfo,k=(s.mode&cn)!==Ut;lk(x,t,n,k);break}case S:{var U=s.type,F=s.memoizedProps,q=s.stateNode,K=(s.mode&cn)!==Ut;ck(U,F,q,t,n,K);break}}}return i}function Ik(e){var t=e.memoizedState,n=t!==null?t.dehydrated:null;if(!n)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");ik(n,e)}function Vk(e){var t=e.memoizedState,n=t!==null?t.dehydrated:null;if(!n)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 rk(n)}function fy(e){for(var t=e.return;t!==null&&t.tag!==S&&t.tag!==u&&t.tag!==T;)t=t.return;Ri=t}function ld(e){if(e!==Ri)return!1;if(!qr)return fy(e),qr=!0,!1;if(e.tag!==u&&(e.tag!==S||ok(e.type)&&!vm(e.type,e.memoizedProps))){var t=Or;if(t)if(Am(e))my(e),Mm();else for(;t;)uy(e,t),t=rc(t)}return fy(e),e.tag===T?Or=Vk(e):Or=Ri?rc(e.stateNode):null,!0}function Fk(){return qr&&Or!==null}function my(e){for(var t=Or;t;)cy(e,t),t=rc(t)}function Fo(){Ri=null,Or=null,qr=!1,Wa=!1}function py(){ua!==null&&(l0(ua),ua=null)}function Ti(){return qr}function Om(e){ua===null?ua=[e]:ua.push(e)}var Hk=d.ReactCurrentBatchConfig,zk=null;function $k(){return Hk.transition}var Kr={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var Wk=function(e){for(var t=null,n=e;n!==null;)n.mode&Jn&&(t=n),n=n.return;return t},Ga=function(e){var t=[];return e.forEach(function(n){t.push(n)}),t.sort().join(", ")},lc=[],cc=[],uc=[],dc=[],hc=[],fc=[],Ya=new Set;Kr.recordUnsafeLifecycleWarnings=function(e,t){Ya.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&lc.push(e),e.mode&Jn&&typeof t.UNSAFE_componentWillMount=="function"&&cc.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&uc.push(e),e.mode&Jn&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&dc.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&hc.push(e),e.mode&Jn&&typeof t.UNSAFE_componentWillUpdate=="function"&&fc.push(e))},Kr.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;lc.length>0&&(lc.forEach(function(ue){e.add(At(ue)||"Component"),Ya.add(ue.type)}),lc=[]);var t=new Set;cc.length>0&&(cc.forEach(function(ue){t.add(At(ue)||"Component"),Ya.add(ue.type)}),cc=[]);var n=new Set;uc.length>0&&(uc.forEach(function(ue){n.add(At(ue)||"Component"),Ya.add(ue.type)}),uc=[]);var i=new Set;dc.length>0&&(dc.forEach(function(ue){i.add(At(ue)||"Component"),Ya.add(ue.type)}),dc=[]);var s=new Set;hc.length>0&&(hc.forEach(function(ue){s.add(At(ue)||"Component"),Ya.add(ue.type)}),hc=[]);var x=new Set;if(fc.length>0&&(fc.forEach(function(ue){x.add(At(ue)||"Component"),Ya.add(ue.type)}),fc=[]),t.size>0){var k=Ga(t);b(`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`,k)}if(i.size>0){var U=Ga(i);b(`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`,U)}if(x.size>0){var F=Ga(x);b(`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`,F)}if(e.size>0){var q=Ga(e);L(`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`,q)}if(n.size>0){var K=Ga(n);L(`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`,K)}if(s.size>0){var de=Ga(s);L(`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`,de)}};var cd=new Map,vy=new Set;Kr.recordLegacyContextWarning=function(e,t){var n=Wk(e);if(n===null){b("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(!vy.has(e.type)){var i=cd.get(n);(e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(i===void 0&&(i=[],cd.set(n,i)),i.push(e))}},Kr.flushLegacyContextWarning=function(){cd.forEach(function(e,t){if(e.length!==0){var n=e[0],i=new Set;e.forEach(function(x){i.add(At(x)||"Component"),vy.add(x.type)});var s=Ga(i);try{En(n),b(`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`,s)}finally{qn()}}})},Kr.discardPendingWarnings=function(){lc=[],cc=[],uc=[],dc=[],hc=[],fc=[],cd=new Map}}var Pm,Bm,Im,Vm,Fm,gy=function(e,t){};Pm=!1,Bm=!1,Im={},Vm={},Fm={},gy=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 n=At(t)||"Component";Vm[n]||(Vm[n]=!0,b('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};function Gk(e){return e.prototype&&e.prototype.isReactComponent}function mc(e,t,n){var i=n.ref;if(i!==null&&typeof i!="function"&&typeof i!="object"){if((e.mode&Jn||J)&&!(n._owner&&n._self&&n._owner.stateNode!==n._self)&&!(n._owner&&n._owner.tag!==g)&&!(typeof n.type=="function"&&!Gk(n.type))&&n._owner){var s=At(e)||"Component";Im[s]||(b('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',s,i),Im[s]=!0)}if(n._owner){var x=n._owner,k;if(x){var U=x;if(U.tag!==g)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");k=U.stateNode}if(!k)throw new Error("Missing owner for string ref "+i+". This error is likely caused by a bug in React. Please file an issue.");var F=k;$t(i,"ref");var q=""+i;if(t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===q)return t.ref;var K=function(de){var ue=F.refs;de===null?delete ue[q]:ue[q]=de};return K._stringRef=q,K}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(!n._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 ud(e,t){var n=Object.prototype.toString.call(t);throw new Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}function dd(e){{var t=At(e)||"Component";if(Fm[t])return;Fm[t]=!0,b("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 _y(e){var t=e._payload,n=e._init;return n(t)}function by(e){function t(ve,Me){if(e){var ge=ve.deletions;ge===null?(ve.deletions=[Me],ve.flags|=ka):ge.push(Me)}}function n(ve,Me){if(!e)return null;for(var ge=Me;ge!==null;)t(ve,ge),ge=ge.sibling;return null}function i(ve,Me){for(var ge=new Map,Ge=Me;Ge!==null;)Ge.key!==null?ge.set(Ge.key,Ge):ge.set(Ge.index,Ge),Ge=Ge.sibling;return ge}function s(ve,Me){var ge=no(ve,Me);return ge.index=0,ge.sibling=null,ge}function x(ve,Me,ge){if(ve.index=ge,!e)return ve.flags|=x_,Me;var Ge=ve.alternate;if(Ge!==null){var pt=Ge.index;return pt<Me?(ve.flags|=ci,Me):pt}else return ve.flags|=ci,Me}function k(ve){return e&&ve.alternate===null&&(ve.flags|=ci),ve}function U(ve,Me,ge,Ge){if(Me===null||Me.tag!==N){var pt=Ov(ge,ve.mode,Ge);return pt.return=ve,pt}else{var ct=s(Me,ge);return ct.return=ve,ct}}function F(ve,Me,ge,Ge){var pt=ge.type;if(pt===Rn)return K(ve,Me,ge.props.children,Ge,ge.key);if(Me!==null&&(Me.elementType===pt||N0(Me,ge)||typeof pt=="object"&&pt!==null&&pt.$$typeof===bt&&_y(pt)===Me.type)){var ct=s(Me,ge.props);return ct.ref=mc(ve,Me,ge),ct.return=ve,ct._debugSource=ge._source,ct._debugOwner=ge._owner,ct}var Bt=Uv(ge,ve.mode,Ge);return Bt.ref=mc(ve,Me,ge),Bt.return=ve,Bt}function q(ve,Me,ge,Ge){if(Me===null||Me.tag!==p||Me.stateNode.containerInfo!==ge.containerInfo||Me.stateNode.implementation!==ge.implementation){var pt=Pv(ge,ve.mode,Ge);return pt.return=ve,pt}else{var ct=s(Me,ge.children||[]);return ct.return=ve,ct}}function K(ve,Me,ge,Ge,pt){if(Me===null||Me.tag!==_){var ct=wa(ge,ve.mode,Ge,pt);return ct.return=ve,ct}else{var Bt=s(Me,ge);return Bt.return=ve,Bt}}function de(ve,Me,ge){if(typeof Me=="string"&&Me!==""||typeof Me=="number"){var Ge=Ov(""+Me,ve.mode,ge);return Ge.return=ve,Ge}if(typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case Zt:{var pt=Uv(Me,ve.mode,ge);return pt.ref=mc(ve,null,Me),pt.return=ve,pt}case Ln:{var ct=Pv(Me,ve.mode,ge);return ct.return=ve,ct}case bt:{var Bt=Me._payload,zt=Me._init;return de(ve,zt(Bt),ge)}}if(Qe(Me)||si(Me)){var kn=wa(Me,ve.mode,ge,null);return kn.return=ve,kn}ud(ve,Me)}return typeof Me=="function"&&dd(ve),null}function ue(ve,Me,ge,Ge){var pt=Me!==null?Me.key:null;if(typeof ge=="string"&&ge!==""||typeof ge=="number")return pt!==null?null:U(ve,Me,""+ge,Ge);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case Zt:return ge.key===pt?F(ve,Me,ge,Ge):null;case Ln:return ge.key===pt?q(ve,Me,ge,Ge):null;case bt:{var ct=ge._payload,Bt=ge._init;return ue(ve,Me,Bt(ct),Ge)}}if(Qe(ge)||si(ge))return pt!==null?null:K(ve,Me,ge,Ge,null);ud(ve,ge)}return typeof ge=="function"&&dd(ve),null}function ye(ve,Me,ge,Ge,pt){if(typeof Ge=="string"&&Ge!==""||typeof Ge=="number"){var ct=ve.get(ge)||null;return U(Me,ct,""+Ge,pt)}if(typeof Ge=="object"&&Ge!==null){switch(Ge.$$typeof){case Zt:{var Bt=ve.get(Ge.key===null?ge:Ge.key)||null;return F(Me,Bt,Ge,pt)}case Ln:{var zt=ve.get(Ge.key===null?ge:Ge.key)||null;return q(Me,zt,Ge,pt)}case bt:var kn=Ge._payload,_n=Ge._init;return ye(ve,Me,ge,_n(kn),pt)}if(Qe(Ge)||si(Ge)){var ni=ve.get(ge)||null;return K(Me,ni,Ge,pt,null)}ud(Me,Ge)}return typeof Ge=="function"&&dd(Me),null}function Ce(ve,Me,ge){{if(typeof ve!="object"||ve===null)return Me;switch(ve.$$typeof){case Zt:case Ln:gy(ve,ge);var Ge=ve.key;if(typeof Ge!="string")break;if(Me===null){Me=new Set,Me.add(Ge);break}if(!Me.has(Ge)){Me.add(Ge);break}b("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.",Ge);break;case bt:var pt=ve._payload,ct=ve._init;Ce(ct(pt),Me,ge);break}}return Me}function Ae(ve,Me,ge,Ge){for(var pt=null,ct=0;ct<ge.length;ct++){var Bt=ge[ct];pt=Ce(Bt,pt,ve)}for(var zt=null,kn=null,_n=Me,ni=0,bn=0,Zn=null;_n!==null&&bn<ge.length;bn++){_n.index>bn?(Zn=_n,_n=null):Zn=_n.sibling;var Gi=ue(ve,_n,ge[bn],Ge);if(Gi===null){_n===null&&(_n=Zn);break}e&&_n&&Gi.alternate===null&&t(ve,_n),ni=x(Gi,ni,bn),kn===null?zt=Gi:kn.sibling=Gi,kn=Gi,_n=Zn}if(bn===ge.length){if(n(ve,_n),Ti()){var Bi=bn;za(ve,Bi)}return zt}if(_n===null){for(;bn<ge.length;bn++){var Er=de(ve,ge[bn],Ge);Er!==null&&(ni=x(Er,ni,bn),kn===null?zt=Er:kn.sibling=Er,kn=Er)}if(Ti()){var rr=bn;za(ve,rr)}return zt}for(var sr=i(ve,_n);bn<ge.length;bn++){var Yi=ye(sr,ve,bn,ge[bn],Ge);Yi!==null&&(e&&Yi.alternate!==null&&sr.delete(Yi.key===null?bn:Yi.key),ni=x(Yi,ni,bn),kn===null?zt=Yi:kn.sibling=Yi,kn=Yi)}if(e&&sr.forEach(function(al){return t(ve,al)}),Ti()){var qs=bn;za(ve,qs)}return zt}function lt(ve,Me,ge,Ge){var pt=si(ge);if(typeof pt!="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"&&ge[Symbol.toStringTag]==="Generator"&&(Bm||b("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."),Bm=!0),ge.entries===pt&&(Pm||b("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Pm=!0);var ct=pt.call(ge);if(ct)for(var Bt=null,zt=ct.next();!zt.done;zt=ct.next()){var kn=zt.value;Bt=Ce(kn,Bt,ve)}}var _n=pt.call(ge);if(_n==null)throw new Error("An iterable object provided no iterator.");for(var ni=null,bn=null,Zn=Me,Gi=0,Bi=0,Er=null,rr=_n.next();Zn!==null&&!rr.done;Bi++,rr=_n.next()){Zn.index>Bi?(Er=Zn,Zn=null):Er=Zn.sibling;var sr=ue(ve,Zn,rr.value,Ge);if(sr===null){Zn===null&&(Zn=Er);break}e&&Zn&&sr.alternate===null&&t(ve,Zn),Gi=x(sr,Gi,Bi),bn===null?ni=sr:bn.sibling=sr,bn=sr,Zn=Er}if(rr.done){if(n(ve,Zn),Ti()){var Yi=Bi;za(ve,Yi)}return ni}if(Zn===null){for(;!rr.done;Bi++,rr=_n.next()){var qs=de(ve,rr.value,Ge);qs!==null&&(Gi=x(qs,Gi,Bi),bn===null?ni=qs:bn.sibling=qs,bn=qs)}if(Ti()){var al=Bi;za(ve,al)}return ni}for(var Gc=i(ve,Zn);!rr.done;Bi++,rr=_n.next()){var ys=ye(Gc,ve,Bi,rr.value,Ge);ys!==null&&(e&&ys.alternate!==null&&Gc.delete(ys.key===null?Bi:ys.key),Gi=x(ys,Gi,Bi),bn===null?ni=ys:bn.sibling=ys,bn=ys)}if(e&&Gc.forEach(function(_L){return t(ve,_L)}),Ti()){var gL=Bi;za(ve,gL)}return ni}function Lt(ve,Me,ge,Ge){if(Me!==null&&Me.tag===N){n(ve,Me.sibling);var pt=s(Me,ge);return pt.return=ve,pt}n(ve,Me);var ct=Ov(ge,ve.mode,Ge);return ct.return=ve,ct}function Dt(ve,Me,ge,Ge){for(var pt=ge.key,ct=Me;ct!==null;){if(ct.key===pt){var Bt=ge.type;if(Bt===Rn){if(ct.tag===_){n(ve,ct.sibling);var zt=s(ct,ge.props.children);return zt.return=ve,zt._debugSource=ge._source,zt._debugOwner=ge._owner,zt}}else if(ct.elementType===Bt||N0(ct,ge)||typeof Bt=="object"&&Bt!==null&&Bt.$$typeof===bt&&_y(Bt)===ct.type){n(ve,ct.sibling);var kn=s(ct,ge.props);return kn.ref=mc(ve,ct,ge),kn.return=ve,kn._debugSource=ge._source,kn._debugOwner=ge._owner,kn}n(ve,ct);break}else t(ve,ct);ct=ct.sibling}if(ge.type===Rn){var _n=wa(ge.props.children,ve.mode,Ge,ge.key);return _n.return=ve,_n}else{var ni=Uv(ge,ve.mode,Ge);return ni.ref=mc(ve,Me,ge),ni.return=ve,ni}}function dn(ve,Me,ge,Ge){for(var pt=ge.key,ct=Me;ct!==null;){if(ct.key===pt)if(ct.tag===p&&ct.stateNode.containerInfo===ge.containerInfo&&ct.stateNode.implementation===ge.implementation){n(ve,ct.sibling);var Bt=s(ct,ge.children||[]);return Bt.return=ve,Bt}else{n(ve,ct);break}else t(ve,ct);ct=ct.sibling}var zt=Pv(ge,ve.mode,Ge);return zt.return=ve,zt}function an(ve,Me,ge,Ge){var pt=typeof ge=="object"&&ge!==null&&ge.type===Rn&&ge.key===null;if(pt&&(ge=ge.props.children),typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case Zt:return k(Dt(ve,Me,ge,Ge));case Ln:return k(dn(ve,Me,ge,Ge));case bt:var ct=ge._payload,Bt=ge._init;return an(ve,Me,Bt(ct),Ge)}if(Qe(ge))return Ae(ve,Me,ge,Ge);if(si(ge))return lt(ve,Me,ge,Ge);ud(ve,ge)}return typeof ge=="string"&&ge!==""||typeof ge=="number"?k(Lt(ve,Me,""+ge,Ge)):(typeof ge=="function"&&dd(ve),n(ve,Me))}return an}var Ho=by(!0),yy=by(!1);function Yk(e,t){if(e!==null&&t.child!==e.child)throw new Error("Resuming work not yet implemented.");if(t.child!==null){var n=t.child,i=no(n,n.pendingProps);for(t.child=i,i.return=t;n.sibling!==null;)n=n.sibling,i=i.sibling=no(n,n.pendingProps),i.return=t;i.sibling=null}}function qk(e,t){for(var n=e.child;n!==null;)U5(n,t),n=n.sibling}var Hm=oa(null),zm;zm={};var hd=null,zo=null,$m=null,fd=!1;function md(){hd=null,zo=null,$m=null,fd=!1}function wy(){fd=!0}function xy(){fd=!1}function Sy(e,t,n){$i(Hm,t._currentValue,e),t._currentValue=n,t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==zm&&b("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=zm}function Wm(e,t){var n=Hm.current;zi(Hm,t),e._currentValue=n}function Gm(e,t,n){for(var i=e;i!==null;){var s=i.alternate;if(Do(i.childLanes,t)?s!==null&&!Do(s.childLanes,t)&&(s.childLanes=Jt(s.childLanes,t)):(i.childLanes=Jt(i.childLanes,t),s!==null&&(s.childLanes=Jt(s.childLanes,t))),i===n)break;i=i.return}i!==n&&b("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 Kk(e,t,n){Xk(e,t,n)}function Xk(e,t,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var s=void 0,x=i.dependencies;if(x!==null){s=i.child;for(var k=x.firstContext;k!==null;){if(k.context===t){if(i.tag===g){var U=Ll(n),F=Hs(Fn,U);F.tag=vd;var q=i.updateQueue;if(q!==null){var K=q.shared,de=K.pending;de===null?F.next=F:(F.next=de.next,de.next=F),K.pending=F}}i.lanes=Jt(i.lanes,n);var ue=i.alternate;ue!==null&&(ue.lanes=Jt(ue.lanes,n)),Gm(i.return,n,e),x.lanes=Jt(x.lanes,n);break}k=k.next}}else if(i.tag===f)s=i.type===e.type?null:i.child;else if(i.tag===M){var ye=i.return;if(ye===null)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");ye.lanes=Jt(ye.lanes,n);var Ce=ye.alternate;Ce!==null&&(Ce.lanes=Jt(Ce.lanes,n)),Gm(ye,n,e),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}var Ae=s.sibling;if(Ae!==null){Ae.return=s.return,s=Ae;break}s=s.return}i=s}}function $o(e,t){hd=e,zo=null,$m=null;var n=e.dependencies;if(n!==null){var i=n.firstContext;i!==null&&(yr(n.lanes,t)&&kc(),n.firstContext=null)}}function ui(e){fd&&b("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($m!==e){var n={context:e,memoizedValue:t,next:null};if(zo===null){if(hd===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().");zo=n,hd.dependencies={lanes:ze,firstContext:n}}else zo=zo.next=n}return t}var qa=null;function Ym(e){qa===null?qa=[e]:qa.push(e)}function Jk(){if(qa!==null){for(var e=0;e<qa.length;e++){var t=qa[e],n=t.interleaved;if(n!==null){t.interleaved=null;var i=n.next,s=t.pending;if(s!==null){var x=s.next;s.next=i,n.next=x}t.pending=n}}qa=null}}function Ny(e,t,n,i){var s=t.interleaved;return s===null?(n.next=n,Ym(t)):(n.next=s.next,s.next=n),t.interleaved=n,pd(e,i)}function Zk(e,t,n,i){var s=t.interleaved;s===null?(n.next=n,Ym(t)):(n.next=s.next,s.next=n),t.interleaved=n}function Qk(e,t,n,i){var s=t.interleaved;return s===null?(n.next=n,Ym(t)):(n.next=s.next,s.next=n),t.interleaved=n,pd(e,i)}function fr(e,t){return pd(e,t)}var eR=pd;function pd(e,t){e.lanes=Jt(e.lanes,t);var n=e.alternate;n!==null&&(n.lanes=Jt(n.lanes,t)),n===null&&(e.flags&(ci|Ls))!==Ot&&y0(e);for(var i=e,s=e.return;s!==null;)s.childLanes=Jt(s.childLanes,t),n=s.alternate,n!==null?n.childLanes=Jt(n.childLanes,t):(s.flags&(ci|Ls))!==Ot&&y0(e),i=s,s=s.return;if(i.tag===u){var x=i.stateNode;return x}else return null}var Cy=0,Ey=1,vd=2,qm=3,gd=!1,Km,_d;Km=!1,_d=null;function Xm(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:ze},effects:null};e.updateQueue=t}function Dy(e,t){var n=t.updateQueue,i=e.updateQueue;if(n===i){var s={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects};t.updateQueue=s}}function Hs(e,t){var n={eventTime:e,lane:t,tag:Cy,payload:null,callback:null,next:null};return n}function da(e,t,n){var i=e.updateQueue;if(i===null)return null;var s=i.shared;if(_d===s&&!Km&&(b("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."),Km=!0),ZT()){var x=s.pending;return x===null?t.next=t:(t.next=x.next,x.next=t),s.pending=t,eR(e,n)}else return Qk(e,s,t,n)}function bd(e,t,n){var i=t.updateQueue;if(i!==null){var s=i.shared;if(V_(n)){var x=s.lanes;x=H_(x,e.pendingLanes);var k=Jt(x,n);s.lanes=k,Hf(e,k)}}}function Jm(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null){var s=i.updateQueue;if(n===s){var x=null,k=null,U=n.firstBaseUpdate;if(U!==null){var F=U;do{var q={eventTime:F.eventTime,lane:F.lane,tag:F.tag,payload:F.payload,callback:F.callback,next:null};k===null?x=k=q:(k.next=q,k=q),F=F.next}while(F!==null);k===null?x=k=t:(k.next=t,k=t)}else x=k=t;n={baseState:s.baseState,firstBaseUpdate:x,lastBaseUpdate:k,shared:s.shared,effects:s.effects},e.updateQueue=n;return}}var K=n.lastBaseUpdate;K===null?n.firstBaseUpdate=t:K.next=t,n.lastBaseUpdate=t}function tR(e,t,n,i,s,x){switch(n.tag){case Ey:{var k=n.payload;if(typeof k=="function"){wy();var U=k.call(x,i,s);{if(e.mode&Jn){Ni(!0);try{k.call(x,i,s)}finally{Ni(!1)}}xy()}return U}return k}case qm:e.flags=e.flags&~er|Sn;case Cy:{var F=n.payload,q;if(typeof F=="function"){wy(),q=F.call(x,i,s);{if(e.mode&Jn){Ni(!0);try{F.call(x,i,s)}finally{Ni(!1)}}xy()}}else q=F;return q==null?i:Vt({},i,q)}case vd:return gd=!0,i}return i}function yd(e,t,n,i){var s=e.updateQueue;gd=!1,_d=s.shared;var x=s.firstBaseUpdate,k=s.lastBaseUpdate,U=s.shared.pending;if(U!==null){s.shared.pending=null;var F=U,q=F.next;F.next=null,k===null?x=q:k.next=q,k=F;var K=e.alternate;if(K!==null){var de=K.updateQueue,ue=de.lastBaseUpdate;ue!==k&&(ue===null?de.firstBaseUpdate=q:ue.next=q,de.lastBaseUpdate=F)}}if(x!==null){var ye=s.baseState,Ce=ze,Ae=null,lt=null,Lt=null,Dt=x;do{var dn=Dt.lane,an=Dt.eventTime;if(Do(i,dn)){if(Lt!==null){var Me={eventTime:an,lane:Ci,tag:Dt.tag,payload:Dt.payload,callback:Dt.callback,next:null};Lt=Lt.next=Me}ye=tR(e,s,Dt,ye,t,n);var ge=Dt.callback;if(ge!==null&&Dt.lane!==Ci){e.flags|=w_;var Ge=s.effects;Ge===null?s.effects=[Dt]:Ge.push(Dt)}}else{var ve={eventTime:an,lane:dn,tag:Dt.tag,payload:Dt.payload,callback:Dt.callback,next:null};Lt===null?(lt=Lt=ve,Ae=ye):Lt=Lt.next=ve,Ce=Jt(Ce,dn)}if(Dt=Dt.next,Dt===null){if(U=s.shared.pending,U===null)break;var pt=U,ct=pt.next;pt.next=null,Dt=ct,s.lastBaseUpdate=pt,s.shared.pending=null}}while(!0);Lt===null&&(Ae=ye),s.baseState=Ae,s.firstBaseUpdate=lt,s.lastBaseUpdate=Lt;var Bt=s.shared.interleaved;if(Bt!==null){var zt=Bt;do Ce=Jt(Ce,zt.lane),zt=zt.next;while(zt!==Bt)}else x===null&&(s.shared.lanes=ze);Fc(Ce),e.lanes=Ce,e.memoizedState=ye}_d=null}function nR(e,t){if(typeof e!="function")throw new Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+e));e.call(t)}function jy(){gd=!1}function wd(){return gd}function ky(e,t,n){var i=t.effects;if(t.effects=null,i!==null)for(var s=0;s<i.length;s++){var x=i[s],k=x.callback;k!==null&&(x.callback=null,nR(k,n))}}var pc={},ha=oa(pc),vc=oa(pc),xd=oa(pc);function Sd(e){if(e===pc)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 Ry(){var e=Sd(xd.current);return e}function Zm(e,t){$i(xd,t,e),$i(vc,e,e),$i(ha,pc,e);var n=bj(t);zi(ha,e),$i(ha,n,e)}function Wo(e){zi(ha,e),zi(vc,e),zi(xd,e)}function Qm(){var e=Sd(ha.current);return e}function Ty(e){Sd(xd.current);var t=Sd(ha.current),n=yj(t,e.type);t!==n&&($i(vc,e,e),$i(ha,n,e))}function ep(e){vc.current===e&&(zi(ha,e),zi(vc,e))}var iR=0,Ly=1,Ay=1,gc=2,Xr=oa(iR);function tp(e,t){return(e&t)!==0}function Go(e){return e&Ly}function np(e,t){return e&Ly|t}function rR(e,t){return e|t}function fa(e,t){$i(Xr,t,e)}function Yo(e){zi(Xr,e)}function sR(e,t){var n=e.memoizedState;return n!==null?n.dehydrated!==null:(e.memoizedProps,!0)}function Nd(e){for(var t=e;t!==null;){if(t.tag===T){var n=t.memoizedState;if(n!==null){var i=n.dehydrated;if(i===null||Xb(i)||ym(i))return t}}else if(t.tag===$&&t.memoizedProps.revealOrder!==void 0){var s=(t.flags&Sn)!==Ot;if(s)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 mr=0,hi=1,fs=2,fi=4,Li=8,ip=[];function rp(){for(var e=0;e<ip.length;e++){var t=ip[e];t._workInProgressVersionPrimary=null}ip.length=0}function aR(e,t){var n=t._getVersion,i=n(t._source);e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,i]:e.mutableSourceEagerHydrationData.push(t,i)}var ft=d.ReactCurrentDispatcher,_c=d.ReactCurrentBatchConfig,sp,qo;sp=new Set;var Ka=ze,jn=null,mi=null,pi=null,Cd=!1,bc=!1,yc=0,oR=0,lR=25,Pe=null,Pr=null,ma=-1,ap=!1;function Nn(){{var e=Pe;Pr===null?Pr=[e]:Pr.push(e)}}function at(){{var e=Pe;Pr!==null&&(ma++,Pr[ma]!==e&&cR(e))}}function Ko(e){e!=null&&!Qe(e)&&b("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",Pe,typeof e)}function cR(e){{var t=At(jn);if(!sp.has(t)&&(sp.add(t),Pr!==null)){for(var n="",i=30,s=0;s<=ma;s++){for(var x=Pr[s],k=s===ma?e:x,U=s+1+". "+x;U.length<i;)U+=" ";U+=k+`
131
+ `,n+=U}b(`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,n)}}}function Wi(){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 op(e,t){if(ap)return!1;if(t===null)return b("%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.",Pe),!1;e.length!==t.length&&b(`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`,Pe,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var n=0;n<t.length&&n<e.length;n++)if(!Sr(e[n],t[n]))return!1;return!0}function Xo(e,t,n,i,s,x){Ka=x,jn=t,Pr=e!==null?e._debugHookTypes:null,ma=-1,ap=e!==null&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=ze,e!==null&&e.memoizedState!==null?ft.current=tw:Pr!==null?ft.current=ew:ft.current=Qy;var k=n(i,s);if(bc){var U=0;do{if(bc=!1,yc=0,U>=lR)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");U+=1,ap=!1,mi=null,pi=null,t.updateQueue=null,ma=-1,ft.current=nw,k=n(i,s)}while(bc)}ft.current=Bd,t._debugHookTypes=Pr;var F=mi!==null&&mi.next!==null;if(Ka=ze,jn=null,mi=null,pi=null,Pe=null,Pr=null,ma=-1,e!==null&&(e.flags&As)!==(t.flags&As)&&(e.mode&cn)!==Ut&&b("Internal React error: Expected static flag was missing. Please notify the React team."),Cd=!1,F)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return k}function Jo(){var e=yc!==0;return yc=0,e}function My(e,t,n){t.updateQueue=e.updateQueue,(t.mode&cs)!==Ut?t.flags&=-50333701:t.flags&=-2053,e.lanes=Eu(e.lanes,n)}function Uy(){if(ft.current=Bd,Cd){for(var e=jn.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Cd=!1}Ka=ze,jn=null,mi=null,pi=null,Pr=null,ma=-1,Pe=null,qy=!1,bc=!1,yc=0}function ms(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pi===null?jn.memoizedState=pi=e:pi=pi.next=e,pi}function Br(){var e;if(mi===null){var t=jn.alternate;t!==null?e=t.memoizedState:e=null}else e=mi.next;var n;if(pi===null?n=jn.memoizedState:n=pi.next,n!==null)pi=n,n=pi.next,mi=e;else{if(e===null)throw new Error("Rendered more hooks than during the previous render.");mi=e;var i={memoizedState:mi.memoizedState,baseState:mi.baseState,baseQueue:mi.baseQueue,queue:mi.queue,next:null};pi===null?jn.memoizedState=pi=i:pi=pi.next=i}return pi}function Oy(){return{lastEffect:null,stores:null}}function lp(e,t){return typeof t=="function"?t(e):t}function cp(e,t,n){var i=ms(),s;n!==void 0?s=n(t):s=t,i.memoizedState=i.baseState=s;var x={pending:null,interleaved:null,lanes:ze,dispatch:null,lastRenderedReducer:e,lastRenderedState:s};i.queue=x;var k=x.dispatch=fR.bind(null,jn,x);return[i.memoizedState,k]}function up(e,t,n){var i=Br(),s=i.queue;if(s===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");s.lastRenderedReducer=e;var x=mi,k=x.baseQueue,U=s.pending;if(U!==null){if(k!==null){var F=k.next,q=U.next;k.next=q,U.next=F}x.baseQueue!==k&&b("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),x.baseQueue=k=U,s.pending=null}if(k!==null){var K=k.next,de=x.baseState,ue=null,ye=null,Ce=null,Ae=K;do{var lt=Ae.lane;if(Do(Ka,lt)){if(Ce!==null){var Dt={lane:Ci,action:Ae.action,hasEagerState:Ae.hasEagerState,eagerState:Ae.eagerState,next:null};Ce=Ce.next=Dt}if(Ae.hasEagerState)de=Ae.eagerState;else{var dn=Ae.action;de=e(de,dn)}}else{var Lt={lane:lt,action:Ae.action,hasEagerState:Ae.hasEagerState,eagerState:Ae.eagerState,next:null};Ce===null?(ye=Ce=Lt,ue=de):Ce=Ce.next=Lt,jn.lanes=Jt(jn.lanes,lt),Fc(lt)}Ae=Ae.next}while(Ae!==null&&Ae!==K);Ce===null?ue=de:Ce.next=ye,Sr(de,i.memoizedState)||kc(),i.memoizedState=de,i.baseState=ue,i.baseQueue=Ce,s.lastRenderedState=de}var an=s.interleaved;if(an!==null){var ve=an;do{var Me=ve.lane;jn.lanes=Jt(jn.lanes,Me),Fc(Me),ve=ve.next}while(ve!==an)}else k===null&&(s.lanes=ze);var ge=s.dispatch;return[i.memoizedState,ge]}function dp(e,t,n){var i=Br(),s=i.queue;if(s===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");s.lastRenderedReducer=e;var x=s.dispatch,k=s.pending,U=i.memoizedState;if(k!==null){s.pending=null;var F=k.next,q=F;do{var K=q.action;U=e(U,K),q=q.next}while(q!==F);Sr(U,i.memoizedState)||kc(),i.memoizedState=U,i.baseQueue===null&&(i.baseState=U),s.lastRenderedState=U}return[U,x]}function $2(e,t,n){}function W2(e,t,n){}function hp(e,t,n){var i=jn,s=ms(),x,k=Ti();if(k){if(n===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");x=n(),qo||x!==n()&&(b("The result of getServerSnapshot should be cached to avoid an infinite loop"),qo=!0)}else{if(x=t(),!qo){var U=t();Sr(x,U)||(b("The result of getSnapshot should be cached to avoid an infinite loop"),qo=!0)}var F=ih();if(F===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Cu(F,Ka)||Py(i,t,x)}s.memoizedState=x;var q={value:x,getSnapshot:t};return s.queue=q,Rd(Iy.bind(null,i,q,e),[e]),i.flags|=Zs,wc(hi|Li,By.bind(null,i,q,x,t),void 0,null),x}function Ed(e,t,n){var i=jn,s=Br(),x=t();if(!qo){var k=t();Sr(x,k)||(b("The result of getSnapshot should be cached to avoid an infinite loop"),qo=!0)}var U=s.memoizedState,F=!Sr(U,x);F&&(s.memoizedState=x,kc());var q=s.queue;if(Sc(Iy.bind(null,i,q,e),[e]),q.getSnapshot!==t||F||pi!==null&&pi.memoizedState.tag&hi){i.flags|=Zs,wc(hi|Li,By.bind(null,i,q,x,t),void 0,null);var K=ih();if(K===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Cu(K,Ka)||Py(i,t,x)}return x}function Py(e,t,n){e.flags|=lf;var i={getSnapshot:t,value:n},s=jn.updateQueue;if(s===null)s=Oy(),jn.updateQueue=s,s.stores=[i];else{var x=s.stores;x===null?s.stores=[i]:x.push(i)}}function By(e,t,n,i){t.value=n,t.getSnapshot=i,Vy(t)&&Fy(e)}function Iy(e,t,n){var i=function(){Vy(t)&&Fy(e)};return n(i)}function Vy(e){var t=e.getSnapshot,n=e.value;try{var i=t();return!Sr(n,i)}catch{return!0}}function Fy(e){var t=fr(e,Ft);t!==null&&bi(t,e,Ft,Fn)}function Dd(e){var t=ms();typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e;var n={pending:null,interleaved:null,lanes:ze,dispatch:null,lastRenderedReducer:lp,lastRenderedState:e};t.queue=n;var i=n.dispatch=mR.bind(null,jn,n);return[t.memoizedState,i]}function fp(e){return up(lp)}function mp(e){return dp(lp)}function wc(e,t,n,i){var s={tag:e,create:t,destroy:n,deps:i,next:null},x=jn.updateQueue;if(x===null)x=Oy(),jn.updateQueue=x,x.lastEffect=s.next=s;else{var k=x.lastEffect;if(k===null)x.lastEffect=s.next=s;else{var U=k.next;k.next=s,s.next=U,x.lastEffect=s}}return s}function pp(e){var t=ms();{var n={current:e};return t.memoizedState=n,n}}function jd(e){var t=Br();return t.memoizedState}function xc(e,t,n,i){var s=ms(),x=i===void 0?null:i;jn.flags|=e,s.memoizedState=wc(hi|t,n,void 0,x)}function kd(e,t,n,i){var s=Br(),x=i===void 0?null:i,k=void 0;if(mi!==null){var U=mi.memoizedState;if(k=U.destroy,x!==null){var F=U.deps;if(op(x,F)){s.memoizedState=wc(t,n,k,x);return}}}jn.flags|=e,s.memoizedState=wc(hi|t,n,k,x)}function Rd(e,t){return(jn.mode&cs)!==Ut?xc(hf|Zs|df,Li,e,t):xc(Zs|df,Li,e,t)}function Sc(e,t){return kd(Zs,Li,e,t)}function vp(e,t){return xc(xn,fs,e,t)}function Td(e,t){return kd(xn,fs,e,t)}function gp(e,t){var n=xn;return n|=La,(jn.mode&cs)!==Ut&&(n|=Qs),xc(n,fi,e,t)}function Ld(e,t){return kd(xn,fi,e,t)}function Hy(e,t){if(typeof t=="function"){var n=t,i=e();return n(i),function(){n(null)}}else if(t!=null){var s=t;s.hasOwnProperty("current")||b("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(s).join(", ")+"}");var x=e();return s.current=x,function(){s.current=null}}}function _p(e,t,n){typeof t!="function"&&b("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var i=n!=null?n.concat([e]):null,s=xn;return s|=La,(jn.mode&cs)!==Ut&&(s|=Qs),xc(s,fi,Hy.bind(null,t,e),i)}function Ad(e,t,n){typeof t!="function"&&b("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var i=n!=null?n.concat([e]):null;return kd(xn,fi,Hy.bind(null,t,e),i)}function uR(e,t){}var Md=uR;function bp(e,t){var n=ms(),i=t===void 0?null:t;return n.memoizedState=[e,i],e}function Ud(e,t){var n=Br(),i=t===void 0?null:t,s=n.memoizedState;if(s!==null&&i!==null){var x=s[1];if(op(i,x))return s[0]}return n.memoizedState=[e,i],e}function yp(e,t){var n=ms(),i=t===void 0?null:t,s=e();return n.memoizedState=[s,i],s}function Od(e,t){var n=Br(),i=t===void 0?null:t,s=n.memoizedState;if(s!==null&&i!==null){var x=s[1];if(op(i,x))return s[0]}var k=e();return n.memoizedState=[k,i],k}function wp(e){var t=ms();return t.memoizedState=e,e}function zy(e){var t=Br(),n=mi,i=n.memoizedState;return Wy(t,i,e)}function $y(e){var t=Br();if(mi===null)return t.memoizedState=e,e;var n=mi.memoizedState;return Wy(t,n,e)}function Wy(e,t,n){var i=!KC(Ka);if(i){if(!Sr(n,t)){var s=F_();jn.lanes=Jt(jn.lanes,s),Fc(s),e.baseState=!0}return t}else return e.baseState&&(e.baseState=!1,kc()),e.memoizedState=n,n}function dR(e,t,n){var i=Gr();Ei(rE(i,Us)),e(!0);var s=_c.transition;_c.transition={};var x=_c.transition;_c.transition._updatedFibers=new Set;try{e(!1),t()}finally{if(Ei(i),_c.transition=s,s===null&&x._updatedFibers){var k=x._updatedFibers.size;k>10&&L("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."),x._updatedFibers.clear()}}}function xp(){var e=Dd(!1),t=e[0],n=e[1],i=dR.bind(null,n),s=ms();return s.memoizedState=i,[t,i]}function Gy(){var e=fp(),t=e[0],n=Br(),i=n.memoizedState;return[t,i]}function Yy(){var e=mp(),t=e[0],n=Br(),i=n.memoizedState;return[t,i]}var qy=!1;function hR(){return qy}function Sp(){var e=ms(),t=ih(),n=t.identifierPrefix,i;if(Ti()){var s=kk();i=":"+n+"R"+s;var x=yc++;x>0&&(i+="H"+x.toString(32)),i+=":"}else{var k=oR++;i=":"+n+"r"+k.toString(32)+":"}return e.memoizedState=i,i}function Pd(){var e=Br(),t=e.memoizedState;return t}function fR(e,t,n){typeof arguments[3]=="function"&&b("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=ba(e),s={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ky(e))Xy(t,s);else{var x=Ny(e,t,s,i);if(x!==null){var k=ir();bi(x,e,i,k),Jy(x,t,i)}}Zy(e,i)}function mR(e,t,n){typeof arguments[3]=="function"&&b("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=ba(e),s={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ky(e))Xy(t,s);else{var x=e.alternate;if(e.lanes===ze&&(x===null||x.lanes===ze)){var k=t.lastRenderedReducer;if(k!==null){var U;U=ft.current,ft.current=Jr;try{var F=t.lastRenderedState,q=k(F,n);if(s.hasEagerState=!0,s.eagerState=q,Sr(q,F)){Zk(e,t,s,i);return}}catch{}finally{ft.current=U}}}var K=Ny(e,t,s,i);if(K!==null){var de=ir();bi(K,e,i,de),Jy(K,t,i)}}Zy(e,i)}function Ky(e){var t=e.alternate;return e===jn||t!==null&&t===jn}function Xy(e,t){bc=Cd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Jy(e,t,n){if(V_(n)){var i=t.lanes;i=H_(i,e.pendingLanes);var s=Jt(i,n);t.lanes=s,Hf(e,s)}}function Zy(e,t,n){gf(e,t)}var Bd={readContext:ui,useCallback:Wi,useContext:Wi,useEffect:Wi,useImperativeHandle:Wi,useInsertionEffect:Wi,useLayoutEffect:Wi,useMemo:Wi,useReducer:Wi,useRef:Wi,useState:Wi,useDebugValue:Wi,useDeferredValue:Wi,useTransition:Wi,useMutableSource:Wi,useSyncExternalStore:Wi,useId:Wi,unstable_isNewReconciler:oe},Qy=null,ew=null,tw=null,nw=null,ps=null,Jr=null,Id=null;{var Np=function(){b("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().")},Ht=function(){b("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")};Qy={readContext:function(e){return ui(e)},useCallback:function(e,t){return Pe="useCallback",Nn(),Ko(t),bp(e,t)},useContext:function(e){return Pe="useContext",Nn(),ui(e)},useEffect:function(e,t){return Pe="useEffect",Nn(),Ko(t),Rd(e,t)},useImperativeHandle:function(e,t,n){return Pe="useImperativeHandle",Nn(),Ko(n),_p(e,t,n)},useInsertionEffect:function(e,t){return Pe="useInsertionEffect",Nn(),Ko(t),vp(e,t)},useLayoutEffect:function(e,t){return Pe="useLayoutEffect",Nn(),Ko(t),gp(e,t)},useMemo:function(e,t){Pe="useMemo",Nn(),Ko(t);var n=ft.current;ft.current=ps;try{return yp(e,t)}finally{ft.current=n}},useReducer:function(e,t,n){Pe="useReducer",Nn();var i=ft.current;ft.current=ps;try{return cp(e,t,n)}finally{ft.current=i}},useRef:function(e){return Pe="useRef",Nn(),pp(e)},useState:function(e){Pe="useState",Nn();var t=ft.current;ft.current=ps;try{return Dd(e)}finally{ft.current=t}},useDebugValue:function(e,t){return Pe="useDebugValue",Nn(),void 0},useDeferredValue:function(e){return Pe="useDeferredValue",Nn(),wp(e)},useTransition:function(){return Pe="useTransition",Nn(),xp()},useMutableSource:function(e,t,n){return Pe="useMutableSource",Nn(),void 0},useSyncExternalStore:function(e,t,n){return Pe="useSyncExternalStore",Nn(),hp(e,t,n)},useId:function(){return Pe="useId",Nn(),Sp()},unstable_isNewReconciler:oe},ew={readContext:function(e){return ui(e)},useCallback:function(e,t){return Pe="useCallback",at(),bp(e,t)},useContext:function(e){return Pe="useContext",at(),ui(e)},useEffect:function(e,t){return Pe="useEffect",at(),Rd(e,t)},useImperativeHandle:function(e,t,n){return Pe="useImperativeHandle",at(),_p(e,t,n)},useInsertionEffect:function(e,t){return Pe="useInsertionEffect",at(),vp(e,t)},useLayoutEffect:function(e,t){return Pe="useLayoutEffect",at(),gp(e,t)},useMemo:function(e,t){Pe="useMemo",at();var n=ft.current;ft.current=ps;try{return yp(e,t)}finally{ft.current=n}},useReducer:function(e,t,n){Pe="useReducer",at();var i=ft.current;ft.current=ps;try{return cp(e,t,n)}finally{ft.current=i}},useRef:function(e){return Pe="useRef",at(),pp(e)},useState:function(e){Pe="useState",at();var t=ft.current;ft.current=ps;try{return Dd(e)}finally{ft.current=t}},useDebugValue:function(e,t){return Pe="useDebugValue",at(),void 0},useDeferredValue:function(e){return Pe="useDeferredValue",at(),wp(e)},useTransition:function(){return Pe="useTransition",at(),xp()},useMutableSource:function(e,t,n){return Pe="useMutableSource",at(),void 0},useSyncExternalStore:function(e,t,n){return Pe="useSyncExternalStore",at(),hp(e,t,n)},useId:function(){return Pe="useId",at(),Sp()},unstable_isNewReconciler:oe},tw={readContext:function(e){return ui(e)},useCallback:function(e,t){return Pe="useCallback",at(),Ud(e,t)},useContext:function(e){return Pe="useContext",at(),ui(e)},useEffect:function(e,t){return Pe="useEffect",at(),Sc(e,t)},useImperativeHandle:function(e,t,n){return Pe="useImperativeHandle",at(),Ad(e,t,n)},useInsertionEffect:function(e,t){return Pe="useInsertionEffect",at(),Td(e,t)},useLayoutEffect:function(e,t){return Pe="useLayoutEffect",at(),Ld(e,t)},useMemo:function(e,t){Pe="useMemo",at();var n=ft.current;ft.current=Jr;try{return Od(e,t)}finally{ft.current=n}},useReducer:function(e,t,n){Pe="useReducer",at();var i=ft.current;ft.current=Jr;try{return up(e,t,n)}finally{ft.current=i}},useRef:function(e){return Pe="useRef",at(),jd()},useState:function(e){Pe="useState",at();var t=ft.current;ft.current=Jr;try{return fp(e)}finally{ft.current=t}},useDebugValue:function(e,t){return Pe="useDebugValue",at(),Md()},useDeferredValue:function(e){return Pe="useDeferredValue",at(),zy(e)},useTransition:function(){return Pe="useTransition",at(),Gy()},useMutableSource:function(e,t,n){return Pe="useMutableSource",at(),void 0},useSyncExternalStore:function(e,t,n){return Pe="useSyncExternalStore",at(),Ed(e,t)},useId:function(){return Pe="useId",at(),Pd()},unstable_isNewReconciler:oe},nw={readContext:function(e){return ui(e)},useCallback:function(e,t){return Pe="useCallback",at(),Ud(e,t)},useContext:function(e){return Pe="useContext",at(),ui(e)},useEffect:function(e,t){return Pe="useEffect",at(),Sc(e,t)},useImperativeHandle:function(e,t,n){return Pe="useImperativeHandle",at(),Ad(e,t,n)},useInsertionEffect:function(e,t){return Pe="useInsertionEffect",at(),Td(e,t)},useLayoutEffect:function(e,t){return Pe="useLayoutEffect",at(),Ld(e,t)},useMemo:function(e,t){Pe="useMemo",at();var n=ft.current;ft.current=Id;try{return Od(e,t)}finally{ft.current=n}},useReducer:function(e,t,n){Pe="useReducer",at();var i=ft.current;ft.current=Id;try{return dp(e,t,n)}finally{ft.current=i}},useRef:function(e){return Pe="useRef",at(),jd()},useState:function(e){Pe="useState",at();var t=ft.current;ft.current=Id;try{return mp(e)}finally{ft.current=t}},useDebugValue:function(e,t){return Pe="useDebugValue",at(),Md()},useDeferredValue:function(e){return Pe="useDeferredValue",at(),$y(e)},useTransition:function(){return Pe="useTransition",at(),Yy()},useMutableSource:function(e,t,n){return Pe="useMutableSource",at(),void 0},useSyncExternalStore:function(e,t,n){return Pe="useSyncExternalStore",at(),Ed(e,t)},useId:function(){return Pe="useId",at(),Pd()},unstable_isNewReconciler:oe},ps={readContext:function(e){return Np(),ui(e)},useCallback:function(e,t){return Pe="useCallback",Ht(),Nn(),bp(e,t)},useContext:function(e){return Pe="useContext",Ht(),Nn(),ui(e)},useEffect:function(e,t){return Pe="useEffect",Ht(),Nn(),Rd(e,t)},useImperativeHandle:function(e,t,n){return Pe="useImperativeHandle",Ht(),Nn(),_p(e,t,n)},useInsertionEffect:function(e,t){return Pe="useInsertionEffect",Ht(),Nn(),vp(e,t)},useLayoutEffect:function(e,t){return Pe="useLayoutEffect",Ht(),Nn(),gp(e,t)},useMemo:function(e,t){Pe="useMemo",Ht(),Nn();var n=ft.current;ft.current=ps;try{return yp(e,t)}finally{ft.current=n}},useReducer:function(e,t,n){Pe="useReducer",Ht(),Nn();var i=ft.current;ft.current=ps;try{return cp(e,t,n)}finally{ft.current=i}},useRef:function(e){return Pe="useRef",Ht(),Nn(),pp(e)},useState:function(e){Pe="useState",Ht(),Nn();var t=ft.current;ft.current=ps;try{return Dd(e)}finally{ft.current=t}},useDebugValue:function(e,t){return Pe="useDebugValue",Ht(),Nn(),void 0},useDeferredValue:function(e){return Pe="useDeferredValue",Ht(),Nn(),wp(e)},useTransition:function(){return Pe="useTransition",Ht(),Nn(),xp()},useMutableSource:function(e,t,n){return Pe="useMutableSource",Ht(),Nn(),void 0},useSyncExternalStore:function(e,t,n){return Pe="useSyncExternalStore",Ht(),Nn(),hp(e,t,n)},useId:function(){return Pe="useId",Ht(),Nn(),Sp()},unstable_isNewReconciler:oe},Jr={readContext:function(e){return Np(),ui(e)},useCallback:function(e,t){return Pe="useCallback",Ht(),at(),Ud(e,t)},useContext:function(e){return Pe="useContext",Ht(),at(),ui(e)},useEffect:function(e,t){return Pe="useEffect",Ht(),at(),Sc(e,t)},useImperativeHandle:function(e,t,n){return Pe="useImperativeHandle",Ht(),at(),Ad(e,t,n)},useInsertionEffect:function(e,t){return Pe="useInsertionEffect",Ht(),at(),Td(e,t)},useLayoutEffect:function(e,t){return Pe="useLayoutEffect",Ht(),at(),Ld(e,t)},useMemo:function(e,t){Pe="useMemo",Ht(),at();var n=ft.current;ft.current=Jr;try{return Od(e,t)}finally{ft.current=n}},useReducer:function(e,t,n){Pe="useReducer",Ht(),at();var i=ft.current;ft.current=Jr;try{return up(e,t,n)}finally{ft.current=i}},useRef:function(e){return Pe="useRef",Ht(),at(),jd()},useState:function(e){Pe="useState",Ht(),at();var t=ft.current;ft.current=Jr;try{return fp(e)}finally{ft.current=t}},useDebugValue:function(e,t){return Pe="useDebugValue",Ht(),at(),Md()},useDeferredValue:function(e){return Pe="useDeferredValue",Ht(),at(),zy(e)},useTransition:function(){return Pe="useTransition",Ht(),at(),Gy()},useMutableSource:function(e,t,n){return Pe="useMutableSource",Ht(),at(),void 0},useSyncExternalStore:function(e,t,n){return Pe="useSyncExternalStore",Ht(),at(),Ed(e,t)},useId:function(){return Pe="useId",Ht(),at(),Pd()},unstable_isNewReconciler:oe},Id={readContext:function(e){return Np(),ui(e)},useCallback:function(e,t){return Pe="useCallback",Ht(),at(),Ud(e,t)},useContext:function(e){return Pe="useContext",Ht(),at(),ui(e)},useEffect:function(e,t){return Pe="useEffect",Ht(),at(),Sc(e,t)},useImperativeHandle:function(e,t,n){return Pe="useImperativeHandle",Ht(),at(),Ad(e,t,n)},useInsertionEffect:function(e,t){return Pe="useInsertionEffect",Ht(),at(),Td(e,t)},useLayoutEffect:function(e,t){return Pe="useLayoutEffect",Ht(),at(),Ld(e,t)},useMemo:function(e,t){Pe="useMemo",Ht(),at();var n=ft.current;ft.current=Jr;try{return Od(e,t)}finally{ft.current=n}},useReducer:function(e,t,n){Pe="useReducer",Ht(),at();var i=ft.current;ft.current=Jr;try{return dp(e,t,n)}finally{ft.current=i}},useRef:function(e){return Pe="useRef",Ht(),at(),jd()},useState:function(e){Pe="useState",Ht(),at();var t=ft.current;ft.current=Jr;try{return mp(e)}finally{ft.current=t}},useDebugValue:function(e,t){return Pe="useDebugValue",Ht(),at(),Md()},useDeferredValue:function(e){return Pe="useDeferredValue",Ht(),at(),$y(e)},useTransition:function(){return Pe="useTransition",Ht(),at(),Yy()},useMutableSource:function(e,t,n){return Pe="useMutableSource",Ht(),at(),void 0},useSyncExternalStore:function(e,t,n){return Pe="useSyncExternalStore",Ht(),at(),Ed(e,t)},useId:function(){return Pe="useId",Ht(),at(),Pd()},unstable_isNewReconciler:oe}}var pa=a.unstable_now,iw=0,Vd=-1,Nc=-1,Fd=-1,Cp=!1,Hd=!1;function rw(){return Cp}function pR(){Hd=!0}function vR(){Cp=!1,Hd=!1}function gR(){Cp=Hd,Hd=!1}function sw(){return iw}function aw(){iw=pa()}function Ep(e){Nc=pa(),e.actualStartTime<0&&(e.actualStartTime=pa())}function ow(e){Nc=-1}function zd(e,t){if(Nc>=0){var n=pa()-Nc;e.actualDuration+=n,t&&(e.selfBaseDuration=n),Nc=-1}}function vs(e){if(Vd>=0){var t=pa()-Vd;Vd=-1;for(var n=e.return;n!==null;){switch(n.tag){case u:var i=n.stateNode;i.effectDuration+=t;return;case C:var s=n.stateNode;s.effectDuration+=t;return}n=n.return}}}function Dp(e){if(Fd>=0){var t=pa()-Fd;Fd=-1;for(var n=e.return;n!==null;){switch(n.tag){case u:var i=n.stateNode;i!==null&&(i.passiveEffectDuration+=t);return;case C:var s=n.stateNode;s!==null&&(s.passiveEffectDuration+=t);return}n=n.return}}}function gs(){Vd=pa()}function jp(){Fd=pa()}function kp(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function Zr(e,t){if(e&&e.defaultProps){var n=Vt({},t),i=e.defaultProps;for(var s in i)n[s]===void 0&&(n[s]=i[s]);return n}return t}var Rp={},Tp,Lp,Ap,Mp,Up,lw,$d,Op,Pp,Bp,Cc;{Tp=new Set,Lp=new Set,Ap=new Set,Mp=new Set,Op=new Set,Up=new Set,Pp=new Set,Bp=new Set,Cc=new Set;var cw=new Set;$d=function(e,t){if(!(e===null||typeof e=="function")){var n=t+"_"+e;cw.has(n)||(cw.add(n),b("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},lw=function(e,t){if(t===void 0){var n=sn(e)||"Component";Up.has(n)||(Up.add(n),b("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))}},Object.defineProperty(Rp,"_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(Rp)}function Ip(e,t,n,i){var s=e.memoizedState,x=n(i,s);{if(e.mode&Jn){Ni(!0);try{x=n(i,s)}finally{Ni(!1)}}lw(t,x)}var k=x==null?s:Vt({},s,x);if(e.memoizedState=k,e.lanes===ze){var U=e.updateQueue;U.baseState=k}}var Vp={isMounted:lC,enqueueSetState:function(e,t,n){var i=_o(e),s=ir(),x=ba(i),k=Hs(s,x);k.payload=t,n!=null&&($d(n,"setState"),k.callback=n);var U=da(i,k,x);U!==null&&(bi(U,i,x,s),bd(U,i,x)),gf(i,x)},enqueueReplaceState:function(e,t,n){var i=_o(e),s=ir(),x=ba(i),k=Hs(s,x);k.tag=Ey,k.payload=t,n!=null&&($d(n,"replaceState"),k.callback=n);var U=da(i,k,x);U!==null&&(bi(U,i,x,s),bd(U,i,x)),gf(i,x)},enqueueForceUpdate:function(e,t){var n=_o(e),i=ir(),s=ba(n),x=Hs(i,s);x.tag=vd,t!=null&&($d(t,"forceUpdate"),x.callback=t);var k=da(n,x,s);k!==null&&(bi(k,n,s,i),bd(k,n,s)),IC(n,s)}};function uw(e,t,n,i,s,x,k){var U=e.stateNode;if(typeof U.shouldComponentUpdate=="function"){var F=U.shouldComponentUpdate(i,x,k);{if(e.mode&Jn){Ni(!0);try{F=U.shouldComponentUpdate(i,x,k)}finally{Ni(!1)}}F===void 0&&b("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",sn(t)||"Component")}return F}return t.prototype&&t.prototype.isPureReactComponent?!Yl(n,i)||!Yl(s,x):!0}function _R(e,t,n){var i=e.stateNode;{var s=sn(t)||"Component",x=i.render;x||(t.prototype&&typeof t.prototype.render=="function"?b("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",s):b("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",s)),i.getInitialState&&!i.getInitialState.isReactClassApproved&&!i.state&&b("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?",s),i.getDefaultProps&&!i.getDefaultProps.isReactClassApproved&&b("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.",s),i.propTypes&&b("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",s),i.contextType&&b("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",s),t.childContextTypes&&!Cc.has(t)&&(e.mode&Jn)===Ut&&(Cc.add(t),b(`%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`,s)),t.contextTypes&&!Cc.has(t)&&(e.mode&Jn)===Ut&&(Cc.add(t),b(`%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`,s)),i.contextTypes&&b("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",s),t.contextType&&t.contextTypes&&!Pp.has(t)&&(Pp.add(t),b("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",s)),typeof i.componentShouldUpdate=="function"&&b("%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.",s),t.prototype&&t.prototype.isPureReactComponent&&typeof i.shouldComponentUpdate<"u"&&b("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",sn(t)||"A pure component"),typeof i.componentDidUnmount=="function"&&b("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",s),typeof i.componentDidReceiveProps=="function"&&b("%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().",s),typeof i.componentWillRecieveProps=="function"&&b("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",s),typeof i.UNSAFE_componentWillRecieveProps=="function"&&b("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",s);var k=i.props!==n;i.props!==void 0&&k&&b("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",s,s),i.defaultProps&&b("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",s,s),typeof i.getSnapshotBeforeUpdate=="function"&&typeof i.componentDidUpdate!="function"&&!Ap.has(t)&&(Ap.add(t),b("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",sn(t))),typeof i.getDerivedStateFromProps=="function"&&b("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",s),typeof i.getDerivedStateFromError=="function"&&b("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",s),typeof t.getSnapshotBeforeUpdate=="function"&&b("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",s);var U=i.state;U&&(typeof U!="object"||Qe(U))&&b("%s.state: must be set to an object or null",s),typeof i.getChildContext=="function"&&typeof t.childContextTypes!="object"&&b("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",s)}}function dw(e,t){t.updater=Vp,e.stateNode=t,rC(t,e),t._reactInternalInstance=Rp}function hw(e,t,n){var i=!1,s=Nr,x=Nr,k=t.contextType;if("contextType"in t){var U=k===null||k!==void 0&&k.$$typeof===Ze&&k._context===void 0;if(!U&&!Bp.has(t)){Bp.add(t);var F="";k===void 0?F=" 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 k!="object"?F=" However, it is set to a "+typeof k+".":k.$$typeof===Ie?F=" Did you accidentally pass the Context.Provider instead?":k._context!==void 0?F=" Did you accidentally pass the Context.Consumer instead?":F=" However, it is set to an object with keys {"+Object.keys(k).join(", ")+"}.",b("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",sn(t)||"Component",F)}}if(typeof k=="object"&&k!==null)x=ui(k);else{s=Po(e,t,!0);var q=t.contextTypes;i=q!=null,x=i?Bo(e,s):Nr}var K=new t(n,x);if(e.mode&Jn){Ni(!0);try{K=new t(n,x)}finally{Ni(!1)}}var de=e.memoizedState=K.state!==null&&K.state!==void 0?K.state:null;dw(e,K);{if(typeof t.getDerivedStateFromProps=="function"&&de===null){var ue=sn(t)||"Component";Lp.has(ue)||(Lp.add(ue),b("`%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.",ue,K.state===null?"null":"undefined",ue))}if(typeof t.getDerivedStateFromProps=="function"||typeof K.getSnapshotBeforeUpdate=="function"){var ye=null,Ce=null,Ae=null;if(typeof K.componentWillMount=="function"&&K.componentWillMount.__suppressDeprecationWarning!==!0?ye="componentWillMount":typeof K.UNSAFE_componentWillMount=="function"&&(ye="UNSAFE_componentWillMount"),typeof K.componentWillReceiveProps=="function"&&K.componentWillReceiveProps.__suppressDeprecationWarning!==!0?Ce="componentWillReceiveProps":typeof K.UNSAFE_componentWillReceiveProps=="function"&&(Ce="UNSAFE_componentWillReceiveProps"),typeof K.componentWillUpdate=="function"&&K.componentWillUpdate.__suppressDeprecationWarning!==!0?Ae="componentWillUpdate":typeof K.UNSAFE_componentWillUpdate=="function"&&(Ae="UNSAFE_componentWillUpdate"),ye!==null||Ce!==null||Ae!==null){var lt=sn(t)||"Component",Lt=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Mp.has(lt)||(Mp.add(lt),b(`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`,lt,Lt,ye!==null?`
153
+ `+ye:"",Ce!==null?`
154
+ `+Ce:"",Ae!==null?`
155
+ `+Ae:""))}}}return i&&ty(e,s,x),K}function bR(e,t){var n=t.state;typeof t.componentWillMount=="function"&&t.componentWillMount(),typeof t.UNSAFE_componentWillMount=="function"&&t.UNSAFE_componentWillMount(),n!==t.state&&(b("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",At(e)||"Component"),Vp.enqueueReplaceState(t,t.state,null))}function fw(e,t,n,i){var s=t.state;if(typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==s){{var x=At(e)||"Component";Tp.has(x)||(Tp.add(x),b("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",x))}Vp.enqueueReplaceState(t,t.state,null)}}function Fp(e,t,n,i){_R(e,t,n);var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Xm(e);var x=t.contextType;if(typeof x=="object"&&x!==null)s.context=ui(x);else{var k=Po(e,t,!0);s.context=Bo(e,k)}{if(s.state===n){var U=sn(t)||"Component";Op.has(U)||(Op.add(U),b("%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.",U))}e.mode&Jn&&Kr.recordLegacyContextWarning(e,s),Kr.recordUnsafeLifecycleWarnings(e,s)}s.state=e.memoizedState;var F=t.getDerivedStateFromProps;if(typeof F=="function"&&(Ip(e,t,F,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps!="function"&&typeof s.getSnapshotBeforeUpdate!="function"&&(typeof s.UNSAFE_componentWillMount=="function"||typeof s.componentWillMount=="function")&&(bR(e,s),yd(e,n,s,i),s.state=e.memoizedState),typeof s.componentDidMount=="function"){var q=xn;q|=La,(e.mode&cs)!==Ut&&(q|=Qs),e.flags|=q}}function yR(e,t,n,i){var s=e.stateNode,x=e.memoizedProps;s.props=x;var k=s.context,U=t.contextType,F=Nr;if(typeof U=="object"&&U!==null)F=ui(U);else{var q=Po(e,t,!0);F=Bo(e,q)}var K=t.getDerivedStateFromProps,de=typeof K=="function"||typeof s.getSnapshotBeforeUpdate=="function";!de&&(typeof s.UNSAFE_componentWillReceiveProps=="function"||typeof s.componentWillReceiveProps=="function")&&(x!==n||k!==F)&&fw(e,s,n,F),jy();var ue=e.memoizedState,ye=s.state=ue;if(yd(e,n,s,i),ye=e.memoizedState,x===n&&ue===ye&&!td()&&!wd()){if(typeof s.componentDidMount=="function"){var Ce=xn;Ce|=La,(e.mode&cs)!==Ut&&(Ce|=Qs),e.flags|=Ce}return!1}typeof K=="function"&&(Ip(e,t,K,n),ye=e.memoizedState);var Ae=wd()||uw(e,t,x,n,ue,ye,F);if(Ae){if(!de&&(typeof s.UNSAFE_componentWillMount=="function"||typeof s.componentWillMount=="function")&&(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"){var lt=xn;lt|=La,(e.mode&cs)!==Ut&&(lt|=Qs),e.flags|=lt}}else{if(typeof s.componentDidMount=="function"){var Lt=xn;Lt|=La,(e.mode&cs)!==Ut&&(Lt|=Qs),e.flags|=Lt}e.memoizedProps=n,e.memoizedState=ye}return s.props=n,s.state=ye,s.context=F,Ae}function wR(e,t,n,i,s){var x=t.stateNode;Dy(e,t);var k=t.memoizedProps,U=t.type===t.elementType?k:Zr(t.type,k);x.props=U;var F=t.pendingProps,q=x.context,K=n.contextType,de=Nr;if(typeof K=="object"&&K!==null)de=ui(K);else{var ue=Po(t,n,!0);de=Bo(t,ue)}var ye=n.getDerivedStateFromProps,Ce=typeof ye=="function"||typeof x.getSnapshotBeforeUpdate=="function";!Ce&&(typeof x.UNSAFE_componentWillReceiveProps=="function"||typeof x.componentWillReceiveProps=="function")&&(k!==F||q!==de)&&fw(t,x,i,de),jy();var Ae=t.memoizedState,lt=x.state=Ae;if(yd(t,i,x,s),lt=t.memoizedState,k===F&&Ae===lt&&!td()&&!wd()&&!P)return typeof x.componentDidUpdate=="function"&&(k!==e.memoizedProps||Ae!==e.memoizedState)&&(t.flags|=xn),typeof x.getSnapshotBeforeUpdate=="function"&&(k!==e.memoizedProps||Ae!==e.memoizedState)&&(t.flags|=yo),!1;typeof ye=="function"&&(Ip(t,n,ye,i),lt=t.memoizedState);var Lt=wd()||uw(t,n,U,i,Ae,lt,de)||P;return Lt?(!Ce&&(typeof x.UNSAFE_componentWillUpdate=="function"||typeof x.componentWillUpdate=="function")&&(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(i,lt,de),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(i,lt,de)),typeof x.componentDidUpdate=="function"&&(t.flags|=xn),typeof x.getSnapshotBeforeUpdate=="function"&&(t.flags|=yo)):(typeof x.componentDidUpdate=="function"&&(k!==e.memoizedProps||Ae!==e.memoizedState)&&(t.flags|=xn),typeof x.getSnapshotBeforeUpdate=="function"&&(k!==e.memoizedProps||Ae!==e.memoizedState)&&(t.flags|=yo),t.memoizedProps=i,t.memoizedState=lt),x.props=i,x.state=lt,x.context=de,Lt}function Xa(e,t){return{value:e,source:t,stack:Xi(t),digest:null}}function Hp(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function xR(e,t){return!0}function zp(e,t){try{var n=xR(e,t);if(n===!1)return;var i=t.value,s=t.source,x=t.stack,k=x!==null?x:"";if(i!=null&&i._suppressLogging){if(e.tag===g)return;console.error(i)}var U=s?At(s):null,F=U?"The above error occurred in the <"+U+"> component:":"The above error occurred in one of your React components:",q;if(e.tag===u)q=`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 K=At(e)||"Anonymous";q="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+K+".")}var de=F+`
157
+ `+k+`
158
+
159
+ `+(""+q);console.error(de)}catch(ue){setTimeout(function(){throw ue})}}var SR=typeof WeakMap=="function"?WeakMap:Map;function mw(e,t,n){var i=Hs(Fn,n);i.tag=qm,i.payload={element:null};var s=t.value;return i.callback=function(){p5(s),zp(e,t)},i}function $p(e,t,n){var i=Hs(Fn,n);i.tag=qm;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var x=t.value;i.payload=function(){return s(x)},i.callback=function(){C0(e),zp(e,t)}}var k=e.stateNode;return k!==null&&typeof k.componentDidCatch=="function"&&(i.callback=function(){C0(e),zp(e,t),typeof s!="function"&&f5(this);var F=t.value,q=t.stack;this.componentDidCatch(F,{componentStack:q!==null?q:""}),typeof s!="function"&&(yr(e.lanes,Ft)||b("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",At(e)||"Unknown"))}),i}function pw(e,t,n){var i=e.pingCache,s;if(i===null?(i=e.pingCache=new SR,s=new Set,i.set(t,s)):(s=i.get(t),s===void 0&&(s=new Set,i.set(t,s))),!s.has(n)){s.add(n);var x=v5.bind(null,e,t,n);Wr&&Hc(e,n),t.then(x,x)}}function NR(e,t,n,i){var s=e.updateQueue;if(s===null){var x=new Set;x.add(n),e.updateQueue=x}else s.add(n)}function CR(e,t){var n=e.tag;if((e.mode&cn)===Ut&&(n===o||n===v||n===A)){var i=e.alternate;i?(e.updateQueue=i.updateQueue,e.memoizedState=i.memoizedState,e.lanes=i.lanes):(e.updateQueue=null,e.memoizedState=null)}}function vw(e){var t=e;do{if(t.tag===T&&sR(t))return t;t=t.return}while(t!==null);return null}function gw(e,t,n,i,s){if((e.mode&cn)===Ut){if(e===t)e.flags|=er;else{if(e.flags|=Sn,n.flags|=cf,n.flags&=-52805,n.tag===g){var x=n.alternate;if(x===null)n.tag=R;else{var k=Hs(Fn,Ft);k.tag=vd,da(n,k,Ft)}}n.lanes=Jt(n.lanes,Ft)}return e}return e.flags|=er,e.lanes=s,e}function ER(e,t,n,i,s){if(n.flags|=bu,Wr&&Hc(e,s),i!==null&&typeof i=="object"&&typeof i.then=="function"){var x=i;CR(n),Ti()&&n.mode&cn&&ly();var k=vw(t);if(k!==null){k.flags&=~Ts,gw(k,t,n,e,s),k.mode&cn&&pw(e,x,s),NR(k,e,x);return}else{if(!qC(s)){pw(e,x,s),Sv();return}var U=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=U}}else if(Ti()&&n.mode&cn){ly();var F=vw(t);if(F!==null){(F.flags&er)===Ot&&(F.flags|=Ts),gw(F,t,n,e,s),Om(Xa(i,n));return}}i=Xa(i,n),s5(i);var q=t;do{switch(q.tag){case u:{var K=i;q.flags|=er;var de=Ll(s);q.lanes=Jt(q.lanes,de);var ue=mw(q,K,de);Jm(q,ue);return}case g:var ye=i,Ce=q.type,Ae=q.stateNode;if((q.flags&Sn)===Ot&&(typeof Ce.getDerivedStateFromError=="function"||Ae!==null&&typeof Ae.componentDidCatch=="function"&&!v0(Ae))){q.flags|=er;var lt=Ll(s);q.lanes=Jt(q.lanes,lt);var Lt=$p(q,ye,lt);Jm(q,Lt);return}break}q=q.return}while(q!==null)}function DR(){return null}var Ec=d.ReactCurrentOwner,Qr=!1,Wp,Dc,Gp,Yp,qp,Ja,Kp,Wd,jc;Wp={},Dc={},Gp={},Yp={},qp={},Ja=!1,Kp={},Wd={},jc={};function tr(e,t,n,i){e===null?t.child=yy(t,null,n,i):t.child=Ho(t,e.child,n,i)}function jR(e,t,n,i){t.child=Ho(t,e.child,null,i),t.child=Ho(t,null,n,i)}function _w(e,t,n,i,s){if(t.type!==t.elementType){var x=n.propTypes;x&&Yr(x,i,"prop",sn(n))}var k=n.render,U=t.ref,F,q;$o(t,s),El(t);{if(Ec.current=t,yi(!0),F=Xo(e,t,k,i,U,s),q=Jo(),t.mode&Jn){Ni(!0);try{F=Xo(e,t,k,i,U,s),q=Jo()}finally{Ni(!1)}}yi(!1)}return So(),e!==null&&!Qr?(My(e,t,s),zs(e,t,s)):(Ti()&&q&&Rm(t),t.flags|=bo,tr(e,t,F,s),t.child)}function bw(e,t,n,i,s){if(e===null){var x=n.type;if(A5(x)&&n.compare===null&&n.defaultProps===void 0){var k=x;return k=sl(x),t.tag=A,t.type=k,Zp(t,x),yw(e,t,k,i,s)}{var U=x.propTypes;if(U&&Yr(U,i,"prop",sn(x)),n.defaultProps!==void 0){var F=sn(x)||"Unknown";jc[F]||(b("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",F),jc[F]=!0)}}var q=Mv(n.type,null,i,t,t.mode,s);return q.ref=t.ref,q.return=t,t.child=q,q}{var K=n.type,de=K.propTypes;de&&Yr(de,i,"prop",sn(K))}var ue=e.child,ye=rv(e,s);if(!ye){var Ce=ue.memoizedProps,Ae=n.compare;if(Ae=Ae!==null?Ae:Yl,Ae(Ce,i)&&e.ref===t.ref)return zs(e,t,s)}t.flags|=bo;var lt=no(ue,i);return lt.ref=t.ref,lt.return=t,t.child=lt,lt}function yw(e,t,n,i,s){if(t.type!==t.elementType){var x=t.elementType;if(x.$$typeof===bt){var k=x,U=k._payload,F=k._init;try{x=F(U)}catch{x=null}var q=x&&x.propTypes;q&&Yr(q,i,"prop",sn(x))}}if(e!==null){var K=e.memoizedProps;if(Yl(K,i)&&e.ref===t.ref&&t.type===e.type)if(Qr=!1,t.pendingProps=i=K,rv(e,s))(e.flags&cf)!==Ot&&(Qr=!0);else return t.lanes=e.lanes,zs(e,t,s)}return Xp(e,t,n,i,s)}function ww(e,t,n){var i=t.pendingProps,s=i.children,x=e!==null?e.memoizedState:null;if(i.mode==="hidden"||W)if((t.mode&cn)===Ut){var k={baseLanes:ze,cachePool:null,transitions:null};t.memoizedState=k,rh(t,n)}else if(yr(n,br)){var de={baseLanes:ze,cachePool:null,transitions:null};t.memoizedState=de;var ue=x!==null?x.baseLanes:n;rh(t,ue)}else{var U=null,F;if(x!==null){var q=x.baseLanes;F=Jt(q,n)}else F=n;t.lanes=t.childLanes=br;var K={baseLanes:F,cachePool:U,transitions:null};return t.memoizedState=K,t.updateQueue=null,rh(t,F),null}else{var ye;x!==null?(ye=Jt(x.baseLanes,n),t.memoizedState=null):ye=n,rh(t,ye)}return tr(e,t,s,n),t.child}function kR(e,t,n){var i=t.pendingProps;return tr(e,t,i,n),t.child}function RR(e,t,n){var i=t.pendingProps.children;return tr(e,t,i,n),t.child}function TR(e,t,n){{t.flags|=xn;{var i=t.stateNode;i.effectDuration=0,i.passiveEffectDuration=0}}var s=t.pendingProps,x=s.children;return tr(e,t,x,n),t.child}function xw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=Ra,t.flags|=uf)}function Xp(e,t,n,i,s){if(t.type!==t.elementType){var x=n.propTypes;x&&Yr(x,i,"prop",sn(n))}var k;{var U=Po(t,n,!0);k=Bo(t,U)}var F,q;$o(t,s),El(t);{if(Ec.current=t,yi(!0),F=Xo(e,t,n,i,k,s),q=Jo(),t.mode&Jn){Ni(!0);try{F=Xo(e,t,n,i,k,s),q=Jo()}finally{Ni(!1)}}yi(!1)}return So(),e!==null&&!Qr?(My(e,t,s),zs(e,t,s)):(Ti()&&q&&Rm(t),t.flags|=bo,tr(e,t,F,s),t.child)}function Sw(e,t,n,i,s){{switch(q5(t)){case!1:{var x=t.stateNode,k=t.type,U=new k(t.memoizedProps,x.context),F=U.state;x.updater.enqueueSetState(x,F,null);break}case!0:{t.flags|=Sn,t.flags|=er;var q=new Error("Simulated error coming from DevTools"),K=Ll(s);t.lanes=Jt(t.lanes,K);var de=$p(t,Xa(q,t),K);Jm(t,de);break}}if(t.type!==t.elementType){var ue=n.propTypes;ue&&Yr(ue,i,"prop",sn(n))}}var ye;hs(n)?(ye=!0,id(t)):ye=!1,$o(t,s);var Ce=t.stateNode,Ae;Ce===null?(Yd(e,t),hw(t,n,i),Fp(t,n,i,s),Ae=!0):e===null?Ae=yR(t,n,i,s):Ae=wR(e,t,n,i,s);var lt=Jp(e,t,n,Ae,ye,s);{var Lt=t.stateNode;Ae&&Lt.props!==i&&(Ja||b("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",At(t)||"a component"),Ja=!0)}return lt}function Jp(e,t,n,i,s,x){xw(e,t);var k=(t.flags&Sn)!==Ot;if(!i&&!k)return s&&ry(t,n,!1),zs(e,t,x);var U=t.stateNode;Ec.current=t;var F;if(k&&typeof n.getDerivedStateFromError!="function")F=null,ow();else{El(t);{if(yi(!0),F=U.render(),t.mode&Jn){Ni(!0);try{U.render()}finally{Ni(!1)}}yi(!1)}So()}return t.flags|=bo,e!==null&&k?jR(e,t,F,x):tr(e,t,F,x),t.memoizedState=U.state,s&&ry(t,n,!0),t.child}function Nw(e){var t=e.stateNode;t.pendingContext?ny(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ny(e,t.context,!1),Zm(e,t.containerInfo)}function LR(e,t,n){if(Nw(t),e===null)throw new Error("Should have a current fiber. This is a bug in React.");var i=t.pendingProps,s=t.memoizedState,x=s.element;Dy(e,t),yd(t,i,null,n);var k=t.memoizedState;t.stateNode;var U=k.element;if(s.isDehydrated){var F={element:U,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},q=t.updateQueue;if(q.baseState=F,t.memoizedState=F,t.flags&Ts){var K=Xa(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 Cw(e,t,U,n,K)}else if(U!==x){var de=Xa(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t);return Cw(e,t,U,n,de)}else{Uk(t);var ue=yy(t,null,U,n);t.child=ue;for(var ye=ue;ye;)ye.flags=ye.flags&~ci|Ls,ye=ye.sibling}}else{if(Fo(),U===x)return zs(e,t,n);tr(e,t,U,n)}return t.child}function Cw(e,t,n,i,s){return Fo(),Om(s),t.flags|=Ts,tr(e,t,n,i),t.child}function AR(e,t,n){Ty(t),e===null&&Um(t);var i=t.type,s=t.pendingProps,x=e!==null?e.memoizedProps:null,k=s.children,U=vm(i,s);return U?k=null:x!==null&&vm(i,x)&&(t.flags|=Nl),xw(e,t),tr(e,t,k,n),t.child}function MR(e,t){return e===null&&Um(t),null}function UR(e,t,n,i){Yd(e,t);var s=t.pendingProps,x=n,k=x._payload,U=x._init,F=U(k);t.type=F;var q=t.tag=M5(F),K=Zr(F,s),de;switch(q){case o:return Zp(t,F),t.type=F=sl(F),de=Xp(null,t,F,K,i),de;case g:return t.type=F=jv(F),de=Sw(null,t,F,K,i),de;case v:return t.type=F=kv(F),de=_w(null,t,F,K,i),de;case E:{if(t.type!==t.elementType){var ue=F.propTypes;ue&&Yr(ue,K,"prop",sn(F))}return de=bw(null,t,F,Zr(F.type,K),i),de}}var ye="";throw F!==null&&typeof F=="object"&&F.$$typeof===bt&&(ye=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+F+". "+("Lazy element type must resolve to a class or function."+ye))}function OR(e,t,n,i,s){Yd(e,t),t.tag=g;var x;return hs(n)?(x=!0,id(t)):x=!1,$o(t,s),hw(t,n,i),Fp(t,n,i,s),Jp(null,t,n,!0,x,s)}function PR(e,t,n,i){Yd(e,t);var s=t.pendingProps,x;{var k=Po(t,n,!1);x=Bo(t,k)}$o(t,i);var U,F;El(t);{if(n.prototype&&typeof n.prototype.render=="function"){var q=sn(n)||"Unknown";Wp[q]||(b("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.",q,q),Wp[q]=!0)}t.mode&Jn&&Kr.recordLegacyContextWarning(t,null),yi(!0),Ec.current=t,U=Xo(null,t,n,s,x,i),F=Jo(),yi(!1)}if(So(),t.flags|=bo,typeof U=="object"&&U!==null&&typeof U.render=="function"&&U.$$typeof===void 0){var K=sn(n)||"Unknown";Dc[K]||(b("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.",K,K,K),Dc[K]=!0)}if(typeof U=="object"&&U!==null&&typeof U.render=="function"&&U.$$typeof===void 0){{var de=sn(n)||"Unknown";Dc[de]||(b("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.",de,de,de),Dc[de]=!0)}t.tag=g,t.memoizedState=null,t.updateQueue=null;var ue=!1;return hs(n)?(ue=!0,id(t)):ue=!1,t.memoizedState=U.state!==null&&U.state!==void 0?U.state:null,Xm(t),dw(t,U),Fp(t,n,s,i),Jp(null,t,n,!0,ue,i)}else{if(t.tag=o,t.mode&Jn){Ni(!0);try{U=Xo(null,t,n,s,x,i),F=Jo()}finally{Ni(!1)}}return Ti()&&F&&Rm(t),tr(null,t,U,i),Zp(t,n),t.child}}function Zp(e,t){{if(t&&t.childContextTypes&&b("%s(...): childContextTypes cannot be defined on a function component.",t.displayName||t.name||"Component"),e.ref!==null){var n="",i=Ji();i&&(n+=`
160
+
161
+ Check the render method of \``+i+"`.");var s=i||"",x=e._debugSource;x&&(s=x.fileName+":"+x.lineNumber),qp[s]||(qp[s]=!0,b("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",n))}if(t.defaultProps!==void 0){var k=sn(t)||"Unknown";jc[k]||(b("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",k),jc[k]=!0)}if(typeof t.getDerivedStateFromProps=="function"){var U=sn(t)||"Unknown";Yp[U]||(b("%s: Function components do not support getDerivedStateFromProps.",U),Yp[U]=!0)}if(typeof t.contextType=="object"&&t.contextType!==null){var F=sn(t)||"Unknown";Gp[F]||(b("%s: Function components do not support contextType.",F),Gp[F]=!0)}}}var Qp={dehydrated:null,treeContext:null,retryLane:Ci};function ev(e){return{baseLanes:e,cachePool:DR(),transitions:null}}function BR(e,t){var n=null;return{baseLanes:Jt(e.baseLanes,t),cachePool:n,transitions:e.transitions}}function IR(e,t,n,i){if(t!==null){var s=t.memoizedState;if(s===null)return!1}return tp(e,gc)}function VR(e,t){return Eu(e.childLanes,t)}function Ew(e,t,n){var i=t.pendingProps;K5(t)&&(t.flags|=Sn);var s=Xr.current,x=!1,k=(t.flags&Sn)!==Ot;if(k||IR(s,e)?(x=!0,t.flags&=~Sn):(e===null||e.memoizedState!==null)&&(s=rR(s,Ay)),s=Go(s),fa(t,s),e===null){Um(t);var U=t.memoizedState;if(U!==null){var F=U.dehydrated;if(F!==null)return WR(t,F)}var q=i.children,K=i.fallback;if(x){var de=FR(t,q,K,n),ue=t.child;return ue.memoizedState=ev(n),t.memoizedState=Qp,de}else return tv(t,q)}else{var ye=e.memoizedState;if(ye!==null){var Ce=ye.dehydrated;if(Ce!==null)return GR(e,t,k,i,Ce,ye,n)}if(x){var Ae=i.fallback,lt=i.children,Lt=zR(e,t,lt,Ae,n),Dt=t.child,dn=e.child.memoizedState;return Dt.memoizedState=dn===null?ev(n):BR(dn,n),Dt.childLanes=VR(e,n),t.memoizedState=Qp,Lt}else{var an=i.children,ve=HR(e,t,an,n);return t.memoizedState=null,ve}}}function tv(e,t,n){var i=e.mode,s={mode:"visible",children:t},x=nv(s,i);return x.return=e,e.child=x,x}function FR(e,t,n,i){var s=e.mode,x=e.child,k={mode:"hidden",children:t},U,F;return(s&cn)===Ut&&x!==null?(U=x,U.childLanes=ze,U.pendingProps=k,e.mode&Dn&&(U.actualDuration=0,U.actualStartTime=-1,U.selfBaseDuration=0,U.treeBaseDuration=0),F=wa(n,s,i,null)):(U=nv(k,s),F=wa(n,s,i,null)),U.return=e,F.return=e,U.sibling=F,e.child=U,F}function nv(e,t,n){return D0(e,t,ze,null)}function Dw(e,t){return no(e,t)}function HR(e,t,n,i){var s=e.child,x=s.sibling,k=Dw(s,{mode:"visible",children:n});if((t.mode&cn)===Ut&&(k.lanes=i),k.return=t,k.sibling=null,x!==null){var U=t.deletions;U===null?(t.deletions=[x],t.flags|=ka):U.push(x)}return t.child=k,k}function zR(e,t,n,i,s){var x=t.mode,k=e.child,U=k.sibling,F={mode:"hidden",children:n},q;if((x&cn)===Ut&&t.child!==k){var K=t.child;q=K,q.childLanes=ze,q.pendingProps=F,t.mode&Dn&&(q.actualDuration=0,q.actualStartTime=-1,q.selfBaseDuration=k.selfBaseDuration,q.treeBaseDuration=k.treeBaseDuration),t.deletions=null}else q=Dw(k,F),q.subtreeFlags=k.subtreeFlags&As;var de;return U!==null?de=no(U,i):(de=wa(i,x,s,null),de.flags|=ci),de.return=t,q.return=t,q.sibling=de,t.child=q,de}function Gd(e,t,n,i){i!==null&&Om(i),Ho(t,e.child,null,n);var s=t.pendingProps,x=s.children,k=tv(t,x);return k.flags|=ci,t.memoizedState=null,k}function $R(e,t,n,i,s){var x=t.mode,k={mode:"visible",children:n},U=nv(k,x),F=wa(i,x,s,null);return F.flags|=ci,U.return=t,F.return=t,U.sibling=F,t.child=U,(t.mode&cn)!==Ut&&Ho(t,e.child,null,s),F}function WR(e,t,n){return(e.mode&cn)===Ut?(b("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=Ft):ym(t)?e.lanes=Ua:e.lanes=br,null}function GR(e,t,n,i,s,x,k){if(n)if(t.flags&Ts){t.flags&=~Ts;var ve=Hp(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return Gd(e,t,k,ve)}else{if(t.memoizedState!==null)return t.child=e.child,t.flags|=Sn,null;var Me=i.children,ge=i.fallback,Ge=$R(e,t,Me,ge,k),pt=t.child;return pt.memoizedState=ev(k),t.memoizedState=Qp,Ge}else{if(Ak(),(t.mode&cn)===Ut)return Gd(e,t,k,null);if(ym(s)){var U,F,q;{var K=Xj(s);U=K.digest,F=K.message,q=K.stack}var de;F?de=new Error(F):de=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var ue=Hp(de,U,q);return Gd(e,t,k,ue)}var ye=yr(k,e.childLanes);if(Qr||ye){var Ce=ih();if(Ce!==null){var Ae=nE(Ce,k);if(Ae!==Ci&&Ae!==x.retryLane){x.retryLane=Ae;var lt=Fn;fr(e,Ae),bi(Ce,e,Ae,lt)}}Sv();var Lt=Hp(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 Gd(e,t,k,Lt)}else if(Xb(s)){t.flags|=Sn,t.child=e.child;var Dt=g5.bind(null,e);return Jj(s,Dt),null}else{Ok(t,s,x.treeContext);var dn=i.children,an=tv(t,dn);return an.flags|=Ls,an}}}function jw(e,t,n){e.lanes=Jt(e.lanes,t);var i=e.alternate;i!==null&&(i.lanes=Jt(i.lanes,t)),Gm(e.return,t,n)}function YR(e,t,n){for(var i=t;i!==null;){if(i.tag===T){var s=i.memoizedState;s!==null&&jw(i,n,e)}else if(i.tag===$)jw(i,n,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 qR(e){for(var t=e,n=null;t!==null;){var i=t.alternate;i!==null&&Nd(i)===null&&(n=t),t=t.sibling}return n}function KR(e){if(e!==void 0&&e!=="forwards"&&e!=="backwards"&&e!=="together"&&!Kp[e])if(Kp[e]=!0,typeof e=="string")switch(e.toLowerCase()){case"together":case"forwards":case"backwards":{b('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',e,e.toLowerCase());break}case"forward":case"backward":{b('"%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:b('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e);break}else b('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}function XR(e,t){e!==void 0&&!Wd[e]&&(e!=="collapsed"&&e!=="hidden"?(Wd[e]=!0,b('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):t!=="forwards"&&t!=="backwards"&&(Wd[e]=!0,b('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}function kw(e,t){{var n=Qe(e),i=!n&&typeof si(e)=="function";if(n||i){var s=n?"array":"iterable";return b("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>",s,t,s),!1}}return!0}function JR(e,t){if((t==="forwards"||t==="backwards")&&e!==void 0&&e!==null&&e!==!1)if(Qe(e)){for(var n=0;n<e.length;n++)if(!kw(e[n],n))return}else{var i=si(e);if(typeof i=="function"){var s=i.call(e);if(s)for(var x=s.next(),k=0;!x.done;x=s.next()){if(!kw(x.value,k))return;k++}}else b('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 iv(e,t,n,i,s){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:s}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=i,x.tail=n,x.tailMode=s)}function Rw(e,t,n){var i=t.pendingProps,s=i.revealOrder,x=i.tail,k=i.children;KR(s),XR(x,s),JR(k,s),tr(e,t,k,n);var U=Xr.current,F=tp(U,gc);if(F)U=np(U,gc),t.flags|=Sn;else{var q=e!==null&&(e.flags&Sn)!==Ot;q&&YR(t,t.child,n),U=Go(U)}if(fa(t,U),(t.mode&cn)===Ut)t.memoizedState=null;else switch(s){case"forwards":{var K=qR(t.child),de;K===null?(de=t.child,t.child=null):(de=K.sibling,K.sibling=null),iv(t,!1,de,K,x);break}case"backwards":{var ue=null,ye=t.child;for(t.child=null;ye!==null;){var Ce=ye.alternate;if(Ce!==null&&Nd(Ce)===null){t.child=ye;break}var Ae=ye.sibling;ye.sibling=ue,ue=ye,ye=Ae}iv(t,!0,ue,null,x);break}case"together":{iv(t,!1,null,null,void 0);break}default:t.memoizedState=null}return t.child}function ZR(e,t,n){Zm(t,t.stateNode.containerInfo);var i=t.pendingProps;return e===null?t.child=Ho(t,null,i,n):tr(e,t,i,n),t.child}var Tw=!1;function QR(e,t,n){var i=t.type,s=i._context,x=t.pendingProps,k=t.memoizedProps,U=x.value;{"value"in x||Tw||(Tw=!0,b("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var F=t.type.propTypes;F&&Yr(F,x,"prop","Context.Provider")}if(Sy(t,s,U),k!==null){var q=k.value;if(Sr(q,U)){if(k.children===x.children&&!td())return zs(e,t,n)}else Kk(t,s,n)}var K=x.children;return tr(e,t,K,n),t.child}var Lw=!1;function eT(e,t,n){var i=t.type;i._context===void 0?i!==i.Consumer&&(Lw||(Lw=!0,b("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 s=t.pendingProps,x=s.children;typeof x!="function"&&b("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."),$o(t,n);var k=ui(i);El(t);var U;return Ec.current=t,yi(!0),U=x(k),yi(!1),So(),t.flags|=bo,tr(e,t,U,n),t.child}function kc(){Qr=!0}function Yd(e,t){(t.mode&cn)===Ut&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=ci)}function zs(e,t,n){return e!==null&&(t.dependencies=e.dependencies),ow(),Fc(t.lanes),yr(n,t.childLanes)?(Yk(e,t),t.child):null}function tT(e,t,n){{var i=t.return;if(i===null)throw new Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,n.index=t.index,n.sibling=t.sibling,n.return=t.return,n.ref=t.ref,t===i.child)i.child=n;else{var s=i.child;if(s===null)throw new Error("Expected parent to have a child.");for(;s.sibling!==t;)if(s=s.sibling,s===null)throw new Error("Expected to find the previous sibling.");s.sibling=n}var x=i.deletions;return x===null?(i.deletions=[e],i.flags|=ka):x.push(e),n.flags|=ci,n}}function rv(e,t){var n=e.lanes;return!!yr(n,t)}function nT(e,t,n){switch(t.tag){case u:Nw(t),t.stateNode,Fo();break;case S:Ty(t);break;case g:{var i=t.type;hs(i)&&id(t);break}case p:Zm(t,t.stateNode.containerInfo);break;case f:{var s=t.memoizedProps.value,x=t.type._context;Sy(t,x,s);break}case C:{var k=yr(n,t.childLanes);k&&(t.flags|=xn);{var U=t.stateNode;U.effectDuration=0,U.passiveEffectDuration=0}}break;case T:{var F=t.memoizedState;if(F!==null){if(F.dehydrated!==null)return fa(t,Go(Xr.current)),t.flags|=Sn,null;var q=t.child,K=q.childLanes;if(yr(n,K))return Ew(e,t,n);fa(t,Go(Xr.current));var de=zs(e,t,n);return de!==null?de.sibling:null}else fa(t,Go(Xr.current));break}case $:{var ue=(e.flags&Sn)!==Ot,ye=yr(n,t.childLanes);if(ue){if(ye)return Rw(e,t,n);t.flags|=Sn}var Ce=t.memoizedState;if(Ce!==null&&(Ce.rendering=null,Ce.tail=null,Ce.lastEffect=null),fa(t,Xr.current),ye)break;return null}case I:case Y:return t.lanes=ze,ww(e,t,n)}return zs(e,t,n)}function Aw(e,t,n){if(t._debugNeedsRemount&&e!==null)return tT(e,t,Mv(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(e!==null){var i=e.memoizedProps,s=t.pendingProps;if(i!==s||td()||t.type!==e.type)Qr=!0;else{var x=rv(e,n);if(!x&&(t.flags&Sn)===Ot)return Qr=!1,nT(e,t,n);(e.flags&cf)!==Ot?Qr=!0:Qr=!1}}else if(Qr=!1,Ti()&&Dk(t)){var k=t.index,U=jk();oy(t,U,k)}switch(t.lanes=ze,t.tag){case y:return PR(e,t,t.type,n);case D:{var F=t.elementType;return UR(e,t,F,n)}case o:{var q=t.type,K=t.pendingProps,de=t.elementType===q?K:Zr(q,K);return Xp(e,t,q,de,n)}case g:{var ue=t.type,ye=t.pendingProps,Ce=t.elementType===ue?ye:Zr(ue,ye);return Sw(e,t,ue,Ce,n)}case u:return LR(e,t,n);case S:return AR(e,t,n);case N:return MR(e,t);case T:return Ew(e,t,n);case p:return ZR(e,t,n);case v:{var Ae=t.type,lt=t.pendingProps,Lt=t.elementType===Ae?lt:Zr(Ae,lt);return _w(e,t,Ae,Lt,n)}case _:return kR(e,t,n);case l:return RR(e,t,n);case C:return TR(e,t,n);case f:return QR(e,t,n);case m:return eT(e,t,n);case E:{var Dt=t.type,dn=t.pendingProps,an=Zr(Dt,dn);if(t.type!==t.elementType){var ve=Dt.propTypes;ve&&Yr(ve,an,"prop",sn(Dt))}return an=Zr(Dt.type,an),bw(e,t,Dt,an,n)}case A:return yw(e,t,t.type,t.pendingProps,n);case R:{var Me=t.type,ge=t.pendingProps,Ge=t.elementType===Me?ge:Zr(Me,ge);return OR(e,t,Me,Ge,n)}case $:return Rw(e,t,n);case O:break;case I:return ww(e,t,n)}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 Zo(e){e.flags|=xn}function Mw(e){e.flags|=Ra,e.flags|=uf}var Uw,sv,Ow,Pw;Uw=function(e,t,n,i){for(var s=t.child;s!==null;){if(s.tag===S||s.tag===N)Nj(e,s.stateNode);else if(s.tag!==p){if(s.child!==null){s.child.return=s,s=s.child;continue}}if(s===t)return;for(;s.sibling===null;){if(s.return===null||s.return===t)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},sv=function(e,t){},Ow=function(e,t,n,i,s){var x=e.memoizedProps;if(x!==i){var k=t.stateNode,U=Qm(),F=Ej(k,n,x,i,s,U);t.updateQueue=F,F&&Zo(t)}},Pw=function(e,t,n,i){n!==i&&Zo(t)};function Rc(e,t){if(!Ti())switch(e.tailMode){case"hidden":{for(var n=e.tail,i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break}case"collapsed":{for(var s=e.tail,x=null;s!==null;)s.alternate!==null&&(x=s),s=s.sibling;x===null?!t&&e.tail!==null?e.tail.sibling=null:e.tail=null:x.sibling=null;break}}}function Ai(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=ze,i=Ot;if(t){if((e.mode&Dn)!==Ut){for(var F=e.selfBaseDuration,q=e.child;q!==null;)n=Jt(n,Jt(q.lanes,q.childLanes)),i|=q.subtreeFlags&As,i|=q.flags&As,F+=q.treeBaseDuration,q=q.sibling;e.treeBaseDuration=F}else for(var K=e.child;K!==null;)n=Jt(n,Jt(K.lanes,K.childLanes)),i|=K.subtreeFlags&As,i|=K.flags&As,K.return=e,K=K.sibling;e.subtreeFlags|=i}else{if((e.mode&Dn)!==Ut){for(var s=e.actualDuration,x=e.selfBaseDuration,k=e.child;k!==null;)n=Jt(n,Jt(k.lanes,k.childLanes)),i|=k.subtreeFlags,i|=k.flags,s+=k.actualDuration,x+=k.treeBaseDuration,k=k.sibling;e.actualDuration=s,e.treeBaseDuration=x}else for(var U=e.child;U!==null;)n=Jt(n,Jt(U.lanes,U.childLanes)),i|=U.subtreeFlags,i|=U.flags,U.return=e,U=U.sibling;e.subtreeFlags|=i}return e.childLanes=n,t}function iT(e,t,n){if(Fk()&&(t.mode&cn)!==Ut&&(t.flags&Sn)===Ot)return my(t),Fo(),t.flags|=Ts|bu|er,!1;var i=ld(t);if(n!==null&&n.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(Ik(t),Ai(t),(t.mode&Dn)!==Ut){var s=n!==null;if(s){var x=t.child;x!==null&&(t.treeBaseDuration-=x.treeBaseDuration)}}return!1}else{if(Fo(),(t.flags&Sn)===Ot&&(t.memoizedState=null),t.flags|=xn,Ai(t),(t.mode&Dn)!==Ut){var k=n!==null;if(k){var U=t.child;U!==null&&(t.treeBaseDuration-=U.treeBaseDuration)}}return!1}else return py(),!0}function Bw(e,t,n){var i=t.pendingProps;switch(Tm(t),t.tag){case y:case D:case A:case o:case v:case _:case l:case C:case m:case E:return Ai(t),null;case g:{var s=t.type;return hs(s)&&nd(t),Ai(t),null}case u:{var x=t.stateNode;if(Wo(t),Dm(t),rp(),x.pendingContext&&(x.context=x.pendingContext,x.pendingContext=null),e===null||e.child===null){var k=ld(t);if(k)Zo(t);else if(e!==null){var U=e.memoizedState;(!U.isDehydrated||(t.flags&Ts)!==Ot)&&(t.flags|=yo,py())}}return sv(e,t),Ai(t),null}case S:{ep(t);var F=Ry(),q=t.type;if(e!==null&&t.stateNode!=null)Ow(e,t,q,i,F),e.ref!==t.ref&&Mw(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 Ai(t),null}var K=Qm(),de=ld(t);if(de)Pk(t,F,K)&&Zo(t);else{var ue=Sj(q,i,F,K,t);Uw(ue,t,!1,!1),t.stateNode=ue,Cj(ue,q,i,F)&&Zo(t)}t.ref!==null&&Mw(t)}return Ai(t),null}case N:{var ye=i;if(e&&t.stateNode!=null){var Ce=e.memoizedProps;Pw(e,t,Ce,ye)}else{if(typeof ye!="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 Ae=Ry(),lt=Qm(),Lt=ld(t);Lt?Bk(t)&&Zo(t):t.stateNode=Dj(ye,Ae,lt,t)}return Ai(t),null}case T:{Yo(t);var Dt=t.memoizedState;if(e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){var dn=iT(e,t,Dt);if(!dn)return t.flags&er?t:null}if((t.flags&Sn)!==Ot)return t.lanes=n,(t.mode&Dn)!==Ut&&kp(t),t;var an=Dt!==null,ve=e!==null&&e.memoizedState!==null;if(an!==ve&&an){var Me=t.child;if(Me.flags|=Ta,(t.mode&cn)!==Ut){var ge=e===null&&(t.memoizedProps.unstable_avoidThisFallback!==!0||!0);ge||tp(Xr.current,Ay)?r5():Sv()}}var Ge=t.updateQueue;if(Ge!==null&&(t.flags|=xn),Ai(t),(t.mode&Dn)!==Ut&&an){var pt=t.child;pt!==null&&(t.treeBaseDuration-=pt.treeBaseDuration)}return null}case p:return Wo(t),sv(e,t),e===null&&yk(t.stateNode.containerInfo),Ai(t),null;case f:var ct=t.type._context;return Wm(ct,t),Ai(t),null;case R:{var Bt=t.type;return hs(Bt)&&nd(t),Ai(t),null}case $:{Yo(t);var zt=t.memoizedState;if(zt===null)return Ai(t),null;var kn=(t.flags&Sn)!==Ot,_n=zt.rendering;if(_n===null)if(kn)Rc(zt,!1);else{var ni=a5()&&(e===null||(e.flags&Sn)===Ot);if(!ni)for(var bn=t.child;bn!==null;){var Zn=Nd(bn);if(Zn!==null){kn=!0,t.flags|=Sn,Rc(zt,!1);var Gi=Zn.updateQueue;return Gi!==null&&(t.updateQueue=Gi,t.flags|=xn),t.subtreeFlags=Ot,qk(t,n),fa(t,np(Xr.current,gc)),t.child}bn=bn.sibling}zt.tail!==null&&Si()>s0()&&(t.flags|=Sn,kn=!0,Rc(zt,!1),t.lanes=P_)}else{if(!kn){var Bi=Nd(_n);if(Bi!==null){t.flags|=Sn,kn=!0;var Er=Bi.updateQueue;if(Er!==null&&(t.updateQueue=Er,t.flags|=xn),Rc(zt,!0),zt.tail===null&&zt.tailMode==="hidden"&&!_n.alternate&&!Ti())return Ai(t),null}else Si()*2-zt.renderingStartTime>s0()&&n!==br&&(t.flags|=Sn,kn=!0,Rc(zt,!1),t.lanes=P_)}if(zt.isBackwards)_n.sibling=t.child,t.child=_n;else{var rr=zt.last;rr!==null?rr.sibling=_n:t.child=_n,zt.last=_n}}if(zt.tail!==null){var sr=zt.tail;zt.rendering=sr,zt.tail=sr.sibling,zt.renderingStartTime=Si(),sr.sibling=null;var Yi=Xr.current;return kn?Yi=np(Yi,gc):Yi=Go(Yi),fa(t,Yi),sr}return Ai(t),null}case O:break;case I:case Y:{xv(t);var qs=t.memoizedState,al=qs!==null;if(e!==null){var Gc=e.memoizedState,ys=Gc!==null;ys!==al&&!W&&(t.flags|=Ta)}return!al||(t.mode&cn)===Ut?Ai(t):yr(bs,br)&&(Ai(t),t.subtreeFlags&(ci|xn)&&(t.flags|=Ta)),null}case Q:return null;case Z: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 rT(e,t,n){switch(Tm(t),t.tag){case g:{var i=t.type;hs(i)&&nd(t);var s=t.flags;return s&er?(t.flags=s&~er|Sn,(t.mode&Dn)!==Ut&&kp(t),t):null}case u:{t.stateNode,Wo(t),Dm(t),rp();var x=t.flags;return(x&er)!==Ot&&(x&Sn)===Ot?(t.flags=x&~er|Sn,t):null}case S:return ep(t),null;case T:{Yo(t);var k=t.memoizedState;if(k!==null&&k.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.");Fo()}var U=t.flags;return U&er?(t.flags=U&~er|Sn,(t.mode&Dn)!==Ut&&kp(t),t):null}case $:return Yo(t),null;case p:return Wo(t),null;case f:var F=t.type._context;return Wm(F,t),null;case I:case Y:return xv(t),null;case Q:return null;default:return null}}function Iw(e,t,n){switch(Tm(t),t.tag){case g:{var i=t.type.childContextTypes;i!=null&&nd(t);break}case u:{t.stateNode,Wo(t),Dm(t),rp();break}case S:{ep(t);break}case p:Wo(t);break;case T:Yo(t);break;case $:Yo(t);break;case f:var s=t.type._context;Wm(s,t);break;case I:case Y:xv(t);break}}var Vw=null;Vw=new Set;var qd=!1,Mi=!1,sT=typeof WeakSet=="function"?WeakSet:Set,xt=null,Qo=null,el=null;function aT(e){af(null,function(){throw e}),of()}var oT=function(e,t){if(t.props=e.memoizedProps,t.state=e.memoizedState,e.mode&Dn)try{gs(),t.componentWillUnmount()}finally{vs(e)}else t.componentWillUnmount()};function Fw(e,t){try{va(fi,e)}catch(n){Bn(e,t,n)}}function av(e,t,n){try{oT(e,n)}catch(i){Bn(e,t,i)}}function lT(e,t,n){try{n.componentDidMount()}catch(i){Bn(e,t,i)}}function Hw(e,t){try{$w(e)}catch(n){Bn(e,t,n)}}function tl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function"){var i;try{if(be&&Ve&&e.mode&Dn)try{gs(),i=n(null)}finally{vs(e)}else i=n(null)}catch(s){Bn(e,t,s)}typeof i=="function"&&b("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",At(e))}else n.current=null}function Kd(e,t,n){try{n()}catch(i){Bn(e,t,i)}}var zw=!1;function cT(e,t){wj(e.containerInfo),xt=t,uT();var n=zw;return zw=!1,n}function uT(){for(;xt!==null;){var e=xt,t=e.child;(e.subtreeFlags&ff)!==Ot&&t!==null?(t.return=e,xt=t):dT()}}function dT(){for(;xt!==null;){var e=xt;En(e);try{hT(e)}catch(n){Bn(e,e.return,n)}qn();var t=e.sibling;if(t!==null){t.return=e.return,xt=t;return}xt=e.return}}function hT(e){var t=e.alternate,n=e.flags;if((n&yo)!==Ot){switch(En(e),e.tag){case o:case v:case A:break;case g:{if(t!==null){var i=t.memoizedProps,s=t.memoizedState,x=e.stateNode;e.type===e.elementType&&!Ja&&(x.props!==e.memoizedProps&&b("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.",At(e)||"instance"),x.state!==e.memoizedState&&b("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.",At(e)||"instance"));var k=x.getSnapshotBeforeUpdate(e.elementType===e.type?i:Zr(e.type,i),s);{var U=Vw;k===void 0&&!U.has(e.type)&&(U.add(e.type),b("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",At(e)))}x.__reactInternalSnapshotBeforeUpdate=k}break}case u:{{var F=e.stateNode;Gj(F.containerInfo)}break}case S:case N:case p:case R: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.")}qn()}}function es(e,t,n){var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var x=s.next,k=x;do{if((k.tag&e)===e){var U=k.destroy;k.destroy=void 0,U!==void 0&&((e&Li)!==mr?DC(t):(e&fi)!==mr&&L_(t),(e&fs)!==mr&&zc(!0),Kd(t,n,U),(e&fs)!==mr&&zc(!1),(e&Li)!==mr?jC():(e&fi)!==mr&&A_())}k=k.next}while(k!==x)}}function va(e,t){var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var s=i.next,x=s;do{if((x.tag&e)===e){(e&Li)!==mr?CC(t):(e&fi)!==mr&&kC(t);var k=x.create;(e&fs)!==mr&&zc(!0),x.destroy=k(),(e&fs)!==mr&&zc(!1),(e&Li)!==mr?EC():(e&fi)!==mr&&RC();{var U=x.destroy;if(U!==void 0&&typeof U!="function"){var F=void 0;(x.tag&fi)!==Ot?F="useLayoutEffect":(x.tag&fs)!==Ot?F="useInsertionEffect":F="useEffect";var q=void 0;U===null?q=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof U.then=="function"?q=`
162
+
163
+ It looks like you wrote `+F+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
164
+
165
+ `+F+`(() => {
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`:q=" You returned: "+U,b("%s must not return anything besides a function, which is used for clean-up.%s",F,q)}}}x=x.next}while(x!==s)}}function fT(e,t){if((t.flags&xn)!==Ot)switch(t.tag){case C:{var n=t.stateNode.passiveEffectDuration,i=t.memoizedProps,s=i.id,x=i.onPostCommit,k=sw(),U=t.alternate===null?"mount":"update";rw()&&(U="nested-update"),typeof x=="function"&&x(s,U,n,k);var F=t.return;e:for(;F!==null;){switch(F.tag){case u:var q=F.stateNode;q.passiveEffectDuration+=n;break e;case C:var K=F.stateNode;K.passiveEffectDuration+=n;break e}F=F.return}break}}}function mT(e,t,n,i){if((n.flags&Cl)!==Ot)switch(n.tag){case o:case v:case A:{if(!Mi)if(n.mode&Dn)try{gs(),va(fi|hi,n)}finally{vs(n)}else va(fi|hi,n);break}case g:{var s=n.stateNode;if(n.flags&xn&&!Mi)if(t===null)if(n.type===n.elementType&&!Ja&&(s.props!==n.memoizedProps&&b("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.",At(n)||"instance"),s.state!==n.memoizedState&&b("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.",At(n)||"instance")),n.mode&Dn)try{gs(),s.componentDidMount()}finally{vs(n)}else s.componentDidMount();else{var x=n.elementType===n.type?t.memoizedProps:Zr(n.type,t.memoizedProps),k=t.memoizedState;if(n.type===n.elementType&&!Ja&&(s.props!==n.memoizedProps&&b("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.",At(n)||"instance"),s.state!==n.memoizedState&&b("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.",At(n)||"instance")),n.mode&Dn)try{gs(),s.componentDidUpdate(x,k,s.__reactInternalSnapshotBeforeUpdate)}finally{vs(n)}else s.componentDidUpdate(x,k,s.__reactInternalSnapshotBeforeUpdate)}var U=n.updateQueue;U!==null&&(n.type===n.elementType&&!Ja&&(s.props!==n.memoizedProps&&b("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.",At(n)||"instance"),s.state!==n.memoizedState&&b("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.",At(n)||"instance")),ky(n,U,s));break}case u:{var F=n.updateQueue;if(F!==null){var q=null;if(n.child!==null)switch(n.child.tag){case S:q=n.child.stateNode;break;case g:q=n.child.stateNode;break}ky(n,F,q)}break}case S:{var K=n.stateNode;if(t===null&&n.flags&xn){var de=n.type,ue=n.memoizedProps;Lj(K,de,ue)}break}case N:break;case p:break;case C:{{var ye=n.memoizedProps,Ce=ye.onCommit,Ae=ye.onRender,lt=n.stateNode.effectDuration,Lt=sw(),Dt=t===null?"mount":"update";rw()&&(Dt="nested-update"),typeof Ae=="function"&&Ae(n.memoizedProps.id,Dt,n.actualDuration,n.treeBaseDuration,n.actualStartTime,Lt);{typeof Ce=="function"&&Ce(n.memoizedProps.id,Dt,lt,Lt),d5(n);var dn=n.return;e:for(;dn!==null;){switch(dn.tag){case u:var an=dn.stateNode;an.effectDuration+=lt;break e;case C:var ve=dn.stateNode;ve.effectDuration+=lt;break e}dn=dn.return}}}break}case T:{xT(e,n);break}case $:case R:case O:case I:case Y:case Z: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.")}Mi||n.flags&Ra&&$w(n)}function pT(e){switch(e.tag){case o:case v:case A:{if(e.mode&Dn)try{gs(),Fw(e,e.return)}finally{vs(e)}else Fw(e,e.return);break}case g:{var t=e.stateNode;typeof t.componentDidMount=="function"&&lT(e,e.return,t),Hw(e,e.return);break}case S:{Hw(e,e.return);break}}}function vT(e,t){for(var n=null,i=e;;){if(i.tag===S){if(n===null){n=i;try{var s=i.stateNode;t?Hj(s):$j(i.stateNode,i.memoizedProps)}catch(k){Bn(e,e.return,k)}}}else if(i.tag===N){if(n===null)try{var x=i.stateNode;t?zj(x):Wj(x,i.memoizedProps)}catch(k){Bn(e,e.return,k)}}else if(!((i.tag===I||i.tag===Y)&&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;n===i&&(n=null),i=i.return}n===i&&(n=null),i.sibling.return=i.return,i=i.sibling}}function $w(e){var t=e.ref;if(t!==null){var n=e.stateNode,i;switch(e.tag){case S:i=n;break;default:i=n}if(typeof t=="function"){var s;if(e.mode&Dn)try{gs(),s=t(i)}finally{vs(e)}else s=t(i);typeof s=="function"&&b("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",At(e))}else t.hasOwnProperty("current")||b("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",At(e)),t.current=i}}function gT(e){var t=e.alternate;t!==null&&(t.return=null),e.return=null}function Ww(e){var t=e.alternate;t!==null&&(e.alternate=null,Ww(t));{if(e.child=null,e.deletions=null,e.sibling=null,e.tag===S){var n=e.stateNode;n!==null&&Sk(n)}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 _T(e){for(var t=e.return;t!==null;){if(Gw(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 Gw(e){return e.tag===S||e.tag===u||e.tag===p}function Yw(e){var t=e;e:for(;;){for(;t.sibling===null;){if(t.return===null||Gw(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==S&&t.tag!==N&&t.tag!==M;){if(t.flags&ci||t.child===null||t.tag===p)continue e;t.child.return=t,t=t.child}if(!(t.flags&ci))return t.stateNode}}function bT(e){var t=_T(e);switch(t.tag){case S:{var n=t.stateNode;t.flags&Nl&&(Kb(n),t.flags&=~Nl);var i=Yw(e);lv(e,i,n);break}case u:case p:{var s=t.stateNode.containerInfo,x=Yw(e);ov(e,x,s);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function ov(e,t,n){var i=e.tag,s=i===S||i===N;if(s){var x=e.stateNode;t?Bj(n,x,t):Oj(n,x)}else if(i!==p){var k=e.child;if(k!==null){ov(k,t,n);for(var U=k.sibling;U!==null;)ov(U,t,n),U=U.sibling}}}function lv(e,t,n){var i=e.tag,s=i===S||i===N;if(s){var x=e.stateNode;t?Pj(n,x,t):Uj(n,x)}else if(i!==p){var k=e.child;if(k!==null){lv(k,t,n);for(var U=k.sibling;U!==null;)lv(U,t,n),U=U.sibling}}}var Ui=null,ts=!1;function yT(e,t,n){{var i=t;e:for(;i!==null;){switch(i.tag){case S:{Ui=i.stateNode,ts=!1;break e}case u:{Ui=i.stateNode.containerInfo,ts=!0;break e}case p:{Ui=i.stateNode.containerInfo,ts=!0;break e}}i=i.return}if(Ui===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");qw(e,t,n),Ui=null,ts=!1}gT(n)}function ga(e,t,n){for(var i=n.child;i!==null;)qw(e,t,i),i=i.sibling}function qw(e,t,n){switch(wC(n),n.tag){case S:Mi||tl(n,t);case N:{{var i=Ui,s=ts;Ui=null,ga(e,t,n),Ui=i,ts=s,Ui!==null&&(ts?Vj(Ui,n.stateNode):Ij(Ui,n.stateNode))}return}case M:{Ui!==null&&(ts?Fj(Ui,n.stateNode):bm(Ui,n.stateNode));return}case p:{{var x=Ui,k=ts;Ui=n.stateNode.containerInfo,ts=!0,ga(e,t,n),Ui=x,ts=k}return}case o:case v:case E:case A:{if(!Mi){var U=n.updateQueue;if(U!==null){var F=U.lastEffect;if(F!==null){var q=F.next,K=q;do{var de=K,ue=de.destroy,ye=de.tag;ue!==void 0&&((ye&fs)!==mr?Kd(n,t,ue):(ye&fi)!==mr&&(L_(n),n.mode&Dn?(gs(),Kd(n,t,ue),vs(n)):Kd(n,t,ue),A_())),K=K.next}while(K!==q)}}}ga(e,t,n);return}case g:{if(!Mi){tl(n,t);var Ce=n.stateNode;typeof Ce.componentWillUnmount=="function"&&av(n,t,Ce)}ga(e,t,n);return}case O:{ga(e,t,n);return}case I:{if(n.mode&cn){var Ae=Mi;Mi=Ae||n.memoizedState!==null,ga(e,t,n),Mi=Ae}else ga(e,t,n);break}default:{ga(e,t,n);return}}}function wT(e){e.memoizedState}function xT(e,t){var n=t.memoizedState;if(n===null){var i=t.alternate;if(i!==null){var s=i.memoizedState;if(s!==null){var x=s.dehydrated;x!==null&&ak(x)}}}}function Kw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new sT),t.forEach(function(i){var s=_5.bind(null,e,i);if(!n.has(i)){if(n.add(i),Wr)if(Qo!==null&&el!==null)Hc(el,Qo);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");i.then(s,s)}})}}function ST(e,t,n){Qo=n,el=e,En(t),Xw(t,e),En(t),Qo=null,el=null}function ns(e,t,n){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var x=i[s];try{yT(e,t,x)}catch(F){Bn(x,t,F)}}var k=os();if(t.subtreeFlags&mf)for(var U=t.child;U!==null;)En(U),Xw(U,e),U=U.sibling;En(k)}function Xw(e,t,n){var i=e.alternate,s=e.flags;switch(e.tag){case o:case v:case E:case A:{if(ns(t,e),_s(e),s&xn){try{es(fs|hi,e,e.return),va(fs|hi,e)}catch(Bt){Bn(e,e.return,Bt)}if(e.mode&Dn){try{gs(),es(fi|hi,e,e.return)}catch(Bt){Bn(e,e.return,Bt)}vs(e)}else try{es(fi|hi,e,e.return)}catch(Bt){Bn(e,e.return,Bt)}}return}case g:{ns(t,e),_s(e),s&Ra&&i!==null&&tl(i,i.return);return}case S:{ns(t,e),_s(e),s&Ra&&i!==null&&tl(i,i.return);{if(e.flags&Nl){var x=e.stateNode;try{Kb(x)}catch(Bt){Bn(e,e.return,Bt)}}if(s&xn){var k=e.stateNode;if(k!=null){var U=e.memoizedProps,F=i!==null?i.memoizedProps:U,q=e.type,K=e.updateQueue;if(e.updateQueue=null,K!==null)try{Aj(k,K,q,F,U,e)}catch(Bt){Bn(e,e.return,Bt)}}}}return}case N:{if(ns(t,e),_s(e),s&xn){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 de=e.stateNode,ue=e.memoizedProps,ye=i!==null?i.memoizedProps:ue;try{Mj(de,ye,ue)}catch(Bt){Bn(e,e.return,Bt)}}return}case u:{if(ns(t,e),_s(e),s&xn&&i!==null){var Ce=i.memoizedState;if(Ce.isDehydrated)try{sk(t.containerInfo)}catch(Bt){Bn(e,e.return,Bt)}}return}case p:{ns(t,e),_s(e);return}case T:{ns(t,e),_s(e);var Ae=e.child;if(Ae.flags&Ta){var lt=Ae.stateNode,Lt=Ae.memoizedState,Dt=Lt!==null;if(lt.isHidden=Dt,Dt){var dn=Ae.alternate!==null&&Ae.alternate.memoizedState!==null;dn||i5()}}if(s&xn){try{wT(e)}catch(Bt){Bn(e,e.return,Bt)}Kw(e)}return}case I:{var an=i!==null&&i.memoizedState!==null;if(e.mode&cn){var ve=Mi;Mi=ve||an,ns(t,e),Mi=ve}else ns(t,e);if(_s(e),s&Ta){var Me=e.stateNode,ge=e.memoizedState,Ge=ge!==null,pt=e;if(Me.isHidden=Ge,Ge&&!an&&(pt.mode&cn)!==Ut){xt=pt;for(var ct=pt.child;ct!==null;)xt=ct,CT(ct),ct=ct.sibling}vT(pt,Ge)}return}case $:{ns(t,e),_s(e),s&xn&&Kw(e);return}case O:return;default:{ns(t,e),_s(e);return}}}function _s(e){var t=e.flags;if(t&ci){try{bT(e)}catch(n){Bn(e,e.return,n)}e.flags&=~ci}t&Ls&&(e.flags&=~Ls)}function NT(e,t,n){Qo=n,el=t,xt=e,Jw(e,t,n),Qo=null,el=null}function Jw(e,t,n){for(var i=(e.mode&cn)!==Ut;xt!==null;){var s=xt,x=s.child;if(s.tag===I&&i){var k=s.memoizedState!==null,U=k||qd;if(U){cv(e,t,n);continue}else{var F=s.alternate,q=F!==null&&F.memoizedState!==null,K=q||Mi,de=qd,ue=Mi;qd=U,Mi=K,Mi&&!ue&&(xt=s,ET(s));for(var ye=x;ye!==null;)xt=ye,Jw(ye,t,n),ye=ye.sibling;xt=s,qd=de,Mi=ue,cv(e,t,n);continue}}(s.subtreeFlags&Cl)!==Ot&&x!==null?(x.return=s,xt=x):cv(e,t,n)}}function cv(e,t,n){for(;xt!==null;){var i=xt;if((i.flags&Cl)!==Ot){var s=i.alternate;En(i);try{mT(t,s,i,n)}catch(k){Bn(i,i.return,k)}qn()}if(i===e){xt=null;return}var x=i.sibling;if(x!==null){x.return=i.return,xt=x;return}xt=i.return}}function CT(e){for(;xt!==null;){var t=xt,n=t.child;switch(t.tag){case o:case v:case E:case A:{if(t.mode&Dn)try{gs(),es(fi,t,t.return)}finally{vs(t)}else es(fi,t,t.return);break}case g:{tl(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&av(t,t.return,i);break}case S:{tl(t,t.return);break}case I:{var s=t.memoizedState!==null;if(s){Zw(e);continue}break}}n!==null?(n.return=t,xt=n):Zw(e)}}function Zw(e){for(;xt!==null;){var t=xt;if(t===e){xt=null;return}var n=t.sibling;if(n!==null){n.return=t.return,xt=n;return}xt=t.return}}function ET(e){for(;xt!==null;){var t=xt,n=t.child;if(t.tag===I){var i=t.memoizedState!==null;if(i){Qw(e);continue}}n!==null?(n.return=t,xt=n):Qw(e)}}function Qw(e){for(;xt!==null;){var t=xt;En(t);try{pT(t)}catch(i){Bn(t,t.return,i)}if(qn(),t===e){xt=null;return}var n=t.sibling;if(n!==null){n.return=t.return,xt=n;return}xt=t.return}}function DT(e,t,n,i){xt=t,jT(t,e,n,i)}function jT(e,t,n,i){for(;xt!==null;){var s=xt,x=s.child;(s.subtreeFlags&wo)!==Ot&&x!==null?(x.return=s,xt=x):kT(e,t,n,i)}}function kT(e,t,n,i){for(;xt!==null;){var s=xt;if((s.flags&Zs)!==Ot){En(s);try{RT(t,s,n,i)}catch(k){Bn(s,s.return,k)}qn()}if(s===e){xt=null;return}var x=s.sibling;if(x!==null){x.return=s.return,xt=x;return}xt=s.return}}function RT(e,t,n,i){switch(t.tag){case o:case v:case A:{if(t.mode&Dn){jp();try{va(Li|hi,t)}finally{Dp(t)}}else va(Li|hi,t);break}}}function TT(e){xt=e,LT()}function LT(){for(;xt!==null;){var e=xt,t=e.child;if((xt.flags&ka)!==Ot){var n=e.deletions;if(n!==null){for(var i=0;i<n.length;i++){var s=n[i];xt=s,UT(s,e)}{var x=e.alternate;if(x!==null){var k=x.child;if(k!==null){x.child=null;do{var U=k.sibling;k.sibling=null,k=U}while(k!==null)}}}xt=e}}(e.subtreeFlags&wo)!==Ot&&t!==null?(t.return=e,xt=t):AT()}}function AT(){for(;xt!==null;){var e=xt;(e.flags&Zs)!==Ot&&(En(e),MT(e),qn());var t=e.sibling;if(t!==null){t.return=e.return,xt=t;return}xt=e.return}}function MT(e){switch(e.tag){case o:case v:case A:{e.mode&Dn?(jp(),es(Li|hi,e,e.return),Dp(e)):es(Li|hi,e,e.return);break}}}function UT(e,t){for(;xt!==null;){var n=xt;En(n),PT(n,t),qn();var i=n.child;i!==null?(i.return=n,xt=i):OT(e)}}function OT(e){for(;xt!==null;){var t=xt,n=t.sibling,i=t.return;if(Ww(t),t===e){xt=null;return}if(n!==null){n.return=i,xt=n;return}xt=i}}function PT(e,t){switch(e.tag){case o:case v:case A:{e.mode&Dn?(jp(),es(Li,e,t),Dp(e)):es(Li,e,t);break}}}function BT(e){switch(e.tag){case o:case v:case A:{try{va(fi|hi,e)}catch(n){Bn(e,e.return,n)}break}case g:{var t=e.stateNode;try{t.componentDidMount()}catch(n){Bn(e,e.return,n)}break}}}function IT(e){switch(e.tag){case o:case v:case A:{try{va(Li|hi,e)}catch(t){Bn(e,e.return,t)}break}}}function VT(e){switch(e.tag){case o:case v:case A:{try{es(fi|hi,e,e.return)}catch(n){Bn(e,e.return,n)}break}case g:{var t=e.stateNode;typeof t.componentWillUnmount=="function"&&av(e,e.return,t);break}}}function FT(e){switch(e.tag){case o:case v:case A:try{es(Li|hi,e,e.return)}catch(t){Bn(e,e.return,t)}}}if(typeof Symbol=="function"&&Symbol.for){var Tc=Symbol.for;Tc("selector.component"),Tc("selector.has_pseudo_class"),Tc("selector.role"),Tc("selector.test_id"),Tc("selector.text")}var HT=[];function zT(){HT.forEach(function(e){return e()})}var $T=d.ReactCurrentActQueue;function WT(e){{var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,n=typeof jest<"u";return n&&t!==!1}}function e0(){{var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return!e&&$T.current!==null&&b("The current testing environment is not configured to support act(...)"),e}}var GT=Math.ceil,uv=d.ReactCurrentDispatcher,dv=d.ReactCurrentOwner,Oi=d.ReactCurrentBatchConfig,is=d.ReactCurrentActQueue,vi=0,t0=1,Pi=2,Ir=4,$s=0,Lc=1,Za=2,Xd=3,Ac=4,n0=5,hv=6,un=vi,nr=null,Kn=null,gi=ze,bs=ze,fv=oa(ze),_i=$s,Mc=null,Jd=ze,Uc=ze,Zd=ze,Oc=null,pr=null,mv=0,i0=500,r0=1/0,YT=500,Ws=null;function Pc(){r0=Si()+YT}function s0(){return r0}var Qd=!1,pv=null,nl=null,Qa=!1,_a=null,Bc=ze,vv=[],gv=null,qT=50,Ic=0,_v=null,bv=!1,eh=!1,KT=50,il=0,th=null,Vc=Fn,nh=ze,a0=!1;function ih(){return nr}function ir(){return(un&(Pi|Ir))!==vi?Si():(Vc!==Fn||(Vc=Si()),Vc)}function ba(e){var t=e.mode;if((t&cn)===Ut)return Ft;if((un&Pi)!==vi&&gi!==ze)return Ll(gi);var n=$k()!==zk;if(n){if(Oi.transition!==null){var i=Oi.transition;i._updatedFibers||(i._updatedFibers=new Set),i._updatedFibers.add(e)}return nh===Ci&&(nh=F_()),nh}var s=Gr();if(s!==Ci)return s;var x=jj();return x}function XT(e){var t=e.mode;return(t&cn)===Ut?Ft:ZC()}function bi(e,t,n,i){y5(),a0&&b("useInsertionEffect must not schedule updates."),bv&&(eh=!0),Al(e,n,i),(un&Pi)!==ze&&e===nr?S5(t):(Wr&&$_(e,t,n),N5(t),e===nr&&((un&Pi)===vi&&(Uc=Jt(Uc,n)),_i===Ac&&ya(e,gi)),vr(e,i),n===Ft&&un===vi&&(t.mode&cn)===Ut&&!is.isBatchingLegacy&&(Pc(),ay()))}function JT(e,t,n){var i=e.current;i.lanes=t,Al(e,t,n),vr(e,n)}function ZT(e){return(un&Pi)!==vi}function vr(e,t){var n=e.callbackNode;GC(e,t);var i=Nu(e,e===nr?gi:ze);if(i===ze){n!==null&&x0(n),e.callbackNode=null,e.callbackPriority=Ci;return}var s=Pa(i),x=e.callbackPriority;if(x===s&&!(is.current!==null&&n!==Ev)){n==null&&x!==Ft&&b("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}n!=null&&x0(n);var k;if(s===Ft)e.tag===la?(is.isBatchingLegacy!==null&&(is.didScheduleLegacyUpdate=!0),Ek(c0.bind(null,e))):sy(c0.bind(null,e)),is.current!==null?is.current.push(ca):Rj(function(){(un&(Pi|Ir))===vi&&ca()}),k=null;else{var U;switch(Y_(i)){case wr:U=yu;break;case Us:U=pf;break;case Os:U=Ma;break;case Du:U=vf;break;default:U=Ma;break}k=Dv(U,o0.bind(null,e))}e.callbackPriority=s,e.callbackNode=k}function o0(e,t){if(vR(),Vc=Fn,nh=ze,(un&(Pi|Ir))!==vi)throw new Error("Should not already be working.");var n=e.callbackNode,i=Ys();if(i&&e.callbackNode!==n)return null;var s=Nu(e,e===nr?gi:ze);if(s===ze)return null;var x=!Cu(e,s)&&!JC(e,s)&&!t,k=x?l5(e,s):sh(e,s);if(k!==$s){if(k===Za){var U=Bf(e);U!==ze&&(s=U,k=yv(e,U))}if(k===Lc){var F=Mc;throw eo(e,ze),ya(e,s),vr(e,Si()),F}if(k===hv)ya(e,s);else{var q=!Cu(e,s),K=e.current.alternate;if(q&&!e5(K)){if(k=sh(e,s),k===Za){var de=Bf(e);de!==ze&&(s=de,k=yv(e,de))}if(k===Lc){var ue=Mc;throw eo(e,ze),ya(e,s),vr(e,Si()),ue}}e.finishedWork=K,e.finishedLanes=s,QT(e,k,s)}}return vr(e,Si()),e.callbackNode===n?o0.bind(null,e):null}function yv(e,t){var n=Oc;if(ju(e)){var i=eo(e,t);i.flags|=Ts,bk(e.containerInfo)}var s=sh(e,t);if(s!==Za){var x=pr;pr=n,x!==null&&l0(x)}return s}function l0(e){pr===null?pr=e:pr.push.apply(pr,e)}function QT(e,t,n){switch(t){case $s:case Lc:throw new Error("Root did not complete. This is a bug in React.");case Za:{to(e,pr,Ws);break}case Xd:{if(ya(e,n),I_(n)&&!S0()){var i=mv+i0-Si();if(i>10){var s=Nu(e,ze);if(s!==ze)break;var x=e.suspendedLanes;if(!Do(x,n)){ir(),z_(e,x);break}e.timeoutHandle=gm(to.bind(null,e,pr,Ws),i);break}}to(e,pr,Ws);break}case Ac:{if(ya(e,n),XC(n))break;if(!S0()){var k=$C(e,n),U=k,F=Si()-U,q=b5(F)-F;if(q>10){e.timeoutHandle=gm(to.bind(null,e,pr,Ws),q);break}}to(e,pr,Ws);break}case n0:{to(e,pr,Ws);break}default:throw new Error("Unknown root exit status.")}}function e5(e){for(var t=e;;){if(t.flags&lf){var n=t.updateQueue;if(n!==null){var i=n.stores;if(i!==null)for(var s=0;s<i.length;s++){var x=i[s],k=x.getSnapshot,U=x.value;try{if(!Sr(k(),U))return!1}catch{return!1}}}}var F=t.child;if(t.subtreeFlags&lf&&F!==null){F.return=t,t=F;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 ya(e,t){t=Eu(t,Zd),t=Eu(t,Uc),eE(e,t)}function c0(e){if(gR(),(un&(Pi|Ir))!==vi)throw new Error("Should not already be working.");Ys();var t=Nu(e,ze);if(!yr(t,Ft))return vr(e,Si()),null;var n=sh(e,t);if(e.tag!==la&&n===Za){var i=Bf(e);i!==ze&&(t=i,n=yv(e,i))}if(n===Lc){var s=Mc;throw eo(e,ze),ya(e,t),vr(e,Si()),s}if(n===hv)throw new Error("Root did not complete. This is a bug in React.");var x=e.current.alternate;return e.finishedWork=x,e.finishedLanes=t,to(e,pr,Ws),vr(e,Si()),null}function t5(e,t){t!==ze&&(Hf(e,Jt(t,Ft)),vr(e,Si()),(un&(Pi|Ir))===vi&&(Pc(),ca()))}function wv(e,t){var n=un;un|=t0;try{return e(t)}finally{un=n,un===vi&&!is.isBatchingLegacy&&(Pc(),ay())}}function n5(e,t,n,i,s){var x=Gr(),k=Oi.transition;try{return Oi.transition=null,Ei(wr),e(t,n,i,s)}finally{Ei(x),Oi.transition=k,un===vi&&Pc()}}function Gs(e){_a!==null&&_a.tag===la&&(un&(Pi|Ir))===vi&&Ys();var t=un;un|=t0;var n=Oi.transition,i=Gr();try{return Oi.transition=null,Ei(wr),e?e():void 0}finally{Ei(i),Oi.transition=n,un=t,(un&(Pi|Ir))===vi&&ca()}}function u0(){return(un&(Pi|Ir))!==vi}function rh(e,t){$i(fv,bs,e),bs=Jt(bs,t)}function xv(e){bs=fv.current,zi(fv,e)}function eo(e,t){e.finishedWork=null,e.finishedLanes=ze;var n=e.timeoutHandle;if(n!==_m&&(e.timeoutHandle=_m,kj(n)),Kn!==null)for(var i=Kn.return;i!==null;){var s=i.alternate;Iw(s,i),i=i.return}nr=e;var x=no(e.current,null);return Kn=x,gi=bs=t,_i=$s,Mc=null,Jd=ze,Uc=ze,Zd=ze,Oc=null,pr=null,Jk(),Kr.discardPendingWarnings(),x}function d0(e,t){do{var n=Kn;try{if(md(),Uy(),qn(),dv.current=null,n===null||n.return===null){_i=Lc,Mc=t,Kn=null;return}if(be&&n.mode&Dn&&zd(n,!0),_e)if(So(),t!==null&&typeof t=="object"&&typeof t.then=="function"){var i=t;LC(n,i,gi)}else TC(n,t,gi);ER(e,n.return,n,t,gi),p0(n)}catch(s){t=s,Kn===n&&n!==null?(n=n.return,Kn=n):n=Kn;continue}return}while(!0)}function h0(){var e=uv.current;return uv.current=Bd,e===null?Bd:e}function f0(e){uv.current=e}function i5(){mv=Si()}function Fc(e){Jd=Jt(e,Jd)}function r5(){_i===$s&&(_i=Xd)}function Sv(){(_i===$s||_i===Xd||_i===Za)&&(_i=Ac),nr!==null&&(If(Jd)||If(Uc))&&ya(nr,gi)}function s5(e){_i!==Ac&&(_i=Za),Oc===null?Oc=[e]:Oc.push(e)}function a5(){return _i===$s}function sh(e,t){var n=un;un|=Pi;var i=h0();if(nr!==e||gi!==t){if(Wr){var s=e.memoizedUpdaters;s.size>0&&(Hc(e,gi),s.clear()),W_(e,t)}Ws=G_(),eo(e,t)}M_(t);do try{o5();break}catch(x){d0(e,x)}while(!0);if(md(),un=n,f0(i),Kn!==null)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return U_(),nr=null,gi=ze,_i}function o5(){for(;Kn!==null;)m0(Kn)}function l5(e,t){var n=un;un|=Pi;var i=h0();if(nr!==e||gi!==t){if(Wr){var s=e.memoizedUpdaters;s.size>0&&(Hc(e,gi),s.clear()),W_(e,t)}Ws=G_(),Pc(),eo(e,t)}M_(t);do try{c5();break}catch(x){d0(e,x)}while(!0);return md(),f0(i),un=n,Kn!==null?(PC(),$s):(U_(),nr=null,gi=ze,_i)}function c5(){for(;Kn!==null&&!dC();)m0(Kn)}function m0(e){var t=e.alternate;En(e);var n;(e.mode&Dn)!==Ut?(Ep(e),n=Nv(t,e,bs),zd(e,!0)):n=Nv(t,e,bs),qn(),e.memoizedProps=e.pendingProps,n===null?p0(e):Kn=n,dv.current=null}function p0(e){var t=e;do{var n=t.alternate,i=t.return;if((t.flags&bu)===Ot){En(t);var s=void 0;if((t.mode&Dn)===Ut?s=Bw(n,t,bs):(Ep(t),s=Bw(n,t,bs),zd(t,!1)),qn(),s!==null){Kn=s;return}}else{var x=rT(n,t);if(x!==null){x.flags&=sC,Kn=x;return}if((t.mode&Dn)!==Ut){zd(t,!1);for(var k=t.actualDuration,U=t.child;U!==null;)k+=U.actualDuration,U=U.sibling;t.actualDuration=k}if(i!==null)i.flags|=bu,i.subtreeFlags=Ot,i.deletions=null;else{_i=hv,Kn=null;return}}var F=t.sibling;if(F!==null){Kn=F;return}t=i,Kn=t}while(t!==null);_i===$s&&(_i=n0)}function to(e,t,n){var i=Gr(),s=Oi.transition;try{Oi.transition=null,Ei(wr),u5(e,t,n,i)}finally{Oi.transition=s,Ei(i)}return null}function u5(e,t,n,i){do Ys();while(_a!==null);if(w5(),(un&(Pi|Ir))!==vi)throw new Error("Should not already be working.");var s=e.finishedWork,x=e.finishedLanes;if(NC(x),s===null)return T_(),null;if(x===ze&&b("root.finishedLanes should not be empty during a commit. This is a bug in React."),e.finishedWork=null,e.finishedLanes=ze,s===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=Ci;var k=Jt(s.lanes,s.childLanes);tE(e,k),e===nr&&(nr=null,Kn=null,gi=ze),((s.subtreeFlags&wo)!==Ot||(s.flags&wo)!==Ot)&&(Qa||(Qa=!0,gv=n,Dv(Ma,function(){return Ys(),null})));var U=(s.subtreeFlags&(ff|mf|Cl|wo))!==Ot,F=(s.flags&(ff|mf|Cl|wo))!==Ot;if(U||F){var q=Oi.transition;Oi.transition=null;var K=Gr();Ei(wr);var de=un;un|=Ir,dv.current=null,cT(e,s),aw(),ST(e,s,x),xj(e.containerInfo),e.current=s,AC(x),NT(s,e,x),MC(),hC(),un=de,Ei(K),Oi.transition=q}else e.current=s,aw();var ue=Qa;if(Qa?(Qa=!1,_a=e,Bc=x):(il=0,th=null),k=e.pendingLanes,k===ze&&(nl=null),ue||b0(e.current,!1),bC(s.stateNode,i),Wr&&e.memoizedUpdaters.clear(),zT(),vr(e,Si()),t!==null)for(var ye=e.onRecoverableError,Ce=0;Ce<t.length;Ce++){var Ae=t[Ce],lt=Ae.stack,Lt=Ae.digest;ye(Ae.value,{componentStack:lt,digest:Lt})}if(Qd){Qd=!1;var Dt=pv;throw pv=null,Dt}return yr(Bc,Ft)&&e.tag!==la&&Ys(),k=e.pendingLanes,yr(k,Ft)?(pR(),e===_v?Ic++:(Ic=0,_v=e)):Ic=0,ca(),T_(),null}function Ys(){if(_a!==null){var e=Y_(Bc),t=sE(Os,e),n=Oi.transition,i=Gr();try{return Oi.transition=null,Ei(t),h5()}finally{Ei(i),Oi.transition=n}}return!1}function d5(e){vv.push(e),Qa||(Qa=!0,Dv(Ma,function(){return Ys(),null}))}function h5(){if(_a===null)return!1;var e=gv;gv=null;var t=_a,n=Bc;if(_a=null,Bc=ze,(un&(Pi|Ir))!==vi)throw new Error("Cannot flush passive effects while already rendering.");bv=!0,eh=!1,UC(n);var i=un;un|=Ir,TT(t.current),DT(t,t.current,n,e);{var s=vv;vv=[];for(var x=0;x<s.length;x++){var k=s[x];fT(t,k)}}OC(),b0(t.current,!0),un=i,ca(),eh?t===th?il++:(il=0,th=t):il=0,bv=!1,eh=!1,yC(t);{var U=t.current.stateNode;U.effectDuration=0,U.passiveEffectDuration=0}return!0}function v0(e){return nl!==null&&nl.has(e)}function f5(e){nl===null?nl=new Set([e]):nl.add(e)}function m5(e){Qd||(Qd=!0,pv=e)}var p5=m5;function g0(e,t,n){var i=Xa(n,t),s=mw(e,i,Ft),x=da(e,s,Ft),k=ir();x!==null&&(Al(x,Ft,k),vr(x,k))}function Bn(e,t,n){if(aT(n),zc(!1),e.tag===u){g0(e,e,n);return}var i=null;for(i=t;i!==null;){if(i.tag===u){g0(i,e,n);return}else if(i.tag===g){var s=i.type,x=i.stateNode;if(typeof s.getDerivedStateFromError=="function"||typeof x.componentDidCatch=="function"&&!v0(x)){var k=Xa(n,e),U=$p(i,k,Ft),F=da(i,U,Ft),q=ir();F!==null&&(Al(F,Ft,q),vr(F,q));return}}i=i.return}b(`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`,n)}function v5(e,t,n){var i=e.pingCache;i!==null&&i.delete(t);var s=ir();z_(e,n),C5(e),nr===e&&Do(gi,n)&&(_i===Ac||_i===Xd&&I_(gi)&&Si()-mv<i0?eo(e,ze):Zd=Jt(Zd,n)),vr(e,s)}function _0(e,t){t===Ci&&(t=XT(e));var n=ir(),i=fr(e,t);i!==null&&(Al(i,t,n),vr(i,n))}function g5(e){var t=e.memoizedState,n=Ci;t!==null&&(n=t.retryLane),_0(e,n)}function _5(e,t){var n=Ci,i;switch(e.tag){case T:i=e.stateNode;var s=e.memoizedState;s!==null&&(n=s.retryLane);break;case $: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),_0(e,n)}function b5(e){return e<120?120:e<480?480:e<1080?1080:e<1920?1920:e<3e3?3e3:e<4320?4320:GT(e/1960)*1960}function y5(){if(Ic>qT)throw Ic=0,_v=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.");il>KT&&(il=0,th=null,b("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 w5(){Kr.flushLegacyContextWarning(),Kr.flushPendingUnsafeLifecycleWarnings()}function b0(e,t){En(e),ah(e,Qs,VT),t&&ah(e,hf,FT),ah(e,Qs,BT),t&&ah(e,hf,IT),qn()}function ah(e,t,n){for(var i=e,s=null;i!==null;){var x=i.subtreeFlags&t;i!==s&&i.child!==null&&x!==Ot?i=i.child:((i.flags&t)!==Ot&&n(i),i.sibling!==null?i=i.sibling:i=s=i.return)}}var oh=null;function y0(e){{if((un&Pi)!==vi||!(e.mode&cn))return;var t=e.tag;if(t!==y&&t!==u&&t!==g&&t!==o&&t!==v&&t!==E&&t!==A)return;var n=At(e)||"ReactComponent";if(oh!==null){if(oh.has(n))return;oh.add(n)}else oh=new Set([n]);var i=Vn;try{En(e),b("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?En(e):qn()}}}var Nv;{var x5=null;Nv=function(e,t,n){var i=j0(x5,t);try{return Aw(e,t,n)}catch(x){if(Mk()||x!==null&&typeof x=="object"&&typeof x.then=="function")throw x;if(md(),Uy(),Iw(e,t),j0(t,i),t.mode&Dn&&Ep(t),af(null,Aw,null,e,t,n),nC()){var s=of();typeof s=="object"&&s!==null&&s._suppressLogging&&typeof x=="object"&&x!==null&&!x._suppressLogging&&(x._suppressLogging=!0)}throw x}}}var w0=!1,Cv;Cv=new Set;function S5(e){if(cr&&!hR())switch(e.tag){case o:case v:case A:{var t=Kn&&At(Kn)||"Unknown",n=t;if(!Cv.has(n)){Cv.add(n);var i=At(e)||"Unknown";b("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 g:{w0||(b("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),w0=!0);break}}}function Hc(e,t){if(Wr){var n=e.memoizedUpdaters;n.forEach(function(i){$_(e,i,t)})}}var Ev={};function Dv(e,t){{var n=is.current;return n!==null?(n.push(t),Ev):R_(e,t)}}function x0(e){if(e!==Ev)return uC(e)}function S0(){return is.current!==null}function N5(e){{if(e.mode&cn){if(!e0())return}else if(!WT()||un!==vi||e.tag!==o&&e.tag!==v&&e.tag!==A)return;if(is.current===null){var t=Vn;try{En(e),b(`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`,At(e))}finally{t?En(e):qn()}}}}function C5(e){e.tag!==la&&e0()&&is.current===null&&b(`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 zc(e){a0=e}var Vr=null,rl=null,E5=function(e){Vr=e};function sl(e){{if(Vr===null)return e;var t=Vr(e);return t===void 0?e:t.current}}function jv(e){return sl(e)}function kv(e){{if(Vr===null)return e;var t=Vr(e);if(t===void 0){if(e!=null&&typeof e.render=="function"){var n=sl(e.render);if(e.render!==n){var i={$$typeof:yt,render:n};return e.displayName!==void 0&&(i.displayName=e.displayName),i}}return e}return t.current}}function N0(e,t){{if(Vr===null)return!1;var n=e.elementType,i=t.type,s=!1,x=typeof i=="object"&&i!==null?i.$$typeof:null;switch(e.tag){case g:{typeof i=="function"&&(s=!0);break}case o:{(typeof i=="function"||x===bt)&&(s=!0);break}case v:{(x===yt||x===bt)&&(s=!0);break}case E:case A:{(x===Rt||x===bt)&&(s=!0);break}default:return!1}if(s){var k=Vr(n);if(k!==void 0&&k===Vr(i))return!0}return!1}}function C0(e){{if(Vr===null||typeof WeakSet!="function")return;rl===null&&(rl=new WeakSet),rl.add(e)}}var D5=function(e,t){{if(Vr===null)return;var n=t.staleFamilies,i=t.updatedFamilies;Ys(),Gs(function(){Rv(e.current,i,n)})}},j5=function(e,t){{if(e.context!==Nr)return;Ys(),Gs(function(){$c(t,e,null,null)})}};function Rv(e,t,n){{var i=e.alternate,s=e.child,x=e.sibling,k=e.tag,U=e.type,F=null;switch(k){case o:case A:case g:F=U;break;case v:F=U.render;break}if(Vr===null)throw new Error("Expected resolveFamily to be set during hot reload.");var q=!1,K=!1;if(F!==null){var de=Vr(F);de!==void 0&&(n.has(de)?K=!0:t.has(de)&&(k===g?K=!0:q=!0))}if(rl!==null&&(rl.has(e)||i!==null&&rl.has(i))&&(K=!0),K&&(e._debugNeedsRemount=!0),K||q){var ue=fr(e,Ft);ue!==null&&bi(ue,e,Ft,Fn)}s!==null&&!K&&Rv(s,t,n),x!==null&&Rv(x,t,n)}}var k5=function(e,t){{var n=new Set,i=new Set(t.map(function(s){return s.current}));return Tv(e.current,i,n),n}};function Tv(e,t,n){{var i=e.child,s=e.sibling,x=e.tag,k=e.type,U=null;switch(x){case o:case A:case g:U=k;break;case v:U=k.render;break}var F=!1;U!==null&&t.has(U)&&(F=!0),F?R5(e,n):i!==null&&Tv(i,t,n),s!==null&&Tv(s,t,n)}}function R5(e,t){{var n=T5(e,t);if(n)return;for(var i=e;;){switch(i.tag){case S:t.add(i.stateNode);return;case p:t.add(i.stateNode.containerInfo);return;case u:t.add(i.stateNode.containerInfo);return}if(i.return===null)throw new Error("Expected to reach root first.");i=i.return}}}function T5(e,t){for(var n=e,i=!1;;){if(n.tag===S)i=!0,t.add(n.stateNode);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)return i;for(;n.sibling===null;){if(n.return===null||n.return===e)return i;n=n.return}n.sibling.return=n.return,n=n.sibling}return!1}var Lv;{Lv=!1;try{var E0=Object.preventExtensions({})}catch{Lv=!0}}function L5(e,t,n,i){this.tag=e,this.key=n,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=Ot,this.subtreeFlags=Ot,this.deletions=null,this.lanes=ze,this.childLanes=ze,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,!Lv&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var Cr=function(e,t,n,i){return new L5(e,t,n,i)};function Av(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function A5(e){return typeof e=="function"&&!Av(e)&&e.defaultProps===void 0}function M5(e){if(typeof e=="function")return Av(e)?g:o;if(e!=null){var t=e.$$typeof;if(t===yt)return v;if(t===Rt)return E}return y}function no(e,t){var n=e.alternate;n===null?(n=Cr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n._debugSource=e._debugSource,n._debugOwner=e._debugOwner,n._debugHookTypes=e._debugHookTypes,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=Ot,n.subtreeFlags=Ot,n.deletions=null,n.actualDuration=0,n.actualStartTime=-1),n.flags=e.flags&As,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue;var i=e.dependencies;switch(n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.selfBaseDuration=e.selfBaseDuration,n.treeBaseDuration=e.treeBaseDuration,n._debugNeedsRemount=e._debugNeedsRemount,n.tag){case y:case o:case A:n.type=sl(e.type);break;case g:n.type=jv(e.type);break;case v:n.type=kv(e.type);break}return n}function U5(e,t){e.flags&=As|ci;var n=e.alternate;if(n===null)e.childLanes=ze,e.lanes=t,e.child=null,e.subtreeFlags=Ot,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0;else{e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=Ot,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type;var i=n.dependencies;e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},e.selfBaseDuration=n.selfBaseDuration,e.treeBaseDuration=n.treeBaseDuration}return e}function O5(e,t,n){var i;return e===rd?(i=cn,t===!0&&(i|=Jn,i|=cs)):i=Ut,Wr&&(i|=Dn),Cr(u,null,null,i)}function Mv(e,t,n,i,s,x){var k=y,U=e;if(typeof e=="function")Av(e)?(k=g,U=jv(U)):U=sl(U);else if(typeof e=="string")k=S;else e:switch(e){case Rn:return wa(n.children,s,x,t);case ri:k=l,s|=Jn,(s&cn)!==Ut&&(s|=cs);break;case re:return P5(n,s,x,t);case wt:return B5(n,s,x,t);case gt:return I5(n,s,x,t);case Wt:return D0(n,s,x,t);case pn:case wn:case vn:case Yn:case on:default:{if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ie:k=f;break e;case Ze:k=m;break e;case yt:k=v,U=kv(U);break e;case Rt:k=E;break e;case bt:k=D,U=null;break e}var F="";{(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(F+=" 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 q=i?At(i):null;q&&(F+=`
197
+
198
+ Check the render method of \``+q+"`.")}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)+"."+F))}}var K=Cr(k,n,t,s);return K.elementType=e,K.type=U,K.lanes=x,K._debugOwner=i,K}function Uv(e,t,n){var i=null;i=e._owner;var s=e.type,x=e.key,k=e.props,U=Mv(s,x,k,i,t,n);return U._debugSource=e._source,U._debugOwner=e._owner,U}function wa(e,t,n,i){var s=Cr(_,e,i,t);return s.lanes=n,s}function P5(e,t,n,i){typeof e.id!="string"&&b('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id);var s=Cr(C,e,i,t|Dn);return s.elementType=re,s.lanes=n,s.stateNode={effectDuration:0,passiveEffectDuration:0},s}function B5(e,t,n,i){var s=Cr(T,e,i,t);return s.elementType=wt,s.lanes=n,s}function I5(e,t,n,i){var s=Cr($,e,i,t);return s.elementType=gt,s.lanes=n,s}function D0(e,t,n,i){var s=Cr(I,e,i,t);s.elementType=Wt,s.lanes=n;var x={isHidden:!1};return s.stateNode=x,s}function Ov(e,t,n){var i=Cr(N,e,null,t);return i.lanes=n,i}function V5(){var e=Cr(S,null,null,Ut);return e.elementType="DELETED",e}function F5(e){var t=Cr(M,null,null,Ut);return t.stateNode=e,t}function Pv(e,t,n){var i=e.children!==null?e.children:[],s=Cr(p,i,e.key,t);return s.lanes=n,s.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},s}function j0(e,t){return e===null&&(e=Cr(y,null,null,Ut)),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 H5(e,t,n,i,s){this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=_m,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=Ci,this.eventTimes=Ff(ze),this.expirationTimes=Ff(Fn),this.pendingLanes=ze,this.suspendedLanes=ze,this.pingedLanes=ze,this.expiredLanes=ze,this.mutableReadLanes=ze,this.finishedLanes=ze,this.entangledLanes=ze,this.entanglements=Ff(ze),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var x=this.pendingUpdatersLaneMap=[],k=0;k<_f;k++)x.push(new Set)}switch(t){case rd:this._debugRootType=n?"hydrateRoot()":"createRoot()";break;case la:this._debugRootType=n?"hydrate()":"render()";break}}function k0(e,t,n,i,s,x,k,U,F,q){var K=new H5(e,t,n,U,F),de=O5(t,x);K.current=de,de.stateNode=K;{var ue={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null};de.memoizedState=ue}return Xm(de),K}var Bv="18.3.1";function z5(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return Ye(i),{$$typeof:Ln,key:i==null?null:""+i,children:e,containerInfo:t,implementation:n}}var Iv,Vv;Iv=!1,Vv={};function R0(e){if(!e)return Nr;var t=_o(e),n=Ck(t);if(t.tag===g){var i=t.type;if(hs(i))return iy(t,i,n)}return n}function $5(e,t){{var n=_o(e);if(n===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 s=D_(n);if(s===null)return null;if(s.mode&Jn){var x=At(n)||"Component";if(!Vv[x]){Vv[x]=!0;var k=Vn;try{En(s),n.mode&Jn?b("%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,x):b("%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,x)}finally{k?En(k):qn()}}}return s.stateNode}}function T0(e,t,n,i,s,x,k,U){var F=!1,q=null;return k0(e,t,F,q,n,i,s,x,k)}function L0(e,t,n,i,s,x,k,U,F,q){var K=!0,de=k0(n,i,K,e,s,x,k,U,F);de.context=R0(null);var ue=de.current,ye=ir(),Ce=ba(ue),Ae=Hs(ye,Ce);return Ae.callback=t??null,da(ue,Ae,Ce),JT(de,Ce,ye),de}function $c(e,t,n,i){_C(t,e);var s=t.current,x=ir(),k=ba(s);BC(k);var U=R0(n);t.context===null?t.context=U:t.pendingContext=U,cr&&Vn!==null&&!Iv&&(Iv=!0,b(`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.`,At(Vn)||"Unknown"));var F=Hs(x,k);F.payload={element:e},i=i===void 0?null:i,i!==null&&(typeof i!="function"&&b("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",i),F.callback=i);var q=da(s,F,k);return q!==null&&(bi(q,s,k,x),bd(q,s,k)),k}function lh(e){var t=e.current;if(!t.child)return null;switch(t.child.tag){case S:return t.child.stateNode;default:return t.child.stateNode}}function W5(e){switch(e.tag){case u:{var t=e.stateNode;if(ju(t)){var n=YC(t);t5(t,n)}break}case T:{Gs(function(){var s=fr(e,Ft);if(s!==null){var x=ir();bi(s,e,Ft,x)}});var i=Ft;Fv(e,i);break}}}function A0(e,t){var n=e.memoizedState;n!==null&&n.dehydrated!==null&&(n.retryLane=QC(n.retryLane,t))}function Fv(e,t){A0(e,t);var n=e.alternate;n&&A0(n,t)}function G5(e){if(e.tag===T){var t=kl,n=fr(e,t);if(n!==null){var i=ir();bi(n,e,t,i)}Fv(e,t)}}function Y5(e){if(e.tag===T){var t=ba(e),n=fr(e,t);if(n!==null){var i=ir();bi(n,e,t,i)}Fv(e,t)}}function M0(e){var t=cC(e);return t===null?null:t.stateNode}var U0=function(e){return null};function q5(e){return U0(e)}var O0=function(e){return!1};function K5(e){return O0(e)}var P0=null,B0=null,I0=null,V0=null,F0=null,H0=null,z0=null,$0=null,W0=null;{var G0=function(e,t,n){var i=t[n],s=Qe(e)?e.slice():Vt({},e);return n+1===t.length?(Qe(s)?s.splice(i,1):delete s[i],s):(s[i]=G0(e[i],t,n+1),s)},Y0=function(e,t){return G0(e,t,0)},q0=function(e,t,n,i){var s=t[i],x=Qe(e)?e.slice():Vt({},e);if(i+1===t.length){var k=n[i];x[k]=x[s],Qe(x)?x.splice(s,1):delete x[s]}else x[s]=q0(e[s],t,n,i+1);return x},K0=function(e,t,n){if(t.length!==n.length){L("copyWithRename() expects paths of the same length");return}else for(var i=0;i<n.length-1;i++)if(t[i]!==n[i]){L("copyWithRename() expects paths to be the same except for the deepest key");return}return q0(e,t,n,0)},X0=function(e,t,n,i){if(n>=t.length)return i;var s=t[n],x=Qe(e)?e.slice():Vt({},e);return x[s]=X0(e[s],t,n+1,i),x},J0=function(e,t,n){return X0(e,t,0,n)},Hv=function(e,t){for(var n=e.memoizedState;n!==null&&t>0;)n=n.next,t--;return n};P0=function(e,t,n,i){var s=Hv(e,t);if(s!==null){var x=J0(s.memoizedState,n,i);s.memoizedState=x,s.baseState=x,e.memoizedProps=Vt({},e.memoizedProps);var k=fr(e,Ft);k!==null&&bi(k,e,Ft,Fn)}},B0=function(e,t,n){var i=Hv(e,t);if(i!==null){var s=Y0(i.memoizedState,n);i.memoizedState=s,i.baseState=s,e.memoizedProps=Vt({},e.memoizedProps);var x=fr(e,Ft);x!==null&&bi(x,e,Ft,Fn)}},I0=function(e,t,n,i){var s=Hv(e,t);if(s!==null){var x=K0(s.memoizedState,n,i);s.memoizedState=x,s.baseState=x,e.memoizedProps=Vt({},e.memoizedProps);var k=fr(e,Ft);k!==null&&bi(k,e,Ft,Fn)}},V0=function(e,t,n){e.pendingProps=J0(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var i=fr(e,Ft);i!==null&&bi(i,e,Ft,Fn)},F0=function(e,t){e.pendingProps=Y0(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var n=fr(e,Ft);n!==null&&bi(n,e,Ft,Fn)},H0=function(e,t,n){e.pendingProps=K0(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var i=fr(e,Ft);i!==null&&bi(i,e,Ft,Fn)},z0=function(e){var t=fr(e,Ft);t!==null&&bi(t,e,Ft,Fn)},$0=function(e){U0=e},W0=function(e){O0=e}}function X5(e){var t=D_(e);return t===null?null:t.stateNode}function J5(e){return null}function Z5(){return Vn}function Q5(e){var t=e.findFiberByHostInstance,n=d.ReactCurrentDispatcher;return gC({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:P0,overrideHookStateDeletePath:B0,overrideHookStateRenamePath:I0,overrideProps:V0,overridePropsDeletePath:F0,overridePropsRenamePath:H0,setErrorHandler:$0,setSuspenseHandler:W0,scheduleUpdate:z0,currentDispatcherRef:n,findHostInstanceByFiber:X5,findFiberByHostInstance:t||J5,findHostInstancesForRefresh:k5,scheduleRefresh:D5,scheduleRoot:j5,setRefreshHandler:E5,getCurrentFiber:Z5,reconcilerVersion:Bv})}var Z0=typeof reportError=="function"?reportError:function(e){console.error(e)};function zv(e){this._internalRoot=e}ch.prototype.render=zv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw new Error("Cannot update an unmounted root.");{typeof arguments[1]=="function"?b("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):uh(arguments[1])?b("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"&&b("You passed a second argument to root.render(...) but it only accepts one argument.");var n=t.containerInfo;if(n.nodeType!==li){var i=M0(t.current);i&&i.parentNode!==n&&b("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.")}}$c(e,t,null,null)},ch.prototype.unmount=zv.prototype.unmount=function(){typeof arguments[0]=="function"&&b("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;u0()&&b("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."),Gs(function(){$c(null,e,null,null)}),Zb(t)}};function eL(e,t){if(!uh(e))throw new Error("createRoot(...): Target container is not a DOM element.");Q0(e);var n=!1,i=!1,s="",x=Z0;t!=null&&(t.hydrate?L("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===Zt&&b(`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&&(n=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(x=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var k=T0(e,rd,null,n,i,s,x);Ju(k.current,e);var U=e.nodeType===li?e.parentNode:e;return Xl(U),new zv(k)}function ch(e){this._internalRoot=e}function tL(e){e&&vE(e)}ch.prototype.unstable_scheduleHydration=tL;function nL(e,t,n){if(!uh(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");Q0(e),t===void 0&&b("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var i=n??null,s=n!=null&&n.hydratedSources||null,x=!1,k=!1,U="",F=Z0;n!=null&&(n.unstable_strictMode===!0&&(x=!0),n.identifierPrefix!==void 0&&(U=n.identifierPrefix),n.onRecoverableError!==void 0&&(F=n.onRecoverableError));var q=L0(t,null,e,rd,i,x,k,U,F);if(Ju(q.current,e),Xl(e),s)for(var K=0;K<s.length;K++){var de=s[K];aR(q,de)}return new ch(q)}function uh(e){return!!(e&&(e.nodeType===dr||e.nodeType===Rs||e.nodeType===qh))}function Wc(e){return!!(e&&(e.nodeType===dr||e.nodeType===Rs||e.nodeType===qh||e.nodeType===li&&e.nodeValue===" react-mount-point-unstable "))}function Q0(e){e.nodeType===dr&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&b("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."),oc(e)&&(e._reactRootContainer?b("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):b("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 iL=d.ReactCurrentOwner,ex;ex=function(e){if(e._reactRootContainer&&e.nodeType!==li){var t=M0(e._reactRootContainer.current);t&&t.parentNode!==e&&b("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 n=!!e._reactRootContainer,i=$v(e),s=!!(i&&aa(i));s&&!n&&b("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===dr&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&b("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 $v(e){return e?e.nodeType===Rs?e.documentElement:e.firstChild:null}function tx(){}function rL(e,t,n,i,s){if(s){if(typeof i=="function"){var x=i;i=function(){var ue=lh(k);x.call(ue)}}var k=L0(t,i,e,la,null,!1,!1,"",tx);e._reactRootContainer=k,Ju(k.current,e);var U=e.nodeType===li?e.parentNode:e;return Xl(U),Gs(),k}else{for(var F;F=e.lastChild;)e.removeChild(F);if(typeof i=="function"){var q=i;i=function(){var ue=lh(K);q.call(ue)}}var K=T0(e,la,null,!1,!1,"",tx);e._reactRootContainer=K,Ju(K.current,e);var de=e.nodeType===li?e.parentNode:e;return Xl(de),Gs(function(){$c(t,K,n,i)}),K}}function sL(e,t){e!==null&&typeof e!="function"&&b("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function dh(e,t,n,i,s){ex(n),sL(s===void 0?null:s,"render");var x=n._reactRootContainer,k;if(!x)k=rL(n,t,e,s,i);else{if(k=x,typeof s=="function"){var U=s;s=function(){var F=lh(k);U.call(F)}}$c(t,k,e,s)}return lh(k)}var nx=!1;function aL(e){{nx||(nx=!0,b("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=iL.current;if(t!==null&&t.stateNode!==null){var n=t.stateNode._warnedAboutRefsInRender;n||b("%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.",sn(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===dr?e:$5(e,"findDOMNode")}function oL(e,t,n){if(b("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"),!Wc(t))throw new Error("Target container is not a DOM element.");{var i=oc(t)&&t._reactRootContainer===void 0;i&&b("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 dh(null,e,t,!0,n)}function lL(e,t,n){if(b("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"),!Wc(t))throw new Error("Target container is not a DOM element.");{var i=oc(t)&&t._reactRootContainer===void 0;i&&b("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 dh(null,e,t,!1,n)}function cL(e,t,n,i){if(b("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"),!Wc(n))throw new Error("Target container is not a DOM element.");if(e==null||!iC(e))throw new Error("parentComponent must be a valid React Component");return dh(e,t,n,!1,i)}var ix=!1;function uL(e){if(ix||(ix=!0,b("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")),!Wc(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=oc(e)&&e._reactRootContainer===void 0;t&&b("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 n=$v(e),i=n&&!aa(n);i&&b("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return Gs(function(){dh(null,null,e,!1,function(){e._reactRootContainer=null,Zb(e)})}),!0}else{{var s=$v(e),x=!!(s&&aa(s)),k=e.nodeType===dr&&Wc(e.parentNode)&&!!e.parentNode._reactRootContainer;x&&b("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",k?"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}}aE(W5),lE(G5),cE(Y5),uE(Gr),dE(iE),(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")&&b("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"),GN(hj),KN(wv,n5,Gs);function dL(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!uh(t))throw new Error("Target container is not a DOM element.");return z5(e,t,null,n)}function hL(e,t,n,i){return cL(e,t,n,i)}var Wv={usingClientEntryPoint:!1,Events:[aa,Oo,Zu,m_,p_,wv]};function fL(e,t){return Wv.usingClientEntryPoint||b('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),eL(e,t)}function mL(e,t,n){return Wv.usingClientEntryPoint||b('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),nL(e,t,n)}function pL(e){return u0()&&b("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."),Gs(e)}var vL=Q5({findFiberByHostInstance:Fa,bundleType:1,version:Bv,rendererPackageName:"react-dom"});if(!vL&&Be&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var rx=window.location.protocol;/^(https?|file):$/.test(rx)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(rx==="file:"?`
204
+ You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}Dr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wv,Dr.createPortal=dL,Dr.createRoot=fL,Dr.findDOMNode=aL,Dr.flushSync=pL,Dr.hydrate=oL,Dr.hydrateRoot=mL,Dr.render=lL,Dr.unmountComponentAtNode=uL,Dr.unstable_batchedUpdates=wv,Dr.unstable_renderSubtreeIntoContainer=hL,Dr.version=Bv,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})();RS.exports=Dr;var uu=RS.exports,AS,ox=uu;{var lx=ox.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;AS=function(c,a){lx.usingClientEntryPoint=!0;try{return ox.createRoot(c,a)}finally{lx.usingClientEntryPoint=!1}}}const MS={"common.save":"Save","common.cancel":"Cancel","common.confirm":"Confirm","common.ok":"OK","common.close":"Close","common.delete":"Delete","common.copy":"Copy","common.rename":"Rename","common.create":"Create","common.back":"Back","common.open":"Open","common.loading":"Loading…","common.done":"Done","token.title":"Access token required","token.placeholder":"Paste HANDMUX_TOKEN","settings.language":"Language","home.empty":"No files opened yet","home.emptyHint":'Switch to "New" to pick one',"home.remove":"Remove","drawer.empty":"No sessions bound yet","drawer.unbind":"Unbind","drawer.bind":"Bind session","drawer.logout":"Log out","windowbar.newWindow":"New window","rename.new_name":"New name","rename.name_placeholder":"Short name","rename.name_rule":"Letters, digits, hyphens only (≤16)","rename.failed":"Rename failed, please retry","rename.saving":"Saving…","newwindow.title":"New window","newwindow.window_name":"Window name (optional)","newwindow.name_placeholder":"Leave blank to auto-name","newwindow.name_rule":"Letters, digits, hyphens only (≤16)","newwindow.start_dir":"Start directory","newwindow.session_dir_named":"{dir} (session dir)","newwindow.session_dir_default":"Session dir (default)","newwindow.choose":"Choose","newwindow.reset_to_session_dir":"Reset to session dir","newwindow.creating":"Creating…","startup.label":"Startup command (optional)","startup.aria":"Startup command","startup.preset_shell":"Plain shell (default)","startup.preset_claude":"claude (launch Claude Code)","startup.preset_claude_continue":"claude -c (resume last session)","startup.preset_codex":"codex (launch Codex CLI)","startup.custom":"Custom…","startup.custom_placeholder":'e.g. claude "fix login bug"',"bind.title":"Bind session","bind.sessionName":"Session name","bind.namePlaceholder":"New session name","bind.pickSession":"Choose a session to bind","bind.newSession":"+ New session","bind.alreadyExists":"Session already exists","bind.bind":"Bind","bind.checking":"Checking…","bind.createAndOpen":"Create & open","bind.creating":"Creating…","bind.createHint":`Session "{name}" doesn't exist — tap "Create & open" to create it`,"bind.alreadyBound":"Session already bound","bind.createFailed":"Create failed, please retry","bind.invalidName":"Only letters, digits, hyphens (≤16)","bind.desktopHint":"On the computer, one command takes any session here back over: handmux open <name>","bind.checkFailed":"Check failed, please retry","bind.startDir":"Start directory","bind.homeDirDefault":"Home directory (default)","bind.choose":"Choose","bind.reset":"Reset","actionsheet.confirmAgain":"Confirm? Tap again","dirpicker.title":"Choose directory","inbox.title":"Inbox","inbox.working":"Working","inbox.done":"Done","inbox.needs":"Needs you","inbox.clearDone":"Clear done","inbox.empty":"No pane status yet","inbox.enableTitle":"Turn on AI session notifications","inbox.enableHint":"Tag every Claude / Codex pane working / waiting on you / done, and get pinged when one needs you.","inbox.enableBtn":"Enable","inbox.enabling":"Enabling…","inbox.enableFailed":"Could not enable — check the server logs.","drawer.orphans.title":"{n} not taken over","drawer.orphans.hint":"Take over to control remotely","inbox.orphans.takeover":"Take over","inbox.orphans.noSession":"no resumable history","inbox.orphans.busy":"busy","inbox.orphans.idle":"idle","inbox.orphans.working":"Taking over…","inbox.orphans.failed":"Takeover failed","inbox.orphans.targetLabel":"Take over into","inbox.orphans.targetNew":"New session","inbox.orphans.nameLabel":"Session name","inbox.orphans.namePlaceholder":"session name","inbox.orphans.killTitle":"The original process","inbox.orphans.killEnd":"End it","inbox.orphans.killKeep":"Keep it","inbox.orphans.recommended":"Recommended","inbox.orphans.killWhy":"If the same session is written from both your computer and your phone, its history gets scrambled. Ending the original lets this device own it cleanly.","inbox.orphans.reopenPre":"Want to continue on the computer instead? Run in a terminal:","idea.title":"Ideas","idea.editPlaceholder":"Edit idea…","idea.addPlaceholder":"Jot an idea…","idea.add":"Add","idea.empty":"No ideas yet — jot one down","idea.dragSort":"Drag to reorder","idea.fillInput":"Fill into input","idea.send":"Send","doclink.title":"Open file","changelog.title":"What's new","preview.dynamic":"Dynamic preview","preview.static":"Static preview","preview.remainTitle":"Time left — tap to renew / stop","preview.toPcView":"Switch to desktop view","preview.toMobileView":"Switch to mobile view","preview.pcView":"Desktop view","preview.mobileView":"Mobile view","preview.refresh":"Refresh","preview.minimize":"Minimize","preview.ttlDialog":"Preview lifetime","preview.renew":"Renew (reset to 1 hour)","preview.stop":"Stop preview","preview.iframeTitle":"Preview","preview.zoomOut":"Zoom out","preview.zoomIn":"Zoom in","imageviewer.loadFailed":"Failed to load image","imageviewer.saved":"Saved — find it in your album/gallery or Downloads","imageviewer.shareUnsupported":"Image sharing requires Chrome or Safari","imageviewer.zoomOut":"Zoom out","imageviewer.zoomIn":"Zoom in","imageviewer.imageTitle":"Image","imageviewer.saveImage":"Save image","imageviewer.shareImage":"Share image","mic.stop":"Stop voice input","mic.start":"Voice input","dock.send":"Send","dock.send.hint":"Tap to send · hold to insert","dock.phrases":"Phrases","dock.attach":"Upload","dock.history":"History","dock.kbdShow":"Keyboard","dock.kbdHide":"Hide keyboard","history.empty":"No history yet","history.scope":"This window only","dock.input.placeholder":"Say something…","dock.command.placeholder":"Type a command · Enter runs it","dock.mode.agent":"Chat","dock.mode.toggle":"Switch input mode","dock.mode.command":"Command","dock.mode.chat":"Chat","fav.title":"Favorites","fav.add":"Add","fav.addPlaceholder":"Add a favorite…","cmd.editTitle":"Saved commands","cmd.global":"GLOBAL","cmd.window":"THIS WINDOW","cmd.withEnter":"Send directly","cmd.addPlaceholder":"Add a command…","cmd.tabCmd":"Command","cmd.tabKey":"Key","cmd.addTo":"Add to","cmd.addTitle":"Add","cmd.editItem":"Edit","cmd.sticky":"Modifier","cmd.stickyNone":"None","cmd.baseKey":"Key","cmd.pickKey":"Pick a key","cmd.moveUp":"Move up","cmd.moveDown":"Move down","cmd.empty":"None yet","chat.editTitle":"Saved messages","chat.favs":"Saved","chat.tabMsg":"Message","chat.addPlaceholder":"Message / slash-command…","dock.upload.aria":"Upload file","dock.upload.title":"Upload file (saved to home upload area, not the project)","dock.upload.progress":"Uploading {name}{tag}","dock.upload.failed":"Upload failed: {names}","dock.upload.rejected":"Unsupported file type: {names}","app.nameExists":"That name already exists","app.renameFailed":"Rename failed, please retry","app.deleteFailed":"Delete failed, please retry","app.moveFailed":"Move failed, please retry","app.sessionGone":'Session "{name}" not found, it may have closed',"app.docNotFound":"File not found","app.docTooLarge":"File too large (over 2MB)","app.docUnsupported":"Unsupported file or path","app.docOpenFailed":"Open failed, please retry","app.preview":"Preview","app.openPreview":"Open preview","app.ideas":"Ideas","app.files":"Files","app.settings":"Settings","usage.title":"Usage","usage.win5h":"5-hour","usage.winWeekly":"Weekly","usage.winMonthly":"Monthly","usage.winGeneric":"{h}h window","usage.winPrimary":"Limit","usage.winSecondary":"Secondary","usage.resetIn":"resets in {t}","usage.resetSoon":"resetting…","usage.claudeOff":"Not wired yet — Claude's 5h/weekly usage needs the handmux statusLine:","usage.claudePending":"No data yet — send a message in a Claude session, then reopen.","usage.codexOff":"Codex not detected on this machine.","usage.codexNoQuota":"No quota data in the latest session yet.","usage.loadFailed":"Failed to load usage.","usage.updatedNow":"updated just now","usage.updatedMin":"updated {n}m ago","usage.updatedHr":"updated {n}h ago","usage.updatedDay":"updated {n}d ago","usage.activityNote":"Updates on new messages","usage.timeMark":"Time elapsed in this window","app.renameSession":"Rename session","app.renameWindow":"Rename window","app.moveLeft":"◀ Move left","app.moveRight":"Move right ▶","app.deleteWindow":"Delete window","app.deleteLastWindowConfirm":"This is the last window; deleting it closes the whole session! Tap again","app.deleteConfirm":"Delete? Tap again","app.cannotLocate":"Cannot locate","app.pickItsDir":", pick the directory it lives in:","app.noBoundSession":"No bound session yet","app.tapToBind":"Tap here to bind one","app.selectSessionHint":"Tap ☰ at the top-left to pick a session","app.backToExit":"Press Back again to exit","settings.title":"Settings","settings.group_global":"Global settings","settings.font_size":"Font size","settings.font_decrease":"Decrease font size","settings.font_increase":"Increase font size","settings.font_auto":"Auto","settings.font_auto_title":"Auto-fit to height","settings.path_highlight":"Highlight file paths","settings.path_highlight_hint":"Tint tappable file paths in the terminal. Paths stay tappable either way.","settings.whats_new":"What's new","settings.view_changelog":"View changelog","settings.has_update":"Has update","settings.version":"Version","settings.feedback":"Feedback","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat group","settings.feedback_hint":"Bugs and ideas welcome — issues are tracked and answered.","settings.update_available":"Version {v} available","settings.update_how":"On your computer, run","settings.push_notifications":"Push notifications","settings.notify_on":"Enabled ✓","settings.notify_enable":"Enable device notifications","settings.notify_enabled":"Enabled, you should receive a welcome notification","settings.notify_disabled":"Disabled","settings.notify_failed":"Operation failed","settings.processing":"Processing","settings.push_hint":'Listens for "Needs you" and "Done": when a watched session needs your authorization/answer, or a turn just finished, a push is sent to this device.',"settings.push_unsupported":"Push requires Chrome or Safari","settings.group_session":"Current session settings","settings.screen_cols":"Screen columns","settings.cols_dec":"Fewer","settings.cols_dec_title":"Fewer columns","settings.cols_inc":"More","settings.cols_inc_title":"More columns","settings.cols_restore":"Default","settings.cols_restore_title":"Restore default window size","settings.preview_site":"Preview site","settings.preview_static_site":"Preview static site","settings.preview_running_dynamic":"Dynamic preview running","settings.preview_running_static":"Static preview running","settings.preview_remain_title":"Time remaining","settings.preview_remain":"{time} left","settings.preview_renew":"Renew","settings.preview_confirm_stop":"Confirm stop","settings.preview_stop":"Stop","settings.preview_name":"Name: {name}","settings.preview_port":"(port :{port})","settings.preview_type":"Preview type","settings.preview_off":"Off","settings.preview_static":"Static","settings.preview_dynamic":"Dynamic","settings.preview_off_hint":'Preview is off. Choose "Static" to start.',"settings.preview_off_hint_both":'Preview is off. Choose "Static" or "Dynamic" to start.',"settings.preview_dynamic_disabled":"Dynamic port preview is off. To turn it on, point a wildcard preview domain (previewDomain, e.g. *.example.com) at the gateway with a matching TLS cert. See the README for the Cloudflare vs self-hosted specifics.","settings.preview_pick_dir":"Pick directory & start","settings.preview_static_hint":"Pick a directory containing index.html to preview on your phone.","settings.preview_port_placeholder":"Port, e.g. 3000","settings.preview_port_label":"Port","settings.preview_starting":"Starting…","settings.preview_start":"Start","settings.preview_dynamic_hint":"Enter a port running on this machine (dev server / backend); your phone accesses it directly via a subdomain.","settings.dir_picker_hint":"Pick the static site directory to preview (containing index.html)","settings.err_port_not_listening":"That port is not listening; make sure the service is running","settings.err_bad_port":"Invalid port (1–65535)","settings.err_dynamic_disabled":"Dynamic preview is not enabled","settings.err_start_failed":"Failed to start","filebrowser.openDirFailed":"Cannot open this directory","filebrowser.copiedPath":"Path copied: {abs}","filebrowser.mkdirFailed":"Failed to create folder (invalid name or already exists)","filebrowser.downloading":"Downloading {name}","filebrowser.downloadFailed":"Download failed","filebrowser.uploading":"Uploading {name}{tag}","filebrowser.uploadFailed":"Upload failed","filebrowser.uploadPartialFailed":"These files failed to upload: {names}","filebrowser.uploadRejected":"Unsupported file type: {names}","filebrowser.sessionDir":"Session directory","filebrowser.jumpToSessionDir":"Jump to current session directory","filebrowser.parentDir":"Parent directory","filebrowser.rootSelect":"Switch root (home / temp dirs)","filebrowser.pathPlaceholder":"Enter path (live filter / jump)","filebrowser.newFolder":"New folder","filebrowser.createBtn":"Create","filebrowser.uploadFile":"Upload file","filebrowser.uploadToCurrentDir":"Upload to current directory","filebrowser.enterSubdirToUpload":"Enter a subdirectory to upload","filebrowser.folderNamePlaceholder":"Folder name","filebrowser.uploadPendingTo":"Upload “{name}” to the current directory","filebrowser.enterSubdirFirst":"(enter a subdirectory first)","filebrowser.upload":"Upload","filebrowser.savedToDownloads":"Saved “{name}” to the Downloads folder; view it in the system file manager","filebrowser.noMatches":"No matching files or directories","filebrowser.tooMany":"Showing the first {shown} of {total} — type in the path box to filter","filebrowser.previewUnsupported":"Preview not supported for this file type; tap the button on the right to download","filebrowser.copyAbsPath":"Copy absolute path","filebrowser.download":"Download","filebrowser.pickThisDir":"Select this directory {path}","filebrowser.downloadConfirm":"Download {name}?","filemanager.files":"Files","filemanager.closeTab":"Close tab","filemanager.minimize":"Minimize","filemanager.recent":"Recent","filemanager.directory":"Directory","git.errReadRepo":"Cannot read repository","git.errLoad":"Load failed","git.noRepoInDir":"No git repository here yet — pick another directory, or run git init in this one.","git.outsideRoots":"This folder is outside the area handmux can open — only your home directory and /tmp are reachable. Move the repo under your home directory to browse it here.","git.errReadDir":"Cannot read this directory","git.commitDetail":"Commit details","git.diff":"Diff","git.bindRepo":"Bind repository","git.collapse":"Collapse","git.currentBranch":"Current branch","git.switchViewedBranch":"Switch viewed branch","git.switchBranch":"Switch branch","git.noBranches":"No branches","git.noRepoBound":'No repository bound — tap "+" at the top left to choose a directory.',"git.changes":"Changes","git.commits":"Commits","git.pullToLoadMore":"Pull to load more","git.pickerHint":"Choose a directory to auto-discover git repositories inside it","git.cleanTree":"Working tree clean","git.noCommits":"No commits","git.noDiff":"No diff","git.fontSmaller":"Decrease font size","git.fontLarger":"Increase font size","git.diffTruncated":"Diff too large, truncated","cmd.panel":"Command panel","cmd.title":"Commands","cmd.empty":"No commands yet — send one or save a favorite","cmd.favorites":"Favorites","cmd.scopeGlobal":"Global · all sessions","cmd.recent":"Recent","cmd.scopeSession":"This session only","cmd.favorite":"Favorite","cmd.unfavorite":"Unfavorite","doc.home":"Recent","doc.read":"Read aloud","doc.pauseRead":"Pause reading","doc.resumeRead":"Resume reading","doc.stopRead":"Stop reading","doc.rate":"Speed","doc.fontSmaller":"Smaller font","doc.fontLarger":"Larger font","inbox.view.working":"Running","inbox.view.done":"Completed","inbox.view.needs":"Needs you","push.unsupported":"Push notifications require Chrome or Safari","push.iosAddToHome":'On iOS, first "Add to Home Screen", then open from the home-screen icon to enable',"a2hs.title":"Add handmux to your Home Screen","a2hs.lead":"Open it like an app — full-screen, no address bar. On iPhone it’s also how push reaches you the moment a pane needs you.","a2hs.install":"Install handmux","a2hs.ios1":"Tap the Share button (the ⬆︎ box) in Safari.","a2hs.ios2":"Tap “More”, or scroll down the list.","a2hs.ios3":"Choose “Add to Home Screen”, then “Add”.","a2hs.iosHint":"In Safari: Share → More → Add to Home Screen.","a2hs.iosOpenSafari":"You’re not in Safari. Open this page in Safari, then add it to your Home Screen — other iOS browsers can’t install it.","a2hs.androidManual":"Open your browser menu (⋮) and choose “Add to Home screen” or “Install app”.","a2hs.later":"Maybe later","push.permissionDenied":"Notification permission denied","push.noVapid":"Push is not configured on the server (VAPID)","push.subscribeFailed":"Failed to report subscription","push.sendFailed":"Send failed","api.loadFailed":"Load failed","api.uploadFailed":"Upload failed","upload.title":"Uploading","upload.processing":"Sent — receiving on the server…","api.uploadBadDir":"Cannot upload to this directory","api.uploadDuplicate":"A file with this name already exists","api.uploadTooLarge":"File too large (50MB limit)","api.uploadBadType":"Unsupported file type","time.secAgo":"{n}s ago","time.minAgo":"{n}m ago","time.hourAgo":"{n}h ago","time.dayAgo":"{n}d ago","time.expired":"Expired","time.minutes":"{n} min","settings.script_push":"Script push","settings.script_push_open":"How it works","settings.script_push_hint":"Let a script on your computer push a notification to your phone.","scriptPush.title":"Script push","scriptPush.intro":"Let scripts on your computer reuse handmux’s push channel: on the machine running handmux, one `handmux push` command sends a notification to your phone — handy when a build, CI run, or long task finishes, with no separate push service to wire up.","scriptPush.copied":"Copied","scriptPush.session_placeholder":"<session>","scriptPush.device_placeholder":"<device-key>","scriptPush.scope_all":"All subscribed devices (default)","scriptPush.scope_session":"Only devices in one session","scriptPush.scope_device":"Only this device","scriptPush.device_key_note":"The key above is this device’s — copy and run as-is.","scriptPush.device_need_enable":"Turn on push notifications above first to generate this device’s key.","scriptPush.opts_label":"Optional (append to any of the above)","scriptPush.opt_tag":"--tag <tag> — the same tag replaces the previous push instead of stacking.","scriptPush.opt_url":"--url <path> — opens this path when the notification is tapped.","scriptPush.reliability":"Heads-up: Web Push goes through the phone OS (FCM/APNs) and is best-effort — battery-saver, offline, or vendor policy can delay or drop it. It is not a guaranteed real-time channel. For delivery-critical alerts use a dedicated IM (WeChat / Telegram bot, etc.)."},NL={"common.save":"保存","common.cancel":"取消","common.confirm":"确认","common.ok":"确定","common.close":"关闭","common.delete":"删除","common.copy":"复制","common.rename":"重命名","common.create":"新建","common.back":"返回","common.open":"打开","common.loading":"加载中…","common.done":"完成","token.title":"需要访问 token","token.placeholder":"粘贴 HANDMUX_TOKEN","settings.language":"语言 Language","home.empty":"还没有打开过文件","home.emptyHint":"切到「新增」去挑一个","home.remove":"移除","drawer.empty":"还没有绑定会话","drawer.unbind":"解绑","drawer.bind":"绑定会话","drawer.logout":"退出登录","windowbar.newWindow":"新建窗口","rename.new_name":"新名称","rename.name_placeholder":"名字缩写","rename.name_rule":"只能用字母、数字、横线(≤16)","rename.failed":"重命名失败,请重试","rename.saving":"保存中…","newwindow.title":"新建窗口","newwindow.window_name":"窗口名称(可选)","newwindow.name_placeholder":"留空自动命名","newwindow.name_rule":"只能用字母、数字、横线(≤16)","newwindow.start_dir":"起始目录","newwindow.session_dir_named":"{dir}(会话目录)","newwindow.session_dir_default":"会话目录(默认)","newwindow.choose":"选择","newwindow.reset_to_session_dir":"重置为会话目录","newwindow.creating":"新建中…","startup.label":"启动命令(可选)","startup.aria":"启动命令","startup.preset_shell":"空 shell(默认)","startup.preset_claude":"claude(启动 Claude Code)","startup.preset_claude_continue":"claude -c(接着上次会话)","startup.preset_codex":"codex(启动 Codex CLI)","startup.custom":"自定义…","startup.custom_placeholder":'例如 claude "修复登录bug"',"bind.title":"绑定会话","bind.sessionName":"会话名称","bind.namePlaceholder":"新会话名","bind.pickSession":"选择要绑定的会话","bind.newSession":"+ 新建会话","bind.alreadyExists":"该会话已存在","bind.bind":"绑定","bind.checking":"校验中…","bind.createAndOpen":"新建并打开","bind.creating":"新建中…","bind.createHint":"会话「{name}」不存在,点「新建并打开」创建","bind.alreadyBound":"已绑定该会话","bind.createFailed":"新建失败,请重试","bind.invalidName":"只能用字母、数字、横线(≤16)","bind.desktopHint":"这里的会话(包括手机新建的),电脑上一条命令即可接管:handmux open <会话名>","bind.checkFailed":"校验失败,请重试","bind.startDir":"起始目录","bind.homeDirDefault":"主目录(默认)","bind.choose":"选择","bind.reset":"重置","actionsheet.confirmAgain":"确认?再点一次","dirpicker.title":"选择目录","inbox.title":"收件箱","inbox.working":"进行中","inbox.done":"已完成","inbox.needs":"需要你","inbox.clearDone":"清除已完成","inbox.empty":"暂无面板状态","inbox.enableTitle":"开启 AI 会话通知","inbox.enableHint":"把每个 Claude / Codex 面板标记为进行中 / 需要你 / 已完成,需要你时还会推送提醒。","inbox.enableBtn":"开启","inbox.enabling":"开启中…","inbox.enableFailed":"开启失败 —— 看看服务端日志。","drawer.orphans.title":"{n} 个未接管会话","drawer.orphans.hint":"接管即可远程操控","inbox.orphans.takeover":"接管","inbox.orphans.noSession":"无可续接的历史","inbox.orphans.busy":"运行中","inbox.orphans.idle":"空闲","inbox.orphans.working":"接管中…","inbox.orphans.failed":"接管失败","inbox.orphans.targetLabel":"接管到","inbox.orphans.targetNew":"新建会话","inbox.orphans.nameLabel":"会话名称","inbox.orphans.namePlaceholder":"会话名","inbox.orphans.killTitle":"接管后原来的进程","inbox.orphans.killEnd":"结束","inbox.orphans.killKeep":"保留","inbox.orphans.recommended":"推荐","inbox.orphans.killWhy":"同一个会话如果电脑和手机同时在写,历史记录会错乱。结束原进程后由手机这边独占,更稳妥。","inbox.orphans.reopenPre":"想回电脑上继续?在电脑终端运行:","idea.title":"想法","idea.editPlaceholder":"编辑想法…","idea.addPlaceholder":"记一条想法…","idea.add":"添加","idea.empty":"还没有想法,记一条吧","idea.dragSort":"拖动排序","idea.fillInput":"填入输入框","idea.send":"发送","doclink.title":"打开文件","changelog.title":"新功能","preview.dynamic":"动态预览","preview.static":"静态预览","preview.remainTitle":"剩余有效期 — 点击续期 / 停止","preview.toPcView":"切换到电脑视图","preview.toMobileView":"切换到手机视图","preview.pcView":"电脑视图","preview.mobileView":"手机视图","preview.refresh":"刷新","preview.minimize":"收起","preview.ttlDialog":"预览有效期","preview.renew":"续期(重置为 1 小时)","preview.stop":"停止预览","preview.iframeTitle":"预览","preview.zoomOut":"缩小","preview.zoomIn":"放大","imageviewer.loadFailed":"图片加载失败","imageviewer.saved":"已保存,可在相册/图库或「下载」中查看","imageviewer.shareUnsupported":"图片分享需要 Chrome 或 Safari 浏览器","imageviewer.zoomOut":"缩小","imageviewer.zoomIn":"放大","imageviewer.imageTitle":"图片","imageviewer.saveImage":"保存图片","imageviewer.shareImage":"分享图片","mic.stop":"停止语音输入","mic.start":"语音输入","dock.send":"发送","dock.send.hint":"点发送 · 长按填入","dock.phrases":"常用语","dock.attach":"上传","dock.history":"历史","dock.kbdShow":"展开键盘","dock.kbdHide":"收起键盘","history.empty":"还没有发送记录","history.scope":"仅当前窗口的记录","dock.input.placeholder":"说点什么…","dock.command.placeholder":"输入命令 · 回车执行","dock.mode.agent":"对话","dock.mode.toggle":"切换输入模式","dock.mode.command":"命令模式","dock.mode.chat":"聊天模式","fav.title":"常用","fav.add":"添加","fav.addPlaceholder":"加一条常用…","cmd.editTitle":"常用命令","cmd.global":"全局","cmd.window":"当前窗口","cmd.withEnter":"直接发送","cmd.addPlaceholder":"加一条命令…","cmd.tabCmd":"命令","cmd.tabKey":"按键","cmd.addTo":"添加到","cmd.addTitle":"添加","cmd.editItem":"编辑","cmd.sticky":"粘滞键","cmd.stickyNone":"无","cmd.baseKey":"基键","cmd.pickKey":"选择按键","cmd.moveUp":"上移","cmd.moveDown":"下移","cmd.empty":"还没有","chat.editTitle":"常用消息","chat.favs":"常用","chat.tabMsg":"消息","chat.addPlaceholder":"消息 / 斜杠命令…","dock.upload.aria":"上传文件","dock.upload.title":"上传文件(存到家目录上传区,不进项目)","dock.upload.progress":"上传 {name}{tag}","dock.upload.failed":"上传失败:{names}","dock.upload.rejected":"不支持的文件类型:{names}","app.nameExists":"该名已存在","app.renameFailed":"重命名失败,请重试","app.deleteFailed":"删除失败,请重试","app.moveFailed":"移动失败,请重试","app.sessionGone":"会话「{name}」不存在,可能已关闭","app.docNotFound":"文件不存在","app.docTooLarge":"文件过大(超过 2MB)","app.docUnsupported":"不支持的文件或路径","app.docOpenFailed":"打开失败,请重试","app.preview":"预览","app.openPreview":"打开预览","app.ideas":"想法","app.files":"文件","app.settings":"设置","usage.title":"用量","usage.win5h":"5 小时","usage.winWeekly":"本周","usage.winMonthly":"本月","usage.winGeneric":"{h} 小时窗口","usage.winPrimary":"额度","usage.winSecondary":"次级额度","usage.resetIn":"{t}后重置","usage.resetSoon":"即将重置…","usage.claudeOff":"尚未接入 —— Claude 的 5h/周额度需要 handmux statusLine:","usage.claudePending":"暂无数据 —— 在 Claude 会话里发一条消息,再重新打开。","usage.codexOff":"本机未检测到 Codex。","usage.codexNoQuota":"最近的会话里还没有额度数据。","usage.loadFailed":"加载用量失败。","usage.updatedNow":"刚刚更新","usage.updatedMin":"{n} 分钟前更新","usage.updatedHr":"{n} 小时前更新","usage.updatedDay":"{n} 天前更新","usage.activityNote":"在有新消息时更新","usage.timeMark":"本窗口已过去的时间","app.renameSession":"重命名会话","app.renameWindow":"重命名窗口","app.moveLeft":"◀ 左移","app.moveRight":"右移 ▶","app.deleteWindow":"删除窗口","app.deleteLastWindowConfirm":"这是最后一个窗口,删除将关闭整个会话!再点一次","app.deleteConfirm":"确认删除?再点一次","app.cannotLocate":"无法定位","app.pickItsDir":",请选它所在的目录:","app.noBoundSession":"还没有绑定会话","app.tapToBind":"点此绑定一个","app.selectSessionHint":"点击左上角 ☰ 选择会话","app.backToExit":"再按一次返回键退出","settings.title":"设置","settings.group_global":"全局设置","settings.font_size":"字体大小","settings.font_decrease":"减小字体","settings.font_increase":"增大字体","settings.font_auto":"自适应","settings.font_auto_title":"按高度自动适配","settings.path_highlight":"高亮文件路径","settings.path_highlight_hint":"给终端里可点开的文件路径加底色。无论开关与否,路径都可点开。","settings.whats_new":"新功能","settings.view_changelog":"查看更新日志","settings.has_update":"有更新","settings.version":"版本","settings.feedback":"反馈与交流","settings.feedback_issues":"GitHub 反馈","settings.feedback_group":"微信用户群","settings.feedback_hint":"bug、想法都欢迎——Issue 会被跟踪处理;微信群反馈直达。","settings.update_available":"有新版本 v{v} 可用","settings.update_how":"在电脑上运行","settings.push_notifications":"推送通知","settings.notify_on":"已开启 ✓","settings.notify_enable":"开启设备通知","settings.notify_enabled":"已开启,应会收到一条欢迎通知","settings.notify_disabled":"已关闭","settings.notify_failed":"操作失败","settings.processing":"处理中","settings.push_hint":"监听「需要你」和「已完成」:所关注会话需要你授权/回答,或一个回合刚做完时,推送到此设备。","settings.push_unsupported":"推送需要 Chrome 或 Safari 浏览器","settings.group_session":"当前会话设置","settings.screen_cols":"屏幕列数","settings.cols_dec":"减少","settings.cols_dec_title":"减少列数","settings.cols_inc":"增加","settings.cols_inc_title":"增加列数","settings.cols_restore":"默认","settings.cols_restore_title":"恢复窗口默认尺寸","settings.preview_site":"预览站点","settings.preview_static_site":"预览静态站点","settings.preview_running_dynamic":"动态预览 运行中","settings.preview_running_static":"静态预览 运行中","settings.preview_remain_title":"剩余有效期","settings.preview_remain":"剩 {time}","settings.preview_renew":"续期","settings.preview_confirm_stop":"确认停止","settings.preview_stop":"停止","settings.preview_name":"名称:{name}","settings.preview_port":"(端口 :{port})","settings.preview_type":"预览类型","settings.preview_off":"不开启","settings.preview_static":"静态","settings.preview_dynamic":"动态","settings.preview_off_hint":"未开启预览。选择「静态」开始。","settings.preview_off_hint_both":"未开启预览。选择「静态」或「动态」开始。","settings.preview_dynamic_disabled":"动态端口预览未启用。要开启:把一个通配预览域名(previewDomain,如 *.example.com)指向网关,并配上对应的 TLS 证书。Cloudflare / 自建的证书差异见 README。","settings.preview_pick_dir":"选择目录启动","settings.preview_static_hint":"选一个含 index.html 的目录,在手机上预览。","settings.preview_port_placeholder":"端口,如 3000","settings.preview_port_label":"端口","settings.preview_starting":"启动中…","settings.preview_start":"启动","settings.preview_dynamic_hint":"填本机正在运行的端口(dev server / 后端),手机经子域名直接访问。","settings.dir_picker_hint":"选择要预览的静态站点目录(含 index.html)","settings.err_port_not_listening":"该端口未在监听,请确认服务已启动","settings.err_bad_port":"端口不合法(1–65535)","settings.err_dynamic_disabled":"动态预览未开启","settings.err_start_failed":"启动失败","filebrowser.openDirFailed":"无法打开该目录","filebrowser.copiedPath":"已复制路径:{abs}","filebrowser.mkdirFailed":"新建目录失败(名称非法或已存在)","filebrowser.downloading":"下载 {name}","filebrowser.downloadFailed":"下载失败","filebrowser.uploading":"上传 {name}{tag}","filebrowser.uploadFailed":"上传失败","filebrowser.uploadPartialFailed":"以下文件上传失败:{names}","filebrowser.uploadRejected":"不支持的文件类型:{names}","filebrowser.sessionDir":"会话目录","filebrowser.jumpToSessionDir":"跳到当前会话目录","filebrowser.parentDir":"上级目录","filebrowser.rootSelect":"切换根目录(家目录 / 临时目录)","filebrowser.pathPlaceholder":"输入路径(实时筛选/跳转)","filebrowser.newFolder":"新建文件夹","filebrowser.createBtn":"创建","filebrowser.uploadFile":"上传文件","filebrowser.uploadToCurrentDir":"上传到当前目录","filebrowser.enterSubdirToUpload":"请进入一个子目录上传","filebrowser.folderNamePlaceholder":"文件夹名称","filebrowser.uploadPendingTo":"把「{name}」上传到当前目录","filebrowser.enterSubdirFirst":"(请先进入一个子目录)","filebrowser.upload":"上传","filebrowser.savedToDownloads":"已保存「{name}」到「下载」文件夹,可在系统文件管理器查看","filebrowser.noMatches":"没有匹配的文件或目录","filebrowser.tooMany":"共 {total} 项,只显示前 {shown} 项——在路径框输入关键词可筛选","filebrowser.previewUnsupported":"暂不支持该类型文件的预览,点右侧按钮可下载","filebrowser.copyAbsPath":"复制绝对路径","filebrowser.download":"下载","filebrowser.pickThisDir":"选定此目录 {path}","filebrowser.downloadConfirm":"下载 {name}?","filemanager.files":"文件","filemanager.closeTab":"关闭标签","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"目录","git.errReadRepo":"无法读取仓库","git.errLoad":"加载失败","git.noRepoInDir":"这个目录还不是 git 仓库 —— 换一个目录,或在这里 git init 一下。","git.outsideRoots":"这个目录在 handmux 可访问范围之外 —— 只开放主目录和 /tmp。把仓库放到主目录下,就能在这里查看了。","git.errReadDir":"无法读取该目录","git.commitDetail":"提交详情","git.diff":"差异","git.bindRepo":"绑定仓库","git.collapse":"收起","git.currentBranch":"当前分支","git.switchViewedBranch":"切换查看的分支","git.switchBranch":"切换分支","git.noBranches":"暂无分支","git.noRepoBound":"未绑定仓库,点左上角「+」选择一个目录。","git.changes":"变更","git.commits":"提交","git.pullToLoadMore":"下拉加载更多","git.pickerHint":"选择一个目录,自动查找其中的 git 仓库","git.cleanTree":"工作区干净","git.noCommits":"暂无提交","git.noDiff":"无差异","git.fontSmaller":"缩小字体","git.fontLarger":"放大字体","git.diffTruncated":"diff 过大,已截断","cmd.panel":"命令面板","cmd.title":"命令","cmd.empty":"还没有命令,发送一条或保存常用","cmd.favorites":"常用","cmd.scopeGlobal":"全局 · 所有会话","cmd.recent":"最近","cmd.scopeSession":"仅本会话","cmd.favorite":"收藏","cmd.unfavorite":"取消收藏","doc.home":"最近","doc.read":"朗读","doc.pauseRead":"暂停朗读","doc.resumeRead":"继续朗读","doc.stopRead":"停止朗读","doc.rate":"语速","doc.fontSmaller":"缩小字体","doc.fontLarger":"放大字体","inbox.view.working":"进行中","inbox.view.done":"已完成","inbox.view.needs":"需要你","push.unsupported":"推送通知需要 Chrome 或 Safari 浏览器","push.iosAddToHome":'iOS 需先把本站"添加到主屏幕",从主屏图标打开后再开启',"a2hs.title":"把 handmux 添加到主屏","a2hs.lead":"像 App 一样打开——全屏、没有地址栏。在 iPhone 上,pane 需要你时的推送也靠它送达。","a2hs.install":"安装 handmux","a2hs.ios1":"点 Safari 里的分享按钮(⬆︎ 方框)。","a2hs.ios2":"点「更多」,或向下滑动列表。","a2hs.ios3":"选「添加到主屏幕」,再点「添加」。","a2hs.iosHint":"Safari 里:分享 → 更多 → 添加到主屏幕。","a2hs.iosOpenSafari":"当前不是 Safari。请在 Safari 里打开本页再添加到主屏——其他 iOS 浏览器无法安装。","a2hs.androidManual":"打开浏览器菜单(⋮),选「添加到主屏幕」或「安装应用」。","a2hs.later":"以后再说","push.permissionDenied":"通知权限被拒绝","push.noVapid":"服务端未配置推送(VAPID)","push.subscribeFailed":"订阅上报失败","push.sendFailed":"发送失败","api.loadFailed":"加载失败","api.uploadFailed":"上传失败","upload.title":"上传中","upload.processing":"已发送,服务器接收中…","api.uploadBadDir":"无法上传到该目录","api.uploadDuplicate":"已存在同名文件","api.uploadTooLarge":"文件过大(上限 50MB)","api.uploadBadType":"不支持的文件类型","time.secAgo":"{n}秒前","time.minAgo":"{n}分钟前","time.hourAgo":"{n}小时前","time.dayAgo":"{n}天前","time.expired":"已过期","time.minutes":"{n} 分钟","settings.script_push":"脚本推送","settings.script_push_open":"怎么用","settings.script_push_hint":"让电脑上的脚本把一条通知推到手机。","scriptPush.title":"脚本推送","scriptPush.intro":"让电脑上的脚本复用 handmux 的推送通道:在运行 handmux 的电脑上,一条 handmux push 命令就能把通知推到手机——构建、CI 或长任务结束时提醒你,不用另接推送服务。","scriptPush.copied":"已复制","scriptPush.session_placeholder":"<会话名>","scriptPush.device_placeholder":"<本设备key>","scriptPush.scope_all":"推给所有已订阅设备(默认)","scriptPush.scope_session":"只推某个会话里的设备","scriptPush.scope_device":"只推这台设备","scriptPush.device_key_note":"上面这串 key 就是这台设备的,复制即用。","scriptPush.device_need_enable":"先在上方开启推送通知,才会生成这台设备的 key。","scriptPush.opts_label":"可选参数(追加到上面任意一条后面)","scriptPush.opt_tag":"--tag <标签> —— 相同 tag 会覆盖上一条推送,而不是堆叠。","scriptPush.opt_url":"--url <路径> —— 点击通知时打开这个路径。","scriptPush.reliability":"注意:Web 推送经手机系统(FCM/APNs)中转,属尽力而为——省电模式、离线或厂商策略都可能延迟或丢弃它,并不保证实时送达。对送达强依赖的场景,请改用专门的 IM(微信 / Telegram bot 等)。"},CL={"common.save":"儲存","common.cancel":"取消","common.confirm":"確認","common.ok":"確定","common.close":"關閉","common.delete":"刪除","common.copy":"複製","common.rename":"重新命名","common.create":"新增","common.back":"返回","common.open":"開啟","common.loading":"載入中…","common.done":"完成","token.title":"需要存取 Token","token.placeholder":"貼上 HANDMUX_TOKEN","settings.language":"語言 Language","home.empty":"尚未開啟任何檔案","home.emptyHint":"切換到「新增」挑選一個","home.remove":"移除","drawer.empty":"尚未綁定工作階段","drawer.unbind":"解除綁定","drawer.bind":"綁定工作階段","drawer.logout":"登出","windowbar.newWindow":"新增視窗","rename.new_name":"新名稱","rename.name_placeholder":"名稱縮寫","rename.name_rule":"只能使用字母、數字、連字號(≤16)","rename.failed":"重新命名失敗,請重試","rename.saving":"儲存中…","newwindow.title":"新增視窗","newwindow.window_name":"視窗名稱(選填)","newwindow.name_placeholder":"留空自動命名","newwindow.name_rule":"只能使用字母、數字、連字號(≤16)","newwindow.start_dir":"起始目錄","newwindow.session_dir_named":"{dir}(工作階段目錄)","newwindow.session_dir_default":"工作階段目錄(預設)","newwindow.choose":"選擇","newwindow.reset_to_session_dir":"重置為工作階段目錄","newwindow.creating":"建立中…","startup.label":"啟動命令(選填)","startup.aria":"啟動命令","startup.preset_shell":"空白 Shell(預設)","startup.preset_claude":"claude(啟動 Claude Code)","startup.preset_claude_continue":"claude -c(繼續上次工作階段)","startup.preset_codex":"codex(啟動 Codex CLI)","startup.custom":"自訂…","startup.custom_placeholder":'例如 claude "修復登入 bug"',"bind.title":"綁定工作階段","bind.sessionName":"工作階段名稱","bind.namePlaceholder":"新工作階段名稱","bind.pickSession":"選擇要綁定的工作階段","bind.newSession":"+ 新增工作階段","bind.alreadyExists":"此工作階段已存在","bind.bind":"綁定","bind.checking":"驗證中…","bind.createAndOpen":"新增並開啟","bind.creating":"建立中…","bind.createHint":"工作階段「{name}」不存在,點「新增並開啟」建立","bind.alreadyBound":"已綁定此工作階段","bind.createFailed":"建立失敗,請重試","bind.invalidName":"只能使用字母、數字、連字號(≤16)","bind.desktopHint":"這裡的工作階段(包括手機新建的),電腦上一條命令即可接管:handmux open <名稱>","bind.checkFailed":"驗證失敗,請重試","bind.startDir":"起始目錄","bind.homeDirDefault":"主目錄(預設)","bind.choose":"選擇","bind.reset":"重置","actionsheet.confirmAgain":"確認?再點一次","dirpicker.title":"選擇目錄","inbox.title":"收件匣","inbox.working":"進行中","inbox.done":"已完成","inbox.needs":"需要你","inbox.clearDone":"清除已完成","inbox.empty":"目前沒有面板狀態","inbox.enableTitle":"開啟 AI 工作階段通知","inbox.enableHint":"將每個 Claude / Codex 面板標記為進行中 / 需要你 / 已完成,需要時也會推播提醒。","inbox.enableBtn":"開啟","inbox.enabling":"開啟中…","inbox.enableFailed":"開啟失敗——請查看伺服器日誌。","idea.title":"想法","idea.editPlaceholder":"編輯想法…","idea.addPlaceholder":"記錄一條想法…","idea.add":"新增","idea.empty":"還沒有想法,記錄一條吧","idea.dragSort":"拖曳排序","idea.fillInput":"填入輸入框","idea.send":"傳送","doclink.title":"開啟檔案","changelog.title":"新功能","preview.dynamic":"動態預覽","preview.static":"靜態預覽","preview.remainTitle":"剩餘有效期 — 點擊續期 / 停止","preview.toPcView":"切換到電腦檢視","preview.toMobileView":"切換到手機檢視","preview.pcView":"電腦檢視","preview.mobileView":"手機檢視","preview.refresh":"重新整理","preview.minimize":"收起","preview.ttlDialog":"預覽有效期","preview.renew":"續期(重置為 1 小時)","preview.stop":"停止預覽","preview.iframeTitle":"預覽","preview.zoomOut":"縮小","preview.zoomIn":"放大","imageviewer.loadFailed":"圖片載入失敗","imageviewer.saved":"已儲存,可在相簿或「下載」中查看","imageviewer.shareUnsupported":"圖片分享需要 Chrome 或 Safari 瀏覽器","imageviewer.zoomOut":"縮小","imageviewer.zoomIn":"放大","imageviewer.imageTitle":"圖片","imageviewer.saveImage":"儲存圖片","imageviewer.shareImage":"分享圖片","mic.stop":"停止語音輸入","mic.start":"語音輸入","dock.send":"傳送","dock.send.hint":"點傳送 · 長按填入","dock.phrases":"常用語","dock.attach":"上傳","dock.history":"歷史","history.empty":"還沒有發送記錄","history.scope":"僅目前視窗的記錄","dock.input.placeholder":"說點什麼…","dock.command.placeholder":"輸入指令 · Enter 執行","dock.mode.agent":"對話","dock.mode.toggle":"切換輸入模式","dock.mode.command":"命令模式","dock.mode.chat":"聊天模式","fav.title":"常用","fav.add":"新增","fav.addPlaceholder":"新增常用…","dock.upload.aria":"上傳檔案","dock.upload.title":"上傳檔案(存到主目錄上傳區,不進專案)","dock.upload.progress":"上傳 {name}{tag}","dock.upload.failed":"上傳失敗:{names}","app.nameExists":"該名稱已存在","app.renameFailed":"重新命名失敗,請重試","app.deleteFailed":"刪除失敗,請重試","app.moveFailed":"移動失敗,請重試","app.sessionGone":"工作階段「{name}」不存在,可能已關閉","app.docNotFound":"檔案不存在","app.docTooLarge":"檔案過大(超過 2MB)","app.docUnsupported":"不支援的檔案或路徑","app.docOpenFailed":"開啟失敗,請重試","app.preview":"預覽","app.openPreview":"開啟預覽","app.ideas":"想法","app.files":"檔案","app.settings":"設定","app.renameSession":"重新命名工作階段","app.renameWindow":"重新命名視窗","app.moveLeft":"◀ 左移","app.moveRight":"右移 ▶","app.deleteWindow":"刪除視窗","app.deleteLastWindowConfirm":"這是最後一個視窗,刪除將關閉整個工作階段!再點一次","app.deleteConfirm":"確認刪除?再點一次","app.cannotLocate":"無法定位","app.pickItsDir":",請選擇所在目錄:","app.noBoundSession":"尚未綁定工作階段","app.tapToBind":"點此綁定一個","app.selectSessionHint":"點擊左上角 ☰ 選擇工作階段","app.backToExit":"再按一次返回鍵結束","settings.title":"設定","settings.group_global":"全域設定","settings.font_size":"字型大小","settings.font_decrease":"縮小字型","settings.font_increase":"放大字型","settings.font_auto":"自適應","settings.font_auto_title":"依高度自動調整","settings.path_highlight":"高亮檔案路徑","settings.path_highlight_hint":"為終端機裡可點開的檔案路徑加底色。無論開關與否,路徑都可點開。","settings.whats_new":"新功能","settings.view_changelog":"查看更新日誌","settings.has_update":"有更新","settings.version":"版本","settings.feedback":"意見回饋","settings.feedback_issues":"GitHub 回報","settings.feedback_group":"微信用戶群","settings.feedback_hint":"bug、想法都歡迎——Issue 會被追蹤處理;微信群回饋直達。","settings.update_available":"有新版本 v{v} 可用","settings.update_how":"在電腦上執行","settings.push_notifications":"推播通知","settings.notify_on":"已開啟 ✓","settings.notify_enable":"開啟裝置通知","settings.notify_enabled":"已開啟,應會收到一則歡迎通知","settings.notify_disabled":"已關閉","settings.notify_failed":"操作失敗","settings.processing":"處理中","settings.push_hint":"監聽「需要你」和「已完成」:所關注工作階段需要授權/回答,或一輪剛完成時,推播到此裝置。","settings.push_unsupported":"推播需要 Chrome 或 Safari 瀏覽器","settings.group_session":"目前工作階段設定","settings.screen_cols":"螢幕欄數","settings.cols_dec":"減少","settings.cols_dec_title":"減少欄數","settings.cols_inc":"增加","settings.cols_inc_title":"增加欄數","settings.cols_restore":"預設","settings.cols_restore_title":"恢復視窗預設尺寸","settings.preview_site":"預覽站台","settings.preview_static_site":"預覽靜態站台","settings.preview_running_dynamic":"動態預覽 執行中","settings.preview_running_static":"靜態預覽 執行中","settings.preview_remain_title":"剩餘有效期","settings.preview_remain":"剩 {time}","settings.preview_renew":"續期","settings.preview_confirm_stop":"確認停止","settings.preview_stop":"停止","settings.preview_name":"名稱:{name}","settings.preview_port":"(連接埠:{port})","settings.preview_type":"預覽類型","settings.preview_off":"不開啟","settings.preview_static":"靜態","settings.preview_dynamic":"動態","settings.preview_off_hint":"未開啟預覽。選擇「靜態」開始。","settings.preview_off_hint_both":"未開啟預覽。選擇「靜態」或「動態」開始。","settings.preview_dynamic_disabled":"動態連接埠預覽未啟用。要開啟:將一個萬用字元預覽網域(previewDomain,如 *.example.com)指向閘道,並設定對應的 TLS 憑證。Cloudflare / 自建憑證差異請見 README。","settings.preview_pick_dir":"選擇目錄啟動","settings.preview_static_hint":"選一個含 index.html 的目錄,在手機上預覽。","settings.preview_port_placeholder":"連接埠,如 3000","settings.preview_port_label":"連接埠","settings.preview_starting":"啟動中…","settings.preview_start":"啟動","settings.preview_dynamic_hint":"填入本機正在執行的連接埠(dev server / 後端),手機透過子網域直接存取。","settings.dir_picker_hint":"選擇要預覽的靜態站台目錄(含 index.html)","settings.err_port_not_listening":"該連接埠未在監聽,請確認服務已啟動","settings.err_bad_port":"連接埠不合法(1–65535)","settings.err_dynamic_disabled":"動態預覽未開啟","settings.err_start_failed":"啟動失敗","filebrowser.openDirFailed":"無法開啟該目錄","filebrowser.copiedPath":"已複製路徑:{abs}","filebrowser.mkdirFailed":"建立目錄失敗(名稱不合法或已存在)","filebrowser.downloading":"下載 {name}","filebrowser.downloadFailed":"下載失敗","filebrowser.uploading":"上傳 {name}{tag}","filebrowser.uploadFailed":"上傳失敗","filebrowser.uploadPartialFailed":"以下檔案上傳失敗:{names}","filebrowser.sessionDir":"工作階段目錄","filebrowser.jumpToSessionDir":"跳到目前工作階段目錄","filebrowser.parentDir":"上層目錄","filebrowser.rootSelect":"切換根目錄(主目錄 / 暫存目錄)","filebrowser.pathPlaceholder":"輸入路徑(即時篩選/跳轉)","filebrowser.newFolder":"新增資料夾","filebrowser.createBtn":"建立","filebrowser.uploadFile":"上傳檔案","filebrowser.uploadToCurrentDir":"上傳到目前目錄","filebrowser.enterSubdirToUpload":"請進入一個子目錄上傳","filebrowser.folderNamePlaceholder":"資料夾名稱","filebrowser.uploadPendingTo":"將「{name}」上傳到目前目錄","filebrowser.enterSubdirFirst":"(請先進入一個子目錄)","filebrowser.upload":"上傳","filebrowser.savedToDownloads":"已儲存「{name}」到「下載」資料夾,可在系統檔案管理員查看","filebrowser.noMatches":"沒有符合的檔案或目錄","filebrowser.tooMany":"共 {total} 項,僅顯示前 {shown} 項——在路徑框輸入關鍵字可篩選","filebrowser.previewUnsupported":"暫不支援此類型檔案的預覽,點右側按鈕可下載","filebrowser.copyAbsPath":"複製絕對路徑","filebrowser.download":"下載","filebrowser.pickThisDir":"選定此目錄 {path}","filebrowser.downloadConfirm":"下載 {name}?","filemanager.files":"檔案","filemanager.closeTab":"關閉標籤","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"目錄","git.errReadRepo":"無法讀取儲存庫","git.errLoad":"載入失敗","git.noRepoInDir":"這個目錄還不是 git 儲存庫 —— 換一個目錄,或在這裡 git init 一下。","git.outsideRoots":"這個目錄在 handmux 可存取範圍之外 —— 只開放主目錄和 /tmp。把儲存庫放到主目錄下,就能在這裡檢視了。","git.errReadDir":"無法讀取該目錄","git.commitDetail":"提交詳情","git.diff":"差異","git.bindRepo":"綁定儲存庫","git.collapse":"收起","git.currentBranch":"目前分支","git.switchViewedBranch":"切換查看的分支","git.switchBranch":"切換分支","git.noBranches":"目前沒有分支","git.noRepoBound":"未綁定儲存庫,點左上角「+」選擇一個目錄。","git.changes":"變更","git.commits":"提交","git.pullToLoadMore":"下拉載入更多","git.pickerHint":"選擇一個目錄,自動尋找其中的 git 儲存庫","git.cleanTree":"工作區乾淨","git.noCommits":"目前沒有提交","git.noDiff":"無差異","git.fontSmaller":"縮小字型","git.fontLarger":"放大字型","git.diffTruncated":"diff 過大,已截斷","cmd.panel":"命令面板","cmd.title":"命令","cmd.empty":"還沒有命令,傳送一條或儲存常用","cmd.favorites":"常用","cmd.scopeGlobal":"全域 · 所有工作階段","cmd.recent":"最近","cmd.scopeSession":"僅本工作階段","cmd.favorite":"收藏","cmd.unfavorite":"取消收藏","doc.home":"最近","doc.read":"朗讀","doc.pauseRead":"暫停朗讀","doc.resumeRead":"繼續朗讀","doc.stopRead":"停止朗讀","doc.rate":"語速","doc.fontSmaller":"縮小字型","doc.fontLarger":"放大字型","inbox.view.working":"進行中","inbox.view.done":"已完成","inbox.view.needs":"需要你","push.unsupported":"推播通知需要 Chrome 或 Safari 瀏覽器","push.iosAddToHome":"iOS 需先將本站「加入主畫面」,從主畫面圖示開啟後再開啟","a2hs.title":"將 handmux 加入主畫面","a2hs.lead":"像 App 一樣開啟——全螢幕、沒有網址列。在 iPhone 上,pane 需要你時的推播也靠它送達。","a2hs.install":"安裝 handmux","a2hs.ios1":"點 Safari 的分享按鈕(⬆︎ 方框)。","a2hs.ios2":"點「更多」,或向下滑動清單。","a2hs.ios3":"選「加入主畫面」,再點「加入」。","a2hs.iosHint":"Safari 裡:分享 → 更多 → 加入主畫面。","a2hs.iosOpenSafari":"目前不是 Safari。請在 Safari 開啟本頁再加入主畫面——其他 iOS 瀏覽器無法安裝。","a2hs.androidManual":"開啟瀏覽器選單(⋮),選「加入主畫面」或「安裝應用程式」。","a2hs.later":"稍後再說","push.permissionDenied":"通知權限被拒絕","push.noVapid":"伺服器未設定推播(VAPID)","push.subscribeFailed":"訂閱回報失敗","push.sendFailed":"傳送失敗","api.loadFailed":"載入失敗","api.uploadFailed":"上傳失敗","upload.title":"上傳中","upload.processing":"已傳送,伺服器接收中…","api.uploadBadDir":"無法上傳到該目錄","api.uploadDuplicate":"已存在同名檔案","api.uploadTooLarge":"檔案過大(上限 50MB)","api.uploadBadType":"不支援的檔案類型","time.secAgo":"{n} 秒前","time.minAgo":"{n} 分鐘前","time.hourAgo":"{n} 小時前","time.dayAgo":"{n} 天前","time.expired":"已過期","time.minutes":"{n} 分鐘","settings.script_push":"腳本推送","settings.script_push_open":"怎麼用","settings.script_push_hint":"讓電腦上的腳本把一條通知推到手機。","scriptPush.title":"腳本推送","scriptPush.intro":"讓電腦上的腳本複用 handmux 的推送通道:在執行 handmux 的電腦上,一條 handmux push 命令就能把通知推到手機——建置、CI 或長任務結束時提醒你,不用另接推送服務。","scriptPush.copied":"已複製","scriptPush.session_placeholder":"<會話名>","scriptPush.device_placeholder":"<本裝置key>","scriptPush.scope_all":"推給所有已訂閱裝置(預設)","scriptPush.scope_session":"只推某個會話裡的裝置","scriptPush.scope_device":"只推這台裝置","scriptPush.device_key_note":"上面這串 key 就是這台裝置的,複製即用。","scriptPush.device_need_enable":"先在上方開啟推送通知,才會生成這台裝置的 key。","scriptPush.opts_label":"可選參數(追加到上面任意一條後面)","scriptPush.opt_tag":"--tag <標籤> —— 相同 tag 會覆蓋上一條推送,而不是堆疊。","scriptPush.opt_url":"--url <路徑> —— 點擊通知時開啟這個路徑。","scriptPush.reliability":"注意:Web 推送經手機系統(FCM/APNs)中轉,屬盡力而為——省電模式、離線或廠商策略都可能延遲或丟棄它,並不保證即時送達。對送達強依賴的場景,請改用專門的 IM(WeChat / Telegram bot 等)。"},EL={"common.save":"保存","common.cancel":"キャンセル","common.confirm":"確認","common.ok":"OK","common.close":"閉じる","common.delete":"削除","common.copy":"コピー","common.rename":"名前を変更","common.create":"新規作成","common.back":"戻る","common.open":"開く","common.loading":"読み込み中…","common.done":"完了","token.title":"アクセストークンが必要です","token.placeholder":"HANDMUX_TOKEN を貼り付け","settings.language":"言語 Language","home.empty":"ファイルが開かれていません","home.emptyHint":"「新規」タブでファイルを選択してください","home.remove":"削除","drawer.empty":"セッションが紐付けられていません","drawer.unbind":"紐付け解除","drawer.bind":"セッションを紐付け","drawer.logout":"ログアウト","windowbar.newWindow":"新規ウィンドウ","rename.new_name":"新しい名前","rename.name_placeholder":"短い名前","rename.name_rule":"英数字とハイフンのみ(≤16文字)","rename.failed":"名前の変更に失敗しました。再試行してください","rename.saving":"保存中…","newwindow.title":"新規ウィンドウ","newwindow.window_name":"ウィンドウ名(任意)","newwindow.name_placeholder":"空白で自動命名","newwindow.name_rule":"英数字とハイフンのみ(≤16文字)","newwindow.start_dir":"開始ディレクトリ","newwindow.session_dir_named":"{dir}(セッションディレクトリ)","newwindow.session_dir_default":"セッションディレクトリ(デフォルト)","newwindow.choose":"選択","newwindow.reset_to_session_dir":"セッションディレクトリにリセット","newwindow.creating":"作成中…","startup.label":"起動コマンド(任意)","startup.aria":"起動コマンド","startup.preset_shell":"空のシェル(デフォルト)","startup.preset_claude":"claude(Claude Code を起動)","startup.preset_claude_continue":"claude -c(前回のセッションを継続)","startup.preset_codex":"codex(Codex CLI を起動)","startup.custom":"カスタム…","startup.custom_placeholder":'例:claude "ログインバグを修正"',"bind.title":"セッションを紐付け","bind.sessionName":"セッション名","bind.namePlaceholder":"新しいセッション名","bind.pickSession":"紐付けるセッションを選択","bind.newSession":"+ 新規セッション","bind.alreadyExists":"このセッションは既に存在します","bind.bind":"紐付け","bind.checking":"確認中…","bind.createAndOpen":"作成して開く","bind.creating":"作成中…","bind.createHint":"セッション「{name}」が存在しません。「作成して開く」をタップして作成してください","bind.alreadyBound":"このセッションはすでに紐付けられています","bind.createFailed":"作成に失敗しました。再試行してください","bind.invalidName":"英数字とハイフンのみ(≤16文字)","bind.desktopHint":"ここのセッション(スマホで作成したものも)は、PC で 1 コマンドで引き継げます:handmux open <名前>","bind.checkFailed":"確認に失敗しました。再試行してください","bind.startDir":"開始ディレクトリ","bind.homeDirDefault":"ホームディレクトリ(デフォルト)","bind.choose":"選択","bind.reset":"リセット","actionsheet.confirmAgain":"確認しますか?もう一度タップ","dirpicker.title":"ディレクトリを選択","inbox.title":"受信トレイ","inbox.working":"進行中","inbox.done":"完了","inbox.needs":"要対応","inbox.clearDone":"完了済みをクリア","inbox.empty":"パネルの状態なし","inbox.enableTitle":"AI セッション通知を有効にする","inbox.enableHint":"各 Claude / Codex パネルを「進行中」「要対応」「完了」にマークし、対応が必要なときにプッシュ通知を送信します。","inbox.enableBtn":"有効にする","inbox.enabling":"有効化中…","inbox.enableFailed":"有効化に失敗しました——サーバーログを確認してください。","idea.title":"アイデア","idea.editPlaceholder":"アイデアを編集…","idea.addPlaceholder":"アイデアを記録…","idea.add":"追加","idea.empty":"まだアイデアがありません。記録してみましょう","idea.dragSort":"ドラッグで並べ替え","idea.fillInput":"入力欄に挿入","idea.send":"送信","doclink.title":"ファイルを開く","changelog.title":"新機能","preview.dynamic":"ダイナミックプレビュー","preview.static":"静的プレビュー","preview.remainTitle":"残り有効期限 — タップして更新 / 停止","preview.toPcView":"PCビューに切り替え","preview.toMobileView":"モバイルビューに切り替え","preview.pcView":"PCビュー","preview.mobileView":"モバイルビュー","preview.refresh":"更新","preview.minimize":"最小化","preview.ttlDialog":"プレビュー有効期限","preview.renew":"更新(1時間にリセット)","preview.stop":"プレビューを停止","preview.iframeTitle":"プレビュー","preview.zoomOut":"縮小","preview.zoomIn":"拡大","imageviewer.loadFailed":"画像の読み込みに失敗しました","imageviewer.saved":"保存しました。フォトライブラリまたは「ダウンロード」で確認できます","imageviewer.shareUnsupported":"画像の共有には Chrome または Safari が必要です","imageviewer.zoomOut":"縮小","imageviewer.zoomIn":"拡大","imageviewer.imageTitle":"画像","imageviewer.saveImage":"画像を保存","imageviewer.shareImage":"画像を共有","mic.stop":"音声入力を停止","mic.start":"音声入力","dock.send":"送信","dock.send.hint":"タップで送信 · 長押しで挿入","dock.phrases":"よく使うフレーズ","dock.attach":"添付","dock.history":"履歴","history.empty":"履歴はまだありません","history.scope":"このウィンドウの記録のみ","dock.input.placeholder":"メッセージを入力…","dock.command.placeholder":"コマンドを入力 · Enterで実行","dock.mode.agent":"会話","dock.mode.toggle":"入力モードを切替","dock.mode.command":"コマンド","dock.mode.chat":"チャット","fav.title":"よく使う","fav.add":"追加","fav.addPlaceholder":"よく使う項目を追加…","dock.upload.aria":"ファイルをアップロード","dock.upload.title":"ファイルをアップロード(ホームのアップロードフォルダに保存、プロジェクトには含まない)","dock.upload.progress":"{name}{tag} をアップロード中","dock.upload.failed":"アップロード失敗:{names}","app.nameExists":"その名前はすでに使われています","app.renameFailed":"名前の変更に失敗しました。再試行してください","app.deleteFailed":"削除に失敗しました。再試行してください","app.moveFailed":"移動に失敗しました。再試行してください","app.sessionGone":"セッション「{name}」が存在しません。閉じられた可能性があります","app.docNotFound":"ファイルが存在しません","app.docTooLarge":"ファイルが大きすぎます(2MB超)","app.docUnsupported":"サポートされていないファイルまたはパス","app.docOpenFailed":"開くのに失敗しました。再試行してください","app.preview":"プレビュー","app.openPreview":"プレビューを開く","app.ideas":"アイデア","app.files":"ファイル","app.settings":"設定","app.renameSession":"セッション名を変更","app.renameWindow":"ウィンドウ名を変更","app.moveLeft":"◀ 左へ移動","app.moveRight":"右へ移動 ▶","app.deleteWindow":"ウィンドウを削除","app.deleteLastWindowConfirm":"これは最後のウィンドウです。削除するとセッション全体が閉じます!もう一度タップ","app.deleteConfirm":"削除しますか?もう一度タップ","app.cannotLocate":"場所を特定できません","app.pickItsDir":"。ディレクトリを選択してください:","app.noBoundSession":"セッションが紐付けられていません","app.tapToBind":"タップして紐付け","app.selectSessionHint":"左上の ☰ をタップしてセッションを選択","app.backToExit":"もう一度戻るで終了します","settings.title":"設定","settings.group_global":"グローバル設定","settings.font_size":"フォントサイズ","settings.font_decrease":"フォントを縮小","settings.font_increase":"フォントを拡大","settings.font_auto":"自動調整","settings.font_auto_title":"高さに合わせて自動調整","settings.path_highlight":"ファイルパスをハイライト","settings.path_highlight_hint":"ターミナル内のタップ可能なファイルパスに色を付けます。オフでもパスはタップできます。","settings.whats_new":"新機能","settings.view_changelog":"変更履歴を表示","settings.has_update":"更新あり","settings.version":"バージョン","settings.feedback":"フィードバック","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat グループ","settings.feedback_hint":"バグ報告や要望は Issue へ — 必ず追跡・返信されます。","settings.update_available":"バージョン {v} が利用可能","settings.update_how":"パソコンで実行:","settings.push_notifications":"プッシュ通知","settings.notify_on":"有効 ✓","settings.notify_enable":"デバイス通知を有効にする","settings.notify_enabled":"有効にしました。ウェルカム通知が届くはずです","settings.notify_disabled":"無効","settings.notify_failed":"操作に失敗しました","settings.processing":"処理中","settings.push_hint":"「要対応」と「完了」を監視:注目しているセッションが承認/回答を必要としているとき、またはラウンドが完了したときにこのデバイスへ通知します。","settings.push_unsupported":"プッシュ通知には Chrome または Safari が必要です","settings.group_session":"現在のセッション設定","settings.screen_cols":"画面の列数","settings.cols_dec":"減らす","settings.cols_dec_title":"列数を減らす","settings.cols_inc":"増やす","settings.cols_inc_title":"列数を増やす","settings.cols_restore":"デフォルト","settings.cols_restore_title":"ウィンドウのデフォルトサイズに戻す","settings.preview_site":"プレビューサイト","settings.preview_static_site":"静的サイトをプレビュー","settings.preview_running_dynamic":"ダイナミックプレビュー 実行中","settings.preview_running_static":"静的プレビュー 実行中","settings.preview_remain_title":"残り有効期限","settings.preview_remain":"残り {time}","settings.preview_renew":"更新","settings.preview_confirm_stop":"停止を確認","settings.preview_stop":"停止","settings.preview_name":"名前:{name}","settings.preview_port":"(ポート:{port})","settings.preview_type":"プレビュータイプ","settings.preview_off":"無効","settings.preview_static":"静的","settings.preview_dynamic":"ダイナミック","settings.preview_off_hint":"プレビューは無効です。「静的」を選択して開始してください。","settings.preview_off_hint_both":"プレビューは無効です。「静的」または「ダイナミック」を選択して開始してください。","settings.preview_dynamic_disabled":"ダイナミックポートプレビューは無効です。有効にするには:ワイルドカードプレビュードメイン(previewDomain、例:*.example.com)をゲートウェイに向け、対応するTLS証明書を設定してください。Cloudflare /自己署名証明書の違いはREADMEを参照。","settings.preview_pick_dir":"ディレクトリを選択して開始","settings.preview_static_hint":"index.html を含むディレクトリを選択して、スマートフォンでプレビュー。","settings.preview_port_placeholder":"ポート番号(例:3000)","settings.preview_port_label":"ポート","settings.preview_starting":"起動中…","settings.preview_start":"起動","settings.preview_dynamic_hint":"ローカルで実行中のポート(devサーバー / バックエンド)を入力すると、スマートフォンからサブドメイン経由でアクセスできます。","settings.dir_picker_hint":"プレビューする静的サイトのディレクトリを選択(index.html を含む)","settings.err_port_not_listening":"そのポートはリッスンしていません。サービスが起動しているか確認してください","settings.err_bad_port":"ポート番号が無効です(1〜65535)","settings.err_dynamic_disabled":"ダイナミックプレビューは無効です","settings.err_start_failed":"起動に失敗しました","filebrowser.openDirFailed":"ディレクトリを開けませんでした","filebrowser.copiedPath":"パスをコピーしました:{abs}","filebrowser.mkdirFailed":"ディレクトリの作成に失敗しました(名前が無効または既に存在します)","filebrowser.downloading":"{name} をダウンロード中","filebrowser.downloadFailed":"ダウンロードに失敗しました","filebrowser.uploading":"{name}{tag} をアップロード中","filebrowser.uploadFailed":"アップロードに失敗しました","filebrowser.uploadPartialFailed":"以下のファイルのアップロードに失敗しました:{names}","filebrowser.sessionDir":"セッションディレクトリ","filebrowser.jumpToSessionDir":"現在のセッションディレクトリへ移動","filebrowser.parentDir":"親ディレクトリ","filebrowser.rootSelect":"ルートディレクトリを切り替え(ホーム / 一時)","filebrowser.pathPlaceholder":"パスを入力(リアルタイムフィルタ / ジャンプ)","filebrowser.newFolder":"新規フォルダ","filebrowser.createBtn":"作成","filebrowser.uploadFile":"ファイルをアップロード","filebrowser.uploadToCurrentDir":"現在のディレクトリにアップロード","filebrowser.enterSubdirToUpload":"サブディレクトリに移動してからアップロードしてください","filebrowser.folderNamePlaceholder":"フォルダ名","filebrowser.uploadPendingTo":"「{name}」を現在のディレクトリにアップロード","filebrowser.enterSubdirFirst":"(先にサブディレクトリに移動してください)","filebrowser.upload":"アップロード","filebrowser.savedToDownloads":"「{name}」を「ダウンロード」フォルダに保存しました。ファイルマネージャーで確認できます","filebrowser.noMatches":"一致するファイルまたはディレクトリがありません","filebrowser.tooMany":"合計 {total} 件、最初の {shown} 件のみ表示——パス欄にキーワードを入力してフィルタできます","filebrowser.previewUnsupported":"このファイルタイプのプレビューはサポートされていません。右のボタンでダウンロードできます","filebrowser.copyAbsPath":"絶対パスをコピー","filebrowser.download":"ダウンロード","filebrowser.pickThisDir":"このディレクトリを選択 {path}","filebrowser.downloadConfirm":"{name} をダウンロードしますか?","filemanager.files":"ファイル","filemanager.closeTab":"タブを閉じる","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"ディレクトリ","git.errReadRepo":"リポジトリを読み込めませんでした","git.errLoad":"読み込みに失敗しました","git.noRepoInDir":"このディレクトリにはまだ git リポジトリがありません — 別のディレクトリを選ぶか、ここで git init してください。","git.outsideRoots":"このフォルダは handmux がアクセスできる範囲外です — ホームディレクトリと /tmp のみ開けます。リポジトリをホーム配下に移すとここで閲覧できます。","git.errReadDir":"ディレクトリを読み込めませんでした","git.commitDetail":"コミット詳細","git.diff":"差分","git.bindRepo":"リポジトリを紐付け","git.collapse":"折りたたむ","git.currentBranch":"現在のブランチ","git.switchViewedBranch":"表示するブランチを切り替え","git.switchBranch":"ブランチを切り替え","git.noBranches":"ブランチがありません","git.noRepoBound":"リポジトリが紐付けられていません。左上の「+」をタップしてディレクトリを選択してください。","git.changes":"変更","git.commits":"コミット","git.pullToLoadMore":"引っ張ってさらに読み込む","git.pickerHint":"ディレクトリを選択すると、その中の git リポジトリを自動的に検索します","git.cleanTree":"ワーキングツリーはクリーンです","git.noCommits":"コミットがありません","git.noDiff":"差分なし","git.fontSmaller":"フォントを縮小","git.fontLarger":"フォントを拡大","git.diffTruncated":"差分が大きすぎるため、切り捨てられました","cmd.panel":"コマンドパネル","cmd.title":"コマンド","cmd.empty":"コマンドがありません。送信するか、よく使うものを保存してください","cmd.favorites":"お気に入り","cmd.scopeGlobal":"グローバル · 全セッション","cmd.recent":"最近","cmd.scopeSession":"このセッションのみ","cmd.favorite":"お気に入りに追加","cmd.unfavorite":"お気に入りから削除","doc.home":"最近","doc.read":"読み上げ","doc.pauseRead":"一時停止","doc.resumeRead":"再開","doc.stopRead":"読み上げを停止","doc.rate":"読み上げ速度","doc.fontSmaller":"フォントを縮小","doc.fontLarger":"フォントを拡大","inbox.view.working":"進行中","inbox.view.done":"完了","inbox.view.needs":"要対応","push.unsupported":"プッシュ通知には Chrome または Safari が必要です","push.iosAddToHome":"iOS では先にこのサイトを「ホーム画面に追加」し、ホーム画面のアイコンから開いてください","a2hs.title":"handmux をホーム画面に追加","a2hs.lead":"アプリのように全画面で開けます。iPhone では、pane があなたを必要とするときの通知もこれで届きます。","a2hs.install":"handmux をインストール","a2hs.ios1":"Safari の共有ボタン(⬆︎ の四角)をタップ。","a2hs.ios2":"「その他」をタップ、または下にスクロール。","a2hs.ios3":"「ホーム画面に追加」を選び、「追加」をタップ。","a2hs.iosHint":"Safari で:共有 → その他 → ホーム画面に追加。","a2hs.iosOpenSafari":"現在 Safari ではありません。Safari でこのページを開いてからホーム画面に追加してください(他の iOS ブラウザではインストールできません)。","a2hs.androidManual":"ブラウザのメニュー(⋮)から「ホーム画面に追加」または「アプリをインストール」を選択。","a2hs.later":"あとで","push.permissionDenied":"通知の権限が拒否されました","push.noVapid":"サーバーにプッシュ通知(VAPID)が設定されていません","push.subscribeFailed":"サブスクリプションの登録に失敗しました","push.sendFailed":"送信に失敗しました","api.loadFailed":"読み込みに失敗しました","api.uploadFailed":"アップロードに失敗しました","upload.title":"アップロード中","upload.processing":"送信完了 — サーバーで受信中…","api.uploadBadDir":"そのディレクトリへはアップロードできません","api.uploadDuplicate":"同名のファイルが既に存在します","api.uploadTooLarge":"ファイルが大きすぎます(上限 50MB)","api.uploadBadType":"サポートされていないファイルタイプです","time.secAgo":"{n}秒前","time.minAgo":"{n}分前","time.hourAgo":"{n}時間前","time.dayAgo":"{n}日前","time.expired":"期限切れ","time.minutes":"{n} 分"},DL={"common.save":"저장","common.cancel":"취소","common.confirm":"확인","common.ok":"확인","common.close":"닫기","common.delete":"삭제","common.copy":"복사","common.rename":"이름 변경","common.create":"새로 만들기","common.back":"뒤로","common.open":"열기","common.loading":"로드 중…","common.done":"완료","token.title":"액세스 토큰이 필요합니다","token.placeholder":"HANDMUX_TOKEN 붙여넣기","settings.language":"언어 Language","home.empty":"열린 파일이 없습니다","home.emptyHint":"「새로 만들기」 탭에서 파일을 선택하세요","home.remove":"제거","drawer.empty":"연결된 세션이 없습니다","drawer.unbind":"연결 해제","drawer.bind":"세션 연결","drawer.logout":"로그아웃","windowbar.newWindow":"새 창","rename.new_name":"새 이름","rename.name_placeholder":"짧은 이름","rename.name_rule":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","rename.failed":"이름 변경에 실패했습니다. 다시 시도하세요","rename.saving":"저장 중…","newwindow.title":"새 창","newwindow.window_name":"창 이름(선택 사항)","newwindow.name_placeholder":"비워두면 자동 이름 지정","newwindow.name_rule":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","newwindow.start_dir":"시작 디렉토리","newwindow.session_dir_named":"{dir}(세션 디렉토리)","newwindow.session_dir_default":"세션 디렉토리(기본값)","newwindow.choose":"선택","newwindow.reset_to_session_dir":"세션 디렉토리로 초기화","newwindow.creating":"생성 중…","startup.label":"시작 명령(선택 사항)","startup.aria":"시작 명령","startup.preset_shell":"빈 셸(기본값)","startup.preset_claude":"claude(Claude Code 시작)","startup.preset_claude_continue":"claude -c(이전 세션 이어서)","startup.preset_codex":"codex(Codex CLI 시작)","startup.custom":"사용자 정의…","startup.custom_placeholder":'예:claude "로그인 버그 수정"',"bind.title":"세션 연결","bind.sessionName":"세션 이름","bind.namePlaceholder":"새 세션 이름","bind.pickSession":"연결할 세션 선택","bind.newSession":"+ 새 세션","bind.alreadyExists":"이미 존재하는 세션입니다","bind.bind":"연결","bind.checking":"확인 중…","bind.createAndOpen":"생성 후 열기","bind.creating":"생성 중…","bind.createHint":"세션「{name}」이 존재하지 않습니다. 「생성 후 열기」를 탭하여 생성하세요","bind.alreadyBound":"이미 연결된 세션입니다","bind.createFailed":"생성에 실패했습니다. 다시 시도하세요","bind.invalidName":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","bind.desktopHint":"여기의 세션(폰에서 만든 것 포함)은 컴퓨터에서 명령 하나로 이어받을 수 있습니다: handmux open <이름>","bind.checkFailed":"확인에 실패했습니다. 다시 시도하세요","bind.startDir":"시작 디렉토리","bind.homeDirDefault":"홈 디렉토리(기본값)","bind.choose":"선택","bind.reset":"초기화","actionsheet.confirmAgain":"확인하시겠습니까? 한 번 더 탭하세요","dirpicker.title":"디렉토리 선택","inbox.title":"받은 편지함","inbox.working":"진행 중","inbox.done":"완료","inbox.needs":"확인 필요","inbox.clearDone":"완료 항목 지우기","inbox.empty":"패널 상태 없음","inbox.enableTitle":"AI 세션 알림 활성화","inbox.enableHint":"각 Claude / Codex 패널을 「진행 중」「확인 필요」「완료」로 표시하고, 확인이 필요할 때 푸시 알림을 보냅니다.","inbox.enableBtn":"활성화","inbox.enabling":"활성화 중…","inbox.enableFailed":"활성화에 실패했습니다——서버 로그를 확인하세요.","idea.title":"아이디어","idea.editPlaceholder":"아이디어 편집…","idea.addPlaceholder":"아이디어를 기록하세요…","idea.add":"추가","idea.empty":"아직 아이디어가 없습니다. 하나 기록해보세요","idea.dragSort":"드래그하여 정렬","idea.fillInput":"입력창에 삽입","idea.send":"보내기","doclink.title":"파일 열기","changelog.title":"새 기능","preview.dynamic":"동적 미리보기","preview.static":"정적 미리보기","preview.remainTitle":"남은 유효 기간 — 탭하여 갱신 / 중지","preview.toPcView":"PC 보기로 전환","preview.toMobileView":"모바일 보기로 전환","preview.pcView":"PC 보기","preview.mobileView":"모바일 보기","preview.refresh":"새로 고침","preview.minimize":"최소화","preview.ttlDialog":"미리보기 유효 기간","preview.renew":"갱신(1시간으로 초기화)","preview.stop":"미리보기 중지","preview.iframeTitle":"미리보기","preview.zoomOut":"축소","preview.zoomIn":"확대","imageviewer.loadFailed":"이미지를 불러오지 못했습니다","imageviewer.saved":"저장되었습니다. 사진 앱 또는 「다운로드」에서 확인할 수 있습니다","imageviewer.shareUnsupported":"이미지 공유는 Chrome 또는 Safari가 필요합니다","imageviewer.zoomOut":"축소","imageviewer.zoomIn":"확대","imageviewer.imageTitle":"이미지","imageviewer.saveImage":"이미지 저장","imageviewer.shareImage":"이미지 공유","mic.stop":"음성 입력 중지","mic.start":"음성 입력","dock.send":"보내기","dock.send.hint":"탭하여 보내기 · 길게 눌러 삽입","dock.phrases":"자주 쓰는 문구","dock.attach":"첨부","dock.history":"기록","history.empty":"기록이 아직 없습니다","history.scope":"현재 창의 기록만","dock.input.placeholder":"메시지를 입력하세요…","dock.command.placeholder":"명령 입력 · Enter로 실행","dock.mode.agent":"대화","dock.mode.toggle":"입력 모드 전환","dock.mode.command":"명령 모드","dock.mode.chat":"채팅 모드","fav.title":"자주 쓰기","fav.add":"추가","fav.addPlaceholder":"자주 쓰는 항목 추가…","dock.upload.aria":"파일 업로드","dock.upload.title":"파일 업로드(홈 업로드 폴더에 저장, 프로젝트에는 포함되지 않음)","dock.upload.progress":"{name}{tag} 업로드 중","dock.upload.failed":"업로드 실패:{names}","app.nameExists":"해당 이름은 이미 사용 중입니다","app.renameFailed":"이름 변경에 실패했습니다. 다시 시도하세요","app.deleteFailed":"삭제에 실패했습니다. 다시 시도하세요","app.moveFailed":"이동에 실패했습니다. 다시 시도하세요","app.sessionGone":"세션「{name}」이 존재하지 않습니다. 이미 닫혔을 수 있습니다","app.docNotFound":"파일이 존재하지 않습니다","app.docTooLarge":"파일이 너무 큽니다(2MB 초과)","app.docUnsupported":"지원되지 않는 파일 또는 경로","app.docOpenFailed":"열기에 실패했습니다. 다시 시도하세요","app.preview":"미리보기","app.openPreview":"미리보기 열기","app.ideas":"아이디어","app.files":"파일","app.settings":"설정","app.renameSession":"세션 이름 변경","app.renameWindow":"창 이름 변경","app.moveLeft":"◀ 왼쪽으로 이동","app.moveRight":"오른쪽으로 이동 ▶","app.deleteWindow":"창 삭제","app.deleteLastWindowConfirm":"마지막 창입니다. 삭제하면 전체 세션이 닫힙니다!한 번 더 탭하세요","app.deleteConfirm":"삭제하시겠습니까? 한 번 더 탭하세요","app.cannotLocate":"위치를 찾을 수 없습니다","app.pickItsDir":",디렉토리를 선택하세요:","app.noBoundSession":"연결된 세션이 없습니다","app.tapToBind":"탭하여 연결","app.selectSessionHint":"왼쪽 상단의 ☰ 를 탭하여 세션 선택","app.backToExit":"한 번 더 뒤로가기를 누르면 종료됩니다","settings.title":"설정","settings.group_global":"전체 설정","settings.font_size":"글꼴 크기","settings.font_decrease":"글꼴 축소","settings.font_increase":"글꼴 확대","settings.font_auto":"자동 조정","settings.font_auto_title":"높이에 맞게 자동 조정","settings.path_highlight":"파일 경로 강조","settings.path_highlight_hint":"터미널에서 탭 가능한 파일 경로에 색을 입힙니다. 꺼져 있어도 경로는 탭할 수 있습니다.","settings.whats_new":"새 기능","settings.view_changelog":"변경 내역 보기","settings.has_update":"업데이트 있음","settings.version":"버전","settings.feedback":"피드백","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat 그룹","settings.feedback_hint":"버그와 아이디어 모두 환영 — Issue는 추적되고 답변됩니다.","settings.update_available":"버전 {v} 사용 가능","settings.update_how":"컴퓨터에서 실행:","settings.push_notifications":"푸시 알림","settings.notify_on":"활성화됨 ✓","settings.notify_enable":"기기 알림 활성화","settings.notify_enabled":"활성화되었습니다. 환영 알림이 도착할 것입니다","settings.notify_disabled":"비활성화됨","settings.notify_failed":"작업에 실패했습니다","settings.processing":"처리 중","settings.push_hint":"「확인 필요」및「완료」를 모니터링:관심 세션에서 승인/응답이 필요하거나 한 라운드가 완료되면 이 기기로 알림을 보냅니다.","settings.push_unsupported":"푸시 알림은 Chrome 또는 Safari가 필요합니다","settings.group_session":"현재 세션 설정","settings.screen_cols":"화면 열 수","settings.cols_dec":"감소","settings.cols_dec_title":"열 수 감소","settings.cols_inc":"증가","settings.cols_inc_title":"열 수 증가","settings.cols_restore":"기본값","settings.cols_restore_title":"창 기본 크기로 복원","settings.preview_site":"미리보기 사이트","settings.preview_static_site":"정적 사이트 미리보기","settings.preview_running_dynamic":"동적 미리보기 실행 중","settings.preview_running_static":"정적 미리보기 실행 중","settings.preview_remain_title":"남은 유효 기간","settings.preview_remain":"남은 시간 {time}","settings.preview_renew":"갱신","settings.preview_confirm_stop":"중지 확인","settings.preview_stop":"중지","settings.preview_name":"이름:{name}","settings.preview_port":"(포트:{port})","settings.preview_type":"미리보기 유형","settings.preview_off":"비활성화","settings.preview_static":"정적","settings.preview_dynamic":"동적","settings.preview_off_hint":"미리보기가 비활성화되어 있습니다. 「정적」을 선택하여 시작하세요.","settings.preview_off_hint_both":"미리보기가 비활성화되어 있습니다. 「정적」또는「동적」을 선택하여 시작하세요.","settings.preview_dynamic_disabled":"동적 포트 미리보기가 비활성화되어 있습니다. 활성화하려면:와일드카드 미리보기 도메인(previewDomain, 예:*.example.com)을 게이트웨이로 지정하고 TLS 인증서를 설정하세요. Cloudflare /자체 서명 인증서 차이는 README를 참조하세요.","settings.preview_pick_dir":"디렉토리를 선택하여 시작","settings.preview_static_hint":"index.html이 포함된 디렉토리를 선택하여 스마트폰에서 미리보기.","settings.preview_port_placeholder":"포트 번호(예:3000)","settings.preview_port_label":"포트","settings.preview_starting":"시작 중…","settings.preview_start":"시작","settings.preview_dynamic_hint":"로컬에서 실행 중인 포트(dev 서버 / 백엔드)를 입력하면 스마트폰에서 서브도메인을 통해 직접 접속할 수 있습니다.","settings.dir_picker_hint":"미리볼 정적 사이트 디렉토리 선택(index.html 포함)","settings.err_port_not_listening":"해당 포트가 수신 대기 중이지 않습니다. 서비스가 시작되었는지 확인하세요","settings.err_bad_port":"포트 번호가 유효하지 않습니다(1–65535)","settings.err_dynamic_disabled":"동적 미리보기가 비활성화되어 있습니다","settings.err_start_failed":"시작에 실패했습니다","filebrowser.openDirFailed":"디렉토리를 열 수 없습니다","filebrowser.copiedPath":"경로가 복사되었습니다:{abs}","filebrowser.mkdirFailed":"디렉토리 생성에 실패했습니다(이름이 유효하지 않거나 이미 존재합니다)","filebrowser.downloading":"{name} 다운로드 중","filebrowser.downloadFailed":"다운로드에 실패했습니다","filebrowser.uploading":"{name}{tag} 업로드 중","filebrowser.uploadFailed":"업로드에 실패했습니다","filebrowser.uploadPartialFailed":"다음 파일 업로드에 실패했습니다:{names}","filebrowser.sessionDir":"세션 디렉토리","filebrowser.jumpToSessionDir":"현재 세션 디렉토리로 이동","filebrowser.parentDir":"상위 디렉토리","filebrowser.rootSelect":"루트 디렉토리 전환(홈 / 임시)","filebrowser.pathPlaceholder":"경로 입력(실시간 필터 / 이동)","filebrowser.newFolder":"새 폴더","filebrowser.createBtn":"생성","filebrowser.uploadFile":"파일 업로드","filebrowser.uploadToCurrentDir":"현재 디렉토리에 업로드","filebrowser.enterSubdirToUpload":"하위 디렉토리로 이동한 후 업로드하세요","filebrowser.folderNamePlaceholder":"폴더 이름","filebrowser.uploadPendingTo":"「{name}」을 현재 디렉토리에 업로드","filebrowser.enterSubdirFirst":"(먼저 하위 디렉토리로 이동하세요)","filebrowser.upload":"업로드","filebrowser.savedToDownloads":"「{name}」이 「다운로드」 폴더에 저장되었습니다. 파일 관리자에서 확인할 수 있습니다","filebrowser.noMatches":"일치하는 파일 또는 디렉토리가 없습니다","filebrowser.tooMany":"총 {total}개, 처음 {shown}개만 표시——경로 입력창에 키워드를 입력하여 필터할 수 있습니다","filebrowser.previewUnsupported":"이 파일 유형의 미리보기는 지원되지 않습니다. 오른쪽 버튼으로 다운로드할 수 있습니다","filebrowser.copyAbsPath":"절대 경로 복사","filebrowser.download":"다운로드","filebrowser.pickThisDir":"이 디렉토리 선택 {path}","filebrowser.downloadConfirm":"{name}을 다운로드하시겠습니까?","filemanager.files":"파일","filemanager.closeTab":"탭 닫기","filemanager.minimize":"최소화","filemanager.recent":"최근","filemanager.directory":"디렉토리","git.errReadRepo":"저장소를 읽을 수 없습니다","git.errLoad":"불러오기에 실패했습니다","git.noRepoInDir":"아직 git 저장소가 없습니다 — 다른 디렉토리를 선택하거나 여기서 git init 하세요.","git.outsideRoots":"이 폴더는 handmux가 열 수 있는 범위 밖입니다 — 홈 디렉토리와 /tmp만 접근할 수 있습니다. 저장소를 홈 디렉토리 아래로 옮기면 여기서 볼 수 있습니다.","git.errReadDir":"디렉토리를 읽을 수 없습니다","git.commitDetail":"커밋 상세","git.diff":"변경 사항","git.bindRepo":"저장소 연결","git.collapse":"접기","git.currentBranch":"현재 브랜치","git.switchViewedBranch":"표시할 브랜치 전환","git.switchBranch":"브랜치 전환","git.noBranches":"브랜치가 없습니다","git.noRepoBound":"저장소가 연결되지 않았습니다. 왼쪽 상단의 「+」를 탭하여 디렉토리를 선택하세요.","git.changes":"변경사항","git.commits":"커밋","git.pullToLoadMore":"당겨서 더 불러오기","git.pickerHint":"디렉토리를 선택하면 그 안의 git 저장소를 자동으로 찾습니다","git.cleanTree":"작업 트리가 깨끗합니다","git.noCommits":"커밋이 없습니다","git.noDiff":"변경 사항 없음","git.fontSmaller":"글꼴 축소","git.fontLarger":"글꼴 확대","git.diffTruncated":"변경 사항이 너무 커서 잘렸습니다","cmd.panel":"명령 패널","cmd.title":"명령","cmd.empty":"명령이 없습니다. 보내거나 자주 쓰는 것을 저장하세요","cmd.favorites":"즐겨찾기","cmd.scopeGlobal":"전체 · 모든 세션","cmd.recent":"최근","cmd.scopeSession":"현재 세션만","cmd.favorite":"즐겨찾기 추가","cmd.unfavorite":"즐겨찾기 해제","doc.home":"최근","doc.read":"읽어주기","doc.pauseRead":"읽기 일시 정지","doc.resumeRead":"읽기 재개","doc.stopRead":"읽기 중지","doc.rate":"읽기 속도","doc.fontSmaller":"글꼴 축소","doc.fontLarger":"글꼴 확대","inbox.view.working":"진행 중","inbox.view.done":"완료","inbox.view.needs":"확인 필요","push.unsupported":"푸시 알림은 Chrome 또는 Safari가 필요합니다","push.iosAddToHome":"iOS에서는 먼저 이 사이트를 「홈 화면에 추가」한 후 홈 화면 아이콘에서 열어주세요","a2hs.title":"handmux를 홈 화면에 추가","a2hs.lead":"앱처럼 전체 화면으로 열 수 있습니다. iPhone에서는 pane이 당신을 필요로 할 때의 푸시도 이 방식으로 전달됩니다.","a2hs.install":"handmux 설치","a2hs.ios1":"Safari의 공유 버튼(⬆︎ 상자)을 탭하세요.","a2hs.ios2":"「더 보기」를 탭하거나 목록을 아래로 스크롤하세요.","a2hs.ios3":"「홈 화면에 추가」를 선택한 뒤 「추가」를 탭하세요.","a2hs.iosHint":"Safari에서: 공유 → 더 보기 → 홈 화면에 추가.","a2hs.iosOpenSafari":"현재 Safari가 아닙니다. Safari에서 이 페이지를 연 뒤 홈 화면에 추가하세요 — 다른 iOS 브라우저는 설치할 수 없습니다.","a2hs.androidManual":"브라우저 메뉴(⋮)에서 「홈 화면에 추가」 또는 「앱 설치」를 선택하세요.","a2hs.later":"나중에","push.permissionDenied":"알림 권한이 거부되었습니다","push.noVapid":"서버에 푸시 알림(VAPID)이 설정되지 않았습니다","push.subscribeFailed":"구독 등록에 실패했습니다","push.sendFailed":"전송에 실패했습니다","api.loadFailed":"불러오기에 실패했습니다","api.uploadFailed":"업로드에 실패했습니다","upload.title":"업로드 중","upload.processing":"전송 완료 — 서버에서 수신 중…","api.uploadBadDir":"해당 디렉토리에는 업로드할 수 없습니다","api.uploadDuplicate":"같은 이름의 파일이 이미 존재합니다","api.uploadTooLarge":"파일이 너무 큽니다(최대 50MB)","api.uploadBadType":"지원되지 않는 파일 유형입니다","time.secAgo":"{n}초 전","time.minAgo":"{n}분 전","time.hourAgo":"{n}시간 전","time.dayAgo":"{n}일 전","time.expired":"만료됨","time.minutes":"{n}분"},Rg={zh:NL,"zh-TW":CL,en:MS,ja:EL,ko:DL},cx=[{code:"zh",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"en",label:"English"},{code:"ja",label:"日本語"},{code:"ko",label:"한국어"}],US="tw_lang";function jL(c,a,d=Rg){if(c&&d[c])return c;for(const w of a&&a.length?a:["en"]){const j=String(w).toLowerCase();if(d[j])return j;const L=j.split("-")[0];if(d[L])return L}return"en"}function kL(c,a,d,w){let j=c&&c[d]!=null?c[d]:a&&a[d]!=null?a[d]:d;return w&&(j=j.replace(/\{(\w+)\}/g,(L,b)=>w[b]!=null?w[b]:`{${b}}`)),j}const RL=()=>typeof navigator<"u"?navigator.languages||[navigator.language]:null,TL=()=>{try{return localStorage.getItem(US)}catch{return null}};let jh=jL(TL(),RL());function B(c,a){return kL(Rg[jh],MS,c,a)}function hl(){return jh}function LL(c){if(!(!Rg[c]||c===jh)){try{localStorage.setItem(US,c)}catch{}jh=c,typeof location<"u"&&location.reload()}}const Tg="tw_token",Lg="tw_font",Ih="tw_bound",OS="tw_last_session",PS="tw_win",BS="tw_pane",Ag="tw_favs",AL="tw_recent",ML=30,og="tw_inbox_seen",IS="tw_inbox_read_ts",VS="tw_browse_dir",FS="tw_preview_dir",HS="tw_startup_cmd",lg="tw_chat_draft",UL="tw_ideas",zS="tw_changelog_seen",$S="tw_version_seen",Mg="tw_git_repos",co=()=>localStorage.getItem(Tg),OL=c=>localStorage.setItem(Tg,c),PL=()=>localStorage.removeItem(Tg);function so(){try{return JSON.parse(localStorage.getItem(Ih))||[]}catch{return[]}}function ux(c){const a=so();return a.includes(c)||a.push(c),localStorage.setItem(Ih,JSON.stringify(a)),a}function dx(c){const a=so().filter(d=>d!==c);return localStorage.setItem(Ih,JSON.stringify(a)),a}function BL(c,a){const d=so().map(w=>w===c?a:w);return localStorage.setItem(Ih,JSON.stringify(d)),Ug.renameSession(c,a),Vh.renameSession(c,a),d}function kr(c){try{const a=JSON.parse(localStorage.getItem(c));return a&&typeof a=="object"&&!Array.isArray(a)?a:{}}catch{return{}}}function xa(c,a,d){const w=kr(c);w[a]=d,localStorage.setItem(c,JSON.stringify(w))}function WS(c){const a=d=>d&&typeof d=="object"&&!Array.isArray(d)?d:{};return{get(d,w){return!d||!w?[]:a(kr(c)[d])[w]??[]},set(d,w,j){const L=kr(c),b=a(L[d]);return j&&j.length?b[w]=j:delete b[w],Object.keys(b).length?L[d]=b:delete L[d],localStorage.setItem(c,JSON.stringify(L)),j??[]},renameWindow(d,w,j){if(!d||!w||!j||w===j)return;const L=kr(c),b=a(L[d]);b[w]!=null&&(b[j]=b[w],delete b[w],L[d]=b,localStorage.setItem(c,JSON.stringify(L)))},renameSession(d,w){const j=kr(c);j[d]!=null&&(j[w]=j[d],delete j[d],localStorage.setItem(c,JSON.stringify(j)))}}}const Ug=WS(AL),Vh=WS(UL),hx=()=>kr(og);function fx(c,a){return xa(og,c,a),kr(og)}const IL=()=>{const c=localStorage.getItem(IS);return c==null?null:Number(c)},mx=c=>localStorage.setItem(IS,String(c)),VL=c=>c?kr(VS)[c]??null:null,px=(c,a)=>{c&&a&&xa(VS,c,a)},FL=c=>c?kr(FS)[c]??null:null,HL=(c,a)=>{c&&a&&xa(FS,c,a)},zL=()=>localStorage.getItem(OS),$L=c=>kr(PS)[c]??null,fh=c=>kr(BS)[c]??null;function Yc({sessionId:c,windowId:a,paneId:d}={}){c&&localStorage.setItem(OS,c),c&&a&&xa(PS,c,a),a&&d&&xa(BS,a,d)}function WL(){const c=Number(localStorage.getItem(Lg));return Number.isFinite(c)&&c>0?c:null}const qc=c=>localStorage.setItem(Lg,String(c)),GL=()=>localStorage.removeItem(Lg),YL=()=>localStorage.getItem(lg)||"",qL=c=>{c?localStorage.setItem(lg,c):localStorage.removeItem(lg)};function kh(){try{return JSON.parse(localStorage.getItem(Ag))||[]}catch{return[]}}function KL(c){const a=c.trim(),d=kh();return a&&!d.includes(a)&&d.push(a),localStorage.setItem(Ag,JSON.stringify(d)),d}function XL(c){const a=kh().filter(d=>d!==c);return localStorage.setItem(Ag,JSON.stringify(a)),a}const GS=()=>localStorage.getItem(HS)||"",YS=c=>localStorage.setItem(HS,c||""),qS="tw_orphan_kill",JL=()=>localStorage.getItem(qS)!=="0",ZL=c=>localStorage.setItem(qS,c?"1":"0"),KS="tw_doc_highlight",XS=()=>localStorage.getItem(KS)==="1",QL=c=>localStorage.setItem(KS,c?"1":"0"),Rh=(c,a)=>Ug.get(c,a),JS=(c,a,d)=>Ug.set(c,a,d);function eA(c,a,d){const w=(d||"").trim(),j=Rh(c,a);return!w||!c||!a?j:JS(c,a,[w,...j.filter(L=>L!==w)].slice(0,ML))}function tA(c,a,d){return!c||!a?Rh(c,a):JS(c,a,Rh(c,a).filter(w=>w!==d))}const Og="tw_recent_docs",ZS="tw_pane_base",nA=30;function tu(){try{return JSON.parse(localStorage.getItem(Og))||[]}catch{return[]}}function vx({path:c,name:a,type:d,ts:w=Date.now()}){const j=[{path:c,name:a,type:d,ts:w},...tu().filter(L=>L.path!==c)].slice(0,nA);return localStorage.setItem(Og,JSON.stringify(j)),j}function iA(c){const a=tu().filter(d=>d.path!==c);return localStorage.setItem(Og,JSON.stringify(a)),a}const gx=c=>kr(ZS)[c]??null,rA=(c,a)=>xa(ZS,c,a),Xs=[10,11,12,13,14,16,18,20,22],sA=4,QS="tw_doc_font";function aA(){const c=localStorage.getItem(QS),a=Number(c);return c!==null&&Number.isInteger(a)&&a>=0&&a<Xs.length?a:sA}const oA=c=>localStorage.setItem(QS,String(Math.min(Xs.length-1,Math.max(0,c)))),lA=2,e1="tw_diff_font";function cA(){const c=localStorage.getItem(e1),a=Number(c);return c!==null&&Number.isInteger(a)&&a>=0&&a<Xs.length?a:lA}const uA=c=>localStorage.setItem(e1,String(Math.min(Xs.length-1,Math.max(0,c)))),t1=(c,a)=>Vh.get(c,a);function _x(c,a,d){return!c||!a?[]:Vh.set(c,a,d)}const dA=()=>localStorage.getItem(zS),hA=c=>{c&&localStorage.setItem(zS,c)},fA=()=>localStorage.getItem($S),mA=c=>{c&&localStorage.setItem($S,c)};function pA(c,a,d){Vh.renameWindow(c,a,d)}function Pg(c){if(!c)return[];const a=kr(Mg)[c];return Array.isArray(a)?a:[]}function bx(c,a){if(!c)return[];const d=[...Pg(c)];for(const w of a)w&&!d.includes(w)&&d.push(w);return xa(Mg,c,d),d}function vA(c,a){if(!c)return[];const d=Pg(c).filter(w=>w!==a);return xa(Mg,c,d),d}const cg=[{version:"0.15.0",date:"2026-07-14",highlight:{zh:"键盘弹起终端自适应 · 全屏程序可上下滚动",en:"Keyboard-aware terminal · scroll inside full-screen apps"},items:{zh:["键盘弹起时终端不再被顶飞:内容自动重排到键盘上方,主屏短内容贴着键盘上沿显示;全屏程序(vim/less/htop 等)可以在里面上下滚动、到顶/底才翻页,默认显示程序的第一行,移动光标时自动跟随。","全屏程序翻页键上方新增「适配高度」和「定位」两个按钮:「适配高度」一键缩字号,收起键盘就能把整屏程序完整塞进手机屏;「定位」点亮后高亮光标所在行并跟随,方便在长内容里盯住光标。键盘弹起的瞬间光标也一直可见,不用再补按一下。","收件箱在一种特定场景下抓不到状态变更:你回应了权限弹窗、但那次回应没产生任何收尾信号时(普通授权、拒绝并反馈、或按 ESC 中断),它会停留在「需要你」。这一版补上识别——授权或拒绝反馈后回到「进行中」,ESC 中断则消掉状态。","光标不用点屏幕也能看到了:一进会话就能看到光标位置,发键/发指令后即使 Claude 正在忙也会亮着。","从设置里启动动态端口预览,现在会像静态预览一样自动弹出预览面板。","会话重命名撞到已有名字时,会明确提示「名称已存在」;修复了终端上滑一点后画面自己往上爬的问题。"],en:["The terminal no longer gets shoved off-screen when the keyboard opens: content reflows to sit just above the keyboard, with short main-screen output resting on its top edge. Full-screen programs (vim/less/htop, etc.) now scroll up/down inside themselves and only page at the edges, default to showing the program’s first line, and follow the cursor as you move it.","Two new buttons above the full-screen pager: “Fit height” shrinks the font in one tap so the whole program fits on the phone with the keyboard down, and “Locate” highlights and follows the cursor’s row so you can keep track of it in long content. The cursor also stays visible the moment the keyboard opens — no extra tap needed.","In one specific case the inbox couldn’t pick up a state change: when you responded to a permission prompt but that response produced no closing signal (a normal approval, a deny-with-feedback, or an ESC interrupt), it would linger on “needs you”. This release adds that detection — approving or denying returns it to “working”, and an ESC interrupt clears it.","The cursor now shows without tapping the screen: you can see where it is the moment you open a session, and it stays lit after you send a key/command even while Claude is busy.","Starting a dynamic-port preview from Settings now auto-opens the preview sheet, just like a static one.","Renaming a session to a name that already exists now says so clearly; and fixed the terminal creeping upward a line at a time after a small scroll up."]}},{version:"0.14.0",date:"2026-07-13",highlight:{zh:"终端文字选中拷贝 · 脚本复用推送通道",en:"Terminal select & copy · scripts reuse the push channel"},items:{zh:["终端可以长按选中文字了:iOS 式首尾手柄精调、跨屏选择,浮条一键拷贝/整行/整段,复制自动去掉行尾空格;选中期间顶部显示「复制模式 · N 行 · M 字」。","你自己的脚本也能复用 handmux 的推送通道:命令行用 handmux push <标题> <正文> 直接给手机发通知(可选 --session/--device 限定范围),脚本跑完主动提醒你。","滚动终端不再收起键盘:滑动时键盘保持、单击才收起;还能用 ⌨ 按钮或底部手柄拖拽显隐键盘,命令/聊天切换也保持键盘不掉。","往上滑看历史更顺了:一次滑到顶只加载一页、不再叠加拉取来回跳,位置稳停在你看的那行,顶部显示「距底 N/M 行」。","全屏程序(vim/less/htop 等)上方不再串出无关的终端历史。","修复了主页误触返回直接退出、以及从通知进入要多按一次返回才能退出的问题。"],en:["You can now long-press to select text in the terminal: iOS-style start/end handles, selection across screens, a callout to copy / whole line / whole paragraph, with trailing spaces trimmed on copy. A “copy mode · N lines · M chars” bar shows while selecting.","Your own scripts can reuse handmux’s push channel: run handmux push <title> <body> to send a notification straight to your phone (optionally scoped with --session/--device) — handy for a script pinging you when it finishes.","Scrolling the terminal no longer dismisses the keyboard: a swipe keeps it up, a single tap puts it away; you can also show/hide it with the ⌨ button or the dock’s grip handle, and it stays up when you switch between command and chat.","Scrolling up through history is smoother: reaching the top loads exactly one page instead of stacking pulls and jumping around, and your place holds steady on the line you were reading, with a “N/M lines from bottom” readout.","A full-screen program (vim/less/htop, etc.) no longer leaks unrelated terminal history above it.","Fixed a stray Back on the home page dropping you straight out, and needing an extra Back to leave after opening the app from a notification."]}},{version:"0.13.0",date:"2026-07-12",highlight:{zh:"终端文件路径高亮可点",en:"Tappable, highlighted file paths"},items:{zh:["终端里的文件路径现在会高亮显示、可以直接点开;这个高亮可以在设置里开关(默认关闭)。","桌面浏览器用鼠标滚轮往上翻,现在能拉出更深的历史了(不再卡在第一屏);桌面和手机都加了一条纤细的滚动条。","设置面板太高时可以整体滚动了,标题和关闭按钮始终可见、够得到。","修复了 agent 图标和底部输入模式偶尔乱跳的问题——现在按 agent 是否真的在运行来判断,分屏里每个窗格也各显各的图标。","handmux setup 新增「令牌」一项:可以手动固定访问令牌,这样每次重启后手机网址不再变化(留空则仍每次自动生成一个)。"],en:["File paths in the terminal are now highlighted and tappable — tap one to open it. You can toggle the highlight in Settings (off by default).","On a desktop browser the mouse wheel now pulls deeper history instead of stalling at the first screen, and a thin scrollbar was added on both desktop and mobile.","The Settings sheet scrolls as a whole when it is taller than the screen, with the title and close button always reachable.","Fixed the agent icon and the bottom input mode occasionally jumping around — both now track whether the agent is actually running, and each pane in a split shows its own icon.","handmux setup has a new “Token” item: you can pin the access token by hand so the phone URL stops changing on every restart (leave it blank to keep auto-generating one each start)."]}},{version:"0.12.3",date:"2026-07-11",highlight:{zh:"接管会话可自定义名称 + Homebrew 一键安装",en:"Name a takeover session · Homebrew install"},items:{zh:["接管电脑上的会话时,可以自己给新会话起名(默认也帮你填好);接管后想回电脑继续的命令,现在直接显示成 handmux open <名称>,照着敲即可。","新增 Homebrew 一键安装:没装 Node 的 Mac 也能用 brew install handmux/tap/handmux 一条命令装好(handmux + Node + tmux)。已有 Node 的话,npm i -g handmux 仍是更轻的选择。"],en:["When taking over a session running on your computer, you can now name the new session yourself (a default is filled in), and the “continue on the computer” hint shows the exact command to run — handmux open <name>.","New Homebrew install: on a Mac without Node, brew install handmux/tap/handmux sets up handmux, Node, and tmux in one command. If you already have Node, npm i -g handmux stays the lighter option."]}},{version:"0.12.2",date:"2026-07-11",highlight:{zh:"修复主屏图标偏大 / 换图标后不刷新",en:"Home-screen icon: right size & always fresh"},items:{zh:["修复了「添加到主屏」的图标在安卓上偏大、以及更换图标后旧图标不刷新的问题——图标更新现在会自动生效(已加到 iPhone 主屏的需删掉重加一次)。"],en:["Fixed the Add-to-Home-Screen icon looking oversized on Android and a changed icon not refreshing for returning users — icon updates now apply automatically (one already on an iOS home screen needs a one-time remove + re-add)."]}},{version:"0.12.1",date:"2026-07-11",highlight:{zh:"全新品牌图标与双色字标",en:"New brand icon & two-tone wordmark"},items:{zh:["焕新品牌:全新的发光终端图标(主屏图标、启动页都换了)+ 圆润的双色「handmux」字标(hand 白、mux 青→绿),官网、分享卡和 README 也一并更新。"],en:['Brand refresh: a new glowing terminal app icon (home-screen icon + boot splash) and a rounded two-tone "handmux" wordmark (hand in white, mux teal→green), with the site, share cards, and README updated to match.']}},{version:"0.12.0",date:"2026-07-11",highlight:{zh:"全屏程序也能滑动滚动 · 反馈入口 · 聊天草稿不丢",en:"Swipe-scroll full-screen apps · feedback channels · chat drafts kept"},items:{zh:["全屏程序(vim / htop / less 等)现在能直接滑动滚动了:开了鼠标的程序像电脑滚轮一样滑着滚,没开鼠标的分页器(less / man / git log)靠滑动逐行滚;每个全屏画面右侧还多了一枚翻页按钮做整页跳。","设置里新增「反馈与交流」:直达 GitHub Issues,中文用户还能扫码进微信交流群;README、官网、文档里也都能找到入口。","聊天框里没发出去的内容现在会自动保存,下次打开自动填回——误划走、切后台被杀、崩溃都不会再丢半截提示词。","修复:从终端链接或「最近」直接打开的文档,点返回会一次收起面板,不再被硬塞进「目录」层、再返一次直接退出 App。"],en:["Full-screen apps (vim / htop / less …) now scroll by swipe: mouse-mode apps scroll like a desktop wheel, and pagers (less / man / git log) scroll line-by-line on a swipe; every full-screen view also gets a page up/down button on the right for whole-page jumps.",'New "Feedback" section in Settings: a direct link to GitHub Issues, plus a WeChat user group for Chinese users — also surfaced in the README, the site, and the docs.',"Whatever you've typed in the chat box is now saved automatically and restored next time you open it — an accidental swipe-away, a background kill, or a crash no longer eats a half-written prompt.","Fixed: a doc opened straight from a terminal link or 最近 now closes the sheet in one Back press, instead of being forced into its folder view and then dropping you out of the app on the next Back."]}},{version:"0.11.1",date:"2026-07-09",highlight:{zh:"修复 Node 18 下无法启动的问题",en:"Fixes startup crash on Node 18"},items:{zh:["修复了电脑用 Node 18 时 handmux 任何命令都启动不了的问题(0.11.0 配置向导引入的依赖要求过新的 Node)。"],en:["Fixed handmux failing to start any command on Node 18 (a dependency introduced by the 0.11.0 setup wizard required a newer Node)."]}},{version:"0.11.0",date:"2026-07-08",highlight:{zh:"国内可用隧道 natapp/cpolar · 配置向导重做",en:"China-usable tunnels · setup redesigned"},items:{zh:["新增两条国内可用的隧道 natapp 和 cpolar:当 Cloudflare 在国内不稳定时,用你自己的免费账号就能把手机连到电脑。只要一个 authtoken;想要固定地址就填公网地址,留空则用免费临时域名;cpolar 的客户端还会自动下载。","`handmux setup` 重做成菜单式向导:每项设置一行、直接显示当前值,想改哪项就点哪项,不用再一路问到底。连接分两级——先选隧道类型,再进去配它的参数;推送、语音也各成小面板。第一次用会一步步带你走,默认落在「直连」并停在「保存并启动」,小白也能顺下来。"],en:["Two China-usable tunnels, natapp and cpolar: when Cloudflare is unreliable inside mainland China, reach your computer from your phone using your own free account. Just an authtoken; add a public URL for a fixed address or leave it blank for a free temporary one — and cpolar's client auto-downloads.",'`handmux setup` is now a menu-style wizard: every setting is a row showing its current value, so you jump straight to what you want to change instead of answering every prompt in order. Connection is two levels — pick the tunnel type, then configure it inside; push and voice are their own mini-panels. A first run walks you through it, defaulting to "Direct" with the cursor on "Save & start".']}},{version:"0.10.0",date:"2026-07-06",highlight:{zh:"升级前预览新功能 · 电脑 handmux open 接管",en:"Preview an update before installing · handmux open"},items:{zh:["更新提示现在会提前告诉你新版有什么:检测到有新版本时,设置里会逐版列出这次升级带来的新功能(一句话说明),让你在电脑上跑 `handmux update` 之前就知道值不值得。","电脑上新增 `handmux open <会话名>`:把你在手机上建的会话直接在电脑终端接回来(没有就新建),不用再记 `tmux new -A -s`。绑定/新建会话的弹窗里也加了这句提示。"],en:["The update notice now tells you what a new version brings before you install it: when an update is detected, Settings lists each newer version's highlight in one line, so you know whether it's worth running `handmux update` on your computer.","New `handmux open <session>` on the computer: reclaim a session you created from your phone straight into your computer's terminal (created if missing) — no need to remember `tmux new -A -s`. The bind/create dialog now hints at it too."]}},{version:"0.9.1",date:"2026-07-06",highlight:{zh:"「添加到主屏」引导",en:'"Add to Home Screen" coach'},items:{zh:["新增「添加到主屏」引导:第一次在浏览器里打开时,提示你把 handmux 装到主屏,像 App 一样全屏打开。安卓可一键安装;iPhone 给出 Safari 的「分享 → 更多 → 添加到主屏幕」三步——iOS 上收推送也需要它。装好后不再打扰。"],en:[`New "Add to Home Screen" coach: the first time you open handmux in a browser, it shows how to install it to your home screen and run it full-screen like an app. Android installs in one tap; iPhone gets the Safari steps (Share → More → Add to Home Screen) — which is also what iOS push needs. It won't nag once you've added it.`]}},{version:"0.9.0",date:"2026-07-05",highlight:{zh:"聊天输入框多行重做",en:"Multi-line chat composer redone"},items:{zh:["聊天输入框多行重做:文字占满整行,麦克风/发送悬到右下角,末行快挤到按钮才让出一行——长消息不再被右侧按钮列挤窄,多行时拖光标也不会误收键盘。"],en:["Chat composer redone for multi-line: text takes the full width, mic/send float in the bottom-right corner, and a row is yielded only when the last line actually reaches them — long messages are no longer squeezed by a right-hand button column, and dragging the caret no longer collapses the keyboard."]}},{version:"0.8.0",date:"2026-07-05",highlight:{zh:"快捷栏可自定义 · 上传体验重做",en:"Customizable quick-bars · upload redone"},items:{zh:["命令模式的常用命令分成「全局」和「当前窗口」两组:快捷栏里全局的(灰)排前、当前窗口的(绿)排后。尾部改成 ⚙ 齿轮,点开更高的编辑器分两区、各自 ▲▼ 排序。新增区一行搞定:顶部「命令/按键」大 Tab 选类型,左侧开关选加到全局还是本窗口。命令可勾「带回车」(点一下直接执行,末尾带 ⏎);按键用 ⌃⇧⌥ + 一个基键拼出组合键(如 Ctrl+C),点一下直接发到终端。","聊天模式的快捷条也能自定义了:末尾同样是 ⚙,点开编辑器,「消息/按键」两个 Tab —— 消息就是一句发给 agent 的话(以 / 开头当斜杠命令),按键用同一套 ⌃⇧⌥ + 基键拼组合键(ESC/Tab/退格默认就在里面)。点任意一条可回到弹窗改,▲▼ 排序。","上传体验重做:进度条不再一冲到 100% 就假装完事——先显示真实发送进度,字节发完后转成「服务器接收中…」,大文件不再像卡死。上传中可随时「取消」,已传完的文件会保留。","重名不再报错:上传一个已存在的文件名会自动改名(如 `报告 (1).pdf`),绝不覆盖原文件。上传失败时也会告诉你具体原因(过大 / 不支持的类型)。","现在可以上传视频了(mp4、mov、webm 等)。","Git 面板现在能打开 `/tmp` 等家目录以外的仓库(比如 agent 在 /tmp 里干活的项目),不再报红。","用量进度条新增「时间竖线」:标出当前重置窗口已过去的时间比例。已用量在竖线左边=烧得比时间慢(稳),越过竖线=烧得偏快,一眼看出自己的节奏。","新增版本更新提示:每次打开检测一次,服务端落后于 npm 最新版时设置齿轮亮红点,进设置能看到当前/最新版本号,按提示在电脑上跑 `handmux update` 升级即可。"],en:[`Command mode's saved commands now split into "Global" and "This window": the quick-bar shows global ones (grey) first, then this window's (green). The trailing + is now a ⚙ opening a taller two-section editor, each reorderable with ▲▼. One add row does it all: a big Command/Key tab picks the type, a left switch picks which list it lands in. Commands can tick "Send Enter" (a tap runs it, marked ⏎); keys are built from ⌃⇧⌥ + a base key into a combo like Ctrl+C that fires straight into the terminal.`,"Chat mode's quick-bar is now customizable too: the same ⚙ at the end opens an editor with a Message/Key tab — a message is a line sent to the agent (starts with / for a slash-command), a key is built from the same ⌃⇧⌥ + base-key picker (ESC/Tab/Backspace ship as defaults). Tap any row to re-open the card and edit it, ▲▼ to reorder.","Upload redone: the bar no longer jumps to 100% and then hangs — it shows real send progress, then flips to “receiving on the server…” once bytes are flushed, so a big file no longer looks stuck. You can Cancel mid-upload; already-uploaded files are kept.","Name clashes no longer fail: uploading an existing name auto-renames (e.g. `report (1).pdf`) and never overwrites. Failures now tell you why (too large / unsupported type).","Video files can now be uploaded (mp4, mov, webm, …).","The git panel can now open repos outside your home directory (e.g. a project an agent is working in under `/tmp`) instead of erroring.",`Usage bars now show a "time marker": a thin vertical line at how far the current reset window has elapsed. Usage left of the line = you're burning slower than the clock; past it = faster — pacing at a glance.`,"New update notice: checked once each time you open the app — when the server is behind the latest npm release, the settings gear lights a dot and Settings shows the current/latest version so you can run `handmux update` on your computer."]}},{version:"0.7.0",date:"2026-07-03",highlight:{zh:"新增「用量」页",en:'New "Usage" page'},items:{zh:["新增「用量」页(顶栏仪表盘图标):一眼看 Claude 的 5 小时 / 本周额度进度条 + 重置倒计时,以及 Codex 的额度环。全部读主机本地文件,不登录账号、不调用 API。Codex 零配置即用;Claude 的实时额度需要在电脑上运行一次 handmux hooks install(会装一个 statusLine 捕获器,已有自定义 statusLine 的绝不覆盖)。"],en:["New \"Usage\" page (gauge icon in the top bar): see Claude's 5-hour / weekly limit bars with reset countdowns, plus Codex's quota ring — at a glance. All read from local files on the host: no account login, no API calls. Codex works with zero setup; Claude's live limits need a one-time `handmux hooks install` on the computer (it adds a statusLine capturer and never clobbers an existing custom statusLine)."]}},{version:"0.6.0",date:"2026-07-02",highlight:{zh:"新增 Codex 支持",en:"Codex support added"},items:{zh:["新增 Codex 支持:收件箱与推送现在同时认得 Claude 和 Codex——Codex 会话的「进行中 / 需要你 / 已完成」都会像 Claude 一样推到手机;tmux 外跑着的 Codex 会话也能一键「接管」进来(codex resume);新建会话的启动命令预设新增 codex。收件箱每一条、以及顶栏当前会话,都带上 Claude / Codex 标记,一眼区分是哪种 agent。","会话抽屉底部新增「未接管会话」:一眼看到在 tmux 外跑着、手机还控制不了的 Claude / Codex(带状态、时间、最后一条消息),点「接管」即可在 tmux 里续接同一会话——自动加进会话列表并跳进去,以后手机随时回来。"],en:["Added Codex support: the inbox and push now recognize both Claude and Codex — a Codex session's working / waiting-on-you / done states reach your phone just like Claude. You can take over Codex sessions running outside tmux (codex resume), and there's a new codex startup-command preset. Every inbox row and the current-session topbar now carry a Claude / Codex mark so you can tell the two apart at a glance.",`The session drawer now has a "not taken over" section at the bottom: Claude / Codex sessions running outside tmux that your phone can't steer yet (with their state, time, and last message). Tap Take over to resume the same conversation inside tmux — it's added to your session list and opened, so you can return to it from your phone anytime.`]}},{version:"0.5.0",date:"2026-06-28",highlight:{zh:"首个公开版 · 多语言界面",en:"First public release · multi-language UI"},items:{zh:["首个公开发布版本(npm 上的 handmux)。","新增繁体中文、日语、韩语界面(设置 → Language 切换)。","想法角标:有未完成想法时,灯泡图标右上角显示数量。","设置面板列数调节:实时显示当前列数,新增 ±1 精细调节按钮。"],en:["First public release (handmux on npm).","Added Traditional Chinese, Japanese, and Korean UI (Settings → Language to switch).","Idea badge: when there are pending ideas, the lightbulb icon shows a count in the corner.","Settings column control: shows the current column count live, with new ±1 fine-adjust buttons."]}},{date:"2026-06",label:{zh:"早期内测",en:"Early builds"},highlight:{zh:"早期内测",en:"Early builds"},items:{zh:["新增「Git」面板(顶栏图标):仿 VS Code,一页同屏看变更 + 提交历史,点文件/提交看全屏彩色 diff;只读,不动你的工作树。可绑多个目录用 tab 切换。","新增「想法」管理器(顶栏灯泡):按窗口记待办,可编辑、拖拽排序、一键填入、语音输入。","网站预览:选目录预览静态站点,或填端口预览本机正在跑的服务(走专属子域名);图片预览:文件/终端里点图片(含 GIF)直接内嵌打开,可捏合缩放、长按保存。","文件:上传/下载(进度条、系统分享上传),浏览器打开即落到当前会话目录,支持 /tmp、$TMPDIR;文档在应用内预览 Markdown/txt/log/sh,可语音朗读(逐句高亮)。","收件箱 + Web Push:汇总各会话「进行中/已完成/需要你」,窗口标签带状态色点,需要你时推送到手机。","命令面板:常用 + 每会话最近命令,斜杠命令快捷键(/clear、/compact、/model…)。","可靠性:断线重连(退避 + 每请求超时 + 断线横幅,后台自动暂停轮询),离线兜底页。","首版:手机浏览器驱动真实 tmux 面板(xterm 终端 + 会话/窗口/pane 导航 + 深链),移动按键区、键盘自动抬升、列宽/字号调节,可添加到主屏(PWA)。"],en:['New "Git" panel (top-bar icon): VS Code style — changes + commit history on one screen, tap a file/commit for a full-screen colored diff; read-only, never touches your working tree. Bind multiple dirs and switch via tabs.','New "Ideas" manager (top-bar lightbulb): per-window to-dos — edit, drag to reorder, one-tap insert, voice input.',"Website preview: pick a directory for a static site, or a port for a service running locally (dedicated subdomain); image preview: tap an image (including GIFs) in Files or the terminal to open inline, pinch to zoom, long-press to save.","Files: upload/download (progress bar, share-to-upload), the browser opens straight to the current session dir, /tmp and $TMPDIR supported; documents preview in-app (Markdown/txt/log/sh) and can be read aloud (sentence-by-sentence highlight).","Inbox + Web Push: summarizes each session's In-progress / Done / Needs-you, window tabs get a status color dot, and Needs-you pushes to your phone.","Command panel: frequent + per-session recent commands, slash-command shortcuts (/clear, /compact, /model, …).","Reliability: reconnect on disconnect (backoff + per-request timeout + connection-lost banner, polling auto-paused in the background) and an offline fallback page.","First release: a phone browser drives real tmux panes (xterm terminal + session/window/pane navigation + deep links), a mobile key bar, keyboard auto-lift, column-width/font-size adjustment, and add-to-home-screen (PWA)."]}}],gA=c=>c.version||c.date,mh=cg[0]?gA(cg[0]):null,_A={jpg:"image/jpeg",jpeg:"image/jpeg",jfif:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",svg:"image/svg+xml",ico:"image/x-icon",heic:"image/heic",heif:"image/heif",avif:"image/avif",tif:"image/tiff",tiff:"image/tiff",pdf:"application/pdf",txt:"text/plain",log:"text/plain",md:"text/markdown",markdown:"text/markdown",csv:"text/csv",json:"application/json",xml:"application/xml",html:"text/html",htm:"text/html",zip:"application/zip",mp4:"video/mp4",m4v:"video/mp4",mov:"video/quicktime",webm:"video/webm",mkv:"video/x-matroska",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",flv:"video/x-flv","3gp":"video/3gpp",ogv:"video/ogg",mpeg:"video/mpeg",mpg:"video/mpeg",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};function Fh(c){const a=(c||"").lastIndexOf(".");return a<0?"":_A[c.slice(a+1).toLowerCase()]||""}function bA(c){return Fh(c).startsWith("image/")}class Rr extends Error{}class yA extends Error{constructor(a,d,w){super(a),this.status=d,this.serverError=w??null}}async function ln(c,a={}){const d=co(),{timeoutMs:w,...j}=a,L={Authorization:`Bearer ${d??""}`,...j.headers||{}};j.body&&(L["Content-Type"]="application/json");let b=null,r=null;w&&(b=new AbortController,r=setTimeout(()=>b.abort(),w));try{const o=await fetch(c,{cache:"no-store",...j,headers:L,signal:b==null?void 0:b.signal});if(o.status===401)throw new Rr;if(!o.ok){let g=null;try{const y=await o.json();y!=null&&y.error&&(g=y.error)}catch{}throw new yA(g||`${c} -> ${o.status}`,o.status,g)}return o.status===204?{unchanged:!0}:await o.json()}catch(o){throw b!=null&&b.signal.aborted?new Error(`${c} -> timeout`):o}finally{r&&clearTimeout(r)}}const fl=()=>ln("/api/sessions"),wA=()=>ln("/api/usage"),Kc=c=>ln(`/api/windows?session=${encodeURIComponent(c)}`),ph=c=>ln(`/api/panes?window=${encodeURIComponent(c)}`),xA=(c,a=1500,d)=>ln(`/api/history?pane=${encodeURIComponent(c)}&lines=${a}${d?`&since=${d}`:""}`,{timeoutMs:8e3}),Sh=(c,a,d=!0)=>ln("/api/send",{method:"POST",body:JSON.stringify({pane:c,text:a,enter:d})}),ug=(c,a)=>ln("/api/keys",{method:"POST",body:JSON.stringify({pane:c,keys:a})}),SA=(c,a,d=1)=>ln("/api/scroll",{method:"POST",body:JSON.stringify({pane:c,dir:a,lines:d})}),NA=(c,a,d)=>ln("/api/resize",{method:"POST",body:JSON.stringify({window:c,cols:a,rows:d})}),CA=(c,a)=>ln("/api/resize",{method:"POST",body:JSON.stringify({pane:c,cols:a})}),EA=c=>ln(`/api/layout?window=${encodeURIComponent(c)}`),DA=(c,a)=>ln("/api/resize",{method:"POST",body:JSON.stringify({window:c,auto:!0,layout:a})}),jA=(c,a,d)=>ln("/api/sessions",{method:"POST",body:JSON.stringify({name:c,cwd:a,cmd:d})}),kA=(c,a,d,w,j)=>ln("/api/windows",{method:"POST",body:JSON.stringify({session:c,pane:a,name:d,cwd:w,cmd:j})}),RA=(c,a)=>ln("/api/sessions",{method:"PATCH",body:JSON.stringify({id:c,name:a})}),TA=(c,a)=>ln("/api/windows",{method:"PATCH",body:JSON.stringify({id:c,name:a})}),LA=c=>ln(`/api/windows?window=${encodeURIComponent(c)}`,{method:"DELETE"}),AA=(c,a)=>ln("/api/windows/swap",{method:"POST",body:JSON.stringify({a:c,b:a})}),MA=(c,a)=>ln("/api/dir",{method:"POST",body:JSON.stringify({dir:c,name:a})}),yx=(c,a=null)=>ln(`/api/file?path=${encodeURIComponent(c)}${a!=null?`&mtime=${encodeURIComponent(a)}`:""}`,{timeoutMs:8e3}),n1=c=>ln(`/api/dir${c?`?path=${encodeURIComponent(c)}`:""}`,{timeoutMs:8e3}),ao=c=>ln(`/api/pane-cwd?pane=${encodeURIComponent(c)}`,{timeoutMs:8e3}),UA=()=>ln("/api/asr/sign",{timeoutMs:8e3}),i1=()=>ln("/api/config",{timeoutMs:8e3}),OA=()=>ln("/api/version",{timeoutMs:8e3}),PA=()=>ln("/api/hooks/install",{method:"POST",timeoutMs:15e3}),BA=(c=[])=>ln(`/api/states?sessions=${encodeURIComponent(c.join(","))}`,{timeoutMs:4e3}),wx=()=>ln("/api/orphans",{timeoutMs:8e3}),IA=c=>ln("/api/orphans/takeover",{method:"POST",body:JSON.stringify(c),timeoutMs:15e3}),xx=c=>ln(`/api/git/repos?dir=${encodeURIComponent(c)}`,{timeoutMs:8e3}),VA=c=>ln(`/api/git/status?repo=${encodeURIComponent(c)}`,{timeoutMs:8e3}),FA=(c,{limit:a=50,ref:d}={})=>{let w=`/api/git/log?repo=${encodeURIComponent(c)}&limit=${a}`;return d&&(w+=`&ref=${encodeURIComponent(d)}`),ln(w,{timeoutMs:8e3})},HA=c=>ln(`/api/git/branches?repo=${encodeURIComponent(c)}`,{timeoutMs:8e3}),zA=(c,{path:a,commit:d,staged:w}={})=>{let j=`/api/git/diff?repo=${encodeURIComponent(c)}&path=${encodeURIComponent(a??"")}`;return d&&(j+=`&commit=${encodeURIComponent(d)}`),w&&(j+="&staged=1"),ln(j,{timeoutMs:8e3})},$A=(c,a)=>ln(`/api/git/commit?repo=${encodeURIComponent(c)}&hash=${encodeURIComponent(a)}`,{timeoutMs:8e3});function WA(c,a){return new Promise((d,w)=>{const j=co(),L=new XMLHttpRequest;L.open("GET",`/api/download?path=${encodeURIComponent(c)}`),L.setRequestHeader("Authorization",`Bearer ${j??""}`),L.responseType="blob",L.onprogress=b=>{a&&b.lengthComputable&&a(b.loaded/b.total)},L.onerror=()=>w(new Error("download failed")),L.onload=()=>{if(L.status===401)return w(new Rr);if(L.status<200||L.status>=300)return w(new Error(`download -> ${L.status}`));const b=c.split("/").pop()||"download";let r=L.response;const o=Fh(b);o&&r&&r.type!==o&&(r=r.slice(0,r.size,o));const g=URL.createObjectURL(r),y=document.createElement("a");y.href=g,y.download=b,document.body.appendChild(y),y.click(),y.remove(),setTimeout(()=>URL.revokeObjectURL(g),1e3),d()},L.send()})}function Sx(c,a=null){return new Promise((d,w)=>{const j=co(),L=new XMLHttpRequest,b=a!=null?`&mtime=${encodeURIComponent(a)}`:"";L.open("GET",`/api/download?path=${encodeURIComponent(c)}${b}`),L.setRequestHeader("Authorization",`Bearer ${j??""}`),L.responseType="blob",L.onerror=()=>w(new Error(B("api.loadFailed"))),L.onload=()=>{if(L.status===304)return d({notModified:!0});if(L.status===401)return w(new Rr);if(L.status<200||L.status>=300)return w(new Error(`image -> ${L.status}`));let r=L.response;const o=Fh(c.split("/").pop()||"");o&&r&&r.type!==o&&(r=r.slice(0,r.size,o));const g=Number(L.getResponseHeader("X-Mtime"));d({url:URL.createObjectURL(r),mtimeMs:Number.isFinite(g)?g:null})},L.send()})}const Nx=(c,a)=>{const d=encodeURIComponent(co()??"");return(c==null?void 0:c.kind)==="dynamic"?`https://${encodeURIComponent(c.name)}.${a}/?token=${d}`:`/preview/${encodeURIComponent(c==null?void 0:c.name)}/?token=${d}`},Gv=(c,a={})=>ln("/api/previews",{method:"POST",body:JSON.stringify(a.port!=null?{name:c,port:a.port}:{name:c,dir:a.dir})}),GA=()=>ln("/api/previews"),YA=c=>ln(`/api/previews/${encodeURIComponent(c)}`,{method:"DELETE"});class Th extends Error{constructor(){super("upload aborted"),this.name="UploadAbort"}}function r1(c,a,d,w=!1,{signal:j}={}){return new Promise((L,b)=>{if(j!=null&&j.aborted)return b(new Th);const r=co(),o=new FormData;o.append("dir",c),w&&o.append("stash","1"),o.append("file",a,a.name);const g=new XMLHttpRequest;g.open("POST","/api/upload"),g.setRequestHeader("Authorization",`Bearer ${r??""}`),g.upload.onprogress=p=>{d&&p.lengthComputable&&d(p.loaded/p.total,"sending")},g.upload.onload=()=>{d==null||d(1,"processing")};const y=()=>g.abort();j&&j.addEventListener("abort",y,{once:!0});const u=()=>{j&&j.removeEventListener("abort",y)};g.onabort=()=>{u(),b(new Th)},g.onerror=()=>{u(),b(new Error(B("api.uploadFailed")))},g.onload=()=>{if(u(),g.status===401)return b(new Rr);if(g.status>=200&&g.status<300)try{return L(JSON.parse(g.responseText))}catch{return L({})}const p={400:B("api.uploadBadDir"),409:B("api.uploadDuplicate"),413:B("api.uploadTooLarge"),415:B("api.uploadBadType")}[g.status]||B("api.uploadFailed");b(new Error(p))},g.send(o)})}const qA=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-label="Claude"><title>Claude</title><path fill="#d97757" d="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"/></svg>
205
+ `,KA=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-label="Codex"><title>Codex (OpenAI)</title><path fill="#ededed" d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"/></svg>
206
+ `,In={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};function su(){return h.jsxDEV("svg",{...In,children:h.jsxDEV("path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:15,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:14,columnNumber:5},this)}function XA(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:24,columnNumber:7},this),h.jsxDEV("path",{d:"M12 10v6M9 13h6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:25,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:23,columnNumber:5},this)}function dg(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:33,columnNumber:7},this),h.jsxDEV("circle",{cx:"12",cy:"12",r:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:34,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:32,columnNumber:5},this)}function JA(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:43,columnNumber:7},this),h.jsxDEV("path",{d:"M14 3v5h5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:44,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:42,columnNumber:5},this)}function ZA(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:53,columnNumber:7},this),h.jsxDEV("circle",{cx:"9",cy:"9",r:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:54,columnNumber:7},this),h.jsxDEV("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:55,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:52,columnNumber:5},this)}function s1(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("path",{d:"M12 19V5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:64,columnNumber:7},this),h.jsxDEV("path",{d:"m5 12 7-7 7 7"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:65,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:63,columnNumber:5},this)}function QA(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("line",{x1:"2",x2:"5",y1:"12",y2:"12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:74,columnNumber:7},this),h.jsxDEV("line",{x1:"19",x2:"22",y1:"12",y2:"12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:75,columnNumber:7},this),h.jsxDEV("line",{x1:"12",x2:"12",y1:"2",y2:"5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:76,columnNumber:7},this),h.jsxDEV("line",{x1:"12",x2:"12",y1:"19",y2:"22"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:77,columnNumber:7},this),h.jsxDEV("circle",{cx:"12",cy:"12",r:"7"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:78,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:73,columnNumber:5},this)}function Sa(){return h.jsxDEV("svg",{...In,children:h.jsxDEV("path",{d:"m6 9 6 6 6-6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:87,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:86,columnNumber:5},this)}function a1(){return h.jsxDEV("svg",{...In,children:h.jsxDEV("path",{d:"M12 5v14M5 12h14"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:96,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:95,columnNumber:5},this)}function o1(){return h.jsxDEV("svg",{...In,children:h.jsxDEV("path",{d:"M20 6 9 17l-5-5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:105,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:104,columnNumber:5},this)}function l1(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("circle",{cx:"12",cy:"12",r:"9"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:124,columnNumber:7},this),h.jsxDEV("path",{d:"M12 7v5l3 2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:125,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:123,columnNumber:5},this)}function eM(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("path",{d:"M9 18h6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:135,columnNumber:7},this),h.jsxDEV("path",{d:"M10 22h4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:136,columnNumber:7},this),h.jsxDEV("path",{d:"M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:137,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:134,columnNumber:5},this)}function tM(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("path",{d:"M22 12h-6l-2 3h-4l-2-3H2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:146,columnNumber:7},this),h.jsxDEV("path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:147,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:145,columnNumber:5},this)}function nM(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("path",{d:"M12 3v12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:156,columnNumber:7},this),h.jsxDEV("path",{d:"m7 10 5 5 5-5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:157,columnNumber:7},this),h.jsxDEV("path",{d:"M5 21h14"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:158,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:155,columnNumber:5},this)}function c1(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:168,columnNumber:7},this),h.jsxDEV("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:169,columnNumber:7},this),h.jsxDEV("path",{d:"M12 18v-6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:170,columnNumber:7},this),h.jsxDEV("path",{d:"m9 15 3-3 3 3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:171,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:167,columnNumber:5},this)}function u1(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("rect",{x:"9",y:"9",width:"11",height:"11",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:180,columnNumber:7},this),h.jsxDEV("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:181,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:179,columnNumber:5},this)}function iM(){return h.jsxDEV("svg",{...In,children:h.jsxDEV("path",{d:"M7 5l12 7-12 7z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:190,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:189,columnNumber:5},this)}function rM(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("line",{x1:"9",y1:"5",x2:"9",y2:"19"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:199,columnNumber:7},this),h.jsxDEV("line",{x1:"15",y1:"5",x2:"15",y2:"19"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:200,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:198,columnNumber:5},this)}function sM(){return h.jsxDEV("svg",{...In,children:h.jsxDEV("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:209,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:208,columnNumber:5},this)}function aM(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("rect",{x:"9",y:"3",width:"6",height:"11",rx:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:218,columnNumber:7},this),h.jsxDEV("path",{d:"M5 11a7 7 0 0 0 14 0"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:219,columnNumber:7},this),h.jsxDEV("line",{x1:"12",y1:"18",x2:"12",y2:"21"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:220,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:217,columnNumber:5},this)}function hg(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:229,columnNumber:7},this),h.jsxDEV("path",{d:"M8 21h8M12 17v4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:230,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:228,columnNumber:5},this)}function oM(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("path",{d:"M12 14l4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:239,columnNumber:7},this),h.jsxDEV("path",{d:"M3.34 19a10 10 0 1 1 17.32 0"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:240,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:238,columnNumber:5},this)}function lM(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:249,columnNumber:7},this),h.jsxDEV("path",{d:"M12 18h.01"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:250,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:248,columnNumber:5},this)}function cM(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:259,columnNumber:7},this),h.jsxDEV("path",{d:"M21 3v5h-5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:260,columnNumber:7},this),h.jsxDEV("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:261,columnNumber:7},this),h.jsxDEV("path",{d:"M3 21v-5h5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:262,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:258,columnNumber:5},this)}function d1(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("line",{x1:"6",y1:"3",x2:"6",y2:"15"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:271,columnNumber:7},this),h.jsxDEV("circle",{cx:"18",cy:"6",r:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:272,columnNumber:7},this),h.jsxDEV("circle",{cx:"6",cy:"18",r:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:273,columnNumber:7},this),h.jsxDEV("path",{d:"M18 9a9 9 0 0 1-9 9"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:274,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:270,columnNumber:5},this)}function vl(){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("path",{d:"M18 6 6 18"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:283,columnNumber:7},this),h.jsxDEV("path",{d:"m6 6 12 12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:284,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:282,columnNumber:5},this)}function uM({down:c=!1}){return h.jsxDEV("svg",{...In,children:[h.jsxDEV("rect",{x:"3",y:"9",width:"18",height:"11",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:326,columnNumber:7},this),h.jsxDEV("path",{d:"M7 13h.01M11 13h.01M15 13h.01M8 16.5h8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:327,columnNumber:7},this),c?h.jsxDEV("path",{d:"M9 4.5l3 3 3-3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:328,columnNumber:15},this):h.jsxDEV("path",{d:"M9 6.5l3-3 3 3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:328,columnNumber:45},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:325,columnNumber:5},this)}const Cx={claude:qA,codex:KA};function gl({agent:c}){const a=Cx[c]?c:"claude";return h.jsxDEV("span",{className:"agent-mark",role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:Cx[a]}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:343,columnNumber:10},this)}const h1=c=>{if(c<=0)return B("time.expired");const a=Math.max(1,Math.round(c/6e4));return B("time.minutes",{n:a})};function f1(c,a=!0){const[d,w]=H.useState(()=>Date.now());return H.useEffect(()=>{if(!a||c==null)return;w(Date.now());const j=setInterval(()=>w(Date.now()),1e3);return()=>clearInterval(j)},[a,c]),c!=null?Math.max(0,c-d):0}const Yv=1280,Ex=6;function dM({open:c,name:a,kind:d="static",domain:w=null,port:j,dir:L,expiresAt:b,onRenew:r,onStop:o,onMinimize:g}){const[y,u]=H.useState(!1),[p,S]=H.useState("mobile"),[N,_]=H.useState(1),[l,m]=H.useState({w:0,h:0}),f=H.useRef(null),v=H.useRef(null);H.useEffect(()=>{c||u(!1)},[c]),H.useEffect(()=>{p==="mobile"&&_(1)},[p]),H.useEffect(()=>{const Y=v.current;if(!c||!Y)return;const Q=()=>m({w:Y.clientWidth,h:Y.clientHeight});if(Q(),typeof ResizeObserver>"u")return;const Z=new ResizeObserver(Q);return Z.observe(Y),()=>Z.disconnect()},[c]);const C=f1(b,c),T=d==="dynamic"?j!=null?`:${j}`:"":L||"",E=p==="pc"&&l.w>0,A=l.w>0?l.w/Yv:1,D=l.h>0?l.h/A:0,R=A*N,M=E?{width:`${Yv*R}px`,height:`${D*R}px`}:void 0,$=E?{width:`${Yv}px`,height:`${D}px`,transform:`scale(${R})`,transformOrigin:"0 0"}:void 0,O=Y=>_(Q=>Math.min(Ex,Math.max(1,+(Q+Y).toFixed(2)))),I=()=>{const Y=f.current;if(Y)try{Y.contentWindow.location.reload()}catch{Y.src=Y.src}};return uu.createPortal(h.jsxDEV("div",{className:`file-sheet ${c?"open":""}`,"aria-hidden":!c,children:[h.jsxDEV("div",{className:"file-tabs preview-head",children:[h.jsxDEV("span",{className:"preview-status",children:[h.jsxDEV(hg,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:70,columnNumber:11},this),h.jsxDEV("span",{className:"preview-state",children:B(d==="dynamic"?"preview.dynamic":"preview.static")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:71,columnNumber:11},this),a&&h.jsxDEV("span",{className:"preview-name",title:`${a}${T?" "+T:""}`,children:[a,T&&h.jsxDEV("span",{className:"preview-detail",children:T},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:74,columnNumber:32},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:73,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:69,columnNumber:9},this),h.jsxDEV("button",{className:"preview-remain",title:B("preview.remainTitle"),"aria-haspopup":"dialog","aria-expanded":y,onClick:()=>u(Y=>!Y),children:h1(C)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:78,columnNumber:9},this),h.jsxDEV("button",{className:"preview-iconbtn",onClick:()=>S(Y=>Y==="mobile"?"pc":"mobile"),"aria-label":B(p==="mobile"?"preview.toPcView":"preview.toMobileView"),title:B(p==="mobile"?"preview.pcView":"preview.mobileView"),"aria-pressed":p==="pc",children:p==="mobile"?h.jsxDEV(hg,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:83,columnNumber:34},this):h.jsxDEV(lM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:83,columnNumber:52},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:80,columnNumber:9},this),h.jsxDEV("button",{className:"preview-iconbtn",onClick:I,"aria-label":B("preview.refresh"),title:B("preview.refresh"),children:h.jsxDEV(cM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:85,columnNumber:126},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:85,columnNumber:9},this),h.jsxDEV("button",{className:"file-min","aria-label":B("preview.minimize"),title:B("preview.minimize"),onClick:g,children:h.jsxDEV(Sa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:86,columnNumber:124},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:86,columnNumber:9},this),y&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"preview-pop-backdrop",onClick:()=>u(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:89,columnNumber:13},this),h.jsxDEV("div",{className:"preview-pop",role:"dialog","aria-label":B("preview.ttlDialog"),children:[h.jsxDEV("button",{className:"preview-pop-item",onClick:()=>{u(!1),r==null||r()},children:B("preview.renew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:91,columnNumber:15},this),h.jsxDEV("button",{className:"preview-pop-item preview-pop-danger",onClick:()=>{u(!1),o==null||o()},children:B("preview.stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:92,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:90,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:88,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:68,columnNumber:7},this),h.jsxDEV("div",{className:`file-body preview-body ${E?"pc":""}`,ref:v,children:a&&E?h.jsxDEV("div",{className:"preview-scaler",style:M,children:h.jsxDEV("iframe",{ref:f,className:"preview-frame",title:B("preview.iframeTitle"),style:$,src:Nx({name:a,kind:d},w)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:100,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:99,columnNumber:11},this):a?h.jsxDEV("iframe",{ref:f,className:"preview-frame",title:B("preview.iframeTitle"),src:Nx({name:a,kind:d},w)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:103,columnNumber:11},this):null},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:97,columnNumber:7},this),E&&h.jsxDEV("div",{className:"preview-zoom",children:[h.jsxDEV("button",{className:"preview-zoom-btn",onClick:()=>O(-.5),disabled:N<=1,"aria-label":B("preview.zoomOut"),children:"−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:108,columnNumber:11},this),h.jsxDEV("span",{className:"preview-zoom-val","aria-hidden":"true",children:[Math.round(N*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:109,columnNumber:11},this),h.jsxDEV("button",{className:"preview-zoom-btn",onClick:()=>O(.5),disabled:N>=Ex,"aria-label":B("preview.zoomIn"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:110,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:107,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:67,columnNumber:5},this),document.body)}const hM={working:"working",done:"done",idle:"done",permission:"needs"},fg={needs:3,done:2,working:1},fM={working:B("inbox.view.working"),done:B("inbox.view.done"),needs:B("inbox.view.needs")};function mM(c,a={},d=0){const w=[];for(const[j,L]of Object.entries(c)){const b=hM[L.kind];if(!b)continue;const r=L.ts||0;b==="done"&&!(r>Math.max(d||0,a[j]||0))||w.push({pane:j,session:L.session,window:L.window,windowName:L.windowName,view:b,msg:L.msg||"",ts:r,agent:L.agent||"claude"})}return w.sort((j,L)=>j.session<L.session?-1:j.session>L.session?1:fg[L.view]-fg[j.view]||L.ts-j.ts),w}function pM(c){const a={working:0,done:0,needs:0};for(const d of c)a[d.view]!=null&&(a[d.view]+=1);return a}function vM(c){let a=null,d=0;for(const w of c){const j=fg[w.view]||0;j>d&&(d=j,a=w.view)}return a}function Dx(c){let a=0;for(const d of Object.values(c))(d.ts||0)>a&&(a=d.ts);return a}function m1(c,a){if(!c)return"";const d=Math.max(0,Math.round((a-c)/1e3));if(d<60)return B("time.secAgo",{n:d});const w=Math.round(d/60);if(w<60)return B("time.minAgo",{n:w});const j=Math.round(w/60);return j<24?B("time.hourAgo",{n:j}):B("time.dayAgo",{n:Math.round(j/24)})}function qv(c,a,d){const w=c.findIndex(j=>j.id===a);return w<0?null:c[d==="left"?w-1:w+1]??null}const p1="tw_notify",mg=()=>localStorage.getItem(p1)==="1",v1=c=>localStorage.setItem(p1,c?"1":"0");function _l(){return typeof navigator<"u"&&"serviceWorker"in navigator&&typeof window<"u"&&"PushManager"in window&&"Notification"in window}function g1(){var c;return typeof window<"u"&&(((c=window.matchMedia)==null?void 0:c.call(window,"(display-mode: standalone)").matches)||window.navigator.standalone===!0)||!1}const gM=()=>/iP(hone|ad|od)/.test(navigator.userAgent||"");function au(c={}){return{Authorization:`Bearer ${co()??""}`,...c}}function _M(c){const a="=".repeat((4-c.length%4)%4),d=(c+a).replace(/-/g,"+").replace(/_/g,"/"),w=atob(d),j=new Uint8Array(w.length);for(let L=0;L<w.length;L+=1)j[L]=w.charCodeAt(L);return j}async function bM(){if(!_l())throw new Error(B("push.unsupported"));if(gM()&&!g1())throw new Error(B("push.iosAddToHome"));if(await Notification.requestPermission()!=="granted")throw new Error(B("push.permissionDenied"));const a=await navigator.serviceWorker.ready,d=await fetch("/api/push/vapid",{headers:au(),cache:"no-store"});if(!d.ok)throw new Error(B("push.noVapid"));const{key:w}=await d.json();let j=await a.pushManager.getSubscription();if(j||(j=await a.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:_M(w)})),!(await fetch("/api/push/subscribe",{method:"POST",headers:au({"Content-Type":"application/json"}),body:JSON.stringify({subscription:j,boundSessions:so()})})).ok)throw new Error(B("push.subscribeFailed"));return v1(!0),!0}async function yM(){try{const a=await(await navigator.serviceWorker.ready).pushManager.getSubscription();a&&(await fetch("/api/push/unsubscribe",{method:"POST",headers:au({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:a.endpoint})}),await a.unsubscribe())}catch{}v1(!1)}async function Xc(){if(!(!mg()||!_l()))try{const a=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(!a)return;await fetch("/api/push/bound",{method:"POST",headers:au({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:a.endpoint,boundSessions:so()})})}catch{}}async function wM(){if(!_l())return null;try{const a=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(!a)return null;const d=await fetch("/api/push/key",{method:"POST",headers:au({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:a.endpoint})});return d.ok&&(await d.json()).pushKey||null}catch{return null}}async function xM(c){if(_l())try{(await(await navigator.serviceWorker.ready).getNotifications({tag:`pane-${c}`})).forEach(w=>w.close())}catch{}}const jx="\\s'\"`()\\[\\]<>,;,。、;:!?()【】《》「」“”‘’*…:│",SM=["md","markdown","html","htm","txt","log","sh"],NM=["png","jpg","jpeg","jfif","gif","webp","svg","bmp","ico","avif","apng"],CM=[...SM,...NM].join("|"),kx=new RegExp(`[^${jx}]+\\.(?:${CM})(?=$|[${jx}.])`,"gi");function _1(c){const a=[];if(!c)return a;kx.lastIndex=0;let d;for(;(d=kx.exec(c))!==null;){let w=d.index,j=d[0];const L=/^@+/.exec(j);L&&(w+=L[0].length,j=j.slice(L[0].length)),j&&a.push({start:w,end:w+j.length,path:j})}return a}const b1=c=>typeof c=="string"&&c.startsWith("/");function ro(c,a){const d=b1(a)?a:`${c.replace(/\/+$/,"")}/${a}`,w=d.startsWith("/"),j=[];for(const L of d.split("/"))if(!(!L||L===".")){if(L===".."){j.pop();continue}j.push(L)}return(w?"/":"")+j.join("/")}const EM={key:"home",type:"home",name:B("doc.home")},y1=(c,a)=>({...c,type:a.type??c.type,name:a.name??c.name,content:a.content!==void 0?a.content:c.content,mtime:a.mtime!==void 0?a.mtime:c.mtime});function DM(c,a,d){if(c.tabs.some(j=>j.key===a))return{tabs:c.tabs.map(j=>j.key===a?y1(j,d):j),active:a};const w={key:a,type:d.type,name:d.name,content:d.content,mtime:d.mtime,path:a};return{tabs:[...c.tabs,w],active:a}}function jM(c,a,d){return c.tabs.some(w=>w.key===a)?{...c,tabs:c.tabs.map(w=>w.key===a?y1(w,d):w)}:c}function kM(c,a){const d=c.tabs.findIndex(L=>L.key===a);if(d<=0)return c;const w=c.tabs.filter(L=>L.key!==a),j=c.active===a?c.tabs[d-1].key:c.active;return{tabs:w,active:j}}function RM(){const[c,a]=H.useState({tabs:[EM],active:"home"}),d=H.useCallback((b,r)=>a(o=>DM(o,b,r)),[]),w=H.useCallback((b,r)=>a(o=>jM(o,b,r)),[]),j=H.useCallback(b=>a(r=>kM(r,b)),[]),L=H.useCallback(b=>a(r=>({...r,active:b})),[]);return{tabs:c.tabs,active:c.active,openDoc:d,refreshDoc:w,closeTab:j,activate:L}}function Rx(c){return String(c||"").replace(/[^A-Za-z0-9._-]+/g,"-").replace(/-{2,}/g,"-").replace(/^[-.]+|-+$/g,"").toLowerCase()}function TM({session:c,windowName:a,windowId:d}){const w=[c,a].map(Rx).filter(Boolean);return w.push(Rx(d)||"w"),w.join("-")}function LM(c,{settingsOpen:a,setSettingsOpen:d}){var T,E,A,D;const[w,j]=H.useState([]),[L,b]=H.useState(null),[r,o]=H.useState(!1),[g,y]=H.useState(!1),u=H.useCallback(async()=>{try{const R=await GA();j(R.previews||[]),b(R.domain??null),o(!!R.dynamicEnabled)}catch{}},[]);H.useEffect(()=>{u()},[u]);const p=c?TM({session:(T=c.session)==null?void 0:T.name,windowName:(E=c.window)==null?void 0:E.name,windowId:(A=c.window)==null?void 0:A.id}):null,S=w.find(R=>R.name===p&&R.expiresAt>Date.now())||null,N=(S==null?void 0:S.expiresAt)??null,_=!!S;H.useEffect(()=>{_||y(!1)},[_]),H.useEffect(()=>{if(N==null)return;const R=setTimeout(u,Math.max(0,N-Date.now())+500);return()=>clearTimeout(R)},[N,u]);const l=H.useCallback(()=>{a?(d(!1),requestAnimationFrame(()=>y(!0))):y(!0)},[a,d]),m=H.useCallback(async R=>{var M;if(p)try{await Gv(p,{dir:R}),HL((M=c==null?void 0:c.window)==null?void 0:M.id,R),await u(),l()}catch{}},[p,(D=c==null?void 0:c.window)==null?void 0:D.id,u,l]),f=H.useCallback(async R=>{if(!p)return;await Gv(p,{port:R}),await u();let M=!1;const $=()=>{M||(M=!0,window.removeEventListener("popstate",O),clearTimeout(I),y(!0))},O=()=>$();window.addEventListener("popstate",O);const I=setTimeout($,300);d(!1)},[p,u,d]),v=H.useCallback(async()=>{if(p)try{await YA(p),await u()}catch{}},[p,u]),C=H.useCallback(async()=>{if(!S)return;const R=S.kind==="dynamic"?{port:S.port}:{dir:S.dir};try{await Gv(S.name,R),await u()}catch{}},[S==null?void 0:S.name,S==null?void 0:S.kind,S==null?void 0:S.dir,S==null?void 0:S.port,u]);return{previews:w,previewDomain:L,dynamicEnabled:r,previewSheetOpen:g,setPreviewSheetOpen:y,activePreview:S,curPreviewName:p,refreshPreviews:u,openPreviewSheet:l,startPreview:m,startDynamicPreview:f,stopPreview:v,renewPreview:C}}function Tx({fetch:c,apply:a,intervalMs:d,enabled:w=!0,deps:j=[]}){const L=H.useRef(c),b=H.useRef(a);L.current=c,b.current=a,H.useEffect(()=>{if(!w)return;let r=!1,o=null;const g=async()=>{if(!document.hidden)try{const p=await L.current();r||b.current(p)}catch{}},y=()=>{g(),o=setTimeout(y,d)};y();const u=()=>{document.hidden||(clearTimeout(o),y())};return document.addEventListener("visibilitychange",u),()=>{r=!0,clearTimeout(o),document.removeEventListener("visibilitychange",u)}},[w,d,...j])}function AM(c,a){return c instanceof Rr?(a==null||a(),!0):!1}function MM({open:c,currentSessionName:a,bound:d,onSelectSession:w,onUnbind:j,onBind:L,onClose:b,onLogout:r,orphans:o=[],onTakeoverRequest:g}){const[y,u]=H.useState(!1);return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:`drawer ${c?"open":""}`,children:[h.jsxDEV("div",{className:"drawer-list",children:[h.jsxDEV("div",{className:"drawer-title",children:"SESSIONS"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:19,columnNumber:11},this),d.length===0&&h.jsxDEV("div",{className:"drawer-empty",children:B("drawer.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:20,columnNumber:34},this),d.map(p=>h.jsxDEV("div",{className:`drawer-row drawer-session ${p===a?"active":""}`,children:[h.jsxDEV("span",{className:"drawer-name",onClick:()=>w(p),children:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:26,columnNumber:15},this),h.jsxDEV("button",{className:"drawer-unbind",onClick:S=>{S.stopPropagation(),j(p)},"aria-label":B("drawer.unbind"),title:B("drawer.unbind"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:27,columnNumber:15},this)]},p,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:22,columnNumber:13},this)),h.jsxDEV("button",{className:"drawer-bind",onClick:L,children:["+ ",B("drawer.bind")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:35,columnNumber:11},this),o.length>0&&h.jsxDEV("div",{className:"drawer-orphans",children:[h.jsxDEV("button",{className:"drawer-orphans-head",onClick:()=>u(p=>!p),children:[h.jsxDEV("span",{children:B("drawer.orphans.title",{n:o.length})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:40,columnNumber:17},this),h.jsxDEV("span",{className:"drawer-orphans-caret","aria-hidden":"true",children:y?"▾":"▸"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:41,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:39,columnNumber:15},this),y&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"drawer-orphans-hint",children:B("drawer.orphans.hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:45,columnNumber:19},this),o.map(p=>{const S=!p.sessionId,N=p.state==="busy"||S;return h.jsxDEV("div",{className:"drawer-orphan-row",children:[h.jsxDEV("div",{className:"drawer-orphan-head",children:[h.jsxDEV("span",{className:"drawer-orphan-cwd",title:p.cwd,children:p.cwdLabel||p.cwd},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:52,columnNumber:27},this),h.jsxDEV("button",{className:"drawer-orphan-btn",disabled:N,title:S?B("inbox.orphans.noSession"):void 0,onClick:()=>g==null?void 0:g(p),children:B("inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:53,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:51,columnNumber:25},this),h.jsxDEV("div",{className:"drawer-orphan-meta",children:[p.agentLabel&&h.jsxDEV("span",{className:"drawer-orphan-agent",children:p.agentLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:63,columnNumber:44},this),h.jsxDEV("span",{className:`drawer-orphan-state ${p.state==="busy"?"busy":"idle"}`,children:p.state==="busy"?B("inbox.orphans.busy"):B("inbox.orphans.idle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:64,columnNumber:27},this),h.jsxDEV("span",{className:"drawer-orphan-time",children:m1(p.startedAt||p.lastActivity,Date.now())},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:67,columnNumber:27},this),p.snippet&&h.jsxDEV("span",{className:"drawer-orphan-msg",children:p.snippet},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:68,columnNumber:41},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:62,columnNumber:25},this)]},p.pid,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:50,columnNumber:23},this)})]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:44,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:38,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:18,columnNumber:9},this),h.jsxDEV("button",{className:"drawer-logout",onClick:r,children:B("drawer.logout")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:78,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:17,columnNumber:7},this),c&&h.jsxDEV("div",{className:"drawer-backdrop",onClick:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:80,columnNumber:16},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:16,columnNumber:5},this)}const UM=500,Lx=10;function Bg(c,{onClick:a}={}){const d=H.useRef(null),w=H.useRef(null),j=H.useRef(!1),L=()=>{d.current&&(clearTimeout(d.current),d.current=null)};return{onPointerDown:b=>{j.current=!1,w.current={x:b.clientX,y:b.clientY},L(),d.current=setTimeout(()=>{d.current=null,j.current=!0,c==null||c()},UM)},onPointerMove:b=>{!d.current||!w.current||(Math.abs(b.clientX-w.current.x)>Lx||Math.abs(b.clientY-w.current.y)>Lx)&&L()},onPointerUp:L,onPointerLeave:L,onPointerCancel:L,onClick:b=>{var r,o;if(j.current){j.current=!1,(r=b.preventDefault)==null||r.call(b),(o=b.stopPropagation)==null||o.call(b);return}a==null||a(b)}}}const Ax="①②③④⑤⑥⑦⑧⑨",w1=c=>c<Ax.length?Ax[c]:String(c+1),OM=(c,a)=>`${w1(a)} ${c.command||c.id}`;function PM({window:c,active:a,agent:d,onSelect:w,onManage:j}){const L=Bg(()=>j(c),{onClick:()=>w(c)});return h.jsxDEV("button",{"data-win":c.id,className:`win-tab ${a?"active":""}`,...L,children:[d&&h.jsxDEV(gl,{agent:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:22,columnNumber:17},this),c.name||c.id,c.panes>1&&h.jsxDEV("span",{className:"win-panes",children:c.panes},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:24,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:21,columnNumber:5},this)}function BM({window:c,panes:a,paneAgents:d={},currentPaneId:w,agent:j,onManage:L,onSelectPane:b}){const[r,o]=H.useState(!1),[g,y]=H.useState(null),u=H.useRef(null),p=()=>{var m;const l=(m=u.current)==null?void 0:m.getBoundingClientRect();l&&y({top:l.bottom+6,left:l.left})},S=Bg(()=>L(c),{onClick:()=>{r||p(),o(l=>!l)}});H.useEffect(()=>{if(!r)return;const l=f=>{var v;(v=u.current)!=null&&v.contains(f.target)||o(!1)},m=()=>p();return document.addEventListener("pointerdown",l,!0),window.addEventListener("scroll",m,!0),window.addEventListener("resize",m),()=>{document.removeEventListener("pointerdown",l,!0),window.removeEventListener("scroll",m,!0),window.removeEventListener("resize",m)}},[r]);const N=Math.max(0,a.findIndex(l=>l.id===w)),_=a[N];return h.jsxDEV("div",{className:"wt-dd active","data-win":c.id,ref:u,children:[h.jsxDEV("button",{className:"win-tab active wt-trigger","aria-haspopup":"listbox","aria-expanded":r,...S,children:[j&&h.jsxDEV(gl,{agent:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:74,columnNumber:19},this),h.jsxDEV("span",{className:"wt-name",children:c.name||c.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:75,columnNumber:9},this),h.jsxDEV("span",{className:"wt-sep","aria-hidden":"true",children:"│"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:76,columnNumber:9},this),h.jsxDEV("span",{className:"wt-pane",children:OM(_,N)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:77,columnNumber:9},this),h.jsxDEV("span",{className:`wt-caret${r?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:78,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:68,columnNumber:7},this),r&&g&&h.jsxDEV("div",{className:"dd-menu wt-menu",role:"listbox",style:{top:g.top,left:g.left},children:a.map((l,m)=>h.jsxDEV("button",{type:"button",role:"option","aria-selected":l.id===w,className:`dd-option${l.id===w?" is-selected":""}`,onClick:()=>{b(l.id),o(!1)},children:[h.jsxDEV("span",{className:"dd-option-label",children:[h.jsxDEV("span",{className:"dd-pane-seq","aria-hidden":"true",children:w1(m)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:92,columnNumber:17},this),d[l.id]&&h.jsxDEV(gl,{agent:d[l.id]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:93,columnNumber:38},this),h.jsxDEV("span",{className:"dd-pane-cmd",children:l.command||l.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:94,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:91,columnNumber:15},this),l.id===w&&h.jsxDEV("span",{className:"dd-check","aria-hidden":"true",children:"✓"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:96,columnNumber:42},this)]},l.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:83,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:81,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:67,columnNumber:5},this)}function IM({windows:c,windowAgents:a={},paneAgents:d={},currentAgent:w,currentWindowId:j,panes:L,currentPaneId:b,onSelectWindow:r,onSelectPane:o,onNewWindow:g,onManageWindow:y,trackWindowId:u}){const p=H.useRef(null);return H.useLayoutEffect(()=>{var S,N;u&&((N=(S=p.current)==null?void 0:S.querySelector(`[data-win="${u}"]`))==null||N.scrollIntoView({block:"nearest",inline:"nearest"}))},[c,u]),h.jsxDEV("div",{className:"windowbar",children:h.jsxDEV("div",{className:"windowbar-scroll",ref:p,children:[c.map(S=>{const N=S.id===j;return N&&L.length>1?h.jsxDEV(BM,{window:S,panes:L,paneAgents:d,currentPaneId:b,agent:w,onManage:y,onSelectPane:o},S.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:126,columnNumber:15},this):h.jsxDEV(PM,{window:S,active:N,agent:a[S.id],onSelect:r,onManage:y},S.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:139,columnNumber:13},this)}),h.jsxDEV("button",{className:"win-tab win-new",onClick:g,"aria-label":B("windowbar.newWindow"),title:B("windowbar.newWindow"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:149,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:121,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:120,columnNumber:5},this)}var x1={exports:{}};(function(c,a){(function(d,w){c.exports=w()})(globalThis,()=>(()=>{var d={4567:function(b,r,o){var g=this&&this.__decorate||function(f,v,C,T){var E,A=arguments.length,D=A<3?v:T===null?T=Object.getOwnPropertyDescriptor(v,C):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,v,C,T);else for(var R=f.length-1;R>=0;R--)(E=f[R])&&(D=(A<3?E(D):A>3?E(v,C,D):E(v,C))||D);return A>3&&D&&Object.defineProperty(v,C,D),D},y=this&&this.__param||function(f,v){return function(C,T){v(C,T,f)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const u=o(9042),p=o(9924),S=o(844),N=o(4725),_=o(2585),l=o(3656);let m=r.AccessibilityManager=class extends S.Disposable{constructor(f,v,C,T){super(),this._terminal=f,this._coreBrowserService=C,this._renderService=T,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 E=0;E<this._terminal.rows;E++)this._rowElements[E]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[E]);if(this._topBoundaryFocusListener=E=>this._handleBoundaryFocus(E,0),this._bottomBoundaryFocusListener=E=>this._handleBoundaryFocus(E,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 p.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(E=>this._handleResize(E.rows))),this.register(this._terminal.onRender(E=>this._refreshRows(E.start,E.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(E=>this._handleChar(E))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
207
+ `))),this.register(this._terminal.onA11yTab(E=>this._handleTab(E))),this.register(this._terminal.onKey(E=>this._handleKey(E.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,l.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,S.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(f){for(let v=0;v<f;v++)this._handleChar(" ")}_handleChar(f){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==f&&(this._charsToAnnounce+=f):this._charsToAnnounce+=f,f===`
208
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(f){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(f)||this._charsToConsume.push(f)}_refreshRows(f,v){this._liveRegionDebouncer.refresh(f,v,this._terminal.rows)}_renderRows(f,v){const C=this._terminal.buffer,T=C.lines.length.toString();for(let E=f;E<=v;E++){const A=C.lines.get(C.ydisp+E),D=[],R=(A==null?void 0:A.translateToString(!0,void 0,void 0,D))||"",M=(C.ydisp+E+1).toString(),$=this._rowElements[E];$&&(R.length===0?($.innerText=" ",this._rowColumns.set($,[0,1])):($.textContent=R,this._rowColumns.set($,D)),$.setAttribute("aria-posinset",M),$.setAttribute("aria-setsize",T))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(f,v){const C=f.target,T=this._rowElements[v===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(v===0?"1":`${this._terminal.buffer.lines.length}`)||f.relatedTarget!==T)return;let E,A;if(v===0?(E=C,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(E=this._rowElements.shift(),A=C,this._rowContainer.removeChild(E)),E.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),v===0){const D=this._createAccessibilityTreeNode();this._rowElements.unshift(D),this._rowContainer.insertAdjacentElement("afterbegin",D)}else{const D=this._createAccessibilityTreeNode();this._rowElements.push(D),this._rowContainer.appendChild(D)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(v===0?-1:1),this._rowElements[v===0?1:this._rowElements.length-2].focus(),f.preventDefault(),f.stopImmediatePropagation()}_handleSelectionChange(){var R;if(this._rowElements.length===0)return;const f=document.getSelection();if(!f)return;if(f.isCollapsed)return void(this._rowContainer.contains(f.anchorNode)&&this._terminal.clearSelection());if(!f.anchorNode||!f.focusNode)return void console.error("anchorNode and/or focusNode are null");let v={node:f.anchorNode,offset:f.anchorOffset},C={node:f.focusNode,offset:f.focusOffset};if((v.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||v.node===C.node&&v.offset>C.offset)&&([v,C]=[C,v]),v.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(v={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(v.node))return;const T=this._rowElements.slice(-1)[0];if(C.node.compareDocumentPosition(T)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(C={node:T,offset:((R=T.textContent)==null?void 0:R.length)??0}),!this._rowContainer.contains(C.node))return;const E=({node:M,offset:$})=>{const O=M instanceof Text?M.parentNode:M;let I=parseInt(O==null?void 0:O.getAttribute("aria-posinset"),10)-1;if(isNaN(I))return console.warn("row is invalid. Race condition?"),null;const Y=this._rowColumns.get(O);if(!Y)return console.warn("columns is null. Race condition?"),null;let Q=$<Y.length?Y[$]:Y.slice(-1)[0]+1;return Q>=this._terminal.cols&&(++I,Q=0),{row:I,column:Q}},A=E(v),D=E(C);if(A&&D){if(A.row>D.row||A.row===D.row&&A.column>=D.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(D.row-A.row)*this._terminal.cols-A.column+D.column)}}_handleResize(f){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let v=this._rowContainer.children.length;v<this._terminal.rows;v++)this._rowElements[v]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[v]);for(;this._rowElements.length>f;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const f=this._coreBrowserService.mainDocument.createElement("div");return f.setAttribute("role","listitem"),f.tabIndex=-1,this._refreshRowDimensions(f),f}_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 f=0;f<this._terminal.rows;f++)this._refreshRowDimensions(this._rowElements[f])}}_refreshRowDimensions(f){f.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=m=g([y(1,_.IInstantiationService),y(2,N.ICoreBrowserService),y(3,N.IRenderService)],m)},3614:(b,r)=>{function o(p){return p.replace(/\r?\n/g,"\r")}function g(p,S){return S?"\x1B[200~"+p+"\x1B[201~":p}function y(p,S,N,_){p=g(p=o(p),N.decPrivateModes.bracketedPasteMode&&_.rawOptions.ignoreBracketedPasteMode!==!0),N.triggerDataEvent(p,!0),S.value=""}function u(p,S,N){const _=N.getBoundingClientRect(),l=p.clientX-_.left-10,m=p.clientY-_.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${l}px`,S.style.top=`${m}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=o,r.bracketTextForPaste=g,r.copyHandler=function(p,S){p.clipboardData&&p.clipboardData.setData("text/plain",S.selectionText),p.preventDefault()},r.handlePasteEvent=function(p,S,N,_){p.stopPropagation(),p.clipboardData&&y(p.clipboardData.getData("text/plain"),S,N,_)},r.paste=y,r.moveTextAreaUnderMouseCursor=u,r.rightClickHandler=function(p,S,N,_,l){u(p,S,N),l&&_.rightClickSelect(p),S.value=_.selectionText,S.select()}},7239:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const g=o(1505);r.ColorContrastCache=class{constructor(){this._color=new g.TwoKeyMap,this._css=new g.TwoKeyMap}setCss(y,u,p){this._css.set(y,u,p)}getCss(y,u){return this._css.get(y,u)}setColor(y,u,p){this._color.set(y,u,p)}getColor(y,u){return this._color.get(y,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,g,y,u){o.addEventListener(g,y,u);let p=!1;return{dispose:()=>{p||(p=!0,o.removeEventListener(g,y,u))}}}},3551:function(b,r,o){var g=this&&this.__decorate||function(m,f,v,C){var T,E=arguments.length,A=E<3?f:C===null?C=Object.getOwnPropertyDescriptor(f,v):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(m,f,v,C);else for(var D=m.length-1;D>=0;D--)(T=m[D])&&(A=(E<3?T(A):E>3?T(f,v,A):T(f,v))||A);return E>3&&A&&Object.defineProperty(f,v,A),A},y=this&&this.__param||function(m,f){return function(v,C){f(v,C,m)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;const u=o(3656),p=o(8460),S=o(844),N=o(2585),_=o(4725);let l=r.Linkifier=class extends S.Disposable{get currentLink(){return this._currentLink}constructor(m,f,v,C,T){super(),this._element=m,this._mouseService=f,this._renderService=v,this._bufferService=C,this._linkProviderService=T,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,S.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,S.toDisposable)(()=>{var E;this._lastMouseEvent=void 0,(E=this._activeProviderReplies)==null||E.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(m){this._lastMouseEvent=m;const f=this._positionFromMouseEvent(m,this._element,this._mouseService);if(!f)return;this._isMouseOut=!1;const v=m.composedPath();for(let C=0;C<v.length;C++){const T=v[C];if(T.classList.contains("xterm"))break;if(T.classList.contains("xterm-hover"))return}this._lastBufferCell&&f.x===this._lastBufferCell.x&&f.y===this._lastBufferCell.y||(this._handleHover(f),this._lastBufferCell=f)}_handleHover(m){if(this._activeLine!==m.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(m,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,m)||(this._clearCurrentLink(),this._askForLink(m,!0))}_askForLink(m,f){var C,T;this._activeProviderReplies&&f||((C=this._activeProviderReplies)==null||C.forEach(E=>{E==null||E.forEach(A=>{A.link.dispose&&A.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=m.y);let v=!1;for(const[E,A]of this._linkProviderService.linkProviders.entries())f?(T=this._activeProviderReplies)!=null&&T.get(E)&&(v=this._checkLinkProviderResult(E,m,v)):A.provideLinks(m.y,D=>{var M,$;if(this._isMouseOut)return;const R=D==null?void 0:D.map(O=>({link:O}));(M=this._activeProviderReplies)==null||M.set(E,R),v=this._checkLinkProviderResult(E,m,v),(($=this._activeProviderReplies)==null?void 0:$.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(m.y,this._activeProviderReplies)})}_removeIntersectingLinks(m,f){const v=new Set;for(let C=0;C<f.size;C++){const T=f.get(C);if(T)for(let E=0;E<T.length;E++){const A=T[E],D=A.link.range.start.y<m?0:A.link.range.start.x,R=A.link.range.end.y>m?this._bufferService.cols:A.link.range.end.x;for(let M=D;M<=R;M++){if(v.has(M)){T.splice(E--,1);break}v.add(M)}}}}_checkLinkProviderResult(m,f,v){var E;if(!this._activeProviderReplies)return v;const C=this._activeProviderReplies.get(m);let T=!1;for(let A=0;A<m;A++)this._activeProviderReplies.has(A)&&!this._activeProviderReplies.get(A)||(T=!0);if(!T&&C){const A=C.find(D=>this._linkAtPosition(D.link,f));A&&(v=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!v)for(let A=0;A<this._activeProviderReplies.size;A++){const D=(E=this._activeProviderReplies.get(A))==null?void 0:E.find(R=>this._linkAtPosition(R.link,f));if(D){v=!0,this._handleNewLink(D);break}}return v}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(m){if(!this._currentLink)return;const f=this._positionFromMouseEvent(m,this._element,this._mouseService);f&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,f)&&this._currentLink.link.activate(m,this._currentLink.link.text)}_clearCurrentLink(m,f){this._currentLink&&this._lastMouseEvent&&(!m||!f||this._currentLink.link.range.start.y>=m&&this._currentLink.link.range.end.y<=f)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,S.disposeArray)(this._linkCacheDisposables))}_handleNewLink(m){if(!this._lastMouseEvent)return;const f=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);f&&this._linkAtPosition(m.link,f)&&(this._currentLink=m,this._currentLink.state={decorations:{underline:m.link.decorations===void 0||m.link.decorations.underline,pointerCursor:m.link.decorations===void 0||m.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,m.link,this._lastMouseEvent),m.link.decorations={},Object.defineProperties(m.link.decorations,{pointerCursor:{get:()=>{var v,C;return(C=(v=this._currentLink)==null?void 0:v.state)==null?void 0:C.decorations.pointerCursor},set:v=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==v&&(this._currentLink.state.decorations.pointerCursor=v,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",v))}},underline:{get:()=>{var v,C;return(C=(v=this._currentLink)==null?void 0:v.state)==null?void 0:C.decorations.underline},set:v=>{var C,T,E;(C=this._currentLink)!=null&&C.state&&((E=(T=this._currentLink)==null?void 0:T.state)==null?void 0:E.decorations.underline)!==v&&(this._currentLink.state.decorations.underline=v,this._currentLink.state.isHovered&&this._fireUnderlineEvent(m.link,v))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(v=>{if(!this._currentLink)return;const C=v.start===0?0:v.start+1+this._bufferService.buffer.ydisp,T=this._bufferService.buffer.ydisp+1+v.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=T&&(this._clearCurrentLink(C,T),this._lastMouseEvent)){const E=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);E&&this._askForLink(E,!1)}})))}_linkHover(m,f,v){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(f,!0),this._currentLink.state.decorations.pointerCursor&&m.classList.add("xterm-cursor-pointer")),f.hover&&f.hover(v,f.text)}_fireUnderlineEvent(m,f){const v=m.range,C=this._bufferService.buffer.ydisp,T=this._createLinkUnderlineEvent(v.start.x-1,v.start.y-C-1,v.end.x,v.end.y-C-1,void 0);(f?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(T)}_linkLeave(m,f,v){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(f,!1),this._currentLink.state.decorations.pointerCursor&&m.classList.remove("xterm-cursor-pointer")),f.leave&&f.leave(v,f.text)}_linkAtPosition(m,f){const v=m.range.start.y*this._bufferService.cols+m.range.start.x,C=m.range.end.y*this._bufferService.cols+m.range.end.x,T=f.y*this._bufferService.cols+f.x;return v<=T&&T<=C}_positionFromMouseEvent(m,f,v){const C=v.getCoords(m,f,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(m,f,v,C,T){return{x1:m,y1:f,x2:v,y2:C,cols:this._bufferService.cols,fg:T}}};r.Linkifier=l=g([y(1,_.IMouseService),y(2,_.IRenderService),y(3,N.IBufferService),y(4,_.ILinkProviderService)],l)},9042:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(b,r,o){var g=this&&this.__decorate||function(_,l,m,f){var v,C=arguments.length,T=C<3?l:f===null?f=Object.getOwnPropertyDescriptor(l,m):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,l,m,f);else for(var E=_.length-1;E>=0;E--)(v=_[E])&&(T=(C<3?v(T):C>3?v(l,m,T):v(l,m))||T);return C>3&&T&&Object.defineProperty(l,m,T),T},y=this&&this.__param||function(_,l){return function(m,f){l(m,f,_)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const u=o(511),p=o(2585);let S=r.OscLinkProvider=class{constructor(_,l,m){this._bufferService=_,this._optionsService=l,this._oscLinkService=m}provideLinks(_,l){var R;const m=this._bufferService.buffer.lines.get(_-1);if(!m)return void l(void 0);const f=[],v=this._optionsService.rawOptions.linkHandler,C=new u.CellData,T=m.getTrimmedLength();let E=-1,A=-1,D=!1;for(let M=0;M<T;M++)if(A!==-1||m.hasContent(M)){if(m.loadCell(M,C),C.hasExtendedAttrs()&&C.extended.urlId){if(A===-1){A=M,E=C.extended.urlId;continue}D=C.extended.urlId!==E}else A!==-1&&(D=!0);if(D||A!==-1&&M===T-1){const $=(R=this._oscLinkService.getLinkData(E))==null?void 0:R.uri;if($){const O={start:{x:A+1,y:_},end:{x:M+(D||M!==T-1?0:1),y:_}};let I=!1;if(!(v!=null&&v.allowNonHttpProtocols))try{const Y=new URL($);["http:","https:"].includes(Y.protocol)||(I=!0)}catch{I=!0}I||f.push({text:$,range:O,activate:(Y,Q)=>v?v.activate(Y,Q,O):N(0,Q),hover:(Y,Q)=>{var Z;return(Z=v==null?void 0:v.hover)==null?void 0:Z.call(v,Y,Q,O)},leave:(Y,Q)=>{var Z;return(Z=v==null?void 0:v.leave)==null?void 0:Z.call(v,Y,Q,O)}})}D=!1,C.hasExtendedAttrs()&&C.extended.urlId?(A=M,E=C.extended.urlId):(A=-1,E=-1)}}l(f)}};function N(_,l){if(confirm(`Do you want to navigate to ${l}?
209
+
210
+ WARNING: This link could potentially be dangerous`)){const m=window.open();if(m){try{m.opener=null}catch{}m.location.href=l}else console.warn("Opening link blocked as opener could not be cleared")}}r.OscLinkProvider=S=g([y(0,p.IBufferService),y(1,p.IOptionsService),y(2,p.IOscLinkService)],S)},6193:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RenderDebouncer=void 0,r.RenderDebouncer=class{constructor(o,g){this._renderCallback=o,this._coreBrowserService=g,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(o){return this._refreshCallbacks.push(o),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(o,g,y){this._rowCount=y,o=o!==void 0?o:0,g=g!==void 0?g:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,o):o,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,g):g,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 o=Math.max(this._rowStart,0),g=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(o,g),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const o of this._refreshCallbacks)o(0);this._refreshCallbacks=[]}}},3236:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Terminal=void 0;const g=o(3614),y=o(3656),u=o(3551),p=o(9042),S=o(3730),N=o(1680),_=o(3107),l=o(5744),m=o(2950),f=o(1296),v=o(428),C=o(4269),T=o(5114),E=o(8934),A=o(3230),D=o(9312),R=o(4725),M=o(6731),$=o(8055),O=o(8969),I=o(8460),Y=o(844),Q=o(6114),Z=o(8437),ee=o(2584),oe=o(7399),P=o(5941),W=o(9074),V=o(2585),J=o(5435),_e=o(4567),be=o(779);class Ve extends O.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(ie={}){super(ie),this.browser=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Y.MutableDisposable),this._onCursorMove=this.register(new I.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new I.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new I.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new I.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new I.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new I.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new I.EventEmitter),this._onBlur=this.register(new I.EventEmitter),this._onA11yCharEmitter=this.register(new I.EventEmitter),this._onA11yTabEmitter=this.register(new I.EventEmitter),this._onWillOpen=this.register(new I.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(W.DecorationService),this._instantiationService.setService(V.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(be.LinkProviderService),this._instantiationService.setService(R.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(S.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((G,pe)=>this.refresh(G,pe))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(G=>this._reportWindowsOptions(G))),this.register(this._inputHandler.onColor(G=>this._handleColorEvent(G))),this.register((0,I.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,I.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,I.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,I.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(G=>this._afterResize(G.cols,G.rows))),this.register((0,Y.toDisposable)(()=>{var G,pe;this._customKeyEventHandler=void 0,(pe=(G=this.element)==null?void 0:G.parentNode)==null||pe.removeChild(this.element)}))}_handleColorEvent(ie){if(this._themeService)for(const G of ie){let pe,le="";switch(G.index){case 256:pe="foreground",le="10";break;case 257:pe="background",le="11";break;case 258:pe="cursor",le="12";break;default:pe="ansi",le="4;"+G.index}switch(G.type){case 0:const Be=$.color.toColorRGB(pe==="ansi"?this._themeService.colors.ansi[G.index]:this._themeService.colors[pe]);this.coreService.triggerDataEvent(`${ee.C0.ESC}]${le};${(0,P.toRgbString)(Be)}${ee.C1_ESCAPED.ST}`);break;case 1:if(pe==="ansi")this._themeService.modifyColors(Te=>Te.ansi[G.index]=$.channels.toColor(...G.color));else{const Te=pe;this._themeService.modifyColors(Xe=>Xe[Te]=$.channels.toColor(...G.color))}break;case 2:this._themeService.restoreColor(G.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(ie){ie?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(_e.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ie){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(ee.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var ie;return(ie=this.textarea)==null?void 0:ie.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(ee.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 ie=this.buffer.ybase+this.buffer.y,G=this.buffer.lines.get(ie);if(!G)return;const pe=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,Be=G.getWidth(pe),Te=this._renderService.dimensions.css.cell.width*Be,Xe=this.buffer.y*this._renderService.dimensions.css.cell.height,Ke=pe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ke+"px",this.textarea.style.top=Xe+"px",this.textarea.style.width=Te+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,y.addDisposableDomListener)(this.element,"copy",G=>{this.hasSelection()&&(0,g.copyHandler)(G,this._selectionService)}));const ie=G=>(0,g.handlePasteEvent)(G,this.textarea,this.coreService,this.optionsService);this.register((0,y.addDisposableDomListener)(this.textarea,"paste",ie)),this.register((0,y.addDisposableDomListener)(this.element,"paste",ie)),Q.isFirefox?this.register((0,y.addDisposableDomListener)(this.element,"mousedown",G=>{G.button===2&&(0,g.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,y.addDisposableDomListener)(this.element,"contextmenu",G=>{(0,g.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),Q.isLinux&&this.register((0,y.addDisposableDomListener)(this.element,"auxclick",G=>{G.button===1&&(0,g.moveTextAreaUnderMouseCursor)(G,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,y.addDisposableDomListener)(this.textarea,"keyup",ie=>this._keyUp(ie),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"keydown",ie=>this._keyDown(ie),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"keypress",ie=>this._keyPress(ie),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionupdate",ie=>this._compositionHelper.compositionupdate(ie))),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,y.addDisposableDomListener)(this.textarea,"input",ie=>this._inputEvent(ie),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(ie){var pe;if(!ie)throw new Error("Terminal requires a parent element.");if(ie.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((pe=this.element)==null?void 0:pe.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=ie.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"),ie.appendChild(this.element);const G=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),G.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,y.addDisposableDomListener)(this.screenElement,"mousemove",le=>this.updateCursorStyle(le))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),G.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),Q.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(T.CoreBrowserService,this.textarea,ie.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(R.ICoreBrowserService,this._coreBrowserService),this.register((0,y.addDisposableDomListener)(this.textarea,"focus",le=>this._handleTextAreaFocus(le))),this.register((0,y.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(v.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(M.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(C.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(A.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(le=>this._onRender.fire(le))),this.onResize(le=>this._renderService.resize(le.cols,le.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(m.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(E.MouseService),this._instantiationService.setService(R.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(G);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(N.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(le=>this.scrollLines(le.amount,le.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(D.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(le=>this.scrollLines(le.amount,le.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,y.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(_.BufferDecorationRenderer,this.screenElement)),this.register((0,y.addDisposableDomListener)(this.element,"mousedown",le=>this._selectionService.handleMouseDown(le))),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(_e.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",le=>this._handleScreenReaderModeOptionChange(le))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(f.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const ie=this,G=this.element;function pe(Te){const Xe=ie._mouseService.getMouseReportCoords(Te,ie.screenElement);if(!Xe)return!1;let Ke,st;switch(Te.overrideType||Te.type){case"mousemove":st=32,Te.buttons===void 0?(Ke=3,Te.button!==void 0&&(Ke=Te.button<3?Te.button:3)):Ke=1&Te.buttons?0:4&Te.buttons?1:2&Te.buttons?2:3;break;case"mouseup":st=0,Ke=Te.button<3?Te.button:3;break;case"mousedown":st=1,Ke=Te.button<3?Te.button:3;break;case"wheel":if(ie._customWheelEventHandler&&ie._customWheelEventHandler(Te)===!1||ie.viewport.getLinesScrolled(Te)===0)return!1;st=Te.deltaY<0?0:1,Ke=4;break;default:return!1}return!(st===void 0||Ke===void 0||Ke>4)&&ie.coreMouseService.triggerMouseEvent({col:Xe.col,row:Xe.row,x:Xe.x,y:Xe.y,button:Ke,action:st,ctrl:Te.ctrlKey,alt:Te.altKey,shift:Te.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Be={mouseup:Te=>(pe(Te),Te.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(Te)),wheel:Te=>(pe(Te),this.cancel(Te,!0)),mousedrag:Te=>{Te.buttons&&pe(Te)},mousemove:Te=>{Te.buttons||pe(Te)}};this.register(this.coreMouseService.onProtocolChange(Te=>{Te?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Te)),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&Te?le.mousemove||(G.addEventListener("mousemove",Be.mousemove),le.mousemove=Be.mousemove):(G.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&Te?le.wheel||(G.addEventListener("wheel",Be.wheel,{passive:!1}),le.wheel=Be.wheel):(G.removeEventListener("wheel",le.wheel),le.wheel=null),2&Te?le.mouseup||(le.mouseup=Be.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&Te?le.mousedrag||(le.mousedrag=Be.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,y.addDisposableDomListener)(G,"mousedown",Te=>{if(Te.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Te))return pe(Te),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(Te)})),this.register((0,y.addDisposableDomListener)(G,"wheel",Te=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Te)===!1)return!1;if(!this.buffer.hasScrollback){const Xe=this.viewport.getLinesScrolled(Te);if(Xe===0)return;const Ke=ee.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Te.deltaY<0?"A":"B");let st="";for(let jt=0;jt<Math.abs(Xe);jt++)st+=Ke;return this.coreService.triggerDataEvent(st,!0),this.cancel(Te,!0)}return this.viewport.handleWheel(Te)?this.cancel(Te):void 0}},{passive:!1})),this.register((0,y.addDisposableDomListener)(G,"touchstart",Te=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Te),this.cancel(Te)},{passive:!0})),this.register((0,y.addDisposableDomListener)(G,"touchmove",Te=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Te)?void 0:this.cancel(Te)},{passive:!1}))}refresh(ie,G){var pe;(pe=this._renderService)==null||pe.refreshRows(ie,G)}updateCursorStyle(ie){var G;(G=this._selectionService)!=null&&G.shouldColumnSelect(ie)?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(ie,G,pe=0){var le;pe===1?(super.scrollLines(ie,G,pe),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(ie)}paste(ie){(0,g.paste)(ie,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(ie){this._customKeyEventHandler=ie}attachCustomWheelEventHandler(ie){this._customWheelEventHandler=ie}registerLinkProvider(ie){return this._linkProviderService.registerLinkProvider(ie)}registerCharacterJoiner(ie){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const G=this._characterJoinerService.register(ie);return this.refresh(0,this.rows-1),G}deregisterCharacterJoiner(ie){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(ie)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(ie){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+ie)}registerDecoration(ie){return this._decorationService.registerDecoration(ie)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(ie,G,pe){this._selectionService.setSelection(ie,G,pe)}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 ie;(ie=this._selectionService)==null||ie.clearSelection()}selectAll(){var ie;(ie=this._selectionService)==null||ie.selectAll()}selectLines(ie,G){var pe;(pe=this._selectionService)==null||pe.selectLines(ie,G)}_keyDown(ie){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1)return!1;const G=this.browser.isMac&&this.options.macOptionIsMeta&&ie.altKey;if(!G&&!this._compositionHelper.keydown(ie))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;G||ie.key!=="Dead"&&ie.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const pe=(0,oe.evaluateKeyboardEvent)(ie,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ie),pe.type===3||pe.type===2){const le=this.rows-1;return this.scrollLines(pe.type===2?-le:le),this.cancel(ie,!0)}return pe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ie)||(pe.cancel&&this.cancel(ie,!0),!pe.key||!!(ie.key&&!ie.ctrlKey&&!ie.altKey&&!ie.metaKey&&ie.key.length===1&&ie.key.charCodeAt(0)>=65&&ie.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(pe.key!==ee.C0.ETX&&pe.key!==ee.C0.CR||(this.textarea.value=""),this._onKey.fire({key:pe.key,domEvent:ie}),this._showCursor(),this.coreService.triggerDataEvent(pe.key,!0),!this.optionsService.rawOptions.screenReaderMode||ie.altKey||ie.ctrlKey?this.cancel(ie,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ie,G){const pe=ie.isMac&&!this.options.macOptionIsMeta&&G.altKey&&!G.ctrlKey&&!G.metaKey||ie.isWindows&&G.altKey&&G.ctrlKey&&!G.metaKey||ie.isWindows&&G.getModifierState("AltGraph");return G.type==="keypress"?pe:pe&&(!G.keyCode||G.keyCode>47)}_keyUp(ie){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1||(function(G){return G.keyCode===16||G.keyCode===17||G.keyCode===18}(ie)||this.focus(),this.updateCursorStyle(ie),this._keyPressHandled=!1)}_keyPress(ie){let G;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1)return!1;if(this.cancel(ie),ie.charCode)G=ie.charCode;else if(ie.which===null||ie.which===void 0)G=ie.keyCode;else{if(ie.which===0||ie.charCode===0)return!1;G=ie.which}return!(!G||(ie.altKey||ie.ctrlKey||ie.metaKey)&&!this._isThirdLevelShift(this.browser,ie)||(G=String.fromCharCode(G),this._onKey.fire({key:G,domEvent:ie}),this._showCursor(),this.coreService.triggerDataEvent(G,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(ie){if(ie.data&&ie.inputType==="insertText"&&(!ie.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const G=ie.data;return this.coreService.triggerDataEvent(G,!0),this.cancel(ie),!0}return!1}resize(ie,G){ie!==this.cols||G!==this.rows?super.resize(ie,G):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(ie,G){var pe,le;(pe=this._charSizeService)==null||pe.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var ie;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 G=1;G<this.rows;G++)this.buffer.lines.push(this.buffer.getBlankLine(Z.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(ie=this.viewport)==null||ie.reset(),this.refresh(0,this.rows-1)}}reset(){var G,pe;this.options.rows=this.rows,this.options.cols=this.cols;const ie=this._customKeyEventHandler;this._setup(),super.reset(),(G=this._selectionService)==null||G.reset(),this._decorationService.reset(),(pe=this.viewport)==null||pe.reset(),this._customKeyEventHandler=ie,this.refresh(0,this.rows-1)}clearTextureAtlas(){var ie;(ie=this._renderService)==null||ie.clearTextureAtlas()}_reportFocus(){var ie;(ie=this.element)!=null&&ie.classList.contains("focus")?this.coreService.triggerDataEvent(ee.C0.ESC+"[I"):this.coreService.triggerDataEvent(ee.C0.ESC+"[O")}_reportWindowsOptions(ie){if(this._renderService)switch(ie){case J.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const G=this._renderService.dimensions.css.canvas.width.toFixed(0),pe=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${ee.C0.ESC}[4;${pe};${G}t`);break;case J.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const le=this._renderService.dimensions.css.cell.width.toFixed(0),Be=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${ee.C0.ESC}[6;${Be};${le}t`)}}cancel(ie,G){if(this.options.cancelEvents||G)return ie.preventDefault(),ie.stopPropagation(),!1}}r.Terminal=Ve},9924:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TimeBasedDebouncer=void 0,r.TimeBasedDebouncer=class{constructor(o,g=1e3){this._renderCallback=o,this._debounceThresholdMS=g,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(o,g,y){this._rowCount=y,o=o!==void 0?o:0,g=g!==void 0?g:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,o):o,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,g):g;const u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=u-this._lastRefreshMs,S=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},S)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const o=Math.max(this._rowStart,0),g=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(o,g)}}},1680:function(b,r,o){var g=this&&this.__decorate||function(m,f,v,C){var T,E=arguments.length,A=E<3?f:C===null?C=Object.getOwnPropertyDescriptor(f,v):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(m,f,v,C);else for(var D=m.length-1;D>=0;D--)(T=m[D])&&(A=(E<3?T(A):E>3?T(f,v,A):T(f,v))||A);return E>3&&A&&Object.defineProperty(f,v,A),A},y=this&&this.__param||function(m,f){return function(v,C){f(v,C,m)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Viewport=void 0;const u=o(3656),p=o(4725),S=o(8460),N=o(844),_=o(2585);let l=r.Viewport=class extends N.Disposable{constructor(m,f,v,C,T,E,A,D){super(),this._viewportElement=m,this._scrollArea=f,this._bufferService=v,this._optionsService=C,this._charSizeService=T,this._renderService=E,this._coreBrowserService=A,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 S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(R=>this._activeBuffer=R.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(R=>this._renderDimensions=R)),this._handleThemeChange(D.colors),this.register(D.onChangeColors(R=>this._handleThemeChange(R))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(m){this._viewportElement.style.backgroundColor=m.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(m){if(m)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 f=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==f&&(this._lastRecordedBufferHeight=f,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const m=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==m&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=m),this._refreshAnimationFrame=null}syncScrollArea(m=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(m);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(m)}_handleScroll(m){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 f=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:f,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const m=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(m*(this._smoothScrollState.target-this._smoothScrollState.origin)),m<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(m,f){const v=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(f<0&&this._viewportElement.scrollTop!==0||f>0&&v<this._lastRecordedBufferHeight)||(m.cancelable&&m.preventDefault(),!1)}handleWheel(m){const f=this._getPixelsScrolled(m);return f!==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+f:this._smoothScrollState.target+=f,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=f,this._bubbleScroll(m,f))}scrollLines(m){if(m!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const f=m*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+f,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:m,suppressScrollEvent:!1})}_getPixelsScrolled(m){if(m.deltaY===0||m.shiftKey)return 0;let f=this._applyScrollModifier(m.deltaY,m);return m.deltaMode===WheelEvent.DOM_DELTA_LINE?f*=this._currentRowHeight:m.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(f*=this._currentRowHeight*this._bufferService.rows),f}getBufferElements(m,f){var D;let v,C="";const T=[],E=f??this._bufferService.buffer.lines.length,A=this._bufferService.buffer.lines;for(let R=m;R<E;R++){const M=A.get(R);if(!M)continue;const $=(D=A.get(R+1))==null?void 0:D.isWrapped;if(C+=M.translateToString(!$),!$||R===A.length-1){const O=document.createElement("div");O.textContent=C,T.push(O),C.length>0&&(v=O),C=""}}return{bufferElements:T,cursorElement:v}}getLinesScrolled(m){if(m.deltaY===0||m.shiftKey)return 0;let f=this._applyScrollModifier(m.deltaY,m);return m.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(f/=this._currentRowHeight+0,this._wheelPartialScroll+=f,f=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):m.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(f*=this._bufferService.rows),f}_applyScrollModifier(m,f){const v=this._optionsService.rawOptions.fastScrollModifier;return v==="alt"&&f.altKey||v==="ctrl"&&f.ctrlKey||v==="shift"&&f.shiftKey?m*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:m*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(m){this._lastTouchY=m.touches[0].pageY}handleTouchMove(m){const f=this._lastTouchY-m.touches[0].pageY;return this._lastTouchY=m.touches[0].pageY,f!==0&&(this._viewportElement.scrollTop+=f,this._bubbleScroll(m,f))}};r.Viewport=l=g([y(2,_.IBufferService),y(3,_.IOptionsService),y(4,p.ICharSizeService),y(5,p.IRenderService),y(6,p.ICoreBrowserService),y(7,p.IThemeService)],l)},3107:function(b,r,o){var g=this&&this.__decorate||function(_,l,m,f){var v,C=arguments.length,T=C<3?l:f===null?f=Object.getOwnPropertyDescriptor(l,m):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,l,m,f);else for(var E=_.length-1;E>=0;E--)(v=_[E])&&(T=(C<3?v(T):C>3?v(l,m,T):v(l,m))||T);return C>3&&T&&Object.defineProperty(l,m,T),T},y=this&&this.__param||function(_,l){return function(m,f){l(m,f,_)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferDecorationRenderer=void 0;const u=o(4725),p=o(844),S=o(2585);let N=r.BufferDecorationRenderer=class extends p.Disposable{constructor(_,l,m,f,v){super(),this._screenElement=_,this._bufferService=l,this._coreBrowserService=m,this._decorationService=f,this._renderService=v,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(C=>this._removeDecoration(C))),this.register((0,p.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 _ of this._decorationService.decorations)this._renderDecoration(_);this._dimensionsChanged=!1}_renderDecoration(_){this._refreshStyle(_),this._dimensionsChanged&&this._refreshXPosition(_)}_createElement(_){var f;const l=this._coreBrowserService.mainDocument.createElement("div");l.classList.add("xterm-decoration"),l.classList.toggle("xterm-decoration-top-layer",((f=_==null?void 0:_.options)==null?void 0:f.layer)==="top"),l.style.width=`${Math.round((_.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,l.style.height=(_.options.height||1)*this._renderService.dimensions.css.cell.height+"px",l.style.top=(_.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",l.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const m=_.options.x??0;return m&&m>this._bufferService.cols&&(l.style.display="none"),this._refreshXPosition(_,l),l}_refreshStyle(_){const l=_.marker.line-this._bufferService.buffers.active.ydisp;if(l<0||l>=this._bufferService.rows)_.element&&(_.element.style.display="none",_.onRenderEmitter.fire(_.element));else{let m=this._decorationElements.get(_);m||(m=this._createElement(_),_.element=m,this._decorationElements.set(_,m),this._container.appendChild(m),_.onDispose(()=>{this._decorationElements.delete(_),m.remove()})),m.style.top=l*this._renderService.dimensions.css.cell.height+"px",m.style.display=this._altBufferIsActive?"none":"block",_.onRenderEmitter.fire(m)}}_refreshXPosition(_,l=_.element){if(!l)return;const m=_.options.x??0;(_.options.anchor||"left")==="right"?l.style.right=m?m*this._renderService.dimensions.css.cell.width+"px":"":l.style.left=m?m*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(_){var l;(l=this._decorationElements.get(_))==null||l.remove(),this._decorationElements.delete(_),_.dispose()}};r.BufferDecorationRenderer=N=g([y(1,S.IBufferService),y(2,u.ICoreBrowserService),y(3,S.IDecorationService),y(4,u.IRenderService)],N)},5871:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorZoneStore=void 0,r.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(o){if(o.options.overviewRulerOptions){for(const g of this._zones)if(g.color===o.options.overviewRulerOptions.color&&g.position===o.options.overviewRulerOptions.position){if(this._lineIntersectsZone(g,o.marker.line))return;if(this._lineAdjacentToZone(g,o.marker.line,o.options.overviewRulerOptions.position))return void this._addLineToZone(g,o.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=o.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=o.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=o.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=o.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:o.options.overviewRulerOptions.color,position:o.options.overviewRulerOptions.position,startBufferLine:o.marker.line,endBufferLine:o.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(o){this._linePadding=o}_lineIntersectsZone(o,g){return g>=o.startBufferLine&&g<=o.endBufferLine}_lineAdjacentToZone(o,g,y){return g>=o.startBufferLine-this._linePadding[y||"full"]&&g<=o.endBufferLine+this._linePadding[y||"full"]}_addLineToZone(o,g){o.startBufferLine=Math.min(o.startBufferLine,g),o.endBufferLine=Math.max(o.endBufferLine,g)}}},5744:function(b,r,o){var g=this&&this.__decorate||function(v,C,T,E){var A,D=arguments.length,R=D<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,T):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(v,C,T,E);else for(var M=v.length-1;M>=0;M--)(A=v[M])&&(R=(D<3?A(R):D>3?A(C,T,R):A(C,T))||R);return D>3&&R&&Object.defineProperty(C,T,R),R},y=this&&this.__param||function(v,C){return function(T,E){C(T,E,v)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OverviewRulerRenderer=void 0;const u=o(5871),p=o(4725),S=o(844),N=o(2585),_={full:0,left:0,center:0,right:0},l={full:0,left:0,center:0,right:0},m={full:0,left:0,center:0,right:0};let f=r.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(v,C,T,E,A,D,R){var $;super(),this._viewportElement=v,this._screenElement=C,this._bufferService=T,this._decorationService=E,this._renderService=A,this._optionsService=D,this._coreBrowserService=R,this._colorZoneStore=new u.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(),($=this._viewportElement.parentElement)==null||$.insertBefore(this._canvas,this._viewportElement);const M=this._canvas.getContext("2d");if(!M)throw new Error("Ctx cannot be null");this._ctx=M,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,S.toDisposable)(()=>{var O;(O=this._canvas)==null||O.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 v=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);l.full=this._canvas.width,l.left=v,l.center=C,l.right=v,this._refreshDrawHeightConstants(),m.full=0,m.left=0,m.center=l.left,m.right=l.left+l.center}_refreshDrawHeightConstants(){_.full=Math.round(2*this._coreBrowserService.dpr);const v=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(v,12),6)*this._coreBrowserService.dpr);_.left=C,_.center=C,_.right=C}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.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 C of this._decorationService.decorations)this._colorZoneStore.addDecoration(C);this._ctx.lineWidth=1;const v=this._colorZoneStore.zones;for(const C of v)C.position!=="full"&&this._renderColorZone(C);for(const C of v)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(v){this._ctx.fillStyle=v.color,this._ctx.fillRect(m[v.position||"full"],Math.round((this._canvas.height-1)*(v.startBufferLine/this._bufferService.buffers.active.lines.length)-_[v.position||"full"]/2),l[v.position||"full"],Math.round((this._canvas.height-1)*((v.endBufferLine-v.startBufferLine)/this._bufferService.buffers.active.lines.length)+_[v.position||"full"]))}_queueRefresh(v,C){this._shouldUpdateDimensions=v||this._shouldUpdateDimensions,this._shouldUpdateAnchor=C||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};r.OverviewRulerRenderer=f=g([y(2,N.IBufferService),y(3,N.IDecorationService),y(4,p.IRenderService),y(5,N.IOptionsService),y(6,p.ICoreBrowserService)],f)},2950:function(b,r,o){var g=this&&this.__decorate||function(_,l,m,f){var v,C=arguments.length,T=C<3?l:f===null?f=Object.getOwnPropertyDescriptor(l,m):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,l,m,f);else for(var E=_.length-1;E>=0;E--)(v=_[E])&&(T=(C<3?v(T):C>3?v(l,m,T):v(l,m))||T);return C>3&&T&&Object.defineProperty(l,m,T),T},y=this&&this.__param||function(_,l){return function(m,f){l(m,f,_)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CompositionHelper=void 0;const u=o(4725),p=o(2585),S=o(2584);let N=r.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(_,l,m,f,v,C){this._textarea=_,this._compositionView=l,this._bufferService=m,this._optionsService=f,this._coreService=v,this._renderService=C,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(_){this._compositionView.textContent=_.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(_){if(this._isComposing||this._isSendingComposition){if(_.keyCode===229||_.keyCode===16||_.keyCode===17||_.keyCode===18)return!1;this._finalizeComposition(!1)}return _.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(_){if(this._compositionView.classList.remove("active"),this._isComposing=!1,_){const l={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let m;this._isSendingComposition=!1,l.start+=this._dataAlreadySent.length,m=this._isComposing?this._textarea.value.substring(l.start,l.end):this._textarea.value.substring(l.start),m.length>0&&this._coreService.triggerDataEvent(m,!0)}},0)}else{this._isSendingComposition=!1;const l=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(l,!0)}}_handleAnyTextareaChanges(){const _=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const l=this._textarea.value,m=l.replace(_,"");this._dataAlreadySent=m,l.length>_.length?this._coreService.triggerDataEvent(m,!0):l.length<_.length?this._coreService.triggerDataEvent(`${S.C0.DEL}`,!0):l.length===_.length&&l!==_&&this._coreService.triggerDataEvent(l,!0)}},0)}updateCompositionElements(_){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const l=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),m=this._renderService.dimensions.css.cell.height,f=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,v=l*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=v+"px",this._compositionView.style.top=f+"px",this._compositionView.style.height=m+"px",this._compositionView.style.lineHeight=m+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const C=this._compositionView.getBoundingClientRect();this._textarea.style.left=v+"px",this._textarea.style.top=f+"px",this._textarea.style.width=Math.max(C.width,1)+"px",this._textarea.style.height=Math.max(C.height,1)+"px",this._textarea.style.lineHeight=C.height+"px"}_||setTimeout(()=>this.updateCompositionElements(!0),0)}}};r.CompositionHelper=N=g([y(2,p.IBufferService),y(3,p.IOptionsService),y(4,p.ICoreService),y(5,u.IRenderService)],N)},9806:(b,r)=>{function o(g,y,u){const p=u.getBoundingClientRect(),S=g.getComputedStyle(u),N=parseInt(S.getPropertyValue("padding-left")),_=parseInt(S.getPropertyValue("padding-top"));return[y.clientX-p.left-N,y.clientY-p.top-_]}Object.defineProperty(r,"__esModule",{value:!0}),r.getCoords=r.getCoordsRelativeToElement=void 0,r.getCoordsRelativeToElement=o,r.getCoords=function(g,y,u,p,S,N,_,l,m){if(!N)return;const f=o(g,y,u);return f?(f[0]=Math.ceil((f[0]+(m?_/2:0))/_),f[1]=Math.ceil(f[1]/l),f[0]=Math.min(Math.max(f[0],1),p+(m?1:0)),f[1]=Math.min(Math.max(f[1],1),S),f):void 0}},9504:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.moveToCellSequence=void 0;const g=o(2584);function y(l,m,f,v){const C=l-u(l,f),T=m-u(m,f),E=Math.abs(C-T)-function(A,D,R){let M=0;const $=A-u(A,R),O=D-u(D,R);for(let I=0;I<Math.abs($-O);I++){const Y=p(A,D)==="A"?-1:1,Q=R.buffer.lines.get($+Y*I);Q!=null&&Q.isWrapped&&M++}return M}(l,m,f);return _(E,N(p(l,m),v))}function u(l,m){let f=0,v=m.buffer.lines.get(l),C=v==null?void 0:v.isWrapped;for(;C&&l>=0&&l<m.rows;)f++,v=m.buffer.lines.get(--l),C=v==null?void 0:v.isWrapped;return f}function p(l,m){return l>m?"A":"B"}function S(l,m,f,v,C,T){let E=l,A=m,D="";for(;E!==f||A!==v;)E+=C?1:-1,C&&E>T.cols-1?(D+=T.buffer.translateBufferLineToString(A,!1,l,E),E=0,l=0,A++):!C&&E<0&&(D+=T.buffer.translateBufferLineToString(A,!1,0,l+1),E=T.cols-1,l=E,A--);return D+T.buffer.translateBufferLineToString(A,!1,l,E)}function N(l,m){const f=m?"O":"[";return g.C0.ESC+f+l}function _(l,m){l=Math.floor(l);let f="";for(let v=0;v<l;v++)f+=m;return f}r.moveToCellSequence=function(l,m,f,v){const C=f.buffer.x,T=f.buffer.y;if(!f.buffer.hasScrollback)return function(D,R,M,$,O,I){return y(R,$,O,I).length===0?"":_(S(D,R,D,R-u(R,O),!1,O).length,N("D",I))}(C,T,0,m,f,v)+y(T,m,f,v)+function(D,R,M,$,O,I){let Y;Y=y(R,$,O,I).length>0?$-u($,O):R;const Q=$,Z=function(ee,oe,P,W,V,J){let _e;return _e=y(P,W,V,J).length>0?W-u(W,V):oe,ee<P&&_e<=W||ee>=P&&_e<W?"C":"D"}(D,R,M,$,O,I);return _(S(D,Y,M,Q,Z==="C",O).length,N(Z,I))}(C,T,l,m,f,v);let E;if(T===m)return E=C>l?"D":"C",_(Math.abs(C-l),N(E,v));E=T>m?"D":"C";const A=Math.abs(T-m);return _(function(D,R){return R.cols-D}(T>m?l:C,f)+(A-1)*f.cols+1+((T>m?C:l)-1),N(E,v))}},1296:function(b,r,o){var g=this&&this.__decorate||function(I,Y,Q,Z){var ee,oe=arguments.length,P=oe<3?Y:Z===null?Z=Object.getOwnPropertyDescriptor(Y,Q):Z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(I,Y,Q,Z);else for(var W=I.length-1;W>=0;W--)(ee=I[W])&&(P=(oe<3?ee(P):oe>3?ee(Y,Q,P):ee(Y,Q))||P);return oe>3&&P&&Object.defineProperty(Y,Q,P),P},y=this&&this.__param||function(I,Y){return function(Q,Z){Y(Q,Z,I)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRenderer=void 0;const u=o(3787),p=o(2550),S=o(2223),N=o(6171),_=o(6052),l=o(4725),m=o(8055),f=o(8460),v=o(844),C=o(2585),T="xterm-dom-renderer-owner-",E="xterm-rows",A="xterm-fg-",D="xterm-bg-",R="xterm-focus",M="xterm-selection";let $=1,O=r.DomRenderer=class extends v.Disposable{constructor(I,Y,Q,Z,ee,oe,P,W,V,J,_e,be,Ve){super(),this._terminal=I,this._document=Y,this._element=Q,this._screenElement=Z,this._viewportElement=ee,this._helperContainer=oe,this._linkifier2=P,this._charSizeService=V,this._optionsService=J,this._bufferService=_e,this._coreBrowserService=be,this._themeService=Ve,this._terminalClass=$++,this._rowElements=[],this._selectionRenderModel=(0,_.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new f.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(E),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(M),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,N.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(Le=>this._injectCss(Le))),this._injectCss(this._themeService.colors),this._rowFactory=W.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(T+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(Le=>this._handleLinkHover(Le))),this.register(this._linkifier2.onHideLinkUnderline(Le=>this._handleLinkLeave(Le))),this.register((0,v.toDisposable)(()=>{this._element.classList.remove(T+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new p.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 I=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*I,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*I),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/I),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/I),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 Q of this._rowElements)Q.style.width=`${this.dimensions.css.canvas.width}px`,Q.style.height=`${this.dimensions.css.cell.height}px`,Q.style.lineHeight=`${this.dimensions.css.cell.height}px`,Q.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const Y=`${this._terminalSelector} .${E} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=Y,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(I){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Y=`${this._terminalSelector} .${E} { color: ${I.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Y+=`${this._terminalSelector} .${E} .xterm-dim { color: ${m.color.multiplyOpacity(I.foreground,.5).css};}`,Y+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const Q=`blink_underline_${this._terminalClass}`,Z=`blink_bar_${this._terminalClass}`,ee=`blink_block_${this._terminalClass}`;Y+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,Y+=`@keyframes ${Z} { 50% { box-shadow: none; }}`,Y+=`@keyframes ${ee} { 0% { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css}; } 50% { background-color: inherit; color: ${I.cursor.css}; }}`,Y+=`${this._terminalSelector} .${E}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${E}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${E}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${ee} 1s step-end infinite;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css};}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${I.cursor.css} !important; color: ${I.cursorAccent.css} !important;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${I.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${I.cursor.css} inset;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${I.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Y+=`${this._terminalSelector} .${M} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${M} div { position: absolute; background-color: ${I.selectionBackgroundOpaque.css};}${this._terminalSelector} .${M} div { position: absolute; background-color: ${I.selectionInactiveBackgroundOpaque.css};}`;for(const[oe,P]of I.ansi.entries())Y+=`${this._terminalSelector} .${A}${oe} { color: ${P.css}; }${this._terminalSelector} .${A}${oe}.xterm-dim { color: ${m.color.multiplyOpacity(P,.5).css}; }${this._terminalSelector} .${D}${oe} { background-color: ${P.css}; }`;Y+=`${this._terminalSelector} .${A}${S.INVERTED_DEFAULT_COLOR} { color: ${m.color.opaque(I.background).css}; }${this._terminalSelector} .${A}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${m.color.multiplyOpacity(m.color.opaque(I.background),.5).css}; }${this._terminalSelector} .${D}${S.INVERTED_DEFAULT_COLOR} { background-color: ${I.foreground.css}; }`,this._themeStyleElement.textContent=Y}_setDefaultSpacing(){const I=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${I}px`,this._rowFactory.defaultSpacing=I}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(I,Y){for(let Q=this._rowElements.length;Q<=Y;Q++){const Z=this._document.createElement("div");this._rowContainer.appendChild(Z),this._rowElements.push(Z)}for(;this._rowElements.length>Y;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(I,Y){this._refreshRowElements(I,Y),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(R),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(R),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(I,Y,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(I,Y,Q),this.renderRows(0,this._bufferService.rows-1),!I||!Y)return;this._selectionRenderModel.update(this._terminal,I,Y,Q);const Z=this._selectionRenderModel.viewportStartRow,ee=this._selectionRenderModel.viewportEndRow,oe=this._selectionRenderModel.viewportCappedStartRow,P=this._selectionRenderModel.viewportCappedEndRow;if(oe>=this._bufferService.rows||P<0)return;const W=this._document.createDocumentFragment();if(Q){const V=I[0]>Y[0];W.appendChild(this._createSelectionElement(oe,V?Y[0]:I[0],V?I[0]:Y[0],P-oe+1))}else{const V=Z===oe?I[0]:0,J=oe===ee?Y[0]:this._bufferService.cols;W.appendChild(this._createSelectionElement(oe,V,J));const _e=P-oe-1;if(W.appendChild(this._createSelectionElement(oe+1,0,this._bufferService.cols,_e)),oe!==P){const be=ee===P?Y[0]:this._bufferService.cols;W.appendChild(this._createSelectionElement(P,0,be))}}this._selectionContainer.appendChild(W)}_createSelectionElement(I,Y,Q,Z=1){const ee=this._document.createElement("div"),oe=Y*this.dimensions.css.cell.width;let P=this.dimensions.css.cell.width*(Q-Y);return oe+P>this.dimensions.css.canvas.width&&(P=this.dimensions.css.canvas.width-oe),ee.style.height=Z*this.dimensions.css.cell.height+"px",ee.style.top=I*this.dimensions.css.cell.height+"px",ee.style.left=`${oe}px`,ee.style.width=`${P}px`,ee}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 I of this._rowElements)I.replaceChildren()}renderRows(I,Y){const Q=this._bufferService.buffer,Z=Q.ybase+Q.y,ee=Math.min(Q.x,this._bufferService.cols-1),oe=this._optionsService.rawOptions.cursorBlink,P=this._optionsService.rawOptions.cursorStyle,W=this._optionsService.rawOptions.cursorInactiveStyle;for(let V=I;V<=Y;V++){const J=V+Q.ydisp,_e=this._rowElements[V],be=Q.lines.get(J);if(!_e||!be)break;_e.replaceChildren(...this._rowFactory.createRow(be,J,J===Z,P,W,ee,oe,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${T}${this._terminalClass}`}_handleLinkHover(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!0)}_handleLinkLeave(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!1)}_setCellUnderline(I,Y,Q,Z,ee,oe){Q<0&&(I=0),Z<0&&(Y=0);const P=this._bufferService.rows-1;Q=Math.max(Math.min(Q,P),0),Z=Math.max(Math.min(Z,P),0),ee=Math.min(ee,this._bufferService.cols);const W=this._bufferService.buffer,V=W.ybase+W.y,J=Math.min(W.x,ee-1),_e=this._optionsService.rawOptions.cursorBlink,be=this._optionsService.rawOptions.cursorStyle,Ve=this._optionsService.rawOptions.cursorInactiveStyle;for(let Le=Q;Le<=Z;++Le){const ie=Le+W.ydisp,G=this._rowElements[Le],pe=W.lines.get(ie);if(!G||!pe)break;G.replaceChildren(...this._rowFactory.createRow(pe,ie,ie===V,be,Ve,J,_e,this.dimensions.css.cell.width,this._widthCache,oe?Le===Q?I:0:-1,oe?(Le===Z?Y:ee)-1:-1))}}};r.DomRenderer=O=g([y(7,C.IInstantiationService),y(8,l.ICharSizeService),y(9,C.IOptionsService),y(10,C.IBufferService),y(11,l.ICoreBrowserService),y(12,l.IThemeService)],O)},3787:function(b,r,o){var g=this&&this.__decorate||function(E,A,D,R){var M,$=arguments.length,O=$<3?A:R===null?R=Object.getOwnPropertyDescriptor(A,D):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(E,A,D,R);else for(var I=E.length-1;I>=0;I--)(M=E[I])&&(O=($<3?M(O):$>3?M(A,D,O):M(A,D))||O);return $>3&&O&&Object.defineProperty(A,D,O),O},y=this&&this.__param||function(E,A){return function(D,R){A(D,R,E)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRendererRowFactory=void 0;const u=o(2223),p=o(643),S=o(511),N=o(2585),_=o(8055),l=o(4725),m=o(4269),f=o(6171),v=o(3734);let C=r.DomRendererRowFactory=class{constructor(E,A,D,R,M,$,O){this._document=E,this._characterJoinerService=A,this._optionsService=D,this._coreBrowserService=R,this._coreService=M,this._decorationService=$,this._themeService=O,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(E,A,D){this._selectionStart=E,this._selectionEnd=A,this._columnSelectMode=D}createRow(E,A,D,R,M,$,O,I,Y,Q,Z){const ee=[],oe=this._characterJoinerService.getJoinedCharacters(A),P=this._themeService.colors;let W,V=E.getNoBgTrimmedLength();D&&V<$+1&&(V=$+1);let J=0,_e="",be=0,Ve=0,Le=0,ie=!1,G=0,pe=!1,le=0;const Be=[],Te=Q!==-1&&Z!==-1;for(let Xe=0;Xe<V;Xe++){E.loadCell(Xe,this._workCell);let Ke=this._workCell.getWidth();if(Ke===0)continue;let st=!1,jt=Xe,Ye=this._workCell;if(oe.length>0&&Xe===oe[0][0]){st=!0;const Oe=oe.shift();Ye=new m.JoinedCellData(this._workCell,E.translateToString(!0,Oe[0],Oe[1]),Oe[1]-Oe[0]),jt=Oe[1]-1,Ke=Ye.getWidth()}const $t=this._isCellInSelection(Xe,A),Yt=D&&Xe===$,dt=Te&&Xe>=Q&&Xe<=Z;let Je=!1;this._decorationService.forEachDecorationAtCell(Xe,A,void 0,Oe=>{Je=!0});let nt=Ye.getChars()||p.WHITESPACE_CELL_CHAR;if(nt===" "&&(Ye.isUnderline()||Ye.isOverline())&&(nt=" "),le=Ke*I-Y.get(nt,Ye.isBold(),Ye.isItalic()),W){if(J&&($t&&pe||!$t&&!pe&&Ye.bg===be)&&($t&&pe&&P.selectionForeground||Ye.fg===Ve)&&Ye.extended.ext===Le&&dt===ie&&le===G&&!Yt&&!st&&!Je){Ye.isInvisible()?_e+=p.WHITESPACE_CELL_CHAR:_e+=nt,J++;continue}J&&(W.textContent=_e),W=this._document.createElement("span"),J=0,_e=""}else W=this._document.createElement("span");if(be=Ye.bg,Ve=Ye.fg,Le=Ye.extended.ext,ie=dt,G=le,pe=$t,st&&$>=Xe&&$<=jt&&($=Xe),!this._coreService.isCursorHidden&&Yt&&this._coreService.isCursorInitialized){if(Be.push("xterm-cursor"),this._coreBrowserService.isFocused)O&&Be.push("xterm-cursor-blink"),Be.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(M)switch(M){case"outline":Be.push("xterm-cursor-outline");break;case"block":Be.push("xterm-cursor-block");break;case"bar":Be.push("xterm-cursor-bar");break;case"underline":Be.push("xterm-cursor-underline")}}if(Ye.isBold()&&Be.push("xterm-bold"),Ye.isItalic()&&Be.push("xterm-italic"),Ye.isDim()&&Be.push("xterm-dim"),_e=Ye.isInvisible()?p.WHITESPACE_CELL_CHAR:Ye.getChars()||p.WHITESPACE_CELL_CHAR,Ye.isUnderline()&&(Be.push(`xterm-underline-${Ye.extended.underlineStyle}`),_e===" "&&(_e=" "),!Ye.isUnderlineColorDefault()))if(Ye.isUnderlineColorRGB())W.style.textDecorationColor=`rgb(${v.AttributeData.toColorRGB(Ye.getUnderlineColor()).join(",")})`;else{let Oe=Ye.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ye.isBold()&&Oe<8&&(Oe+=8),W.style.textDecorationColor=P.ansi[Oe].css}Ye.isOverline()&&(Be.push("xterm-overline"),_e===" "&&(_e=" ")),Ye.isStrikethrough()&&Be.push("xterm-strikethrough"),dt&&(W.style.textDecoration="underline");let ne=Ye.getFgColor(),Fe=Ye.getFgColorMode(),tt=Ye.getBgColor(),me=Ye.getBgColorMode();const rt=!!Ye.isInverse();if(rt){const Oe=ne;ne=tt,tt=Oe;const vt=Fe;Fe=me,me=vt}let Re,fe,ce,Ee=!1;switch(this._decorationService.forEachDecorationAtCell(Xe,A,void 0,Oe=>{Oe.options.layer!=="top"&&Ee||(Oe.backgroundColorRGB&&(me=50331648,tt=Oe.backgroundColorRGB.rgba>>8&16777215,Re=Oe.backgroundColorRGB),Oe.foregroundColorRGB&&(Fe=50331648,ne=Oe.foregroundColorRGB.rgba>>8&16777215,fe=Oe.foregroundColorRGB),Ee=Oe.options.layer==="top")}),!Ee&&$t&&(Re=this._coreBrowserService.isFocused?P.selectionBackgroundOpaque:P.selectionInactiveBackgroundOpaque,tt=Re.rgba>>8&16777215,me=50331648,Ee=!0,P.selectionForeground&&(Fe=50331648,ne=P.selectionForeground.rgba>>8&16777215,fe=P.selectionForeground)),Ee&&Be.push("xterm-decoration-top"),me){case 16777216:case 33554432:ce=P.ansi[tt],Be.push(`xterm-bg-${tt}`);break;case 50331648:ce=_.channels.toColor(tt>>16,tt>>8&255,255&tt),this._addStyle(W,`background-color:#${T((tt>>>0).toString(16),"0",6)}`);break;default:rt?(ce=P.foreground,Be.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):ce=P.background}switch(Re||Ye.isDim()&&(Re=_.color.multiplyOpacity(ce,.5)),Fe){case 16777216:case 33554432:Ye.isBold()&&ne<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ne+=8),this._applyMinimumContrast(W,ce,P.ansi[ne],Ye,Re,void 0)||Be.push(`xterm-fg-${ne}`);break;case 50331648:const Oe=_.channels.toColor(ne>>16&255,ne>>8&255,255&ne);this._applyMinimumContrast(W,ce,Oe,Ye,Re,fe)||this._addStyle(W,`color:#${T(ne.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(W,ce,P.foreground,Ye,Re,fe)||rt&&Be.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}Be.length&&(W.className=Be.join(" "),Be.length=0),Yt||st||Je?W.textContent=_e:J++,le!==this.defaultSpacing&&(W.style.letterSpacing=`${le}px`),ee.push(W),Xe=jt}return W&&J&&(W.textContent=_e),ee}_applyMinimumContrast(E,A,D,R,M,$){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,f.treatGlyphAsBackgroundColor)(R.getCode()))return!1;const O=this._getContrastCache(R);let I;if(M||$||(I=O.getColor(A.rgba,D.rgba)),I===void 0){const Y=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);I=_.color.ensureContrastRatio(M||A,$||D,Y),O.setColor((M||A).rgba,($||D).rgba,I??null)}return!!I&&(this._addStyle(E,`color:${I.css}`),!0)}_getContrastCache(E){return E.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(E,A){E.setAttribute("style",`${E.getAttribute("style")||""}${A};`)}_isCellInSelection(E,A){const D=this._selectionStart,R=this._selectionEnd;return!(!D||!R)&&(this._columnSelectMode?D[0]<=R[0]?E>=D[0]&&A>=D[1]&&E<R[0]&&A<=R[1]:E<D[0]&&A>=D[1]&&E>=R[0]&&A<=R[1]:A>D[1]&&A<R[1]||D[1]===R[1]&&A===D[1]&&E>=D[0]&&E<R[0]||D[1]<R[1]&&A===R[1]&&E<R[0]||D[1]<R[1]&&A===D[1]&&E>=D[0])}};function T(E,A,D){for(;E.length<D;)E=A+E;return E}r.DomRendererRowFactory=C=g([y(1,l.ICharacterJoinerService),y(2,N.IOptionsService),y(3,l.ICoreBrowserService),y(4,N.ICoreService),y(5,N.IDecorationService),y(6,l.IThemeService)],C)},2550:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WidthCache=void 0,r.WidthCache=class{constructor(o,g){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=o.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const y=o.createElement("span");y.classList.add("xterm-char-measure-element");const u=o.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const p=o.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const S=o.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontWeight="bold",S.style.fontStyle="italic",this._measureElements=[y,u,p,S],this._container.appendChild(y),this._container.appendChild(u),this._container.appendChild(p),this._container.appendChild(S),g.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(o,g,y,u){o===this._font&&g===this._fontSize&&y===this._weight&&u===this._weightBold||(this._font=o,this._fontSize=g,this._weight=y,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${y}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${y}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(o,g,y){let u=0;if(!g&&!y&&o.length===1&&(u=o.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const N=this._measure(o,0);return N>0&&(this._flat[u]=N),N}let p=o;g&&(p+="B"),y&&(p+="I");let S=this._holey.get(p);if(S===void 0){let N=0;g&&(N|=1),y&&(N|=2),S=this._measure(o,N),S>0&&this._holey.set(p,S)}return S}_measure(o,g){const y=this._measureElements[g];return y.textContent=o.repeat(32),y.offsetWidth/32}}},2223:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TEXT_BASELINE=r.DIM_OPACITY=r.INVERTED_DEFAULT_COLOR=void 0;const g=o(6114);r.INVERTED_DEFAULT_COLOR=257,r.DIM_OPACITY=.5,r.TEXT_BASELINE=g.isFirefox||g.isLegacyEdge?"bottom":"ideographic"},6171:(b,r)=>{function o(y){return 57508<=y&&y<=57558}function g(y){return y>=128512&&y<=128591||y>=127744&&y<=128511||y>=128640&&y<=128767||y>=9728&&y<=9983||y>=9984&&y<=10175||y>=65024&&y<=65039||y>=129280&&y<=129535||y>=127462&&y<=127487}Object.defineProperty(r,"__esModule",{value:!0}),r.computeNextVariantOffset=r.createRenderDimensions=r.treatGlyphAsBackgroundColor=r.allowRescaling=r.isEmoji=r.isRestrictedPowerlineGlyph=r.isPowerlineGlyph=r.throwIfFalsy=void 0,r.throwIfFalsy=function(y){if(!y)throw new Error("value must not be falsy");return y},r.isPowerlineGlyph=o,r.isRestrictedPowerlineGlyph=function(y){return 57520<=y&&y<=57527},r.isEmoji=g,r.allowRescaling=function(y,u,p,S){return u===1&&p>Math.ceil(1.5*S)&&y!==void 0&&y>255&&!g(y)&&!o(y)&&!function(N){return 57344<=N&&N<=63743}(y)},r.treatGlyphAsBackgroundColor=function(y){return o(y)||function(u){return 9472<=u&&u<=9631}(y)},r.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}}}},r.computeNextVariantOffset=function(y,u,p=0){return(y-(2*Math.round(u)-p))%(2*Math.round(u))}},6052:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createSelectionRenderModel=void 0;class o{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(y,u,p,S=!1){if(this.selectionStart=u,this.selectionEnd=p,!u||!p||u[0]===p[0]&&u[1]===p[1])return void this.clear();const N=y.buffers.active.ydisp,_=u[1]-N,l=p[1]-N,m=Math.max(_,0),f=Math.min(l,y.rows-1);m>=y.rows||f<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=_,this.viewportEndRow=l,this.viewportCappedStartRow=m,this.viewportCappedEndRow=f,this.startCol=u[0],this.endCol=p[0])}isCellSelected(y,u,p){return!!this.hasSelection&&(p-=y.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&p>=this.viewportCappedStartRow&&u<this.endCol&&p<=this.viewportCappedEndRow:u<this.startCol&&p>=this.viewportCappedStartRow&&u>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&u>=this.startCol)}}r.createSelectionRenderModel=function(){return new o}},456:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionModel=void 0,r.SelectionModel=class{constructor(o){this._bufferService=o,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 o=this.selectionStart[0]+this.selectionStartLength;return o>this._bufferService.cols?o%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(o/this._bufferService.cols)-1]:[o%this._bufferService.cols,this.selectionStart[1]+Math.floor(o/this._bufferService.cols)]:[o,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const o=this.selectionStart[0]+this.selectionStartLength;return o>this._bufferService.cols?[o%this._bufferService.cols,this.selectionStart[1]+Math.floor(o/this._bufferService.cols)]:[Math.max(o,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const o=this.selectionStart,g=this.selectionEnd;return!(!o||!g)&&(o[1]>g[1]||o[1]===g[1]&&o[0]>g[0])}handleTrim(o){return this.selectionStart&&(this.selectionStart[1]-=o),this.selectionEnd&&(this.selectionEnd[1]-=o),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(b,r,o){var g=this&&this.__decorate||function(f,v,C,T){var E,A=arguments.length,D=A<3?v:T===null?T=Object.getOwnPropertyDescriptor(v,C):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,v,C,T);else for(var R=f.length-1;R>=0;R--)(E=f[R])&&(D=(A<3?E(D):A>3?E(v,C,D):E(v,C))||D);return A>3&&D&&Object.defineProperty(v,C,D),D},y=this&&this.__param||function(f,v){return function(C,T){v(C,T,f)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharSizeService=void 0;const u=o(2585),p=o(8460),S=o(844);let N=r.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(f,v,C){super(),this._optionsService=C,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new m(this._optionsService))}catch{this._measureStrategy=this.register(new l(f,v,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const f=this._measureStrategy.measure();f.width===this.width&&f.height===this.height||(this.width=f.width,this.height=f.height,this._onCharSizeChange.fire())}};r.CharSizeService=N=g([y(2,u.IOptionsService)],N);class _ extends S.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(v,C){v!==void 0&&v>0&&C!==void 0&&C>0&&(this._result.width=v,this._result.height=C)}}class l extends _{constructor(v,C,T){super(),this._document=v,this._parentElement=C,this._optionsService=T,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 m extends _{constructor(v){super(),this._optionsService=v,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const C=this._ctx.measureText("W");if(!("width"in C&&"fontBoundingBoxAscent"in C&&"fontBoundingBoxDescent"in C))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const v=this._ctx.measureText("W");return this._validateAndSet(v.width,v.fontBoundingBoxAscent+v.fontBoundingBoxDescent),this._result}}},4269:function(b,r,o){var g=this&&this.__decorate||function(m,f,v,C){var T,E=arguments.length,A=E<3?f:C===null?C=Object.getOwnPropertyDescriptor(f,v):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(m,f,v,C);else for(var D=m.length-1;D>=0;D--)(T=m[D])&&(A=(E<3?T(A):E>3?T(f,v,A):T(f,v))||A);return E>3&&A&&Object.defineProperty(f,v,A),A},y=this&&this.__param||function(m,f){return function(v,C){f(v,C,m)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharacterJoinerService=r.JoinedCellData=void 0;const u=o(3734),p=o(643),S=o(511),N=o(2585);class _ extends u.AttributeData{constructor(f,v,C){super(),this.content=0,this.combinedData="",this.fg=f.fg,this.bg=f.bg,this.combinedData=v,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(f){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.JoinedCellData=_;let l=r.CharacterJoinerService=class S1{constructor(f){this._bufferService=f,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(f){const v={id:this._nextCharacterJoinerId++,handler:f};return this._characterJoiners.push(v),v.id}deregister(f){for(let v=0;v<this._characterJoiners.length;v++)if(this._characterJoiners[v].id===f)return this._characterJoiners.splice(v,1),!0;return!1}getJoinedCharacters(f){if(this._characterJoiners.length===0)return[];const v=this._bufferService.buffer.lines.get(f);if(!v||v.length===0)return[];const C=[],T=v.translateToString(!0);let E=0,A=0,D=0,R=v.getFg(0),M=v.getBg(0);for(let $=0;$<v.getTrimmedLength();$++)if(v.loadCell($,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==M){if($-E>1){const O=this._getJoinedRanges(T,D,A,v,E);for(let I=0;I<O.length;I++)C.push(O[I])}E=$,D=A,R=this._workCell.fg,M=this._workCell.bg}A+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-E>1){const $=this._getJoinedRanges(T,D,A,v,E);for(let O=0;O<$.length;O++)C.push($[O])}return C}_getJoinedRanges(f,v,C,T,E){const A=f.substring(v,C);let D=[];try{D=this._characterJoiners[0].handler(A)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const M=this._characterJoiners[R].handler(A);for(let $=0;$<M.length;$++)S1._mergeRanges(D,M[$])}catch(M){console.error(M)}return this._stringRangesToCellRanges(D,T,E),D}_stringRangesToCellRanges(f,v,C){let T=0,E=!1,A=0,D=f[T];if(D){for(let R=C;R<this._bufferService.cols;R++){const M=v.getWidth(R),$=v.getString(R).length||p.WHITESPACE_CELL_CHAR.length;if(M!==0){if(!E&&D[0]<=A&&(D[0]=R,E=!0),D[1]<=A){if(D[1]=R,D=f[++T],!D)break;D[0]<=A?(D[0]=R,E=!0):E=!1}A+=$}}D&&(D[1]=this._bufferService.cols)}}static _mergeRanges(f,v){let C=!1;for(let T=0;T<f.length;T++){const E=f[T];if(C){if(v[1]<=E[0])return f[T-1][1]=v[1],f;if(v[1]<=E[1])return f[T-1][1]=Math.max(v[1],E[1]),f.splice(T,1),f;f.splice(T,1),T--}else{if(v[1]<=E[0])return f.splice(T,0,v),f;if(v[1]<=E[1])return E[0]=Math.min(v[0],E[0]),f;v[0]<E[1]&&(E[0]=Math.min(v[0],E[0]),C=!0)}}return C?f[f.length-1][1]=v[1]:f.push(v),f}};r.CharacterJoinerService=l=g([y(0,N.IBufferService)],l)},5114:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreBrowserService=void 0;const g=o(844),y=o(8460),u=o(3656);class p extends g.Disposable{constructor(_,l,m){super(),this._textarea=_,this._window=l,this.mainDocument=m,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new S(this._window),this._onDprChange=this.register(new y.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new y.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(f=>this._screenDprMonitor.setWindow(f))),this.register((0,y.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",()=>this._isFocused=!0),this._textarea.addEventListener("blur",()=>this._isFocused=!1)}get window(){return this._window}set window(_){this._window!==_&&(this._window=_,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}}r.CoreBrowserService=p;class S extends g.Disposable{constructor(_){super(),this._parentWindow=_,this._windowResizeListener=this.register(new g.MutableDisposable),this._onDprChange=this.register(new y.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,g.toDisposable)(()=>this.clearListener()))}setWindow(_){this._parentWindow=_,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var _;this._outerListener&&((_=this._resolutionMediaMatchList)==null||_.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:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.LinkProviderService=void 0;const g=o(844);class y extends g.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,g.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const S=this.linkProviders.indexOf(p);S!==-1&&this.linkProviders.splice(S,1)}}}}r.LinkProviderService=y},8934:function(b,r,o){var g=this&&this.__decorate||function(N,_,l,m){var f,v=arguments.length,C=v<3?_:m===null?m=Object.getOwnPropertyDescriptor(_,l):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(N,_,l,m);else for(var T=N.length-1;T>=0;T--)(f=N[T])&&(C=(v<3?f(C):v>3?f(_,l,C):f(_,l))||C);return v>3&&C&&Object.defineProperty(_,l,C),C},y=this&&this.__param||function(N,_){return function(l,m){_(l,m,N)}};Object.defineProperty(r,"__esModule",{value:!0}),r.MouseService=void 0;const u=o(4725),p=o(9806);let S=r.MouseService=class{constructor(N,_){this._renderService=N,this._charSizeService=_}getCoords(N,_,l,m,f){return(0,p.getCoords)(window,N,_,l,m,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,f)}getMouseReportCoords(N,_){const l=(0,p.getCoordsRelativeToElement)(window,N,_);if(this._charSizeService.hasValidSize)return l[0]=Math.min(Math.max(l[0],0),this._renderService.dimensions.css.canvas.width-1),l[1]=Math.min(Math.max(l[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(l[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(l[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(l[0]),y:Math.floor(l[1])}}};r.MouseService=S=g([y(0,u.IRenderService),y(1,u.ICharSizeService)],S)},3230:function(b,r,o){var g=this&&this.__decorate||function(f,v,C,T){var E,A=arguments.length,D=A<3?v:T===null?T=Object.getOwnPropertyDescriptor(v,C):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,v,C,T);else for(var R=f.length-1;R>=0;R--)(E=f[R])&&(D=(A<3?E(D):A>3?E(v,C,D):E(v,C))||D);return A>3&&D&&Object.defineProperty(v,C,D),D},y=this&&this.__param||function(f,v){return function(C,T){v(C,T,f)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RenderService=void 0;const u=o(6193),p=o(4725),S=o(8460),N=o(844),_=o(7226),l=o(2585);let m=r.RenderService=class extends N.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(f,v,C,T,E,A,D,R){super(),this._rowCount=f,this._charSizeService=T,this._renderer=this.register(new N.MutableDisposable),this._pausedResizeTask=new _.DebouncedIdleTask,this._observerDisposable=this.register(new N.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 S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer((M,$)=>this._renderRows(M,$),D),this.register(this._renderDebouncer),this.register(D.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(A.onResize(()=>this._fullRefresh())),this.register(A.buffers.onBufferActivate(()=>{var M;return(M=this._renderer.value)==null?void 0:M.clear()})),this.register(C.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(E.onDecorationRegistered(()=>this._fullRefresh())),this.register(E.onDecorationRemoved(()=>this._fullRefresh())),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(A.cols,A.rows),this._fullRefresh()})),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(A.buffer.y,A.buffer.y,!0))),this.register(R.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(D.window,v),this.register(D.onWindowChange(M=>this._registerIntersectionObserver(M,v)))}_registerIntersectionObserver(f,v){if("IntersectionObserver"in f){const C=new f.IntersectionObserver(T=>this._handleIntersectionChange(T[T.length-1]),{threshold:0});C.observe(v),this._observerDisposable.value=(0,N.toDisposable)(()=>C.disconnect())}}_handleIntersectionChange(f){this._isPaused=f.isIntersecting===void 0?f.intersectionRatio===0:!f.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(f,v,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(f,v,this._rowCount))}_renderRows(f,v){this._renderer.value&&(f=Math.min(f,this._rowCount-1),v=Math.min(v,this._rowCount-1),this._renderer.value.renderRows(f,v),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:f,end:v}),this._onRender.fire({start:f,end:v}),this._isNextRenderRedrawOnly=!0)}resize(f,v){this._rowCount=v,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(f){this._renderer.value=f,this._renderer.value&&(this._renderer.value.onRequestRedraw(v=>this.refreshRows(v.start,v.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(f){return this._renderDebouncer.addRefreshCallback(f)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var f,v;this._renderer.value&&((v=(f=this._renderer.value).clearTextureAtlas)==null||v.call(f),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(f,v){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(f,v)}):this._renderer.value.handleResize(f,v),this._fullRefresh())}handleCharSizeChanged(){var f;(f=this._renderer.value)==null||f.handleCharSizeChanged()}handleBlur(){var f;(f=this._renderer.value)==null||f.handleBlur()}handleFocus(){var f;(f=this._renderer.value)==null||f.handleFocus()}handleSelectionChanged(f,v,C){var T;this._selectionState.start=f,this._selectionState.end=v,this._selectionState.columnSelectMode=C,(T=this._renderer.value)==null||T.handleSelectionChanged(f,v,C)}handleCursorMove(){var f;(f=this._renderer.value)==null||f.handleCursorMove()}clear(){var f;(f=this._renderer.value)==null||f.clear()}};r.RenderService=m=g([y(2,l.IOptionsService),y(3,p.ICharSizeService),y(4,l.IDecorationService),y(5,l.IBufferService),y(6,p.ICoreBrowserService),y(7,p.IThemeService)],m)},9312:function(b,r,o){var g=this&&this.__decorate||function(D,R,M,$){var O,I=arguments.length,Y=I<3?R:$===null?$=Object.getOwnPropertyDescriptor(R,M):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(D,R,M,$);else for(var Q=D.length-1;Q>=0;Q--)(O=D[Q])&&(Y=(I<3?O(Y):I>3?O(R,M,Y):O(R,M))||Y);return I>3&&Y&&Object.defineProperty(R,M,Y),Y},y=this&&this.__param||function(D,R){return function(M,$){R(M,$,D)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionService=void 0;const u=o(9806),p=o(9504),S=o(456),N=o(4725),_=o(8460),l=o(844),m=o(6114),f=o(4841),v=o(511),C=o(2585),T=" ",E=new RegExp(T,"g");let A=r.SelectionService=class extends l.Disposable{constructor(D,R,M,$,O,I,Y,Q,Z){super(),this._element=D,this._screenElement=R,this._linkifier=M,this._bufferService=$,this._coreService=O,this._mouseService=I,this._optionsService=Y,this._renderService=Q,this._coreBrowserService=Z,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new v.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new _.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new _.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new _.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new _.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=ee=>this._handleMouseMove(ee),this._mouseUpListener=ee=>this._handleMouseUp(ee),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(ee=>this._handleTrim(ee)),this.register(this._bufferService.buffers.onBufferActivate(ee=>this._handleBufferActivate(ee))),this.enable(),this._model=new S.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,l.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 D=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!D||!R||D[0]===R[0]&&D[1]===R[1])}get selectionText(){const D=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!D||!R)return"";const M=this._bufferService.buffer,$=[];if(this._activeSelectionMode===3){if(D[0]===R[0])return"";const O=D[0]<R[0]?D[0]:R[0],I=D[0]<R[0]?R[0]:D[0];for(let Y=D[1];Y<=R[1];Y++){const Q=M.translateBufferLineToString(Y,!0,O,I);$.push(Q)}}else{const O=D[1]===R[1]?R[0]:void 0;$.push(M.translateBufferLineToString(D[1],!0,D[0],O));for(let I=D[1]+1;I<=R[1]-1;I++){const Y=M.lines.get(I),Q=M.translateBufferLineToString(I,!0);Y!=null&&Y.isWrapped?$[$.length-1]+=Q:$.push(Q)}if(D[1]!==R[1]){const I=M.lines.get(R[1]),Y=M.translateBufferLineToString(R[1],!0,0,R[0]);I&&I.isWrapped?$[$.length-1]+=Y:$.push(Y)}}return $.map(O=>O.replace(E," ")).join(m.isWindows?`\r
211
+ `:`
212
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(D){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),m.isLinux&&D&&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(D){const R=this._getMouseBufferCoords(D),M=this._model.finalSelectionStart,$=this._model.finalSelectionEnd;return!!(M&&$&&R)&&this._areCoordsInSelection(R,M,$)}isCellInSelection(D,R){const M=this._model.finalSelectionStart,$=this._model.finalSelectionEnd;return!(!M||!$)&&this._areCoordsInSelection([D,R],M,$)}_areCoordsInSelection(D,R,M){return D[1]>R[1]&&D[1]<M[1]||R[1]===M[1]&&D[1]===R[1]&&D[0]>=R[0]&&D[0]<M[0]||R[1]<M[1]&&D[1]===M[1]&&D[0]<M[0]||R[1]<M[1]&&D[1]===R[1]&&D[0]>=R[0]}_selectWordAtCursor(D,R){var O,I;const M=(I=(O=this._linkifier.currentLink)==null?void 0:O.link)==null?void 0:I.range;if(M)return this._model.selectionStart=[M.start.x-1,M.start.y-1],this._model.selectionStartLength=(0,f.getRangeLength)(M,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const $=this._getMouseBufferCoords(D);return!!$&&(this._selectWordAt($,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(D,R){this._model.clearSelection(),D=Math.max(D,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,D],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(D){this._model.handleTrim(D)&&this.refresh()}_getMouseBufferCoords(D){const R=this._mouseService.getCoords(D,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(D){let R=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,D,this._screenElement)[1];const M=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=M?0:(R>M&&(R-=M),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(D){return m.isMac?D.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:D.shiftKey}handleMouseDown(D){if(this._mouseDownTimeStamp=D.timeStamp,(D.button!==2||!this.hasSelection)&&D.button===0){if(!this._enabled){if(!this.shouldForceSelection(D))return;D.stopPropagation()}D.preventDefault(),this._dragScrollAmount=0,this._enabled&&D.shiftKey?this._handleIncrementalClick(D):D.detail===1?this._handleSingleClick(D):D.detail===2?this._handleDoubleClick(D):D.detail===3&&this._handleTripleClick(D),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(D){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(D))}_handleSingleClick(D){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(D)?3:0,this._model.selectionStart=this._getMouseBufferCoords(D),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const R=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);R&&R.length!==this._model.selectionStart[0]&&R.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(D){this._selectWordAtCursor(D,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(D){const R=this._getMouseBufferCoords(D);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(D){return D.altKey&&!(m.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(D){if(D.stopImmediatePropagation(),!this._model.selectionStart)return;const R=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(D),!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(D),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const M=this._bufferService.buffer;if(this._model.selectionEnd[1]<M.lines.length){const $=M.lines.get(this._model.selectionEnd[1]);$&&$.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}R&&R[0]===this._model.selectionEnd[0]&&R[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 D=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(D.ydisp+this._bufferService.rows,D.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=D.ydisp),this.refresh()}}_handleMouseUp(D){const R=D.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&D.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const M=this._mouseService.getCoords(D,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(M&&M[0]!==void 0&&M[1]!==void 0){const $=(0,p.moveToCellSequence)(M[0]-1,M[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent($,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const D=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,M=!(!D||!R||D[0]===R[0]&&D[1]===R[1]);M?D&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&D[0]===this._oldSelectionStart[0]&&D[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(D,R,M)):this._oldHasSelection&&this._fireOnSelectionChange(D,R,M)}_fireOnSelectionChange(D,R,M){this._oldSelectionStart=D,this._oldSelectionEnd=R,this._oldHasSelection=M,this._onSelectionChange.fire()}_handleBufferActivate(D){this.clearSelection(),this._trimListener.dispose(),this._trimListener=D.activeBuffer.lines.onTrim(R=>this._handleTrim(R))}_convertViewportColToCharacterIndex(D,R){let M=R;for(let $=0;R>=$;$++){const O=D.loadCell($,this._workCell).getChars().length;this._workCell.getWidth()===0?M--:O>1&&R!==$&&(M+=O-1)}return M}setSelection(D,R,M){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[D,R],this._model.selectionStartLength=M,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(D){this._isClickInSelection(D)||(this._selectWordAtCursor(D,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(D,R,M=!0,$=!0){if(D[0]>=this._bufferService.cols)return;const O=this._bufferService.buffer,I=O.lines.get(D[1]);if(!I)return;const Y=O.translateBufferLineToString(D[1],!1);let Q=this._convertViewportColToCharacterIndex(I,D[0]),Z=Q;const ee=D[0]-Q;let oe=0,P=0,W=0,V=0;if(Y.charAt(Q)===" "){for(;Q>0&&Y.charAt(Q-1)===" ";)Q--;for(;Z<Y.length&&Y.charAt(Z+1)===" ";)Z++}else{let be=D[0],Ve=D[0];I.getWidth(be)===0&&(oe++,be--),I.getWidth(Ve)===2&&(P++,Ve++);const Le=I.getString(Ve).length;for(Le>1&&(V+=Le-1,Z+=Le-1);be>0&&Q>0&&!this._isCharWordSeparator(I.loadCell(be-1,this._workCell));){I.loadCell(be-1,this._workCell);const ie=this._workCell.getChars().length;this._workCell.getWidth()===0?(oe++,be--):ie>1&&(W+=ie-1,Q-=ie-1),Q--,be--}for(;Ve<I.length&&Z+1<Y.length&&!this._isCharWordSeparator(I.loadCell(Ve+1,this._workCell));){I.loadCell(Ve+1,this._workCell);const ie=this._workCell.getChars().length;this._workCell.getWidth()===2?(P++,Ve++):ie>1&&(V+=ie-1,Z+=ie-1),Z++,Ve++}}Z++;let J=Q+ee-oe+W,_e=Math.min(this._bufferService.cols,Z-Q+oe+P-W-V);if(R||Y.slice(Q,Z).trim()!==""){if(M&&J===0&&I.getCodePoint(0)!==32){const be=O.lines.get(D[1]-1);if(be&&I.isWrapped&&be.getCodePoint(this._bufferService.cols-1)!==32){const Ve=this._getWordAt([this._bufferService.cols-1,D[1]-1],!1,!0,!1);if(Ve){const Le=this._bufferService.cols-Ve.start;J-=Le,_e+=Le}}}if($&&J+_e===this._bufferService.cols&&I.getCodePoint(this._bufferService.cols-1)!==32){const be=O.lines.get(D[1]+1);if(be!=null&&be.isWrapped&&be.getCodePoint(0)!==32){const Ve=this._getWordAt([0,D[1]+1],!1,!1,!0);Ve&&(_e+=Ve.length)}}return{start:J,length:_e}}}_selectWordAt(D,R){const M=this._getWordAt(D,R);if(M){for(;M.start<0;)M.start+=this._bufferService.cols,D[1]--;this._model.selectionStart=[M.start,D[1]],this._model.selectionStartLength=M.length}}_selectToWordAt(D){const R=this._getWordAt(D,!0);if(R){let M=D[1];for(;R.start<0;)R.start+=this._bufferService.cols,M--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,M++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,M]}}_isCharWordSeparator(D){return D.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(D.getChars())>=0}_selectLineAt(D){const R=this._bufferService.buffer.getWrappedRangeForLine(D),M={start:{x:0,y:R.first},end:{x:this._bufferService.cols-1,y:R.last}};this._model.selectionStart=[0,R.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,f.getRangeLength)(M,this._bufferService.cols)}};r.SelectionService=A=g([y(3,C.IBufferService),y(4,C.ICoreService),y(5,N.IMouseService),y(6,C.IOptionsService),y(7,N.IRenderService),y(8,N.ICoreBrowserService)],A)},4725:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ILinkProviderService=r.IThemeService=r.ICharacterJoinerService=r.ISelectionService=r.IRenderService=r.IMouseService=r.ICoreBrowserService=r.ICharSizeService=void 0;const g=o(8343);r.ICharSizeService=(0,g.createDecorator)("CharSizeService"),r.ICoreBrowserService=(0,g.createDecorator)("CoreBrowserService"),r.IMouseService=(0,g.createDecorator)("MouseService"),r.IRenderService=(0,g.createDecorator)("RenderService"),r.ISelectionService=(0,g.createDecorator)("SelectionService"),r.ICharacterJoinerService=(0,g.createDecorator)("CharacterJoinerService"),r.IThemeService=(0,g.createDecorator)("ThemeService"),r.ILinkProviderService=(0,g.createDecorator)("LinkProviderService")},6731:function(b,r,o){var g=this&&this.__decorate||function(A,D,R,M){var $,O=arguments.length,I=O<3?D:M===null?M=Object.getOwnPropertyDescriptor(D,R):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(A,D,R,M);else for(var Y=A.length-1;Y>=0;Y--)($=A[Y])&&(I=(O<3?$(I):O>3?$(D,R,I):$(D,R))||I);return O>3&&I&&Object.defineProperty(D,R,I),I},y=this&&this.__param||function(A,D){return function(R,M){D(R,M,A)}};Object.defineProperty(r,"__esModule",{value:!0}),r.ThemeService=r.DEFAULT_ANSI_COLORS=void 0;const u=o(7239),p=o(8055),S=o(8460),N=o(844),_=o(2585),l=p.css.toColor("#ffffff"),m=p.css.toColor("#000000"),f=p.css.toColor("#ffffff"),v=p.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};r.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const A=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],D=[0,95,135,175,215,255];for(let R=0;R<216;R++){const M=D[R/36%6|0],$=D[R/6%6|0],O=D[R%6];A.push({css:p.channels.toCss(M,$,O),rgba:p.channels.toRgba(M,$,O)})}for(let R=0;R<24;R++){const M=8+10*R;A.push({css:p.channels.toCss(M,M,M),rgba:p.channels.toRgba(M,M,M)})}return A})());let T=r.ThemeService=class extends N.Disposable{get colors(){return this._colors}constructor(A){super(),this._optionsService=A,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:l,background:m,cursor:f,cursorAccent:v,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:p.color.blend(m,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:p.color.blend(m,C),ansi:r.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(A={}){const D=this._colors;if(D.foreground=E(A.foreground,l),D.background=E(A.background,m),D.cursor=E(A.cursor,f),D.cursorAccent=E(A.cursorAccent,v),D.selectionBackgroundTransparent=E(A.selectionBackground,C),D.selectionBackgroundOpaque=p.color.blend(D.background,D.selectionBackgroundTransparent),D.selectionInactiveBackgroundTransparent=E(A.selectionInactiveBackground,D.selectionBackgroundTransparent),D.selectionInactiveBackgroundOpaque=p.color.blend(D.background,D.selectionInactiveBackgroundTransparent),D.selectionForeground=A.selectionForeground?E(A.selectionForeground,p.NULL_COLOR):void 0,D.selectionForeground===p.NULL_COLOR&&(D.selectionForeground=void 0),p.color.isOpaque(D.selectionBackgroundTransparent)&&(D.selectionBackgroundTransparent=p.color.opacity(D.selectionBackgroundTransparent,.3)),p.color.isOpaque(D.selectionInactiveBackgroundTransparent)&&(D.selectionInactiveBackgroundTransparent=p.color.opacity(D.selectionInactiveBackgroundTransparent,.3)),D.ansi=r.DEFAULT_ANSI_COLORS.slice(),D.ansi[0]=E(A.black,r.DEFAULT_ANSI_COLORS[0]),D.ansi[1]=E(A.red,r.DEFAULT_ANSI_COLORS[1]),D.ansi[2]=E(A.green,r.DEFAULT_ANSI_COLORS[2]),D.ansi[3]=E(A.yellow,r.DEFAULT_ANSI_COLORS[3]),D.ansi[4]=E(A.blue,r.DEFAULT_ANSI_COLORS[4]),D.ansi[5]=E(A.magenta,r.DEFAULT_ANSI_COLORS[5]),D.ansi[6]=E(A.cyan,r.DEFAULT_ANSI_COLORS[6]),D.ansi[7]=E(A.white,r.DEFAULT_ANSI_COLORS[7]),D.ansi[8]=E(A.brightBlack,r.DEFAULT_ANSI_COLORS[8]),D.ansi[9]=E(A.brightRed,r.DEFAULT_ANSI_COLORS[9]),D.ansi[10]=E(A.brightGreen,r.DEFAULT_ANSI_COLORS[10]),D.ansi[11]=E(A.brightYellow,r.DEFAULT_ANSI_COLORS[11]),D.ansi[12]=E(A.brightBlue,r.DEFAULT_ANSI_COLORS[12]),D.ansi[13]=E(A.brightMagenta,r.DEFAULT_ANSI_COLORS[13]),D.ansi[14]=E(A.brightCyan,r.DEFAULT_ANSI_COLORS[14]),D.ansi[15]=E(A.brightWhite,r.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const R=Math.min(D.ansi.length-16,A.extendedAnsi.length);for(let M=0;M<R;M++)D.ansi[M+16]=E(A.extendedAnsi[M],r.DEFAULT_ANSI_COLORS[M+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(A){this._restoreColor(A),this._onChangeColors.fire(this.colors)}_restoreColor(A){if(A!==void 0)switch(A){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[A]=this._restoreColors.ansi[A]}else for(let D=0;D<this._restoreColors.ansi.length;++D)this._colors.ansi[D]=this._restoreColors.ansi[D]}modifyColors(A){A(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function E(A,D){if(A!==void 0)try{return p.css.toColor(A)}catch{}return D}r.ThemeService=T=g([y(0,_.IOptionsService)],T)},6349:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CircularList=void 0;const g=o(8460),y=o(844);class u extends y.Disposable{constructor(S){super(),this._maxLength=S,this.onDeleteEmitter=this.register(new g.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new g.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new g.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(S){if(this._maxLength===S)return;const N=new Array(S);for(let _=0;_<Math.min(S,this.length);_++)N[_]=this._array[this._getCyclicIndex(_)];this._array=N,this._maxLength=S,this._startIndex=0}get length(){return this._length}set length(S){if(S>this._length)for(let N=this._length;N<S;N++)this._array[N]=void 0;this._length=S}get(S){return this._array[this._getCyclicIndex(S)]}set(S,N){this._array[this._getCyclicIndex(S)]=N}push(S){this._array[this._getCyclicIndex(this._length)]=S,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(S,N,..._){if(N){for(let l=S;l<this._length-N;l++)this._array[this._getCyclicIndex(l)]=this._array[this._getCyclicIndex(l+N)];this._length-=N,this.onDeleteEmitter.fire({index:S,amount:N})}for(let l=this._length-1;l>=S;l--)this._array[this._getCyclicIndex(l+_.length)]=this._array[this._getCyclicIndex(l)];for(let l=0;l<_.length;l++)this._array[this._getCyclicIndex(S+l)]=_[l];if(_.length&&this.onInsertEmitter.fire({index:S,amount:_.length}),this._length+_.length>this._maxLength){const l=this._length+_.length-this._maxLength;this._startIndex+=l,this._length=this._maxLength,this.onTrimEmitter.fire(l)}else this._length+=_.length}trimStart(S){S>this._length&&(S=this._length),this._startIndex+=S,this._length-=S,this.onTrimEmitter.fire(S)}shiftElements(S,N,_){if(!(N<=0)){if(S<0||S>=this._length)throw new Error("start argument out of range");if(S+_<0)throw new Error("Cannot shift elements in list beyond index 0");if(_>0){for(let m=N-1;m>=0;m--)this.set(S+m+_,this.get(S+m));const l=S+N+_-this._length;if(l>0)for(this._length+=l;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let l=0;l<N;l++)this.set(S+l+_,this.get(S+l))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}r.CircularList=u},1439:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.clone=void 0,r.clone=function o(g,y=5){if(typeof g!="object")return g;const u=Array.isArray(g)?[]:{};for(const p in g)u[p]=y<=1?g[p]:g[p]&&o(g[p],y-1);return u}},8055:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.contrastRatio=r.toPaddedHex=r.rgba=r.rgb=r.css=r.color=r.channels=r.NULL_COLOR=void 0;let o=0,g=0,y=0,u=0;var p,S,N,_,l;function m(v){const C=v.toString(16);return C.length<2?"0"+C:C}function f(v,C){return v<C?(C+.05)/(v+.05):(v+.05)/(C+.05)}r.NULL_COLOR={css:"#00000000",rgba:0},function(v){v.toCss=function(C,T,E,A){return A!==void 0?`#${m(C)}${m(T)}${m(E)}${m(A)}`:`#${m(C)}${m(T)}${m(E)}`},v.toRgba=function(C,T,E,A=255){return(C<<24|T<<16|E<<8|A)>>>0},v.toColor=function(C,T,E,A){return{css:v.toCss(C,T,E,A),rgba:v.toRgba(C,T,E,A)}}}(p||(r.channels=p={})),function(v){function C(T,E){return u=Math.round(255*E),[o,g,y]=l.toChannels(T.rgba),{css:p.toCss(o,g,y,u),rgba:p.toRgba(o,g,y,u)}}v.blend=function(T,E){if(u=(255&E.rgba)/255,u===1)return{css:E.css,rgba:E.rgba};const A=E.rgba>>24&255,D=E.rgba>>16&255,R=E.rgba>>8&255,M=T.rgba>>24&255,$=T.rgba>>16&255,O=T.rgba>>8&255;return o=M+Math.round((A-M)*u),g=$+Math.round((D-$)*u),y=O+Math.round((R-O)*u),{css:p.toCss(o,g,y),rgba:p.toRgba(o,g,y)}},v.isOpaque=function(T){return(255&T.rgba)==255},v.ensureContrastRatio=function(T,E,A){const D=l.ensureContrastRatio(T.rgba,E.rgba,A);if(D)return p.toColor(D>>24&255,D>>16&255,D>>8&255)},v.opaque=function(T){const E=(255|T.rgba)>>>0;return[o,g,y]=l.toChannels(E),{css:p.toCss(o,g,y),rgba:E}},v.opacity=C,v.multiplyOpacity=function(T,E){return u=255&T.rgba,C(T,u*E/255)},v.toColorRGB=function(T){return[T.rgba>>24&255,T.rgba>>16&255,T.rgba>>8&255]}}(S||(r.color=S={})),function(v){let C,T;try{const E=document.createElement("canvas");E.width=1,E.height=1;const A=E.getContext("2d",{willReadFrequently:!0});A&&(C=A,C.globalCompositeOperation="copy",T=C.createLinearGradient(0,0,1,1))}catch{}v.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return o=parseInt(E.slice(1,2).repeat(2),16),g=parseInt(E.slice(2,3).repeat(2),16),y=parseInt(E.slice(3,4).repeat(2),16),p.toColor(o,g,y);case 5:return o=parseInt(E.slice(1,2).repeat(2),16),g=parseInt(E.slice(2,3).repeat(2),16),y=parseInt(E.slice(3,4).repeat(2),16),u=parseInt(E.slice(4,5).repeat(2),16),p.toColor(o,g,y,u);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const A=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return o=parseInt(A[1]),g=parseInt(A[2]),y=parseInt(A[3]),u=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(o,g,y,u);if(!C||!T)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=T,C.fillStyle=E,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[o,g,y,u]=C.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(o,g,y,u),css:E}}}(N||(r.css=N={})),function(v){function C(T,E,A){const D=T/255,R=E/255,M=A/255;return .2126*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))}v.relativeLuminance=function(T){return C(T>>16&255,T>>8&255,255&T)},v.relativeLuminance2=C}(_||(r.rgb=_={})),function(v){function C(E,A,D){const R=E>>24&255,M=E>>16&255,$=E>>8&255;let O=A>>24&255,I=A>>16&255,Y=A>>8&255,Q=f(_.relativeLuminance2(O,I,Y),_.relativeLuminance2(R,M,$));for(;Q<D&&(O>0||I>0||Y>0);)O-=Math.max(0,Math.ceil(.1*O)),I-=Math.max(0,Math.ceil(.1*I)),Y-=Math.max(0,Math.ceil(.1*Y)),Q=f(_.relativeLuminance2(O,I,Y),_.relativeLuminance2(R,M,$));return(O<<24|I<<16|Y<<8|255)>>>0}function T(E,A,D){const R=E>>24&255,M=E>>16&255,$=E>>8&255;let O=A>>24&255,I=A>>16&255,Y=A>>8&255,Q=f(_.relativeLuminance2(O,I,Y),_.relativeLuminance2(R,M,$));for(;Q<D&&(O<255||I<255||Y<255);)O=Math.min(255,O+Math.ceil(.1*(255-O))),I=Math.min(255,I+Math.ceil(.1*(255-I))),Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),Q=f(_.relativeLuminance2(O,I,Y),_.relativeLuminance2(R,M,$));return(O<<24|I<<16|Y<<8|255)>>>0}v.blend=function(E,A){if(u=(255&A)/255,u===1)return A;const D=A>>24&255,R=A>>16&255,M=A>>8&255,$=E>>24&255,O=E>>16&255,I=E>>8&255;return o=$+Math.round((D-$)*u),g=O+Math.round((R-O)*u),y=I+Math.round((M-I)*u),p.toRgba(o,g,y)},v.ensureContrastRatio=function(E,A,D){const R=_.relativeLuminance(E>>8),M=_.relativeLuminance(A>>8);if(f(R,M)<D){if(M<R){const I=C(E,A,D),Y=f(R,_.relativeLuminance(I>>8));if(Y<D){const Q=T(E,A,D);return Y>f(R,_.relativeLuminance(Q>>8))?I:Q}return I}const $=T(E,A,D),O=f(R,_.relativeLuminance($>>8));if(O<D){const I=C(E,A,D);return O>f(R,_.relativeLuminance(I>>8))?$:I}return $}},v.reduceLuminance=C,v.increaseLuminance=T,v.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]}}(l||(r.rgba=l={})),r.toPaddedHex=m,r.contrastRatio=f},8969:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreTerminal=void 0;const g=o(844),y=o(2585),u=o(4348),p=o(7866),S=o(744),N=o(7302),_=o(6975),l=o(8460),m=o(1753),f=o(1480),v=o(7994),C=o(9282),T=o(5435),E=o(5981),A=o(2660);let D=!1;class R extends g.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new l.EventEmitter),this._onScroll.event($=>{var O;(O=this._onScrollApi)==null||O.fire($.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($){for(const O in $)this.optionsService.options[O]=$[O]}constructor($){super(),this._windowsWrappingHeuristics=this.register(new g.MutableDisposable),this._onBinary=this.register(new l.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new l.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new l.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new l.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new l.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new l.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new N.OptionsService($)),this._instantiationService.setService(y.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(S.BufferService)),this._instantiationService.setService(y.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(y.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(_.CoreService)),this._instantiationService.setService(y.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(m.CoreMouseService)),this._instantiationService.setService(y.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(f.UnicodeService)),this._instantiationService.setService(y.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(v.CharsetService),this._instantiationService.setService(y.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(y.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new T.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,l.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,l.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,l.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,l.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(O=>{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(O=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new E.WriteBuffer((O,I)=>this._inputHandler.parse(O,I))),this.register((0,l.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write($,O){this._writeBuffer.write($,O)}writeSync($,O){this._logService.logLevel<=y.LogLevelEnum.WARN&&!D&&(this._logService.warn("writeSync is unreliable and will be removed soon."),D=!0),this._writeBuffer.writeSync($,O)}input($,O=!0){this.coreService.triggerDataEvent($,O)}resize($,O){isNaN($)||isNaN(O)||($=Math.max($,S.MINIMUM_COLS),O=Math.max(O,S.MINIMUM_ROWS),this._bufferService.resize($,O))}scroll($,O=!1){this._bufferService.scroll($,O)}scrollLines($,O,I){this._bufferService.scrollLines($,O,I)}scrollPages($){this.scrollLines($*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine($){const O=$-this._bufferService.buffer.ydisp;O!==0&&this.scrollLines(O)}registerEscHandler($,O){return this._inputHandler.registerEscHandler($,O)}registerDcsHandler($,O){return this._inputHandler.registerDcsHandler($,O)}registerCsiHandler($,O){return this._inputHandler.registerCsiHandler($,O)}registerOscHandler($,O){return this._inputHandler.registerOscHandler($,O)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let $=!1;const O=this.optionsService.rawOptions.windowsPty;O&&O.buildNumber!==void 0&&O.buildNumber!==void 0?$=O.backend==="conpty"&&O.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&($=!0),$?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const $=[];$.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),$.push(this.registerCsiHandler({final:"H"},()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,g.toDisposable)(()=>{for(const O of $)O.dispose()})}}}r.CoreTerminal=R},8460:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.runAndSubscribe=r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=o=>(this._listeners.push(o),{dispose:()=>{if(!this._disposed){for(let g=0;g<this._listeners.length;g++)if(this._listeners[g]===o)return void this._listeners.splice(g,1)}}})),this._event}fire(o,g){const y=[];for(let u=0;u<this._listeners.length;u++)y.push(this._listeners[u]);for(let u=0;u<y.length;u++)y[u].call(void 0,o,g)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},r.forwardEvent=function(o,g){return o(y=>g.fire(y))},r.runAndSubscribe=function(o,g){return g(void 0),o(y=>g(y))}},5435:function(b,r,o){var g=this&&this.__decorate||function(oe,P,W,V){var J,_e=arguments.length,be=_e<3?P:V===null?V=Object.getOwnPropertyDescriptor(P,W):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")be=Reflect.decorate(oe,P,W,V);else for(var Ve=oe.length-1;Ve>=0;Ve--)(J=oe[Ve])&&(be=(_e<3?J(be):_e>3?J(P,W,be):J(P,W))||be);return _e>3&&be&&Object.defineProperty(P,W,be),be},y=this&&this.__param||function(oe,P){return function(W,V){P(W,V,oe)}};Object.defineProperty(r,"__esModule",{value:!0}),r.InputHandler=r.WindowsOptionsReportType=void 0;const u=o(2584),p=o(7116),S=o(2015),N=o(844),_=o(482),l=o(8437),m=o(8460),f=o(643),v=o(511),C=o(3734),T=o(2585),E=o(1480),A=o(6242),D=o(6351),R=o(5941),M={"(":0,")":1,"*":2,"+":3,"-":1,".":2},$=131072;function O(oe,P){if(oe>24)return P.setWinLines||!1;switch(oe){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 I;(function(oe){oe[oe.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",oe[oe.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(I||(r.WindowsOptionsReportType=I={}));let Y=0;class Q extends N.Disposable{getAttrData(){return this._curAttrData}constructor(P,W,V,J,_e,be,Ve,Le,ie=new S.EscapeSequenceParser){super(),this._bufferService=P,this._charsetService=W,this._coreService=V,this._logService=J,this._optionsService=_e,this._oscLinkService=be,this._coreMouseService=Ve,this._unicodeService=Le,this._parser=ie,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new _.StringToUtf32,this._utf8Decoder=new _.Utf8ToUtf32,this._workCell=new v.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new m.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new m.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new m.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new m.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new m.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new m.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new m.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new m.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new m.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new m.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new m.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new m.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new m.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new Z(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(G=>this._activeBuffer=G.activeBuffer)),this._parser.setCsiHandlerFallback((G,pe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(G),params:pe.toArray()})}),this._parser.setEscHandlerFallback(G=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(G)})}),this._parser.setExecuteHandlerFallback(G=>{this._logService.debug("Unknown EXECUTE code: ",{code:G})}),this._parser.setOscHandlerFallback((G,pe,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:G,action:pe,data:le})}),this._parser.setDcsHandlerFallback((G,pe,le)=>{pe==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(G),action:pe,payload:le})}),this._parser.setPrintHandler((G,pe,le)=>this.print(G,pe,le)),this._parser.registerCsiHandler({final:"@"},G=>this.insertChars(G)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},G=>this.scrollLeft(G)),this._parser.registerCsiHandler({final:"A"},G=>this.cursorUp(G)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},G=>this.scrollRight(G)),this._parser.registerCsiHandler({final:"B"},G=>this.cursorDown(G)),this._parser.registerCsiHandler({final:"C"},G=>this.cursorForward(G)),this._parser.registerCsiHandler({final:"D"},G=>this.cursorBackward(G)),this._parser.registerCsiHandler({final:"E"},G=>this.cursorNextLine(G)),this._parser.registerCsiHandler({final:"F"},G=>this.cursorPrecedingLine(G)),this._parser.registerCsiHandler({final:"G"},G=>this.cursorCharAbsolute(G)),this._parser.registerCsiHandler({final:"H"},G=>this.cursorPosition(G)),this._parser.registerCsiHandler({final:"I"},G=>this.cursorForwardTab(G)),this._parser.registerCsiHandler({final:"J"},G=>this.eraseInDisplay(G,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},G=>this.eraseInDisplay(G,!0)),this._parser.registerCsiHandler({final:"K"},G=>this.eraseInLine(G,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},G=>this.eraseInLine(G,!0)),this._parser.registerCsiHandler({final:"L"},G=>this.insertLines(G)),this._parser.registerCsiHandler({final:"M"},G=>this.deleteLines(G)),this._parser.registerCsiHandler({final:"P"},G=>this.deleteChars(G)),this._parser.registerCsiHandler({final:"S"},G=>this.scrollUp(G)),this._parser.registerCsiHandler({final:"T"},G=>this.scrollDown(G)),this._parser.registerCsiHandler({final:"X"},G=>this.eraseChars(G)),this._parser.registerCsiHandler({final:"Z"},G=>this.cursorBackwardTab(G)),this._parser.registerCsiHandler({final:"`"},G=>this.charPosAbsolute(G)),this._parser.registerCsiHandler({final:"a"},G=>this.hPositionRelative(G)),this._parser.registerCsiHandler({final:"b"},G=>this.repeatPrecedingCharacter(G)),this._parser.registerCsiHandler({final:"c"},G=>this.sendDeviceAttributesPrimary(G)),this._parser.registerCsiHandler({prefix:">",final:"c"},G=>this.sendDeviceAttributesSecondary(G)),this._parser.registerCsiHandler({final:"d"},G=>this.linePosAbsolute(G)),this._parser.registerCsiHandler({final:"e"},G=>this.vPositionRelative(G)),this._parser.registerCsiHandler({final:"f"},G=>this.hVPosition(G)),this._parser.registerCsiHandler({final:"g"},G=>this.tabClear(G)),this._parser.registerCsiHandler({final:"h"},G=>this.setMode(G)),this._parser.registerCsiHandler({prefix:"?",final:"h"},G=>this.setModePrivate(G)),this._parser.registerCsiHandler({final:"l"},G=>this.resetMode(G)),this._parser.registerCsiHandler({prefix:"?",final:"l"},G=>this.resetModePrivate(G)),this._parser.registerCsiHandler({final:"m"},G=>this.charAttributes(G)),this._parser.registerCsiHandler({final:"n"},G=>this.deviceStatus(G)),this._parser.registerCsiHandler({prefix:"?",final:"n"},G=>this.deviceStatusPrivate(G)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},G=>this.softReset(G)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},G=>this.setCursorStyle(G)),this._parser.registerCsiHandler({final:"r"},G=>this.setScrollRegion(G)),this._parser.registerCsiHandler({final:"s"},G=>this.saveCursor(G)),this._parser.registerCsiHandler({final:"t"},G=>this.windowOptions(G)),this._parser.registerCsiHandler({final:"u"},G=>this.restoreCursor(G)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},G=>this.insertColumns(G)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},G=>this.deleteColumns(G)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},G=>this.selectProtected(G)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},G=>this.requestMode(G,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},G=>this.requestMode(G,!1)),this._parser.setExecuteHandler(u.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(u.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(u.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(u.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(u.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(u.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(u.C1.IND,()=>this.index()),this._parser.setExecuteHandler(u.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(u.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new A.OscHandler(G=>(this.setTitle(G),this.setIconName(G),!0))),this._parser.registerOscHandler(1,new A.OscHandler(G=>this.setIconName(G))),this._parser.registerOscHandler(2,new A.OscHandler(G=>this.setTitle(G))),this._parser.registerOscHandler(4,new A.OscHandler(G=>this.setOrReportIndexedColor(G))),this._parser.registerOscHandler(8,new A.OscHandler(G=>this.setHyperlink(G))),this._parser.registerOscHandler(10,new A.OscHandler(G=>this.setOrReportFgColor(G))),this._parser.registerOscHandler(11,new A.OscHandler(G=>this.setOrReportBgColor(G))),this._parser.registerOscHandler(12,new A.OscHandler(G=>this.setOrReportCursorColor(G))),this._parser.registerOscHandler(104,new A.OscHandler(G=>this.restoreIndexedColor(G))),this._parser.registerOscHandler(110,new A.OscHandler(G=>this.restoreFgColor(G))),this._parser.registerOscHandler(111,new A.OscHandler(G=>this.restoreBgColor(G))),this._parser.registerOscHandler(112,new A.OscHandler(G=>this.restoreCursorColor(G))),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 G in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:G},()=>this.selectCharset("("+G)),this._parser.registerEscHandler({intermediates:")",final:G},()=>this.selectCharset(")"+G)),this._parser.registerEscHandler({intermediates:"*",final:G},()=>this.selectCharset("*"+G)),this._parser.registerEscHandler({intermediates:"+",final:G},()=>this.selectCharset("+"+G)),this._parser.registerEscHandler({intermediates:"-",final:G},()=>this.selectCharset("-"+G)),this._parser.registerEscHandler({intermediates:".",final:G},()=>this.selectCharset("."+G)),this._parser.registerEscHandler({intermediates:"/",final:G},()=>this.selectCharset("/"+G));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(G=>(this._logService.error("Parsing error: ",G),G)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new D.DcsHandler((G,pe)=>this.requestStatusString(G,pe)))}_preserveStack(P,W,V,J){this._parseStack.paused=!0,this._parseStack.cursorStartX=P,this._parseStack.cursorStartY=W,this._parseStack.decodedLength=V,this._parseStack.position=J}_logSlowResolvingAsync(P){this._logService.logLevel<=T.LogLevelEnum.WARN&&Promise.race([P,new Promise((W,V)=>setTimeout(()=>V("#SLOW_TIMEOUT"),5e3))]).catch(W=>{if(W!=="#SLOW_TIMEOUT")throw W;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(P,W){let V,J=this._activeBuffer.x,_e=this._activeBuffer.y,be=0;const Ve=this._parseStack.paused;if(Ve){if(V=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,W))return this._logSlowResolvingAsync(V),V;J=this._parseStack.cursorStartX,_e=this._parseStack.cursorStartY,this._parseStack.paused=!1,P.length>$&&(be=this._parseStack.position+$)}if(this._logService.logLevel<=T.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof P=="string"?` "${P}"`:` "${Array.prototype.map.call(P,G=>String.fromCharCode(G)).join("")}"`),typeof P=="string"?P.split("").map(G=>G.charCodeAt(0)):P),this._parseBuffer.length<P.length&&this._parseBuffer.length<$&&(this._parseBuffer=new Uint32Array(Math.min(P.length,$))),Ve||this._dirtyRowTracker.clearRange(),P.length>$)for(let G=be;G<P.length;G+=$){const pe=G+$<P.length?G+$:P.length,le=typeof P=="string"?this._stringDecoder.decode(P.substring(G,pe),this._parseBuffer):this._utf8Decoder.decode(P.subarray(G,pe),this._parseBuffer);if(V=this._parser.parse(this._parseBuffer,le))return this._preserveStack(J,_e,le,G),this._logSlowResolvingAsync(V),V}else if(!Ve){const G=typeof P=="string"?this._stringDecoder.decode(P,this._parseBuffer):this._utf8Decoder.decode(P,this._parseBuffer);if(V=this._parser.parse(this._parseBuffer,G))return this._preserveStack(J,_e,G,0),this._logSlowResolvingAsync(V),V}this._activeBuffer.x===J&&this._activeBuffer.y===_e||this._onCursorMove.fire();const Le=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),ie=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);ie<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(ie,this._bufferService.rows-1),Math.min(Le,this._bufferService.rows-1))}print(P,W,V){let J,_e;const be=this._charsetService.charset,Ve=this._optionsService.rawOptions.screenReaderMode,Le=this._bufferService.cols,ie=this._coreService.decPrivateModes.wraparound,G=this._coreService.modes.insertMode,pe=this._curAttrData;let le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&V-W>0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,pe);let Be=this._parser.precedingJoinState;for(let Te=W;Te<V;++Te){if(J=P[Te],J<127&&be){const jt=be[String.fromCharCode(J)];jt&&(J=jt.charCodeAt(0))}const Xe=this._unicodeService.charProperties(J,Be);_e=E.UnicodeService.extractWidth(Xe);const Ke=E.UnicodeService.extractShouldJoin(Xe),st=Ke?E.UnicodeService.extractWidth(Be):0;if(Be=Xe,Ve&&this._onA11yChar.fire((0,_.stringFromCodePoint)(J)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+_e-st>Le){if(ie){const jt=le;let Ye=this._activeBuffer.x-st;for(this._activeBuffer.x=st,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),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),st>0&&le instanceof l.BufferLine&&le.copyCellsFrom(jt,Ye,0,st,!1);Ye<Le;)jt.setCellFromCodepoint(Ye++,0,1,pe)}else if(this._activeBuffer.x=Le-1,_e===2)continue}if(Ke&&this._activeBuffer.x){const jt=le.getWidth(this._activeBuffer.x-1)?1:2;le.addCodepointToCell(this._activeBuffer.x-jt,J,_e);for(let Ye=_e-st;--Ye>=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,pe)}else if(G&&(le.insertCells(this._activeBuffer.x,_e-st,this._activeBuffer.getNullCell(pe)),le.getWidth(Le-1)===2&&le.setCellFromCodepoint(Le-1,f.NULL_CELL_CODE,f.NULL_CELL_WIDTH,pe)),le.setCellFromCodepoint(this._activeBuffer.x++,J,_e,pe),_e>0)for(;--_e;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,pe)}this._parser.precedingJoinState=Be,this._activeBuffer.x<Le&&V-W>0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,pe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(P,W){return P.final!=="t"||P.prefix||P.intermediates?this._parser.registerCsiHandler(P,W):this._parser.registerCsiHandler(P,V=>!O(V.params[0],this._optionsService.rawOptions.windowOptions)||W(V))}registerDcsHandler(P,W){return this._parser.registerDcsHandler(P,new D.DcsHandler(W))}registerEscHandler(P,W){return this._parser.registerEscHandler(P,W)}registerOscHandler(P,W){return this._parser.registerOscHandler(P,new A.OscHandler(W))}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 W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);W.hasWidth(this._activeBuffer.x)&&!W.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,W){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=P,this._activeBuffer.y=this._activeBuffer.scrollTop+W):(this._activeBuffer.x=P,this._activeBuffer.y=W),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(P,W){this._restrictCursor(),this._setCursor(this._activeBuffer.x+P,this._activeBuffer.y+W)}cursorUp(P){const W=this._activeBuffer.y-this._activeBuffer.scrollTop;return W>=0?this._moveCursor(0,-Math.min(W,P.params[0]||1)):this._moveCursor(0,-(P.params[0]||1)),!0}cursorDown(P){const W=this._activeBuffer.scrollBottom-this._activeBuffer.y;return W>=0?this._moveCursor(0,Math.min(W,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 W=P.params[0];return W===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:W===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let W=P.params[0]||1;for(;W--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let W=P.params[0]||1;for(;W--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(P){const W=P.params[0];return W===1&&(this._curAttrData.bg|=536870912),W!==2&&W!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(P,W,V,J=!1,_e=!1){const be=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);be.replaceCells(W,V,this._activeBuffer.getNullCell(this._eraseAttrData()),_e),J&&(be.isWrapped=!1)}_resetBufferLine(P,W=!1){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);V&&(V.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),W),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+P),V.isWrapped=!1)}eraseInDisplay(P,W=!1){let V;switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:for(V=this._activeBuffer.y,this._dirtyRowTracker.markDirty(V),this._eraseInBufferLine(V++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,W);V<this._bufferService.rows;V++)this._resetBufferLine(V,W);this._dirtyRowTracker.markDirty(V);break;case 1:for(V=this._activeBuffer.y,this._dirtyRowTracker.markDirty(V),this._eraseInBufferLine(V,0,this._activeBuffer.x+1,!0,W),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(V+1).isWrapped=!1);V--;)this._resetBufferLine(V,W);this._dirtyRowTracker.markDirty(0);break;case 2:for(V=this._bufferService.rows,this._dirtyRowTracker.markDirty(V-1);V--;)this._resetBufferLine(V,W);this._dirtyRowTracker.markDirty(0);break;case 3:const J=this._activeBuffer.lines.length-this._bufferService.rows;J>0&&(this._activeBuffer.lines.trimStart(J),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-J,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-J,0),this._onScroll.fire(0))}return!0}eraseInLine(P,W=!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,W);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,W);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,W)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(P){this._restrictCursor();let W=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const V=this._activeBuffer.ybase+this._activeBuffer.y,J=this._bufferService.rows-1-this._activeBuffer.scrollBottom,_e=this._bufferService.rows-1+this._activeBuffer.ybase-J+1;for(;W--;)this._activeBuffer.lines.splice(_e-1,1),this._activeBuffer.lines.splice(V,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 W=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const V=this._activeBuffer.ybase+this._activeBuffer.y;let J;for(J=this._bufferService.rows-1-this._activeBuffer.scrollBottom,J=this._bufferService.rows-1+this._activeBuffer.ybase-J;W--;)this._activeBuffer.lines.splice(V,1),this._activeBuffer.lines.splice(J,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 W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.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 W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.deleteCells(this._activeBuffer.x,P.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(P){let W=P.params[0]||1;for(;W--;)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 W=P.params[0]||1;for(;W--;)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(l.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 W=P.params[0]||1;for(let V=this._activeBuffer.scrollTop;V<=this._activeBuffer.scrollBottom;++V){const J=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);J.deleteCells(0,W,this._activeBuffer.getNullCell(this._eraseAttrData())),J.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 W=P.params[0]||1;for(let V=this._activeBuffer.scrollTop;V<=this._activeBuffer.scrollBottom;++V){const J=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);J.insertCells(0,W,this._activeBuffer.getNullCell(this._eraseAttrData())),J.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 W=P.params[0]||1;for(let V=this._activeBuffer.scrollTop;V<=this._activeBuffer.scrollBottom;++V){const J=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);J.insertCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(this._eraseAttrData())),J.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 W=P.params[0]||1;for(let V=this._activeBuffer.scrollTop;V<=this._activeBuffer.scrollBottom;++V){const J=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);J.deleteCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(this._eraseAttrData())),J.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(P){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.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 W=this._parser.precedingJoinState;if(!W)return!0;const V=P.params[0]||1,J=E.UnicodeService.extractWidth(W),_e=this._activeBuffer.x-J,be=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(_e),Ve=new Uint32Array(be.length*V);let Le=0;for(let G=0;G<be.length;){const pe=be.codePointAt(G)||0;Ve[Le++]=pe,G+=pe>65535?2:1}let ie=Le;for(let G=1;G<V;++G)Ve.copyWithin(ie,0,Le),ie+=Le;return this.print(Ve,0,ie),!0}sendDeviceAttributesPrimary(P){return P.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(P){return P.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(P.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(P){return(this._optionsService.rawOptions.termName+"").indexOf(P)===0}setMode(P){for(let W=0;W<P.length;W++)switch(P.params[W]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(P){for(let W=0;W<P.length;W++)switch(P.params[W]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(P){for(let W=0;W<P.length;W++)switch(P.params[W]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(P){for(let W=0;W<P.length;W++)switch(P.params[W]){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[W]===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,W){const V=this._coreService.decPrivateModes,{activeProtocol:J,activeEncoding:_e}=this._coreMouseService,be=this._coreService,{buffers:Ve,cols:Le}=this._bufferService,{active:ie,alt:G}=Ve,pe=this._optionsService.rawOptions,le=Ke=>Ke?1:2,Be=P.params[0];return Te=Be,Xe=W?Be===2?4:Be===4?le(be.modes.insertMode):Be===12?3:Be===20?le(pe.convertEol):0:Be===1?le(V.applicationCursorKeys):Be===3?pe.windowOptions.setWinLines?Le===80?2:Le===132?1:0:0:Be===6?le(V.origin):Be===7?le(V.wraparound):Be===8?3:Be===9?le(J==="X10"):Be===12?le(pe.cursorBlink):Be===25?le(!be.isCursorHidden):Be===45?le(V.reverseWraparound):Be===66?le(V.applicationKeypad):Be===67?4:Be===1e3?le(J==="VT200"):Be===1002?le(J==="DRAG"):Be===1003?le(J==="ANY"):Be===1004?le(V.sendFocus):Be===1005?4:Be===1006?le(_e==="SGR"):Be===1015?4:Be===1016?le(_e==="SGR_PIXELS"):Be===1048?1:Be===47||Be===1047||Be===1049?le(ie===G):Be===2004?le(V.bracketedPasteMode):0,be.triggerDataEvent(`${u.C0.ESC}[${W?"":"?"}${Te};${Xe}$y`),!0;var Te,Xe}_updateAttrColor(P,W,V,J,_e){return W===2?(P|=50331648,P&=-16777216,P|=C.AttributeData.fromColorRGB([V,J,_e])):W===5&&(P&=-50331904,P|=33554432|255&V),P}_extractColor(P,W,V){const J=[0,0,-1,0,0,0];let _e=0,be=0;do{if(J[be+_e]=P.params[W+be],P.hasSubParams(W+be)){const Ve=P.getSubParams(W+be);let Le=0;do J[1]===5&&(_e=1),J[be+Le+1+_e]=Ve[Le];while(++Le<Ve.length&&Le+be+1+_e<J.length);break}if(J[1]===5&&be+_e>=2||J[1]===2&&be+_e>=5)break;J[1]&&(_e=1)}while(++be+W<P.length&&be+_e<J.length);for(let Ve=2;Ve<J.length;++Ve)J[Ve]===-1&&(J[Ve]=0);switch(J[0]){case 38:V.fg=this._updateAttrColor(V.fg,J[1],J[3],J[4],J[5]);break;case 48:V.bg=this._updateAttrColor(V.bg,J[1],J[3],J[4],J[5]);break;case 58:V.extended=V.extended.clone(),V.extended.underlineColor=this._updateAttrColor(V.extended.underlineColor,J[1],J[3],J[4],J[5])}return be}_processUnderline(P,W){W.extended=W.extended.clone(),(!~P||P>5)&&(P=1),W.extended.underlineStyle=P,W.fg|=268435456,P===0&&(W.fg&=-268435457),W.updateExtended()}_processSGR0(P){P.fg=l.DEFAULT_ATTR_DATA.fg,P.bg=l.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 W=P.length;let V;const J=this._curAttrData;for(let _e=0;_e<W;_e++)V=P.params[_e],V>=30&&V<=37?(J.fg&=-50331904,J.fg|=16777216|V-30):V>=40&&V<=47?(J.bg&=-50331904,J.bg|=16777216|V-40):V>=90&&V<=97?(J.fg&=-50331904,J.fg|=16777224|V-90):V>=100&&V<=107?(J.bg&=-50331904,J.bg|=16777224|V-100):V===0?this._processSGR0(J):V===1?J.fg|=134217728:V===3?J.bg|=67108864:V===4?(J.fg|=268435456,this._processUnderline(P.hasSubParams(_e)?P.getSubParams(_e)[0]:1,J)):V===5?J.fg|=536870912:V===7?J.fg|=67108864:V===8?J.fg|=1073741824:V===9?J.fg|=2147483648:V===2?J.bg|=134217728:V===21?this._processUnderline(2,J):V===22?(J.fg&=-134217729,J.bg&=-134217729):V===23?J.bg&=-67108865:V===24?(J.fg&=-268435457,this._processUnderline(0,J)):V===25?J.fg&=-536870913:V===27?J.fg&=-67108865:V===28?J.fg&=-1073741825:V===29?J.fg&=2147483647:V===39?(J.fg&=-67108864,J.fg|=16777215&l.DEFAULT_ATTR_DATA.fg):V===49?(J.bg&=-67108864,J.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):V===38||V===48||V===58?_e+=this._extractColor(P,_e,J):V===53?J.bg|=1073741824:V===55?J.bg&=-1073741825:V===59?(J.extended=J.extended.clone(),J.extended.underlineColor=-1,J.updateExtended()):V===100?(J.fg&=-67108864,J.fg|=16777215&l.DEFAULT_ATTR_DATA.fg,J.bg&=-67108864,J.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",V);return!0}deviceStatus(P){switch(P.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const W=this._activeBuffer.y+1,V=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${W};${V}R`)}return!0}deviceStatusPrivate(P){if(P.params[0]===6){const W=this._activeBuffer.y+1,V=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${W};${V}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=l.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 W=P.params[0]||1;switch(W){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 V=W%2==1;return this._optionsService.options.cursorBlink=V,!0}setScrollRegion(P){const W=P.params[0]||1;let V;return(P.length<2||(V=P.params[1])>this._bufferService.rows||V===0)&&(V=this._bufferService.rows),V>W&&(this._activeBuffer.scrollTop=W-1,this._activeBuffer.scrollBottom=V-1,this._setCursor(0,0)),!0}windowOptions(P){if(!O(P.params[0],this._optionsService.rawOptions.windowOptions))return!0;const W=P.length>1?P.params[1]:0;switch(P.params[0]){case 14:W!==2&&this._onRequestWindowsOptionsReport.fire(I.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(I.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:W!==0&&W!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),W!==0&&W!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:W!==0&&W!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),W!==0&&W!==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 W=[],V=P.split(";");for(;V.length>1;){const J=V.shift(),_e=V.shift();if(/^\d+$/.exec(J)){const be=parseInt(J);if(ee(be))if(_e==="?")W.push({type:0,index:be});else{const Ve=(0,R.parseColor)(_e);Ve&&W.push({type:1,index:be,color:Ve})}}}return W.length&&this._onColor.fire(W),!0}setHyperlink(P){const W=P.split(";");return!(W.length<2)&&(W[1]?this._createHyperlink(W[0],W[1]):!W[0]&&this._finishHyperlink())}_createHyperlink(P,W){this._getCurrentLinkId()&&this._finishHyperlink();const V=P.split(":");let J;const _e=V.findIndex(be=>be.startsWith("id="));return _e!==-1&&(J=V[_e].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:J,uri:W}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(P,W){const V=P.split(";");for(let J=0;J<V.length&&!(W>=this._specialColors.length);++J,++W)if(V[J]==="?")this._onColor.fire([{type:0,index:this._specialColors[W]}]);else{const _e=(0,R.parseColor)(V[J]);_e&&this._onColor.fire([{type:1,index:this._specialColors[W],color:_e}])}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 W=[],V=P.split(";");for(let J=0;J<V.length;++J)if(/^\d+$/.exec(V[J])){const _e=parseInt(V[J]);ee(_e)&&W.push({type:2,index:_e})}return W.length&&this._onColor.fire(W),!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,p.DEFAULT_CHARSET),!0}selectCharset(P){return P.length!==2?(this.selectDefaultCharset(),!0):(P[0]==="/"||this._charsetService.setgCharset(M[P[0]],p.CHARSETS[P[1]]||p.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const 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=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.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 v.CellData;P.content=4194373,P.fg=this._curAttrData.fg,P.bg=this._curAttrData.bg,this._setCursor(0,0);for(let W=0;W<this._bufferService.rows;++W){const V=this._activeBuffer.ybase+this._activeBuffer.y+W,J=this._activeBuffer.lines.get(V);J&&(J.fill(P),J.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(P,W){const V=this._bufferService.buffer,J=this._optionsService.rawOptions;return(_e=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${_e}${u.C0.ESC}\\`),!0))(P==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:P==='"p'?'P1$r61;1"p':P==="r"?`P1$r${V.scrollTop+1};${V.scrollBottom+1}r`:P==="m"?"P1$r0m":P===" q"?`P1$r${{block:2,underline:4,bar:6}[J.cursorStyle]-(J.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(P,W){this._dirtyRowTracker.markRangeDirty(P,W)}}r.InputHandler=Q;let Z=class{constructor(oe){this._bufferService=oe,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(oe){oe<this.start?this.start=oe:oe>this.end&&(this.end=oe)}markRangeDirty(oe,P){oe>P&&(Y=oe,oe=P,P=Y),oe<this.start&&(this.start=oe),P>this.end&&(this.end=P)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function ee(oe){return 0<=oe&&oe<256}Z=g([y(0,T.IBufferService)],Z)},844:(b,r)=>{function o(g){for(const y of g)y.dispose();g.length=0}Object.defineProperty(r,"__esModule",{value:!0}),r.getDisposeArrayDisposable=r.disposeArray=r.toDisposable=r.MutableDisposable=r.Disposable=void 0,r.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const g of this._disposables)g.dispose();this._disposables.length=0}register(g){return this._disposables.push(g),g}unregister(g){const y=this._disposables.indexOf(g);y!==-1&&this._disposables.splice(y,1)}},r.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(g){var y;this._isDisposed||g===this._value||((y=this._value)==null||y.dispose(),this._value=g)}clear(){this.value=void 0}dispose(){var g;this._isDisposed=!0,(g=this._value)==null||g.dispose(),this._value=void 0}},r.toDisposable=function(g){return{dispose:g}},r.disposeArray=o,r.getDisposeArrayDisposable=function(g){return{dispose:()=>o(g)}}},1505:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FourKeyMap=r.TwoKeyMap=void 0;class o{constructor(){this._data={}}set(y,u,p){this._data[y]||(this._data[y]={}),this._data[y][u]=p}get(y,u){return this._data[y]?this._data[y][u]:void 0}clear(){this._data={}}}r.TwoKeyMap=o,r.FourKeyMap=class{constructor(){this._data=new o}set(g,y,u,p,S){this._data.get(g,y)||this._data.set(g,y,new o),this._data.get(g,y).set(u,p,S)}get(g,y,u,p){var S;return(S=this._data.get(g,y))==null?void 0:S.get(u,p)}clear(){this._data.clear()}}},6114:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isChromeOS=r.isLinux=r.isWindows=r.isIphone=r.isIpad=r.isMac=r.getSafariVersion=r.isSafari=r.isLegacyEdge=r.isFirefox=r.isNode=void 0,r.isNode=typeof process<"u"&&"title"in process;const o=r.isNode?"node":navigator.userAgent,g=r.isNode?"node":navigator.platform;r.isFirefox=o.includes("Firefox"),r.isLegacyEdge=o.includes("Edge"),r.isSafari=/^((?!chrome|android).)*safari/i.test(o),r.getSafariVersion=function(){if(!r.isSafari)return 0;const y=o.match(/Version\/(\d+)/);return y===null||y.length<2?0:parseInt(y[1])},r.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(g),r.isIpad=g==="iPad",r.isIphone=g==="iPhone",r.isWindows=["Windows","Win16","Win32","WinCE"].includes(g),r.isLinux=g.indexOf("Linux")>=0,r.isChromeOS=/\bCrOS\b/.test(o)},6106:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SortedList=void 0;let o=0;r.SortedList=class{constructor(g){this._getKey=g,this._array=[]}clear(){this._array.length=0}insert(g){this._array.length!==0?(o=this._search(this._getKey(g)),this._array.splice(o,0,g)):this._array.push(g)}delete(g){if(this._array.length===0)return!1;const y=this._getKey(g);if(y===void 0||(o=this._search(y),o===-1)||this._getKey(this._array[o])!==y)return!1;do if(this._array[o]===g)return this._array.splice(o,1),!0;while(++o<this._array.length&&this._getKey(this._array[o])===y);return!1}*getKeyIterator(g){if(this._array.length!==0&&(o=this._search(g),!(o<0||o>=this._array.length)&&this._getKey(this._array[o])===g))do yield this._array[o];while(++o<this._array.length&&this._getKey(this._array[o])===g)}forEachByKey(g,y){if(this._array.length!==0&&(o=this._search(g),!(o<0||o>=this._array.length)&&this._getKey(this._array[o])===g))do y(this._array[o]);while(++o<this._array.length&&this._getKey(this._array[o])===g)}values(){return[...this._array].values()}_search(g){let y=0,u=this._array.length-1;for(;u>=y;){let p=y+u>>1;const S=this._getKey(this._array[p]);if(S>g)u=p-1;else{if(!(S<g)){for(;p>0&&this._getKey(this._array[p-1])===g;)p--;return p}y=p+1}}return y}}},7226:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DebouncedIdleTask=r.IdleTaskQueue=r.PriorityTaskQueue=void 0;const g=o(6114);class y{constructor(){this._tasks=[],this._i=0}enqueue(S){this._tasks.push(S),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(S){this._idleCallback=void 0;let N=0,_=0,l=S.timeRemaining(),m=0;for(;this._i<this._tasks.length;){if(N=Date.now(),this._tasks[this._i]()||this._i++,N=Math.max(1,Date.now()-N),_=Math.max(N,_),m=S.timeRemaining(),1.5*_>m)return l-N<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(l-N))}ms`),void this._start();l=m}this.clear()}}class u extends y{_requestCallback(S){return setTimeout(()=>S(this._createDeadline(16)))}_cancelCallback(S){clearTimeout(S)}_createDeadline(S){const N=Date.now()+S;return{timeRemaining:()=>Math.max(0,N-Date.now())}}}r.PriorityTaskQueue=u,r.IdleTaskQueue=!g.isNode&&"requestIdleCallback"in window?class extends y{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:u,r.DebouncedIdleTask=class{constructor(){this._queue=new r.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.updateWindowsModeWrappedState=void 0;const g=o(643);r.updateWindowsModeWrappedState=function(y){const u=y.buffer.lines.get(y.buffer.ybase+y.buffer.y-1),p=u==null?void 0:u.get(y.cols-1),S=y.buffer.lines.get(y.buffer.ybase+y.buffer.y);S&&p&&(S.isWrapped=p[g.CHAR_DATA_CODE_INDEX]!==g.NULL_CELL_CODE&&p[g.CHAR_DATA_CODE_INDEX]!==g.WHITESPACE_CELL_CODE)}},3734:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ExtendedAttrs=r.AttributeData=void 0;class o{constructor(){this.fg=0,this.bg=0,this.extended=new g}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new o;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}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}}r.AttributeData=o;class g{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,p=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=p}clone(){return new g(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}r.ExtendedAttrs=g},9092:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Buffer=r.MAX_BUFFER_SIZE=void 0;const g=o(6349),y=o(7226),u=o(3734),p=o(8437),S=o(4634),N=o(511),_=o(643),l=o(4863),m=o(7116);r.MAX_BUFFER_SIZE=4294967295,r.Buffer=class{constructor(f,v,C){this._hasScrollback=f,this._optionsService=v,this._bufferService=C,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=m.DEFAULT_CHARSET,this.markers=[],this._nullCell=N.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]),this._whitespaceCell=N.CellData.fromCharData([0,_.WHITESPACE_CELL_CHAR,_.WHITESPACE_CELL_WIDTH,_.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new y.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new g.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(f){return f?(this._nullCell.fg=f.fg,this._nullCell.bg=f.bg,this._nullCell.extended=f.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(f){return f?(this._whitespaceCell.fg=f.fg,this._whitespaceCell.bg=f.bg,this._whitespaceCell.extended=f.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(f,v){return new p.BufferLine(this._bufferService.cols,this.getNullCell(f),v)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const f=this.ybase+this.y-this.ydisp;return f>=0&&f<this._rows}_getCorrectBufferLength(f){if(!this._hasScrollback)return f;const v=f+this._optionsService.rawOptions.scrollback;return v>r.MAX_BUFFER_SIZE?r.MAX_BUFFER_SIZE:v}fillViewportRows(f){if(this.lines.length===0){f===void 0&&(f=p.DEFAULT_ATTR_DATA);let v=this._rows;for(;v--;)this.lines.push(this.getBlankLine(f))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new g.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(f,v){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let T=0;const E=this._getCorrectBufferLength(v);if(E>this.lines.maxLength&&(this.lines.maxLength=E),this.lines.length>0){if(this._cols<f)for(let D=0;D<this.lines.length;D++)T+=+this.lines.get(D).resize(f,C);let A=0;if(this._rows<v)for(let D=this._rows;D<v;D++)this.lines.length<v+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(f,C)):this.ybase>0&&this.lines.length<=this.ybase+this.y+A+1?(this.ybase--,A++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(f,C)));else for(let D=this._rows;D>v;D--)this.lines.length>v+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(E<this.lines.maxLength){const D=this.lines.length-E;D>0&&(this.lines.trimStart(D),this.ybase=Math.max(this.ybase-D,0),this.ydisp=Math.max(this.ydisp-D,0),this.savedY=Math.max(this.savedY-D,0)),this.lines.maxLength=E}this.x=Math.min(this.x,f-1),this.y=Math.min(this.y,v-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,f-1),this.scrollTop=0}if(this.scrollBottom=v-1,this._isReflowEnabled&&(this._reflow(f,v),this._cols>f))for(let A=0;A<this.lines.length;A++)T+=+this.lines.get(A).resize(f,C);this._cols=f,this._rows=v,this._memoryCleanupQueue.clear(),T>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let f=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,f=!1);let v=0;for(;this._memoryCleanupPosition<this.lines.length;)if(v+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),v>100)return!0;return f}get _isReflowEnabled(){const f=this._optionsService.rawOptions.windowsPty;return f&&f.buildNumber?this._hasScrollback&&f.backend==="conpty"&&f.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(f,v){this._cols!==f&&(f>this._cols?this._reflowLarger(f,v):this._reflowSmaller(f,v))}_reflowLarger(f,v){const C=(0,S.reflowLargerGetLinesToRemove)(this.lines,this._cols,f,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(C.length>0){const T=(0,S.reflowLargerCreateNewLayout)(this.lines,C);(0,S.reflowLargerApplyNewLayout)(this.lines,T.layout),this._reflowLargerAdjustViewport(f,v,T.countRemoved)}}_reflowLargerAdjustViewport(f,v,C){const T=this.getNullCell(p.DEFAULT_ATTR_DATA);let E=C;for(;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<v&&this.lines.push(new p.BufferLine(f,T))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-C,0)}_reflowSmaller(f,v){const C=this.getNullCell(p.DEFAULT_ATTR_DATA),T=[];let E=0;for(let A=this.lines.length-1;A>=0;A--){let D=this.lines.get(A);if(!D||!D.isWrapped&&D.getTrimmedLength()<=f)continue;const R=[D];for(;D.isWrapped&&A>0;)D=this.lines.get(--A),R.unshift(D);const M=this.ybase+this.y;if(M>=A&&M<A+R.length)continue;const $=R[R.length-1].getTrimmedLength(),O=(0,S.reflowSmallerGetNewLineLengths)(R,this._cols,f),I=O.length-R.length;let Y;Y=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+I):Math.max(0,this.lines.length-this.lines.maxLength+I);const Q=[];for(let V=0;V<I;V++){const J=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);Q.push(J)}Q.length>0&&(T.push({start:A+R.length+E,newLines:Q}),E+=Q.length),R.push(...Q);let Z=O.length-1,ee=O[Z];ee===0&&(Z--,ee=O[Z]);let oe=R.length-I-1,P=$;for(;oe>=0;){const V=Math.min(P,ee);if(R[Z]===void 0)break;if(R[Z].copyCellsFrom(R[oe],P-V,ee-V,V,!0),ee-=V,ee===0&&(Z--,ee=O[Z]),P-=V,P===0){oe--;const J=Math.max(oe,0);P=(0,S.getWrappedLineTrimmedLength)(R,J,this._cols)}}for(let V=0;V<R.length;V++)O[V]<f&&R[V].setCell(O[V],C);let W=I-Y;for(;W-- >0;)this.ybase===0?this.y<v-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+E)-v&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+I,this.ybase+v-1)}if(T.length>0){const A=[],D=[];for(let Z=0;Z<this.lines.length;Z++)D.push(this.lines.get(Z));const R=this.lines.length;let M=R-1,$=0,O=T[$];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+E);let I=0;for(let Z=Math.min(this.lines.maxLength-1,R+E-1);Z>=0;Z--)if(O&&O.start>M+I){for(let ee=O.newLines.length-1;ee>=0;ee--)this.lines.set(Z--,O.newLines[ee]);Z++,A.push({index:M+1,amount:O.newLines.length}),I+=O.newLines.length,O=T[++$]}else this.lines.set(Z,D[M--]);let Y=0;for(let Z=A.length-1;Z>=0;Z--)A[Z].index+=Y,this.lines.onInsertEmitter.fire(A[Z]),Y+=A[Z].amount;const Q=Math.max(0,R+E-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(f,v,C=0,T){const E=this.lines.get(f);return E?E.translateToString(v,C,T):""}getWrappedRangeForLine(f){let v=f,C=f;for(;v>0&&this.lines.get(v).isWrapped;)v--;for(;C+1<this.lines.length&&this.lines.get(C+1).isWrapped;)C++;return{first:v,last:C}}setupTabStops(f){for(f!=null?this.tabs[f]||(f=this.prevStop(f)):(this.tabs={},f=0);f<this._cols;f+=this._optionsService.rawOptions.tabStopWidth)this.tabs[f]=!0}prevStop(f){for(f==null&&(f=this.x);!this.tabs[--f]&&f>0;);return f>=this._cols?this._cols-1:f<0?0:f}nextStop(f){for(f==null&&(f=this.x);!this.tabs[++f]&&f<this._cols;);return f>=this._cols?this._cols-1:f<0?0:f}clearMarkers(f){this._isClearing=!0;for(let v=0;v<this.markers.length;v++)this.markers[v].line===f&&(this.markers[v].dispose(),this.markers.splice(v--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let f=0;f<this.markers.length;f++)this.markers[f].dispose(),this.markers.splice(f--,1);this._isClearing=!1}addMarker(f){const v=new l.Marker(f);return this.markers.push(v),v.register(this.lines.onTrim(C=>{v.line-=C,v.line<0&&v.dispose()})),v.register(this.lines.onInsert(C=>{v.line>=C.index&&(v.line+=C.amount)})),v.register(this.lines.onDelete(C=>{v.line>=C.index&&v.line<C.index+C.amount&&v.dispose(),v.line>C.index&&(v.line-=C.amount)})),v.register(v.onDispose(()=>this._removeMarker(v))),v}_removeMarker(f){this._isClearing||this.markers.splice(this.markers.indexOf(f),1)}}},8437:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLine=r.DEFAULT_ATTR_DATA=void 0;const g=o(3734),y=o(511),u=o(643),p=o(482);r.DEFAULT_ATTR_DATA=Object.freeze(new g.AttributeData);let S=0;class N{constructor(l,m,f=!1){this.isWrapped=f,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*l);const v=m||y.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let C=0;C<l;++C)this.setCell(C,v);this.length=l}get(l){const m=this._data[3*l+0],f=2097151&m;return[this._data[3*l+1],2097152&m?this._combined[l]:f?(0,p.stringFromCodePoint)(f):"",m>>22,2097152&m?this._combined[l].charCodeAt(this._combined[l].length-1):f]}set(l,m){this._data[3*l+1]=m[u.CHAR_DATA_ATTR_INDEX],m[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[l]=m[1],this._data[3*l+0]=2097152|l|m[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*l+0]=m[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|m[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(l){return this._data[3*l+0]>>22}hasWidth(l){return 12582912&this._data[3*l+0]}getFg(l){return this._data[3*l+1]}getBg(l){return this._data[3*l+2]}hasContent(l){return 4194303&this._data[3*l+0]}getCodePoint(l){const m=this._data[3*l+0];return 2097152&m?this._combined[l].charCodeAt(this._combined[l].length-1):2097151&m}isCombined(l){return 2097152&this._data[3*l+0]}getString(l){const m=this._data[3*l+0];return 2097152&m?this._combined[l]:2097151&m?(0,p.stringFromCodePoint)(2097151&m):""}isProtected(l){return 536870912&this._data[3*l+2]}loadCell(l,m){return S=3*l,m.content=this._data[S+0],m.fg=this._data[S+1],m.bg=this._data[S+2],2097152&m.content&&(m.combinedData=this._combined[l]),268435456&m.bg&&(m.extended=this._extendedAttrs[l]),m}setCell(l,m){2097152&m.content&&(this._combined[l]=m.combinedData),268435456&m.bg&&(this._extendedAttrs[l]=m.extended),this._data[3*l+0]=m.content,this._data[3*l+1]=m.fg,this._data[3*l+2]=m.bg}setCellFromCodepoint(l,m,f,v){268435456&v.bg&&(this._extendedAttrs[l]=v.extended),this._data[3*l+0]=m|f<<22,this._data[3*l+1]=v.fg,this._data[3*l+2]=v.bg}addCodepointToCell(l,m,f){let v=this._data[3*l+0];2097152&v?this._combined[l]+=(0,p.stringFromCodePoint)(m):2097151&v?(this._combined[l]=(0,p.stringFromCodePoint)(2097151&v)+(0,p.stringFromCodePoint)(m),v&=-2097152,v|=2097152):v=m|4194304,f&&(v&=-12582913,v|=f<<22),this._data[3*l+0]=v}insertCells(l,m,f){if((l%=this.length)&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l-1,0,1,f),m<this.length-l){const v=new y.CellData;for(let C=this.length-l-m-1;C>=0;--C)this.setCell(l+m+C,this.loadCell(l+C,v));for(let C=0;C<m;++C)this.setCell(l+C,f)}else for(let v=l;v<this.length;++v)this.setCell(v,f);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,f)}deleteCells(l,m,f){if(l%=this.length,m<this.length-l){const v=new y.CellData;for(let C=0;C<this.length-l-m;++C)this.setCell(l+C,this.loadCell(l+m+C,v));for(let C=this.length-m;C<this.length;++C)this.setCell(C,f)}else for(let v=l;v<this.length;++v)this.setCell(v,f);l&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l-1,0,1,f),this.getWidth(l)!==0||this.hasContent(l)||this.setCellFromCodepoint(l,0,1,f)}replaceCells(l,m,f,v=!1){if(v)for(l&&this.getWidth(l-1)===2&&!this.isProtected(l-1)&&this.setCellFromCodepoint(l-1,0,1,f),m<this.length&&this.getWidth(m-1)===2&&!this.isProtected(m)&&this.setCellFromCodepoint(m,0,1,f);l<m&&l<this.length;)this.isProtected(l)||this.setCell(l,f),l++;else for(l&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l-1,0,1,f),m<this.length&&this.getWidth(m-1)===2&&this.setCellFromCodepoint(m,0,1,f);l<m&&l<this.length;)this.setCell(l++,f)}resize(l,m){if(l===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const f=3*l;if(l>this.length){if(this._data.buffer.byteLength>=4*f)this._data=new Uint32Array(this._data.buffer,0,f);else{const v=new Uint32Array(f);v.set(this._data),this._data=v}for(let v=this.length;v<l;++v)this.setCell(v,m)}else{this._data=this._data.subarray(0,f);const v=Object.keys(this._combined);for(let T=0;T<v.length;T++){const E=parseInt(v[T],10);E>=l&&delete this._combined[E]}const C=Object.keys(this._extendedAttrs);for(let T=0;T<C.length;T++){const E=parseInt(C[T],10);E>=l&&delete this._extendedAttrs[E]}}return this.length=l,4*f*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const l=new Uint32Array(this._data.length);return l.set(this._data),this._data=l,1}return 0}fill(l,m=!1){if(m)for(let f=0;f<this.length;++f)this.isProtected(f)||this.setCell(f,l);else{this._combined={},this._extendedAttrs={};for(let f=0;f<this.length;++f)this.setCell(f,l)}}copyFrom(l){this.length!==l.length?this._data=new Uint32Array(l._data):this._data.set(l._data),this.length=l.length,this._combined={};for(const m in l._combined)this._combined[m]=l._combined[m];this._extendedAttrs={};for(const m in l._extendedAttrs)this._extendedAttrs[m]=l._extendedAttrs[m];this.isWrapped=l.isWrapped}clone(){const l=new N(0);l._data=new Uint32Array(this._data),l.length=this.length;for(const m in this._combined)l._combined[m]=this._combined[m];for(const m in this._extendedAttrs)l._extendedAttrs[m]=this._extendedAttrs[m];return l.isWrapped=this.isWrapped,l}getTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0])return l+(this._data[3*l+0]>>22);return 0}getNoBgTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0]||50331648&this._data[3*l+2])return l+(this._data[3*l+0]>>22);return 0}copyCellsFrom(l,m,f,v,C){const T=l._data;if(C)for(let A=v-1;A>=0;A--){for(let D=0;D<3;D++)this._data[3*(f+A)+D]=T[3*(m+A)+D];268435456&T[3*(m+A)+2]&&(this._extendedAttrs[f+A]=l._extendedAttrs[m+A])}else for(let A=0;A<v;A++){for(let D=0;D<3;D++)this._data[3*(f+A)+D]=T[3*(m+A)+D];268435456&T[3*(m+A)+2]&&(this._extendedAttrs[f+A]=l._extendedAttrs[m+A])}const E=Object.keys(l._combined);for(let A=0;A<E.length;A++){const D=parseInt(E[A],10);D>=m&&(this._combined[D-m+f]=l._combined[D])}}translateToString(l,m,f,v){m=m??0,f=f??this.length,l&&(f=Math.min(f,this.getTrimmedLength())),v&&(v.length=0);let C="";for(;m<f;){const T=this._data[3*m+0],E=2097151&T,A=2097152&T?this._combined[m]:E?(0,p.stringFromCodePoint)(E):u.WHITESPACE_CELL_CHAR;if(C+=A,v)for(let D=0;D<A.length;++D)v.push(m);m+=T>>22||1}return v&&v.push(m),C}}r.BufferLine=N},4841:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getRangeLength=void 0,r.getRangeLength=function(o,g){if(o.start.y>o.end.y)throw new Error(`Buffer range end (${o.end.x}, ${o.end.y}) cannot be before start (${o.start.x}, ${o.start.y})`);return g*(o.end.y-o.start.y)+(o.end.x-o.start.x+1)}},4634:(b,r)=>{function o(g,y,u){if(y===g.length-1)return g[y].getTrimmedLength();const p=!g[y].hasContent(u-1)&&g[y].getWidth(u-1)===1,S=g[y+1].getWidth(0)===2;return p&&S?u-1:u}Object.defineProperty(r,"__esModule",{value:!0}),r.getWrappedLineTrimmedLength=r.reflowSmallerGetNewLineLengths=r.reflowLargerApplyNewLayout=r.reflowLargerCreateNewLayout=r.reflowLargerGetLinesToRemove=void 0,r.reflowLargerGetLinesToRemove=function(g,y,u,p,S){const N=[];for(let _=0;_<g.length-1;_++){let l=_,m=g.get(++l);if(!m.isWrapped)continue;const f=[g.get(_)];for(;l<g.length&&m.isWrapped;)f.push(m),m=g.get(++l);if(p>=_&&p<l){_+=f.length-1;continue}let v=0,C=o(f,v,y),T=1,E=0;for(;T<f.length;){const D=o(f,T,y),R=D-E,M=u-C,$=Math.min(R,M);f[v].copyCellsFrom(f[T],E,C,$,!1),C+=$,C===u&&(v++,C=0),E+=$,E===D&&(T++,E=0),C===0&&v!==0&&f[v-1].getWidth(u-1)===2&&(f[v].copyCellsFrom(f[v-1],u-1,C++,1,!1),f[v-1].setCell(u-1,S))}f[v].replaceCells(C,u,S);let A=0;for(let D=f.length-1;D>0&&(D>v||f[D].getTrimmedLength()===0);D--)A++;A>0&&(N.push(_+f.length-A),N.push(A)),_+=f.length-1}return N},r.reflowLargerCreateNewLayout=function(g,y){const u=[];let p=0,S=y[p],N=0;for(let _=0;_<g.length;_++)if(S===_){const l=y[++p];g.onDeleteEmitter.fire({index:_-N,amount:l}),_+=l-1,N+=l,S=y[++p]}else u.push(_);return{layout:u,countRemoved:N}},r.reflowLargerApplyNewLayout=function(g,y){const u=[];for(let p=0;p<y.length;p++)u.push(g.get(y[p]));for(let p=0;p<u.length;p++)g.set(p,u[p]);g.length=y.length},r.reflowSmallerGetNewLineLengths=function(g,y,u){const p=[],S=g.map((m,f)=>o(g,f,y)).reduce((m,f)=>m+f);let N=0,_=0,l=0;for(;l<S;){if(S-l<u){p.push(S-l);break}N+=u;const m=o(g,_,y);N>m&&(N-=m,_++);const f=g[_].getWidth(N-1)===2;f&&N--;const v=f?u-1:u;p.push(v),l+=v}return p},r.getWrappedLineTrimmedLength=o},5295:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferSet=void 0;const g=o(8460),y=o(844),u=o(9092);class p extends y.Disposable{constructor(N,_){super(),this._optionsService=N,this._bufferService=_,this._onBufferActivate=this.register(new g.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 u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.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(N){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(N),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(N,_){this._normal.resize(N,_),this._alt.resize(N,_),this.setupTabStops(N)}setupTabStops(N){this._normal.setupTabStops(N),this._alt.setupTabStops(N)}}r.BufferSet=p},511:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellData=void 0;const g=o(482),y=o(643),u=o(3734);class p extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(N){const _=new p;return _.setFromCharData(N),_}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,g.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(N){this.fg=N[y.CHAR_DATA_ATTR_INDEX],this.bg=0;let _=!1;if(N[y.CHAR_DATA_CHAR_INDEX].length>2)_=!0;else if(N[y.CHAR_DATA_CHAR_INDEX].length===2){const l=N[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=l&&l<=56319){const m=N[y.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=m&&m<=57343?this.content=1024*(l-55296)+m-56320+65536|N[y.CHAR_DATA_WIDTH_INDEX]<<22:_=!0}else _=!0}else this.content=N[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|N[y.CHAR_DATA_WIDTH_INDEX]<<22;_&&(this.combinedData=N[y.CHAR_DATA_CHAR_INDEX],this.content=2097152|N[y.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=p},643:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WHITESPACE_CELL_CODE=r.WHITESPACE_CELL_WIDTH=r.WHITESPACE_CELL_CHAR=r.NULL_CELL_CODE=r.NULL_CELL_WIDTH=r.NULL_CELL_CHAR=r.CHAR_DATA_CODE_INDEX=r.CHAR_DATA_WIDTH_INDEX=r.CHAR_DATA_CHAR_INDEX=r.CHAR_DATA_ATTR_INDEX=r.DEFAULT_EXT=r.DEFAULT_ATTR=r.DEFAULT_COLOR=void 0,r.DEFAULT_COLOR=0,r.DEFAULT_ATTR=256|r.DEFAULT_COLOR<<9,r.DEFAULT_EXT=0,r.CHAR_DATA_ATTR_INDEX=0,r.CHAR_DATA_CHAR_INDEX=1,r.CHAR_DATA_WIDTH_INDEX=2,r.CHAR_DATA_CODE_INDEX=3,r.NULL_CELL_CHAR="",r.NULL_CELL_WIDTH=1,r.NULL_CELL_CODE=0,r.WHITESPACE_CELL_CHAR=" ",r.WHITESPACE_CELL_WIDTH=1,r.WHITESPACE_CELL_CODE=32},4863:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Marker=void 0;const g=o(8460),y=o(844);class u{get id(){return this._id}constructor(S){this.line=S,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new g.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,y.disposeArray)(this._disposables),this._disposables.length=0)}register(S){return this._disposables.push(S),S}}r.Marker=u,u._nextId=1},7116:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_CHARSET=r.CHARSETS=void 0,r.CHARSETS={},r.DEFAULT_CHARSET=r.CHARSETS.B,r.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:"≥","{":"π","|":"≠","}":"£","~":"·"},r.CHARSETS.A={"#":"£"},r.CHARSETS.B=void 0,r.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},r.CHARSETS.C=r.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},r.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},r.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},r.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},r.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},r.CHARSETS.E=r.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},r.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},r.CHARSETS.H=r.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},r.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(b,r)=>{var o,g,y;Object.defineProperty(r,"__esModule",{value:!0}),r.C1_ESCAPED=r.C1=r.C0=void 0,function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
213
+ `,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""}(o||(r.C0=o={})),function(u){u.PAD="€",u.HOP="",u.BPH="‚",u.NBH="ƒ",u.IND="„",u.NEL="…",u.SSA="†",u.ESA="‡",u.HTS="ˆ",u.HTJ="‰",u.VTS="Š",u.PLD="‹",u.PLU="Œ",u.RI="",u.SS2="Ž",u.SS3="",u.DCS="",u.PU1="‘",u.PU2="’",u.STS="“",u.CCH="”",u.MW="•",u.SPA="–",u.EPA="—",u.SOS="˜",u.SGCI="™",u.SCI="š",u.CSI="›",u.ST="œ",u.OSC="",u.PM="ž",u.APC="Ÿ"}(g||(r.C1=g={})),function(u){u.ST=`${o.ESC}\\`}(y||(r.C1_ESCAPED=y={}))},7399:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.evaluateKeyboardEvent=void 0;const g=o(2584),y={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};r.evaluateKeyboardEvent=function(u,p,S,N){const _={type:0,cancel:!1,key:void 0},l=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?_.key=p?g.C0.ESC+"OA":g.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?_.key=p?g.C0.ESC+"OD":g.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?_.key=p?g.C0.ESC+"OC":g.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(_.key=p?g.C0.ESC+"OB":g.C0.ESC+"[B");break;case 8:_.key=u.ctrlKey?"\b":g.C0.DEL,u.altKey&&(_.key=g.C0.ESC+_.key);break;case 9:if(u.shiftKey){_.key=g.C0.ESC+"[Z";break}_.key=g.C0.HT,_.cancel=!0;break;case 13:_.key=u.altKey?g.C0.ESC+g.C0.CR:g.C0.CR,_.cancel=!0;break;case 27:_.key=g.C0.ESC,u.altKey&&(_.key=g.C0.ESC+g.C0.ESC),_.cancel=!0;break;case 37:if(u.metaKey)break;l?(_.key=g.C0.ESC+"[1;"+(l+1)+"D",_.key===g.C0.ESC+"[1;3D"&&(_.key=g.C0.ESC+(S?"b":"[1;5D"))):_.key=p?g.C0.ESC+"OD":g.C0.ESC+"[D";break;case 39:if(u.metaKey)break;l?(_.key=g.C0.ESC+"[1;"+(l+1)+"C",_.key===g.C0.ESC+"[1;3C"&&(_.key=g.C0.ESC+(S?"f":"[1;5C"))):_.key=p?g.C0.ESC+"OC":g.C0.ESC+"[C";break;case 38:if(u.metaKey)break;l?(_.key=g.C0.ESC+"[1;"+(l+1)+"A",S||_.key!==g.C0.ESC+"[1;3A"||(_.key=g.C0.ESC+"[1;5A")):_.key=p?g.C0.ESC+"OA":g.C0.ESC+"[A";break;case 40:if(u.metaKey)break;l?(_.key=g.C0.ESC+"[1;"+(l+1)+"B",S||_.key!==g.C0.ESC+"[1;3B"||(_.key=g.C0.ESC+"[1;5B")):_.key=p?g.C0.ESC+"OB":g.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(_.key=g.C0.ESC+"[2~");break;case 46:_.key=l?g.C0.ESC+"[3;"+(l+1)+"~":g.C0.ESC+"[3~";break;case 36:_.key=l?g.C0.ESC+"[1;"+(l+1)+"H":p?g.C0.ESC+"OH":g.C0.ESC+"[H";break;case 35:_.key=l?g.C0.ESC+"[1;"+(l+1)+"F":p?g.C0.ESC+"OF":g.C0.ESC+"[F";break;case 33:u.shiftKey?_.type=2:u.ctrlKey?_.key=g.C0.ESC+"[5;"+(l+1)+"~":_.key=g.C0.ESC+"[5~";break;case 34:u.shiftKey?_.type=3:u.ctrlKey?_.key=g.C0.ESC+"[6;"+(l+1)+"~":_.key=g.C0.ESC+"[6~";break;case 112:_.key=l?g.C0.ESC+"[1;"+(l+1)+"P":g.C0.ESC+"OP";break;case 113:_.key=l?g.C0.ESC+"[1;"+(l+1)+"Q":g.C0.ESC+"OQ";break;case 114:_.key=l?g.C0.ESC+"[1;"+(l+1)+"R":g.C0.ESC+"OR";break;case 115:_.key=l?g.C0.ESC+"[1;"+(l+1)+"S":g.C0.ESC+"OS";break;case 116:_.key=l?g.C0.ESC+"[15;"+(l+1)+"~":g.C0.ESC+"[15~";break;case 117:_.key=l?g.C0.ESC+"[17;"+(l+1)+"~":g.C0.ESC+"[17~";break;case 118:_.key=l?g.C0.ESC+"[18;"+(l+1)+"~":g.C0.ESC+"[18~";break;case 119:_.key=l?g.C0.ESC+"[19;"+(l+1)+"~":g.C0.ESC+"[19~";break;case 120:_.key=l?g.C0.ESC+"[20;"+(l+1)+"~":g.C0.ESC+"[20~";break;case 121:_.key=l?g.C0.ESC+"[21;"+(l+1)+"~":g.C0.ESC+"[21~";break;case 122:_.key=l?g.C0.ESC+"[23;"+(l+1)+"~":g.C0.ESC+"[23~";break;case 123:_.key=l?g.C0.ESC+"[24;"+(l+1)+"~":g.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(S&&!N||!u.altKey||u.metaKey)!S||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?_.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(_.key=g.C0.US),u.key==="@"&&(_.key=g.C0.NUL)):u.keyCode===65&&(_.type=1);else{const m=y[u.keyCode],f=m==null?void 0:m[u.shiftKey?1:0];if(f)_.key=g.C0.ESC+f;else if(u.keyCode>=65&&u.keyCode<=90){const v=u.ctrlKey?u.keyCode-64:u.keyCode+32;let C=String.fromCharCode(v);u.shiftKey&&(C=C.toUpperCase()),_.key=g.C0.ESC+C}else if(u.keyCode===32)_.key=g.C0.ESC+(u.ctrlKey?g.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let v=u.code.slice(3,4);u.shiftKey||(v=v.toLowerCase()),_.key=g.C0.ESC+v,_.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?_.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?_.key=g.C0.NUL:u.keyCode>=51&&u.keyCode<=55?_.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?_.key=g.C0.DEL:u.keyCode===219?_.key=g.C0.ESC:u.keyCode===220?_.key=g.C0.FS:u.keyCode===221&&(_.key=g.C0.GS)}return _}},482:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(o){return o>65535?(o-=65536,String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):String.fromCharCode(o)},r.utf32ToString=function(o,g=0,y=o.length){let u="";for(let p=g;p<y;++p){let S=o[p];S>65535?(S-=65536,u+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):u+=String.fromCharCode(S)}return u},r.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(o,g){const y=o.length;if(!y)return 0;let u=0,p=0;if(this._interim){const S=o.charCodeAt(p++);56320<=S&&S<=57343?g[u++]=1024*(this._interim-55296)+S-56320+65536:(g[u++]=this._interim,g[u++]=S),this._interim=0}for(let S=p;S<y;++S){const N=o.charCodeAt(S);if(55296<=N&&N<=56319){if(++S>=y)return this._interim=N,u;const _=o.charCodeAt(S);56320<=_&&_<=57343?g[u++]=1024*(N-55296)+_-56320+65536:(g[u++]=N,g[u++]=_)}else N!==65279&&(g[u++]=N)}return u}},r.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(o,g){const y=o.length;if(!y)return 0;let u,p,S,N,_=0,l=0,m=0;if(this.interim[0]){let C=!1,T=this.interim[0];T&=(224&T)==192?31:(240&T)==224?15:7;let E,A=0;for(;(E=63&this.interim[++A])&&A<4;)T<<=6,T|=E;const D=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=D-A;for(;m<R;){if(m>=y)return 0;if(E=o[m++],(192&E)!=128){m--,C=!0;break}this.interim[A++]=E,T<<=6,T|=63&E}C||(D===2?T<128?m--:g[_++]=T:D===3?T<2048||T>=55296&&T<=57343||T===65279||(g[_++]=T):T<65536||T>1114111||(g[_++]=T)),this.interim.fill(0)}const f=y-4;let v=m;for(;v<y;){for(;!(!(v<f)||128&(u=o[v])||128&(p=o[v+1])||128&(S=o[v+2])||128&(N=o[v+3]));)g[_++]=u,g[_++]=p,g[_++]=S,g[_++]=N,v+=4;if(u=o[v++],u<128)g[_++]=u;else if((224&u)==192){if(v>=y)return this.interim[0]=u,_;if(p=o[v++],(192&p)!=128){v--;continue}if(l=(31&u)<<6|63&p,l<128){v--;continue}g[_++]=l}else if((240&u)==224){if(v>=y)return this.interim[0]=u,_;if(p=o[v++],(192&p)!=128){v--;continue}if(v>=y)return this.interim[0]=u,this.interim[1]=p,_;if(S=o[v++],(192&S)!=128){v--;continue}if(l=(15&u)<<12|(63&p)<<6|63&S,l<2048||l>=55296&&l<=57343||l===65279)continue;g[_++]=l}else if((248&u)==240){if(v>=y)return this.interim[0]=u,_;if(p=o[v++],(192&p)!=128){v--;continue}if(v>=y)return this.interim[0]=u,this.interim[1]=p,_;if(S=o[v++],(192&S)!=128){v--;continue}if(v>=y)return this.interim[0]=u,this.interim[1]=p,this.interim[2]=S,_;if(N=o[v++],(192&N)!=128){v--;continue}if(l=(7&u)<<18|(63&p)<<12|(63&S)<<6|63&N,l<65536||l>1114111)continue;g[_++]=l}}return _}}},225:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV6=void 0;const g=o(1480),y=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],u=[[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 p;r.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let S=0;S<y.length;++S)p.fill(0,y[S][0],y[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?p[S]:function(N,_){let l,m=0,f=_.length-1;if(N<_[0][0]||N>_[f][1])return!1;for(;f>=m;)if(l=m+f>>1,N>_[l][1])m=l+1;else{if(!(N<_[l][0]))return!0;f=l-1}return!1}(S,u)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,N){let _=this.wcwidth(S),l=_===0&&N!==0;if(l){const m=g.UnicodeService.extractWidth(N);m===0?l=!1:m>_&&(_=m)}return g.UnicodeService.createPropertyValue(0,_,l)}}},5981:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WriteBuffer=void 0;const g=o(8460),y=o(844);class u extends y.Disposable{constructor(S){super(),this._action=S,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new g.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(S,N){if(N!==void 0&&this._syncCalls>N)return void(this._syncCalls=0);if(this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let _;for(this._isSyncWriting=!0;_=this._writeBuffer.shift();){this._action(_);const l=this._callbacks.shift();l&&l()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(S,N){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+=S.length,this._writeBuffer.push(S),this._callbacks.push(N),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(N)}_innerWrite(S=0,N=!0){const _=S||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const l=this._writeBuffer[this._bufferOffset],m=this._action(l,N);if(m){const v=C=>Date.now()-_>=12?setTimeout(()=>this._innerWrite(0,C)):this._innerWrite(_,C);return void m.catch(C=>(queueMicrotask(()=>{throw C}),Promise.resolve(!1))).then(v)}const f=this._callbacks[this._bufferOffset];if(f&&f(),this._bufferOffset++,this._pendingData-=l.length,Date.now()-_>=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()}}r.WriteBuffer=u},5941:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.toRgbString=r.parseColor=void 0;const o=/^([\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})$/,g=/^[\da-f]+$/;function y(u,p){const S=u.toString(16),N=S.length<2?"0"+S:S;switch(p){case 4:return S[0];case 8:return N;case 12:return(N+N).slice(0,3);default:return N+N}}r.parseColor=function(u){if(!u)return;let p=u.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const S=o.exec(p);if(S){const N=S[1]?15:S[4]?255:S[7]?4095:65535;return[Math.round(parseInt(S[1]||S[4]||S[7]||S[10],16)/N*255),Math.round(parseInt(S[2]||S[5]||S[8]||S[11],16)/N*255),Math.round(parseInt(S[3]||S[6]||S[9]||S[12],16)/N*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),g.exec(p)&&[3,6,9,12].includes(p.length))){const S=p.length/3,N=[0,0,0];for(let _=0;_<3;++_){const l=parseInt(p.slice(S*_,S*_+S),16);N[_]=S===1?l<<4:S===2?l:S===3?l>>4:l>>8}return N}},r.toRgbString=function(u,p=16){const[S,N,_]=u;return`rgb:${y(S,p)}/${y(N,p)}/${y(_,p)}`}},5770:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.PAYLOAD_LIMIT=void 0,r.PAYLOAD_LIMIT=1e7},6351:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DcsHandler=r.DcsParser=void 0;const g=o(482),y=o(8742),u=o(5770),p=[];r.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(N,_){this._handlers[N]===void 0&&(this._handlers[N]=[]);const l=this._handlers[N];return l.push(_),{dispose:()=>{const m=l.indexOf(_);m!==-1&&l.splice(m,1)}}}clearHandler(N){this._handlers[N]&&delete this._handlers[N]}setHandlerFallback(N){this._handlerFb=N}reset(){if(this._active.length)for(let N=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;N>=0;--N)this._active[N].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(N,_){if(this.reset(),this._ident=N,this._active=this._handlers[N]||p,this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].hook(_);else this._handlerFb(this._ident,"HOOK",_)}put(N,_,l){if(this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].put(N,_,l);else this._handlerFb(this._ident,"PUT",(0,g.utf32ToString)(N,_,l))}unhook(N,_=!0){if(this._active.length){let l=!1,m=this._active.length-1,f=!1;if(this._stack.paused&&(m=this._stack.loopPosition-1,l=_,f=this._stack.fallThrough,this._stack.paused=!1),!f&&l===!1){for(;m>=0&&(l=this._active[m].unhook(N),l!==!0);m--)if(l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!1,l;m--}for(;m>=0;m--)if(l=this._active[m].unhook(!1),l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!0,l}else this._handlerFb(this._ident,"UNHOOK",N);this._active=p,this._ident=0}};const S=new y.Params;S.addParam(0),r.DcsHandler=class{constructor(N){this._handler=N,this._data="",this._params=S,this._hitLimit=!1}hook(N){this._params=N.length>1||N.params[0]?N.clone():S,this._data="",this._hitLimit=!1}put(N,_,l){this._hitLimit||(this._data+=(0,g.utf32ToString)(N,_,l),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(N){let _=!1;if(this._hitLimit)_=!1;else if(N&&(_=this._handler(this._data,this._params),_ instanceof Promise))return _.then(l=>(this._params=S,this._data="",this._hitLimit=!1,l));return this._params=S,this._data="",this._hitLimit=!1,_}}},2015:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.EscapeSequenceParser=r.VT500_TRANSITION_TABLE=r.TransitionTable=void 0;const g=o(844),y=o(8742),u=o(6242),p=o(6351);class S{constructor(m){this.table=new Uint8Array(m)}setDefault(m,f){this.table.fill(m<<4|f)}add(m,f,v,C){this.table[f<<8|m]=v<<4|C}addMany(m,f,v,C){for(let T=0;T<m.length;T++)this.table[f<<8|m[T]]=v<<4|C}}r.TransitionTable=S;const N=160;r.VT500_TRANSITION_TABLE=function(){const l=new S(4095),m=Array.apply(null,Array(256)).map((A,D)=>D),f=(A,D)=>m.slice(A,D),v=f(32,127),C=f(0,24);C.push(25),C.push.apply(C,f(28,32));const T=f(0,14);let E;for(E in l.setDefault(1,0),l.addMany(v,0,2,0),T)l.addMany([24,26,153,154],E,3,0),l.addMany(f(128,144),E,3,0),l.addMany(f(144,152),E,3,0),l.add(156,E,0,0),l.add(27,E,11,1),l.add(157,E,4,8),l.addMany([152,158,159],E,0,7),l.add(155,E,11,3),l.add(144,E,11,9);return l.addMany(C,0,3,0),l.addMany(C,1,3,1),l.add(127,1,0,1),l.addMany(C,8,0,8),l.addMany(C,3,3,3),l.add(127,3,0,3),l.addMany(C,4,3,4),l.add(127,4,0,4),l.addMany(C,6,3,6),l.addMany(C,5,3,5),l.add(127,5,0,5),l.addMany(C,2,3,2),l.add(127,2,0,2),l.add(93,1,4,8),l.addMany(v,8,5,8),l.add(127,8,5,8),l.addMany([156,27,24,26,7],8,6,0),l.addMany(f(28,32),8,0,8),l.addMany([88,94,95],1,0,7),l.addMany(v,7,0,7),l.addMany(C,7,0,7),l.add(156,7,0,0),l.add(127,7,0,7),l.add(91,1,11,3),l.addMany(f(64,127),3,7,0),l.addMany(f(48,60),3,8,4),l.addMany([60,61,62,63],3,9,4),l.addMany(f(48,60),4,8,4),l.addMany(f(64,127),4,7,0),l.addMany([60,61,62,63],4,0,6),l.addMany(f(32,64),6,0,6),l.add(127,6,0,6),l.addMany(f(64,127),6,0,0),l.addMany(f(32,48),3,9,5),l.addMany(f(32,48),5,9,5),l.addMany(f(48,64),5,0,6),l.addMany(f(64,127),5,7,0),l.addMany(f(32,48),4,9,5),l.addMany(f(32,48),1,9,2),l.addMany(f(32,48),2,9,2),l.addMany(f(48,127),2,10,0),l.addMany(f(48,80),1,10,0),l.addMany(f(81,88),1,10,0),l.addMany([89,90,92],1,10,0),l.addMany(f(96,127),1,10,0),l.add(80,1,11,9),l.addMany(C,9,0,9),l.add(127,9,0,9),l.addMany(f(28,32),9,0,9),l.addMany(f(32,48),9,9,12),l.addMany(f(48,60),9,8,10),l.addMany([60,61,62,63],9,9,10),l.addMany(C,11,0,11),l.addMany(f(32,128),11,0,11),l.addMany(f(28,32),11,0,11),l.addMany(C,10,0,10),l.add(127,10,0,10),l.addMany(f(28,32),10,0,10),l.addMany(f(48,60),10,8,10),l.addMany([60,61,62,63],10,0,11),l.addMany(f(32,48),10,9,12),l.addMany(C,12,0,12),l.add(127,12,0,12),l.addMany(f(28,32),12,0,12),l.addMany(f(32,48),12,9,12),l.addMany(f(48,64),12,0,11),l.addMany(f(64,127),12,12,13),l.addMany(f(64,127),10,12,13),l.addMany(f(64,127),9,12,13),l.addMany(C,13,13,13),l.addMany(v,13,13,13),l.add(127,13,0,13),l.addMany([27,156,24,26],13,14,0),l.add(N,0,2,0),l.add(N,8,5,8),l.add(N,6,0,6),l.add(N,11,0,11),l.add(N,13,13,13),l}();class _ extends g.Disposable{constructor(m=r.VT500_TRANSITION_TABLE){super(),this._transitions=m,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new y.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(f,v,C)=>{},this._executeHandlerFb=f=>{},this._csiHandlerFb=(f,v)=>{},this._escHandlerFb=f=>{},this._errorHandlerFb=f=>f,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,g.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new u.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(m,f=[64,126]){let v=0;if(m.prefix){if(m.prefix.length>1)throw new Error("only one byte as prefix supported");if(v=m.prefix.charCodeAt(0),v&&60>v||v>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(m.intermediates){if(m.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let T=0;T<m.intermediates.length;++T){const E=m.intermediates.charCodeAt(T);if(32>E||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");v<<=8,v|=E}}if(m.final.length!==1)throw new Error("final must be a single byte");const C=m.final.charCodeAt(0);if(f[0]>C||C>f[1])throw new Error(`final must be in range ${f[0]} .. ${f[1]}`);return v<<=8,v|=C,v}identToString(m){const f=[];for(;m;)f.push(String.fromCharCode(255&m)),m>>=8;return f.reverse().join("")}setPrintHandler(m){this._printHandler=m}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(m,f){const v=this._identifier(m,[48,126]);this._escHandlers[v]===void 0&&(this._escHandlers[v]=[]);const C=this._escHandlers[v];return C.push(f),{dispose:()=>{const T=C.indexOf(f);T!==-1&&C.splice(T,1)}}}clearEscHandler(m){this._escHandlers[this._identifier(m,[48,126])]&&delete this._escHandlers[this._identifier(m,[48,126])]}setEscHandlerFallback(m){this._escHandlerFb=m}setExecuteHandler(m,f){this._executeHandlers[m.charCodeAt(0)]=f}clearExecuteHandler(m){this._executeHandlers[m.charCodeAt(0)]&&delete this._executeHandlers[m.charCodeAt(0)]}setExecuteHandlerFallback(m){this._executeHandlerFb=m}registerCsiHandler(m,f){const v=this._identifier(m);this._csiHandlers[v]===void 0&&(this._csiHandlers[v]=[]);const C=this._csiHandlers[v];return C.push(f),{dispose:()=>{const T=C.indexOf(f);T!==-1&&C.splice(T,1)}}}clearCsiHandler(m){this._csiHandlers[this._identifier(m)]&&delete this._csiHandlers[this._identifier(m)]}setCsiHandlerFallback(m){this._csiHandlerFb=m}registerDcsHandler(m,f){return this._dcsParser.registerHandler(this._identifier(m),f)}clearDcsHandler(m){this._dcsParser.clearHandler(this._identifier(m))}setDcsHandlerFallback(m){this._dcsParser.setHandlerFallback(m)}registerOscHandler(m,f){return this._oscParser.registerHandler(m,f)}clearOscHandler(m){this._oscParser.clearHandler(m)}setOscHandlerFallback(m){this._oscParser.setHandlerFallback(m)}setErrorHandler(m){this._errorHandler=m}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(m,f,v,C,T){this._parseStack.state=m,this._parseStack.handlers=f,this._parseStack.handlerPos=v,this._parseStack.transition=C,this._parseStack.chunkPos=T}parse(m,f,v){let C,T=0,E=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(v===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const D=this._parseStack.handlers;let R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(v===!1&&R>-1){for(;R>=0&&(C=D[R](this._params),C!==!0);R--)if(C instanceof Promise)return this._parseStack.handlerPos=R,C}this._parseStack.handlers=[];break;case 4:if(v===!1&&R>-1){for(;R>=0&&(C=D[R](),C!==!0);R--)if(C instanceof Promise)return this._parseStack.handlerPos=R,C}this._parseStack.handlers=[];break;case 6:if(T=m[this._parseStack.chunkPos],C=this._dcsParser.unhook(T!==24&&T!==26,v),C)return C;T===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(T=m[this._parseStack.chunkPos],C=this._oscParser.end(T!==24&&T!==26,v),C)return C;T===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,A=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let D=A;D<f;++D){switch(T=m[D],E=this._transitions.table[this.currentState<<8|(T<160?T:N)],E>>4){case 2:for(let I=D+1;;++I){if(I>=f||(T=m[I])<32||T>126&&T<N){this._printHandler(m,D,I),D=I-1;break}if(++I>=f||(T=m[I])<32||T>126&&T<N){this._printHandler(m,D,I),D=I-1;break}if(++I>=f||(T=m[I])<32||T>126&&T<N){this._printHandler(m,D,I),D=I-1;break}if(++I>=f||(T=m[I])<32||T>126&&T<N){this._printHandler(m,D,I),D=I-1;break}}break;case 3:this._executeHandlers[T]?this._executeHandlers[T]():this._executeHandlerFb(T),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:D,code:T,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const R=this._csiHandlers[this._collect<<8|T];let M=R?R.length-1:-1;for(;M>=0&&(C=R[M](this._params),C!==!0);M--)if(C instanceof Promise)return this._preserveStack(3,R,M,E,D),C;M<0&&this._csiHandlerFb(this._collect<<8|T,this._params),this.precedingJoinState=0;break;case 8:do switch(T){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(T-48)}while(++D<f&&(T=m[D])>47&&T<60);D--;break;case 9:this._collect<<=8,this._collect|=T;break;case 10:const $=this._escHandlers[this._collect<<8|T];let O=$?$.length-1:-1;for(;O>=0&&(C=$[O](),C!==!0);O--)if(C instanceof Promise)return this._preserveStack(4,$,O,E,D),C;O<0&&this._escHandlerFb(this._collect<<8|T),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|T,this._params);break;case 13:for(let I=D+1;;++I)if(I>=f||(T=m[I])===24||T===26||T===27||T>127&&T<N){this._dcsParser.put(m,D,I),D=I-1;break}break;case 14:if(C=this._dcsParser.unhook(T!==24&&T!==26),C)return this._preserveStack(6,[],0,E,D),C;T===27&&(E|=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 I=D+1;;I++)if(I>=f||(T=m[I])<32||T>127&&T<N){this._oscParser.put(m,D,I),D=I-1;break}break;case 6:if(C=this._oscParser.end(T!==24&&T!==26),C)return this._preserveStack(5,[],0,E,D),C;T===27&&(E|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&E}}}r.EscapeSequenceParser=_},6242:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OscHandler=r.OscParser=void 0;const g=o(5770),y=o(482),u=[];r.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,S){this._handlers[p]===void 0&&(this._handlers[p]=[]);const N=this._handlers[p];return N.push(S),{dispose:()=>{const _=N.indexOf(S);_!==-1&&N.splice(_,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,S,N){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(p,S,N);else this._handlerFb(this._id,"PUT",(0,y.utf32ToString)(p,S,N))}start(){this.reset(),this._state=1}put(p,S,N){if(this._state!==3){if(this._state===1)for(;S<N;){const _=p[S++];if(_===59){this._state=2,this._start();break}if(_<48||57<_)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+_-48}this._state===2&&N-S>0&&this._put(p,S,N)}}end(p,S=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let N=!1,_=this._active.length-1,l=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,N=S,l=this._stack.fallThrough,this._stack.paused=!1),!l&&N===!1){for(;_>=0&&(N=this._active[_].end(p),N!==!0);_--)if(N instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,N;_--}for(;_>=0;_--)if(N=this._active[_].end(!1),N instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,N}else this._handlerFb(this._id,"END",p);this._active=u,this._id=-1,this._state=0}}},r.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,S,N){this._hitLimit||(this._data+=(0,y.utf32ToString)(p,S,N),this._data.length>g.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let S=!1;if(this._hitLimit)S=!1;else if(p&&(S=this._handler(this._data),S instanceof Promise))return S.then(N=>(this._data="",this._hitLimit=!1,N));return this._data="",this._hitLimit=!1,S}}},8742:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Params=void 0;const o=2147483647;class g{static fromArray(u){const p=new g;if(!u.length)return p;for(let S=Array.isArray(u[0])?1:0;S<u.length;++S){const N=u[S];if(Array.isArray(N))for(let _=0;_<N.length;++_)p.addSubParam(N[_]);else p.addParam(N)}return p}constructor(u=32,p=32){if(this.maxLength=u,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new g(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){const u=[];for(let p=0;p<this.length;++p){u.push(this.params[p]);const S=this._subParamsIdx[p]>>8,N=255&this._subParamsIdx[p];N-S>0&&u.push(Array.prototype.slice.call(this._subParams,S,N))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>o?o:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>o?o:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const p=this._subParamsIdx[u]>>8,S=255&this._subParamsIdx[u];return S-p>0?this._subParams.subarray(p,S):null}getSubParamsAll(){const u={};for(let p=0;p<this.length;++p){const S=this._subParamsIdx[p]>>8,N=255&this._subParamsIdx[p];N-S>0&&(u[p]=this._subParams.slice(S,N))}return u}addDigit(u){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,N=S[p-1];S[p-1]=~N?Math.min(10*N+u,o):u}}r.Params=g},5741:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.AddonManager=void 0,r.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let o=this._addons.length-1;o>=0;o--)this._addons[o].instance.dispose()}loadAddon(o,g){const y={instance:g,dispose:g.dispose,isDisposed:!1};this._addons.push(y),g.dispose=()=>this._wrappedAddonDispose(y),g.activate(o)}_wrappedAddonDispose(o){if(o.isDisposed)return;let g=-1;for(let y=0;y<this._addons.length;y++)if(this._addons[y]===o){g=y;break}if(g===-1)throw new Error("Could not dispose an addon that has not been loaded");o.isDisposed=!0,o.dispose.apply(o.instance),this._addons.splice(g,1)}}},8771:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferApiView=void 0;const g=o(3785),y=o(511);r.BufferApiView=class{constructor(u,p){this._buffer=u,this.type=p}init(u){return this._buffer=u,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(u){const p=this._buffer.lines.get(u);if(p)return new g.BufferLineApiView(p)}getNullCell(){return new y.CellData}}},3785:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLineApiView=void 0;const g=o(511);r.BufferLineApiView=class{constructor(y){this._line=y}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(y,u){if(!(y<0||y>=this._line.length))return u?(this._line.loadCell(y,u),u):this._line.loadCell(y,new g.CellData)}translateToString(y,u,p){return this._line.translateToString(y,u,p)}}},8285:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferNamespaceApi=void 0;const g=o(8771),y=o(8460),u=o(844);class p extends u.Disposable{constructor(N){super(),this._core=N,this._onBufferChange=this.register(new y.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new g.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new g.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)}}r.BufferNamespaceApi=p},7975:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ParserApi=void 0,r.ParserApi=class{constructor(o){this._core=o}registerCsiHandler(o,g){return this._core.registerCsiHandler(o,y=>g(y.toArray()))}addCsiHandler(o,g){return this.registerCsiHandler(o,g)}registerDcsHandler(o,g){return this._core.registerDcsHandler(o,(y,u)=>g(y,u.toArray()))}addDcsHandler(o,g){return this.registerDcsHandler(o,g)}registerEscHandler(o,g){return this._core.registerEscHandler(o,g)}addEscHandler(o,g){return this.registerEscHandler(o,g)}registerOscHandler(o,g){return this._core.registerOscHandler(o,g)}addOscHandler(o,g){return this.registerOscHandler(o,g)}}},7090:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeApi=void 0,r.UnicodeApi=class{constructor(o){this._core=o}register(o){this._core.unicodeService.register(o)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(o){this._core.unicodeService.activeVersion=o}}},744:function(b,r,o){var g=this&&this.__decorate||function(l,m,f,v){var C,T=arguments.length,E=T<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,f):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(l,m,f,v);else for(var A=l.length-1;A>=0;A--)(C=l[A])&&(E=(T<3?C(E):T>3?C(m,f,E):C(m,f))||E);return T>3&&E&&Object.defineProperty(m,f,E),E},y=this&&this.__param||function(l,m){return function(f,v){m(f,v,l)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferService=r.MINIMUM_ROWS=r.MINIMUM_COLS=void 0;const u=o(8460),p=o(844),S=o(5295),N=o(2585);r.MINIMUM_COLS=2,r.MINIMUM_ROWS=1;let _=r.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(l){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(l.rawOptions.cols||0,r.MINIMUM_COLS),this.rows=Math.max(l.rawOptions.rows||0,r.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(l,this))}resize(l,m){this.cols=l,this.rows=m,this.buffers.resize(l,m),this._onResize.fire({cols:l,rows:m})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(l,m=!1){const f=this.buffer;let v;v=this._cachedBlankLine,v&&v.length===this.cols&&v.getFg(0)===l.fg&&v.getBg(0)===l.bg||(v=f.getBlankLine(l,m),this._cachedBlankLine=v),v.isWrapped=m;const C=f.ybase+f.scrollTop,T=f.ybase+f.scrollBottom;if(f.scrollTop===0){const E=f.lines.isFull;T===f.lines.length-1?E?f.lines.recycle().copyFrom(v):f.lines.push(v.clone()):f.lines.splice(T+1,0,v.clone()),E?this.isUserScrolling&&(f.ydisp=Math.max(f.ydisp-1,0)):(f.ybase++,this.isUserScrolling||f.ydisp++)}else{const E=T-C+1;f.lines.shiftElements(C+1,E-1,-1),f.lines.set(T,v.clone())}this.isUserScrolling||(f.ydisp=f.ybase),this._onScroll.fire(f.ydisp)}scrollLines(l,m,f){const v=this.buffer;if(l<0){if(v.ydisp===0)return;this.isUserScrolling=!0}else l+v.ydisp>=v.ybase&&(this.isUserScrolling=!1);const C=v.ydisp;v.ydisp=Math.max(Math.min(v.ydisp+l,v.ybase),0),C!==v.ydisp&&(m||this._onScroll.fire(v.ydisp))}};r.BufferService=_=g([y(0,N.IOptionsService)],_)},7994:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CharsetService=void 0,r.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(o){this.glevel=o,this.charset=this._charsets[o]}setgCharset(o,g){this._charsets[o]=g,this.glevel===o&&(this.charset=g)}}},1753:function(b,r,o){var g=this&&this.__decorate||function(v,C,T,E){var A,D=arguments.length,R=D<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,T):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(v,C,T,E);else for(var M=v.length-1;M>=0;M--)(A=v[M])&&(R=(D<3?A(R):D>3?A(C,T,R):A(C,T))||R);return D>3&&R&&Object.defineProperty(C,T,R),R},y=this&&this.__param||function(v,C){return function(T,E){C(T,E,v)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreMouseService=void 0;const u=o(2585),p=o(8460),S=o(844),N={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:v=>v.button!==4&&v.action===1&&(v.ctrl=!1,v.alt=!1,v.shift=!1,!0)},VT200:{events:19,restrict:v=>v.action!==32},DRAG:{events:23,restrict:v=>v.action!==32||v.button!==3},ANY:{events:31,restrict:v=>!0}};function _(v,C){let T=(v.ctrl?16:0)|(v.shift?4:0)|(v.alt?8:0);return v.button===4?(T|=64,T|=v.action):(T|=3&v.button,4&v.button&&(T|=64),8&v.button&&(T|=128),v.action===32?T|=32:v.action!==0||C||(T|=3)),T}const l=String.fromCharCode,m={DEFAULT:v=>{const C=[_(v,!1)+32,v.col+32,v.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${l(C[0])}${l(C[1])}${l(C[2])}`},SGR:v=>{const C=v.action===0&&v.button!==4?"m":"M";return`\x1B[<${_(v,!0)};${v.col};${v.row}${C}`},SGR_PIXELS:v=>{const C=v.action===0&&v.button!==4?"m":"M";return`\x1B[<${_(v,!0)};${v.x};${v.y}${C}`}};let f=r.CoreMouseService=class extends S.Disposable{constructor(v,C){super(),this._bufferService=v,this._coreService=C,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const T of Object.keys(N))this.addProtocol(T,N[T]);for(const T of Object.keys(m))this.addEncoding(T,m[T]);this.reset()}addProtocol(v,C){this._protocols[v]=C}addEncoding(v,C){this._encodings[v]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(v){if(!this._protocols[v])throw new Error(`unknown protocol "${v}"`);this._activeProtocol=v,this._onProtocolChange.fire(this._protocols[v].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(v){if(!this._encodings[v])throw new Error(`unknown encoding "${v}"`);this._activeEncoding=v}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(v){if(v.col<0||v.col>=this._bufferService.cols||v.row<0||v.row>=this._bufferService.rows||v.button===4&&v.action===32||v.button===3&&v.action!==32||v.button!==4&&(v.action===2||v.action===3)||(v.col++,v.row++,v.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,v,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(v))return!1;const C=this._encodings[this._activeEncoding](v);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=v,!0}explainEvents(v){return{down:!!(1&v),up:!!(2&v),drag:!!(4&v),move:!!(8&v),wheel:!!(16&v)}}_equalEvents(v,C,T){if(T){if(v.x!==C.x||v.y!==C.y)return!1}else if(v.col!==C.col||v.row!==C.row)return!1;return v.button===C.button&&v.action===C.action&&v.ctrl===C.ctrl&&v.alt===C.alt&&v.shift===C.shift}};r.CoreMouseService=f=g([y(0,u.IBufferService),y(1,u.ICoreService)],f)},6975:function(b,r,o){var g=this&&this.__decorate||function(f,v,C,T){var E,A=arguments.length,D=A<3?v:T===null?T=Object.getOwnPropertyDescriptor(v,C):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,v,C,T);else for(var R=f.length-1;R>=0;R--)(E=f[R])&&(D=(A<3?E(D):A>3?E(v,C,D):E(v,C))||D);return A>3&&D&&Object.defineProperty(v,C,D),D},y=this&&this.__param||function(f,v){return function(C,T){v(C,T,f)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreService=void 0;const u=o(1439),p=o(8460),S=o(844),N=o(2585),_=Object.freeze({insertMode:!1}),l=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let m=r.CoreService=class extends S.Disposable{constructor(f,v,C){super(),this._bufferService=f,this._logService=v,this._optionsService=C,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(_),this.decPrivateModes=(0,u.clone)(l)}reset(){this.modes=(0,u.clone)(_),this.decPrivateModes=(0,u.clone)(l)}triggerDataEvent(f,v=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;v&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),v&&this._onUserInput.fire(),this._logService.debug(`sending data "${f}"`,()=>f.split("").map(T=>T.charCodeAt(0))),this._onData.fire(f)}triggerBinaryEvent(f){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${f}"`,()=>f.split("").map(v=>v.charCodeAt(0))),this._onBinary.fire(f))}};r.CoreService=m=g([y(0,N.IBufferService),y(1,N.ILogService),y(2,N.IOptionsService)],m)},9074:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DecorationService=void 0;const g=o(8055),y=o(8460),u=o(844),p=o(6106);let S=0,N=0;class _ extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList(f=>f==null?void 0:f.marker.line),this._onDecorationRegistered=this.register(new y.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new y.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)(()=>this.reset()))}registerDecoration(f){if(f.marker.isDisposed)return;const v=new l(f);if(v){const C=v.marker.onDispose(()=>v.dispose());v.onDispose(()=>{v&&(this._decorations.delete(v)&&this._onDecorationRemoved.fire(v),C.dispose())}),this._decorations.insert(v),this._onDecorationRegistered.fire(v)}return v}reset(){for(const f of this._decorations.values())f.dispose();this._decorations.clear()}*getDecorationsAtCell(f,v,C){let T=0,E=0;for(const A of this._decorations.getKeyIterator(v))T=A.options.x??0,E=T+(A.options.width??1),f>=T&&f<E&&(!C||(A.options.layer??"bottom")===C)&&(yield A)}forEachDecorationAtCell(f,v,C,T){this._decorations.forEachByKey(v,E=>{S=E.options.x??0,N=S+(E.options.width??1),f>=S&&f<N&&(!C||(E.options.layer??"bottom")===C)&&T(E)})}}r.DecorationService=_;class l extends u.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=g.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=g.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(f){super(),this.options=f,this.onRenderEmitter=this.register(new y.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new y.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=f.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.InstantiationService=r.ServiceCollection=void 0;const g=o(2585),y=o(8343);class u{constructor(...S){this._entries=new Map;for(const[N,_]of S)this.set(N,_)}set(S,N){const _=this._entries.get(S);return this._entries.set(S,N),_}forEach(S){for(const[N,_]of this._entries.entries())S(N,_)}has(S){return this._entries.has(S)}get(S){return this._entries.get(S)}}r.ServiceCollection=u,r.InstantiationService=class{constructor(){this._services=new u,this._services.set(g.IInstantiationService,this)}setService(p,S){this._services.set(p,S)}getService(p){return this._services.get(p)}createInstance(p,...S){const N=(0,y.getServiceDependencies)(p).sort((m,f)=>m.index-f.index),_=[];for(const m of N){const f=this._services.get(m.id);if(!f)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${m.id}.`);_.push(f)}const l=N.length>0?N[0].index:S.length;if(S.length!==l)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${l+1} conflicts with ${S.length} static arguments`);return new p(...S,..._)}}},7866:function(b,r,o){var g=this&&this.__decorate||function(l,m,f,v){var C,T=arguments.length,E=T<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,f):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(l,m,f,v);else for(var A=l.length-1;A>=0;A--)(C=l[A])&&(E=(T<3?C(E):T>3?C(m,f,E):C(m,f))||E);return T>3&&E&&Object.defineProperty(m,f,E),E},y=this&&this.__param||function(l,m){return function(f,v){m(f,v,l)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;const u=o(844),p=o(2585),S={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let N,_=r.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(l){super(),this._optionsService=l,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),N=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(l){for(let m=0;m<l.length;m++)typeof l[m]=="function"&&(l[m]=l[m]())}_log(l,m,f){this._evalLazyOptionalParams(f),l.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+m,...f)}trace(l,...m){var f;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.trace.bind(this._optionsService.options.logger))??console.log,l,m)}debug(l,...m){var f;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.debug.bind(this._optionsService.options.logger))??console.log,l,m)}info(l,...m){var f;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.info.bind(this._optionsService.options.logger))??console.info,l,m)}warn(l,...m){var f;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.warn.bind(this._optionsService.options.logger))??console.warn,l,m)}error(l,...m){var f;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.error.bind(this._optionsService.options.logger))??console.error,l,m)}};r.LogService=_=g([y(0,p.IOptionsService)],_),r.setTraceLogger=function(l){N=l},r.traceCall=function(l,m,f){if(typeof f.value!="function")throw new Error("not supported");const v=f.value;f.value=function(...C){if(N.logLevel!==p.LogLevelEnum.TRACE)return v.apply(this,C);N.trace(`GlyphRenderer#${v.name}(${C.map(E=>JSON.stringify(E)).join(", ")})`);const T=v.apply(this,C);return N.trace(`GlyphRenderer#${v.name} return`,T),T}}},7302:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OptionsService=r.DEFAULT_OPTIONS=void 0;const g=o(8460),y=o(844),u=o(6114);r.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:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class S extends y.Disposable{constructor(_){super(),this._onOptionChange=this.register(new g.EventEmitter),this.onOptionChange=this._onOptionChange.event;const l={...r.DEFAULT_OPTIONS};for(const m in _)if(m in l)try{const f=_[m];l[m]=this._sanitizeAndValidateOption(m,f)}catch(f){console.error(f)}this.rawOptions=l,this.options={...l},this._setupOptions(),this.register((0,y.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(_,l){return this.onOptionChange(m=>{m===_&&l(this.rawOptions[_])})}onMultipleOptionChange(_,l){return this.onOptionChange(m=>{_.indexOf(m)!==-1&&l()})}_setupOptions(){const _=m=>{if(!(m in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);return this.rawOptions[m]},l=(m,f)=>{if(!(m in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);f=this._sanitizeAndValidateOption(m,f),this.rawOptions[m]!==f&&(this.rawOptions[m]=f,this._onOptionChange.fire(m))};for(const m in this.rawOptions){const f={get:_.bind(this,m),set:l.bind(this,m)};Object.defineProperty(this.options,m,f)}}_sanitizeAndValidateOption(_,l){switch(_){case"cursorStyle":if(l||(l=r.DEFAULT_OPTIONS[_]),!function(m){return m==="block"||m==="underline"||m==="bar"}(l))throw new Error(`"${l}" is not a valid value for ${_}`);break;case"wordSeparator":l||(l=r.DEFAULT_OPTIONS[_]);break;case"fontWeight":case"fontWeightBold":if(typeof l=="number"&&1<=l&&l<=1e3)break;l=p.includes(l)?l:r.DEFAULT_OPTIONS[_];break;case"cursorWidth":l=Math.floor(l);case"lineHeight":case"tabStopWidth":if(l<1)throw new Error(`${_} cannot be less than 1, value: ${l}`);break;case"minimumContrastRatio":l=Math.max(1,Math.min(21,Math.round(10*l)/10));break;case"scrollback":if((l=Math.min(l,4294967295))<0)throw new Error(`${_} cannot be less than 0, value: ${l}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(l<=0)throw new Error(`${_} cannot be less than or equal to 0, value: ${l}`);break;case"rows":case"cols":if(!l&&l!==0)throw new Error(`${_} must be numeric, value: ${l}`);break;case"windowsPty":l=l??{}}return l}}r.OptionsService=S},2660:function(b,r,o){var g=this&&this.__decorate||function(S,N,_,l){var m,f=arguments.length,v=f<3?N:l===null?l=Object.getOwnPropertyDescriptor(N,_):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(S,N,_,l);else for(var C=S.length-1;C>=0;C--)(m=S[C])&&(v=(f<3?m(v):f>3?m(N,_,v):m(N,_))||v);return f>3&&v&&Object.defineProperty(N,_,v),v},y=this&&this.__param||function(S,N){return function(_,l){N(_,l,S)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkService=void 0;const u=o(2585);let p=r.OscLinkService=class{constructor(S){this._bufferService=S,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(S){const N=this._bufferService.buffer;if(S.id===void 0){const C=N.addMarker(N.ybase+N.y),T={data:S,id:this._nextId++,lines:[C]};return C.onDispose(()=>this._removeMarkerFromLink(T,C)),this._dataByLinkId.set(T.id,T),T.id}const _=S,l=this._getEntryIdKey(_),m=this._entriesWithId.get(l);if(m)return this.addLineToLink(m.id,N.ybase+N.y),m.id;const f=N.addMarker(N.ybase+N.y),v={id:this._nextId++,key:this._getEntryIdKey(_),data:_,lines:[f]};return f.onDispose(()=>this._removeMarkerFromLink(v,f)),this._entriesWithId.set(v.key,v),this._dataByLinkId.set(v.id,v),v.id}addLineToLink(S,N){const _=this._dataByLinkId.get(S);if(_&&_.lines.every(l=>l.line!==N)){const l=this._bufferService.buffer.addMarker(N);_.lines.push(l),l.onDispose(()=>this._removeMarkerFromLink(_,l))}}getLinkData(S){var N;return(N=this._dataByLinkId.get(S))==null?void 0:N.data}_getEntryIdKey(S){return`${S.id};;${S.uri}`}_removeMarkerFromLink(S,N){const _=S.lines.indexOf(N);_!==-1&&(S.lines.splice(_,1),S.lines.length===0&&(S.data.id!==void 0&&this._entriesWithId.delete(S.key),this._dataByLinkId.delete(S.id)))}};r.OscLinkService=p=g([y(0,u.IBufferService)],p)},8343:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createDecorator=r.getServiceDependencies=r.serviceRegistry=void 0;const o="di$target",g="di$dependencies";r.serviceRegistry=new Map,r.getServiceDependencies=function(y){return y[g]||[]},r.createDecorator=function(y){if(r.serviceRegistry.has(y))return r.serviceRegistry.get(y);const u=function(p,S,N){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(_,l,m){l[o]===l?l[g].push({id:_,index:m}):(l[g]=[{id:_,index:m}],l[o]=l)})(u,p,N)};return u.toString=()=>y,r.serviceRegistry.set(y,u),u}},2585:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IDecorationService=r.IUnicodeService=r.IOscLinkService=r.IOptionsService=r.ILogService=r.LogLevelEnum=r.IInstantiationService=r.ICharsetService=r.ICoreService=r.ICoreMouseService=r.IBufferService=void 0;const g=o(8343);var y;r.IBufferService=(0,g.createDecorator)("BufferService"),r.ICoreMouseService=(0,g.createDecorator)("CoreMouseService"),r.ICoreService=(0,g.createDecorator)("CoreService"),r.ICharsetService=(0,g.createDecorator)("CharsetService"),r.IInstantiationService=(0,g.createDecorator)("InstantiationService"),function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"}(y||(r.LogLevelEnum=y={})),r.ILogService=(0,g.createDecorator)("LogService"),r.IOptionsService=(0,g.createDecorator)("OptionsService"),r.IOscLinkService=(0,g.createDecorator)("OscLinkService"),r.IUnicodeService=(0,g.createDecorator)("UnicodeService"),r.IDecorationService=(0,g.createDecorator)("DecorationService")},1480:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeService=void 0;const g=o(8460),y=o(225);class u{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,N,_=!1){return(16777215&S)<<3|(3&N)<<1|(_?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new g.EventEmitter,this.onChange=this._onChange.event;const S=new y.UnicodeV6;this.register(S),this._active=S.version,this._activeProvider=S}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(S){if(!this._providers[S])throw new Error(`unknown Unicode version "${S}"`);this._active=S,this._activeProvider=this._providers[S],this._onChange.fire(S)}register(S){this._providers[S.version]=S}wcwidth(S){return this._activeProvider.wcwidth(S)}getStringCellWidth(S){let N=0,_=0;const l=S.length;for(let m=0;m<l;++m){let f=S.charCodeAt(m);if(55296<=f&&f<=56319){if(++m>=l)return N+this.wcwidth(f);const T=S.charCodeAt(m);56320<=T&&T<=57343?f=1024*(f-55296)+T-56320+65536:N+=this.wcwidth(T)}const v=this.charProperties(f,_);let C=u.extractWidth(v);u.extractShouldJoin(v)&&(C-=u.extractWidth(_)),N+=C,_=v}return N}charProperties(S,N){return this._activeProvider.charProperties(S,N)}}r.UnicodeService=u}},w={};function j(b){var r=w[b];if(r!==void 0)return r.exports;var o=w[b]={exports:{}};return d[b].call(o.exports,o,o.exports,j),o.exports}var L={};return(()=>{var b=L;Object.defineProperty(b,"__esModule",{value:!0}),b.Terminal=void 0;const r=j(9042),o=j(3236),g=j(844),y=j(5741),u=j(8285),p=j(7975),S=j(7090),N=["cols","rows"];class _ extends g.Disposable{constructor(m){super(),this._core=this.register(new o.Terminal(m)),this._addonManager=this.register(new y.AddonManager),this._publicOptions={...this._core.options};const f=C=>this._core.options[C],v=(C,T)=>{this._checkReadonlyOptions(C),this._core.options[C]=T};for(const C in this._core.options){const T={get:f.bind(this,C),set:v.bind(this,C)};Object.defineProperty(this._publicOptions,C,T)}}_checkReadonlyOptions(m){if(N.includes(m))throw new Error(`Option "${m}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new S.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 u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const m=this._core.coreService.decPrivateModes;let f="none";switch(this._core.coreMouseService.activeProtocol){case"X10":f="x10";break;case"VT200":f="vt200";break;case"DRAG":f="drag";break;case"ANY":f="any"}return{applicationCursorKeysMode:m.applicationCursorKeys,applicationKeypadMode:m.applicationKeypad,bracketedPasteMode:m.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:f,originMode:m.origin,reverseWraparoundMode:m.reverseWraparound,sendFocusMode:m.sendFocus,wraparoundMode:m.wraparound}}get options(){return this._publicOptions}set options(m){for(const f in m)this._publicOptions[f]=m[f]}blur(){this._core.blur()}focus(){this._core.focus()}input(m,f=!0){this._core.input(m,f)}resize(m,f){this._verifyIntegers(m,f),this._core.resize(m,f)}open(m){this._core.open(m)}attachCustomKeyEventHandler(m){this._core.attachCustomKeyEventHandler(m)}attachCustomWheelEventHandler(m){this._core.attachCustomWheelEventHandler(m)}registerLinkProvider(m){return this._core.registerLinkProvider(m)}registerCharacterJoiner(m){return this._checkProposedApi(),this._core.registerCharacterJoiner(m)}deregisterCharacterJoiner(m){this._checkProposedApi(),this._core.deregisterCharacterJoiner(m)}registerMarker(m=0){return this._verifyIntegers(m),this._core.registerMarker(m)}registerDecoration(m){return this._checkProposedApi(),this._verifyPositiveIntegers(m.x??0,m.width??0,m.height??0),this._core.registerDecoration(m)}hasSelection(){return this._core.hasSelection()}select(m,f,v){this._verifyIntegers(m,f,v),this._core.select(m,f,v)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(m,f){this._verifyIntegers(m,f),this._core.selectLines(m,f)}dispose(){super.dispose()}scrollLines(m){this._verifyIntegers(m),this._core.scrollLines(m)}scrollPages(m){this._verifyIntegers(m),this._core.scrollPages(m)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(m){this._verifyIntegers(m),this._core.scrollToLine(m)}clear(){this._core.clear()}write(m,f){this._core.write(m,f)}writeln(m,f){this._core.write(m),this._core.write(`\r
214
+ `,f)}paste(m){this._core.paste(m)}refresh(m,f){this._verifyIntegers(m,f),this._core.refresh(m,f)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(m){this._addonManager.loadAddon(this,m)}static get strings(){return r}_verifyIntegers(...m){for(const f of m)if(f===1/0||isNaN(f)||f%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...m){for(const f of m)if(f&&(f===1/0||isNaN(f)||f%1!=0||f<0))throw new Error("This API only accepts positive integers")}}b.Terminal=_})(),L})())})(x1);var VM=x1.exports,N1={exports:{}};(function(c,a){(function(d,w){c.exports=w()})(self,()=>(()=>{var d={965:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.GlyphRenderer=void 0;const g=o(374),y=o(509),u=o(855),p=o(859),S=o(381),N=11,_=N*Float32Array.BYTES_PER_ELEMENT;let l,m=0,f=0,v=0;class C extends p.Disposable{constructor(E,A,D,R){super(),this._terminal=E,this._gl=A,this._dimensions=D,this._optionsService=R,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const M=this._gl;y.TextureAtlas.maxAtlasPages===void 0&&(y.TextureAtlas.maxAtlasPages=Math.min(32,(0,g.throwIfFalsy)(M.getParameter(M.MAX_TEXTURE_IMAGE_UNITS))),y.TextureAtlas.maxTextureSize=(0,g.throwIfFalsy)(M.getParameter(M.MAX_TEXTURE_SIZE))),this._program=(0,g.throwIfFalsy)((0,S.createProgram)(M,`#version 300 es
215
+ layout (location = 0) in vec2 a_unitquad;
216
+ layout (location = 1) in vec2 a_cellpos;
217
+ layout (location = 2) in vec2 a_offset;
218
+ layout (location = 3) in vec2 a_size;
219
+ layout (location = 4) in float a_texpage;
220
+ layout (location = 5) in vec2 a_texcoord;
221
+ layout (location = 6) in vec2 a_texsize;
222
+
223
+ uniform mat4 u_projection;
224
+ uniform vec2 u_resolution;
225
+
226
+ out vec2 v_texcoord;
227
+ flat out int v_texpage;
228
+
229
+ void main() {
230
+ vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
231
+ gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
232
+ v_texpage = int(a_texpage);
233
+ v_texcoord = a_texcoord + a_unitquad * a_texsize;
234
+ }`,function(Z){let ee="";for(let oe=1;oe<Z;oe++)ee+=` else if (v_texpage == ${oe}) { outColor = texture(u_texture[${oe}], v_texcoord); }`;return`#version 300 es
235
+ precision lowp float;
236
+
237
+ in vec2 v_texcoord;
238
+ flat in int v_texpage;
239
+
240
+ uniform sampler2D u_texture[${Z}];
241
+
242
+ out vec4 outColor;
243
+
244
+ void main() {
245
+ if (v_texpage == 0) {
246
+ outColor = texture(u_texture[0], v_texcoord);
247
+ } ${ee}
248
+ }`}(y.TextureAtlas.maxAtlasPages))),this.register((0,p.toDisposable)(()=>M.deleteProgram(this._program))),this._projectionLocation=(0,g.throwIfFalsy)(M.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,g.throwIfFalsy)(M.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,g.throwIfFalsy)(M.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=M.createVertexArray(),M.bindVertexArray(this._vertexArrayObject);const $=new Float32Array([0,0,1,0,0,1,1,1]),O=M.createBuffer();this.register((0,p.toDisposable)(()=>M.deleteBuffer(O))),M.bindBuffer(M.ARRAY_BUFFER,O),M.bufferData(M.ARRAY_BUFFER,$,M.STATIC_DRAW),M.enableVertexAttribArray(0),M.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const I=new Uint8Array([0,1,2,3]),Y=M.createBuffer();this.register((0,p.toDisposable)(()=>M.deleteBuffer(Y))),M.bindBuffer(M.ELEMENT_ARRAY_BUFFER,Y),M.bufferData(M.ELEMENT_ARRAY_BUFFER,I,M.STATIC_DRAW),this._attributesBuffer=(0,g.throwIfFalsy)(M.createBuffer()),this.register((0,p.toDisposable)(()=>M.deleteBuffer(this._attributesBuffer))),M.bindBuffer(M.ARRAY_BUFFER,this._attributesBuffer),M.enableVertexAttribArray(2),M.vertexAttribPointer(2,2,M.FLOAT,!1,_,0),M.vertexAttribDivisor(2,1),M.enableVertexAttribArray(3),M.vertexAttribPointer(3,2,M.FLOAT,!1,_,2*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(3,1),M.enableVertexAttribArray(4),M.vertexAttribPointer(4,1,M.FLOAT,!1,_,4*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(4,1),M.enableVertexAttribArray(5),M.vertexAttribPointer(5,2,M.FLOAT,!1,_,5*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(5,1),M.enableVertexAttribArray(6),M.vertexAttribPointer(6,2,M.FLOAT,!1,_,7*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(6,1),M.enableVertexAttribArray(1),M.vertexAttribPointer(1,2,M.FLOAT,!1,_,9*Float32Array.BYTES_PER_ELEMENT),M.vertexAttribDivisor(1,1),M.useProgram(this._program);const Q=new Int32Array(y.TextureAtlas.maxAtlasPages);for(let Z=0;Z<y.TextureAtlas.maxAtlasPages;Z++)Q[Z]=Z;M.uniform1iv(this._textureLocation,Q),M.uniformMatrix4fv(this._projectionLocation,!1,S.PROJECTION_MATRIX),this._atlasTextures=[];for(let Z=0;Z<y.TextureAtlas.maxAtlasPages;Z++){const ee=new S.GLTexture((0,g.throwIfFalsy)(M.createTexture()));this.register((0,p.toDisposable)(()=>M.deleteTexture(ee.texture))),M.activeTexture(M.TEXTURE0+Z),M.bindTexture(M.TEXTURE_2D,ee.texture),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_S,M.CLAMP_TO_EDGE),M.texParameteri(M.TEXTURE_2D,M.TEXTURE_WRAP_T,M.CLAMP_TO_EDGE),M.texImage2D(M.TEXTURE_2D,0,M.RGBA,1,1,0,M.RGBA,M.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[Z]=ee}M.enable(M.BLEND),M.blendFunc(M.SRC_ALPHA,M.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(E,A,D,R,M,$,O,I,Y){this._updateCell(this._vertices.attributes,E,A,D,R,M,$,O,I,Y)}_updateCell(E,A,D,R,M,$,O,I,Y,Q){m=(D*this._terminal.cols+A)*N,R!==u.NULL_CELL_CODE&&R!==void 0?this._atlas&&(l=I&&I.length>1?this._atlas.getRasterizedGlyphCombinedChar(I,M,$,O,!1):this._atlas.getRasterizedGlyph(R,M,$,O,!1),f=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),M!==Q&&l.offset.x>f?(v=l.offset.x-f,E[m]=-(l.offset.x-v)+this._dimensions.device.char.left,E[m+1]=-l.offset.y+this._dimensions.device.char.top,E[m+2]=(l.size.x-v)/this._dimensions.device.canvas.width,E[m+3]=l.size.y/this._dimensions.device.canvas.height,E[m+4]=l.texturePage,E[m+5]=l.texturePositionClipSpace.x+v/this._atlas.pages[l.texturePage].canvas.width,E[m+6]=l.texturePositionClipSpace.y,E[m+7]=l.sizeClipSpace.x-v/this._atlas.pages[l.texturePage].canvas.width,E[m+8]=l.sizeClipSpace.y):(E[m]=-l.offset.x+this._dimensions.device.char.left,E[m+1]=-l.offset.y+this._dimensions.device.char.top,E[m+2]=l.size.x/this._dimensions.device.canvas.width,E[m+3]=l.size.y/this._dimensions.device.canvas.height,E[m+4]=l.texturePage,E[m+5]=l.texturePositionClipSpace.x,E[m+6]=l.texturePositionClipSpace.y,E[m+7]=l.sizeClipSpace.x,E[m+8]=l.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,g.allowRescaling)(R,Y,l.size.x,this._dimensions.device.cell.width)&&(E[m+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):E.fill(0,m,m+N-1-2)}clear(){const E=this._terminal,A=E.cols*E.rows*N;this._vertices.count!==A?this._vertices.attributes=new Float32Array(A):this._vertices.attributes.fill(0);let D=0;for(;D<this._vertices.attributesBuffers.length;D++)this._vertices.count!==A?this._vertices.attributesBuffers[D]=new Float32Array(A):this._vertices.attributesBuffers[D].fill(0);this._vertices.count=A,D=0;for(let R=0;R<E.rows;R++)for(let M=0;M<E.cols;M++)this._vertices.attributes[D+9]=M/E.cols,this._vertices.attributes[D+10]=R/E.rows,D+=N}handleResize(){const E=this._gl;E.useProgram(this._program),E.viewport(0,0,E.canvas.width,E.canvas.height),E.uniform2f(this._resolutionLocation,E.canvas.width,E.canvas.height),this.clear()}render(E){if(!this._atlas)return;const A=this._gl;A.useProgram(this._program),A.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const D=this._vertices.attributesBuffers[this._activeBuffer];let R=0;for(let M=0;M<E.lineLengths.length;M++){const $=M*this._terminal.cols*N,O=this._vertices.attributes.subarray($,$+E.lineLengths[M]*N);D.set(O,R),R+=O.length}A.bindBuffer(A.ARRAY_BUFFER,this._attributesBuffer),A.bufferData(A.ARRAY_BUFFER,D.subarray(0,R),A.STREAM_DRAW);for(let M=0;M<this._atlas.pages.length;M++)this._atlas.pages[M].version!==this._atlasTextures[M].version&&this._bindAtlasPageTexture(A,this._atlas,M);A.drawElementsInstanced(A.TRIANGLE_STRIP,4,A.UNSIGNED_BYTE,0,R/N)}setAtlas(E){this._atlas=E;for(const A of this._atlasTextures)A.version=-1}_bindAtlasPageTexture(E,A,D){E.activeTexture(E.TEXTURE0+D),E.bindTexture(E.TEXTURE_2D,this._atlasTextures[D].texture),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_S,E.CLAMP_TO_EDGE),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_T,E.CLAMP_TO_EDGE),E.texImage2D(E.TEXTURE_2D,0,E.RGBA,E.RGBA,E.UNSIGNED_BYTE,A.pages[D].canvas),E.generateMipmap(E.TEXTURE_2D),this._atlasTextures[D].version=A.pages[D].version}setDimensions(E){this._dimensions=E}}r.GlyphRenderer=C},742:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RectangleRenderer=void 0;const g=o(374),y=o(859),u=o(310),p=o(381),S=8*Float32Array.BYTES_PER_ELEMENT;class N{constructor(){this.attributes=new Float32Array(160),this.count=0}}let _=0,l=0,m=0,f=0,v=0,C=0,T=0;class E extends y.Disposable{constructor(D,R,M,$){super(),this._terminal=D,this._gl=R,this._dimensions=M,this._themeService=$,this._vertices=new N,this._verticesCursor=new N;const O=this._gl;this._program=(0,g.throwIfFalsy)((0,p.createProgram)(O,`#version 300 es
249
+ layout (location = 0) in vec2 a_position;
250
+ layout (location = 1) in vec2 a_size;
251
+ layout (location = 2) in vec4 a_color;
252
+ layout (location = 3) in vec2 a_unitquad;
253
+
254
+ uniform mat4 u_projection;
255
+
256
+ out vec4 v_color;
257
+
258
+ void main() {
259
+ vec2 zeroToOne = a_position + (a_unitquad * a_size);
260
+ gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
261
+ v_color = a_color;
262
+ }`,`#version 300 es
263
+ precision lowp float;
264
+
265
+ in vec4 v_color;
266
+
267
+ out vec4 outColor;
268
+
269
+ void main() {
270
+ outColor = v_color;
271
+ }`)),this.register((0,y.toDisposable)(()=>O.deleteProgram(this._program))),this._projectionLocation=(0,g.throwIfFalsy)(O.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=O.createVertexArray(),O.bindVertexArray(this._vertexArrayObject);const I=new Float32Array([0,0,1,0,0,1,1,1]),Y=O.createBuffer();this.register((0,y.toDisposable)(()=>O.deleteBuffer(Y))),O.bindBuffer(O.ARRAY_BUFFER,Y),O.bufferData(O.ARRAY_BUFFER,I,O.STATIC_DRAW),O.enableVertexAttribArray(3),O.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const Q=new Uint8Array([0,1,2,3]),Z=O.createBuffer();this.register((0,y.toDisposable)(()=>O.deleteBuffer(Z))),O.bindBuffer(O.ELEMENT_ARRAY_BUFFER,Z),O.bufferData(O.ELEMENT_ARRAY_BUFFER,Q,O.STATIC_DRAW),this._attributesBuffer=(0,g.throwIfFalsy)(O.createBuffer()),this.register((0,y.toDisposable)(()=>O.deleteBuffer(this._attributesBuffer))),O.bindBuffer(O.ARRAY_BUFFER,this._attributesBuffer),O.enableVertexAttribArray(0),O.vertexAttribPointer(0,2,O.FLOAT,!1,S,0),O.vertexAttribDivisor(0,1),O.enableVertexAttribArray(1),O.vertexAttribPointer(1,2,O.FLOAT,!1,S,2*Float32Array.BYTES_PER_ELEMENT),O.vertexAttribDivisor(1,1),O.enableVertexAttribArray(2),O.vertexAttribPointer(2,4,O.FLOAT,!1,S,4*Float32Array.BYTES_PER_ELEMENT),O.vertexAttribDivisor(2,1),this._updateCachedColors($.colors),this.register(this._themeService.onChangeColors(ee=>{this._updateCachedColors(ee),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(D){const R=this._gl;R.useProgram(this._program),R.bindVertexArray(this._vertexArrayObject),R.uniformMatrix4fv(this._projectionLocation,!1,p.PROJECTION_MATRIX),R.bindBuffer(R.ARRAY_BUFFER,this._attributesBuffer),R.bufferData(R.ARRAY_BUFFER,D.attributes,R.DYNAMIC_DRAW),R.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,R.UNSIGNED_BYTE,0,D.count)}handleResize(){this._updateViewportRectangle()}setDimensions(D){this._dimensions=D}_updateCachedColors(D){this._bgFloat=this._colorToFloat32Array(D.background),this._cursorFloat=this._colorToFloat32Array(D.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(D){const R=this._terminal,M=this._vertices;let $,O,I,Y,Q,Z,ee,oe,P,W,V,J=1;for($=0;$<R.rows;$++){for(I=-1,Y=0,Q=0,Z=!1,O=0;O<R.cols;O++)ee=($*R.cols+O)*u.RENDER_MODEL_INDICIES_PER_CELL,oe=D.cells[ee+u.RENDER_MODEL_BG_OFFSET],P=D.cells[ee+u.RENDER_MODEL_FG_OFFSET],W=!!(67108864&P),(oe!==Y||P!==Q&&(Z||W))&&((Y!==0||Z&&Q!==0)&&(V=8*J++,this._updateRectangle(M,V,Q,Y,I,O,$)),I=O,Y=oe,Q=P,Z=W);(Y!==0||Z&&Q!==0)&&(V=8*J++,this._updateRectangle(M,V,Q,Y,I,R.cols,$))}M.count=J}updateCursor(D){const R=this._verticesCursor,M=D.cursor;if(!M||M.style==="block")return void(R.count=0);let $,O=0;M.style!=="bar"&&M.style!=="outline"||($=8*O++,this._addRectangleFloat(R.attributes,$,M.x*this._dimensions.device.cell.width,M.y*this._dimensions.device.cell.height,M.style==="bar"?M.dpr*M.cursorWidth:M.dpr,this._dimensions.device.cell.height,this._cursorFloat)),M.style!=="underline"&&M.style!=="outline"||($=8*O++,this._addRectangleFloat(R.attributes,$,M.x*this._dimensions.device.cell.width,(M.y+1)*this._dimensions.device.cell.height-M.dpr,M.width*this._dimensions.device.cell.width,M.dpr,this._cursorFloat)),M.style==="outline"&&($=8*O++,this._addRectangleFloat(R.attributes,$,M.x*this._dimensions.device.cell.width,M.y*this._dimensions.device.cell.height,M.width*this._dimensions.device.cell.width,M.dpr,this._cursorFloat),$=8*O++,this._addRectangleFloat(R.attributes,$,(M.x+M.width)*this._dimensions.device.cell.width-M.dpr,M.y*this._dimensions.device.cell.height,M.dpr,this._dimensions.device.cell.height,this._cursorFloat)),R.count=O}_updateRectangle(D,R,M,$,O,I,Y){if(67108864&M)switch(50331648&M){case 16777216:case 33554432:_=this._themeService.colors.ansi[255&M].rgba;break;case 50331648:_=(16777215&M)<<8;break;default:_=this._themeService.colors.foreground.rgba}else switch(50331648&$){case 16777216:case 33554432:_=this._themeService.colors.ansi[255&$].rgba;break;case 50331648:_=(16777215&$)<<8;break;default:_=this._themeService.colors.background.rgba}D.attributes.length<R+4&&(D.attributes=(0,p.expandFloat32Array)(D.attributes,this._terminal.rows*this._terminal.cols*8)),l=O*this._dimensions.device.cell.width,m=Y*this._dimensions.device.cell.height,f=(_>>24&255)/255,v=(_>>16&255)/255,C=(_>>8&255)/255,T=1,this._addRectangle(D.attributes,R,l,m,(I-O)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,f,v,C,T)}_addRectangle(D,R,M,$,O,I,Y,Q,Z,ee){D[R]=M/this._dimensions.device.canvas.width,D[R+1]=$/this._dimensions.device.canvas.height,D[R+2]=O/this._dimensions.device.canvas.width,D[R+3]=I/this._dimensions.device.canvas.height,D[R+4]=Y,D[R+5]=Q,D[R+6]=Z,D[R+7]=ee}_addRectangleFloat(D,R,M,$,O,I,Y){D[R]=M/this._dimensions.device.canvas.width,D[R+1]=$/this._dimensions.device.canvas.height,D[R+2]=O/this._dimensions.device.canvas.width,D[R+3]=I/this._dimensions.device.canvas.height,D[R+4]=Y[0],D[R+5]=Y[1],D[R+6]=Y[2],D[R+7]=Y[3]}_colorToFloat32Array(D){return new Float32Array([(D.rgba>>24&255)/255,(D.rgba>>16&255)/255,(D.rgba>>8&255)/255,(255&D.rgba)/255])}}r.RectangleRenderer=E},310:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RenderModel=r.COMBINED_CHAR_BIT_MASK=r.RENDER_MODEL_EXT_OFFSET=r.RENDER_MODEL_FG_OFFSET=r.RENDER_MODEL_BG_OFFSET=r.RENDER_MODEL_INDICIES_PER_CELL=void 0;const g=o(296);r.RENDER_MODEL_INDICIES_PER_CELL=4,r.RENDER_MODEL_BG_OFFSET=1,r.RENDER_MODEL_FG_OFFSET=2,r.RENDER_MODEL_EXT_OFFSET=3,r.COMBINED_CHAR_BIT_MASK=2147483648,r.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,g.createSelectionRenderModel)()}resize(y,u){const p=y*u*r.RENDER_MODEL_INDICIES_PER_CELL;p!==this.cells.length&&(this.cells=new Uint32Array(p),this.lineLengths=new Uint32Array(u))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.JoinedCellData=r.WebglRenderer=void 0;const g=o(820),y=o(274),u=o(627),p=o(457),S=o(56),N=o(374),_=o(345),l=o(859),m=o(147),f=o(782),v=o(855),C=o(965),T=o(742),E=o(310),A=o(733);class D extends l.Disposable{constructor(O,I,Y,Q,Z,ee,oe,P,W){super(),this._terminal=O,this._characterJoinerService=I,this._charSizeService=Y,this._coreBrowserService=Q,this._coreService=Z,this._decorationService=ee,this._optionsService=oe,this._themeService=P,this._cursorBlinkStateManager=new l.MutableDisposable,this._charAtlasDisposable=this.register(new l.MutableDisposable),this._observerDisposable=this.register(new l.MutableDisposable),this._model=new E.RenderModel,this._workCell=new f.CellData,this._workCell2=new f.CellData,this._rectangleRenderer=this.register(new l.MutableDisposable),this._glyphRenderer=this.register(new l.MutableDisposable),this._onChangeTextureAtlas=this.register(new _.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new _.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new _.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new _.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new _.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new y.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new A.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,oe,this._themeService)],this.dimensions=(0,N.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(oe.onOptionChange(()=>this._handleOptionsChanged())),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const V={antialias:!1,depth:!1,preserveDrawingBuffer:W};if(this._gl=this._canvas.getContext("webgl2",V),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,g.addDisposableDomListener)(this._canvas,"webglcontextlost",J=>{console.log("webglcontextlost event received"),J.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(J)},3e3)})),this.register((0,g.addDisposableDomListener)(this._canvas,"webglcontextrestored",J=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,u.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=(0,S.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(J,_e)=>this._setCanvasDevicePixelDimensions(J,_e)),this.register(this._coreBrowserService.onWindowChange(J=>{this._observerDisposable.value=(0,S.observeDevicePixelDimensions)(this._canvas,J,(_e,be)=>this._setCanvasDevicePixelDimensions(_e,be))})),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,l.toDisposable)(()=>{var J;for(const _e of this._renderLayers)_e.dispose();(J=this._canvas.parentElement)==null||J.removeChild(this._canvas),(0,u.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){var O;return(O=this._charAtlas)==null?void 0:O.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(O,I){var Y,Q,Z,ee;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const oe of this._renderLayers)oe.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`,(Y=this._rectangleRenderer.value)==null||Y.setDimensions(this.dimensions),(Q=this._rectangleRenderer.value)==null||Q.handleResize(),(Z=this._glyphRenderer.value)==null||Z.setDimensions(this.dimensions),(ee=this._glyphRenderer.value)==null||ee.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var O;for(const I of this._renderLayers)I.handleBlur(this._terminal);(O=this._cursorBlinkStateManager.value)==null||O.pause(),this._requestRedrawViewport()}handleFocus(){var O;for(const I of this._renderLayers)I.handleFocus(this._terminal);(O=this._cursorBlinkStateManager.value)==null||O.resume(),this._requestRedrawViewport()}handleSelectionChanged(O,I,Y){for(const Q of this._renderLayers)Q.handleSelectionChanged(this._terminal,O,I,Y);this._model.selection.update(this._core,O,I,Y),this._requestRedrawViewport()}handleCursorMove(){var O;for(const I of this._renderLayers)I.handleCursorMove(this._terminal);(O=this._cursorBlinkStateManager.value)==null||O.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new T.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new C.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var I;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const O=(0,u.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!==O&&(this._onChangeTextureAtlas.fire(O.pages[0].canvas),this._charAtlasDisposable.value=(0,l.getDisposeArrayDisposable)([(0,_.forwardEvent)(O.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,_.forwardEvent)(O.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=O,this._charAtlas.warmUp(),(I=this._glyphRenderer.value)==null||I.setAtlas(this._charAtlas)}_clearModel(O){var I;this._model.clear(),O&&((I=this._glyphRenderer.value)==null||I.clear())}clearTextureAtlas(){var O;(O=this._charAtlas)==null||O.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var O;this._clearModel(!0);for(const I of this._renderLayers)I.reset(this._terminal);(O=this._cursorBlinkStateManager.value)==null||O.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(O){return-1}deregisterCharacterJoiner(O){return!1}renderRows(O,I){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 Y of this._renderLayers)Y.handleGridChanged(this._terminal,O,I);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(O,I),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 p.CursorBlinkStateManager(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(O,I){const Y=this._core;let Q,Z,ee,oe,P,W,V,J,_e,be,Ve,Le,ie,G,pe=this._workCell;O=M(O,Y.rows-1,0),I=M(I,Y.rows-1,0);const le=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,Be=le-Y.buffer.ydisp,Te=Math.min(this._terminal.buffer.active.cursorX,Y.cols-1);let Xe=-1;const Ke=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let st=!1;for(Z=O;Z<=I;Z++)for(ee=Z+Y.buffer.ydisp,oe=Y.buffer.lines.get(ee),this._model.lineLengths[Z]=0,P=this._characterJoinerService.getJoinedCharacters(ee),ie=0;ie<Y.cols;ie++)if(Q=this._cellColorResolver.result.bg,oe.loadCell(ie,pe),ie===0&&(Q=this._cellColorResolver.result.bg),W=!1,V=ie,P.length>0&&ie===P[0][0]&&(W=!0,J=P.shift(),pe=new R(pe,oe.translateToString(!0,J[0],J[1]),J[1]-J[0]),V=J[1]-1),_e=pe.getChars(),be=pe.getCode(),Le=(Z*Y.cols+ie)*E.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(pe,ie,ee,this.dimensions.device.cell.width),Ke&&ee===le&&(ie===Te&&(this._model.cursor={x:Te,y:Be,width:pe.getWidth(),style:this._coreBrowserService.isFocused?Y.options.cursorStyle||"block":Y.options.cursorInactiveStyle,cursorWidth:Y.options.cursorWidth,dpr:this._devicePixelRatio},Xe=Te+pe.getWidth()-1),ie>=Te&&ie<=Xe&&(this._coreBrowserService.isFocused&&(Y.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&Y.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)),be!==v.NULL_CELL_CODE&&(this._model.lineLengths[Z]=ie+1),(this._model.cells[Le]!==be||this._model.cells[Le+E.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[Le+E.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[Le+E.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(st=!0,_e.length>1&&(be|=E.COMBINED_CHAR_BIT_MASK),this._model.cells[Le]=be,this._model.cells[Le+E.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[Le+E.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[Le+E.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,Ve=pe.getWidth(),this._glyphRenderer.value.updateCell(ie,Z,be,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,_e,Ve,Q),W))for(pe=this._workCell,ie++;ie<V;ie++)G=(Z*Y.cols+ie)*E.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(ie,Z,v.NULL_CELL_CODE,0,0,0,v.NULL_CELL_CHAR,0,0),this._model.cells[G]=v.NULL_CELL_CODE,this._model.cells[G+E.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[G+E.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[G+E.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;st&&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(O,I){this._canvas.width===O&&this._canvas.height===I||(this._canvas.width=O,this._canvas.height=I,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const O=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:O,end:O})}}r.WebglRenderer=D;class R extends m.AttributeData{constructor(O,I,Y){super(),this.content=0,this.combinedData="",this.fg=O.fg,this.bg=O.bg,this.combinedData=I,this._width=Y}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(O){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function M($,O,I=0){return Math.max(Math.min($,O),I)}r.JoinedCellData=R},381:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.GLTexture=r.expandFloat32Array=r.createShader=r.createProgram=r.PROJECTION_MATRIX=void 0;const g=o(374);function y(u,p,S){const N=(0,g.throwIfFalsy)(u.createShader(p));if(u.shaderSource(N,S),u.compileShader(N),u.getShaderParameter(N,u.COMPILE_STATUS))return N;console.error(u.getShaderInfoLog(N)),u.deleteShader(N)}r.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),r.createProgram=function(u,p,S){const N=(0,g.throwIfFalsy)(u.createProgram());if(u.attachShader(N,(0,g.throwIfFalsy)(y(u,u.VERTEX_SHADER,p))),u.attachShader(N,(0,g.throwIfFalsy)(y(u,u.FRAGMENT_SHADER,S))),u.linkProgram(N),u.getProgramParameter(N,u.LINK_STATUS))return N;console.error(u.getProgramInfoLog(N)),u.deleteProgram(N)},r.createShader=y,r.expandFloat32Array=function(u,p){const S=Math.min(2*u.length,p),N=new Float32Array(S);for(let _=0;_<u.length;_++)N[_]=u[_];return N},r.GLTexture=class{constructor(u){this.texture=u,this.version=-1}}},592:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BaseRenderLayer=void 0;const g=o(627),y=o(237),u=o(374),p=o(859);class S extends p.Disposable{constructor(_,l,m,f,v,C,T,E){super(),this._container=l,this._alpha=v,this._coreBrowserService=C,this._optionsService=T,this._themeService=E,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-${m}-layer`),this._canvas.style.zIndex=f.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors(A=>{this._refreshCharAtlas(_,A),this.reset(_)})),this.register((0,p.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,u.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(_){}handleFocus(_){}handleCursorMove(_){}handleGridChanged(_,l,m){}handleSelectionChanged(_,l,m,f=!1){}_setTransparency(_,l){if(l===this._alpha)return;const m=this._canvas;this._alpha=l,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,m),this._refreshCharAtlas(_,this._themeService.colors),this.handleGridChanged(_,0,_.rows-1)}_refreshCharAtlas(_,l){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,g.acquireTextureAtlas)(_,this._optionsService.rawOptions,l,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(_,l){this._deviceCellWidth=l.device.cell.width,this._deviceCellHeight=l.device.cell.height,this._deviceCharWidth=l.device.char.width,this._deviceCharHeight=l.device.char.height,this._deviceCharLeft=l.device.char.left,this._deviceCharTop=l.device.char.top,this._canvas.width=l.device.canvas.width,this._canvas.height=l.device.canvas.height,this._canvas.style.width=`${l.css.canvas.width}px`,this._canvas.style.height=`${l.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(_,this._themeService.colors)}_fillBottomLineAtCells(_,l,m=1){this._ctx.fillRect(_*this._deviceCellWidth,(l+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,m*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(_,l,m,f){this._alpha?this._ctx.clearRect(_*this._deviceCellWidth,l*this._deviceCellHeight,m*this._deviceCellWidth,f*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(_*this._deviceCellWidth,l*this._deviceCellHeight,m*this._deviceCellWidth,f*this._deviceCellHeight))}_fillCharTrueColor(_,l,m,f){this._ctx.font=this._getFont(_,!1,!1),this._ctx.textBaseline=y.TEXT_BASELINE,this._clipCell(m,f,l.getWidth()),this._ctx.fillText(l.getChars(),m*this._deviceCellWidth+this._deviceCharLeft,f*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(_,l,m){this._ctx.beginPath(),this._ctx.rect(_*this._deviceCellWidth,l*this._deviceCellHeight,m*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(_,l,m){return`${m?"italic":""} ${l?_.options.fontWeightBold:_.options.fontWeight} ${_.options.fontSize*this._coreBrowserService.dpr}px ${_.options.fontFamily}`}}r.BaseRenderLayer=S},733:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.LinkRenderLayer=void 0;const g=o(197),y=o(237),u=o(592);class p extends u.BaseRenderLayer{constructor(N,_,l,m,f,v,C){super(l,N,"link",_,!0,f,v,C),this.register(m.onShowLinkUnderline(T=>this._handleShowLinkUnderline(T))),this.register(m.onHideLinkUnderline(T=>this._handleHideLinkUnderline(T)))}resize(N,_){super.resize(N,_),this._state=void 0}reset(N){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const N=this._state.y2-this._state.y1-1;N>0&&this._clearCells(0,this._state.y1+1,this._state.cols,N),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(N){if(N.fg===y.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:N.fg!==void 0&&(0,g.is256Color)(N.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[N.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,N.y1===N.y2)this._fillBottomLineAtCells(N.x1,N.y1,N.x2-N.x1);else{this._fillBottomLineAtCells(N.x1,N.y1,N.cols-N.x1);for(let _=N.y1+1;_<N.y2;_++)this._fillBottomLineAtCells(0,_,N.cols);this._fillBottomLineAtCells(0,N.y2,N.x2)}this._state=N}_handleHideLinkUnderline(N){this._clearCurrentLink()}}r.LinkRenderLayer=p},820:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,g,y,u){o.addEventListener(g,y,u);let p=!1;return{dispose:()=>{p||(p=!0,o.removeEventListener(g,y,u))}}}},274:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellColorResolver=void 0;const g=o(855),y=o(160),u=o(374);let p,S=0,N=0,_=!1,l=!1,m=!1,f=0;r.CellColorResolver=class{constructor(v,C,T,E,A,D){this._terminal=v,this._optionService=C,this._selectionRenderModel=T,this._decorationService=E,this._coreBrowserService=A,this._themeService=D,this.result={fg:0,bg:0,ext:0}}resolve(v,C,T,E){if(this.result.bg=v.bg,this.result.fg=v.fg,this.result.ext=268435456&v.bg?v.extended.ext:0,N=0,S=0,l=!1,_=!1,m=!1,p=this._themeService.colors,f=0,v.getCode()!==g.NULL_CELL_CODE&&v.extended.underlineStyle===4){const A=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));f=C*E%(2*Math.round(A))}if(this._decorationService.forEachDecorationAtCell(C,T,"bottom",A=>{A.backgroundColorRGB&&(N=A.backgroundColorRGB.rgba>>8&16777215,l=!0),A.foregroundColorRGB&&(S=A.foregroundColorRGB.rgba>>8&16777215,_=!0)}),m=this._selectionRenderModel.isCellSelected(this._terminal,C,T),m){if(67108864&this.result.fg||50331648&this.result.bg){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:N=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:N=(16777215&this.result.fg)<<8|255;break;default:N=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:N=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:N=(16777215&this.result.bg)<<8|255}N=y.rgba.blend(N,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else N=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(l=!0,p.selectionForeground&&(S=p.selectionForeground.rgba>>8&16777215,_=!0),(0,u.treatGlyphAsBackgroundColor)(v.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))S=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:S=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:S=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:S=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:S=(16777215&this.result.fg)<<8|255;break;default:S=this._themeService.colors.foreground.rgba}S=y.rgba.blend(S,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}_=!0}}this._decorationService.forEachDecorationAtCell(C,T,"top",A=>{A.backgroundColorRGB&&(N=A.backgroundColorRGB.rgba>>8&16777215,l=!0),A.foregroundColorRGB&&(S=A.foregroundColorRGB.rgba>>8&16777215,_=!0)}),l&&(N=m?-16777216&v.bg&-134217729|N|50331648:-16777216&v.bg|N|50331648),_&&(S=-16777216&v.fg&-67108865|S|50331648),67108864&this.result.fg&&(l&&!_&&(S=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&p.background.rgba>>8|50331648,_=!0),!l&&_&&(N=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&p.foreground.rgba>>8|50331648,l=!0)),p=void 0,this.result.bg=l?N:this.result.bg,this.result.fg=_?S:this.result.fg,this.result.ext&=536870911,this.result.ext|=f<<29&3758096384}}},627:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.removeTerminalFromCache=r.acquireTextureAtlas=void 0;const g=o(509),y=o(197),u=[];r.acquireTextureAtlas=function(p,S,N,_,l,m,f,v){const C=(0,y.generateConfig)(_,l,m,f,S,N,v);for(let A=0;A<u.length;A++){const D=u[A],R=D.ownedBy.indexOf(p);if(R>=0){if((0,y.configEquals)(D.config,C))return D.atlas;D.ownedBy.length===1?(D.atlas.dispose(),u.splice(A,1)):D.ownedBy.splice(R,1);break}}for(let A=0;A<u.length;A++){const D=u[A];if((0,y.configEquals)(D.config,C))return D.ownedBy.push(p),D.atlas}const T=p._core,E={atlas:new g.TextureAtlas(document,C,T.unicodeService),config:C,ownedBy:[p]};return u.push(E),E.atlas},r.removeTerminalFromCache=function(p){for(let S=0;S<u.length;S++){const N=u[S].ownedBy.indexOf(p);if(N!==-1){u[S].ownedBy.length===1?(u[S].atlas.dispose(),u.splice(S,1)):u[S].ownedBy.splice(N,1);break}}}},197:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.is256Color=r.configEquals=r.generateConfig=void 0;const g=o(160);r.generateConfig=function(y,u,p,S,N,_,l){const m={foreground:_.foreground,background:_.background,cursor:g.NULL_COLOR,cursorAccent:g.NULL_COLOR,selectionForeground:g.NULL_COLOR,selectionBackgroundTransparent:g.NULL_COLOR,selectionBackgroundOpaque:g.NULL_COLOR,selectionInactiveBackgroundTransparent:g.NULL_COLOR,selectionInactiveBackgroundOpaque:g.NULL_COLOR,ansi:_.ansi.slice(),contrastCache:_.contrastCache,halfContrastCache:_.halfContrastCache};return{customGlyphs:N.customGlyphs,devicePixelRatio:l,letterSpacing:N.letterSpacing,lineHeight:N.lineHeight,deviceCellWidth:y,deviceCellHeight:u,deviceCharWidth:p,deviceCharHeight:S,fontFamily:N.fontFamily,fontSize:N.fontSize,fontWeight:N.fontWeight,fontWeightBold:N.fontWeightBold,allowTransparency:N.allowTransparency,drawBoldTextInBrightColors:N.drawBoldTextInBrightColors,minimumContrastRatio:N.minimumContrastRatio,colors:m}},r.configEquals=function(y,u){for(let p=0;p<y.colors.ansi.length;p++)if(y.colors.ansi[p].rgba!==u.colors.ansi[p].rgba)return!1;return y.devicePixelRatio===u.devicePixelRatio&&y.customGlyphs===u.customGlyphs&&y.lineHeight===u.lineHeight&&y.letterSpacing===u.letterSpacing&&y.fontFamily===u.fontFamily&&y.fontSize===u.fontSize&&y.fontWeight===u.fontWeight&&y.fontWeightBold===u.fontWeightBold&&y.allowTransparency===u.allowTransparency&&y.deviceCharWidth===u.deviceCharWidth&&y.deviceCharHeight===u.deviceCharHeight&&y.drawBoldTextInBrightColors===u.drawBoldTextInBrightColors&&y.minimumContrastRatio===u.minimumContrastRatio&&y.colors.foreground.rgba===u.colors.foreground.rgba&&y.colors.background.rgba===u.colors.background.rgba},r.is256Color=function(y){return(50331648&y)==16777216||(50331648&y)==33554432}},237:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TEXT_BASELINE=r.DIM_OPACITY=r.INVERTED_DEFAULT_COLOR=void 0;const g=o(399);r.INVERTED_DEFAULT_COLOR=257,r.DIM_OPACITY=.5,r.TEXT_BASELINE=g.isFirefox||g.isLegacyEdge?"bottom":"ideographic"},457:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CursorBlinkStateManager=void 0,r.CursorBlinkStateManager=class{constructor(o,g){this._renderCallback=o,this._coreBrowserService=g,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(o=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const g=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,g>0)return void this._restartInterval(g)}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 g=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(g)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},o)}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:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tryDrawCustomChar=r.powerlineDefinitions=r.boxDrawingDefinitions=r.blockElementDefinitions=void 0;const g=o(374);r.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 y={"░":[[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]]};r.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:(_,l)=>`M0,${.5-l} L1,${.5-l} M0,${.5+l} L1,${.5+l}`},"║":{1:(_,l)=>`M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╒":{1:(_,l)=>`M.5,1 L.5,${.5-l} L1,${.5-l} M.5,${.5+l} L1,${.5+l}`},"╓":{1:(_,l)=>`M${.5-_},1 L${.5-_},.5 L1,.5 M${.5+_},.5 L${.5+_},1`},"╔":{1:(_,l)=>`M1,${.5-l} L${.5-_},${.5-l} L${.5-_},1 M1,${.5+l} L${.5+_},${.5+l} L${.5+_},1`},"╕":{1:(_,l)=>`M0,${.5-l} L.5,${.5-l} L.5,1 M0,${.5+l} L.5,${.5+l}`},"╖":{1:(_,l)=>`M${.5+_},1 L${.5+_},.5 L0,.5 M${.5-_},.5 L${.5-_},1`},"╗":{1:(_,l)=>`M0,${.5+l} L${.5-_},${.5+l} L${.5-_},1 M0,${.5-l} L${.5+_},${.5-l} L${.5+_},1`},"╘":{1:(_,l)=>`M.5,0 L.5,${.5+l} L1,${.5+l} M.5,${.5-l} L1,${.5-l}`},"╙":{1:(_,l)=>`M1,.5 L${.5-_},.5 L${.5-_},0 M${.5+_},.5 L${.5+_},0`},"╚":{1:(_,l)=>`M1,${.5-l} L${.5+_},${.5-l} L${.5+_},0 M1,${.5+l} L${.5-_},${.5+l} L${.5-_},0`},"╛":{1:(_,l)=>`M0,${.5+l} L.5,${.5+l} L.5,0 M0,${.5-l} L.5,${.5-l}`},"╜":{1:(_,l)=>`M0,.5 L${.5+_},.5 L${.5+_},0 M${.5-_},.5 L${.5-_},0`},"╝":{1:(_,l)=>`M0,${.5-l} L${.5-_},${.5-l} L${.5-_},0 M0,${.5+l} L${.5+_},${.5+l} L${.5+_},0`},"╞":{1:(_,l)=>`M.5,0 L.5,1 M.5,${.5-l} L1,${.5-l} M.5,${.5+l} L1,${.5+l}`},"╟":{1:(_,l)=>`M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1 M${.5+_},.5 L1,.5`},"╠":{1:(_,l)=>`M${.5-_},0 L${.5-_},1 M1,${.5+l} L${.5+_},${.5+l} L${.5+_},1 M1,${.5-l} L${.5+_},${.5-l} L${.5+_},0`},"╡":{1:(_,l)=>`M.5,0 L.5,1 M0,${.5-l} L.5,${.5-l} M0,${.5+l} L.5,${.5+l}`},"╢":{1:(_,l)=>`M0,.5 L${.5-_},.5 M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╣":{1:(_,l)=>`M${.5+_},0 L${.5+_},1 M0,${.5+l} L${.5-_},${.5+l} L${.5-_},1 M0,${.5-l} L${.5-_},${.5-l} L${.5-_},0`},"╤":{1:(_,l)=>`M0,${.5-l} L1,${.5-l} M0,${.5+l} L1,${.5+l} M.5,${.5+l} L.5,1`},"╥":{1:(_,l)=>`M0,.5 L1,.5 M${.5-_},.5 L${.5-_},1 M${.5+_},.5 L${.5+_},1`},"╦":{1:(_,l)=>`M0,${.5-l} L1,${.5-l} M0,${.5+l} L${.5-_},${.5+l} L${.5-_},1 M1,${.5+l} L${.5+_},${.5+l} L${.5+_},1`},"╧":{1:(_,l)=>`M.5,0 L.5,${.5-l} M0,${.5-l} L1,${.5-l} M0,${.5+l} L1,${.5+l}`},"╨":{1:(_,l)=>`M0,.5 L1,.5 M${.5-_},.5 L${.5-_},0 M${.5+_},.5 L${.5+_},0`},"╩":{1:(_,l)=>`M0,${.5+l} L1,${.5+l} M0,${.5-l} L${.5-_},${.5-l} L${.5-_},0 M1,${.5-l} L${.5+_},${.5-l} L${.5+_},0`},"╪":{1:(_,l)=>`M.5,0 L.5,1 M0,${.5-l} L1,${.5-l} M0,${.5+l} L1,${.5+l}`},"╫":{1:(_,l)=>`M0,.5 L1,.5 M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╬":{1:(_,l)=>`M0,${.5+l} L${.5-_},${.5+l} L${.5-_},1 M1,${.5+l} L${.5+_},${.5+l} L${.5+_},1 M0,${.5-l} L${.5-_},${.5-l} L${.5-_},0 M1,${.5-l} L${.5+_},${.5-l} L${.5+_},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:(_,l)=>`M.5,1 L.5,${.5+l/.15*.5} C.5,${.5+l/.15*.5},.5,.5,1,.5`},"╮":{1:(_,l)=>`M.5,1 L.5,${.5+l/.15*.5} C.5,${.5+l/.15*.5},.5,.5,0,.5`},"╯":{1:(_,l)=>`M.5,0 L.5,${.5-l/.15*.5} C.5,${.5-l/.15*.5},.5,.5,0,.5`},"╰":{1:(_,l)=>`M.5,0 L.5,${.5-l/.15*.5} C.5,${.5-l/.15*.5},.5,.5,1,.5`}},r.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}},r.powerlineDefinitions[""]=r.powerlineDefinitions[""],r.powerlineDefinitions[""]=r.powerlineDefinitions[""],r.tryDrawCustomChar=function(_,l,m,f,v,C,T,E){const A=r.blockElementDefinitions[l];if(A)return function($,O,I,Y,Q,Z){for(let ee=0;ee<O.length;ee++){const oe=O[ee],P=Q/8,W=Z/8;$.fillRect(I+oe.x*P,Y+oe.y*W,oe.w*P,oe.h*W)}}(_,A,m,f,v,C),!0;const D=y[l];if(D)return function($,O,I,Y,Q,Z){let ee=u.get(O);ee||(ee=new Map,u.set(O,ee));const oe=$.fillStyle;if(typeof oe!="string")throw new Error(`Unexpected fillStyle type "${oe}"`);let P=ee.get(oe);if(!P){const W=O[0].length,V=O.length,J=$.canvas.ownerDocument.createElement("canvas");J.width=W,J.height=V;const _e=(0,g.throwIfFalsy)(J.getContext("2d")),be=new ImageData(W,V);let Ve,Le,ie,G;if(oe.startsWith("#"))Ve=parseInt(oe.slice(1,3),16),Le=parseInt(oe.slice(3,5),16),ie=parseInt(oe.slice(5,7),16),G=oe.length>7&&parseInt(oe.slice(7,9),16)||1;else{if(!oe.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${oe}" when drawing pattern glyph`);[Ve,Le,ie,G]=oe.substring(5,oe.length-1).split(",").map(pe=>parseFloat(pe))}for(let pe=0;pe<V;pe++)for(let le=0;le<W;le++)be.data[4*(pe*W+le)]=Ve,be.data[4*(pe*W+le)+1]=Le,be.data[4*(pe*W+le)+2]=ie,be.data[4*(pe*W+le)+3]=O[pe][le]*(255*G);_e.putImageData(be,0,0),P=(0,g.throwIfFalsy)($.createPattern(J,null)),ee.set(oe,P)}$.fillStyle=P,$.fillRect(I,Y,Q,Z)}(_,D,m,f,v,C),!0;const R=r.boxDrawingDefinitions[l];if(R)return function($,O,I,Y,Q,Z,ee){$.strokeStyle=$.fillStyle;for(const[oe,P]of Object.entries(O)){let W;$.beginPath(),$.lineWidth=ee*Number.parseInt(oe),W=typeof P=="function"?P(.15,.15/Z*Q):P;for(const V of W.split(" ")){const J=V[0],_e=S[J];if(!_e){console.error(`Could not find drawing instructions for "${J}"`);continue}const be=V.substring(1).split(",");be[0]&&be[1]&&_e($,N(be,Q,Z,I,Y,!0,ee))}$.stroke(),$.closePath()}}(_,R,m,f,v,C,E),!0;const M=r.powerlineDefinitions[l];return!!M&&(function($,O,I,Y,Q,Z,ee,oe){const P=new Path2D;P.rect(I,Y,Q,Z),$.clip(P),$.beginPath();const W=ee/12;$.lineWidth=oe*W;for(const V of O.d.split(" ")){const J=V[0],_e=S[J];if(!_e){console.error(`Could not find drawing instructions for "${J}"`);continue}const be=V.substring(1).split(",");be[0]&&be[1]&&_e($,N(be,Q,Z,I,Y,!1,oe,(O.leftPadding??0)*(W/2),(O.rightPadding??0)*(W/2)))}O.type===1?($.strokeStyle=$.fillStyle,$.stroke()):$.fill(),$.closePath()}(_,M,m,f,v,C,T,E),!0)};const u=new Map;function p(_,l,m=0){return Math.max(Math.min(_,l),m)}const S={C:(_,l)=>_.bezierCurveTo(l[0],l[1],l[2],l[3],l[4],l[5]),L:(_,l)=>_.lineTo(l[0],l[1]),M:(_,l)=>_.moveTo(l[0],l[1])};function N(_,l,m,f,v,C,T,E=0,A=0){const D=_.map(R=>parseFloat(R)||parseInt(R));if(D.length<2)throw new Error("Too few arguments for instruction");for(let R=0;R<D.length;R+=2)D[R]*=l-E*T-A*T,C&&D[R]!==0&&(D[R]=p(Math.round(D[R]+.5)-.5,l,0)),D[R]+=f+E*T;for(let R=1;R<D.length;R+=2)D[R]*=m,C&&D[R]!==0&&(D[R]=p(Math.round(D[R]+.5)-.5,m,0)),D[R]+=v;return D}},56:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.observeDevicePixelDimensions=void 0;const g=o(859);r.observeDevicePixelDimensions=function(y,u,p){let S=new u.ResizeObserver(N=>{const _=N.find(f=>f.target===y);if(!_)return;if(!("devicePixelContentBoxSize"in _))return S==null||S.disconnect(),void(S=void 0);const l=_.devicePixelContentBoxSize[0].inlineSize,m=_.devicePixelContentBoxSize[0].blockSize;l>0&&m>0&&p(l,m)});try{S.observe(y,{box:["device-pixel-content-box"]})}catch{S.disconnect(),S=void 0}return(0,g.toDisposable)(()=>S==null?void 0:S.disconnect())}},374:(b,r)=>{function o(y){return 57508<=y&&y<=57558}function g(y){return y>=128512&&y<=128591||y>=127744&&y<=128511||y>=128640&&y<=128767||y>=9728&&y<=9983||y>=9984&&y<=10175||y>=65024&&y<=65039||y>=129280&&y<=129535||y>=127462&&y<=127487}Object.defineProperty(r,"__esModule",{value:!0}),r.computeNextVariantOffset=r.createRenderDimensions=r.treatGlyphAsBackgroundColor=r.allowRescaling=r.isEmoji=r.isRestrictedPowerlineGlyph=r.isPowerlineGlyph=r.throwIfFalsy=void 0,r.throwIfFalsy=function(y){if(!y)throw new Error("value must not be falsy");return y},r.isPowerlineGlyph=o,r.isRestrictedPowerlineGlyph=function(y){return 57520<=y&&y<=57527},r.isEmoji=g,r.allowRescaling=function(y,u,p,S){return u===1&&p>Math.ceil(1.5*S)&&y!==void 0&&y>255&&!g(y)&&!o(y)&&!function(N){return 57344<=N&&N<=63743}(y)},r.treatGlyphAsBackgroundColor=function(y){return o(y)||function(u){return 9472<=u&&u<=9631}(y)},r.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}}}},r.computeNextVariantOffset=function(y,u,p=0){return(y-(2*Math.round(u)-p))%(2*Math.round(u))}},296:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createSelectionRenderModel=void 0;class o{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(y,u,p,S=!1){if(this.selectionStart=u,this.selectionEnd=p,!u||!p||u[0]===p[0]&&u[1]===p[1])return void this.clear();const N=y.buffers.active.ydisp,_=u[1]-N,l=p[1]-N,m=Math.max(_,0),f=Math.min(l,y.rows-1);m>=y.rows||f<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=_,this.viewportEndRow=l,this.viewportCappedStartRow=m,this.viewportCappedEndRow=f,this.startCol=u[0],this.endCol=p[0])}isCellSelected(y,u,p){return!!this.hasSelection&&(p-=y.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&p>=this.viewportCappedStartRow&&u<this.endCol&&p<=this.viewportCappedEndRow:u<this.startCol&&p>=this.viewportCappedStartRow&&u>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&u>=this.startCol)}}r.createSelectionRenderModel=function(){return new o}},509:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TextureAtlas=void 0;const g=o(237),y=o(860),u=o(374),p=o(160),S=o(345),N=o(485),_=o(385),l=o(147),m=o(855),f={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 v;class C{get pages(){return this._pages}constructor(R,M,$){this._document=R,this._config=M,this._unicodeService=$,this._didWarmUp=!1,this._cacheMap=new N.FourKeyMap,this._cacheMapCombined=new N.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new l.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new S.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new S.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=A(R,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,u.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const R of this.pages)R.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const R=new _.IdleTaskQueue;for(let M=33;M<126;M++)R.enqueue(()=>{if(!this._cacheMap.get(M,m.DEFAULT_COLOR,m.DEFAULT_COLOR,m.DEFAULT_EXT)){const $=this._drawToCache(M,m.DEFAULT_COLOR,m.DEFAULT_COLOR,m.DEFAULT_EXT);this._cacheMap.set(M,m.DEFAULT_COLOR,m.DEFAULT_COLOR,m.DEFAULT_EXT,$)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const R of this._pages)R.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(C.maxAtlasPages&&this._pages.length>=Math.max(4,C.maxAtlasPages)){const M=this._pages.filter(ee=>2*ee.canvas.width<=(C.maxTextureSize||4096)).sort((ee,oe)=>oe.canvas.width!==ee.canvas.width?oe.canvas.width-ee.canvas.width:oe.percentageUsed-ee.percentageUsed);let $=-1,O=0;for(let ee=0;ee<M.length;ee++)if(M[ee].canvas.width!==O)$=ee,O=M[ee].canvas.width;else if(ee-$==3)break;const I=M.slice($,$+4),Y=I.map(ee=>ee.glyphs[0].texturePage).sort((ee,oe)=>ee>oe?1:-1),Q=this.pages.length-I.length,Z=this._mergePages(I,Q);Z.version++;for(let ee=Y.length-1;ee>=0;ee--)this._deletePage(Y[ee]);this.pages.push(Z),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(Z.canvas)}const R=new T(this._document,this._textureSize);return this._pages.push(R),this._activePages.push(R),this._onAddTextureAtlasCanvas.fire(R.canvas),R}_mergePages(R,M){const $=2*R[0].canvas.width,O=new T(this._document,$,R);for(const[I,Y]of R.entries()){const Q=I*Y.canvas.width%$,Z=Math.floor(I/2)*Y.canvas.height;O.ctx.drawImage(Y.canvas,Q,Z);for(const oe of Y.glyphs)oe.texturePage=M,oe.sizeClipSpace.x=oe.size.x/$,oe.sizeClipSpace.y=oe.size.y/$,oe.texturePosition.x+=Q,oe.texturePosition.y+=Z,oe.texturePositionClipSpace.x=oe.texturePosition.x/$,oe.texturePositionClipSpace.y=oe.texturePosition.y/$;this._onRemoveTextureAtlasCanvas.fire(Y.canvas);const ee=this._activePages.indexOf(Y);ee!==-1&&this._activePages.splice(ee,1)}return O}_deletePage(R){this._pages.splice(R,1);for(let M=R;M<this._pages.length;M++){const $=this._pages[M];for(const O of $.glyphs)O.texturePage--;$.version++}}getRasterizedGlyphCombinedChar(R,M,$,O,I){return this._getFromCacheMap(this._cacheMapCombined,R,M,$,O,I)}getRasterizedGlyph(R,M,$,O,I){return this._getFromCacheMap(this._cacheMap,R,M,$,O,I)}_getFromCacheMap(R,M,$,O,I,Y=!1){return v=R.get(M,$,O,I),v||(v=this._drawToCache(M,$,O,I,Y),R.set(M,$,O,I,v)),v}_getColorFromAnsiIndex(R){if(R>=this._config.colors.ansi.length)throw new Error("No color found for idx "+R);return this._config.colors.ansi[R]}_getBackgroundColor(R,M,$,O){if(this._config.allowTransparency)return p.NULL_COLOR;let I;switch(R){case 16777216:case 33554432:I=this._getColorFromAnsiIndex(M);break;case 50331648:const Y=l.AttributeData.toColorRGB(M);I=p.channels.toColor(Y[0],Y[1],Y[2]);break;default:I=$?p.color.opaque(this._config.colors.foreground):this._config.colors.background}return I}_getForegroundColor(R,M,$,O,I,Y,Q,Z,ee,oe){const P=this._getMinimumContrastColor(R,M,$,O,I,Y,Q,ee,Z,oe);if(P)return P;let W;switch(I){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&ee&&Y<8&&(Y+=8),W=this._getColorFromAnsiIndex(Y);break;case 50331648:const V=l.AttributeData.toColorRGB(Y);W=p.channels.toColor(V[0],V[1],V[2]);break;default:W=Q?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(W=p.color.opaque(W)),Z&&(W=p.color.multiplyOpacity(W,g.DIM_OPACITY)),W}_resolveBackgroundRgba(R,M,$){switch(R){case 16777216:case 33554432:return this._getColorFromAnsiIndex(M).rgba;case 50331648:return M<<8;default:return $?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(R,M,$,O){switch(R){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&O&&M<8&&(M+=8),this._getColorFromAnsiIndex(M).rgba;case 50331648:return M<<8;default:return $?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(R,M,$,O,I,Y,Q,Z,ee,oe){if(this._config.minimumContrastRatio===1||oe)return;const P=this._getContrastCache(ee),W=P.getColor(R,O);if(W!==void 0)return W||void 0;const V=this._resolveBackgroundRgba(M,$,Q),J=this._resolveForegroundRgba(I,Y,Q,Z),_e=p.rgba.ensureContrastRatio(V,J,this._config.minimumContrastRatio/(ee?2:1));if(!_e)return void P.setColor(R,O,null);const be=p.channels.toColor(_e>>24&255,_e>>16&255,_e>>8&255);return P.setColor(R,O,be),be}_getContrastCache(R){return R?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(R,M,$,O,I=!1){const Y=typeof R=="number"?String.fromCharCode(R):R,Q=Math.min(this._config.deviceCellWidth*Math.max(Y.length,2)+4,this._textureSize);this._tmpCanvas.width<Q&&(this._tmpCanvas.width=Q);const Z=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<Z&&(this._tmpCanvas.height=Z),this._tmpCtx.save(),this._workAttributeData.fg=$,this._workAttributeData.bg=M,this._workAttributeData.extended.ext=O,this._workAttributeData.isInvisible())return f;const ee=!!this._workAttributeData.isBold(),oe=!!this._workAttributeData.isInverse(),P=!!this._workAttributeData.isDim(),W=!!this._workAttributeData.isItalic(),V=!!this._workAttributeData.isUnderline(),J=!!this._workAttributeData.isStrikethrough(),_e=!!this._workAttributeData.isOverline();let be=this._workAttributeData.getFgColor(),Ve=this._workAttributeData.getFgColorMode(),Le=this._workAttributeData.getBgColor(),ie=this._workAttributeData.getBgColorMode();if(oe){const ne=be;be=Le,Le=ne;const Fe=Ve;Ve=ie,ie=Fe}const G=this._getBackgroundColor(ie,Le,oe,P);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=G.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const pe=ee?this._config.fontWeightBold:this._config.fontWeight,le=W?"italic":"";this._tmpCtx.font=`${le} ${pe} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=g.TEXT_BASELINE;const Be=Y.length===1&&(0,u.isPowerlineGlyph)(Y.charCodeAt(0)),Te=Y.length===1&&(0,u.isRestrictedPowerlineGlyph)(Y.charCodeAt(0)),Xe=this._getForegroundColor(M,ie,Le,$,Ve,be,oe,P,ee,(0,u.treatGlyphAsBackgroundColor)(Y.charCodeAt(0)));this._tmpCtx.fillStyle=Xe.css;const Ke=Te?0:4;let st=!1;this._config.customGlyphs!==!1&&(st=(0,y.tryDrawCustomChar)(this._tmpCtx,Y,Ke,Ke,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let jt,Ye=!Be;if(jt=typeof R=="number"?this._unicodeService.wcwidth(R):this._unicodeService.getStringCellWidth(R),V){this._tmpCtx.save();const ne=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Fe=ne%2==1?.5:0;if(this._tmpCtx.lineWidth=ne,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Ye=!1,this._tmpCtx.strokeStyle=`rgb(${l.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Ye=!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 tt=Ke,me=Math.ceil(Ke+this._config.deviceCharHeight)-Fe-(I?2*ne:0),rt=me+ne,Re=me+2*ne;let fe=this._workAttributeData.getUnderlineVariantOffset();for(let ce=0;ce<jt;ce++){this._tmpCtx.save();const Ee=tt+ce*this._config.deviceCellWidth,Oe=tt+(ce+1)*this._config.deviceCellWidth,vt=Ee+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Ee,me),this._tmpCtx.lineTo(Oe,me),this._tmpCtx.moveTo(Ee,Re),this._tmpCtx.lineTo(Oe,Re);break;case 3:const Ct=ne<=1?Re:Math.ceil(Ke+this._config.deviceCharHeight-ne/2)-Fe,ot=ne<=1?me:Math.ceil(Ke+this._config.deviceCharHeight+ne/2)-Fe,St=new Path2D;St.rect(Ee,me,this._config.deviceCellWidth,Re-me),this._tmpCtx.clip(St),this._tmpCtx.moveTo(Ee-this._config.deviceCellWidth/2,rt),this._tmpCtx.bezierCurveTo(Ee-this._config.deviceCellWidth/2,ot,Ee,ot,Ee,rt),this._tmpCtx.bezierCurveTo(Ee,Ct,vt,Ct,vt,rt),this._tmpCtx.bezierCurveTo(vt,ot,Oe,ot,Oe,rt),this._tmpCtx.bezierCurveTo(Oe,Ct,Oe+this._config.deviceCellWidth/2,Ct,Oe+this._config.deviceCellWidth/2,rt);break;case 4:const yn=fe===0?0:fe>=ne?2*ne-fe:ne-fe;fe>=ne||yn===0?(this._tmpCtx.setLineDash([Math.round(ne),Math.round(ne)]),this._tmpCtx.moveTo(Ee+yn,me),this._tmpCtx.lineTo(Oe,me)):(this._tmpCtx.setLineDash([Math.round(ne),Math.round(ne)]),this._tmpCtx.moveTo(Ee,me),this._tmpCtx.lineTo(Ee+yn,me),this._tmpCtx.moveTo(Ee+yn+ne,me),this._tmpCtx.lineTo(Oe,me)),fe=(0,u.computeNextVariantOffset)(Oe-Ee,ne,fe);break;case 5:const hn=.6,qt=.3,It=Oe-Ee,Pt=Math.floor(hn*It),Un=Math.floor(qt*It),Hn=It-Pt-Un;this._tmpCtx.setLineDash([Pt,Un,Hn]),this._tmpCtx.moveTo(Ee,me),this._tmpCtx.lineTo(Oe,me);break;default:this._tmpCtx.moveTo(Ee,me),this._tmpCtx.lineTo(Oe,me)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!st&&this._config.fontSize>=12&&!this._config.allowTransparency&&Y!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const ce=this._tmpCtx.measureText(Y);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in ce&&ce.actualBoundingBoxDescent>0){this._tmpCtx.save();const Ee=new Path2D;Ee.rect(tt,me-Math.ceil(ne/2),this._config.deviceCellWidth*jt,Re-me+Math.ceil(ne/2)),this._tmpCtx.clip(Ee),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=G.css,this._tmpCtx.strokeText(Y,Ke,Ke+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(_e){const ne=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Fe=ne%2==1?.5:0;this._tmpCtx.lineWidth=ne,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(Ke,Ke+Fe),this._tmpCtx.lineTo(Ke+this._config.deviceCharWidth*jt,Ke+Fe),this._tmpCtx.stroke()}if(st||this._tmpCtx.fillText(Y,Ke,Ke+this._config.deviceCharHeight),Y==="_"&&!this._config.allowTransparency){let ne=E(this._tmpCtx.getImageData(Ke,Ke,this._config.deviceCellWidth,this._config.deviceCellHeight),G,Xe,Ye);if(ne)for(let Fe=1;Fe<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=G.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(Y,Ke,Ke+this._config.deviceCharHeight-Fe),ne=E(this._tmpCtx.getImageData(Ke,Ke,this._config.deviceCellWidth,this._config.deviceCellHeight),G,Xe,Ye),ne);Fe++);}if(J){const ne=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),Fe=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ne,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(Ke,Ke+Math.floor(this._config.deviceCharHeight/2)-Fe),this._tmpCtx.lineTo(Ke+this._config.deviceCharWidth*jt,Ke+Math.floor(this._config.deviceCharHeight/2)-Fe),this._tmpCtx.stroke()}this._tmpCtx.restore();const $t=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Yt;if(Yt=this._config.allowTransparency?function(ne){for(let Fe=0;Fe<ne.data.length;Fe+=4)if(ne.data[Fe+3]>0)return!1;return!0}($t):E($t,G,Xe,Ye),Yt)return f;const dt=this._findGlyphBoundingBox($t,this._workBoundingBox,Q,Te,st,Ke);let Je,nt;for(;;){if(this._activePages.length===0){const ne=this._createNewPage();Je=ne,nt=ne.currentRow,nt.height=dt.size.y;break}Je=this._activePages[this._activePages.length-1],nt=Je.currentRow;for(const ne of this._activePages)dt.size.y<=ne.currentRow.height&&(Je=ne,nt=ne.currentRow);for(let ne=this._activePages.length-1;ne>=0;ne--)for(const Fe of this._activePages[ne].fixedRows)Fe.height<=nt.height&&dt.size.y<=Fe.height&&(Je=this._activePages[ne],nt=Fe);if(nt.y+dt.size.y>=Je.canvas.height||nt.height>dt.size.y+2){let ne=!1;if(Je.currentRow.y+Je.currentRow.height+dt.size.y>=Je.canvas.height){let Fe;for(const tt of this._activePages)if(tt.currentRow.y+tt.currentRow.height+dt.size.y<tt.canvas.height){Fe=tt;break}if(Fe)Je=Fe;else if(C.maxAtlasPages&&this._pages.length>=C.maxAtlasPages&&nt.y+dt.size.y<=Je.canvas.height&&nt.height>=dt.size.y&&nt.x+dt.size.x<=Je.canvas.width)ne=!0;else{const tt=this._createNewPage();Je=tt,nt=tt.currentRow,nt.height=dt.size.y,ne=!0}}ne||(Je.currentRow.height>0&&Je.fixedRows.push(Je.currentRow),nt={x:0,y:Je.currentRow.y+Je.currentRow.height,height:dt.size.y},Je.fixedRows.push(nt),Je.currentRow={x:0,y:nt.y+nt.height,height:0})}if(nt.x+dt.size.x<=Je.canvas.width)break;nt===Je.currentRow?(nt.x=0,nt.y+=nt.height,nt.height=0):Je.fixedRows.splice(Je.fixedRows.indexOf(nt),1)}return dt.texturePage=this._pages.indexOf(Je),dt.texturePosition.x=nt.x,dt.texturePosition.y=nt.y,dt.texturePositionClipSpace.x=nt.x/Je.canvas.width,dt.texturePositionClipSpace.y=nt.y/Je.canvas.height,dt.sizeClipSpace.x/=Je.canvas.width,dt.sizeClipSpace.y/=Je.canvas.height,nt.height=Math.max(nt.height,dt.size.y),nt.x+=dt.size.x,Je.ctx.putImageData($t,dt.texturePosition.x-this._workBoundingBox.left,dt.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,dt.size.x,dt.size.y),Je.addGlyph(dt),Je.version++,dt}_findGlyphBoundingBox(R,M,$,O,I,Y){M.top=0;const Q=O?this._config.deviceCellHeight:this._tmpCanvas.height,Z=O?this._config.deviceCellWidth:$;let ee=!1;for(let oe=0;oe<Q;oe++){for(let P=0;P<Z;P++){const W=oe*this._tmpCanvas.width*4+4*P+3;if(R.data[W]!==0){M.top=oe,ee=!0;break}}if(ee)break}M.left=0,ee=!1;for(let oe=0;oe<Y+Z;oe++){for(let P=0;P<Q;P++){const W=P*this._tmpCanvas.width*4+4*oe+3;if(R.data[W]!==0){M.left=oe,ee=!0;break}}if(ee)break}M.right=Z,ee=!1;for(let oe=Y+Z-1;oe>=Y;oe--){for(let P=0;P<Q;P++){const W=P*this._tmpCanvas.width*4+4*oe+3;if(R.data[W]!==0){M.right=oe,ee=!0;break}}if(ee)break}M.bottom=Q,ee=!1;for(let oe=Q-1;oe>=0;oe--){for(let P=0;P<Z;P++){const W=oe*this._tmpCanvas.width*4+4*P+3;if(R.data[W]!==0){M.bottom=oe,ee=!0;break}}if(ee)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:M.right-M.left+1,y:M.bottom-M.top+1},sizeClipSpace:{x:M.right-M.left+1,y:M.bottom-M.top+1},offset:{x:-M.left+Y+(O||I?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-M.top+Y+(O||I?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}r.TextureAtlas=C;class T{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(R){this._glyphs.push(R),this._usedPixels+=R.size.x*R.size.y}constructor(R,M,$){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],$)for(const O of $)this._glyphs.push(...O.glyphs),this._usedPixels+=O._usedPixels;this.canvas=A(R,M,M),this.ctx=(0,u.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 E(D,R,M,$){const O=R.rgba>>>24,I=R.rgba>>>16&255,Y=R.rgba>>>8&255,Q=M.rgba>>>24,Z=M.rgba>>>16&255,ee=M.rgba>>>8&255,oe=Math.floor((Math.abs(O-Q)+Math.abs(I-Z)+Math.abs(Y-ee))/12);let P=!0;for(let W=0;W<D.data.length;W+=4)D.data[W]===O&&D.data[W+1]===I&&D.data[W+2]===Y||$&&Math.abs(D.data[W]-O)+Math.abs(D.data[W+1]-I)+Math.abs(D.data[W+2]-Y)<oe?D.data[W+3]=0:P=!1;return P}function A(D,R,M){const $=D.createElement("canvas");return $.width=R,$.height=M,$}},160:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.contrastRatio=r.toPaddedHex=r.rgba=r.rgb=r.css=r.color=r.channels=r.NULL_COLOR=void 0;let o=0,g=0,y=0,u=0;var p,S,N,_,l;function m(v){const C=v.toString(16);return C.length<2?"0"+C:C}function f(v,C){return v<C?(C+.05)/(v+.05):(v+.05)/(C+.05)}r.NULL_COLOR={css:"#00000000",rgba:0},function(v){v.toCss=function(C,T,E,A){return A!==void 0?`#${m(C)}${m(T)}${m(E)}${m(A)}`:`#${m(C)}${m(T)}${m(E)}`},v.toRgba=function(C,T,E,A=255){return(C<<24|T<<16|E<<8|A)>>>0},v.toColor=function(C,T,E,A){return{css:v.toCss(C,T,E,A),rgba:v.toRgba(C,T,E,A)}}}(p||(r.channels=p={})),function(v){function C(T,E){return u=Math.round(255*E),[o,g,y]=l.toChannels(T.rgba),{css:p.toCss(o,g,y,u),rgba:p.toRgba(o,g,y,u)}}v.blend=function(T,E){if(u=(255&E.rgba)/255,u===1)return{css:E.css,rgba:E.rgba};const A=E.rgba>>24&255,D=E.rgba>>16&255,R=E.rgba>>8&255,M=T.rgba>>24&255,$=T.rgba>>16&255,O=T.rgba>>8&255;return o=M+Math.round((A-M)*u),g=$+Math.round((D-$)*u),y=O+Math.round((R-O)*u),{css:p.toCss(o,g,y),rgba:p.toRgba(o,g,y)}},v.isOpaque=function(T){return(255&T.rgba)==255},v.ensureContrastRatio=function(T,E,A){const D=l.ensureContrastRatio(T.rgba,E.rgba,A);if(D)return p.toColor(D>>24&255,D>>16&255,D>>8&255)},v.opaque=function(T){const E=(255|T.rgba)>>>0;return[o,g,y]=l.toChannels(E),{css:p.toCss(o,g,y),rgba:E}},v.opacity=C,v.multiplyOpacity=function(T,E){return u=255&T.rgba,C(T,u*E/255)},v.toColorRGB=function(T){return[T.rgba>>24&255,T.rgba>>16&255,T.rgba>>8&255]}}(S||(r.color=S={})),function(v){let C,T;try{const E=document.createElement("canvas");E.width=1,E.height=1;const A=E.getContext("2d",{willReadFrequently:!0});A&&(C=A,C.globalCompositeOperation="copy",T=C.createLinearGradient(0,0,1,1))}catch{}v.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return o=parseInt(E.slice(1,2).repeat(2),16),g=parseInt(E.slice(2,3).repeat(2),16),y=parseInt(E.slice(3,4).repeat(2),16),p.toColor(o,g,y);case 5:return o=parseInt(E.slice(1,2).repeat(2),16),g=parseInt(E.slice(2,3).repeat(2),16),y=parseInt(E.slice(3,4).repeat(2),16),u=parseInt(E.slice(4,5).repeat(2),16),p.toColor(o,g,y,u);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const A=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return o=parseInt(A[1]),g=parseInt(A[2]),y=parseInt(A[3]),u=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(o,g,y,u);if(!C||!T)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=T,C.fillStyle=E,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[o,g,y,u]=C.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(o,g,y,u),css:E}}}(N||(r.css=N={})),function(v){function C(T,E,A){const D=T/255,R=E/255,M=A/255;return .2126*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))}v.relativeLuminance=function(T){return C(T>>16&255,T>>8&255,255&T)},v.relativeLuminance2=C}(_||(r.rgb=_={})),function(v){function C(E,A,D){const R=E>>24&255,M=E>>16&255,$=E>>8&255;let O=A>>24&255,I=A>>16&255,Y=A>>8&255,Q=f(_.relativeLuminance2(O,I,Y),_.relativeLuminance2(R,M,$));for(;Q<D&&(O>0||I>0||Y>0);)O-=Math.max(0,Math.ceil(.1*O)),I-=Math.max(0,Math.ceil(.1*I)),Y-=Math.max(0,Math.ceil(.1*Y)),Q=f(_.relativeLuminance2(O,I,Y),_.relativeLuminance2(R,M,$));return(O<<24|I<<16|Y<<8|255)>>>0}function T(E,A,D){const R=E>>24&255,M=E>>16&255,$=E>>8&255;let O=A>>24&255,I=A>>16&255,Y=A>>8&255,Q=f(_.relativeLuminance2(O,I,Y),_.relativeLuminance2(R,M,$));for(;Q<D&&(O<255||I<255||Y<255);)O=Math.min(255,O+Math.ceil(.1*(255-O))),I=Math.min(255,I+Math.ceil(.1*(255-I))),Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),Q=f(_.relativeLuminance2(O,I,Y),_.relativeLuminance2(R,M,$));return(O<<24|I<<16|Y<<8|255)>>>0}v.blend=function(E,A){if(u=(255&A)/255,u===1)return A;const D=A>>24&255,R=A>>16&255,M=A>>8&255,$=E>>24&255,O=E>>16&255,I=E>>8&255;return o=$+Math.round((D-$)*u),g=O+Math.round((R-O)*u),y=I+Math.round((M-I)*u),p.toRgba(o,g,y)},v.ensureContrastRatio=function(E,A,D){const R=_.relativeLuminance(E>>8),M=_.relativeLuminance(A>>8);if(f(R,M)<D){if(M<R){const I=C(E,A,D),Y=f(R,_.relativeLuminance(I>>8));if(Y<D){const Q=T(E,A,D);return Y>f(R,_.relativeLuminance(Q>>8))?I:Q}return I}const $=T(E,A,D),O=f(R,_.relativeLuminance($>>8));if(O<D){const I=C(E,A,D);return O>f(R,_.relativeLuminance(I>>8))?$:I}return $}},v.reduceLuminance=C,v.increaseLuminance=T,v.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]}}(l||(r.rgba=l={})),r.toPaddedHex=m,r.contrastRatio=f},345:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.runAndSubscribe=r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=o=>(this._listeners.push(o),{dispose:()=>{if(!this._disposed){for(let g=0;g<this._listeners.length;g++)if(this._listeners[g]===o)return void this._listeners.splice(g,1)}}})),this._event}fire(o,g){const y=[];for(let u=0;u<this._listeners.length;u++)y.push(this._listeners[u]);for(let u=0;u<y.length;u++)y[u].call(void 0,o,g)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},r.forwardEvent=function(o,g){return o(y=>g.fire(y))},r.runAndSubscribe=function(o,g){return g(void 0),o(y=>g(y))}},859:(b,r)=>{function o(g){for(const y of g)y.dispose();g.length=0}Object.defineProperty(r,"__esModule",{value:!0}),r.getDisposeArrayDisposable=r.disposeArray=r.toDisposable=r.MutableDisposable=r.Disposable=void 0,r.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const g of this._disposables)g.dispose();this._disposables.length=0}register(g){return this._disposables.push(g),g}unregister(g){const y=this._disposables.indexOf(g);y!==-1&&this._disposables.splice(y,1)}},r.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(g){var y;this._isDisposed||g===this._value||((y=this._value)==null||y.dispose(),this._value=g)}clear(){this.value=void 0}dispose(){var g;this._isDisposed=!0,(g=this._value)==null||g.dispose(),this._value=void 0}},r.toDisposable=function(g){return{dispose:g}},r.disposeArray=o,r.getDisposeArrayDisposable=function(g){return{dispose:()=>o(g)}}},485:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FourKeyMap=r.TwoKeyMap=void 0;class o{constructor(){this._data={}}set(y,u,p){this._data[y]||(this._data[y]={}),this._data[y][u]=p}get(y,u){return this._data[y]?this._data[y][u]:void 0}clear(){this._data={}}}r.TwoKeyMap=o,r.FourKeyMap=class{constructor(){this._data=new o}set(g,y,u,p,S){this._data.get(g,y)||this._data.set(g,y,new o),this._data.get(g,y).set(u,p,S)}get(g,y,u,p){var S;return(S=this._data.get(g,y))==null?void 0:S.get(u,p)}clear(){this._data.clear()}}},399:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isChromeOS=r.isLinux=r.isWindows=r.isIphone=r.isIpad=r.isMac=r.getSafariVersion=r.isSafari=r.isLegacyEdge=r.isFirefox=r.isNode=void 0,r.isNode=typeof process<"u"&&"title"in process;const o=r.isNode?"node":navigator.userAgent,g=r.isNode?"node":navigator.platform;r.isFirefox=o.includes("Firefox"),r.isLegacyEdge=o.includes("Edge"),r.isSafari=/^((?!chrome|android).)*safari/i.test(o),r.getSafariVersion=function(){if(!r.isSafari)return 0;const y=o.match(/Version\/(\d+)/);return y===null||y.length<2?0:parseInt(y[1])},r.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(g),r.isIpad=g==="iPad",r.isIphone=g==="iPhone",r.isWindows=["Windows","Win16","Win32","WinCE"].includes(g),r.isLinux=g.indexOf("Linux")>=0,r.isChromeOS=/\bCrOS\b/.test(o)},385:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DebouncedIdleTask=r.IdleTaskQueue=r.PriorityTaskQueue=void 0;const g=o(399);class y{constructor(){this._tasks=[],this._i=0}enqueue(S){this._tasks.push(S),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(S){this._idleCallback=void 0;let N=0,_=0,l=S.timeRemaining(),m=0;for(;this._i<this._tasks.length;){if(N=Date.now(),this._tasks[this._i]()||this._i++,N=Math.max(1,Date.now()-N),_=Math.max(N,_),m=S.timeRemaining(),1.5*_>m)return l-N<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(l-N))}ms`),void this._start();l=m}this.clear()}}class u extends y{_requestCallback(S){return setTimeout(()=>S(this._createDeadline(16)))}_cancelCallback(S){clearTimeout(S)}_createDeadline(S){const N=Date.now()+S;return{timeRemaining:()=>Math.max(0,N-Date.now())}}}r.PriorityTaskQueue=u,r.IdleTaskQueue=!g.isNode&&"requestIdleCallback"in window?class extends y{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:u,r.DebouncedIdleTask=class{constructor(){this._queue=new r.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},147:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ExtendedAttrs=r.AttributeData=void 0;class o{constructor(){this.fg=0,this.bg=0,this.extended=new g}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new o;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}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}}r.AttributeData=o;class g{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,p=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=p}clone(){return new g(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}r.ExtendedAttrs=g},782:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellData=void 0;const g=o(133),y=o(855),u=o(147);class p extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(N){const _=new p;return _.setFromCharData(N),_}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,g.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(N){this.fg=N[y.CHAR_DATA_ATTR_INDEX],this.bg=0;let _=!1;if(N[y.CHAR_DATA_CHAR_INDEX].length>2)_=!0;else if(N[y.CHAR_DATA_CHAR_INDEX].length===2){const l=N[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=l&&l<=56319){const m=N[y.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=m&&m<=57343?this.content=1024*(l-55296)+m-56320+65536|N[y.CHAR_DATA_WIDTH_INDEX]<<22:_=!0}else _=!0}else this.content=N[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|N[y.CHAR_DATA_WIDTH_INDEX]<<22;_&&(this.combinedData=N[y.CHAR_DATA_CHAR_INDEX],this.content=2097152|N[y.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=p},855:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WHITESPACE_CELL_CODE=r.WHITESPACE_CELL_WIDTH=r.WHITESPACE_CELL_CHAR=r.NULL_CELL_CODE=r.NULL_CELL_WIDTH=r.NULL_CELL_CHAR=r.CHAR_DATA_CODE_INDEX=r.CHAR_DATA_WIDTH_INDEX=r.CHAR_DATA_CHAR_INDEX=r.CHAR_DATA_ATTR_INDEX=r.DEFAULT_EXT=r.DEFAULT_ATTR=r.DEFAULT_COLOR=void 0,r.DEFAULT_COLOR=0,r.DEFAULT_ATTR=256|r.DEFAULT_COLOR<<9,r.DEFAULT_EXT=0,r.CHAR_DATA_ATTR_INDEX=0,r.CHAR_DATA_CHAR_INDEX=1,r.CHAR_DATA_WIDTH_INDEX=2,r.CHAR_DATA_CODE_INDEX=3,r.NULL_CELL_CHAR="",r.NULL_CELL_WIDTH=1,r.NULL_CELL_CODE=0,r.WHITESPACE_CELL_CHAR=" ",r.WHITESPACE_CELL_WIDTH=1,r.WHITESPACE_CELL_CODE=32},133:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(o){return o>65535?(o-=65536,String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):String.fromCharCode(o)},r.utf32ToString=function(o,g=0,y=o.length){let u="";for(let p=g;p<y;++p){let S=o[p];S>65535?(S-=65536,u+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):u+=String.fromCharCode(S)}return u},r.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(o,g){const y=o.length;if(!y)return 0;let u=0,p=0;if(this._interim){const S=o.charCodeAt(p++);56320<=S&&S<=57343?g[u++]=1024*(this._interim-55296)+S-56320+65536:(g[u++]=this._interim,g[u++]=S),this._interim=0}for(let S=p;S<y;++S){const N=o.charCodeAt(S);if(55296<=N&&N<=56319){if(++S>=y)return this._interim=N,u;const _=o.charCodeAt(S);56320<=_&&_<=57343?g[u++]=1024*(N-55296)+_-56320+65536:(g[u++]=N,g[u++]=_)}else N!==65279&&(g[u++]=N)}return u}},r.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(o,g){const y=o.length;if(!y)return 0;let u,p,S,N,_=0,l=0,m=0;if(this.interim[0]){let C=!1,T=this.interim[0];T&=(224&T)==192?31:(240&T)==224?15:7;let E,A=0;for(;(E=63&this.interim[++A])&&A<4;)T<<=6,T|=E;const D=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=D-A;for(;m<R;){if(m>=y)return 0;if(E=o[m++],(192&E)!=128){m--,C=!0;break}this.interim[A++]=E,T<<=6,T|=63&E}C||(D===2?T<128?m--:g[_++]=T:D===3?T<2048||T>=55296&&T<=57343||T===65279||(g[_++]=T):T<65536||T>1114111||(g[_++]=T)),this.interim.fill(0)}const f=y-4;let v=m;for(;v<y;){for(;!(!(v<f)||128&(u=o[v])||128&(p=o[v+1])||128&(S=o[v+2])||128&(N=o[v+3]));)g[_++]=u,g[_++]=p,g[_++]=S,g[_++]=N,v+=4;if(u=o[v++],u<128)g[_++]=u;else if((224&u)==192){if(v>=y)return this.interim[0]=u,_;if(p=o[v++],(192&p)!=128){v--;continue}if(l=(31&u)<<6|63&p,l<128){v--;continue}g[_++]=l}else if((240&u)==224){if(v>=y)return this.interim[0]=u,_;if(p=o[v++],(192&p)!=128){v--;continue}if(v>=y)return this.interim[0]=u,this.interim[1]=p,_;if(S=o[v++],(192&S)!=128){v--;continue}if(l=(15&u)<<12|(63&p)<<6|63&S,l<2048||l>=55296&&l<=57343||l===65279)continue;g[_++]=l}else if((248&u)==240){if(v>=y)return this.interim[0]=u,_;if(p=o[v++],(192&p)!=128){v--;continue}if(v>=y)return this.interim[0]=u,this.interim[1]=p,_;if(S=o[v++],(192&S)!=128){v--;continue}if(v>=y)return this.interim[0]=u,this.interim[1]=p,this.interim[2]=S,_;if(N=o[v++],(192&N)!=128){v--;continue}if(l=(7&u)<<18|(63&p)<<12|(63&S)<<6|63&N,l<65536||l>1114111)continue;g[_++]=l}}return _}}},776:function(b,r,o){var g=this&&this.__decorate||function(l,m,f,v){var C,T=arguments.length,E=T<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,f):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(l,m,f,v);else for(var A=l.length-1;A>=0;A--)(C=l[A])&&(E=(T<3?C(E):T>3?C(m,f,E):C(m,f))||E);return T>3&&E&&Object.defineProperty(m,f,E),E},y=this&&this.__param||function(l,m){return function(f,v){m(f,v,l)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;const u=o(859),p=o(97),S={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let N,_=r.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(l){super(),this._optionsService=l,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),N=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(l){for(let m=0;m<l.length;m++)typeof l[m]=="function"&&(l[m]=l[m]())}_log(l,m,f){this._evalLazyOptionalParams(f),l.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+m,...f)}trace(l,...m){var f;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.trace.bind(this._optionsService.options.logger))??console.log,l,m)}debug(l,...m){var f;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.debug.bind(this._optionsService.options.logger))??console.log,l,m)}info(l,...m){var f;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.info.bind(this._optionsService.options.logger))??console.info,l,m)}warn(l,...m){var f;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.warn.bind(this._optionsService.options.logger))??console.warn,l,m)}error(l,...m){var f;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.error.bind(this._optionsService.options.logger))??console.error,l,m)}};r.LogService=_=g([y(0,p.IOptionsService)],_),r.setTraceLogger=function(l){N=l},r.traceCall=function(l,m,f){if(typeof f.value!="function")throw new Error("not supported");const v=f.value;f.value=function(...C){if(N.logLevel!==p.LogLevelEnum.TRACE)return v.apply(this,C);N.trace(`GlyphRenderer#${v.name}(${C.map(E=>JSON.stringify(E)).join(", ")})`);const T=v.apply(this,C);return N.trace(`GlyphRenderer#${v.name} return`,T),T}}},726:(b,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createDecorator=r.getServiceDependencies=r.serviceRegistry=void 0;const o="di$target",g="di$dependencies";r.serviceRegistry=new Map,r.getServiceDependencies=function(y){return y[g]||[]},r.createDecorator=function(y){if(r.serviceRegistry.has(y))return r.serviceRegistry.get(y);const u=function(p,S,N){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(_,l,m){l[o]===l?l[g].push({id:_,index:m}):(l[g]=[{id:_,index:m}],l[o]=l)})(u,p,N)};return u.toString=()=>y,r.serviceRegistry.set(y,u),u}},97:(b,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IDecorationService=r.IUnicodeService=r.IOscLinkService=r.IOptionsService=r.ILogService=r.LogLevelEnum=r.IInstantiationService=r.ICharsetService=r.ICoreService=r.ICoreMouseService=r.IBufferService=void 0;const g=o(726);var y;r.IBufferService=(0,g.createDecorator)("BufferService"),r.ICoreMouseService=(0,g.createDecorator)("CoreMouseService"),r.ICoreService=(0,g.createDecorator)("CoreService"),r.ICharsetService=(0,g.createDecorator)("CharsetService"),r.IInstantiationService=(0,g.createDecorator)("InstantiationService"),function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"}(y||(r.LogLevelEnum=y={})),r.ILogService=(0,g.createDecorator)("LogService"),r.IOptionsService=(0,g.createDecorator)("OptionsService"),r.IOscLinkService=(0,g.createDecorator)("OscLinkService"),r.IUnicodeService=(0,g.createDecorator)("UnicodeService"),r.IDecorationService=(0,g.createDecorator)("DecorationService")}},w={};function j(b){var r=w[b];if(r!==void 0)return r.exports;var o=w[b]={exports:{}};return d[b].call(o.exports,o,o.exports,j),o.exports}var L={};return(()=>{var b=L;Object.defineProperty(b,"__esModule",{value:!0}),b.WebglAddon=void 0;const r=j(345),o=j(859),g=j(399),y=j(666),u=j(776);class p extends o.Disposable{constructor(N){if(g.isSafari&&(0,g.getSafariVersion)()<16){const _={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",_))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=N,this._onChangeTextureAtlas=this.register(new r.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new r.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new r.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new r.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(N){const _=N._core;if(!N.element)return void this.register(_.onWillOpen(()=>this.activate(N)));this._terminal=N;const l=_.coreService,m=_.optionsService,f=_,v=f._renderService,C=f._characterJoinerService,T=f._charSizeService,E=f._coreBrowserService,A=f._decorationService,D=f._logService,R=f._themeService;(0,u.setTraceLogger)(D),this._renderer=this.register(new y.WebglRenderer(N,C,T,E,l,A,m,R,this._preserveDrawingBuffer)),this.register((0,r.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,r.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,r.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,r.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),v.setRenderer(this._renderer),this.register((0,o.toDisposable)(()=>{const M=this._terminal._core._renderService;M.setRenderer(this._terminal._core._createRenderer()),M.handleResize(N.cols,N.rows)}))}get textureAtlas(){var N;return(N=this._renderer)==null?void 0:N.textureAtlas}clearTextureAtlas(){var N;(N=this._renderer)==null||N.clearTextureAtlas()}}b.WebglAddon=p})(),L})())})(N1);var FM=N1.exports;function Mx(c,a){let d=0,w=c;for(;Math.abs(w)>=a;)w>0?(d+=1,w-=a):(d-=1,w+=a);return{notches:d,rem:w}}const HM=c=>c>0?"up":"down";function zM(c,a,d=24){return Math.abs(a)<=Math.abs(c)?null:a<=-d?"show":a>=d?"hide":null}function $M(c,a){if(!c)return!1;const d=c.scrollHeight-c.clientHeight;return d<=1?!1:a<0?c.scrollTop<d-1:a>0?c.scrollTop>1:!1}function WM(c,a=44,d=.5){return c*a*d/(a+d*Math.abs(c))}function Ux(c){if(!c)return!1;const a=c.tagName;return!(a!=="INPUT"&&a!=="TEXTAREA"||c.closest&&c.closest(".xterm"))}function GM(c){return c.replace(/\r?\n/g,`\r
272
+ `)}function YM(c,a){let d=a,w=!1,j=!1,L=!1;const b=y=>{/\S/.test(y)&&(w=!0,d&&(j=!0)),d&&y.length&&(L=!0)},r=/\x1b\[([0-9;]*)m/g;let o=0,g=r.exec(c);for(;g;){b(c.slice(o,g.index)),o=r.lastIndex;const y=g[1]===""?[0]:g[1].split(";").map(Number);for(let u=0;u<y.length;u+=1){const p=y[u];if(p===0||p===49)d=!1;else if(p>=40&&p<=47||p>=100&&p<=107)d=!0;else if(p===38||p===48){const S=p===48;y[u+1]===5?(u+=2,S&&(d=!0)):y[u+1]===2&&(u+=4,S&&(d=!0))}}g=r.exec(c)}return b(c.slice(o)),{bgEnd:d,hasText:w,hasShadeText:j,hasShadeBlank:L}}function qM(c){const a=[];let d=!1,w=[],j=-1,L=!1;const b=()=>{j>=0&&L&&(a[j]+="\x1B[49m"),j=-1,L=!1},r=()=>{if(w.length){a.push("\x1B[0m");for(let o=1;o<w.length;o+=1)a.push("");w=[]}};for(const o of c){const g=YM(o,d);g.hasShadeText?(a.push(...w),w=[],a.push(o),j=a.length-1,L=g.bgEnd):!g.hasText&&(d||g.bgEnd||g.hasShadeBlank)?w.push(o):(b(),r(),a.push(o)),d=g.bgEnd}return b(),r(),a}function KM(c){const a=GM(c.replace(/\n$/,""));return qM(a.split(`\r
273
+ `)).join(`\r
274
+ `)}function XM(c,a,d=0,w=!1){if(!c||!c.vis&&!w)return"\x1B[?25l";const j=d?Math.min(a|0,d|0):a|0,L=Math.max(1,j-Math.max(0,c.row|0)),b=Math.max(0,c.col|0)+1;return`\x1B[${L};${b}H\x1B[?25h`}function JM(c,{base:a=1e3,max:d=1e4,factor:w=2,jitter:j=.2,rng:L=Math.random}={}){if(c<=0)return 0;const b=Math.min(d,a*w**(c-1));return Math.round(b*(1+j*(L()*2-1)))}const ZM=1e3;function QM(c){return c<8e3?ZM:c<6e4?5e3:1e4}const e3=.95,t3=.015,n3=.1,i3=50;function r3(c,a,d=e3,w=t3){const j=c*a,L=c*d**(a/16);return{delta:j,v:L,done:Math.abs(L)<w}}function s3(c,a,d=n3,w=i3){return a<=w&&Math.abs(c)>=d}const a3={failCount:0,connected:!0};function Kv(c,a,{threshold:d=2}={}){switch(a){case"ok":case"reset":return{failCount:0,connected:!0};case"fail":{const w=c.failCount+1;return{failCount:w,connected:w<d}}default:return c}}function o3(c,a){const d=c.getCell(a-1);if(!d)return!1;if(d.getWidth()===0)return!0;const w=d.getChars();if(w&&w!==" ")return!0;const j=c.getCell(a-2);return!!j&&j.getWidth()===0}function pg(c,a,d){var b;const w=c.getLine(a+1);if(!w)return!1;if(w.isWrapped)return!0;const j=c.getLine(a);if(!j||!o3(j,d))return!1;const L=(b=w.getCell(0))==null?void 0:b.getChars();return!!L&&L!==" "}function C1(c,a,d){let w=a;for(;w>0&&pg(c,w-1,d);)w--;let j="";const L=[];let b=w;for(;;){const r=c.getLine(b);if(!r)break;const o=b+1<c.length&&pg(c,b,d),g=[],y=[];for(let p=0;p<d;p++){const S=r.getCell(p);if(!S)continue;const N=S.getWidth();N!==0&&(g.push(S.getChars()),y.push({row:b,col:p,w:N}))}let u=g.length;if(o)for(;u>0&&(g[u-1]===""||g[u-1]===" ");)u--;for(let p=0;p<u;p++)j+=g[p]||" ",L.push(y[p]);if(o){b++;continue}break}return{text:j,cells:L}}function l3(c){const a=c.buffer.active,d=c.cols,w=0,j=a.length,L=[];let b=w;for(;b>0&&pg(a,b-1,d);)b--;for(;b<j;){if(!a.getLine(b)){b++;continue}const{text:r,cells:o}=C1(a,b,d);for(const{start:g,end:y}of _1(r)){let u=g;for(;u<y;){const p=o[u].row;let S=u;for(;S<y&&o[S].row===p;)S++;const N=o[u].col,_=o[S-1],l=_.col+_.w;p>=w&&p<j&&L.push({y:p,x:N,width:l-N,path:r.slice(g,y)}),u=S}}b=o.length?o[o.length-1].row+1:b+1}return L}function c3(c,a){const d=c.buffer.active,w=c.cols,j=a-1;if(j<0||j>=d.length)return[];const{text:L,cells:b}=C1(d,j,w),r=[];for(const{start:o,end:g}of _1(L)){const y=b[o],u=b[g-1];j<y.row||j>u.row||r.push({range:{start:{x:y.col+1,y:y.row+1},end:{x:u.col+u.w,y:u.row+1}},path:L.slice(o,g)})}return r}const E1=(c,a,d)=>Math.max(a,Math.min(d,c));function u3(c,a){return!a||a<=0?1:Math.max(1,Math.floor(c/a))}function Ox(c,a,d){return d<0?c>0?"internal":"forward":c<a?"internal":"forward"}function d3(c,a){return E1(c,0,a)}function h3(c,a,d){return E1(c-a+1,0,d)}function Px(c,a){return!c||!c.vis?null:Math.max(0,a-1-Math.max(0,c.row|0))}function Bx(c,a){return Math.max(0,a-c)}function Ix({cursorLine:c,viewportY:a,visibleRows:d,baseY:w,armed:j}){return j?c<a?d3(c,w):c>=a+d?h3(c,d,w):null:null}const f3=[{family:"JetBrainsMono Nerd Font",url:"/fonts/JetBrainsMonoNerdFontMono-Regular.woff2",probe:void 0},{family:"TW Unifont",url:"/fonts/TWUnifont.woff2",probe:"⏵",unicodeRange:"U+2190-21FF, U+2300-23FF, U+2400-243F, U+2500-257F, U+2580-259F, U+25A0-25FF, U+2600-26FF, U+2700-27BF, U+2800-28FF"}],m3=4,p3=1500,v3=c=>{for(const a of document.fonts)if(a.family.replace(/["']/g,"")===c)return a;return null},g3=async({family:c,url:a,probe:d,unicodeRange:w},j)=>{var L;for(let b=0;b<m3;b++){try{await document.fonts.load(`${j}px "${c}"`,d)}catch{}if(((L=v3(c))==null?void 0:L.status)==="loaded")return!0;try{const r=new FontFace(c,`url(${a}) format('woff2')`,w?{unicodeRange:w}:{});return await r.load(),document.fonts.add(r),!0}catch{}await new Promise(r=>setTimeout(r,p3*2**b))}return!1};let Xv=null;function _3(c=14){var a;return Xv||(Xv=typeof document<"u"&&((a=document.fonts)!=null&&a.load)?Promise.all(f3.map(d=>g3(d,c))):Promise.resolve([!1,!1])),Xv}function D1(c){const a=c.split(`
275
+ `).map(j=>j.trim());let d=0,w=a.length;for(;d<w&&a[d]==="";)d++;for(;w>d&&a[w-1]==="";)w--;return a.slice(d,w).join(`
276
+ `)}function b3(c){return c?{lines:c.split(`
277
+ `).length,chars:D1(c).replace(/\n/g,"").length}:{lines:0,chars:0}}function y3(c,a){return{start:{col:0,row:c.start.row},end:{col:a-1,row:c.end.row}}}function w3(c,a,d,w,j){let L=c.start.row,b=c.end.row;for(;L>w&&d(L-1).trim()!=="";)L--;for(;b<j&&d(b+1).trim()!=="";)b++;return{start:{col:0,row:L},end:{col:a-1,row:b}}}function Vx(c,a,d,w,j){return{x:c*w,y:(a-d)*j}}function x3(c){const[a,d]=H.useState(""),[w,j]=H.useState(!1),L=H.useRef(null),b=H.useRef(null);return H.useEffect(()=>()=>{clearTimeout(L.current),clearInterval(b.current)},[]),{dbg:a,dbgVisible:w,flash:()=>{const o=()=>{const g=c.current;g&&d(`${g.cols}×${g.rows} · ${g.options.fontSize}px`)};o(),j(!0),clearTimeout(L.current),clearInterval(b.current),b.current=setInterval(o,400),L.current=setTimeout(()=>{j(!1),clearInterval(b.current)},3e3)}}}const S3=200,N3=20,Jv=100,vh=5e3,C3=15,E3=H.forwardRef(function({pane:a,inset:d=0,onAuthFail:w,onDocLinkTap:j,onTap:L},b){const r=H.useRef(null),o=H.useRef(null),g=H.useRef(0),y=H.useRef(!1),u=H.useRef(!1),p=H.useRef(""),S=H.useRef(L);S.current=L;const N=H.useRef([]),_=H.useRef(null),l=H.useRef(null),m=H.useRef(!1),f=H.useRef(null),v=H.useRef(j);v.current=j;const C=H.useRef(XS()),T=H.useRef(null),E=H.useRef(WL()),A=H.useRef(null),[D,R]=H.useState(!1),[M,$]=H.useState(!0),O=H.useRef(!1),[I,Y]=H.useState(""),[Q,Z]=H.useState(null),ee=H.useRef(!1),oe=H.useRef(!1),[P,W]=H.useState(!1),[V,J]=H.useState(!1),{dbg:_e,dbgVisible:be,flash:Ve}=x3(o),[Le,ie]=H.useState(""),[G,pe]=H.useState(!1),le=H.useRef(null),Be=H.useRef(!1),Te=H.useRef(!1),Xe=H.useRef(!1),Ke=H.useRef(0),st=H.useRef(null),jt=H.useRef(!1),Ye=H.useRef(null);H.useImperativeHandle(b,()=>({getSize:()=>{const ne=o.current;return ne?{cols:ne.cols,rows:ne.rows}:null},flash:Ve,getFontSize:()=>{const ne=o.current;return ne?{size:ne.options.fontSize,auto:E.current==null}:null},setFontSize:ne=>{var me;const Fe=o.current;if(!Fe)return null;const tt=Math.max(8,Math.min(40,Math.round(ne)));return Fe.options.fontSize=tt,E.current=tt,qc(tt),(me=le.current)==null||me.call(le),tt},autoFont:()=>{var Fe;const ne=o.current;ne&&(ne.options.fontSize=14,E.current=null,GL(),(Fe=le.current)==null||Fe.call(le))},wake:()=>{var ne;return(ne=st.current)==null?void 0:ne.call(st)},setDocHighlight:ne=>{var Fe;C.current=!!ne,(Fe=T.current)==null||Fe.call(T)}}),[]),H.useEffect(()=>{var Fe;const ne=g.current;g.current=d,d>0&&ne===0&&(u.current=!0),d===0&&ne>0&&(Xe.current=!0),(Fe=le.current)==null||Fe.call(le),d===0&&(u.current=!1)},[d]),H.useEffect(()=>{var ke;const ne=new VM.Terminal({disableStdin:!0,allowProposedApi:!0,scrollback:vh+100,convertEol:!1,fontSize:E.current??14,fontFamily:"ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, 'Cascadia Mono', 'Roboto Mono', 'Noto Sans Mono', 'DejaVu Sans Mono', 'Courier New', 'JetBrainsMono Nerd Font', 'TW Unifont', monospace",theme:{selectionBackground:"rgba(10,132,255,0.9)",selectionForeground:"#ffffff"},cursorInactiveStyle:"block"});ne.open(r.current),o.current=ne;const Fe=document.activeElement;ne.focus(),ne.blur(),Fe&&Fe!==document.body&&typeof Fe.focus=="function"&&Fe.focus();const tt=ne.registerLinkProvider({provideLinks(te,Ne){if(!v.current){Ne(void 0);return}const De=c3(ne,te).map(({range:Ue,path:$e})=>({range:Ue,text:$e,decorations:{pointerCursor:!0,underline:!1},activate:it=>{var ht;return(ht=v.current)==null?void 0:ht.call(v,$e,(it==null?void 0:it.clientX)??0,(it==null?void 0:it.clientY)??0)}}));Ne(De.length?De:void 0)}});let me=null;const rt=()=>{try{me=new FM.WebglAddon,me.onContextLoss(()=>me.dispose()),ne.loadAddon(me)}catch{me=null}};rt();const Re=r.current.querySelector(".xterm-helper-textarea");Re&&(Re.readOnly=!0,Re.tabIndex=-1,Re.setAttribute("inputmode","none"),Re.setAttribute("aria-hidden","true"));let fe=null,ce=!1,Ee=!1,Oe=!1,vt=!1;ee.current=!1,oe.current=!1,W(!1),O.current=!1,Z(null),Y("");const Ct=()=>Math.min(vh,Math.max(24,ne.rows+N3));let ot=Ct(),St=!0,yn=0,hn=null,qt="",It=null,Pt=0,Un=null,Hn=null,ei=Date.now();R(!1),pe(!1);let Di=!1;const ti=()=>{ce||Di||(Di=!0,requestAnimationFrame(()=>{ce||pe(!0)}))};let ii=a3;const Cn=te=>{ii=te,$(te.connected)};_3(E.current??14).then(()=>{if(!(ce||!me)){try{me.dispose()}catch{}rt(),ne.refresh(0,ne.rows-1)}});const fn=()=>ne.buffer.active,zn=(te="")=>{const Ne=fn();ie(vt&&!Ln()&&!ee.current?`历史模式 · 距底 ${Ne.baseY-Ne.viewportY}/${Ne.baseY} 行${Ee?" · 拉取中":""}${te}`:"")},Zt=()=>fn().viewportY>=fn().baseY,Ln=()=>fn().baseY-fn().viewportY<=C3,Rn=()=>fn().viewportY<=3,ri=()=>{!vt||Ee||!St||ot>=vh||!Rn()||(St=!1,_r(),ot=Math.min(Math.floor(ot/Jv)*Jv+Jv,vh),zn(" · 拉取↑"),ur(ot,!0,!0))};let re=0;const Ie=()=>{_.current&&(_.current.deco.dispose(),_.current.marker.dispose(),_.current=null)},Ze=()=>{if(ce)return;const te=It,Ne=ne.buffer.active;if(!(te&&(te.vis||jt.current)&&ee.current&&Ne.viewportY<Ne.baseY)){Ie(),ne.write(XM(te,ne.rows,Pt,jt.current)),wt();return}ne.write("\x1B[?25l"),Ie();const Ue=Pt-1-(te.row|0),$e=ne.registerMarker(Ue-(Ne.baseY+Ne.cursorY));if(!$e){wt();return}const it=ne.registerDecoration({marker:$e,x:Math.max(0,te.col|0),width:1});if(!it){$e.dispose(),wt();return}it.onRender(ht=>{ht.classList.add("cursor-deco")}),_.current={deco:it,marker:$e},wt()},yt=()=>{l.current&&(l.current.deco.dispose(),l.current.marker.dispose(),l.current=null)},wt=()=>{yt();const te=It;if(ce||!m.current||!ee.current||!te)return;const Ne=ne.buffer.active,De=Pt-1-(te.row|0),Ue=ne.registerMarker(De-(Ne.baseY+Ne.cursorY));if(!Ue)return;const $e=ne.registerDecoration({marker:Ue,x:0,width:ne.cols});if(!$e){Ue.dispose();return}$e.onRender(it=>{it.classList.add("locate-deco")}),l.current={deco:$e,marker:Ue}};f.current=wt;const gt=()=>{if(ce||!Un||Un.alt)return Promise.resolve();const{seed:te,contentRows:Ne}=Un,De=Ne<ne.rows?Bx(Ne,ne.rows):0;if(Ne+De===Pt)return Promise.resolve();const Ue=De?`
278
+ `.repeat(De)+te:te;return Pt=Ue.split(`
279
+ `).length,new Promise($e=>ne.write("\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H"+Ue,()=>{if(!ce){ne.scrollToBottom();try{wi(ne)}catch{}}$e()}))},Rt=(te=0)=>{var nn;if(ce||!r.current||!ne.rows)return;const Ne=r.current.getBoundingClientRect(),De=Math.min(Ne.bottom,window.innerHeight-(g.current||0)),Ue=Math.max(Ne.top,0),$e=Math.max(0,De-Ue),it=r.current.querySelector(".xterm-screen"),ht=it?it.getBoundingClientRect().height:0;if(!$e||!ht)return;(nn=r.current.parentElement)==null||nn.style.setProperty("--vis-h",`${$e}px`),g.current===0&&(Ke.current=$e);const Nt=ht/ne.rows;if(Be.current&&re){Be.current=!1;const rn=ne.options.fontSize||14,gn=Math.max(8,Math.min(40,Math.round(rn*(Ke.current||$e)/(re*Nt))));if(Te.current=!0,E.current=gn,qc(gn),gn!==rn){ne.options.fontSize=gn,requestAnimationFrame(()=>Rt(te));return}}if(Te.current&&re){const rn=Math.floor((Ke.current||$e)/Nt),gn=ne.options.fontSize||14;if(rn<re&&gn>8){E.current=gn-1,qc(gn-1),ne.options.fontSize=gn-1,requestAnimationFrame(()=>Rt(te));return}Te.current=!1,E.current=gn,qc(gn)}if(g.current===0&&E.current==null&&re&&te<4){const rn=re*Nt;if(rn>$e+4){const gn=ne.options.fontSize||14,xi=Math.max(6,Math.round(gn*($e/rn)));if(xi<gn){ne.options.fontSize=xi,requestAnimationFrame(()=>Rt(te+1));return}}}const Qe=u3($e,Nt);if(Qe!==ne.rows){ne.write(`\x1B[?25l\x1B[${ne.rows};1H`,()=>{if(!ce){if(ne.resize(ne.cols,Qe),ee.current){const rn=Px(It,Pt),gn=()=>{const xi=rn==null?null:Ix({cursorLine:rn,viewportY:fn().viewportY,visibleRows:ne.rows,baseY:fn().baseY,armed:!0});xi!=null&&ne.scrollToLine(xi)};g.current>0?(ne.scrollToTop(),gn()):Xe.current?(Xe.current=!1,gn()):ne.scrollToTop()}else ne.scrollToBottom();te<4?requestAnimationFrame(()=>Rt(te+1)):gt().then(()=>{ce||(Ze(),ti())})}});return}gt().then(()=>{ce||(Ze(),ti())})},bt=()=>requestAnimationFrame(()=>Rt(0));le.current=bt;const wn=()=>bt();window.addEventListener("resize",wn),window.addEventListener("orientationchange",wn);let on=((ke=r.current)==null?void 0:ke.clientHeight)||0;const Wt=typeof ResizeObserver<"u"?new ResizeObserver(()=>{var De;const te=((De=r.current)==null?void 0:De.clientHeight)||0;if(!te)return;const Ne=te>on;on=te,Ne&&bt()}):null;Wt&&r.current&&Wt.observe(r.current);const pn=(te,Ne)=>{var Qe;const De=(Qe=r.current)==null?void 0:Qe.querySelector(".xterm-screen");if(!De||!ne.cols||!ne.rows)return null;const Ue=De.getBoundingClientRect(),$e=Ue.width/ne.cols,it=Ue.height/ne.rows;if(!$e||!it)return null;const ht=Math.max(0,Math.min(ne.cols-1,Math.floor((te-Ue.left)/$e))),Nt=Math.max(0,Math.min(ne.rows-1,Math.floor((Ne-Ue.top)/it)));return{col:ht,row:fn().viewportY+Nt}};let vn=null;const Yn=()=>{var Ue;const te=(Ue=ne.getSelectionPosition)==null?void 0:Ue.call(ne);if(!te)return null;let Ne=te.end.x-1,De=te.end.y;return Ne<0&&(De-=1,Ne=ne.cols-1),{start:{col:te.start.x,row:te.start.y},end:{col:Ne,row:De}}},mn=()=>{var gn;const te=Yn(),Ne=(gn=r.current)==null?void 0:gn.querySelector(".xterm-screen");if(!te||!Ne){Z(null),Y("");return}const De=Ne.getBoundingClientRect(),Ue=r.current.parentElement.getBoundingClientRect(),$e=De.width/ne.cols,it=De.height/ne.rows,ht=fn().viewportY,Nt={x:De.left-Ue.left,y:De.top-Ue.top},Qe=Vx(te.start.col,te.start.row,ht,$e,it),nn=Vx(te.end.col+1,te.end.row,ht,$e,it);Z({start:{x:Qe.x+Nt.x,y:Qe.y+Nt.y,ch:it},end:{x:nn.x+Nt.x,y:nn.y+Nt.y,ch:it},wrapW:Ue.width});const rn=ne.getSelection();if(rn){const{lines:xi,chars:ki}=b3(rn);Y(`复制模式 · ${xi} 行 · ${ki} 字`)}else Y("")},ji=()=>Yn(),si=te=>{var Ne;return((Ne=fn().getLine(te))==null?void 0:Ne.translateToString(!0))??""},Vt=te=>{if(!te)return;const Ne=ne.cols,De=te.end.row*Ne+te.end.col-(te.start.row*Ne+te.start.col)+1;ne.select(te.start.col,te.start.row,De),mn()};Ye.current={currentRange:ji,paraLineText:si,selectRange:Vt};const ae=(te,Ne)=>{var ht,Nt;const De=pn(te,Ne);if(!De)return;const Ue=((ht=fn().getLine(De.row))==null?void 0:ht.translateToString(!1))??"";let $e=De.col,it=De.col;if(/\S/.test(Ue[De.col]||"")){for(;$e>0&&/\S/.test(Ue[$e-1]);)$e--;for(;it<ne.cols-1&&/\S/.test(Ue[it+1]);)it++}vn={col:$e,row:De.row},O.current=!0,Z(null),ne.select($e,De.row,it-$e+1),mn(),(Nt=navigator.vibrate)==null||Nt.call(navigator,12)},He=(te,Ne)=>{var De,Ue;return((Ue=(De=fn().getLine(Math.floor(te/Ne)))==null?void 0:De.getCell(te%Ne))==null?void 0:Ue.getWidth())??1},xe=(te,Ne)=>te>0&&He(te,Ne)===0?te-1:te,X=(te,Ne)=>He(te,Ne)===2?te+1:te,je=(te,Ne)=>{const De=pn(te,Ne);if(!De||!vn)return;const Ue=ne.cols,$e=vn.row*Ue+vn.col,it=De.row*Ue+De.col,ht=xe(Math.min($e,it),Ue),Nt=X(Math.max($e,it),Ue);ne.select(ht%Ue,Math.floor(ht/Ue),Nt-ht+1),mn()},qe=()=>{vn=null,O.current=!1,Z(null),Y(""),ne.clearSelection()},kt=r.current;let mt=0,Tt=0,tn=0,Xt=0,Qt=!1,On=0,Gt=0,An=!1,Xn=!1,ai=null;const Vi=()=>{ai&&(clearTimeout(ai),ai=null)},Hr=te=>Math.hypot(te[0].clientX-te[1].clientX,te[0].clientY-te[1].clientY);let zr=0,ss=0,Ki=0,$r=0,Xi=0,Fi=null;const _r=()=>{Fi!=null&&(cancelAnimationFrame(Fi),Fi=null)};A.current=_r;const sn=(te,Ne,De)=>{if(!te)return;let Ue=De,$e=null;const it=ht=>{if($e==null){$e=ht,Fi=requestAnimationFrame(it);return}const Nt=ht-$e;$e=ht;const Qe=r3(Ue,Nt);Ue=Qe.v;const nn=te[Ne];te[Ne]=nn+Qe.delta;const rn=Math.abs(Qe.delta)>=1&&te[Ne]===nn;if(Ne==="scrollTop"&&(zn(),ri()),Qe.done||rn||Fi==null){Fi=null;return}Fi=requestAnimationFrame(it)};Fi=requestAnimationFrame(it)},as=22,lr=12;let At=0,Tr=0,Vn=0,cr=!1;const Ji=async()=>{var De;if(cr||Vn===0)return;cr=!0;const te=HM(Vn),Ne=Math.min(Math.abs(Vn),40);Vn=0;try{oe.current?await SA(a,te,Ne):await ug(a,Array(Ne).fill(te==="up"?"Up":"Down")),(De=st.current)==null||De.call(st)}catch{}finally{cr=!1,Vn!==0&&Ji()}},Cs=te=>{if(ei=Date.now(),Vi(),_r(),St=!0,Xn=O.current,An=!1,te.touches.length===2){Qt=!0,Xt=-1,On=Hr(te.touches),Gt=ne.options.fontSize||14;return}if(Qt=!1,te.touches.length!==1){Xt=-1;return}mt=te.touches[0].clientX,Tt=te.touches[0].clientY,tn=kt.scrollLeft,Xt=0,zr=mt,ss=Tt,Ki=te.timeStamp,$r=0,Xi=0,Tr=Tt,At=0,ai=setTimeout(()=>{ai=null,An=!0,Xt=-1,ae(mt,Tt)},500)},qn=te=>{if(Qt&&te.touches.length===2){if(On>0){const Ue=Math.max(8,Math.min(40,Math.round(Gt*(Hr(te.touches)/On))));Ue!==(ne.options.fontSize||14)&&(ne.options.fontSize=Ue,E.current=Ue)}te.preventDefault(),te.stopPropagation();return}if(An&&te.touches.length===1){je(te.touches[0].clientX,te.touches[0].clientY),te.preventDefault(),te.stopPropagation();return}if(te.touches.length===1&&(zn(),ri()),te.touches.length!==1)return;const Ne=te.touches[0].clientX-mt,De=te.touches[0].clientY-Tt;if((Math.abs(Ne)>6||Math.abs(De)>6)&&Vi(),Xt===0){if(Math.abs(Ne)<6&&Math.abs(De)<6)return;Xt=Math.abs(Ne)>Math.abs(De)?1:-1}if(Xt===1){kt.scrollLeft=tn-Ne;const Ue=te.touches[0].clientX,$e=te.timeStamp-Ki;$e>0&&($r=(zr-Ue)/$e),zr=Ue,Ki=te.timeStamp,te.preventDefault(),te.stopPropagation()}else{if(ee.current){te.preventDefault(),te.stopPropagation();const it=te.touches[0].clientY,ht=it-Tr;Tr=it;const Nt=r.current.querySelector(".xterm-viewport"),Qe=ht>0?-1:1;if(Nt&&Ox(fn().viewportY,fn().baseY,Qe)==="internal"){Nt.scrollTop-=ht,y.current=!0;return}const{notches:nn,rem:rn}=Mx(At+ht,lr);At=rn,nn&&(Vn+=nn,Ji());return}const Ue=te.touches[0].clientY,$e=te.timeStamp-Ki;$e>0&&(Xi=(ss-Ue)/$e),ss=Ue,Ki=te.timeStamp}},En=te=>{var Ne;if(Vi(),An&&te.touches.length===0){An=!1;const De=ne.getSelection();De&&De.trim()?mn():qe();return}if(Qt&&te.touches.length<2){Qt=!1,qc(ne.options.fontSize||14),bt();return}te.touches.length===0&&s3(Xt===1?$r:Xi,te.timeStamp-Ki)&&(Xt===1?sn(kt,"scrollLeft",$r):Xt===-1&&sn(kt.querySelector(".xterm-viewport"),"scrollTop",Xi)),te.touches.length===0&&!An&&!Qt&&Xt===0&&(Xn?qe():(Ne=S.current)==null||Ne.call(S))},os=te=>{if(te.deltaY){if(ee.current){te.preventDefault(),te.stopPropagation();const Ne=te.deltaMode===1?te.deltaY*as:te.deltaMode===2?te.deltaY*ne.rows*as:te.deltaY,{notches:De,rem:Ue}=Mx(At-Ne,as);At=Ue,De&&(Vn+=De,Ji());return}te.timeStamp-yn>200&&(St=!0),yn=te.timeStamp,zn(),ri()}},yi=te=>{Ux(document.activeElement)&&te.cancelable&&te.preventDefault()};kt.addEventListener("pointerdown",yi,{capture:!0}),kt.addEventListener("wheel",os,{capture:!0,passive:!1}),kt.addEventListener("touchstart",Cs,{capture:!0,passive:!0}),kt.addEventListener("touchmove",qn,{capture:!0,passive:!1}),kt.addEventListener("touchend",En,{capture:!0,passive:!0});const he=r.current.parentElement;let Se=null,We=null,et=null,_t=null,Et=0,Mt=0;const Kt=(te,Ne)=>{const De=pn(te,Ne);if(!De||We==null)return;const Ue=ne.cols,$e=De.row*Ue+De.col,it=Se==="start"?$e:$e+1;let ht=Math.min(We,it),Nt=Math.max(We,it);Nt<=ht&&(Nt=ht+1),ht=xe(ht,Ue),Nt=X(Nt-1,Ue)+1,ne.select(ht%Ue,Math.floor(ht/Ue),Nt-ht),mn()},$n=te=>{var Ue,$e,it;const Ne=($e=(Ue=te.target).closest)==null?void 0:$e.call(Ue,".sel-handle");if(!Ne)return;Se=Ne.dataset.end;const De=Yn();if(De){const ht=ne.cols,Nt=De.start.row*ht+De.start.col,Qe=De.end.row*ht+De.end.col;We=Se==="start"?Qe+1:Nt}else We=null;te.preventDefault(),te.stopPropagation(),(it=he.setPointerCapture)==null||it.call(he,te.pointerId)},Pn=te=>{if(!Se||We==null)return;Kt(te.clientX,te.clientY);const Ne=28;_t={x:te.clientX,y:te.clientY};const De=se.getBoundingClientRect();let Ue=0;if(te.clientY<De.top+Ne?(Et=-1,Ue=De.top+Ne-te.clientY):te.clientY>De.bottom-Ne?(Et=1,Ue=te.clientY-(De.bottom-Ne)):Et=0,Mt=Math.min(14,2+Ue*.28),Et!==0&&et==null){const $e=()=>{if(!Se||Et===0){et=null;return}const it=se.scrollTop;if(se.scrollTop=it+Et*Mt,Kt(_t.x,_t.y),se.scrollTop===it){et=null;return}et=requestAnimationFrame($e)};et=requestAnimationFrame($e)}else Et===0&&et!=null&&(cancelAnimationFrame(et),et=null);te.preventDefault()},Zi=te=>{var Ne;Se&&(Se=null,We=null,Et=0,et!=null&&(cancelAnimationFrame(et),et=null),(Ne=he.releasePointerCapture)==null||Ne.call(he,te.pointerId))};he.addEventListener("pointerdown",$n,{capture:!0}),he.addEventListener("pointermove",Pn,{capture:!0}),he.addEventListener("pointerup",Zi,{capture:!0}),he.addEventListener("pointercancel",Zi,{capture:!0});const wi=te=>{for(const{deco:Ue,marker:$e}of N.current)Ue.dispose(),$e.dispose();if(N.current=[],!v.current||!C.current)return;const Ne=te.buffer.active,De=Ne.baseY+Ne.cursorY;for(const{y:Ue,x:$e,width:it}of l3(te)){const ht=te.registerMarker(Ue-De);if(!ht)continue;const Nt=te.registerDecoration({marker:ht,x:$e,width:it});if(!Nt){ht.dispose();continue}Nt.onRender(Qe=>{Qe.classList.add("doc-deco")}),N.current.push({deco:Nt,marker:ht})}};T.current=()=>{!ce&&vt&&wi(ne)};const ur=async(te,Ne,De=!1)=>{var Nt;if(Ee||ce)return;Ee=!0;const Ue=Ne&&De?(Nt=r.current)==null?void 0:Nt.querySelector(".xterm-viewport"):null,$e=Ue&&fn().length?Ue.scrollHeight/fn().length:0,it=$e?Math.floor(Ue.scrollTop/$e):fn().viewportY,ht=Ne?fn().length-it:0;try{const Qe=await xA(a,te,Hn);if(ce)return;if(Cn(Kv(ii,"ok")),Qe.unchanged){R(Ne);return}Hn=Qe.hash,ee.current=!!Qe.alt,oe.current=!!Qe.mouseAware,W(Ar=>Ar===!!Qe.alt?Ar:!!Qe.alt),ei=Date.now();let nn=!1;Qe.width&&Qe.width!==ne.cols&&(ne.resize(Qe.width,ne.rows),nn=!0);const rn=re;Qe.height&&(re=Qe.height);const gn=!vt,xi=Qe.cur?`${Qe.cur.row},${Qe.cur.col},${Qe.cur.vis?1:0}`:"";if(!nn&&!gn&&Qe.ansi===hn&&xi===qt){R(Ne);return}const ki=KM(Qe.ansi),Ds=ki?ki.split(`
280
+ `).length:0;Un={seed:ki,contentRows:Ds,alt:Qe.alt};const Js=!Qe.alt&&Ds<ne.rows?Bx(Ds,ne.rows):0,Da=Js?`
281
+ `.repeat(Js)+ki:ki;if(Pt=Da?Da.split(`
282
+ `).length:0,await new Promise(Ar=>ne.write("\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H"+Da,Ar)),ce)return;if(hn=Qe.ansi,qt=xi,It=Qe.cur,Qe.cur&&Qe.cur.vis&&(jt.current=!1),Ne?ne.scrollToLine(Math.max(0,fn().length-ht)):ee.current&&gn?ne.scrollToTop():ne.scrollToBottom(),ee.current&&g.current>0){xi!==p.current&&(gn||(u.current=!0),p.current=xi);const Ar=Px(Qe.cur,Pt);if(Ar!=null){const ho=Ix({cursorLine:Ar,viewportY:fn().viewportY,visibleRows:ne.rows,baseY:fn().baseY,armed:u.current});ho!=null&&ne.scrollToLine(ho)}}vt=!0;try{wi(ne)}catch{}R(Ne),Ze(),(nn||gn||re!==rn)&&bt(),gn&&setTimeout(ti,400)}catch(Qe){Qe instanceof Rr?w==null||w():ce||Cn(Kv(ii,"fail"))}finally{Ee=!1,!ce&&vt&&zn(),Oe&&!ce&&(Oe=!1,Es())}},Lr=async()=>{if(!(Ee||ce)&&!O.current){if(vt&&!Ln()&&!ee.current){R(!0);return}ot=Ct(),await ur(ot,!Zt())}};let oi=0;async function Na(te){if(!ce&&te===oi&&await Lr(),ce||document.hidden||te!==oi)return;const Ne=ii.failCount>0?JM(ii.failCount):QM(Date.now()-ei);fe=setTimeout(()=>Na(te),Ne)}const Es=()=>{oi+=1,fe&&(clearTimeout(fe),fe=null),Na(oi)};Es();const Ca=()=>{if(ei=Date.now(),jt.current=!0,Ze(),Ee){Oe=!0;return}Es()};st.current=Ca;const Ea=()=>{document.hidden?(oi+=1,fe&&(clearTimeout(fe),fe=null)):(Cn(Kv(ii,"reset")),ot=Ct(),ei=Date.now(),Es())};document.addEventListener("visibilitychange",Ea);const z=ne.onScroll(()=>{if(!ce){if(Zt()){R(!1),ie("");return}R(!0),zn(),ri()}}),se=r.current.querySelector(".xterm-viewport"),we=()=>{O.current&&mn()};return se==null||se.addEventListener("scroll",we,{passive:!0}),()=>{ce=!0,et!=null&&cancelAnimationFrame(et),le.current=null,st.current=null,A.current=null,T.current=null,Ye.current=null,Vi(),_r(),fe&&clearTimeout(fe),document.removeEventListener("visibilitychange",Ea),window.removeEventListener("resize",wn),window.removeEventListener("orientationchange",wn),Wt==null||Wt.disconnect(),kt.removeEventListener("pointerdown",yi,{capture:!0}),kt.removeEventListener("wheel",os,{capture:!0}),kt.removeEventListener("touchstart",Cs,{capture:!0}),kt.removeEventListener("touchmove",qn,{capture:!0}),kt.removeEventListener("touchend",En,{capture:!0}),he.removeEventListener("pointerdown",$n,{capture:!0}),he.removeEventListener("pointermove",Pn,{capture:!0}),he.removeEventListener("pointerup",Zi,{capture:!0}),he.removeEventListener("pointercancel",Zi,{capture:!0}),se==null||se.removeEventListener("scroll",we),z.dispose(),tt.dispose();for(const{deco:te,marker:Ne}of N.current)te.dispose(),Ne.dispose();N.current=[],Ie(),yt(),f.current=null,ne.dispose(),o.current=null}},[a]);const $t=()=>{var Fe,tt,me,rt;(Fe=A.current)==null||Fe.call(A);const ne=(tt=r.current)==null?void 0:tt.querySelector(".xterm-viewport");ne&&(ne.scrollTop=ne.scrollHeight),(me=o.current)==null||me.scrollToBottom(),R(!1),ie(""),(rt=st.current)==null||rt.call(st)},Yt=async ne=>{var rt;const Fe=o.current,tt=Fe==null?void 0:Fe.buffer.active,me=ne==="up"?-1:1;if(Fe&&tt&&Ox(tt.viewportY,tt.baseY,me)==="internal"){Fe.scrollLines(me*Math.max(1,Fe.rows-1)),y.current=!0;return}try{await ug(a,[ne==="up"?"PageUp":"PageDown"]),(rt=st.current)==null||rt.call(st)}catch{}},dt=()=>{var Fe;const ne=!V;J(ne),m.current=ne,(Fe=f.current)==null||Fe.call(f)},Je=()=>{var ne;Be.current=!0,(ne=le.current)==null||ne.call(le)},nt=async()=>{const ne=o.current,Fe=D1((ne==null?void 0:ne.getSelection())??"");if(Fe){let tt=!1;if(navigator.clipboard&&window.isSecureContext)try{await navigator.clipboard.writeText(Fe),tt=!0}catch{}if(!tt){const me=document.createElement("textarea");me.value=Fe,me.style.cssText="position:fixed;top:0;left:0;opacity:0",document.body.appendChild(me),me.focus(),me.select();try{document.execCommand("copy")}catch{}document.body.removeChild(me)}}ne==null||ne.clearSelection(),O.current=!1,Z(null),Y("")};return h.jsxDEV("div",{className:"terminal-wrap",children:[h.jsxDEV("div",{ref:r,className:G?"terminal":"terminal terminal--loading"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1390,columnNumber:7},this),!M&&h.jsxDEV("div",{className:"term-banner term-banner--err",children:"⚠ 连接断开,重连中…"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1391,columnNumber:22},this),be&&h.jsxDEV("div",{className:"dbg",children:_e},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1392,columnNumber:22},this),M&&Le&&!I&&h.jsxDEV("div",{className:"term-banner term-banner--hist",children:Le},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1393,columnNumber:47},this),I&&h.jsxDEV("div",{className:"term-banner term-banner--sel",children:I},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1394,columnNumber:19},this),Le&&h.jsxDEV("button",{className:"new-output",onClick:$t,children:"↓ 回到底部"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1395,columnNumber:22},this),P&&h.jsxDEV("div",{className:"term-pager",role:"group","aria-label":"翻页",onPointerDown:ne=>{Ux(document.activeElement)&&ne.cancelable&&ne.preventDefault()},children:[h.jsxDEV("div",{className:"term-pager-grp",children:[h.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"上翻页",onClick:()=>Yt("up"),children:h.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:h.jsxDEV("path",{d:"M6 14.5l6-6 6 6",fill:"none",stroke:"currentColor",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1408,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1407,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1406,columnNumber:13},this),h.jsxDEV("span",{className:"term-pager-div","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1411,columnNumber:13},this),h.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"下翻页",onClick:()=>Yt("down"),children:h.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:h.jsxDEV("path",{d:"M6 9.5l6 6 6-6",fill:"none",stroke:"currentColor",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1414,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1413,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1412,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1405,columnNumber:11},this),h.jsxDEV("div",{className:"term-pager-grp",children:[h.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"适配高度",title:"适配高度",onClick:Je,children:h.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:[h.jsxDEV("path",{d:"M5 4.5h14M5 19.5h14",fill:"none",stroke:"currentColor",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1421,columnNumber:17},this),h.jsxDEV("path",{d:"M12 8.5v7M9.8 10.8L12 8.5l2.2 2.3M9.8 13.2L12 15.5l2.2-2.3",fill:"none",stroke:"currentColor",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1422,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1420,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1419,columnNumber:13},this),h.jsxDEV("span",{className:"term-pager-div","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1425,columnNumber:13},this),h.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"定位光标行",title:"定位光标行","aria-pressed":V,onClick:dt,children:h.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:[h.jsxDEV("path",{d:"M5 7h14M5 17h14",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",opacity:"0.7"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1428,columnNumber:17},this),h.jsxDEV("rect",{x:"4",y:"10.5",width:"16",height:"3",rx:"1.5",fill:"currentColor"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1429,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1427,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1426,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1418,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1397,columnNumber:9},this),Q&&(()=>{const ne=Math.min(Q.start.x,Q.end.x),Fe=Math.min(Q.start.y,Q.end.y),tt=Math.max(Q.start.y,Q.end.y),me=Math.max(8,Math.min(ne,(Q.wrapW??0)-S3-8)),rt=Fe-44,Re=tt+(Q.start.ch||0)+8,fe=rt<4?Re:rt;return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"sel-handle sel-handle--start",style:{left:Q.start.x,top:Q.start.y,"--h":`${Q.start.ch}px`},"data-end":"start"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1447,columnNumber:11},this),h.jsxDEV("div",{className:"sel-handle sel-handle--end",style:{left:Q.end.x,top:Q.end.y,"--h":`${Q.end.ch}px`},"data-end":"end"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1450,columnNumber:11},this),h.jsxDEV("div",{className:"sel-callout",style:{left:me,top:fe},children:[h.jsxDEV("button",{type:"button",onClick:nt,children:"拷贝"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1455,columnNumber:13},this),h.jsxDEV("button",{type:"button",onClick:()=>{const ce=Ye.current;ce&&ce.selectRange(y3(ce.currentRange(),o.current.cols))},children:"整行"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1456,columnNumber:13},this),h.jsxDEV("button",{type:"button",onClick:()=>{const ce=Ye.current;if(!ce)return;const Ee=o.current.buffer.active;ce.selectRange(w3(ce.currentRange(),o.current.cols,ce.paraLineText,0,Ee.length-1))},children:"整段"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1460,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1453,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1446,columnNumber:9},this)})()]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1389,columnNumber:5},this)}),D3=[["esc","tab","tilde","slash","up","at","del"],["ctrl","shift","alt","left","down","right","enter"]],ou=["ctrl","shift","alt"],vg={kbd:"⌨",esc:"Esc",up:"▲",tab:"Tab",ctrl:"Ctrl",shift:"Shift",del:"⌫",left:"◀",down:"▼",right:"▶",alt:"Alt",slash:"/",tilde:"~",at:"@",enter:"Enter"},j3=new Set(["up","down","left","right","del"]),Fx={esc:"Escape",tab:"Tab",del:"BSpace",enter:"Enter",up:"Up",down:"Down",left:"Left",right:"Right"},Hx={slash:"/",tilde:"~",at:"@"};function k3(c){return c in Fx?{kind:"key",name:Fx[c]}:c in Hx?{kind:"text",ch:Hx[c]}:null}const gg="off",Ig="armed",_g="locked",Ks=c=>c===Ig||c===_g,R3=c=>ou.some(a=>Ks(c[a]));function bg(c){const a={};for(const d of ou)a[d]=c[d]===Ig?gg:c[d]??gg;return a}function j1(c,a){if(!c||!R3(a))return c;const d=Ks(a.ctrl),w=Ks(a.shift),j=Ks(a.alt);if(w&&c.kind==="key"){if(c.name==="Tab")return{kind:"key",name:"BTab"};if(["Up","Down","Left","Right"].includes(c.name))return{kind:"key",name:`S-${c.name}`}}return(d||j)&&c.kind==="text"&&/^[a-z0-9]$/i.test(c.ch)?{kind:"key",name:`${d?"C":"M"}-${c.ch.toLowerCase()}`}:c}const T3={up:"Up",down:"Down",left:"Left",right:"Right",enter:"Enter",ret:"Enter",return:"Enter",cr:"Enter",esc:"Escape",escape:"Escape",tab:"Tab",space:"Space",del:"BSpace",bs:"BSpace",bspace:"BSpace",backspace:"BSpace",home:"Home",end:"End",pgup:"PageUp",pageup:"PageUp",pgdn:"PageDown",pagedown:"PageDown"},L3={Escape:"Esc",BSpace:"⌫",Space:"Space",PageUp:"PgUp",PageDown:"PgDn"};function A3(c,a){const d=!!c.ctrl,w=!!c.shift,j=!!c.alt,L=(a||"").trim();if(!L)return null;const b=[];d&&b.push("Ctrl"),w&&b.push("Shift"),j&&b.push("Alt");const r=g=>[...b,g].join("+"),o=T3[L.toLowerCase()];return o?{name:o==="Tab"&&w&&!d&&!j?"BTab":(d?"C-":"")+(j?"M-":"")+(w?"S-":"")+o,label:r(L3[o]||o)}:L.length!==1||!d&&!j&&!w?null:d||j?{name:(d?"C-":"")+(j?"M-":"")+L.toLowerCase(),label:r(L.toUpperCase())}:{name:L.toUpperCase(),label:r(L.toUpperCase())}}function M3(c,{delay:a=400,interval:d=120}={}){let w=null,j=null;const L=()=>{w&&clearTimeout(w),j&&clearInterval(j),w=null,j=null};return{start:()=>{L(),c(),w=setTimeout(()=>{j=setInterval(c,d)},a)},stop:L}}const zx={up:"Up",down:"Down",left:"Left",right:"Right",tilde:"Tilde",slash:"Slash",at:"At",del:"Backspace"},k1=c=>{c.cancelable&&c.preventDefault()},U3=500;function O3({onKey:c,onText:a,mods:d,setMods:w,keyHeldRef:j}){const L=H.useRef(d);L.current=d;const b=o=>{const g=k3(o);if(!g)return;const y=ou.some(p=>Ks(L.current[p])),u=y?j1(g,L.current):g;u.kind==="key"?c(u.name):a(u.ch),y&&w(bg)},r=o=>ou.includes(o)?h.jsxDEV(B3,{id:o,state:d[o],setMods:w},o,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:43,columnNumber:40},this):h.jsxDEV(I3,{id:o,dispatch:b,keyHeldRef:j},o,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:44,columnNumber:12},this);return h.jsxDEV("div",{className:"keybar-grid",children:D3.flat().map(r)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:49,columnNumber:10},this)}const P3=300;function B3({id:c,state:a,setMods:d}){const w=H.useRef(-1/0),j=b=>{const r=b.timeStamp||0;if(r-w.current<P3){w.current=-1/0,d(o=>({...o,[c]:_g}));return}w.current=r,d(o=>({...o,[c]:Ks(o[c])?gg:Ig}))},L=a===_g?" locked":Ks(a)?" armed":"";return h.jsxDEV("button",{type:"button",className:`keybar-key keybar-mod${L}`,"data-key":c,"data-state":a,"aria-pressed":Ks(a),"aria-label":vg[c],onPointerDown:k1,onClick:j,children:vg[c]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:75,columnNumber:5},this)}function I3({id:c,dispatch:a,keyHeldRef:d}){const w=H.useRef(null),j=H.useRef(a);j.current=a;const L=H.useRef(null),b=S=>{d&&(d.current=S)},r=vg[c];if(!j3.has(c))return h.jsxDEV("button",{type:"button",className:"keybar-key","data-key":c,"aria-label":zx[c]||r,onPointerDown:k1,onClick:()=>a(c),children:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:94,columnNumber:12},this);const o=()=>{const S=L.current;S!=null&&S.guard&&(clearTimeout(S.guard),S.guard=null)},g=S=>{S.cancelable&&S.preventDefault(),w.current||(w.current=M3(()=>j.current(c)));const N={x:S.clientX,y:S.clientY,held:!1,moved:!1,guard:null};N.guard=setTimeout(()=>{N.held=!0,N.guard=null,w.current.start()},U3),L.current=N,b(!0)},y=S=>{const N=L.current;!N||N.held||(Math.abs(S.clientX-N.x)>8||Math.abs(S.clientY-N.y)>8)&&(N.moved=!0,o(),b(!1))},u=()=>{const S=L.current;b(!1),S&&(o(),S.held?w.current.stop():S.moved||j.current(c),L.current=null)},p=()=>{var S;b(!1),o(),(S=L.current)!=null&&S.held&&w.current.stop(),L.current=null};return h.jsxDEV("button",{type:"button",className:"keybar-key","data-key":c,"aria-label":zx[c]||r,onPointerDown:g,onPointerMove:y,onPointerUp:u,onPointerCancel:p,onPointerLeave:p,children:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:130,columnNumber:5},this)}const R1=c=>`hm_favs6_${c}`,T1="command",yg=c=>c?`command@${c}`:T1,V3={command:[],agent:[{kind:"key",text:"Escape",label:"Esc"},{kind:"key",text:"Tab",label:"Tab"},{kind:"key",text:"BSpace",label:"⌫"},{kind:"reply",text:"ok"},{kind:"reply",text:"go on"},{kind:"reply",text:"1"},{kind:"reply",text:"2"},{kind:"reply",text:"3"},{kind:"cmd",text:"/compact"},{kind:"cmd",text:"/clear"},{kind:"cmd",text:"/model"}]};function gr(c){try{const a=localStorage.getItem(R1(c));if(a)return JSON.parse(a)}catch{}return(V3[c]||[]).map(a=>({...a}))}function Hh(c,a){try{localStorage.setItem(R1(c),JSON.stringify(a))}catch{}return a}function wg(c,a){const d=gr(c);if(d.some(j=>j.text===a.text))return d;const w=a.kind==="key"?{kind:"key",text:a.text,label:a.label}:{kind:a.kind,text:a.text,enter:!!a.enter};return Hh(c,[...d,w])}function xg(c,a){return Hh(c,gr(c).filter(d=>d.text!==a))}function F3(c,a,d){const w=gr(c),j=w.findIndex(b=>b.text===a);if(j<0||w.some((b,r)=>r!==j&&b.text===d.text))return w;const L=w.slice();return L[j]=d.kind==="key"?{kind:"key",text:d.text,label:d.label}:{kind:d.kind,text:d.text,enter:!!d.enter},Hh(c,L)}function H3(c,a,d){const w=gr(c),j=w.findIndex(r=>r.text===a),L=j+(d<0?-1:1);if(j<0||L<0||L>=w.length)return w;const b=w.slice();return[b[j],b[L]]=[b[L],b[j]],Hh(c,b)}const z3=c=>{var a;try{(a=navigator.clipboard)==null||a.writeText(c)}catch{}};function $3({open:c,mode:a,recent:d=[],onSend:w,onFill:j,onClose:L,onDelete:b,historyOnly:r=!1}){const[o,g]=H.useState(()=>gr(a)),y=H.useRef(null),[u,p]=H.useState(a);if(u!==a&&(p(a),g(gr(a))),!c)return null;const S=r?[]:o.filter(m=>m.kind==="reply"),N=r?[]:o.filter(m=>m.kind==="cmd"),_=()=>{var v;const m=(((v=y.current)==null?void 0:v.value)||"").trim();if(!m)return;const f=a==="agent"&&!m.startsWith("/")?"reply":"cmd";g(wg(a,{kind:f,text:m})),y.current&&(y.current.value="")},l=m=>g(xg(a,m));return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-backdrop",onClick:L},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:35,columnNumber:7},this),h.jsxDEV("div",{className:`cmd-panel${r?" history":""}`,role:"dialog","aria-label":B("fav.title"),children:[h.jsxDEV("div",{className:"cmd-head",children:[h.jsxDEV("span",{className:"cmd-title",children:B(r?"dock.history":"fav.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:38,columnNumber:11},this),h.jsxDEV("button",{className:"cmd-close",onClick:L,"aria-label":B("common.close"),children:h.jsxDEV(vl,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:39,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:39,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:37,columnNumber:9},this),h.jsxDEV("div",{className:"cmd-list",children:[r&&h.jsxDEV("div",{className:"cmd-hint",children:B("history.scope")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:42,columnNumber:27},this),S.length>0&&h.jsxDEV("div",{className:"fav-chips",children:S.map(m=>h.jsxDEV("span",{className:"fav-chip",onClick:()=>w(m.text),onContextMenu:f=>{f.preventDefault(),l(m.text)},children:m.text},m.text,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:46,columnNumber:17},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:44,columnNumber:13},this),N.map(m=>h.jsxDEV("div",{className:"cmd-row",children:[h.jsxDEV("span",{className:"cmd-text",onClick:()=>w(m.text),onDoubleClick:()=>j(m.text),children:m.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:53,columnNumber:15},this),h.jsxDEV("button",{className:"cmd-del",onClick:()=>l(m.text),"aria-label":B("common.delete"),children:h.jsxDEV(vl,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:54,columnNumber:103},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:54,columnNumber:15},this)]},m.text,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:52,columnNumber:13},this)),d.map(m=>h.jsxDEV("div",{className:"cmd-row",children:[h.jsxDEV("span",{className:"cmd-text",onClick:()=>w(m),onDoubleClick:()=>j(m),children:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:59,columnNumber:15},this),h.jsxDEV("button",{className:"cmd-copy",onClick:()=>z3(m),"aria-label":B("common.copy"),children:h.jsxDEV(u1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:60,columnNumber:104},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:60,columnNumber:15},this),b&&h.jsxDEV("button",{className:"cmd-del",onClick:()=>b(m),"aria-label":B("common.delete"),children:h.jsxDEV(vl,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:62,columnNumber:107},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:62,columnNumber:17},this)]},`r:${m}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:58,columnNumber:13},this)),r&&d.length===0&&h.jsxDEV("div",{className:"cmd-empty",children:B("history.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:66,columnNumber:50},this),!r&&h.jsxDEV("div",{className:"fav-add",children:[h.jsxDEV("input",{ref:y,className:"fav-add-input",placeholder:B("fav.addPlaceholder"),onKeyDown:m=>{m.key==="Enter"&&_()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:69,columnNumber:15},this),h.jsxDEV("button",{className:"fav-add-btn",onClick:_,children:B("fav.add")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:71,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:68,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:41,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:36,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:34,columnNumber:5},this)}const Lh=[{key:"none",mods:{}},{key:"ctrl",label:"Ctrl",mods:{ctrl:!0}},{key:"shift",label:"Shift",mods:{shift:!0}},{key:"alt",label:"Alt",mods:{alt:!0}},{key:"ctrl-shift",label:"Ctrl+Shift",mods:{ctrl:!0,shift:!0}},{key:"ctrl-alt",label:"Ctrl+Alt",mods:{ctrl:!0,alt:!0}}],W3=c=>Lh.find(a=>a.key===c)||Lh[0],G3=[["Up","↑ Up"],["Down","↓ Down"],["Left","← Left"],["Right","→ Right"],["Tab","⇥ Tab"],["Enter","⏎ Enter"],["Escape","⎋ Esc"],["Space","␣ Space"],["BSpace","⌫ Backspace"],["Home","Home"],["End","End"],["PageUp","PgUp"],["PageDown","PgDn"]],Y3=[...G3.map(([c,a])=>({value:c,label:a})),..."abcdefghijklmnopqrstuvwxyz".split("").map(c=>({value:c,label:c.toUpperCase()})),..."0123456789".split("").map(c=>({value:c,label:c}))];function q3(c){let a=c.text||"";if(a==="BTab")return{sticky:"shift",base:"Tab"};let d=!1,w=!1,j=!1;a.startsWith("C-")&&(d=!0,a=a.slice(2)),a.startsWith("M-")&&(w=!0,a=a.slice(2)),a.startsWith("S-")&&(j=!0,a=a.slice(2)),!d&&!w&&!j&&a.length===1&&a>="A"&&a<="Z"&&(j=!0);const L=Lh.find(b=>!!b.mods.ctrl===d&&!!b.mods.shift===j&&!!b.mods.alt===w);return{sticky:L?L.key:"none",base:a.length===1?a.toLowerCase():a}}function $x({value:c,options:a,onChange:d,placeholder:w}){const[j,L]=H.useState(!1),b=a.find(r=>r.value===c);return h.jsxDEV("div",{className:"cmd-dd",children:[h.jsxDEV("button",{type:"button",className:`cmd-dd-btn${j?" open":""}`,onClick:()=>L(r=>!r),"aria-haspopup":"listbox","aria-expanded":j,children:[h.jsxDEV("span",{className:b?void 0:"cmd-dd-ph",children:b?b.label:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:61,columnNumber:9},this),h.jsxDEV(Sa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:61,columnNumber:95},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:59,columnNumber:7},this),j&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-dd-scrim",onClick:()=>L(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:65,columnNumber:11},this),h.jsxDEV("div",{className:"cmd-dd-menu",role:"listbox",children:a.map(r=>h.jsxDEV("button",{type:"button",role:"option","aria-selected":r.value===c,className:`cmd-dd-opt${r.value===c?" on":""}`,onClick:()=>{d(r.value),L(!1)},children:[h.jsxDEV("span",{children:r.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:71,columnNumber:17},this),r.value===c&&h.jsxDEV(o1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:72,columnNumber:39},this)]},r.value,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:68,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:66,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:64,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:58,columnNumber:5},this)}function K3({title:c,accent:a,items:d,showTitle:w=!0,onMove:j,onDel:L,onEdit:b}){return h.jsxDEV("div",{className:`cmd-esection ${a}`,children:[w&&h.jsxDEV("div",{className:`cmd-section ${a}`,children:h.jsxDEV("span",{className:"cmd-section-name",children:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:87,columnNumber:62},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:87,columnNumber:21},this),d.length===0&&h.jsxDEV("div",{className:"cmd-empty",children:B("cmd.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:88,columnNumber:30},this),d.map((r,o)=>h.jsxDEV("div",{className:"cmd-row",children:[h.jsxDEV("button",{type:"button",className:"cmd-text cmd-fav-text",onClick:()=>b(r),children:[r.kind==="key"&&r.label||r.text,r.kind!=="key"&&r.enter&&h.jsxDEV("span",{className:"cmd-enter","aria-hidden":"true",children:"⏎"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:94,columnNumber:45},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:92,columnNumber:11},this),h.jsxDEV("button",{className:"cmd-move up",disabled:o===0,onClick:()=>j(r.text,-1),"aria-label":B("cmd.moveUp"),children:h.jsxDEV(Sa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:97,columnNumber:42},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:96,columnNumber:11},this),h.jsxDEV("button",{className:"cmd-move",disabled:o===d.length-1,onClick:()=>j(r.text,1),"aria-label":B("cmd.moveDown"),children:h.jsxDEV(Sa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:99,columnNumber:44},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:98,columnNumber:11},this),h.jsxDEV("button",{className:"cmd-del",onClick:()=>L(r.text),"aria-label":B("common.delete"),children:h.jsxDEV(vl,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:100,columnNumber:101},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:100,columnNumber:11},this)]},r.text,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:90,columnNumber:9},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:86,columnNumber:5},this)}function X3({scopes:c,cfg:a,edit:d,inset:w,onAdd:j,onUpdate:L,onClose:b}){const r=d&&d.fav.kind==="key"?q3(d.fav):null,[o,g]=H.useState(d&&d.fav.kind==="key"?"key":"msg"),[y,u]=H.useState(d?d.scope:c[0].key),[p,S]=H.useState(d?r?r.base:d.fav.text:""),[N,_]=H.useState(d&&d.fav.kind!=="key"?!!d.fav.enter:!1),[l,m]=H.useState(r?r.sticky:"none"),f=H.useRef(null),v=R=>{R!==o&&(g(R),S(""))},C=Lh.map(R=>({value:R.key,label:R.label??B("cmd.stickyNone")})),T=o==="key"?A3(W3(l).mods,p):null,E=c.some(R=>R.key===y)?y:c[0].key,A=o==="key"?!!T:!!p.trim(),D=()=>{var M;if(!A)return;const R=o==="key"?{kind:"key",text:T.name,label:T.label}:{kind:a.msgKind(p.trim()),text:p.trim(),enter:N};if(d){L(d.scope,d.fav.text,E,R);return}j(E,R),S(""),(M=f.current)==null||M.focus()};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-backdrop cmd-add-backdrop",onClick:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:144,columnNumber:7},this),h.jsxDEV("div",{className:"cmd-addcard",role:"dialog","aria-label":B(d?"cmd.editItem":"cmd.addTitle"),style:{transform:`translate(-50%, calc(-50% + ${w/2}px))`},children:[h.jsxDEV("div",{className:"cmd-addcard-head",children:[h.jsxDEV("span",{className:"cmd-title",children:B(d?"cmd.editItem":"cmd.addTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:148,columnNumber:11},this),h.jsxDEV("button",{className:"cmd-close",onClick:b,"aria-label":B("common.close"),children:h.jsxDEV(vl,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:149,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:149,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:147,columnNumber:9},this),h.jsxDEV("div",{className:"cmd-modetabs",role:"tablist",children:[h.jsxDEV("button",{type:"button",role:"tab","aria-selected":o==="msg",className:`cmd-modetab${o==="msg"?" on":""}`,onClick:()=>v("msg"),children:a.msgLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:155,columnNumber:11},this),h.jsxDEV("button",{type:"button",role:"tab","aria-selected":o==="key",className:`cmd-modetab${o==="key"?" on":""}`,onClick:()=>v("key"),children:B("cmd.tabKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:157,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:154,columnNumber:9},this),c.length>1&&h.jsxDEV("div",{className:"cmd-field",children:[h.jsxDEV("label",{className:"cmd-field-label",children:B("cmd.addTo")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:164,columnNumber:13},this),h.jsxDEV("div",{className:"cmd-seg",role:"group",children:c.map(R=>h.jsxDEV("button",{type:"button","aria-pressed":E===R.key,className:`cmd-seg-btn${R.accent==="win"?" win":""}${E===R.key?" on":""}`,onClick:()=>u(R.key),children:R.title},R.key,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:167,columnNumber:17},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:165,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:163,columnNumber:11},this),o==="key"?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-field",children:[h.jsxDEV("label",{className:"cmd-field-label",children:B("cmd.sticky")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:179,columnNumber:15},this),h.jsxDEV($x,{value:l,options:C,onChange:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:180,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:178,columnNumber:13},this),h.jsxDEV("div",{className:"cmd-field",children:[h.jsxDEV("label",{className:"cmd-field-label",children:B("cmd.baseKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:183,columnNumber:15},this),h.jsxDEV($x,{value:p,options:Y3,onChange:S,placeholder:B("cmd.pickKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:184,columnNumber:15},this),T&&h.jsxDEV("span",{className:"cmd-chord-preview",children:T.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:185,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:182,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:176,columnNumber:11},this):h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-field",children:[h.jsxDEV("label",{className:"cmd-field-label",children:a.msgLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:191,columnNumber:15},this),h.jsxDEV("input",{ref:f,className:"cmd-add-input",value:p,placeholder:a.placeholder,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:R=>S(R.target.value),onKeyDown:R=>{R.key==="Enter"&&D()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:192,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:190,columnNumber:13},this),a.hasEnter&&h.jsxDEV("label",{className:"cmd-toggle-row",children:[h.jsxDEV("span",{children:B("cmd.withEnter")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:200,columnNumber:17},this),h.jsxDEV("span",{className:"cmd-switch",children:[h.jsxDEV("input",{type:"checkbox",checked:N,onChange:R=>_(R.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:202,columnNumber:19},this),h.jsxDEV("span",{className:"cmd-switch-track","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:203,columnNumber:19},this),h.jsxDEV("span",{className:"cmd-switch-knob","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:204,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:201,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:199,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:189,columnNumber:11},this),h.jsxDEV("button",{type:"button",className:"cmd-submit",disabled:!A,onClick:D,children:B(d?"common.save":"fav.add")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:211,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:145,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:143,columnNumber:5},this)}function J3(c,a){if(c==="chat")return{title:B("chat.editTitle"),scopes:[{key:"agent",title:B("chat.favs"),accent:"global"}],card:{msgLabel:B("chat.tabMsg"),placeholder:B("chat.addPlaceholder"),hasEnter:!1,msgKind:w=>w.startsWith("/")?"cmd":"reply"}};const d=a?yg(a):null;return{title:B("cmd.editTitle"),scopes:[{key:T1,title:B("cmd.global"),accent:"global"},...d?[{key:d,title:B("cmd.window"),accent:"win"}]:[]],card:{msgLabel:B("cmd.tabCmd"),placeholder:B("cmd.addPlaceholder"),hasEnter:!0,msgKind:()=>"cmd"}}}function Wx({windowId:c,inset:a=0,variant:d="command",onClose:w}){const{title:j,scopes:L,card:b}=J3(d,c),[r,o]=H.useState(()=>Object.fromEntries(L.map(l=>[l.key,gr(l.key)]))),[g,y]=H.useState(null),u=()=>o(Object.fromEntries(L.map(l=>[l.key,gr(l.key)]))),p=(l,m,f)=>{H3(l,m,f),u()},S=(l,m)=>{xg(l,m),u()},N=(l,m)=>{wg(l,m),u()},_=(l,m,f,v)=>{l===f?F3(l,m,v):(xg(l,m),wg(f,v)),u(),y(null)};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-backdrop",onClick:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:271,columnNumber:7},this),h.jsxDEV("div",{className:"cmd-panel cmd-editor",role:"dialog","aria-label":j,children:[h.jsxDEV("div",{className:"cmd-head",children:[h.jsxDEV("span",{className:"cmd-title",children:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:274,columnNumber:11},this),h.jsxDEV("button",{className:"cmd-add-open",onClick:()=>y({edit:null}),"aria-label":B("cmd.addTitle"),children:h.jsxDEV(a1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:275,columnNumber:115},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:275,columnNumber:11},this),h.jsxDEV("button",{className:"cmd-close",onClick:w,"aria-label":B("common.close"),children:h.jsxDEV(vl,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:276,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:276,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:273,columnNumber:9},this),h.jsxDEV("div",{className:"cmd-list",children:L.map(l=>h.jsxDEV(K3,{title:l.title,accent:l.accent,items:r[l.key]||[],showTitle:L.length>1,onMove:(m,f)=>p(l.key,m,f),onDel:m=>S(l.key,m),onEdit:m=>y({edit:{fav:m,scope:l.key}})},l.key,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:280,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:278,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:272,columnNumber:7},this),g&&h.jsxDEV(X3,{scopes:L,cfg:b,edit:g.edit,inset:a,onAdd:N,onUpdate:_,onClose:()=>y(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:287,columnNumber:16},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:270,columnNumber:5},this)}function L1({active:c,disabled:a,onToggle:d}){const w=H.useRef({x:0,y:0,moved:!1}),j=r=>{w.current={x:r.clientX,y:r.clientY,moved:!1}},L=r=>{const o=w.current;!o.moved&&Math.hypot(r.clientX-o.x,r.clientY-o.y)>10&&(o.moved=!0)},b=()=>{w.current.moved||d()};return h.jsxDEV("button",{type:"button",className:`input-mic${c?" on":""}`,"aria-label":B(c?"mic.stop":"mic.start"),"aria-pressed":c,disabled:a,onPointerDown:j,onPointerMove:L,onPointerUp:b,children:h.jsxDEV(aM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/MicButton.jsx",lineNumber:29,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/MicButton.jsx",lineNumber:19,columnNumber:5},this)}const A1=["jpg","jpeg","png","gif","webp","svg","bmp","heic","heif","avif","ico","tiff","mp4","m4v","mov","webm","mkv","avi","wmv","flv","3gp","ogv","mpeg","mpg","txt","md","markdown","rst","log","csv","tsv","json","yaml","yml","toml","ini","conf","xml","html","htm","css","js","mjs","cjs","ts","tsx","jsx","py","rb","go","rs","java","c","h","cpp","sh","pdf","doc","docx","xls","xlsx","ppt","pptx","odt","ods","odp","rtf"],M1=A1.map(c=>`.${c}`).join(","),Z3=new Set(A1);function Q3(c){const a=/\.([A-Za-z0-9]+)$/.exec(c||"");return a?Z3.has(a[1].toLowerCase()):!1}function U1(c){const d=(Array.isArray(c)?c:c&&typeof c.length=="number"?Array.from(c):[c]).filter(Boolean),w=[],j=[];for(const L of d)(Q3(L.name)?w:j).push(L);return{allowed:w,rejected:j.map(L=>L.name)}}const O1={active:!1,phase:null,pct:0,label:""};let lu=O1,nu=null;const Sg=new Set,Vg=()=>{for(const c of[...Sg])c()};function P1(c,a=""){nu=c,lu={active:!0,phase:"sending",pct:0,label:a},Vg()}function Ah(c){lu={...lu,...c},Vg()}function Ng(){nu=null,lu=O1,Vg()}function eU(){nu==null||nu.abort()}const tU=c=>(Sg.add(c),()=>Sg.delete(c)),nU=()=>lu;function iU(){return H.useSyncExternalStore(tU,nU)}function rU({cwd:c,onAuthFail:a,onPaths:d}){const[w,j]=H.useState(null),L=H.useRef(null);return H.useEffect(()=>()=>clearTimeout(L.current),[]),{upload:w,uploadFiles:async r=>{const{allowed:o,rejected:g}=U1(r);if(!o.length){g.length&&(clearTimeout(L.current),j({label:B("dock.upload.rejected",{names:g.join("、")}),error:!0}),L.current=setTimeout(()=>j(null),3500));return}clearTimeout(L.current),j(null);const y=o.length,u=[],p=[],S=new AbortController;P1(S,B("dock.upload.progress",{name:o[0].name,tag:y>1?`(1/${y})`:""}));try{for(let N=0;N<y&&!S.signal.aborted;N++){const _=o[N],l=y>1?`(${N+1}/${y})`:"";Ah({label:B("dock.upload.progress",{name:_.name,tag:l}),phase:"sending",pct:0});try{const m=await r1(c||"",_,(f,v)=>Ah({pct:f,phase:v}),!0,{signal:S.signal});m!=null&&m.path&&u.push(m.path)}catch(m){if(m instanceof Th)break;if(m instanceof Rr){a==null||a(),Ng(),j(null);return}p.push({name:_.name,reason:(m==null?void 0:m.message)||B("api.uploadFailed")})}}}finally{Ng()}if(u.length&&d(u),p.length||g.length){const N=p.map(_=>`${_.name}:${_.reason}`);g.length&&N.push(B("dock.upload.rejected",{names:g.join("、")})),j({label:N.join(";"),error:!0}),L.current=setTimeout(()=>j(null),5e3)}else j(null)}}}function sU(c,a){const d=a/16e3,w=Math.floor(c.length/d),j=new Int16Array(w);for(let L=0;L<w;L++){let b=c[Math.floor(L*d)];b>1?b=1:b<-1&&(b=-1),j[L]=b<0?b*32768:b*32767}return new Uint8Array(j.buffer)}function aU(c=1280){let a=new Uint8Array(0);return{push(d){const w=new Uint8Array(a.length+d.length);w.set(a),w.set(d,a.length);const j=[];let L=0;for(;w.length-L>=c;)j.push(w.slice(L,L+c)),L+=c;return a=w.slice(L),j},flush(){if(a.length===0)return null;const d=a;return a=new Uint8Array(0),d}}}function Gx(c){let a="";for(let d=0;d<c.length;d++)a+=String.fromCharCode(c[d]);return btoa(a)}const oU="data:text/javascript;base64,Ly8gd2ViL3NyYy92b2ljZS9wY20td29ya2xldC5qcwovLyBNaW5pbWFsIEF1ZGlvV29ya2xldDogZm9yd2FyZCBlYWNoIHJlbmRlciBxdWFudHVtJ3MgbW9ubyBzYW1wbGVzIHRvIHRoZSBtYWluIHRocmVhZCwgd2hpY2ggZG9lcyB0aGUKLy8gKHVuaXQtdGVzdGVkKSBkb3duc2FtcGxlL2ZyYW1lL2VuY29kZS4gS2VwdCB0cml2aWFsIG9uIHB1cnBvc2Ug4oCUIHdvcmtsZXQgY29kZSBjYW4ndCBiZSB1bml0LXRlc3RlZC4KY2xhc3MgUGNtRm9yd2FyZGVyIGV4dGVuZHMgQXVkaW9Xb3JrbGV0UHJvY2Vzc29yIHsKICBwcm9jZXNzKGlucHV0cykgewogICAgY29uc3QgY2ggPSBpbnB1dHNbMF0gJiYgaW5wdXRzWzBdWzBdOwogICAgaWYgKGNoICYmIGNoLmxlbmd0aCkgdGhpcy5wb3J0LnBvc3RNZXNzYWdlKGNoLnNsaWNlKDApKTsgLy8gY29weTogdGhlIGJ1ZmZlciBpcyByZXVzZWQgYWZ0ZXIgcHJvY2VzcygpCiAgICByZXR1cm4gdHJ1ZTsKICB9Cn0KcmVnaXN0ZXJQcm9jZXNzb3IoJ3BjbS1mb3J3YXJkZXInLCBQY21Gb3J3YXJkZXIpOwo=";function lU({getUserMedia:c=d=>navigator.mediaDevices.getUserMedia(d),AudioCtor:a=window.AudioContext||window.webkitAudioContext}={}){let d=null,w=null,j=null,L=null;const b=aU(1280);async function r(g){w=await c({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0}}),d=new a,await d.resume(),await d.audioWorklet.addModule(oU),L=d.createMediaStreamSource(w),j=new AudioWorkletNode(d,"pcm-forwarder"),j.port.onmessage=y=>{const u=sU(y.data,d.sampleRate);for(const p of b.push(u))g(Gx(p))},L.connect(j),j.connect(d.destination)}async function o(){try{j&&(j.port.onmessage=null)}catch{}try{L&&L.disconnect(),j&&j.disconnect()}catch{}try{w&&w.getTracks().forEach(y=>y.stop())}catch{}try{d&&await d.close()}catch{}const g=b.flush();return d=w=j=L=null,g?Gx(g):null}return{start:r,stop:o}}const cU={language:"zh_cn",domain:"iat",accent:"mandarin",vad_eos:1e4,dwa:"wpgs",ptt:1,nunum:1},Fg="audio/L16;rate=16000";function uU(c,a){return{common:{app_id:c},business:{...cU},data:{status:0,format:Fg,encoding:"raw",audio:a}}}function dU(c){return{data:{status:1,format:Fg,encoding:"raw",audio:c}}}function hU(){return{data:{status:2,format:Fg,encoding:"raw",audio:""}}}function Yx(){return{sentences:new Map}}function fU(c,a){var L;const d=(L=a==null?void 0:a.data)==null?void 0:L.result;if(!d||!Array.isArray(d.ws))return c;const w=d.ws.map(b=>(b.cw||[]).map(r=>r.w).join("")).join(""),j=new Map(c.sentences);if(d.pgs==="rpl"&&Array.isArray(d.rg))for(let b=d.rg[0];b<=d.rg[1];b++)j.delete(b);return j.set(d.sn,w),{sentences:j}}function qx(c){return[...c.sentences.keys()].sort((a,d)=>a-d).map(a=>c.sentences.get(a)).join("")}const mU=55e3,pU=4e3;function B1({onText:c,deps:a={}}){const d=a.signAsr||UA,w=a.WebSocketCtor||window.WebSocket,j=a.makeRecorder||(()=>lU()),[L,b]=H.useState("idle"),[r,o]=H.useState(""),g=H.useRef("idle"),y=H.useCallback(R=>{g.current=R,b(R)},[]),u=H.useRef(null),p=H.useRef(null),S=H.useRef(Yx()),N=H.useRef(""),_=H.useRef(!1),l=H.useRef(null),m=H.useRef(null),f=H.useRef(null),v=H.useRef(c);v.current=c;const C=H.useCallback(()=>{clearTimeout(l.current),clearTimeout(m.current);try{u.current&&u.current.close()}catch{}u.current=null,p.current=null,_.current=!1},[]),T=H.useCallback(()=>{var R;g.current!=="idle"&&((R=v.current)==null||R.call(v,qx(S.current)),o(""),y("idle"),C())},[C,y]),E=H.useCallback(R=>{const M=u.current;!M||M.readyState!==1||(M.send(JSON.stringify(_.current?dU(R):uU(N.current,R))),_.current=!0)},[]),A=H.useCallback(async()=>{if(g.current==="recording"){y("finalizing"),clearTimeout(l.current);try{const R=p.current?await p.current.stop():null;R&&E(R);const M=u.current;M&&M.readyState===1?(M.send(JSON.stringify(hU())),m.current=setTimeout(()=>T(),pU)):T()}catch{y("error"),C()}}},[E,C,y,T]);f.current=A;const D=H.useCallback(async()=>{if(!(g.current!=="idle"&&g.current!=="error")){y("requesting"),o(""),S.current=Yx(),_.current=!1;try{const{url:R,appId:M}=await d();N.current=M;const $=new w(R);u.current=$,$.onmessage=I=>{var Q;const Y=JSON.parse(I.data);S.current=fU(S.current,Y),o(qx(S.current)),((Q=Y==null?void 0:Y.data)==null?void 0:Q.status)===2&&T()},$.onerror=()=>{y("error"),C()},$.onclose=()=>{(g.current==="recording"||g.current==="finalizing")&&T()};const O=j();p.current=O,await O.start(E),y("recording"),l.current=setTimeout(()=>{var I;(I=f.current)==null||I.call(f)},mU)}catch{y("error"),C()}}},[d,w,j,E,C,y,T]);return H.useEffect(()=>C,[C]),{state:L,partial:r,start:D,stop:A}}const I1="tw_asr";function vU(){try{const c=localStorage.getItem(I1);return c==null?null:c==="1"}catch{return null}}function V1(){const[c,a]=H.useState(vU);return H.useEffect(()=>{let d=!0;return Promise.resolve().then(i1).then(w=>{if(!d)return;const j=!!(w!=null&&w.asr);a(j);try{localStorage.setItem(I1,j?"1":"0")}catch{}}).catch(()=>{}),()=>{d=!1}},[]),c}function Hg(c){H.useEffect(()=>{if(!c||!("wakeLock"in navigator))return;let a=null,d=!1;const w=async()=>{try{const L=await navigator.wakeLock.request("screen");if(d){try{L.release()}catch{}return}a=L}catch{}},j=()=>{document.visibilityState==="visible"&&!d&&w()};return w(),document.addEventListener("visibilitychange",j),()=>{d=!0,document.removeEventListener("visibilitychange",j);try{a&&a.release()}catch{}a=null}},[c])}function rs(c,a){const d=H.useRef(a);d.current=a,H.useEffect(()=>{if(!c)return;window.history.pushState({overlay:!0},"");const w=()=>{var j;return(j=d.current)==null?void 0:j.call(d)};return window.addEventListener("popstate",w),()=>{var j;window.removeEventListener("popstate",w),(j=window.history.state)!=null&&j.overlay&&window.history.back()}},[c])}const ul={ESC:"Escape",Esc:"Escape",Tab:"Tab","⌫":"BSpace"},Kx=c=>{c.cancelable&&c.preventDefault()},gU=c=>{var a,d;(d=(a=c.target).closest)!=null&&d.call(a,"input, textarea, [contenteditable]")||c.cancelable&&c.preventDefault()},Xx=80,_U=c=>ul[c]?"esc":c.startsWith("/")?"cmd":"reply",bU=450;function Zv({className:c,onTap:a,onHold:d,children:w,...j}){const L=H.useRef({timer:null,long:!1,moved:!1,x:0,y:0}),b=y=>{y.cancelable&&y.preventDefault();const u=L.current;u.long=!1,u.moved=!1,u.x=y.clientX,u.y=y.clientY,d&&(u.timer=setTimeout(()=>{var p;u.long=!0,(p=navigator.vibrate)==null||p.call(navigator,12),d()},bU))},r=y=>{const u=L.current;u.moved||(Math.abs(y.clientX-u.x)>8||Math.abs(y.clientY-u.y)>8)&&(u.moved=!0,clearTimeout(u.timer))},o=()=>{const y=L.current;if(clearTimeout(y.timer),y.timer=null,y.moved){y.moved=!1;return}if(y.long){y.long=!1;return}a()},g=()=>{const y=L.current;clearTimeout(y.timer),y.timer=null,y.long=!1,y.moved=!1};return h.jsxDEV("button",{type:"button",className:c,...j,onPointerDown:b,onPointerMove:r,onPointerUp:o,onPointerCancel:g,onPointerLeave:g,children:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:89,columnNumber:5},this)}function yU({pane:c,onAuthFail:a,onKey:d,onText:w,cwd:j=null,agent:L=null,windowId:b=null,recent:r=[],onSent:o,onRemoveRecent:g,inset:y=0},u){const[p,S]=H.useState(()=>YL());H.useEffect(()=>{qL(p)},[p]);const[N,_]=H.useState(!1),[l,m]=H.useState(!1),[f,v]=H.useState(!1),[C,T]=H.useState(()=>gr("agent")),[E,A]=H.useState(!1);H.useEffect(()=>{!f&&!E&&T(gr("agent"))},[f,E]);const[D,R]=H.useState(()=>gr("command")),[M,$]=H.useState(()=>b?gr(yg(b)):[]),[O,I]=H.useState(!1);H.useEffect(()=>{O||(R(gr("command")),$(b?gr(yg(b)):[]))},[O,b]);const[Y,Q]=H.useState({}),Z=Y[c]||(L?"agent":"command"),ee=ae=>{var xe;const He=document.activeElement===nt.current||document.activeElement===Je.current;Q(X=>({...X,[c]:ae})),He&&((xe=ae==="command"?nt.current:Je.current)==null||xe.focus({preventScroll:!0}))},[oe,P]=H.useState({ctrl:"off",shift:"off",alt:"off"}),[W,V]=H.useState(!1),J=H.useRef(null),_e=H.useRef(null),be=H.useRef(null),Ve=Z==="command"?0:1,Le=H.useRef(Ve);Le.current=Ve;const ie=H.useRef(ee);ie.current=ee;const G=H.useRef(!1),pe=H.useRef(!1),le=()=>{var ae;return((ae=J.current)==null?void 0:ae.clientWidth)||0},Be=ae=>{const He=_e.current;He&&(He.style.transition="none",He.style.transform=`translate3d(${ae}px, 0, 0)`)},Te=()=>{const ae=_e.current;!ae||!ae.style.transform||(ae.style.transition="",ae.style.transform="")},Xe=H.useRef(null),Ke=50,st=12,jt=38,Ye=ae=>{const He=Xe.current;He&&(He.classList.add("dragging"),He.style.setProperty("--drag",`${WM(ae)}px`),He.style.setProperty("--morph",`${Math.min(1,Math.max(0,(Math.abs(ae)-st)/jt))}`),He.classList.toggle("armed",Math.abs(ae)>=Ke))},$t=()=>{const ae=Xe.current;ae&&(ae.classList.remove("dragging","armed"),ae.style.removeProperty("--drag"),ae.style.removeProperty("--morph"))};H.useLayoutEffect(()=>{G.current||Te()});const Yt=()=>{const ae=J.current;if(!ae)return;const He=ae.querySelector(Z==="command"?".dock-page.command":".dock-page.chat");He&&(ae.style.height=`${He.offsetHeight}px`)};H.useLayoutEffect(()=>{Z==="agent"&&St(Je.current),Yt()});const dt=H.useRef(Yt);dt.current=Yt,H.useEffect(()=>{const ae=J.current;if(!ae||typeof ResizeObserver>"u")return;const He=new ResizeObserver(()=>{G.current||dt.current()});return ae.querySelectorAll(".dock-page").forEach(xe=>He.observe(xe)),()=>He.disconnect()},[]),H.useEffect(()=>{if(Z!=="agent")return;const ae=requestAnimationFrame(()=>{St(Je.current),Yt()});return()=>cancelAnimationFrame(ae)},[Z]),H.useEffect(()=>{var He;if(Z==="agent")return;document.activeElement===Je.current&&((He=Je.current)==null||He.blur());const ae=J.current;ae&&(ae.scrollLeft=0,ae.scrollTop=0)},[Z]),H.useEffect(()=>{const ae=be.current,He=J.current;if(!ae||!He)return;let xe=null;const X=mt=>{var Qt,On,Gt,An;Te(),ae.classList.remove("dock-swiping");const Tt=((On=(Qt=mt.target)==null?void 0:Qt.closest)==null?void 0:On.call(Qt,".quick-scroll"))||null,tn=((An=(Gt=mt.target)==null?void 0:Gt.closest)==null?void 0:An.call(Gt,".input-text"))||null,Xt=document.activeElement===nt.current||document.activeElement===Je.current;xe=mt.touches.length===1?{x:mt.touches[0].clientX,y:mt.touches[0].clientY,dx:0,dy:0,decided:!1,horiz:!1,vert:!1,strip:Tt,cmp:tn,kbUp:Xt}:null},je=mt=>{if(!xe||mt.touches.length!==1||pe.current&&!xe.horiz)return;const Tt=mt.touches[0].clientX-xe.x,tn=mt.touches[0].clientY-xe.y;if(!xe.decided){if(Math.abs(Tt)<16&&Math.abs(tn)<16)return;if(xe.decided=!0,xe.horiz=Math.abs(Tt)>Math.abs(tn)*1.4,!xe.kbUp&&(document.activeElement===nt.current||document.activeElement===Je.current)&&document.activeElement.blur(),xe.horiz&&!xe.kbUp&&ae.classList.add("dock-swiping"),xe.horiz&&xe.strip){const On=xe.strip,Gt=Le.current,An=On.scrollLeft<=0,Xn=On.scrollLeft>=On.scrollWidth-On.clientWidth-1,ai=Tt>0&&An&&Gt===1,Vi=Tt<0&&Xn&&Gt===0;ai||Vi||(xe.horiz=!1)}!xe.horiz&&Math.abs(tn)>Math.abs(Tt)*1.4&&!$M(xe.cmp,tn)&&(xe.vert=!0)}if(xe.vert){xe.dx=Tt,xe.dy=tn,Ye(tn),mt.cancelable&&mt.preventDefault();return}if(!xe.horiz)return;mt.preventDefault(),G.current=!0,xe.dx=Tt;const Xt=le()||1;let Qt=Tt;Le.current===0?Qt=Math.min(0,Math.max(-Xt,Qt)):Qt=Math.max(0,Math.min(Xt,Qt)),Be(-Le.current*Xt+Qt)},qe=()=>{var Qt,On,Gt,An;if(G.current=!1,ae.classList.remove("dock-swiping"),xe&&xe.vert){const Xn=zM(xe.dx,xe.dy,Ke),ai=Le.current;xe=null,Te(),$t(),Xn==="show"?(Qt=ti(ai))==null||Qt.focus({preventScroll:!0}):Xn==="hide"&&((On=ti(ai))==null||On.blur());return}if(!xe||!xe.horiz){xe=null,Te();return}const mt=Le.current,Tt=xe.dx,tn=xe.kbUp;xe=null;let Xt=mt;mt===0&&Tt<-Xx?Xt=1:mt===1&&Tt>Xx&&(Xt=0),tn||((Gt=nt.current)==null||Gt.blur(),(An=Je.current)==null||An.blur()),Te(),Xt!==mt&&ie.current(Xt===1?"agent":"command")},kt=()=>{(He.scrollLeft||He.scrollTop)&&(He.scrollLeft=0,He.scrollTop=0)};return He.addEventListener("scroll",kt,{passive:!0}),ae.addEventListener("touchstart",X,{passive:!0}),ae.addEventListener("touchmove",je,{passive:!1}),ae.addEventListener("touchend",qe,{passive:!0}),ae.addEventListener("touchcancel",qe,{passive:!0}),()=>{He.removeEventListener("scroll",kt),ae.removeEventListener("touchstart",X),ae.removeEventListener("touchmove",je),ae.removeEventListener("touchend",qe),ae.removeEventListener("touchcancel",qe)}},[]),rs(f,()=>v(!1));const Je=H.useRef(null),nt=H.useRef(null),ne=H.useRef(null),Fe=H.useRef(!1);H.useEffect(()=>{const ae=window.visualViewport;if(!ae)return;const He=()=>{if(window.innerHeight-ae.height>120){Fe.current=!0;return}if(!Fe.current)return;Fe.current=!1;const X=document.activeElement;(X===nt.current||X===Je.current)&&X.blur(),V(!1)};return He(),ae.addEventListener("resize",He),()=>ae.removeEventListener("resize",He)},[]);const tt=H.useRef({head:"",tail:""}),me=H.useRef(null),rt=H.useRef(!1),fe=B1({onText:ae=>{if(rt.current){rt.current=!1;return}const{head:He,tail:xe}=tt.current;S(He+ae+xe),me.current=He.length+ae.length}}),ce=V1(),Ee=fe.state==="recording"||fe.state==="finalizing";Hg(Ee),H.useEffect(()=>{if(fe.state!=="recording"&&fe.state!=="finalizing"||rt.current)return;const{head:ae,tail:He}=tt.current;S(ae+fe.partial+He),me.current=ae.length+fe.partial.length},[fe.partial,fe.state]),H.useLayoutEffect(()=>{const ae=Je.current;if(!ae)return;let He=!1;if(me.current!=null){const xe=me.current;if(me.current=null,document.activeElement===ae)try{ae.setSelectionRange(xe,xe)}catch{}He=xe>=p.length}St(ae),He&&(ae.scrollTop=ae.scrollHeight)},[p]);const Oe=()=>{if(Ee){fe.stop();return}const ae=Je.current,He=ae?ae.selectionStart:p.length;tt.current={head:p.slice(0,He),tail:p.slice(He)},fe.start()},vt=40,Ct=H.useRef(null),ot=(ae,He)=>{const xe=Ct.current;if(!xe)return null;xe.style.width=`${He}px`,xe.textContent=ae;const X=document.createElement("span");return xe.appendChild(X),{h:xe.offsetHeight,endX:X.offsetLeft}},St=ae=>{if(!ae)return;ae.style.height="auto";const He=ce?76:38,xe=ce?86:48,X=ae.parentElement.clientWidth-11,je=ae.value?ot(ae.value,X-He):null,qe=je?je.h>vt:!1;_(qe);const kt=qe?ot(ae.value,X):null;m(!!kt&&X-kt.endX<xe),ae.style.height=`${ae.scrollHeight+2}px`},yn=()=>{Ee&&(rt.current=!0,fe.stop())},hn=async()=>{if(c){yn();try{await Sh(c,p,!0),o==null||o(p),S(""),requestAnimationFrame(()=>St(Je.current))}catch(ae){ae instanceof Rr&&(a==null||a())}}},qt=H.useRef(!1),It=ae=>{const He=ae.value;if(ae.value="",!He)return;const xe=ou.some(X=>Ks(oe[X]));if(xe&&He.length===1){const X=j1({kind:"text",ch:He},oe);if(X.kind==="key"){d(X.name),P(bg);return}}w(He),xe&&P(bg)},Pt=ae=>{var He;(He=ae.nativeEvent)!=null&&He.isComposing||qt.current||It(ae.target)},Un=()=>{Z==="command"&&(qt.current=!0)},Hn=ae=>{Z==="command"&&(qt.current=!1,It(ae.target))},ei=ae=>{var He;if(!(Z!=="command"||(He=ae.nativeEvent)!=null&&He.isComposing)){if(ae.key==="Enter"&&!ae.shiftKey){ae.preventDefault(),d("Enter");return}ae.key==="Backspace"&&(ae.preventDefault(),d("BSpace"))}},Di=()=>{const ae=nt.current;ae&&(document.activeElement===ae?ae.blur():ae.focus({preventScroll:!0}))},ti=ae=>ae===0?nt.current:Je.current,ii=ae=>{S(ae),v(!1),requestAnimationFrame(()=>{var He;(He=Je.current)==null||He.focus(),St(Je.current)})},Cn=async ae=>{if(c)try{await Sh(c,ae,!0),o==null||o(ae)}catch(He){He instanceof Rr&&(a==null||a())}},fn=ae=>ii(ae),zn=ae=>{if(ul[ae]){d(ul[ae]);return}Cn(ae)},Zt=ae=>{if(ae.kind==="key"){d(ae.text);return}zn(ae.text)},Ln=ae=>{if(ae.kind==="key"){d(ae.text);return}if(ul[ae.text]){d(ul[ae.text]);return}if(ae.enter){Cn(ae.text);return}w(ae.text)},Rn=ae=>ae.kind==="key"&&ae.label||ae.text,ri=ae=>ae.kind==="key"||ul[ae.text]||!ae.enter?void 0:()=>w(ae.text);H.useImperativeHandle(u,()=>({fill:ii,hideKeyboard:()=>{const ae=document.activeElement;(ae===nt.current||ae===Je.current)&&ae.blur()}}),[]);const re=ae=>{if(!ae.length)return;let He;if(ae.length===1)He=ae[0];else{const xe=ae[0].slice(0,ae[0].lastIndexOf("/")+1);He=ae.every(X=>X.startsWith(xe))?`${xe}{${ae.map(X=>X.slice(xe.length)).join(",")}}`:ae.join(" ")}S(xe=>xe&&!/\s$/.test(xe)?`${xe} ${He}`:xe+He),requestAnimationFrame(()=>{var xe;(xe=Je.current)==null||xe.focus(),St(Je.current)})},{upload:Ie,uploadFiles:Ze}=rU({cwd:j,onAuthFail:a,onPaths:re}),yt=async()=>{if(!(!c||!p)){yn();try{await Sh(c,p,!1),o==null||o(p),S(""),requestAnimationFrame(()=>St(Je.current))}catch(ae){ae instanceof Rr&&(a==null||a())}}},wt=H.useRef(null),gt=H.useRef(!1),Rt=H.useRef({x:0,y:0,moved:!1}),bt=ae=>{ae.cancelable&&ae.preventDefault(),gt.current=!1,Rt.current={x:ae.clientX,y:ae.clientY,moved:!1},p&&(wt.current=setTimeout(()=>{var He;gt.current=!0,(He=navigator.vibrate)==null||He.call(navigator,12),yt()},450))},wn=ae=>{const He=Rt.current;He.moved||Math.hypot(ae.clientX-He.x,ae.clientY-He.y)<=10||(He.moved=!0,clearTimeout(wt.current),wt.current=null)},on=()=>{if(clearTimeout(wt.current),wt.current=null,gt.current){gt.current=!1;return}Rt.current.moved||hn()},Wt=()=>{clearTimeout(wt.current),wt.current=null,gt.current=!1},pn=H.useRef(null),vn=H.useRef({x:0,y:0,moved:!1}),Yn=ae=>{if(!N)return null;for(const[He,xe]of[["send",".input-send"],["mic",".input-mic"]]){const X=ae.currentTarget.querySelector(xe);if(!X)continue;const je=X.getBoundingClientRect();if(ae.clientX>=je.left&&ae.clientX<=je.right&&ae.clientY>=je.top&&ae.clientY<=je.bottom)return He}return null},mn=ae=>{const He=Yn(ae);He&&(ae.stopPropagation(),ae.cancelable&&ae.preventDefault(),pn.current=He,He==="send"?bt(ae):vn.current={x:ae.clientX,y:ae.clientY,moved:!1})},ji=ae=>{const He=pn.current;if(!He)return;if(He==="send"){wn(ae);return}const xe=vn.current;!xe.moved&&Math.hypot(ae.clientX-xe.x,ae.clientY-xe.y)>10&&(xe.moved=!0)},si=()=>{const ae=pn.current;if(pn.current=null,!!ae){if(ae==="send"){p?on():Wt();return}!vn.current.moved&&fe.state!=="requesting"&&Oe()}},Vt=()=>{const ae=pn.current;pn.current=null,ae==="send"&&Wt()};return h.jsxDEV("div",{className:"bottom-dock",children:[h.jsxDEV("div",{className:"dock-left",ref:be,onPointerDown:gU,children:[h.jsxDEV("button",{type:"button",className:"dock-handle",ref:Xe,"aria-label":B("dock.mode.toggle"),onClick:()=>ee(Z==="command"?"agent":"command"),children:[h.jsxDEV("span",{className:"dock-mode-label",children:B(Z==="command"?"dock.mode.command":"dock.mode.chat")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:818,columnNumber:11},this),h.jsxDEV("span",{className:"dock-dots",children:[h.jsxDEV("i",{className:`dock-dot${Z==="command"?" on":""}`,"data-page":"command","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:820,columnNumber:13},this),h.jsxDEV("i",{className:`dock-dot${Z==="agent"?" on":""}`,"data-page":"agent","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:821,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:819,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:816,columnNumber:9},this),h.jsxDEV("div",{className:"dock-pager",ref:J,children:h.jsxDEV("div",{className:`dock-track${Ve===1?" at-chat":""}`,ref:_e,children:[h.jsxDEV("div",{className:`dock-page command${Z==="command"?" on":""}`,children:[h.jsxDEV("input",{ref:nt,className:"cmd-capture",type:"text",onInput:Pt,onKeyDown:ei,onCompositionStart:Un,onCompositionEnd:Hn,onFocus:()=>V(!0),onBlur:()=>V(!1),enterKeyHint:"send","aria-label":B("dock.command.placeholder"),autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:830,columnNumber:15},this),h.jsxDEV("div",{className:"quick-bar",children:[h.jsxDEV("div",{className:"quick-fixed",children:h.jsxDEV("button",{type:"button",className:"quick-fix quick-fix-kbd","aria-pressed":W,"aria-label":B(W?"dock.kbdHide":"dock.kbdShow"),onPointerDown:Kx,onClick:Di,children:[h.jsxDEV(uM,{down:W},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:854,columnNumber:21},this),h.jsxDEV("span",{children:B(W?"dock.kbdHide":"dock.kbdShow")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:854,columnNumber:55},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:851,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:850,columnNumber:17},this),h.jsxDEV("div",{className:"quick-scroll",children:[D.map(ae=>h.jsxDEV(Zv,{className:"quick-cmd quick-cmd-plain",onTap:()=>Ln(ae),onHold:ri(ae),children:[Rn(ae),ae.kind!=="key"&&ae.enter&&h.jsxDEV("span",{className:"qc-enter","aria-hidden":"true",children:"⏎"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:863,columnNumber:68},this)]},`g:${ae.text}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:861,columnNumber:21},this)),M.map(ae=>h.jsxDEV(Zv,{className:"quick-cmd quick-cmd-win",onTap:()=>Ln(ae),onHold:ri(ae),children:[Rn(ae),ae.kind!=="key"&&ae.enter&&h.jsxDEV("span",{className:"qc-enter","aria-hidden":"true",children:"⏎"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:868,columnNumber:68},this)]},`w:${ae.text}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:866,columnNumber:21},this)),h.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":B("cmd.editTitle"),onPointerDown:Kx,onClick:()=>I(!0),children:h.jsxDEV(dg,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:871,columnNumber:84},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:870,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:856,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:849,columnNumber:15},this),h.jsxDEV(O3,{onKey:d,onText:w,mods:oe,setMods:P,keyHeldRef:pe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:874,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:826,columnNumber:13},this),h.jsxDEV("div",{className:`dock-page chat${Z==="agent"?" on":""}`,children:[Ie&&h.jsxDEV("div",{className:"dock-upload error",children:h.jsxDEV("span",{className:"dock-upload-label",children:Ie.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:881,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:880,columnNumber:17},this),h.jsxDEV("div",{className:"quick-bar",children:[h.jsxDEV("div",{className:"quick-fixed",children:h.jsxDEV("button",{type:"button",className:"quick-fix","aria-label":B("dock.attach"),disabled:!!Ie&&!Ie.error,onClick:()=>{var ae;return(ae=ne.current)==null?void 0:ae.click()},children:[h.jsxDEV(c1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:890,columnNumber:21},this),h.jsxDEV("span",{children:B("dock.attach")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:890,columnNumber:35},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:888,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:887,columnNumber:17},this),h.jsxDEV("div",{className:"quick-scroll",children:[C.map(ae=>h.jsxDEV(Zv,{className:`quick-cmd qc-${ae.kind==="key"?"esc":_U(ae.text)}`,onTap:()=>Zt(ae),onHold:ae.kind==="key"?void 0:()=>w(ae.text),children:Rn(ae)},ae.text,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:898,columnNumber:21},this)),h.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":B("chat.editTitle"),onClick:()=>A(!0),children:h.jsxDEV(dg,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:904,columnNumber:59},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:903,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:892,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:886,columnNumber:15},this),h.jsxDEV("input",{ref:ne,className:"browse-file-input",type:"file",multiple:!0,accept:M1,onChange:ae=>{Ze(ae.target.files),ae.target.value=""}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:908,columnNumber:15},this),h.jsxDEV("div",{className:`input-wrap${Ee?" recording":""}${N?" multi":""}${l?" crowd":""}`,onPointerDownCapture:mn,onPointerMoveCapture:ji,onPointerUpCapture:si,onPointerCancelCapture:Vt,children:[h.jsxDEV("textarea",{ref:Je,className:"input-text",rows:1,value:p,onPointerDown:ae=>{Ee&&(yn(),ae.currentTarget.focus())},onChange:ae=>{S(ae.target.value),St(ae.target)},onFocus:()=>V(!0),onBlur:()=>V(!1),placeholder:B("dock.input.placeholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:916,columnNumber:17},this),h.jsxDEV("div",{ref:Ct,className:"input-mirror","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:939,columnNumber:17},this),!p&&h.jsxDEV("button",{type:"button",className:"input-history","aria-label":B("dock.history"),title:B("dock.history"),onClick:()=>v(ae=>!ae),children:h.jsxDEV(l1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:943,columnNumber:61},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:942,columnNumber:19},this),ce&&h.jsxDEV(L1,{active:Ee,disabled:fe.state==="requesting",onToggle:Oe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:945,columnNumber:34},this),h.jsxDEV("button",{type:"button",className:"input-send","aria-label":B("dock.send"),title:B("dock.send.hint"),disabled:!p,onPointerDown:bt,onPointerMove:wn,onPointerUp:on,onPointerCancel:Wt,onPointerLeave:Wt,children:h.jsxDEV(s1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:950,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:947,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:913,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:876,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:825,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:824,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:810,columnNumber:7},this),h.jsxDEV($3,{open:f,mode:Z,recent:r,historyOnly:!0,onDelete:g,onSend:ae=>{v(!1),zn(ae)},onFill:ae=>{v(!1),fn(ae)},onClose:()=>v(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:957,columnNumber:7},this),O&&h.jsxDEV(Wx,{windowId:b,inset:y,onClose:()=>I(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:964,columnNumber:23},this),E&&h.jsxDEV(Wx,{variant:"chat",inset:y,onClose:()=>A(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:967,columnNumber:24},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:809,columnNumber:5},this)}const wU=H.forwardRef(yU);function xU({onSaved:c}){const[a,d]=H.useState(""),w=j=>{j.preventDefault();const L=a.trim();L&&(OL(L),c())};return h.jsxDEV("form",{className:"token-prompt",onSubmit:w,children:[h.jsxDEV("h2",{children:B("token.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:16,columnNumber:7},this),h.jsxDEV("input",{value:a,onChange:j=>d(j.target.value),placeholder:B("token.placeholder")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:17,columnNumber:7},this),h.jsxDEV("button",{type:"submit",children:B("common.save")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:18,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:15,columnNumber:5},this)}function zg({open:c,title:a,actions:d=[],onClose:w}){const[j,L]=H.useState(null);if(H.useEffect(()=>{c||L(null)},[c]),!c)return null;const b=o=>{var g;if(!o.disabled){if(o.confirm&&j!==o.key){L(o.key);return}L(null),(g=o.onClick)==null||g.call(o)}},r=o=>h.jsxDEV("button",{className:`sheet-action ${o.danger?"danger":""} ${j===o.key?"armed":""}`,disabled:o.disabled,onClick:()=>b(o),children:o.confirm&&j===o.key?o.confirmLabel||B("actionsheet.confirmAgain"):o.label},o.key,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:23,columnNumber:5},this);return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop",onClick:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:35,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card",role:"dialog","aria-label":a,"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:38,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:w,"aria-label":B("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:39,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:37,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section sheet-actions",children:[d.map((o,g)=>Array.isArray(o)?h.jsxDEV("div",{className:"sheet-row",children:o.map(r)},`row-${g}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:43,columnNumber:15},this):r(o)),h.jsxDEV("button",{className:"fontbtn sheet-cancel",onClick:w,children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:45,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:41,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:36,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:34,columnNumber:5},this)}const SU=/\.(?:md|markdown|html|htm|txt|log|sh)$/i,Jx=300;function Zx(c){const a=c.lastIndexOf("/");return a<0?{dir:"",frag:c}:{dir:c.slice(0,a+1),frag:c.slice(a+1)}}const NU=c=>c.replace(/\/+$/,"")||"/",Qv=(c,a)=>c===a?"":c.startsWith(`${a}/`)?c.slice(a.length+1):c,gh=(c,a,d)=>{let w=null;for(const j of a||[])(c===j||c!=null&&c.startsWith(`${j}/`))&&(!w||j.length>w.length)&&(w=j);return w||d},CU=c=>c==null?"":c<1024?`${c} B`:c<1024*1024?`${Math.round(c/1024)} KB`:`${(c/1024/1024).toFixed(1)} MB`;function F1({path:c,onNavigate:a,onOpenDoc:d,onJumpToCwd:w,pendingFile:j,onPendingConsumed:L,pickMode:b=!1,allowMkdir:r=!b,onPick:o,refreshKey:g=0}){const[y,u]=H.useState(""),[p,S]=H.useState(null),[N,_]=H.useState(!1),[l,m]=H.useState(""),[f,v]=H.useState(""),[C,T]=H.useState(""),[E,A]=H.useState(null),[D,R]=H.useState(!1),[M,$]=H.useState(!1),[O,I]=H.useState(""),[Y,Q]=H.useState(null),Z=H.useRef(null),ee=H.useRef(!1),oe=H.useRef(g),P=H.useRef(null),W=H.useRef(null),V=H.useRef(null),J=async(me,{sync:rt=!1,notify:Re=!1,fallbackHome:fe=!1}={})=>{m("");try{const ce=await n1(me??void 0);if(ee.current=ce.path,S(ce),rt){const Ee=Qv(ce.path,gh(ce.path,ce.roots,ce.home));u(Ee?`${Ee}/`:"")}Re&&(a==null||a(ce.path),$(!1),I(""))}catch{if(fe&&me!=null){J(null,{sync:!0});return}m(B("filebrowser.openDirFailed"))}};H.useEffect(()=>{const me=g!==oe.current;oe.current=g,!(c===ee.current&&!me)&&J(c,{sync:!0,fallbackHome:b})},[c,g]),H.useEffect(()=>()=>{clearTimeout(P.current),clearTimeout(W.current)},[]),H.useEffect(()=>{if(!N)return;const me=rt=>{var Re;(Re=V.current)!=null&&Re.contains(rt.target)||_(!1)};return document.addEventListener("pointerdown",me,!0),()=>document.removeEventListener("pointerdown",me,!0)},[N]);const _e=me=>{v(me),clearTimeout(W.current),W.current=setTimeout(()=>v(""),2500)},be=me=>{const rt=p==null?void 0:p.home;if(!rt){u(me);return}const Re=(p==null?void 0:p.roots)||[rt];let fe=me;(fe==="~"||fe.startsWith("~/"))&&(fe=rt+fe.slice(1));let ce=gh(p==null?void 0:p.path,Re,rt);fe.startsWith("/")&&(ce=gh(fe,Re,rt),fe=fe===ce?"":fe.startsWith(`${ce}/`)?fe.slice(ce.length+1):fe.replace(/^\/+/,"")),u(fe);const Ee=NU(`${ce}/${Zx(fe).dir}`);Ee!==ee.current&&(clearTimeout(P.current),P.current=setTimeout(()=>{Ee!==ee.current&&J(Ee,{notify:!0})},250))},Ve=async me=>{const rt=ro(p.path,me);try{await navigator.clipboard.writeText(rt),_e(B("filebrowser.copiedPath",{abs:rt}))}catch{_e(rt)}},Le=me=>d(ro(p.path,me)),ie=me=>J(ro(p.path,me),{sync:!0,notify:!0}),G=()=>(p==null?void 0:p.parent)&&J(p.parent,{sync:!0,notify:!0}),pe=async()=>{const me=O.trim();if(!(!me||!p)){m("");try{await MA(p.path,me),await J(p.path,{}),$(!1),I("")}catch{m(B("filebrowser.mkdirFailed"))}}},le=async me=>{m(""),Q({label:B("filebrowser.downloading",{name:me}),pct:0});try{await WA(ro(p.path,me),rt=>Q({label:B("filebrowser.downloading",{name:me}),pct:rt})),T(me)}catch{m(B("filebrowser.downloadFailed"))}finally{Q(null)}},Be=()=>{const me=E;A(null),me&&le(me)},Te=p==null?void 0:p.home,Xe=(p==null?void 0:p.roots)||(Te?[Te]:[]),Ke=gh(p==null?void 0:p.path,Xe,Te),st=me=>me===Te?"~":/\/tmp$/.test(me)?"tmp":me.includes("/var/folders/")?"TMPDIR":me.split("/").filter(Boolean).pop()||"/",jt=me=>{_(!1),me!==Ke&&J(me,{sync:!0,notify:!0})},Ye=(me,rt)=>!me||!rt||me===rt?!1:(me.startsWith(`${rt}/`)?me.slice(rt.length+1):me).split("/").some(fe=>fe.startsWith(".")),$t=!!p&&p.path!==Te&&!Ye(p.path,Ke),Yt=async me=>{const{allowed:rt,rejected:Re}=U1(me);if(!rt.length)return Re.length&&m(B("filebrowser.uploadRejected",{names:Re.join("、")})),Re;R(!0),m("");const fe=rt.length,ce=[],Ee=new AbortController;P1(Ee,B("filebrowser.uploading",{name:rt[0].name,tag:fe>1?`(1/${fe})`:""}));try{for(let Oe=0;Oe<fe&&!Ee.signal.aborted;Oe++){const vt=rt[Oe],Ct=fe>1?`(${Oe+1}/${fe})`:"";Ah({label:B("filebrowser.uploading",{name:vt.name,tag:Ct}),phase:"sending",pct:0});try{await r1(p.path,vt,(ot,St)=>Ah({pct:ot,phase:St}),!1,{signal:Ee.signal})}catch(ot){if(ot instanceof Th)break;ce.push({name:vt.name,reason:(ot==null?void 0:ot.message)||B("filebrowser.uploadFailed")})}}}finally{Ng()}return await J(p.path,{}),R(!1),ce.length?m(ce.map(Oe=>`${Oe.name}:${Oe.reason}`).join(";")):Re.length&&m(B("filebrowser.uploadRejected",{names:Re.join("、")})),[...ce.map(Oe=>Oe.name),...Re]},dt=async()=>{j&&(await Yt(j)).length===0&&(L==null||L())},Je=me=>{if(b||me.key!=="Enter")return;const rt=y.trim();rt&&SU.test(rt)&&(p!=null&&p.home)&&d(ro(p.home,rt))},nt=Zx(y).frag.toLowerCase(),ne=((p==null?void 0:p.entries)||[]).filter(me=>(!b||me.type==="dir")&&(!nt||me.name.toLowerCase().includes(nt))),Fe=ne.length>Jx?ne.slice(0,Jx):ne,tt=ne.length-Fe.length;return h.jsxDEV("div",{className:"browse-view",children:[h.jsxDEV("div",{className:"browse-bar",children:[w&&h.jsxDEV("button",{className:"browse-cwd","aria-label":B("filebrowser.sessionDir"),title:B("filebrowser.jumpToSessionDir"),onClick:w,children:h.jsxDEV(QA,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:274,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:273,columnNumber:11},this),h.jsxDEV("button",{className:"browse-up","aria-label":B("filebrowser.parentDir"),disabled:!(p!=null&&p.parent),onClick:G,children:h.jsxDEV(s1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:278,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:277,columnNumber:9},this),h.jsxDEV("div",{className:"browse-path",children:[Xe.length>1?h.jsxDEV("div",{className:"dd browse-root-dd",ref:V,children:[h.jsxDEV("button",{type:"button",className:"browse-root","aria-haspopup":"listbox","aria-expanded":N,"aria-label":B("filebrowser.rootSelect"),onClick:()=>_(me=>!me),children:[h.jsxDEV("span",{children:[st(Ke),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:289,columnNumber:17},this),h.jsxDEV("span",{className:`dd-caret${N?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:290,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:285,columnNumber:15},this),N&&h.jsxDEV("div",{className:"dd-menu",role:"listbox",children:Xe.map(me=>h.jsxDEV("button",{type:"button",role:"option","aria-selected":me===Ke,title:me,className:`dd-option${me===Ke?" is-selected":""}`,onClick:()=>jt(me),children:[h.jsxDEV("span",{className:"dd-option-label",children:[st(me),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:299,columnNumber:23},this),me===Ke&&h.jsxDEV("span",{className:"dd-check","aria-hidden":"true",children:"✓"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:300,columnNumber:41},this)]},me,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:295,columnNumber:21},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:293,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:284,columnNumber:13},this):h.jsxDEV("span",{className:"browse-home","aria-hidden":"true",children:"~/"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:307,columnNumber:13},this),h.jsxDEV("input",{className:"browse-input",value:y,placeholder:B("filebrowser.pathPlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:me=>be(me.target.value),onKeyDown:Je},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:309,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:280,columnNumber:9},this),r&&h.jsxDEV("button",{className:"browse-mkdir","aria-label":B("filebrowser.newFolder"),title:B("filebrowser.newFolder"),disabled:!p,onClick:()=>{$(me=>!me),I("")},children:h.jsxDEV(XA,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:321,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:316,columnNumber:11},this),!b&&h.jsxDEV("button",{className:"browse-upload","aria-label":B("filebrowser.uploadFile"),title:B($t?"filebrowser.uploadToCurrentDir":"filebrowser.enterSubdirToUpload"),disabled:!$t||D,onClick:()=>{var me;return(me=Z.current)==null?void 0:me.click()},children:h.jsxDEV(c1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:332,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:325,columnNumber:11},this),!b&&h.jsxDEV("input",{ref:Z,className:"browse-file-input",type:"file",multiple:!0,accept:M1,onChange:me=>{Yt(Array.from(me.target.files||[])),me.target.value=""}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:338,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:271,columnNumber:7},this),M&&h.jsxDEV("div",{className:"browse-newfolder",children:[h.jsxDEV("input",{className:"browse-newfolder-input",autoFocus:!0,value:O,placeholder:B("filebrowser.folderNamePlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:me=>I(me.target.value),onKeyDown:me=>{me.key==="Enter"&&pe()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:350,columnNumber:11},this),h.jsxDEV("button",{className:"browse-newfolder-ok",onClick:pe,children:B("filebrowser.createBtn")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:356,columnNumber:11},this),h.jsxDEV("button",{className:"browse-newfolder-x","aria-label":B("common.cancel"),onClick:()=>{$(!1),I("")},children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:357,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:349,columnNumber:9},this),!b&&j&&h.jsxDEV("div",{className:"browse-pending",children:[h.jsxDEV("span",{className:"browse-pending-text",children:[B("filebrowser.uploadPendingTo",{name:j.name}),!$t&&h.jsxDEV("em",{className:"browse-pending-hint",children:B("filebrowser.enterSubdirFirst")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:364,columnNumber:28},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:362,columnNumber:11},this),h.jsxDEV("button",{className:"browse-pending-btn",disabled:!$t||D,onClick:dt,children:B("filebrowser.upload")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:366,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:361,columnNumber:9},this),l&&h.jsxDEV("div",{className:"bind-error browse-err",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:369,columnNumber:15},this),f&&h.jsxDEV("div",{className:"browse-notice",children:f},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:370,columnNumber:18},this),!b&&C&&h.jsxDEV("div",{className:"browse-saved",children:[h.jsxDEV("span",{className:"browse-saved-text",children:B("filebrowser.savedToDownloads",{name:C})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:373,columnNumber:11},this),h.jsxDEV("button",{className:"browse-saved-close","aria-label":B("common.close"),onClick:()=>T(""),children:"×"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:374,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:372,columnNumber:9},this),!b&&Y&&h.jsxDEV("div",{className:"browse-progress",children:[h.jsxDEV("span",{className:"browse-progress-label",children:[Y.label," ",Math.round(Y.pct*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:379,columnNumber:11},this),h.jsxDEV("span",{className:"browse-progress-track",children:h.jsxDEV("span",{className:"browse-progress-fill",style:{width:`${Math.round(Y.pct*100)}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:381,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:380,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:378,columnNumber:9},this),h.jsxDEV("div",{className:"browse-list",children:[Fe.length===0&&!l&&h.jsxDEV("div",{className:"browse-empty",children:B("filebrowser.noMatches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:386,columnNumber:42},this),Fe.map(me=>h.jsxDEV("div",{className:"browse-entry-row",children:[h.jsxDEV("button",{className:"browse-entry",onClick:()=>me.type==="dir"?ie(me.name):me.type==="doc"||me.type==="image"?Le(me.name):_e(B("filebrowser.previewUnsupported")),children:[h.jsxDEV("span",{className:"browse-entry-icon",children:me.type==="dir"?h.jsxDEV(su,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:71},this):me.type==="image"?h.jsxDEV(ZA,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:109},this):h.jsxDEV(JA,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:125},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:15},this),h.jsxDEV("span",{className:"browse-entry-name",children:me.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:398,columnNumber:15},this),me.type!=="dir"&&h.jsxDEV("span",{className:"browse-entry-size",children:CU(me.size)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:399,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:389,columnNumber:13},this),me.type!=="dir"&&h.jsxDEV("button",{className:"browse-copy","aria-label":B("filebrowser.copyAbsPath"),title:B("filebrowser.copyAbsPath"),onClick:()=>Ve(me.name),children:h.jsxDEV(u1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:403,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:402,columnNumber:15},this),me.type!=="dir"&&h.jsxDEV("button",{className:"browse-dl","aria-label":B("filebrowser.download"),onClick:()=>A(me.name),children:h.jsxDEV(nM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:408,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:407,columnNumber:15},this)]},me.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:388,columnNumber:11},this)),tt>0&&h.jsxDEV("div",{className:"browse-overflow",children:B("filebrowser.tooMany",{shown:Fe.length,total:ne.length})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:414,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:385,columnNumber:7},this),b&&p&&h.jsxDEV("div",{className:"browse-pick-bar",children:h.jsxDEV("button",{className:"browse-pick-confirm",onClick:()=>o==null?void 0:o(p.path),children:B("filebrowser.pickThisDir",{path:Qv(p.path,p.home)?`~/${Qv(p.path,p.home)}`:"~"})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:419,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:418,columnNumber:9},this),h.jsxDEV(zg,{open:!!E,title:E?B("filebrowser.downloadConfirm",{name:E}):"",actions:[{key:"dl",label:B("filebrowser.download"),onClick:Be}],onClose:()=>A(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:424,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:270,columnNumber:5},this)}const EU=()=>{};function du({open:c,seedCwd:a=null,hint:d=null,pane:w=null,allowMkdir:j=!1,onPick:L,onClose:b,inset:r=0}){const[o,g]=H.useState(a),y=H.useRef(!1);c&&!y.current?(y.current=!0,o!==a&&g(a)):!c&&y.current&&(y.current=!1);const u=w?async()=>{try{const{cwd:p}=await ao(w);p&&g(p)}catch{}}:null;return c?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop dirpick-backdrop",onClick:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:31,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card dirpick-card",style:{transform:`translate(-50%, calc(-50% + ${r/2}px))`,"--kb-inset":`${r}px`},role:"dialog","aria-label":B("dirpicker.title"),"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:B("dirpicker.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:38,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:b,"aria-label":B("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:39,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:37,columnNumber:9},this),d&&h.jsxDEV("div",{className:"dirpick-hint",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:41,columnNumber:18},this),h.jsxDEV(F1,{path:o,onNavigate:g,onOpenDoc:EU,onJumpToCwd:u,pickMode:!0,allowMkdir:j,onPick:L},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:42,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:32,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:30,columnNumber:5},this):null}function DU({open:c,pushKey:a,notifyOn:d,onClose:w}){const[j,L]=H.useState("");if(!c)return null;const b='handmux push "构建完成" "耗时 3m12s"',r=!!(d&&a),o=b,g=`${b} --session ${B("scriptPush.session_placeholder")}`,y=`${b} --device ${r?a:B("scriptPush.device_placeholder")}`,u=async(N,_)=>{try{await navigator.clipboard.writeText(N),L(_),setTimeout(()=>L(""),1500)}catch{}},p=N=>B(j===N?"scriptPush.copied":"common.copy"),S=(N,_,l,m)=>h.jsxDEV("div",{className:"push-script-block",children:[h.jsxDEV("div",{className:"push-script-label",children:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:25,columnNumber:7},this),h.jsxDEV("pre",{className:"push-script-cmd",children:h.jsxDEV("code",{children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:26,columnNumber:40},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:26,columnNumber:7},this),m&&h.jsxDEV("div",{className:"push-script-hint",children:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:27,columnNumber:16},this),h.jsxDEV("button",{className:"fontbtn",onClick:()=>u(l,N),children:p(N)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:28,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:24,columnNumber:5},this);return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop push-script-backdrop",onClick:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:34,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card push-script-sheet",role:"dialog","aria-label":B("scriptPush.title"),"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:B("scriptPush.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:37,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:w,"aria-label":B("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:38,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:36,columnNumber:9},this),h.jsxDEV("p",{className:"push-script-intro",children:B("scriptPush.intro")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:41,columnNumber:9},this),S("all",B("scriptPush.scope_all"),o),S("session",B("scriptPush.scope_session"),g),S("device",B("scriptPush.scope_device"),y,B(r?"scriptPush.device_key_note":"scriptPush.device_need_enable")),h.jsxDEV("div",{className:"push-script-block",children:[h.jsxDEV("div",{className:"push-script-label",children:B("scriptPush.opts_label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:49,columnNumber:11},this),h.jsxDEV("ul",{className:"push-script-fields",children:[h.jsxDEV("li",{children:B("scriptPush.opt_tag")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:51,columnNumber:13},this),h.jsxDEV("li",{children:B("scriptPush.opt_url")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:52,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:48,columnNumber:9},this),h.jsxDEV("div",{className:"push-script-note",children:B("scriptPush.reliability")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:56,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:35,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:33,columnNumber:5},this)}function jU({open:c,onClose:a,termRef:d,onColAdjust:w,onColRestore:j,onOpenChangelog:L,changelogUnread:b,updateInfo:r=null,activePreview:o=null,pane:g=null,lastPreviewDir:y=null,dynamicEnabled:u=!1,getColCount:p=null,onStartPreview:S,onStartDynamicPreview:N,onOpenPreview:_,onRenew:l,onStop:m}){var rt,Re;const[f,v]=H.useState(null),[C,T]=H.useState(XS()),[E,A]=H.useState(null),[D,R]=H.useState(!1),[M,$]=H.useState(mg()),[O,I]=H.useState(!1),[Y,Q]=H.useState(""),[Z,ee]=H.useState(!1),[oe,P]=H.useState(null),[W,V]=H.useState(!1),[J,_e]=H.useState(null),[be,Ve]=H.useState("off"),[Le,ie]=H.useState(""),[G,pe]=H.useState(!1),[le,Be]=H.useState(""),[Te,Xe]=H.useState(!1),Ke=f1(o==null?void 0:o.expiresAt,!!o&&c);H.useEffect(()=>{pe(!1),Be("")},[o==null?void 0:o.name,c]);const st=fe=>({"port not listening":B("settings.err_port_not_listening"),"bad port":B("settings.err_bad_port"),"dynamic disabled":B("settings.err_dynamic_disabled")})[fe]||fe||B("settings.err_start_failed"),jt=async()=>{const fe=Number(Le);if(fe){Be(""),Xe(!0);try{await(N==null?void 0:N(fe))}catch(ce){Be(st(ce==null?void 0:ce.message))}finally{Xe(!1)}}},Ye=async()=>{P(mg()?await wM():null),ee(!0)},$t=async()=>{let fe=y;if(!fe&&g)try{fe=(await ao(g)).cwd||null}catch{}_e(fe),V(!0)};H.useEffect(()=>{var fe,ce;c&&(v(((ce=(fe=d.current)==null?void 0:fe.getFontSize)==null?void 0:ce.call(fe))??null),A((p==null?void 0:p())??null))},[c,d,p]);const Yt=async()=>{I(!0),Q("");try{M?(await yM(),$(!1),Q(B("settings.notify_disabled"))):(await bM(),$(!0),Q(B("settings.notify_enabled")))}catch(fe){Q(fe.message||B("settings.notify_failed"))}finally{I(!1)}};if(!c)return null;const dt=fe=>{var Oe,vt,Ct,ot;const ce=(vt=(Oe=d.current)==null?void 0:Oe.getFontSize)==null?void 0:vt.call(Oe),Ee=(ot=(Ct=d.current)==null?void 0:Ct.setFontSize)==null?void 0:ot.call(Ct,((ce==null?void 0:ce.size)??14)+fe);Ee!=null&&v({size:Ee,auto:!1})},Je=()=>{var fe,ce;(ce=(fe=d.current)==null?void 0:fe.autoFont)==null||ce.call(fe),v({size:null,auto:!0})},nt=fe=>{var ce,Ee;T(fe),QL(fe),(Ee=(ce=d.current)==null?void 0:ce.setDocHighlight)==null||Ee.call(ce,fe)},ne=f!=null&&f.auto?B("settings.font_auto"):f!=null&&f.size?`${f.size}px`:"—",Fe=E!=null?`${E} 列`:"—",tt=fe=>{w==null||w(fe),A((p==null?void 0:p())??null)},me=()=>{j==null||j(),A(null)};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop",onClick:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:107,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card",role:"dialog","aria-label":B("settings.title"),"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:B("settings.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:110,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:a,"aria-label":B("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:111,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:109,columnNumber:9},this),h.jsxDEV("div",{className:"settings-body",children:[h.jsxDEV("div",{className:"settings-group",children:B("settings.group_global")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:115,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("settings.language")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:118,columnNumber:11},this),h.jsxDEV("div",{className:"lang-drop",children:[D&&h.jsxDEV("div",{className:"lang-drop-backdrop",onClick:()=>R(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:120,columnNumber:26},this),h.jsxDEV("button",{className:"lang-trigger",onClick:()=>R(fe=>!fe),children:[h.jsxDEV("span",{children:(rt=cx.find(fe=>fe.code===hl()))==null?void 0:rt.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:122,columnNumber:15},this),h.jsxDEV("span",{className:"lang-chevron",children:D?"▴":"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:123,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:121,columnNumber:13},this),D&&h.jsxDEV("div",{className:"lang-menu",children:cx.map(fe=>h.jsxDEV("button",{className:`lang-option${fe.code===hl()?" active":""}`,onClick:()=>LL(fe.code),children:fe.label},fe.code,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:128,columnNumber:19},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:126,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:119,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:117,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("settings.font_size")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:137,columnNumber:11},this),h.jsxDEV("div",{className:"settings-btns",children:[h.jsxDEV("button",{className:"fontbtn",onClick:()=>dt(-1),"aria-label":B("settings.font_decrease"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:139,columnNumber:13},this),h.jsxDEV("span",{className:"settings-value",children:ne},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:140,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn",onClick:()=>dt(1),"aria-label":B("settings.font_increase"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:141,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn",onClick:Je,title:B("settings.font_auto_title"),children:B("settings.font_auto")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:142,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:138,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:136,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("label",{className:"settings-toggle",children:[h.jsxDEV("span",{className:"settings-label",children:B("settings.path_highlight")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:148,columnNumber:13},this),h.jsxDEV("span",{className:"cmd-switch",children:[h.jsxDEV("input",{type:"checkbox",checked:C,onChange:fe=>nt(fe.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:150,columnNumber:15},this),h.jsxDEV("span",{className:"cmd-switch-track","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:151,columnNumber:15},this),h.jsxDEV("span",{className:"cmd-switch-knob","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:152,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:149,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:147,columnNumber:11},this),h.jsxDEV("div",{className:"settings-hint",children:B("settings.path_highlight_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:155,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:146,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("settings.version")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:159,columnNumber:11},this),h.jsxDEV("div",{className:"settings-btns",children:[h.jsxDEV("span",{className:"settings-value",children:r!=null&&r.current?`v${r.current}`:"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:161,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn",onClick:L,children:[B("settings.view_changelog"),b&&h.jsxDEV("span",{className:"settings-dot","aria-label":B("settings.has_update")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:163,columnNumber:65},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:162,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:160,columnNumber:11},this),(r==null?void 0:r.updateAvailable)&&h.jsxDEV("div",{className:"settings-update",children:[h.jsxDEV("div",{className:"settings-update-title",children:B("settings.update_available",{v:r.latest})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:172,columnNumber:15},this),((Re=r.whatsNew)==null?void 0:Re.length)>0&&h.jsxDEV("ul",{className:"settings-update-new",children:r.whatsNew.map(fe=>h.jsxDEV("li",{children:[h.jsxDEV("span",{className:"settings-update-new-ver",children:["v",fe.version]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:177,columnNumber:23},this),(hl().startsWith("zh")?fe.zh:fe.en)||fe.en]},fe.version,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:176,columnNumber:21},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:174,columnNumber:17},this),h.jsxDEV("div",{className:"settings-update-how",children:[B("settings.update_how")," ",h.jsxDEV("code",{children:"handmux update"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:183,columnNumber:79},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:183,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:171,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:158,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("settings.feedback")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:193,columnNumber:11},this),h.jsxDEV("div",{className:"settings-btns",children:[h.jsxDEV("a",{className:"fontbtn settings-linkbtn",href:"https://github.com/handmux/handmux/issues",target:"_blank",rel:"noreferrer",children:B("settings.feedback_issues")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:195,columnNumber:13},this),hl().startsWith("zh")&&h.jsxDEV("a",{className:"fontbtn settings-linkbtn",href:"https://handmux.com/#community",target:"_blank",rel:"noreferrer",children:B("settings.feedback_group")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:197,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:194,columnNumber:11},this),h.jsxDEV("div",{className:"settings-hint",children:B("settings.feedback_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:200,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:192,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("settings.push_notifications")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:204,columnNumber:11},this),_l()?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-btns",children:[h.jsxDEV("button",{className:"fontbtn",onClick:Yt,disabled:O,"aria-pressed":M,children:B(M?"settings.notify_on":"settings.notify_enable")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:208,columnNumber:17},this),O&&h.jsxDEV("span",{className:"spinner",role:"status","aria-label":B("settings.processing")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:211,columnNumber:32},this),!O&&Y&&h.jsxDEV("span",{className:"settings-note",children:Y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:212,columnNumber:46},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:207,columnNumber:15},this),h.jsxDEV("div",{className:"settings-hint",children:B("settings.push_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:214,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:206,columnNumber:13},this):h.jsxDEV("div",{className:"settings-value",style:{display:"block"},children:B("settings.push_unsupported")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:217,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:203,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("settings.script_push")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:222,columnNumber:11},this),h.jsxDEV("div",{className:"settings-btns",children:h.jsxDEV("button",{className:"fontbtn",onClick:Ye,disabled:!_l(),children:B("settings.script_push_open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:224,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:223,columnNumber:11},this),h.jsxDEV("div",{className:"settings-hint",children:B("settings.script_push_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:226,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:221,columnNumber:9},this),h.jsxDEV("div",{className:"settings-group",children:B("settings.group_session")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:229,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("settings.screen_cols")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:232,columnNumber:11},this),h.jsxDEV("div",{className:"settings-btns cols-btns",children:[h.jsxDEV("button",{className:"fontbtn col-step",onClick:()=>tt(-10),children:"−10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:234,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn col-step col-fine",onClick:()=>tt(-1),children:"−1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:235,columnNumber:13},this),h.jsxDEV("span",{className:"settings-value",children:Fe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:236,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn col-step col-fine",onClick:()=>tt(1),children:"+1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:237,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn col-step",onClick:()=>tt(10),children:"+10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:238,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn",onClick:me,children:["↺ ",B("settings.cols_restore")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:239,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:233,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:231,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B(u?"settings.preview_site":"settings.preview_static_site")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:244,columnNumber:11},this),o?h.jsxDEV("div",{className:"preview-active",children:[h.jsxDEV("div",{className:"preview-active-head",children:[h.jsxDEV("span",{className:"preview-running",children:[h.jsxDEV("span",{className:"live-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:248,columnNumber:51},this),o.kind==="dynamic"?B("settings.preview_running_dynamic"):B("settings.preview_running_static")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:248,columnNumber:17},this),h.jsxDEV("span",{className:"preview-remain-s",title:B("settings.preview_remain_title"),children:B("settings.preview_remain",{time:h1(Ke)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:249,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:247,columnNumber:15},this),h.jsxDEV("div",{className:"settings-btns",children:[h.jsxDEV("button",{className:"fontbtn",onClick:()=>{_==null||_(),a==null||a()},children:B("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:252,columnNumber:17},this),h.jsxDEV("button",{className:"fontbtn",onClick:()=>l==null?void 0:l(),children:B("settings.preview_renew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:253,columnNumber:17},this),G?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("button",{className:"fontbtn preview-confirm-danger",onClick:()=>{pe(!1),m==null||m()},children:B("settings.preview_confirm_stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:256,columnNumber:21},this),h.jsxDEV("button",{className:"fontbtn",onClick:()=>pe(!1),children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:257,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:255,columnNumber:19},this):h.jsxDEV("button",{className:"fontbtn",onClick:()=>pe(!0),children:B("settings.preview_stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:260,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:251,columnNumber:15},this),h.jsxDEV("div",{className:"settings-hint",children:[B("settings.preview_name",{name:o.name}),o.kind==="dynamic"?B("settings.preview_port",{port:o.port}):o.dir?`(${o.dir})`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:263,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:246,columnNumber:13},this):h.jsxDEV("div",{className:"preview-start",children:[h.jsxDEV("div",{className:"preview-seg",role:"tablist","aria-label":B("settings.preview_type"),children:[h.jsxDEV("button",{role:"tab",className:be==="off"?"on":"","aria-selected":be==="off",onClick:()=>Ve("off"),children:B("settings.preview_off")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:272,columnNumber:17},this),h.jsxDEV("button",{role:"tab",className:be==="static"?"on":"","aria-selected":be==="static",onClick:()=>Ve("static"),children:B("settings.preview_static")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:273,columnNumber:17},this),u&&h.jsxDEV("button",{role:"tab",className:be==="dynamic"?"on":"","aria-selected":be==="dynamic",onClick:()=>{Be(""),Ve("dynamic")},children:B("settings.preview_dynamic")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:275,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:271,columnNumber:15},this),be==="off"&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-hint",children:B(u?"settings.preview_off_hint_both":"settings.preview_off_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:280,columnNumber:19},this),!u&&h.jsxDEV("div",{className:"settings-hint preview-dynamic-disabled",children:B("settings.preview_dynamic_disabled")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:282,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:279,columnNumber:17},this),be==="static"&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-btns",children:h.jsxDEV("button",{className:"fontbtn",onClick:$t,children:B("settings.preview_pick_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:289,columnNumber:21},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:288,columnNumber:19},this),h.jsxDEV("div",{className:"settings-hint",children:B("settings.preview_static_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:291,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:287,columnNumber:17},this),be==="dynamic"&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-btns",children:[h.jsxDEV("input",{className:"preview-port",type:"number",inputMode:"numeric",min:"1",max:"65535",placeholder:B("settings.preview_port_placeholder"),value:Le,onChange:fe=>{ie(fe.target.value),Be("")},"aria-label":B("settings.preview_port_label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:297,columnNumber:21},this),h.jsxDEV("button",{className:"fontbtn",disabled:!Le||Te,onClick:jt,children:B(Te?"settings.preview_starting":"settings.preview_start")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:299,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:296,columnNumber:19},this),le?h.jsxDEV("div",{className:"settings-hint settings-err",children:le},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:302,columnNumber:23},this):h.jsxDEV("div",{className:"settings-hint",children:B("settings.preview_dynamic_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:303,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:295,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:270,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:243,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:114,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:108,columnNumber:7},this),h.jsxDEV(du,{open:W,seedCwd:J,pane:g,hint:B("settings.dir_picker_hint"),onPick:fe=>{V(!1),S==null||S(fe),a==null||a()},onClose:()=>V(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:311,columnNumber:7},this),h.jsxDEV(DU,{open:Z,pushKey:oe,notifyOn:M,onClose:()=>ee(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:319,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:106,columnNumber:5},this)}function Qx(c){return c===300?B("usage.win5h"):c===10080?B("usage.winWeekly"):c===43200?B("usage.winMonthly"):c>0?B("usage.winGeneric",{h:Math.round(c/60)}):""}function Mh(c,a){if(!c)return"";const d=c-Math.floor(a/1e3);if(d<=0)return B("usage.resetSoon");const w=Math.floor(d/86400),j=Math.floor(d%86400/3600),L=Math.floor(d%3600/60),b=w>0?`${w}d ${j}h`:j>0?`${j}h ${L}m`:`${L}m`;return B("usage.resetIn",{t:b})}function H1({at:c,now:a}){if(!c)return null;const d=Math.max(0,Math.floor((a-c)/1e3)),w=d<60?B("usage.updatedNow"):d<3600?B("usage.updatedMin",{n:Math.floor(d/60)}):d<86400?B("usage.updatedHr",{n:Math.floor(d/3600)}):B("usage.updatedDay",{n:Math.floor(d/86400)});return h.jsxDEV("div",{className:"usage-updated",children:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:38,columnNumber:10},this)}function ml(c,a,d){if(!c||!a)return null;const w=c-Math.floor(d/1e3);return Math.max(0,Math.min(100,(1-w/(a*60))*100))}function kU({pct:c,timePct:a}){const d=Math.max(0,Math.min(100,c??0)),w=d>=80?"hi":d>=50?"mid":"lo";return h.jsxDEV("div",{className:"usage-bar",children:[h.jsxDEV("div",{className:`usage-bar-fill lvl-${w}`,style:{width:`${d}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:54,columnNumber:7},this),a!=null&&h.jsxDEV("div",{className:"usage-bar-time",style:{left:`${a}%`},title:B("usage.timeMark")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:55,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:53,columnNumber:5},this)}function pl({label:c,pct:a,reset:d,sub:w,timePct:j}){return h.jsxDEV("div",{className:"usage-row",children:[h.jsxDEV("div",{className:"usage-row-head",children:[h.jsxDEV("span",{className:"usage-row-label",children:[c,w&&h.jsxDEV("span",{className:"usage-row-sub",children:[" · ",w]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:64,columnNumber:58},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:64,columnNumber:9},this),h.jsxDEV("span",{className:"usage-row-pct",children:[Math.round(a),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:65,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:63,columnNumber:7},this),h.jsxDEV(kU,{pct:a,timePct:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:67,columnNumber:7},this),d&&h.jsxDEV("div",{className:"usage-row-reset",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:68,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:62,columnNumber:5},this)}function RU({claude:c,now:a}){var d,w;return h.jsxDEV("section",{className:"usage-agent",children:[h.jsxDEV("div",{className:"usage-agent-head",children:[h.jsxDEV(gl,{agent:"claude"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:41},this),h.jsxDEV("span",{children:"Claude Code"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:69},this),h.jsxDEV(H1,{at:c==null?void 0:c.updatedAt,now:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:93},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:7},this),c?!((d=c.rateLimits)!=null&&d.fiveHour)&&!((w=c.rateLimits)!=null&&w.sevenDay)?h.jsxDEV("div",{className:"usage-empty",children:B("usage.claudePending")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:83,columnNumber:9},this):h.jsxDEV(h.Fragment,{children:[c.rateLimits.fiveHour&&h.jsxDEV(pl,{label:B("usage.win5h"),pct:c.rateLimits.fiveHour.usedPercent,reset:Mh(c.rateLimits.fiveHour.resetsAt,a),timePct:ml(c.rateLimits.fiveHour.resetsAt,300,a)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:87,columnNumber:13},this),c.rateLimits.sevenDay&&h.jsxDEV(pl,{label:B("usage.winWeekly"),pct:c.rateLimits.sevenDay.usedPercent,reset:Mh(c.rateLimits.sevenDay.resetsAt,a),timePct:ml(c.rateLimits.sevenDay.resetsAt,10080,a)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:92,columnNumber:13},this),c.rateLimits.sevenDayOpus&&h.jsxDEV(pl,{label:B("usage.winWeekly"),sub:"Opus",pct:c.rateLimits.sevenDayOpus.usedPercent,timePct:ml(c.rateLimits.sevenDayOpus.resetsAt,10080,a)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:97,columnNumber:13},this),c.rateLimits.sevenDaySonnet&&h.jsxDEV(pl,{label:B("usage.winWeekly"),sub:"Sonnet",pct:c.rateLimits.sevenDaySonnet.usedPercent,timePct:ml(c.rateLimits.sevenDaySonnet.resetsAt,10080,a)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:101,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:85,columnNumber:9},this):h.jsxDEV("div",{className:"usage-empty",children:[h.jsxDEV("div",{children:B("usage.claudeOff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:79,columnNumber:11},this),h.jsxDEV("code",{className:"usage-code",children:"handmux hooks install"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:80,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:78,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:75,columnNumber:5},this)}function TU({codex:c,now:a}){const d=c==null?void 0:c.rateLimits;return h.jsxDEV("section",{className:"usage-agent",children:[h.jsxDEV("div",{className:"usage-agent-head",children:[h.jsxDEV(gl,{agent:"codex"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:41},this),h.jsxDEV("span",{children:"Codex CLI"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:68},this),h.jsxDEV(H1,{at:c==null?void 0:c.updatedAt,now:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:90},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:7},this),c?h.jsxDEV(h.Fragment,{children:[(d==null?void 0:d.primary)&&h.jsxDEV(pl,{label:Qx(d.primary.windowMinutes)||B("usage.winPrimary"),pct:d.primary.usedPercent,reset:Mh(d.primary.resetsAt,a),timePct:ml(d.primary.resetsAt,d.primary.windowMinutes,a)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:120,columnNumber:13},this),(d==null?void 0:d.secondary)&&h.jsxDEV(pl,{label:Qx(d.secondary.windowMinutes)||B("usage.winSecondary"),pct:d.secondary.usedPercent,reset:Mh(d.secondary.resetsAt,a),timePct:ml(d.secondary.resetsAt,d.secondary.windowMinutes,a)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:125,columnNumber:13},this),!(d!=null&&d.primary)&&!(d!=null&&d.secondary)&&h.jsxDEV("div",{className:"usage-empty",children:B("usage.codexNoQuota")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:129,columnNumber:46},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:118,columnNumber:9},this):h.jsxDEV("div",{className:"usage-empty",children:B("usage.codexOff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:116,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:113,columnNumber:5},this)}function LU({open:c,onClose:a,onAuthFail:d}){const[w,j]=H.useState(null),[L,b]=H.useState(""),[r,o]=H.useState(!1),g=Date.now();return H.useEffect(()=>{if(!c)return;let y=!1;return o(!0),b(""),wA().then(u=>{y||(j(u),o(!1))}).catch(u=>{y||(u instanceof Rr?d==null||d():b(B("usage.loadFailed")),o(!1))}),()=>{y=!0}},[c]),c?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop",onClick:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:161,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card usage-card",role:"dialog","aria-label":B("usage.title"),"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:B("usage.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:164,columnNumber:11},this),h.jsxDEV("span",{className:"usage-head-note",children:B("usage.activityNote")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:165,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:a,"aria-label":B("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:166,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:163,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:r&&!w?h.jsxDEV("div",{className:"usage-empty",children:B("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:170,columnNumber:13},this):L?h.jsxDEV("div",{className:"bind-error",children:L},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:172,columnNumber:13},this):w?h.jsxDEV(h.Fragment,{children:[w.codex&&h.jsxDEV(TU,{codex:w.codex,now:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:175,columnNumber:30},this),h.jsxDEV(RU,{claude:w.claude,now:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:176,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:174,columnNumber:13},this):null},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:168,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:162,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:160,columnNumber:5},this):null}function AU({rows:c,top:a,open:d,onToggle:w,onClose:j,onSelectRow:L,onMarkAllRead:b,hooksStatus:r,onEnableHooks:o}){const g=[];for(const v of c){const C=g[g.length-1];C&&C.session===v.session?C.items.push(v):g.push({session:v.session,items:[v]})}const y=Date.now(),u=c.some(v=>v.view==="done"),p=pM(c),[S,N]=H.useState(!1),[_,l]=H.useState(!1),m=g.length===0&&r==="absent",f=async()=>{N(!0),l(!1);try{const v=await(o==null?void 0:o());(!v||v.status!=="installed")&&l(!0)}catch{l(!0)}finally{N(!1)}};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("button",{className:"topbar-icon inbox-btn",onClick:w,"aria-label":B("inbox.title"),title:B("inbox.title"),children:[h.jsxDEV(tM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:36,columnNumber:9},this),a&&h.jsxDEV("span",{className:`inbox-dot ${a}`,"aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:37,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:35,columnNumber:7},this),d&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"inbox-backdrop",onClick:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:41,columnNumber:11},this),h.jsxDEV("div",{className:"inbox-panel",role:"dialog","aria-label":B("inbox.title"),children:[h.jsxDEV("div",{className:"inbox-head",children:[h.jsxDEV("span",{children:B("inbox.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:44,columnNumber:15},this),h.jsxDEV("div",{className:"inbox-summary",children:[h.jsxDEV("span",{className:"inbox-chip working",children:[B("inbox.working")," ",p.working]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:47,columnNumber:17},this),h.jsxDEV("span",{className:"inbox-chip done",children:[B("inbox.done")," ",p.done]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:48,columnNumber:17},this),h.jsxDEV("span",{className:"inbox-chip needs",children:[B("inbox.needs")," ",p.needs]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:49,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:46,columnNumber:15},this),u&&h.jsxDEV("button",{className:"inbox-readall",onClick:b,children:B("inbox.clearDone")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:51,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:43,columnNumber:13},this),g.length===0?m?h.jsxDEV("div",{className:"inbox-empty inbox-enable",children:[h.jsxDEV("div",{className:"inbox-enable-title",children:B("inbox.enableTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:56,columnNumber:19},this),h.jsxDEV("div",{className:"inbox-enable-hint",children:B("inbox.enableHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:57,columnNumber:19},this),h.jsxDEV("button",{className:"inbox-enable-btn",onClick:f,disabled:S,children:B(S?"inbox.enabling":"inbox.enableBtn")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:58,columnNumber:19},this),_&&h.jsxDEV("div",{className:"inbox-enable-err",children:B("inbox.enableFailed")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:61,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:55,columnNumber:17},this):h.jsxDEV("div",{className:"inbox-empty",children:B("inbox.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:64,columnNumber:17},this):g.map(v=>h.jsxDEV("div",{className:"inbox-group",children:[h.jsxDEV("div",{className:"inbox-group-title",children:v.session},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:68,columnNumber:17},this),v.items.map(C=>h.jsxDEV("button",{className:"inbox-row",onClick:()=>L(C),children:[h.jsxDEV("div",{className:"inbox-row-head",children:[h.jsxDEV("span",{className:`inbox-chip ${C.view}`,children:fM[C.view]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:72,columnNumber:23},this),h.jsxDEV(gl,{agent:C.agent},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:73,columnNumber:23},this),h.jsxDEV("span",{className:"inbox-loc",children:C.windowName||C.window},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:74,columnNumber:23},this),h.jsxDEV("span",{className:"inbox-time",children:m1(C.ts,y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:75,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:71,columnNumber:21},this),C.msg&&h.jsxDEV("div",{className:"inbox-msg",children:C.msg},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:77,columnNumber:31},this)]},C.pane,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:70,columnNumber:19},this))]},v.session,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:67,columnNumber:15},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:42,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:40,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:34,columnNumber:5},this)}function MU({open:c,orphan:a,onConfirm:d,onClose:w,inset:j=0}){var v;const[L,b]=H.useState([]),[r,o]=H.useState("new"),[g,y]=H.useState(""),[u,p]=H.useState(!0),[S,N]=H.useState(!1),[_,l]=H.useState("");if(H.useEffect(()=>{c&&(o("new"),y((a==null?void 0:a.suggestedName)||""),p(JL()),N(!1),l(""),fl().then(C=>b(Array.isArray(C)?C:[])).catch(()=>b([])))},[c,a]),!c||!a)return null;const m=r==="new"?g.trim()||a.suggestedName||"":((v=L.find(C=>C.id===r))==null?void 0:v.name)||"",f=async()=>{if(S)return;N(!0),l(""),ZL(u);const C=r==="new"?{mode:"new"}:{mode:"window",session:r};try{await d({target:C,kill:u,name:r==="new"?g.trim():void 0})}catch{N(!1),l(B("inbox.orphans.failed"))}};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop",onClick:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:44,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${j/2}px))`},role:"dialog","aria-label":B("inbox.orphans.takeover"),"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:B("inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:51,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:w,"aria-label":B("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:52,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:50,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:a.cwdLabel||a.cwd},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:56,columnNumber:13},this),a.snippet&&h.jsxDEV("div",{className:"inbox-msg",children:a.snippet},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:57,columnNumber:32},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:55,columnNumber:11},this),h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("inbox.orphans.targetLabel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:60,columnNumber:13},this),h.jsxDEV("div",{className:"orphan-targets",children:[h.jsxDEV("button",{className:"fontbtn","aria-pressed":r==="new",onClick:()=>o("new"),children:B("inbox.orphans.targetNew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:62,columnNumber:15},this),L.map(C=>h.jsxDEV("button",{className:"fontbtn","aria-pressed":r===C.id,onClick:()=>o(C.id),children:C.name},C.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:66,columnNumber:17},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:61,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:59,columnNumber:11},this),r==="new"&&h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("inbox.orphans.nameLabel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:74,columnNumber:15},this),h.jsxDEV("input",{className:"bind-input",value:g,placeholder:B("inbox.orphans.namePlaceholder"),onChange:C=>{y(C.target.value),l("")}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:75,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:73,columnNumber:13},this),h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("inbox.orphans.killTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:84,columnNumber:13},this),h.jsxDEV("div",{className:"orphan-targets orphan-kill",children:[h.jsxDEV("button",{className:"fontbtn","aria-pressed":u,onClick:()=>p(!0),children:[B("inbox.orphans.killEnd"),h.jsxDEV("span",{className:"orphan-reco",children:B("inbox.orphans.recommended")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:87,columnNumber:45},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:86,columnNumber:15},this),h.jsxDEV("button",{className:"fontbtn","aria-pressed":!u,onClick:()=>p(!1),children:B("inbox.orphans.killKeep")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:89,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:85,columnNumber:13},this),h.jsxDEV("div",{className:"orphan-help",children:B("inbox.orphans.killWhy")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:93,columnNumber:13},this),h.jsxDEV("div",{className:"orphan-help",children:[B("inbox.orphans.reopenPre")," ",h.jsxDEV("code",{className:"orphan-cmd",children:["handmux open ",m||B("inbox.orphans.namePlaceholder")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:96,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:94,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:83,columnNumber:11},this),_&&h.jsxDEV("div",{className:"bind-error",children:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:99,columnNumber:21},this),h.jsxDEV("div",{className:"settings-btns bind-actions",children:[h.jsxDEV("button",{className:"fontbtn",onClick:w,children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:101,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:f,disabled:S,children:B(S?"inbox.orphans.working":"inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:102,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:100,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:54,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:45,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:43,columnNumber:5},this)}const eS="tw_a2hs_dismissed",cu=()=>typeof navigator<"u"&&navigator.userAgent||"",Nh=()=>/iP(hone|ad|od)/.test(cu())||/Macintosh/.test(cu())&&typeof navigator<"u"&&navigator.maxTouchPoints>1,UU=()=>/Android/.test(cu()),OU=()=>Nh()&&/Safari/.test(cu())&&!/(CriOS|FxiOS|EdgiOS|OPiOS|mercury|GSA)/.test(cu());function PU(){const[c,a]=H.useState(!1),[d,w]=H.useState(null);if(H.useEffect(()=>{if(g1()||!Nh()&&!UU())return;try{if(localStorage.getItem(eS)==="1")return}catch{}const g=y=>{y.preventDefault(),w(y)};return window.addEventListener("beforeinstallprompt",g),a(!0),()=>window.removeEventListener("beforeinstallprompt",g)},[]),!c)return null;const j=()=>{try{localStorage.setItem(eS,"1")}catch{}a(!1)},L=async()=>{if(d){d.prompt();try{await d.userChoice}catch{}j()}};let b,r,o=null;return d?(b="install",r=B("a2hs.lead"),o=h.jsxDEV("button",{className:"a2hs-banner-cta",onClick:L,children:B("a2hs.install")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:54,columnNumber:11},this)):Nh()&&!OU()?(b="ios-other",r=B("a2hs.iosOpenSafari")):Nh()?(b="ios",r=B("a2hs.iosHint")):(b="android",r=B("a2hs.androidManual")),h.jsxDEV("div",{className:"a2hs-banner",role:"status","aria-label":B("a2hs.title"),"data-mode":b,children:[h.jsxDEV("span",{className:"a2hs-banner-icon","aria-hidden":"true",children:"⊕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:65,columnNumber:7},this),h.jsxDEV("div",{className:"a2hs-banner-txt",children:[h.jsxDEV("span",{className:"a2hs-banner-title",children:B("a2hs.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:67,columnNumber:9},this),h.jsxDEV("span",{className:"a2hs-banner-sub",children:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:68,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:66,columnNumber:7},this),o,h.jsxDEV("button",{className:"a2hs-banner-x",onClick:j,"aria-label":B("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:71,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:64,columnNumber:5},this)}const Cg="tw_claude_hooks";function BU(){try{return localStorage.getItem(Cg)||null}catch{return null}}function IU(){const[c,a]=H.useState(BU);H.useEffect(()=>{let w=!0;return Promise.resolve().then(i1).then(j=>{if(!w)return;const L=(j==null?void 0:j.claudeHooks)||"installed";a(L);try{localStorage.setItem(Cg,L)}catch{}}).catch(()=>{}),()=>{w=!1}},[]);const d=H.useCallback(async()=>{const w=await PA();if(w!=null&&w.status){a(w.status);try{localStorage.setItem(Cg,w.status)}catch{}}return w},[]);return{status:c,enable:d}}function VU({value:c,options:a,onChange:d,ariaLabel:w}){const[j,L]=H.useState(!1),b=H.useRef(null),r=a.find(o=>o.value===c)||a[0];return H.useEffect(()=>{if(!j)return;const o=g=>{var y;(y=b.current)!=null&&y.contains(g.target)||L(!1)};return document.addEventListener("pointerdown",o,!0),()=>document.removeEventListener("pointerdown",o,!0)},[j]),h.jsxDEV("div",{className:"dd",ref:b,children:[h.jsxDEV("button",{type:"button",className:"field dd-trigger","aria-haspopup":"listbox","aria-expanded":j,"aria-label":w,onClick:()=>L(o=>!o),children:[h.jsxDEV("span",{className:"dd-value",children:r==null?void 0:r.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:30,columnNumber:9},this),h.jsxDEV("span",{className:`dd-caret${j?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:31,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:22,columnNumber:7},this),j&&h.jsxDEV("div",{className:"dd-menu",role:"listbox",children:a.map(o=>h.jsxDEV("button",{type:"button",role:"option","aria-selected":o.value===c,className:`dd-option${o.value===c?" is-selected":""}`,onClick:()=>{d==null||d(o.value),L(!1)},children:[h.jsxDEV("span",{className:"dd-option-label",children:o.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:44,columnNumber:15},this),o.value===c&&h.jsxDEV("span",{className:"dd-check","aria-hidden":"true",children:"✓"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:45,columnNumber:37},this)]},o.value||"__none__",!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:36,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:34,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:21,columnNumber:5},this)}const z1=[{value:"",label:B("startup.preset_shell")},{value:"claude",label:B("startup.preset_claude")},{value:"claude --continue",label:B("startup.preset_claude_continue")},{value:"codex",label:B("startup.preset_codex")}],Ch="__custom__",FU=[...z1,{value:Ch,label:B("startup.custom")}];function $1({value:c="",onChange:a}){const d=z1.some(g=>g.value===c),[w,j]=H.useState(d?c:Ch),[L,b]=H.useState(d?"":c),r=g=>{j(g),a==null||a(g===Ch?L:g)},o=g=>{const y=g.target.value;b(y),a==null||a(y)};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-label",children:B("startup.label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:29,columnNumber:7},this),h.jsxDEV(VU,{value:w,options:FU,onChange:r,ariaLabel:B("startup.aria")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:30,columnNumber:7},this),w===Ch&&h.jsxDEV("input",{className:"bind-input startup-custom",value:L,placeholder:B("startup.custom_placeholder"),onChange:o,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:32,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:28,columnNumber:5},this)}const HU=/^[A-Za-z0-9-]{1,16}$/;function zU({open:c,onClose:a,onBound:d,bound:w,onAuthFail:j,inset:L=0}){const[b,r]=H.useState([]),[o,g]=H.useState(null),[y,u]=H.useState(""),[p,S]=H.useState(""),[N,_]=H.useState(!1),[l,m]=H.useState(null),[f,v]=H.useState(GS()),[C,T]=H.useState(!1),E=H.useRef(null);if(H.useEffect(()=>{c&&(g(null),u(""),S(""),_(!1),m(null),T(!1),fl().then(M=>r(Array.isArray(M)?M:[])).catch(M=>{M instanceof Rr?j==null||j():S(B("bind.checkFailed"))}))},[c]),H.useEffect(()=>{o==="new"&&setTimeout(()=>{var M;return(M=E.current)==null?void 0:M.focus()},0)},[o]),!c)return null;const A=b.filter(M=>!w.includes(M.name)),D=async()=>{if(N||!o)return;if(o!=="new"){d(o);return}const M=y.trim();if(M){if(w.includes(M)||b.some($=>$.name===M)){S(B("bind.alreadyExists"));return}if(!HU.test(M)){S(B("bind.invalidName"));return}_(!0),S(""),YS(f);try{await jA(M,l||void 0,f||void 0),d(M)}catch($){$ instanceof Rr?j==null||j():S(B("bind.createFailed")),_(!1)}}},R=B(o==="new"?N?"bind.creating":"bind.createAndOpen":N?"bind.checking":"bind.bind");return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop",onClick:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:71,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${L/2}px))`},role:"dialog","aria-label":B("bind.title"),"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:B("bind.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:81,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:a,"aria-label":B("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:82,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:80,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("bind.pickSession")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:86,columnNumber:13},this),h.jsxDEV("div",{className:"orphan-targets",children:[h.jsxDEV("button",{className:"fontbtn","aria-pressed":o==="new",onClick:()=>{g("new"),S("")},children:B("bind.newSession")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:88,columnNumber:15},this),A.map(M=>h.jsxDEV("button",{className:"fontbtn","aria-pressed":o===M.name,onClick:()=>{g(M.name),S("")},children:M.name},M.id||M.name,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:92,columnNumber:17},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:87,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:85,columnNumber:11},this),o==="new"&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("bind.sessionName")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:106,columnNumber:17},this),h.jsxDEV("input",{ref:E,className:"bind-input",value:y,placeholder:B("bind.namePlaceholder"),onChange:M=>{u(M.target.value),S("")},onKeyDown:M=>{M.key==="Enter"&&D()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:107,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:105,columnNumber:15},this),h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("bind.startDir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:117,columnNumber:17},this),h.jsxDEV("button",{type:"button",className:"field cwd-field",onClick:()=>T(!0),children:[h.jsxDEV("span",{className:"cwd-path",children:l||B("bind.homeDirDefault")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:119,columnNumber:19},this),h.jsxDEV("span",{className:"cwd-action",children:B("bind.choose")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:120,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:118,columnNumber:17},this),l&&h.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>m(null),children:B("bind.reset")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:122,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:116,columnNumber:15},this),h.jsxDEV("div",{className:"opt",children:h.jsxDEV($1,{value:f,onChange:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:125,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:124,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:104,columnNumber:13},this),p&&h.jsxDEV("div",{className:"bind-error",children:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:129,columnNumber:21},this),h.jsxDEV("div",{className:"settings-hint",children:B("bind.desktopHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:132,columnNumber:11},this),h.jsxDEV("div",{className:"settings-btns bind-actions",children:[h.jsxDEV("button",{className:"fontbtn",onClick:a,children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:134,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:D,disabled:N||!o,children:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:135,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:133,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:84,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:75,columnNumber:7},this),h.jsxDEV(du,{open:C,seedCwd:l,allowMkdir:!0,onPick:M=>{m(M),T(!1)},onClose:()=>T(!1),inset:L},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:141,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:70,columnNumber:5},this)}const $U=/^[A-Za-z0-9-]{1,16}$/;function WU({open:c,onClose:a,onCreate:d,paneId:w,inset:j=0}){const[L,b]=H.useState(""),[r,o]=H.useState(""),[g,y]=H.useState(!1),[u,p]=H.useState(null),[S,N]=H.useState(""),[_,l]=H.useState(GS()),[m,f]=H.useState(!1),v=H.useRef(null);if(H.useEffect(()=>{c&&(b(""),o(""),y(!1),p(null),N(""),f(!1),setTimeout(()=>{var T;return(T=v.current)==null?void 0:T.focus()},0),w&&ao(w).then(({cwd:T})=>N(T||"")).catch(()=>{}))},[c,w]),!c)return null;const C=async()=>{if(g)return;const T=L.trim();if(T&&!$U.test(T)){o(B("newwindow.name_rule"));return}y(!0),o(""),YS(_);try{await d(T,u||void 0,_||void 0)}catch{y(!1)}};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop",onClick:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:49,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${j/2}px))`},role:"dialog","aria-label":B("newwindow.title"),"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:B("newwindow.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:56,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:a,"aria-label":B("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:57,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:55,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("newwindow.window_name")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:61,columnNumber:13},this),h.jsxDEV("input",{ref:v,className:"bind-input",value:L,placeholder:B("newwindow.name_placeholder"),onChange:T=>{b(T.target.value),o("")},onKeyDown:T=>{T.key==="Enter"&&C()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:62,columnNumber:13},this),r&&h.jsxDEV("div",{className:"bind-error",children:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:70,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:60,columnNumber:11},this),h.jsxDEV("div",{className:"opt",children:[h.jsxDEV("div",{className:"settings-label",children:B("newwindow.start_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:73,columnNumber:13},this),h.jsxDEV("button",{type:"button",className:"field cwd-field",onClick:()=>f(!0),children:[h.jsxDEV("span",{className:"cwd-path",children:u||(S?B("newwindow.session_dir_named",{dir:S}):B("newwindow.session_dir_default"))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:75,columnNumber:15},this),h.jsxDEV("span",{className:"cwd-action",children:B("newwindow.choose")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:76,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:74,columnNumber:13},this),u&&h.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>p(null),children:B("newwindow.reset_to_session_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:78,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:72,columnNumber:11},this),h.jsxDEV("div",{className:"opt",children:h.jsxDEV($1,{value:_,onChange:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:81,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:80,columnNumber:11},this),h.jsxDEV("div",{className:"settings-btns bind-actions",children:[h.jsxDEV("button",{className:"fontbtn",onClick:a,children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:84,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:C,disabled:g,children:B(g?"newwindow.creating":"common.create")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:85,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:83,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:59,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:50,columnNumber:7},this),h.jsxDEV(du,{open:m,seedCwd:u||S||null,pane:w,allowMkdir:!0,onPick:T=>{p(T),f(!1)},onClose:()=>f(!1),inset:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:91,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:48,columnNumber:5},this)}const GU=/^[A-Za-z0-9-]{1,16}$/;function YU({open:c,title:a,currentName:d="",onClose:w,onSubmit:j,inset:L=0}){const[b,r]=H.useState(d),[o,g]=H.useState(""),[y,u]=H.useState(!1),p=H.useRef(null);if(H.useEffect(()=>{c&&(r(d),g(""),u(!1),setTimeout(()=>{var N;return(N=p.current)==null?void 0:N.focus()},0))},[c,d]),!c)return null;const S=async()=>{if(y)return;const N=b.trim();if(!GU.test(N)){g(B("rename.name_rule"));return}u(!0),g("");try{await j(N)}catch(_){g((_==null?void 0:_.message)||B("rename.failed")),u(!1)}};return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"settings-backdrop",onClick:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:36,columnNumber:7},this),h.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${L/2}px))`},role:"dialog","aria-label":a,"aria-modal":"true",children:[h.jsxDEV("div",{className:"settings-head",children:[h.jsxDEV("span",{className:"settings-title",children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:43,columnNumber:11},this),h.jsxDEV("button",{className:"settings-close",onClick:w,"aria-label":B("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:44,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:42,columnNumber:9},this),h.jsxDEV("div",{className:"settings-section",children:[h.jsxDEV("div",{className:"settings-label",children:B("rename.new_name")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:47,columnNumber:11},this),h.jsxDEV("input",{ref:p,className:"bind-input",value:b,placeholder:B("rename.name_placeholder"),onChange:N=>{r(N.target.value),g("")},onKeyDown:N=>{N.key==="Enter"&&S()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:48,columnNumber:11},this),o&&h.jsxDEV("div",{className:"bind-error",children:o},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:56,columnNumber:21},this),h.jsxDEV("div",{className:"settings-btns bind-actions",children:[h.jsxDEV("button",{className:"fontbtn",onClick:w,children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:58,columnNumber:13},this),h.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:S,disabled:y,children:B(y?"rename.saving":"common.save")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:59,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:57,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:46,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:37,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:35,columnNumber:5},this)}function qU({onOpenDoc:c,refreshKey:a=0}){const[d,w]=H.useState(()=>tu()),j=b=>{iA(b),w(tu())},L=H.useRef(!0);return H.useEffect(()=>{if(L.current){L.current=!1;return}w(tu())},[a]),d.length===0?h.jsxDEV("div",{className:"home-view",children:h.jsxDEV("div",{className:"home-empty",children:[B("home.empty"),h.jsxDEV("span",{children:B("home.emptyHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:23,columnNumber:54},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:23,columnNumber:9},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:22,columnNumber:7},this):h.jsxDEV("div",{className:"home-view",children:d.map(b=>h.jsxDEV("div",{className:"home-recent-row",children:[h.jsxDEV("button",{className:"home-recent",onClick:()=>c(b.path),title:b.path,children:[h.jsxDEV("span",{className:"home-name",children:b.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:32,columnNumber:13},this),h.jsxDEV("span",{className:"home-path",children:b.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:33,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:31,columnNumber:11},this),h.jsxDEV("button",{className:"home-x","aria-label":B("home.remove"),onClick:()=>j(b.path),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:35,columnNumber:11},this)]},b.path,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:30,columnNumber:9},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:28,columnNumber:5},this)}function $g(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let uo=$g();function W1(c){uo=c}const G1=/[&<>"']/,KU=new RegExp(G1.source,"g"),Y1=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,XU=new RegExp(Y1.source,"g"),JU={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},tS=c=>JU[c];function jr(c,a){if(a){if(G1.test(c))return c.replace(KU,tS)}else if(Y1.test(c))return c.replace(XU,tS);return c}const ZU=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function QU(c){return c.replace(ZU,(a,d)=>(d=d.toLowerCase(),d==="colon"?":":d.charAt(0)==="#"?d.charAt(1)==="x"?String.fromCharCode(parseInt(d.substring(2),16)):String.fromCharCode(+d.substring(1)):""))}const eO=/(^|[^\[])\^/g;function Mn(c,a){let d=typeof c=="string"?c:c.source;a=a||"";const w={replace:(j,L)=>{let b=typeof L=="string"?L:L.source;return b=b.replace(eO,"$1"),d=d.replace(j,b),w},getRegex:()=>new RegExp(d,a)};return w}function nS(c){try{c=encodeURI(c).replace(/%25/g,"%")}catch{return null}return c}const iu={exec:()=>null};function iS(c,a){const d=c.replace(/\|/g,(L,b,r)=>{let o=!1,g=b;for(;--g>=0&&r[g]==="\\";)o=!o;return o?"|":" |"}),w=d.split(/ \|/);let j=0;if(w[0].trim()||w.shift(),w.length>0&&!w[w.length-1].trim()&&w.pop(),a)if(w.length>a)w.splice(a);else for(;w.length<a;)w.push("");for(;j<w.length;j++)w[j]=w[j].trim().replace(/\\\|/g,"|");return w}function _h(c,a,d){const w=c.length;if(w===0)return"";let j=0;for(;j<w&&c.charAt(w-j-1)===a;)j++;return c.slice(0,w-j)}function tO(c,a){if(c.indexOf(a[1])===-1)return-1;let d=0;for(let w=0;w<c.length;w++)if(c[w]==="\\")w++;else if(c[w]===a[0])d++;else if(c[w]===a[1]&&(d--,d<0))return w;return-1}function rS(c,a,d,w){const j=a.href,L=a.title?jr(a.title):null,b=c[1].replace(/\\([\[\]])/g,"$1");if(c[0].charAt(0)!=="!"){w.state.inLink=!0;const r={type:"link",raw:d,href:j,title:L,text:b,tokens:w.inlineTokens(b)};return w.state.inLink=!1,r}return{type:"image",raw:d,href:j,title:L,text:jr(b)}}function nO(c,a){const d=c.match(/^(\s+)(?:```)/);if(d===null)return a;const w=d[1];return a.split(`
283
+ `).map(j=>{const L=j.match(/^\s+/);if(L===null)return j;const[b]=L;return b.length>=w.length?j.slice(w.length):j}).join(`
284
+ `)}class Uh{constructor(a){Gn(this,"options");Gn(this,"rules");Gn(this,"lexer");this.options=a||uo}space(a){const d=this.rules.block.newline.exec(a);if(d&&d[0].length>0)return{type:"space",raw:d[0]}}code(a){const d=this.rules.block.code.exec(a);if(d){const w=d[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:d[0],codeBlockStyle:"indented",text:this.options.pedantic?w:_h(w,`
285
+ `)}}}fences(a){const d=this.rules.block.fences.exec(a);if(d){const w=d[0],j=nO(w,d[3]||"");return{type:"code",raw:w,lang:d[2]?d[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):d[2],text:j}}}heading(a){const d=this.rules.block.heading.exec(a);if(d){let w=d[2].trim();if(/#$/.test(w)){const j=_h(w,"#");(this.options.pedantic||!j||/ $/.test(j))&&(w=j.trim())}return{type:"heading",raw:d[0],depth:d[1].length,text:w,tokens:this.lexer.inline(w)}}}hr(a){const d=this.rules.block.hr.exec(a);if(d)return{type:"hr",raw:d[0]}}blockquote(a){const d=this.rules.block.blockquote.exec(a);if(d){let w=d[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
286
+ $1`);w=_h(w.replace(/^ *>[ \t]?/gm,""),`
287
+ `);const j=this.lexer.state.top;this.lexer.state.top=!0;const L=this.lexer.blockTokens(w);return this.lexer.state.top=j,{type:"blockquote",raw:d[0],tokens:L,text:w}}}list(a){let d=this.rules.block.list.exec(a);if(d){let w=d[1].trim();const j=w.length>1,L={type:"list",raw:"",ordered:j,start:j?+w.slice(0,-1):"",loose:!1,items:[]};w=j?`\\d{1,9}\\${w.slice(-1)}`:`\\${w}`,this.options.pedantic&&(w=j?w:"[*+-]");const b=new RegExp(`^( {0,3}${w})((?:[ ][^\\n]*)?(?:\\n|$))`);let r="",o="",g=!1;for(;a;){let y=!1;if(!(d=b.exec(a))||this.rules.block.hr.test(a))break;r=d[0],a=a.substring(r.length);let u=d[2].split(`
288
+ `,1)[0].replace(/^\t+/,m=>" ".repeat(3*m.length)),p=a.split(`
289
+ `,1)[0],S=0;this.options.pedantic?(S=2,o=u.trimStart()):(S=d[2].search(/[^ ]/),S=S>4?1:S,o=u.slice(S),S+=d[1].length);let N=!1;if(!u&&/^ *$/.test(p)&&(r+=p+`
290
+ `,a=a.substring(p.length+1),y=!0),!y){const m=new RegExp(`^ {0,${Math.min(3,S-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),f=new RegExp(`^ {0,${Math.min(3,S-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),v=new RegExp(`^ {0,${Math.min(3,S-1)}}(?:\`\`\`|~~~)`),C=new RegExp(`^ {0,${Math.min(3,S-1)}}#`);for(;a;){const T=a.split(`
291
+ `,1)[0];if(p=T,this.options.pedantic&&(p=p.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),v.test(p)||C.test(p)||m.test(p)||f.test(a))break;if(p.search(/[^ ]/)>=S||!p.trim())o+=`
292
+ `+p.slice(S);else{if(N||u.search(/[^ ]/)>=4||v.test(u)||C.test(u)||f.test(u))break;o+=`
293
+ `+p}!N&&!p.trim()&&(N=!0),r+=T+`
294
+ `,a=a.substring(T.length+1),u=p.slice(S)}}L.loose||(g?L.loose=!0:/\n *\n *$/.test(r)&&(g=!0));let _=null,l;this.options.gfm&&(_=/^\[[ xX]\] /.exec(o),_&&(l=_[0]!=="[ ] ",o=o.replace(/^\[[ xX]\] +/,""))),L.items.push({type:"list_item",raw:r,task:!!_,checked:l,loose:!1,text:o,tokens:[]}),L.raw+=r}L.items[L.items.length-1].raw=r.trimEnd(),L.items[L.items.length-1].text=o.trimEnd(),L.raw=L.raw.trimEnd();for(let y=0;y<L.items.length;y++)if(this.lexer.state.top=!1,L.items[y].tokens=this.lexer.blockTokens(L.items[y].text,[]),!L.loose){const u=L.items[y].tokens.filter(S=>S.type==="space"),p=u.length>0&&u.some(S=>/\n.*\n/.test(S.raw));L.loose=p}if(L.loose)for(let y=0;y<L.items.length;y++)L.items[y].loose=!0;return L}}html(a){const d=this.rules.block.html.exec(a);if(d)return{type:"html",block:!0,raw:d[0],pre:d[1]==="pre"||d[1]==="script"||d[1]==="style",text:d[0]}}def(a){const d=this.rules.block.def.exec(a);if(d){const w=d[1].toLowerCase().replace(/\s+/g," "),j=d[2]?d[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",L=d[3]?d[3].substring(1,d[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):d[3];return{type:"def",tag:w,raw:d[0],href:j,title:L}}}table(a){const d=this.rules.block.table.exec(a);if(!d||!/[:|]/.test(d[2]))return;const w=iS(d[1]),j=d[2].replace(/^\||\| *$/g,"").split("|"),L=d[3]&&d[3].trim()?d[3].replace(/\n[ \t]*$/,"").split(`
295
+ `):[],b={type:"table",raw:d[0],header:[],align:[],rows:[]};if(w.length===j.length){for(const r of j)/^ *-+: *$/.test(r)?b.align.push("right"):/^ *:-+: *$/.test(r)?b.align.push("center"):/^ *:-+ *$/.test(r)?b.align.push("left"):b.align.push(null);for(const r of w)b.header.push({text:r,tokens:this.lexer.inline(r)});for(const r of L)b.rows.push(iS(r,b.header.length).map(o=>({text:o,tokens:this.lexer.inline(o)})));return b}}lheading(a){const d=this.rules.block.lheading.exec(a);if(d)return{type:"heading",raw:d[0],depth:d[2].charAt(0)==="="?1:2,text:d[1],tokens:this.lexer.inline(d[1])}}paragraph(a){const d=this.rules.block.paragraph.exec(a);if(d){const w=d[1].charAt(d[1].length-1)===`
296
+ `?d[1].slice(0,-1):d[1];return{type:"paragraph",raw:d[0],text:w,tokens:this.lexer.inline(w)}}}text(a){const d=this.rules.block.text.exec(a);if(d)return{type:"text",raw:d[0],text:d[0],tokens:this.lexer.inline(d[0])}}escape(a){const d=this.rules.inline.escape.exec(a);if(d)return{type:"escape",raw:d[0],text:jr(d[1])}}tag(a){const d=this.rules.inline.tag.exec(a);if(d)return!this.lexer.state.inLink&&/^<a /i.test(d[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(d[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(d[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(d[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:d[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:d[0]}}link(a){const d=this.rules.inline.link.exec(a);if(d){const w=d[2].trim();if(!this.options.pedantic&&/^</.test(w)){if(!/>$/.test(w))return;const b=_h(w.slice(0,-1),"\\");if((w.length-b.length)%2===0)return}else{const b=tO(d[2],"()");if(b>-1){const o=(d[0].indexOf("!")===0?5:4)+d[1].length+b;d[2]=d[2].substring(0,b),d[0]=d[0].substring(0,o).trim(),d[3]=""}}let j=d[2],L="";if(this.options.pedantic){const b=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(j);b&&(j=b[1],L=b[3])}else L=d[3]?d[3].slice(1,-1):"";return j=j.trim(),/^</.test(j)&&(this.options.pedantic&&!/>$/.test(w)?j=j.slice(1):j=j.slice(1,-1)),rS(d,{href:j&&j.replace(this.rules.inline.anyPunctuation,"$1"),title:L&&L.replace(this.rules.inline.anyPunctuation,"$1")},d[0],this.lexer)}}reflink(a,d){let w;if((w=this.rules.inline.reflink.exec(a))||(w=this.rules.inline.nolink.exec(a))){const j=(w[2]||w[1]).replace(/\s+/g," "),L=d[j.toLowerCase()];if(!L){const b=w[0].charAt(0);return{type:"text",raw:b,text:b}}return rS(w,L,w[0],this.lexer)}}emStrong(a,d,w=""){let j=this.rules.inline.emStrongLDelim.exec(a);if(!j||j[3]&&w.match(/[\p{L}\p{N}]/u))return;if(!(j[1]||j[2]||"")||!w||this.rules.inline.punctuation.exec(w)){const b=[...j[0]].length-1;let r,o,g=b,y=0;const u=j[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,d=d.slice(-1*a.length+b);(j=u.exec(d))!=null;){if(r=j[1]||j[2]||j[3]||j[4]||j[5]||j[6],!r)continue;if(o=[...r].length,j[3]||j[4]){g+=o;continue}else if((j[5]||j[6])&&b%3&&!((b+o)%3)){y+=o;continue}if(g-=o,g>0)continue;o=Math.min(o,o+g+y);const p=[...j[0]][0].length,S=a.slice(0,b+j.index+p+o);if(Math.min(b,o)%2){const _=S.slice(1,-1);return{type:"em",raw:S,text:_,tokens:this.lexer.inlineTokens(_)}}const N=S.slice(2,-2);return{type:"strong",raw:S,text:N,tokens:this.lexer.inlineTokens(N)}}}}codespan(a){const d=this.rules.inline.code.exec(a);if(d){let w=d[2].replace(/\n/g," ");const j=/[^ ]/.test(w),L=/^ /.test(w)&&/ $/.test(w);return j&&L&&(w=w.substring(1,w.length-1)),w=jr(w,!0),{type:"codespan",raw:d[0],text:w}}}br(a){const d=this.rules.inline.br.exec(a);if(d)return{type:"br",raw:d[0]}}del(a){const d=this.rules.inline.del.exec(a);if(d)return{type:"del",raw:d[0],text:d[2],tokens:this.lexer.inlineTokens(d[2])}}autolink(a){const d=this.rules.inline.autolink.exec(a);if(d){let w,j;return d[2]==="@"?(w=jr(d[1]),j="mailto:"+w):(w=jr(d[1]),j=w),{type:"link",raw:d[0],text:w,href:j,tokens:[{type:"text",raw:w,text:w}]}}}url(a){var w;let d;if(d=this.rules.inline.url.exec(a)){let j,L;if(d[2]==="@")j=jr(d[0]),L="mailto:"+j;else{let b;do b=d[0],d[0]=((w=this.rules.inline._backpedal.exec(d[0]))==null?void 0:w[0])??"";while(b!==d[0]);j=jr(d[0]),d[1]==="www."?L="http://"+d[0]:L=d[0]}return{type:"link",raw:d[0],text:j,href:L,tokens:[{type:"text",raw:j,text:j}]}}}inlineText(a){const d=this.rules.inline.text.exec(a);if(d){let w;return this.lexer.state.inRawBlock?w=d[0]:w=jr(d[0]),{type:"text",raw:d[0],text:w}}}}const iO=/^(?: *(?:\n|$))+/,rO=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,sO=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,aO=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,q1=/(?:[*+-]|\d{1,9}[.)])/,K1=Mn(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,q1).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Wg=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,oO=/^[^\n]+/,Gg=/(?!\s*\])(?:\\.|[^\[\]\\])+/,lO=Mn(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Gg).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),cO=Mn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,q1).getRegex(),zh="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Yg=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,uO=Mn("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Yg).replace("tag",zh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),X1=Mn(Wg).replace("hr",hu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zh).getRegex(),dO=Mn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",X1).getRegex(),qg={blockquote:dO,code:rO,def:lO,fences:sO,heading:aO,hr:hu,html:uO,lheading:K1,list:cO,newline:iO,paragraph:X1,table:iu,text:oO},sS=Mn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zh).getRegex(),hO={...qg,table:sS,paragraph:Mn(Wg).replace("hr",hu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",sS).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zh).getRegex()},fO={...qg,html:Mn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Yg).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:iu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Mn(Wg).replace("hr",hu).replace("heading",` *#{1,6} *[^
297
+ ]`).replace("lheading",K1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},J1=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,mO=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Z1=/^( {2,}|\\)\n(?!\s*$)/,pO=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,fu="\\p{P}\\p{S}",vO=Mn(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,fu).getRegex(),gO=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,_O=Mn(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,fu).getRegex(),bO=Mn("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,fu).getRegex(),yO=Mn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,fu).getRegex(),wO=Mn(/\\([punct])/,"gu").replace(/punct/g,fu).getRegex(),xO=Mn(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),SO=Mn(Yg).replace("(?:-->|$)","-->").getRegex(),NO=Mn("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",SO).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Oh=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,CO=Mn(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Oh).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Q1=Mn(/^!?\[(label)\]\[(ref)\]/).replace("label",Oh).replace("ref",Gg).getRegex(),eN=Mn(/^!?\[(ref)\](?:\[\])?/).replace("ref",Gg).getRegex(),EO=Mn("reflink|nolink(?!\\()","g").replace("reflink",Q1).replace("nolink",eN).getRegex(),Kg={_backpedal:iu,anyPunctuation:wO,autolink:xO,blockSkip:gO,br:Z1,code:mO,del:iu,emStrongLDelim:_O,emStrongRDelimAst:bO,emStrongRDelimUnd:yO,escape:J1,link:CO,nolink:eN,punctuation:vO,reflink:Q1,reflinkSearch:EO,tag:NO,text:pO,url:iu},DO={...Kg,link:Mn(/^!?\[(label)\]\((.*?)\)/).replace("label",Oh).getRegex(),reflink:Mn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Oh).getRegex()},Eg={...Kg,escape:Mn(J1).replace("])","~|])").getRegex(),url:Mn(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},jO={...Eg,br:Mn(Z1).replace("{2,}","*").getRegex(),text:Mn(Eg.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},bh={normal:qg,gfm:hO,pedantic:fO},Jc={normal:Kg,gfm:Eg,breaks:jO,pedantic:DO};class Ss{constructor(a){Gn(this,"tokens");Gn(this,"options");Gn(this,"state");Gn(this,"tokenizer");Gn(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=a||uo,this.options.tokenizer=this.options.tokenizer||new Uh,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const d={block:bh.normal,inline:Jc.normal};this.options.pedantic?(d.block=bh.pedantic,d.inline=Jc.pedantic):this.options.gfm&&(d.block=bh.gfm,this.options.breaks?d.inline=Jc.breaks:d.inline=Jc.gfm),this.tokenizer.rules=d}static get rules(){return{block:bh,inline:Jc}}static lex(a,d){return new Ss(d).lex(a)}static lexInline(a,d){return new Ss(d).inlineTokens(a)}lex(a){a=a.replace(/\r\n|\r/g,`
298
+ `),this.blockTokens(a,this.tokens);for(let d=0;d<this.inlineQueue.length;d++){const w=this.inlineQueue[d];this.inlineTokens(w.src,w.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(a,d=[]){this.options.pedantic?a=a.replace(/\t/g," ").replace(/^ +$/gm,""):a=a.replace(/^( *)(\t+)/gm,(r,o,g)=>o+" ".repeat(g.length));let w,j,L,b;for(;a;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(r=>(w=r.call({lexer:this},a,d))?(a=a.substring(w.raw.length),d.push(w),!0):!1))){if(w=this.tokenizer.space(a)){a=a.substring(w.raw.length),w.raw.length===1&&d.length>0?d[d.length-1].raw+=`
299
+ `:d.push(w);continue}if(w=this.tokenizer.code(a)){a=a.substring(w.raw.length),j=d[d.length-1],j&&(j.type==="paragraph"||j.type==="text")?(j.raw+=`
300
+ `+w.raw,j.text+=`
301
+ `+w.text,this.inlineQueue[this.inlineQueue.length-1].src=j.text):d.push(w);continue}if(w=this.tokenizer.fences(a)){a=a.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.heading(a)){a=a.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.hr(a)){a=a.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.blockquote(a)){a=a.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.list(a)){a=a.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.html(a)){a=a.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.def(a)){a=a.substring(w.raw.length),j=d[d.length-1],j&&(j.type==="paragraph"||j.type==="text")?(j.raw+=`
302
+ `+w.raw,j.text+=`
303
+ `+w.raw,this.inlineQueue[this.inlineQueue.length-1].src=j.text):this.tokens.links[w.tag]||(this.tokens.links[w.tag]={href:w.href,title:w.title});continue}if(w=this.tokenizer.table(a)){a=a.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.lheading(a)){a=a.substring(w.raw.length),d.push(w);continue}if(L=a,this.options.extensions&&this.options.extensions.startBlock){let r=1/0;const o=a.slice(1);let g;this.options.extensions.startBlock.forEach(y=>{g=y.call({lexer:this},o),typeof g=="number"&&g>=0&&(r=Math.min(r,g))}),r<1/0&&r>=0&&(L=a.substring(0,r+1))}if(this.state.top&&(w=this.tokenizer.paragraph(L))){j=d[d.length-1],b&&j.type==="paragraph"?(j.raw+=`
304
+ `+w.raw,j.text+=`
305
+ `+w.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=j.text):d.push(w),b=L.length!==a.length,a=a.substring(w.raw.length);continue}if(w=this.tokenizer.text(a)){a=a.substring(w.raw.length),j=d[d.length-1],j&&j.type==="text"?(j.raw+=`
306
+ `+w.raw,j.text+=`
307
+ `+w.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=j.text):d.push(w);continue}if(a){const r="Infinite loop on byte: "+a.charCodeAt(0);if(this.options.silent){console.error(r);break}else throw new Error(r)}}return this.state.top=!0,d}inline(a,d=[]){return this.inlineQueue.push({src:a,tokens:d}),d}inlineTokens(a,d=[]){let w,j,L,b=a,r,o,g;if(this.tokens.links){const y=Object.keys(this.tokens.links);if(y.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(b))!=null;)y.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(b=b.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+b.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.blockSkip.exec(b))!=null;)b=b.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+b.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(b))!=null;)b=b.slice(0,r.index)+"++"+b.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;a;)if(o||(g=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(y=>(w=y.call({lexer:this},a,d))?(a=a.substring(w.raw.length),d.push(w),!0):!1))){if(w=this.tokenizer.escape(a)){a=a.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.tag(a)){a=a.substring(w.raw.length),j=d[d.length-1],j&&w.type==="text"&&j.type==="text"?(j.raw+=w.raw,j.text+=w.text):d.push(w);continue}if(w=this.tokenizer.link(a)){a=a.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.reflink(a,this.tokens.links)){a=a.substring(w.raw.length),j=d[d.length-1],j&&w.type==="text"&&j.type==="text"?(j.raw+=w.raw,j.text+=w.text):d.push(w);continue}if(w=this.tokenizer.emStrong(a,b,g)){a=a.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.codespan(a)){a=a.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.br(a)){a=a.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.del(a)){a=a.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.autolink(a)){a=a.substring(w.raw.length),d.push(w);continue}if(!this.state.inLink&&(w=this.tokenizer.url(a))){a=a.substring(w.raw.length),d.push(w);continue}if(L=a,this.options.extensions&&this.options.extensions.startInline){let y=1/0;const u=a.slice(1);let p;this.options.extensions.startInline.forEach(S=>{p=S.call({lexer:this},u),typeof p=="number"&&p>=0&&(y=Math.min(y,p))}),y<1/0&&y>=0&&(L=a.substring(0,y+1))}if(w=this.tokenizer.inlineText(L)){a=a.substring(w.raw.length),w.raw.slice(-1)!=="_"&&(g=w.raw.slice(-1)),o=!0,j=d[d.length-1],j&&j.type==="text"?(j.raw+=w.raw,j.text+=w.text):d.push(w);continue}if(a){const y="Infinite loop on byte: "+a.charCodeAt(0);if(this.options.silent){console.error(y);break}else throw new Error(y)}}return d}}class Ph{constructor(a){Gn(this,"options");this.options=a||uo}code(a,d,w){var L;const j=(L=(d||"").match(/^\S*/))==null?void 0:L[0];return a=a.replace(/\n$/,"")+`
308
+ `,j?'<pre><code class="language-'+jr(j)+'">'+(w?a:jr(a,!0))+`</code></pre>
309
+ `:"<pre><code>"+(w?a:jr(a,!0))+`</code></pre>
310
+ `}blockquote(a){return`<blockquote>
311
+ ${a}</blockquote>
312
+ `}html(a,d){return a}heading(a,d,w){return`<h${d}>${a}</h${d}>
313
+ `}hr(){return`<hr>
314
+ `}list(a,d,w){const j=d?"ol":"ul",L=d&&w!==1?' start="'+w+'"':"";return"<"+j+L+`>
315
+ `+a+"</"+j+`>
316
+ `}listitem(a,d,w){return`<li>${a}</li>
317
+ `}checkbox(a){return"<input "+(a?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(a){return`<p>${a}</p>
318
+ `}table(a,d){return d&&(d=`<tbody>${d}</tbody>`),`<table>
319
+ <thead>
320
+ `+a+`</thead>
321
+ `+d+`</table>
322
+ `}tablerow(a){return`<tr>
323
+ ${a}</tr>
324
+ `}tablecell(a,d){const w=d.header?"th":"td";return(d.align?`<${w} align="${d.align}">`:`<${w}>`)+a+`</${w}>
325
+ `}strong(a){return`<strong>${a}</strong>`}em(a){return`<em>${a}</em>`}codespan(a){return`<code>${a}</code>`}br(){return"<br>"}del(a){return`<del>${a}</del>`}link(a,d,w){const j=nS(a);if(j===null)return w;a=j;let L='<a href="'+a+'"';return d&&(L+=' title="'+d+'"'),L+=">"+w+"</a>",L}image(a,d,w){const j=nS(a);if(j===null)return w;a=j;let L=`<img src="${a}" alt="${w}"`;return d&&(L+=` title="${d}"`),L+=">",L}text(a){return a}}class Xg{strong(a){return a}em(a){return a}codespan(a){return a}del(a){return a}html(a){return a}text(a){return a}link(a,d,w){return""+w}image(a,d,w){return""+w}br(){return""}}class Ns{constructor(a){Gn(this,"options");Gn(this,"renderer");Gn(this,"textRenderer");this.options=a||uo,this.options.renderer=this.options.renderer||new Ph,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Xg}static parse(a,d){return new Ns(d).parse(a)}static parseInline(a,d){return new Ns(d).parseInline(a)}parse(a,d=!0){let w="";for(let j=0;j<a.length;j++){const L=a[j];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[L.type]){const b=L,r=this.options.extensions.renderers[b.type].call({parser:this},b);if(r!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(b.type)){w+=r||"";continue}}switch(L.type){case"space":continue;case"hr":{w+=this.renderer.hr();continue}case"heading":{const b=L;w+=this.renderer.heading(this.parseInline(b.tokens),b.depth,QU(this.parseInline(b.tokens,this.textRenderer)));continue}case"code":{const b=L;w+=this.renderer.code(b.text,b.lang,!!b.escaped);continue}case"table":{const b=L;let r="",o="";for(let y=0;y<b.header.length;y++)o+=this.renderer.tablecell(this.parseInline(b.header[y].tokens),{header:!0,align:b.align[y]});r+=this.renderer.tablerow(o);let g="";for(let y=0;y<b.rows.length;y++){const u=b.rows[y];o="";for(let p=0;p<u.length;p++)o+=this.renderer.tablecell(this.parseInline(u[p].tokens),{header:!1,align:b.align[p]});g+=this.renderer.tablerow(o)}w+=this.renderer.table(r,g);continue}case"blockquote":{const b=L,r=this.parse(b.tokens);w+=this.renderer.blockquote(r);continue}case"list":{const b=L,r=b.ordered,o=b.start,g=b.loose;let y="";for(let u=0;u<b.items.length;u++){const p=b.items[u],S=p.checked,N=p.task;let _="";if(p.task){const l=this.renderer.checkbox(!!S);g?p.tokens.length>0&&p.tokens[0].type==="paragraph"?(p.tokens[0].text=l+" "+p.tokens[0].text,p.tokens[0].tokens&&p.tokens[0].tokens.length>0&&p.tokens[0].tokens[0].type==="text"&&(p.tokens[0].tokens[0].text=l+" "+p.tokens[0].tokens[0].text)):p.tokens.unshift({type:"text",text:l+" "}):_+=l+" "}_+=this.parse(p.tokens,g),y+=this.renderer.listitem(_,N,!!S)}w+=this.renderer.list(y,r,o);continue}case"html":{const b=L;w+=this.renderer.html(b.text,b.block);continue}case"paragraph":{const b=L;w+=this.renderer.paragraph(this.parseInline(b.tokens));continue}case"text":{let b=L,r=b.tokens?this.parseInline(b.tokens):b.text;for(;j+1<a.length&&a[j+1].type==="text";)b=a[++j],r+=`
326
+ `+(b.tokens?this.parseInline(b.tokens):b.text);w+=d?this.renderer.paragraph(r):r;continue}default:{const b='Token with "'+L.type+'" type was not found.';if(this.options.silent)return console.error(b),"";throw new Error(b)}}}return w}parseInline(a,d){d=d||this.renderer;let w="";for(let j=0;j<a.length;j++){const L=a[j];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[L.type]){const b=this.options.extensions.renderers[L.type].call({parser:this},L);if(b!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(L.type)){w+=b||"";continue}}switch(L.type){case"escape":{const b=L;w+=d.text(b.text);break}case"html":{const b=L;w+=d.html(b.text);break}case"link":{const b=L;w+=d.link(b.href,b.title,this.parseInline(b.tokens,d));break}case"image":{const b=L;w+=d.image(b.href,b.title,b.text);break}case"strong":{const b=L;w+=d.strong(this.parseInline(b.tokens,d));break}case"em":{const b=L;w+=d.em(this.parseInline(b.tokens,d));break}case"codespan":{const b=L;w+=d.codespan(b.text);break}case"br":{w+=d.br();break}case"del":{const b=L;w+=d.del(this.parseInline(b.tokens,d));break}case"text":{const b=L;w+=d.text(b.text);break}default:{const b='Token with "'+L.type+'" type was not found.';if(this.options.silent)return console.error(b),"";throw new Error(b)}}}return w}}class ru{constructor(a){Gn(this,"options");this.options=a||uo}preprocess(a){return a}postprocess(a){return a}processAllTokens(a){return a}}Gn(ru,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var lo,Dg,tN;class kO{constructor(...a){ax(this,lo);Gn(this,"defaults",$g());Gn(this,"options",this.setOptions);Gn(this,"parse",hh(this,lo,Dg).call(this,Ss.lex,Ns.parse));Gn(this,"parseInline",hh(this,lo,Dg).call(this,Ss.lexInline,Ns.parseInline));Gn(this,"Parser",Ns);Gn(this,"Renderer",Ph);Gn(this,"TextRenderer",Xg);Gn(this,"Lexer",Ss);Gn(this,"Tokenizer",Uh);Gn(this,"Hooks",ru);this.use(...a)}walkTokens(a,d){var j,L;let w=[];for(const b of a)switch(w=w.concat(d.call(this,b)),b.type){case"table":{const r=b;for(const o of r.header)w=w.concat(this.walkTokens(o.tokens,d));for(const o of r.rows)for(const g of o)w=w.concat(this.walkTokens(g.tokens,d));break}case"list":{const r=b;w=w.concat(this.walkTokens(r.items,d));break}default:{const r=b;(L=(j=this.defaults.extensions)==null?void 0:j.childTokens)!=null&&L[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{const g=r[o].flat(1/0);w=w.concat(this.walkTokens(g,d))}):r.tokens&&(w=w.concat(this.walkTokens(r.tokens,d)))}}return w}use(...a){const d=this.defaults.extensions||{renderers:{},childTokens:{}};return a.forEach(w=>{const j={...w};if(j.async=this.defaults.async||j.async||!1,w.extensions&&(w.extensions.forEach(L=>{if(!L.name)throw new Error("extension name required");if("renderer"in L){const b=d.renderers[L.name];b?d.renderers[L.name]=function(...r){let o=L.renderer.apply(this,r);return o===!1&&(o=b.apply(this,r)),o}:d.renderers[L.name]=L.renderer}if("tokenizer"in L){if(!L.level||L.level!=="block"&&L.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const b=d[L.level];b?b.unshift(L.tokenizer):d[L.level]=[L.tokenizer],L.start&&(L.level==="block"?d.startBlock?d.startBlock.push(L.start):d.startBlock=[L.start]:L.level==="inline"&&(d.startInline?d.startInline.push(L.start):d.startInline=[L.start]))}"childTokens"in L&&L.childTokens&&(d.childTokens[L.name]=L.childTokens)}),j.extensions=d),w.renderer){const L=this.defaults.renderer||new Ph(this.defaults);for(const b in w.renderer){if(!(b in L))throw new Error(`renderer '${b}' does not exist`);if(b==="options")continue;const r=b,o=w.renderer[r],g=L[r];L[r]=(...y)=>{let u=o.apply(L,y);return u===!1&&(u=g.apply(L,y)),u||""}}j.renderer=L}if(w.tokenizer){const L=this.defaults.tokenizer||new Uh(this.defaults);for(const b in w.tokenizer){if(!(b in L))throw new Error(`tokenizer '${b}' does not exist`);if(["options","rules","lexer"].includes(b))continue;const r=b,o=w.tokenizer[r],g=L[r];L[r]=(...y)=>{let u=o.apply(L,y);return u===!1&&(u=g.apply(L,y)),u}}j.tokenizer=L}if(w.hooks){const L=this.defaults.hooks||new ru;for(const b in w.hooks){if(!(b in L))throw new Error(`hook '${b}' does not exist`);if(b==="options")continue;const r=b,o=w.hooks[r],g=L[r];ru.passThroughHooks.has(b)?L[r]=y=>{if(this.defaults.async)return Promise.resolve(o.call(L,y)).then(p=>g.call(L,p));const u=o.call(L,y);return g.call(L,u)}:L[r]=(...y)=>{let u=o.apply(L,y);return u===!1&&(u=g.apply(L,y)),u}}j.hooks=L}if(w.walkTokens){const L=this.defaults.walkTokens,b=w.walkTokens;j.walkTokens=function(r){let o=[];return o.push(b.call(this,r)),L&&(o=o.concat(L.call(this,r))),o}}this.defaults={...this.defaults,...j}}),this}setOptions(a){return this.defaults={...this.defaults,...a},this}lexer(a,d){return Ss.lex(a,d??this.defaults)}parser(a,d){return Ns.parse(a,d??this.defaults)}}lo=new WeakSet,Dg=function(a,d){return(w,j)=>{const L={...j},b={...this.defaults,...L};this.defaults.async===!0&&L.async===!1&&(b.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),b.async=!0);const r=hh(this,lo,tN).call(this,!!b.silent,!!b.async);if(typeof w>"u"||w===null)return r(new Error("marked(): input parameter is undefined or null"));if(typeof w!="string")return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(w)+", string expected"));if(b.hooks&&(b.hooks.options=b),b.async)return Promise.resolve(b.hooks?b.hooks.preprocess(w):w).then(o=>a(o,b)).then(o=>b.hooks?b.hooks.processAllTokens(o):o).then(o=>b.walkTokens?Promise.all(this.walkTokens(o,b.walkTokens)).then(()=>o):o).then(o=>d(o,b)).then(o=>b.hooks?b.hooks.postprocess(o):o).catch(r);try{b.hooks&&(w=b.hooks.preprocess(w));let o=a(w,b);b.hooks&&(o=b.hooks.processAllTokens(o)),b.walkTokens&&this.walkTokens(o,b.walkTokens);let g=d(o,b);return b.hooks&&(g=b.hooks.postprocess(g)),g}catch(o){return r(o)}}},tN=function(a,d){return w=>{if(w.message+=`
327
+ Please report this to https://github.com/markedjs/marked.`,a){const j="<p>An error occurred:</p><pre>"+jr(w.message+"",!0)+"</pre>";return d?Promise.resolve(j):j}if(d)return Promise.reject(w);throw w}};const oo=new kO;function Tn(c,a){return oo.parse(c,a)}Tn.options=Tn.setOptions=function(c){return oo.setOptions(c),Tn.defaults=oo.defaults,W1(Tn.defaults),Tn};Tn.getDefaults=$g;Tn.defaults=uo;Tn.use=function(...c){return oo.use(...c),Tn.defaults=oo.defaults,W1(Tn.defaults),Tn};Tn.walkTokens=function(c,a){return oo.walkTokens(c,a)};Tn.parseInline=oo.parseInline;Tn.Parser=Ns;Tn.parser=Ns.parse;Tn.Renderer=Ph;Tn.TextRenderer=Xg;Tn.Lexer=Ss;Tn.lexer=Ss.lex;Tn.Tokenizer=Uh;Tn.Hooks=ru;Tn.parse=Tn;Tn.options;Tn.setOptions;Tn.use;Tn.walkTokens;Tn.parseInline;Ns.parse;Ss.lex;/*! @license DOMPurify 3.4.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.8/LICENSE */function aS(c,a){(a==null||a>c.length)&&(a=c.length);for(var d=0,w=Array(a);d<a;d++)w[d]=c[d];return w}function RO(c){if(Array.isArray(c))return c}function TO(c,a){var d=c==null?null:typeof Symbol<"u"&&c[Symbol.iterator]||c["@@iterator"];if(d!=null){var w,j,L,b,r=[],o=!0,g=!1;try{if(L=(d=d.call(c)).next,a!==0)for(;!(o=(w=L.call(d)).done)&&(r.push(w.value),r.length!==a);o=!0);}catch(y){g=!0,j=y}finally{try{if(!o&&d.return!=null&&(b=d.return(),Object(b)!==b))return}finally{if(g)throw j}}return r}}function LO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
328
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AO(c,a){return RO(c)||TO(c,a)||MO(c,a)||LO()}function MO(c,a){if(c){if(typeof c=="string")return aS(c,a);var d={}.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?aS(c,a):void 0}}const nN=Object.entries,oS=Object.setPrototypeOf,UO=Object.isFrozen,OO=Object.getPrototypeOf,PO=Object.getOwnPropertyDescriptor;let or=Object.freeze,Fr=Object.seal,dl=Object.create,iN=typeof Reflect<"u"&&Reflect,jg=iN.apply,kg=iN.construct;or||(or=function(a){return a});Fr||(Fr=function(a){return a});jg||(jg=function(a,d){for(var w=arguments.length,j=new Array(w>2?w-2:0),L=2;L<w;L++)j[L-2]=arguments[L];return a.apply(d,j)});kg||(kg=function(a){for(var d=arguments.length,w=new Array(d>1?d-1:0),j=1;j<d;j++)w[j-1]=arguments[j];return new a(...w)});const io=di(Array.prototype.forEach),BO=di(Array.prototype.lastIndexOf),lS=di(Array.prototype.pop),ol=di(Array.prototype.push),IO=di(Array.prototype.splice),ar=Array.isArray,eu=di(String.prototype.toLowerCase),eg=di(String.prototype.toString),cS=di(String.prototype.match),ll=di(String.prototype.replace),uS=di(String.prototype.indexOf),VO=di(String.prototype.trim),FO=di(Number.prototype.toString),HO=di(Boolean.prototype.toString),dS=typeof BigInt>"u"?null:di(BigInt.prototype.toString),hS=typeof Symbol>"u"?null:di(Symbol.prototype.toString),Qn=di(Object.prototype.hasOwnProperty),Zc=di(Object.prototype.toString),Ii=di(RegExp.prototype.test),cl=zO(TypeError);function di(c){return function(a){a instanceof RegExp&&(a.lastIndex=0);for(var d=arguments.length,w=new Array(d>1?d-1:0),j=1;j<d;j++)w[j-1]=arguments[j];return jg(c,a,w)}}function zO(c){return function(){for(var a=arguments.length,d=new Array(a),w=0;w<a;w++)d[w]=arguments[w];return kg(c,d)}}function en(c,a){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:eu;if(oS&&oS(c,null),!ar(a))return c;let w=a.length;for(;w--;){let j=a[w];if(typeof j=="string"){const L=d(j);L!==j&&(UO(a)||(a[w]=L),j=L)}c[j]=!0}return c}function $O(c){for(let a=0;a<c.length;a++)Qn(c,a)||(c[a]=null);return c}function qi(c){const a=dl(null);for(const w of nN(c)){var d=AO(w,2);const j=d[0],L=d[1];Qn(c,j)&&(ar(L)?a[j]=$O(L):L&&typeof L=="object"&&L.constructor===Object?a[j]=qi(L):a[j]=L)}return a}function WO(c){switch(typeof c){case"string":return c;case"number":return FO(c);case"boolean":return HO(c);case"bigint":return dS?dS(c):"0";case"symbol":return hS?hS(c):"Symbol()";case"undefined":return Zc(c);case"function":case"object":{if(c===null)return Zc(c);const a=c,d=xs(a,"toString");if(typeof d=="function"){const w=d(a);return typeof w=="string"?w:Zc(w)}return Zc(c)}default:return Zc(c)}}function xs(c,a){for(;c!==null;){const w=PO(c,a);if(w){if(w.get)return di(w.get);if(typeof w.value=="function")return di(w.value)}c=OO(c)}function d(){return null}return d}function GO(c){try{return Ii(c,""),!0}catch{return!1}}const fS=or(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),tg=or(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ng=or(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),YO=or(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ig=or(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),qO=or(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mS=or(["#text"]),pS=or(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),rg=or(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),vS=or(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),yh=or(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),KO=Fr(/{{[\w\W]*|^[\w\W]*}}/g),XO=Fr(/<%[\w\W]*|^[\w\W]*%>/g),JO=Fr(/\${[\w\W]*/g),ZO=Fr(/^data-[\-\w.\u00B7-\uFFFF]+$/),QO=Fr(/^aria-[\-\w]+$/),gS=Fr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),e2=Fr(/^(?:\w+script|data):/i),t2=Fr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),n2=Fr(/^html$/i),i2=Fr(/^[a-z][.\w]*(-[.\w]+)+$/i),ws={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},r2=function(){return typeof window>"u"?null:window},s2=function(a,d){if(typeof a!="object"||typeof a.createPolicy!="function")return null;let w=null;const j="data-tt-policy-suffix";d&&d.hasAttribute(j)&&(w=d.getAttribute(j));const L="dompurify"+(w?"#"+w:"");try{return a.createPolicy(L,{createHTML(b){return b},createScriptURL(b){return b}})}catch{return console.warn("TrustedTypes policy "+L+" could not be created."),null}},_S=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function rN(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:r2();const a=xe=>rN(xe);if(a.version="3.4.8",a.removed=[],!c||!c.document||c.document.nodeType!==ws.document||!c.Element)return a.isSupported=!1,a;let d=c.document;const w=d,j=w.currentScript;c.DocumentFragment;const L=c.HTMLTemplateElement,b=c.Node,r=c.Element,o=c.NodeFilter,g=c.NamedNodeMap;g===void 0&&(c.NamedNodeMap||c.MozNamedAttrMap),c.HTMLFormElement;const y=c.DOMParser,u=c.trustedTypes,p=r.prototype,S=xs(p,"cloneNode"),N=xs(p,"remove"),_=xs(p,"nextSibling"),l=xs(p,"childNodes"),m=xs(p,"parentNode"),f=xs(p,"shadowRoot"),v=xs(p,"attributes"),C=b&&b.prototype?xs(b.prototype,"nodeType"):null,T=b&&b.prototype?xs(b.prototype,"nodeName"):null;if(typeof L=="function"){const xe=d.createElement("template");xe.content&&xe.content.ownerDocument&&(d=xe.content.ownerDocument)}let E,A="",D=0;const R=function(X){if(D>0)throw cl('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');D++;try{return E.createHTML(X)}finally{D--}},M=d,$=M.implementation,O=M.createNodeIterator,I=M.createDocumentFragment,Y=M.getElementsByTagName,Q=w.importNode;let Z=_S();a.isSupported=typeof nN=="function"&&typeof m=="function"&&$&&$.createHTMLDocument!==void 0;const ee=KO,oe=XO,P=JO,W=ZO,V=QO,J=e2,_e=t2,be=i2;let Ve=gS,Le=null;const ie=en({},[...fS,...tg,...ng,...ig,...mS]);let G=null;const pe=en({},[...pS,...rg,...vS,...yh]);let le=Object.seal(dl(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Be=null,Te=null;const Xe=Object.seal(dl(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ke=!0,st=!0,jt=!1,Ye=!0,$t=!1,Yt=!0,dt=!1,Je=!1,nt=!1,ne=!1,Fe=!1,tt=!1,me=!0,rt=!1;const Re="user-content-";let fe=!0,ce=!1,Ee={},Oe=null;const vt=en({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ct=null;const ot=en({},["audio","video","img","source","image","track"]);let St=null;const yn=en({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),hn="http://www.w3.org/1998/Math/MathML",qt="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xhtml";let Pt=It,Un=!1,Hn=null;const ei=en({},[hn,qt,It],eg);let Di=en({},["mi","mo","mn","ms","mtext"]),ti=en({},["annotation-xml"]);const ii=en({},["title","style","font","a","script"]);let Cn=null;const fn=["application/xhtml+xml","text/html"],zn="text/html";let Zt=null,Ln=null;const Rn=d.createElement("form"),ri=function(X){return X instanceof RegExp||X instanceof Function},re=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ln&&Ln===X)return;(!X||typeof X!="object")&&(X={}),X=qi(X),Cn=fn.indexOf(X.PARSER_MEDIA_TYPE)===-1?zn:X.PARSER_MEDIA_TYPE,Zt=Cn==="application/xhtml+xml"?eg:eu,Le=Qn(X,"ALLOWED_TAGS")&&ar(X.ALLOWED_TAGS)?en({},X.ALLOWED_TAGS,Zt):ie,G=Qn(X,"ALLOWED_ATTR")&&ar(X.ALLOWED_ATTR)?en({},X.ALLOWED_ATTR,Zt):pe,Hn=Qn(X,"ALLOWED_NAMESPACES")&&ar(X.ALLOWED_NAMESPACES)?en({},X.ALLOWED_NAMESPACES,eg):ei,St=Qn(X,"ADD_URI_SAFE_ATTR")&&ar(X.ADD_URI_SAFE_ATTR)?en(qi(yn),X.ADD_URI_SAFE_ATTR,Zt):yn,Ct=Qn(X,"ADD_DATA_URI_TAGS")&&ar(X.ADD_DATA_URI_TAGS)?en(qi(ot),X.ADD_DATA_URI_TAGS,Zt):ot,Oe=Qn(X,"FORBID_CONTENTS")&&ar(X.FORBID_CONTENTS)?en({},X.FORBID_CONTENTS,Zt):vt,Be=Qn(X,"FORBID_TAGS")&&ar(X.FORBID_TAGS)?en({},X.FORBID_TAGS,Zt):qi({}),Te=Qn(X,"FORBID_ATTR")&&ar(X.FORBID_ATTR)?en({},X.FORBID_ATTR,Zt):qi({}),Ee=Qn(X,"USE_PROFILES")?X.USE_PROFILES&&typeof X.USE_PROFILES=="object"?qi(X.USE_PROFILES):X.USE_PROFILES:!1,Ke=X.ALLOW_ARIA_ATTR!==!1,st=X.ALLOW_DATA_ATTR!==!1,jt=X.ALLOW_UNKNOWN_PROTOCOLS||!1,Ye=X.ALLOW_SELF_CLOSE_IN_ATTR!==!1,$t=X.SAFE_FOR_TEMPLATES||!1,Yt=X.SAFE_FOR_XML!==!1,dt=X.WHOLE_DOCUMENT||!1,ne=X.RETURN_DOM||!1,Fe=X.RETURN_DOM_FRAGMENT||!1,tt=X.RETURN_TRUSTED_TYPE||!1,nt=X.FORCE_BODY||!1,me=X.SANITIZE_DOM!==!1,rt=X.SANITIZE_NAMED_PROPS||!1,fe=X.KEEP_CONTENT!==!1,ce=X.IN_PLACE||!1,Ve=GO(X.ALLOWED_URI_REGEXP)?X.ALLOWED_URI_REGEXP:gS,Pt=typeof X.NAMESPACE=="string"?X.NAMESPACE:It,Di=Qn(X,"MATHML_TEXT_INTEGRATION_POINTS")&&X.MATHML_TEXT_INTEGRATION_POINTS&&typeof X.MATHML_TEXT_INTEGRATION_POINTS=="object"?qi(X.MATHML_TEXT_INTEGRATION_POINTS):en({},["mi","mo","mn","ms","mtext"]),ti=Qn(X,"HTML_INTEGRATION_POINTS")&&X.HTML_INTEGRATION_POINTS&&typeof X.HTML_INTEGRATION_POINTS=="object"?qi(X.HTML_INTEGRATION_POINTS):en({},["annotation-xml"]);const je=Qn(X,"CUSTOM_ELEMENT_HANDLING")&&X.CUSTOM_ELEMENT_HANDLING&&typeof X.CUSTOM_ELEMENT_HANDLING=="object"?qi(X.CUSTOM_ELEMENT_HANDLING):dl(null);if(le=dl(null),Qn(je,"tagNameCheck")&&ri(je.tagNameCheck)&&(le.tagNameCheck=je.tagNameCheck),Qn(je,"attributeNameCheck")&&ri(je.attributeNameCheck)&&(le.attributeNameCheck=je.attributeNameCheck),Qn(je,"allowCustomizedBuiltInElements")&&typeof je.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=je.allowCustomizedBuiltInElements),$t&&(st=!1),Fe&&(ne=!0),Ee&&(Le=en({},mS),G=dl(null),Ee.html===!0&&(en(Le,fS),en(G,pS)),Ee.svg===!0&&(en(Le,tg),en(G,rg),en(G,yh)),Ee.svgFilters===!0&&(en(Le,ng),en(G,rg),en(G,yh)),Ee.mathMl===!0&&(en(Le,ig),en(G,vS),en(G,yh))),Xe.tagCheck=null,Xe.attributeCheck=null,Qn(X,"ADD_TAGS")&&(typeof X.ADD_TAGS=="function"?Xe.tagCheck=X.ADD_TAGS:ar(X.ADD_TAGS)&&(Le===ie&&(Le=qi(Le)),en(Le,X.ADD_TAGS,Zt))),Qn(X,"ADD_ATTR")&&(typeof X.ADD_ATTR=="function"?Xe.attributeCheck=X.ADD_ATTR:ar(X.ADD_ATTR)&&(G===pe&&(G=qi(G)),en(G,X.ADD_ATTR,Zt))),Qn(X,"ADD_URI_SAFE_ATTR")&&ar(X.ADD_URI_SAFE_ATTR)&&en(St,X.ADD_URI_SAFE_ATTR,Zt),Qn(X,"FORBID_CONTENTS")&&ar(X.FORBID_CONTENTS)&&(Oe===vt&&(Oe=qi(Oe)),en(Oe,X.FORBID_CONTENTS,Zt)),Qn(X,"ADD_FORBID_CONTENTS")&&ar(X.ADD_FORBID_CONTENTS)&&(Oe===vt&&(Oe=qi(Oe)),en(Oe,X.ADD_FORBID_CONTENTS,Zt)),fe&&(Le["#text"]=!0),dt&&en(Le,["html","head","body"]),Le.table&&(en(Le,["tbody"]),delete Be.tbody),X.TRUSTED_TYPES_POLICY){if(typeof X.TRUSTED_TYPES_POLICY.createHTML!="function")throw cl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof X.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw cl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const qe=E;E=X.TRUSTED_TYPES_POLICY;try{A=R("")}catch(kt){throw E=qe,kt}}else E===void 0&&X.TRUSTED_TYPES_POLICY!==null&&(E=s2(u,j)),E&&typeof A=="string"&&(A=R(""));(Z.uponSanitizeElement.length>0||Z.uponSanitizeAttribute.length>0)&&Le===ie&&(Le=qi(Le)),Z.uponSanitizeAttribute.length>0&&G===pe&&(G=qi(G)),or&&or(X),Ln=X},Ie=en({},[...tg,...ng,...YO]),Ze=en({},[...ig,...qO]),yt=function(X){let je=m(X);(!je||!je.tagName)&&(je={namespaceURI:Pt,tagName:"template"});const qe=eu(X.tagName),kt=eu(je.tagName);return Hn[X.namespaceURI]?X.namespaceURI===qt?je.namespaceURI===It?qe==="svg":je.namespaceURI===hn?qe==="svg"&&(kt==="annotation-xml"||Di[kt]):!!Ie[qe]:X.namespaceURI===hn?je.namespaceURI===It?qe==="math":je.namespaceURI===qt?qe==="math"&&ti[kt]:!!Ze[qe]:X.namespaceURI===It?je.namespaceURI===qt&&!ti[kt]||je.namespaceURI===hn&&!Di[kt]?!1:!Ze[qe]&&(ii[qe]||!Ie[qe]):!!(Cn==="application/xhtml+xml"&&Hn[X.namespaceURI]):!1},wt=function(X){ol(a.removed,{element:X});try{m(X).removeChild(X)}catch{N(X)}},gt=function(X,je){try{ol(a.removed,{attribute:je.getAttributeNode(X),from:je})}catch{ol(a.removed,{attribute:null,from:je})}if(je.removeAttribute(X),X==="is")if(ne||Fe)try{wt(je)}catch{}else try{je.setAttribute(X,"")}catch{}},Rt=function(X){let je=null,qe=null;if(nt)X="<remove></remove>"+X;else{const Tt=cS(X,/^[\r\n\t ]+/);qe=Tt&&Tt[0]}Cn==="application/xhtml+xml"&&Pt===It&&(X='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+X+"</body></html>");const kt=E?R(X):X;if(Pt===It)try{je=new y().parseFromString(kt,Cn)}catch{}if(!je||!je.documentElement){je=$.createDocument(Pt,"template",null);try{je.documentElement.innerHTML=Un?A:kt}catch{}}const mt=je.body||je.documentElement;return X&&qe&&mt.insertBefore(d.createTextNode(qe),mt.childNodes[0]||null),Pt===It?Y.call(je,dt?"html":"body")[0]:dt?je.documentElement:mt},bt=function(X){return O.call(X.ownerDocument||X,X,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT|o.SHOW_PROCESSING_INSTRUCTION|o.SHOW_CDATA_SECTION,null)},wn=function(X){var je,qe;X.normalize();const kt=O.call(X.ownerDocument||X,X,o.SHOW_TEXT|o.SHOW_COMMENT|o.SHOW_CDATA_SECTION|o.SHOW_PROCESSING_INSTRUCTION,null);let mt=kt.nextNode();for(;mt;){let tn=mt.data;io([ee,oe,P],Xt=>{tn=ll(tn,Xt," ")}),mt.data=tn,mt=kt.nextNode()}const Tt=(je=(qe=X.querySelectorAll)===null||qe===void 0?void 0:qe.call(X,"template"))!==null&&je!==void 0?je:[];io(Array.from(Tt),tn=>{Wt(tn.content)&&wn(tn.content)})},on=function(X){const je=T?T(X):null;return typeof je!="string"||Zt(je)!=="form"?!1:typeof X.nodeName!="string"||typeof X.textContent!="string"||typeof X.removeChild!="function"||X.attributes!==v(X)||typeof X.removeAttribute!="function"||typeof X.setAttribute!="function"||typeof X.namespaceURI!="string"||typeof X.insertBefore!="function"||typeof X.hasChildNodes!="function"||X.nodeType!==C(X)||X.childNodes!==l(X)},Wt=function(X){if(!C||typeof X!="object"||X===null)return!1;try{return C(X)===ws.documentFragment}catch{return!1}},pn=function(X){if(!C||typeof X!="object"||X===null)return!1;try{return typeof C(X)=="number"}catch{return!1}};function vn(xe,X,je){io(xe,qe=>{qe.call(a,X,je,Ln)})}const Yn=function(X){let je=null;if(vn(Z.beforeSanitizeElements,X,null),on(X))return wt(X),!0;const qe=Zt(T?T(X):X.nodeName);if(vn(Z.uponSanitizeElement,X,{tagName:qe,allowedTags:Le}),Yt&&X.hasChildNodes()&&!pn(X.firstElementChild)&&Ii(/<[/\w!]/g,X.innerHTML)&&Ii(/<[/\w!]/g,X.textContent)||Yt&&X.namespaceURI===It&&qe==="style"&&pn(X.firstElementChild)||X.nodeType===ws.progressingInstruction||Yt&&X.nodeType===ws.comment&&Ii(/<[/\w]/g,X.data))return wt(X),!0;if(Be[qe]||!(Xe.tagCheck instanceof Function&&Xe.tagCheck(qe))&&!Le[qe]){if(!Be[qe]&&si(qe)&&(le.tagNameCheck instanceof RegExp&&Ii(le.tagNameCheck,qe)||le.tagNameCheck instanceof Function&&le.tagNameCheck(qe)))return!1;if(fe&&!Oe[qe]){const mt=m(X),Tt=l(X);if(Tt&&mt){const tn=Tt.length;for(let Xt=tn-1;Xt>=0;--Xt){const Qt=S(Tt[Xt],!0);mt.insertBefore(Qt,_(X))}}}return wt(X),!0}return(C?C(X):X.nodeType)===ws.element&&!yt(X)||(qe==="noscript"||qe==="noembed"||qe==="noframes")&&Ii(/<\/no(script|embed|frames)/i,X.innerHTML)?(wt(X),!0):($t&&X.nodeType===ws.text&&(je=X.textContent,io([ee,oe,P],mt=>{je=ll(je,mt," ")}),X.textContent!==je&&(ol(a.removed,{element:X.cloneNode()}),X.textContent=je)),vn(Z.afterSanitizeElements,X,null),!1)},mn=function(X,je,qe){if(Te[je]||me&&(je==="id"||je==="name")&&(qe in d||qe in Rn))return!1;const kt=G[je]||Xe.attributeCheck instanceof Function&&Xe.attributeCheck(je,X);if(!(st&&!Te[je]&&Ii(W,je))){if(!(Ke&&Ii(V,je))){if(!kt||Te[je]){if(!(si(X)&&(le.tagNameCheck instanceof RegExp&&Ii(le.tagNameCheck,X)||le.tagNameCheck instanceof Function&&le.tagNameCheck(X))&&(le.attributeNameCheck instanceof RegExp&&Ii(le.attributeNameCheck,je)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(je,X))||je==="is"&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&Ii(le.tagNameCheck,qe)||le.tagNameCheck instanceof Function&&le.tagNameCheck(qe))))return!1}else if(!St[je]){if(!Ii(Ve,ll(qe,_e,""))){if(!((je==="src"||je==="xlink:href"||je==="href")&&X!=="script"&&uS(qe,"data:")===0&&Ct[X])){if(!(jt&&!Ii(J,ll(qe,_e,"")))){if(qe)return!1}}}}}}return!0},ji=en({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),si=function(X){return!ji[eu(X)]&&Ii(be,X)},Vt=function(X){vn(Z.beforeSanitizeAttributes,X,null);const je=X.attributes;if(!je||on(X))return;const qe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let kt=je.length;for(;kt--;){const mt=je[kt],Tt=mt.name,tn=mt.namespaceURI,Xt=mt.value,Qt=Zt(Tt),On=Xt;let Gt=Tt==="value"?On:VO(On);if(qe.attrName=Qt,qe.attrValue=Gt,qe.keepAttr=!0,qe.forceKeepAttr=void 0,vn(Z.uponSanitizeAttribute,X,qe),Gt=qe.attrValue,rt&&(Qt==="id"||Qt==="name")&&uS(Gt,Re)!==0&&(gt(Tt,X),Gt=Re+Gt),Yt&&Ii(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Gt)){gt(Tt,X);continue}if(Qt==="attributename"&&cS(Gt,"href")){gt(Tt,X);continue}if(qe.forceKeepAttr)continue;if(!qe.keepAttr){gt(Tt,X);continue}if(!Ye&&Ii(/\/>/i,Gt)){gt(Tt,X);continue}$t&&io([ee,oe,P],Xn=>{Gt=ll(Gt,Xn," ")});const An=Zt(X.nodeName);if(!mn(An,Qt,Gt)){gt(Tt,X);continue}if(E&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!tn)switch(u.getAttributeType(An,Qt)){case"TrustedHTML":{Gt=R(Gt);break}case"TrustedScriptURL":{Gt=E.createScriptURL(Gt);break}}if(Gt!==On)try{tn?X.setAttributeNS(tn,Tt,Gt):X.setAttribute(Tt,Gt),on(X)?wt(X):lS(a.removed)}catch{gt(Tt,X)}}vn(Z.afterSanitizeAttributes,X,null)},ae=function(X){let je=null;const qe=bt(X);for(vn(Z.beforeSanitizeShadowDOM,X,null);je=qe.nextNode();)if(vn(Z.uponSanitizeShadowNode,je,null),Yn(je),Vt(je),Wt(je.content)&&ae(je.content),(C?C(je):je.nodeType)===ws.element){const mt=f?f(je):je.shadowRoot;Wt(mt)&&(He(mt),ae(mt))}vn(Z.afterSanitizeShadowDOM,X,null)},He=function(X){const je=C?C(X):X.nodeType;if(je===ws.element){const mt=f?f(X):X.shadowRoot;Wt(mt)&&(He(mt),ae(mt))}const qe=l?l(X):X.childNodes;if(!qe)return;const kt=[];io(qe,mt=>{ol(kt,mt)});for(const mt of kt)He(mt);if(je===ws.element){const mt=T?T(X):null;if(typeof mt=="string"&&Zt(mt)==="template"){const Tt=X.content;Wt(Tt)&&He(Tt)}}};return a.sanitize=function(xe){let X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=null,qe=null,kt=null,mt=null;if(Un=!xe,Un&&(xe="<!-->"),typeof xe!="string"&&!pn(xe)&&(xe=WO(xe),typeof xe!="string"))throw cl("dirty is not a string, aborting");if(!a.isSupported)return xe;if(Je||re(X),a.removed=[],typeof xe=="string"&&(ce=!1),ce){const Xt=T?T(xe):xe.nodeName;if(typeof Xt=="string"){const Qt=Zt(Xt);if(!Le[Qt]||Be[Qt])throw cl("root node is forbidden and cannot be sanitized in-place")}if(on(xe))throw cl("root node is clobbered and cannot be sanitized in-place");He(xe)}else if(pn(xe))je=Rt("<!---->"),qe=je.ownerDocument.importNode(xe,!0),qe.nodeType===ws.element&&qe.nodeName==="BODY"||qe.nodeName==="HTML"?je=qe:je.appendChild(qe),He(qe);else{if(!ne&&!$t&&!dt&&xe.indexOf("<")===-1)return E&&tt?R(xe):xe;if(je=Rt(xe),!je)return ne?null:tt?A:""}je&&nt&&wt(je.firstChild);const Tt=bt(ce?xe:je);for(;kt=Tt.nextNode();)Yn(kt),Vt(kt),Wt(kt.content)&&ae(kt.content);if(ce)return $t&&wn(xe),xe;if(ne){if($t&&wn(je),Fe)for(mt=I.call(je.ownerDocument);je.firstChild;)mt.appendChild(je.firstChild);else mt=je;return(G.shadowroot||G.shadowrootmode)&&(mt=Q.call(w,mt,!0)),mt}let tn=dt?je.outerHTML:je.innerHTML;return dt&&Le["!doctype"]&&je.ownerDocument&&je.ownerDocument.doctype&&je.ownerDocument.doctype.name&&Ii(n2,je.ownerDocument.doctype.name)&&(tn="<!DOCTYPE "+je.ownerDocument.doctype.name+`>
329
+ `+tn),$t&&io([ee,oe,P],Xt=>{tn=ll(tn,Xt," ")}),E&&tt?R(tn):tn},a.setConfig=function(){let xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};re(xe),Je=!0},a.clearConfig=function(){Ln=null,Je=!1},a.isValidAttribute=function(xe,X,je){Ln||re({});const qe=Zt(xe),kt=Zt(X);return mn(qe,kt,je)},a.addHook=function(xe,X){typeof X=="function"&&ol(Z[xe],X)},a.removeHook=function(xe,X){if(X!==void 0){const je=BO(Z[xe],X);return je===-1?void 0:IO(Z[xe],je,1)[0]}return lS(Z[xe])},a.removeHooks=function(xe){Z[xe]=[]},a.removeAllHooks=function(){Z=_S()},a}var a2=rN();const o2=/[^\n]*?(?:[。!?…]+|[.!?]+(?=\s|$)|\n+|$)/gu,l2=/[。!?…]$|[.!?]$/;function c2(c,a){for(let d=c.parentNode;d&&d!==a;d=d.parentNode){const w=d.nodeName;if(w==="PRE"||w==="SCRIPT"||w==="STYLE"||w==="CODE")return!0}return!1}function u2(c){if(!c)return[];if(c.querySelector("span.tts-sent"))return d2(c);const a=document.createTreeWalker(c,NodeFilter.SHOW_TEXT,{acceptNode:r=>r.nodeValue&&r.nodeValue.trim()&&!c2(r,c)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),d=[];for(;a.nextNode();)d.push(a.currentNode);const w=[],j=[];let L=0;for(const r of d){const o=r.ownerDocument.createDocumentFragment();for(const g of r.nodeValue.matchAll(o2)){const y=g[0];if(y==="")continue;const u=r.ownerDocument.createElement("span");u.className="tts-sent",u.textContent=y,o.appendChild(u),(j[L]||(j[L]=[])).push(u),w[L]=(w[L]||"")+y,l2.test(y)&&L++}r.parentNode.replaceChild(o,r)}const b=[];return w.forEach((r,o)=>{const g=(r||"").replace(/\s+/g," ").trim();if(!g)return;const y=b.length;b.push(g);for(const u of j[o]||[])u.dataset.tts=String(y)}),b}function d2(c){const a=[];return c.querySelectorAll("span.tts-sent[data-tts]").forEach(d=>{const w=Number(d.dataset.tts);a[w]=(a[w]||"")+d.textContent}),a.map(d=>(d||"").replace(/\s+/g," ").trim())}const sN="tw_doc_rate",Eh=[1,1.25,1.5],bS=()=>{const c=Number(localStorage.getItem(sN));return Eh.includes(c)?c:1};function h2(){const c=typeof window<"u"&&window.speechSynthesis||null,[a,d]=H.useState({playing:!1,paused:!1,idx:-1}),[w,j]=H.useState(bS),L=H.useRef({sentences:[],idx:-1,playing:!1,rate:bS()});L.current.rate=w;const b=()=>((c==null?void 0:c.getVoices())||[]).find(S=>/^zh/i.test(S.lang))||null,r=S=>{const N=L.current;if(!c)return;if(S<0||S>=N.sentences.length){o();return}N.idx=S,d({playing:!0,paused:!1,idx:S});const _=new SpeechSynthesisUtterance(N.sentences[S]);_.rate=N.rate;const l=b();l?(_.voice=l,_.lang=l.lang):_.lang="zh-CN";const m=()=>{N.playing&&N.idx===S&&r(S+1)};_.onend=m,_.onerror=m,c.speak(_)},o=()=>{const S=L.current;S.playing=!1,S.idx=-1,c&&c.cancel(),d({playing:!1,paused:!1,idx:-1})},g=S=>{if(!c||!S||!S.length)return;c.cancel();const N=L.current;if(N.sentences=S,N.playing=!0,N.idx=-1,d({playing:!0,paused:!1,idx:-1}),c.getVoices().length){r(0);return}const _=()=>{c.removeEventListener("voiceschanged",_),N.playing&&N.idx===-1&&r(0)};c.addEventListener("voiceschanged",_),setTimeout(_,300)},y=()=>{c&&L.current.playing&&(c.pause(),d(S=>({...S,paused:!0})))},u=()=>{c&&L.current.playing&&(c.resume(),d(S=>({...S,paused:!1})))},p=()=>{const S=Eh[(Eh.indexOf(w)+1)%Eh.length]||1;localStorage.setItem(sN,String(S)),L.current.rate=S,j(S);const N=L.current;c&&N.playing&&N.idx>=0&&(c.cancel(),r(N.idx))};return H.useEffect(()=>()=>{L.current.playing=!1,c&&c.cancel()},[c]),{supported:!!c,playing:a.playing,paused:a.paused,idx:a.idx,rate:w,play:g,pause:y,resume:u,stop:o,cycleRate:p}}const yS=6,f2=500,wS=10,m2=300,xS=(c,a)=>Math.hypot(c.x-a.x,c.y-a.y);function p2({url:c,name:a}){const[d,w]=H.useState({s:1,x:0,y:0}),[j,L]=H.useState(""),[b,r]=H.useState(!1),o=H.useRef(d);o.current=d;const g=H.useRef(null),y=H.useRef(null),u=H.useRef(null),p=H.useRef(new Map),S=H.useRef(null),N=H.useRef(null),_=H.useRef(null),l=H.useRef({moved:!1,lpFired:!1,pinched:!1}),m=H.useRef(0);if(!c)return h.jsxDEV("div",{className:"doc-image-msg",children:B("imageviewer.loadFailed")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:39,columnNumber:20},this);const f=(O,I,Y)=>{const Q=y.current,Z=u.current;if(!Q||!Z)return{x:I,y:Y};const ee=Math.max(0,(Z.offsetWidth*O-Q.clientWidth)/2),oe=Math.max(0,(Z.offsetHeight*O-Q.clientHeight)/2);return{x:Math.min(ee,Math.max(-ee,I)),y:Math.min(oe,Math.max(-oe,Y))}},v=(O,I,Y)=>{if(O=Math.min(yS,Math.max(1,O)),O<=1){w({s:1,x:0,y:0});return}const Q=f(O,I,Y);w({s:O,x:Q.x,y:Q.y})},C=O=>v(o.current.s*O,o.current.x,o.current.y),T=()=>{_.current&&(clearTimeout(_.current),_.current=null)},E=O=>{L(O),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>L(""),2500)},A=()=>{r(!1);const O=document.createElement("a");O.href=c,O.download=a||"image",document.body.appendChild(O),O.click(),O.remove(),E(B("imageviewer.saved"))},D=async()=>{var O;r(!1);try{const I=await(await fetch(c)).blob(),Y=new File([I],a||"image",{type:Fh(a)||I.type||"application/octet-stream"});if((O=navigator.canShare)!=null&&O.call(navigator,{files:[Y]})){await navigator.share({files:[Y]});return}}catch{return}E(B("imageviewer.shareUnsupported"))},R=O=>{var Y,Q;(Q=(Y=O.currentTarget).setPointerCapture)==null||Q.call(Y,O.pointerId),p.current.set(O.pointerId,{x:O.clientX,y:O.clientY});const I=p.current.size;if(I===2){T(),l.current.pinched=!0;const[Z,ee]=[...p.current.values()];S.current={dist:xS(Z,ee)||1,s:o.current.s}}else I===1&&(l.current.moved=!1,l.current.lpFired=!1,l.current.pinched=!1,N.current={x:O.clientX,y:O.clientY},T(),_.current=setTimeout(()=>{_.current=null,p.current.size===1&&!l.current.moved&&(l.current.lpFired=!0,r(!0))},f2))},M=O=>{if(p.current.has(O.pointerId)){if(p.current.set(O.pointerId,{x:O.clientX,y:O.clientY}),p.current.size>=2&&S.current){const[I,Y]=[...p.current.values()];v(S.current.s*(xS(I,Y)/S.current.dist),o.current.x,o.current.y);return}if(N.current){const I=O.clientX-N.current.x,Y=O.clientY-N.current.y;(Math.abs(I)>wS||Math.abs(Y)>wS)&&(l.current.moved=!0,T()),o.current.s>1&&(N.current={x:O.clientX,y:O.clientY},v(o.current.s,o.current.x+I,o.current.y+Y))}}},$=O=>{if(T(),p.current.delete(O.pointerId),p.current.size===1){S.current=null;const[I]=[...p.current.values()];N.current={x:I.x,y:I.y}}else if(p.current.size===0){if(!l.current.moved&&!l.current.lpFired&&!l.current.pinched){const Y=O.timeStamp||0;Y-m.current<m2?(m.current=0,o.current.s>1?v(1,0,0):v(2,0,0)):m.current=Y}S.current=null,N.current=null,l.current={moved:!1,lpFired:!1,pinched:!1}}};return h.jsxDEV("div",{ref:y,className:"doc-image-wrap",onPointerDown:R,onPointerMove:M,onPointerUp:$,onPointerCancel:$,onContextMenu:O=>O.preventDefault(),children:[h.jsxDEV("img",{ref:u,className:"doc-image",src:c,alt:a,draggable:!1,style:{transform:`translate(${d.x}px, ${d.y}px) scale(${d.s})`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:159,columnNumber:7},this),h.jsxDEV("div",{className:"doc-image-zoom",onPointerDown:O=>O.stopPropagation(),children:[h.jsxDEV("button",{onClick:()=>C(1/1.5),disabled:d.s<=1,"aria-label":B("imageviewer.zoomOut"),children:"−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:168,columnNumber:9},this),h.jsxDEV("span",{className:"doc-image-zoom-val","aria-hidden":"true",children:[Math.round(d.s*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:169,columnNumber:9},this),h.jsxDEV("button",{onClick:()=>C(1.5),disabled:d.s>=yS,"aria-label":B("imageviewer.zoomIn"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:170,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:167,columnNumber:7},this),j&&h.jsxDEV("div",{className:"doc-image-note",role:"status",children:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:172,columnNumber:16},this),h.jsxDEV(zg,{open:b,title:a||B("imageviewer.imageTitle"),actions:[{key:"save",label:B("imageviewer.saveImage"),onClick:A},{key:"share",label:B("imageviewer.shareImage"),onClick:D}],onClose:()=>r(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:173,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:150,columnNumber:5},this)}const sg=Xs.length-1;function v2({type:c,name:a,content:d}){const[w,j]=H.useState(()=>aA()),L=H.useRef(null),b=h2();Hg(b.playing&&!b.paused);const r=H.useMemo(()=>c==="markdown"?a2.sanitize(Tn.parse(d||"")):"",[c,d]);if(H.useEffect(()=>{b.stop()},[r]),H.useEffect(()=>{var S;const u=L.current;if(!u||(u.querySelectorAll(".tts-active").forEach(N=>N.classList.remove("tts-active")),b.idx<0))return;const p=u.querySelectorAll(`.tts-sent[data-tts="${b.idx}"]`);p.forEach(N=>N.classList.add("tts-active")),(S=p[0])==null||S.scrollIntoView({block:"center",behavior:"smooth"})},[b.idx]),c==="image")return h.jsxDEV(p2,{url:d,name:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:50,columnNumber:12},this);if(c==="html")return h.jsxDEV("iframe",{className:"doc-iframe",sandbox:"allow-scripts",srcDoc:d||"",title:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:54,columnNumber:12},this);const o=u=>{const p=Math.min(sg,Math.max(0,w+u));j(p),oA(p)};if(c==="text")return h.jsxDEV("div",{className:"doc-md-wrap",children:[h.jsxDEV("div",{className:"doc-zoom",children:h.jsxDEV("div",{className:"doc-fonts",children:[h.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>o(-1),disabled:w<=0,"aria-label":B("doc.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:65,columnNumber:13},this),h.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>o(1),disabled:w>=sg,"aria-label":B("doc.fontLarger"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:66,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:64,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:63,columnNumber:9},this),h.jsxDEV("pre",{className:"doc-text",style:{fontSize:`${Xs[w]}px`},children:d||""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:69,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:62,columnNumber:7},this);const g=()=>{if(b.playing){b.paused?b.resume():b.pause();return}const u=u2(L.current);u.length&&b.play(u)},y=b.playing&&!b.paused;return h.jsxDEV("div",{className:"doc-md-wrap",children:[h.jsxDEV("div",{className:"doc-zoom",children:[b.supported&&h.jsxDEV("div",{className:"doc-tts",children:[h.jsxDEV("button",{className:"doc-zoom-btn doc-zoom-icon",onClick:g,"aria-label":y?B("doc.pauseRead"):b.paused?B("doc.resumeRead"):B("doc.read"),children:y?h.jsxDEV(rM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:88,columnNumber:26},this):h.jsxDEV(iM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:88,columnNumber:42},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:86,columnNumber:13},this),h.jsxDEV("button",{className:"doc-zoom-btn doc-zoom-icon",onClick:b.stop,disabled:!b.playing,"aria-label":B("doc.stopRead"),children:h.jsxDEV(sM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:91,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:90,columnNumber:13},this),h.jsxDEV("button",{className:"doc-zoom-btn",onClick:b.cycleRate,"aria-label":B("doc.rate"),children:[b.rate,"×"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:93,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:85,columnNumber:11},this),h.jsxDEV("div",{className:"doc-fonts",children:[h.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>o(-1),disabled:w<=0,"aria-label":B("doc.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:97,columnNumber:11},this),h.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>o(1),disabled:w>=sg,"aria-label":B("doc.fontLarger"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:98,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:96,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:83,columnNumber:7},this),h.jsxDEV("div",{ref:L,className:"doc-md",style:{fontSize:`${Xs[w]}px`},dangerouslySetInnerHTML:{__html:r}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:101,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:82,columnNumber:5},this)}function g2({open:c,pane:a,windowId:d,tabs:w,active:j,onActivate:L,onCloseTab:b,onMinimize:r,onOpenDoc:o,pendingShare:g,onPendingConsumed:y}){const u=w.find(Z=>Z.key===j)||w[0],[p,S]=H.useState("recent"),[N,_]=H.useState(null),[l,m]=H.useState(0),f=u.type==="home",v=H.useRef(null),C=H.useRef(N);C.current=N;const T=H.useRef(j);T.current=j;const E=H.useRef(d);E.current=d;const A=H.useRef(r);A.current=r;const D=H.useRef(L);D.current=L;const R=H.useRef(j),M=H.useRef(0),$=H.useRef([]),O=()=>{window.history.pushState({fileOverlay:!0},""),M.current+=1},I=Z=>{c&&Z!==C.current&&($.current.push({type:"nav",prev:C.current}),O()),_(Z),px(d,Z)},Y=H.useRef(c);H.useEffect(()=>{const Z=R.current;R.current=j;const ee=Y.current;Y.current=c,c&&ee&&Z==="home"&&j!=="home"&&($.current.push({type:"doc"}),O())},[j,c]),H.useEffect(()=>{if(!c)return;$.current=[],M.current=0,O();const Z=()=>{var oe,P;M.current=Math.max(0,M.current-1);const ee=$.current.pop();if((ee==null?void 0:ee.type)==="doc"){(oe=D.current)==null||oe.call(D,"home");return}if((ee==null?void 0:ee.type)==="nav"){_(ee.prev),ee.prev&&px(E.current,ee.prev);return}(P=A.current)==null||P.call(A)};return window.addEventListener("popstate",Z),()=>{window.removeEventListener("popstate",Z),M.current>0&&(window.history.go(-M.current),M.current=0)}},[c]);const Q=async()=>{try{const{cwd:Z}=await ao(a);Z&&_(Z)}catch{}};return H.useEffect(()=>{g&&S("browse")},[g]),H.useEffect(()=>{c&&m(Z=>Z+1)},[c]),H.useEffect(()=>{if(!c){v.current=null;return}if(v.current===d)return;v.current=d,$.current=[],S("browse");let Z=!1;return(async()=>{const ee=VL(d);let oe=null;if(ee)try{await n1(ee),oe=ee}catch{}if(!oe&&a)try{const{cwd:P}=await ao(a);oe=P}catch{}!Z&&oe&&_(oe)})(),()=>{Z=!0}},[c,d,a]),uu.createPortal(h.jsxDEV("div",{className:`file-sheet ${c?"open":""}`,"aria-hidden":!c,children:[h.jsxDEV("div",{className:"file-tabs",children:[h.jsxDEV("div",{className:"file-tabs-scroll",children:w.map(Z=>h.jsxDEV("div",{className:`file-tab ${Z.key===j?"active":""}`,children:[h.jsxDEV("button",{className:"file-tab-label",onClick:()=>L(Z.key),children:Z.key==="home"?h.jsxDEV(h.Fragment,{children:[h.jsxDEV(su,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:146,columnNumber:39},this),B("filemanager.files")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:146,columnNumber:37},this):Z.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:145,columnNumber:15},this),Z.key!=="home"&&h.jsxDEV("button",{className:"file-tab-x","aria-label":B("filemanager.closeTab"),onClick:()=>b(Z.key),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:149,columnNumber:17},this)]},Z.key,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:144,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:142,columnNumber:9},this),h.jsxDEV("button",{className:"file-min","aria-label":B("filemanager.minimize"),title:B("filemanager.minimize"),onClick:r,children:h.jsxDEV(Sa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:154,columnNumber:134},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:154,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:141,columnNumber:7},this),h.jsxDEV("div",{className:"file-body",children:f?h.jsxDEV("div",{className:"home-pane",children:[h.jsxDEV("div",{className:"file-seg",role:"tablist",children:[h.jsxDEV("button",{className:`file-seg-btn ${p==="recent"?"on":""}`,role:"tab","aria-selected":p==="recent",onClick:()=>S("recent"),children:[h.jsxDEV(l1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:162,columnNumber:17},this),B("filemanager.recent")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:160,columnNumber:15},this),h.jsxDEV("button",{className:`file-seg-btn ${p==="browse"?"on":""}`,role:"tab","aria-selected":p==="browse",onClick:()=>S("browse"),children:[h.jsxDEV(su,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:166,columnNumber:17},this),B("filemanager.directory")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:164,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:159,columnNumber:13},this),p==="recent"?h.jsxDEV(qU,{onOpenDoc:o,refreshKey:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:170,columnNumber:17},this):h.jsxDEV(F1,{path:N,onNavigate:I,onOpenDoc:o,onJumpToCwd:a?Q:null,refreshKey:l,pendingFile:g,onPendingConsumed:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:171,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:158,columnNumber:11},this):h.jsxDEV(v2,{type:u.type,name:u.name,content:u.content},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:175,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:156,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:140,columnNumber:5},this),document.body)}function _2(c){if(!c)return[];const a=[];let d=null,w=null;for(const j of c.split(`
330
+ `)){if(j.startsWith("diff --git")){const b=j.match(/ b\/(.*)$/);d={path:b?b[1]:j.slice(11),hunks:[]},a.push(d),w=null;continue}if(!d)continue;if(j.startsWith("@@")){w={header:j,lines:[]},d.hunks.push(w);continue}if(!w)continue;const L=j[0];L==="+"?w.lines.push({type:"add",text:j.slice(1)}):L==="-"?w.lines.push({type:"del",text:j.slice(1)}):L===" "&&w.lines.push({type:"ctx",text:j.slice(1)})}return a}const b2=c=>String(c||"").replace(/\/+$/,"").split("/").pop()||c;function Bh(c,a){const d=(c&&c!==" "?c:a)||"?";return d==="?"?"?":d}function y2({open:c,pane:a,windowId:d,inset:w=0,onClose:j}){const L=H.useRef(!0);H.useEffect(()=>()=>{L.current=!1},[]);const[b,r]=H.useState([]),[o,g]=H.useState(null),[y,u]=H.useState([]),p=y.length?y[y.length-1]:null,[S,N]=H.useState(!1),[_,l]=H.useState(null),m=H.useRef(d);H.useEffect(()=>{m.current=d},[d]);const[f,v]=H.useState(null),[C,T]=H.useState(null),[E,A]=H.useState(null),[D,R]=H.useState(null),[M,$]=H.useState(20),[O,I]=H.useState(!1),[Y,Q]=H.useState({changes:!0,commits:!0}),[Z,ee]=H.useState(!1),oe=H.useRef(null),[P,W]=H.useState(null),[V,J]=H.useState(null),[_e,be]=H.useState(null),Ve=H.useRef(y);Ve.current=y;const Le=H.useRef(S);Le.current=S;const ie=H.useRef(j);ie.current=j;const G=H.useRef(0),pe=()=>{window.history.pushState({gitOverlay:!0},""),G.current+=1},le=Re=>{pe(),u(fe=>[...fe,Re])},Be=()=>{pe(),N(!0)};H.useEffect(()=>{if(!c)return;pe();const Re=()=>{var fe;if(G.current=Math.max(0,G.current-1),Le.current){N(!1);return}if(Ve.current.length){u(ce=>ce.slice(0,-1));return}(fe=ie.current)==null||fe.call(ie)};return window.addEventListener("popstate",Re),()=>{window.removeEventListener("popstate",Re),G.current>0&&(window.history.go(-G.current),G.current=0)}},[c]),H.useEffect(()=>{if(!c)return;let Re=!1;u([]),R(null),J(null),be(null);const fe=Pg(d);return fe.length?(r(fe),g(ce=>ce&&fe.includes(ce)?ce:fe[0]),()=>{Re=!0}):(r([]),g(null),(async()=>{try{if(!a)return;const{cwd:ce}=await ao(a);if(!ce)return;const{repos:Ee=[]}=await xx(ce);if(Re||!Ee.length)return;const Oe=bx(d,Ee.map(vt=>vt.path));if(Re)return;r(Oe),g(Oe[0]??null)}catch(ce){if(Re)return;(ce==null?void 0:ce.message)==="outside home"?be(B("git.outsideRoots")):J(B("git.errReadRepo"))}})(),()=>{Re=!0})},[c,a,d]),H.useEffect(()=>{if(!c||!a)return;let Re=!1;return ao(a).then(({cwd:fe})=>{!Re&&fe&&l(fe)}).catch(()=>{}),()=>{Re=!0}},[c,a]),H.useEffect(()=>{if(!c||!o){v(null),T(null);return}let Re=!1;return v(null),T(null),A(null),R(null),$(20),J(null),be(null),(async()=>{try{const[fe,ce]=await Promise.all([VA(o),HA(o)]);if(Re)return;v(fe.changes??[]),T(ce.branches??[])}catch{Re||J(B("git.errLoad"))}})(),()=>{Re=!0}},[c,o]),H.useEffect(()=>{if(!c||!o){A(null);return}let Re=!1;return(async()=>{try{const{commits:fe=[]}=await FA(o,{ref:D||void 0,limit:M});Re||A(fe)}catch{Re||A([])}finally{Re||I(!1)}})(),()=>{Re=!0}},[c,o,D,M]);const Te=!o||!p?"":p.kind==="diff"?`${o}|diff|${p.path}|${p.commit||""}|${p.staged?1:0}`:`${o}|commit|${p.hash}`;H.useEffect(()=>{if(!c||!o||!p){W(null);return}let Re=!1;return J(null),W(null),(async()=>{try{let fe;if(p.kind==="diff"){const{diff:ce,truncated:Ee}=await zA(o,{path:p.path,commit:p.commit,staged:p.staged});fe={files:_2(ce),truncated:Ee}}else fe=await $A(o,p.hash);Re||W({key:Te,payload:fe})}catch{Re||J(B("git.errLoad"))}})(),()=>{Re=!0}},[c,Te]);const Xe=H.useCallback(()=>{window.history.back()},[]),Ke=Re=>{g(Re),u([]),R(null)},st=async Re=>{window.history.back(),be(null);try{const{repos:fe=[]}=await xx(Re);if(!L.current)return;if(!fe.length){be(B("git.noRepoInDir"));return}const ce=fe.map(Ct=>Ct.path),Ee=m.current,Oe=Ee?bx(Ee,ce):ce;r(Ct=>{const ot=[...Ct];for(const St of Oe)ot.includes(St)||ot.push(St);return ot});const vt=ce.find(Ct=>!b.includes(Ct))||ce[0];Ke(vt)}catch(fe){if(!L.current)return;(fe==null?void 0:fe.message)==="outside home"?be(B("git.outsideRoots")):J(B("git.errReadDir"))}},jt=Re=>{const fe=vA(d,Re);r(fe),o===Re&&(g(fe[0]??null),u([]),R(null))},Ye=(C||[]).find(Re=>Re.current)||null,$t=Re=>{const fe=Re===(Ye==null?void 0:Ye.name)?null:Re;fe!==D&&(R(fe),A(null),$(20))},Yt=Re=>Q(fe=>({...fe,[Re]:!fe[Re]})),dt=E!=null&&E.length>=M,Je=Re=>{if(!dt||O)return;const fe=Re.currentTarget;fe.scrollHeight-fe.scrollTop-fe.clientHeight<80&&(I(!0),$(ce=>ce+20))},nt=D||(Ye==null?void 0:Ye.name)||null,ne=!!D&&D!==(Ye==null?void 0:Ye.name),Fe=D?(C||[]).find(Re=>Re.name===D):Ye,tt=P&&P.key===Te?P.payload:null,me=!!p,rt=(p==null?void 0:p.kind)==="commit"?B("git.commitDetail"):(p==null?void 0:p.kind)==="diff"?p.path||B("git.diff"):"";return uu.createPortal(h.jsxDEV("div",{className:`file-sheet git-sheet ${c?"open":""}`,"aria-hidden":!c,style:{"--kb-inset":`${w}px`},children:[h.jsxDEV("div",{className:"file-tabs git-head",children:[me?h.jsxDEV("div",{className:"git-drill-head",children:[h.jsxDEV("button",{className:"git-back","aria-label":B("common.back"),title:B("common.back"),onClick:Xe,children:"‹"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:291,columnNumber:13},this),h.jsxDEV("span",{className:"git-drill-title",children:[h.jsxDEV(d1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:47},this),h.jsxDEV("span",{className:"git-title-text",children:rt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:58},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:290,columnNumber:11},this):h.jsxDEV("div",{className:"git-tabs-scroll",children:[h.jsxDEV("button",{className:"git-tab-add","aria-label":B("git.bindRepo"),title:B("git.bindRepo"),onClick:Be,children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:296,columnNumber:13},this),b.map(Re=>h.jsxDEV("div",{className:`git-tab ${Re===o?"active":""}`,children:[h.jsxDEV("button",{className:"git-tab-label",onClick:()=>Ke(Re),children:b2(Re)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:299,columnNumber:17},this),h.jsxDEV("button",{className:"git-tab-x","aria-label":B("common.close"),title:B("common.close"),onClick:()=>jt(Re),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:300,columnNumber:17},this)]},Re,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:298,columnNumber:15},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:295,columnNumber:11},this),h.jsxDEV("button",{className:"file-min","aria-label":B("git.collapse"),title:B("git.collapse"),onClick:()=>j==null?void 0:j(),children:h.jsxDEV(Sa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:305,columnNumber:123},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:305,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:288,columnNumber:7},this),!me&&o&&h.jsxDEV("div",{className:"git-branch-bar",children:[h.jsxDEV("span",{className:"git-branch-bar-name",children:[h.jsxDEV("span",{className:"git-branch-glyph",children:"⎇"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:316,columnNumber:13},this)," ",nt||"—",!ne&&nt&&h.jsxDEV("span",{className:"git-branch-cur-tag",children:B("git.currentBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:317,columnNumber:46},this),Fe&&(Fe.ahead||Fe.behind)?h.jsxDEV("span",{className:"git-branch-bar-track",children:[Fe.ahead?h.jsxDEV("span",{className:"git-ahead",children:["↑",Fe.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:320,columnNumber:42},this):null,Fe.behind?h.jsxDEV("span",{className:"git-behind",children:["↓",Fe.behind]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:321,columnNumber:43},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:319,columnNumber:15},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:315,columnNumber:11},this),h.jsxDEV("div",{className:"git-branch-dd",children:[h.jsxDEV("button",{className:`git-branch-trigger ${ne?"other":""}`,onClick:()=>ee(Re=>!Re),"aria-haspopup":"listbox","aria-expanded":Z,title:B("git.switchViewedBranch"),children:[h.jsxDEV("span",{className:"git-branch-trigger-name",children:B("git.switchBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:328,columnNumber:15},this),h.jsxDEV("span",{className:"git-branch-caret",children:h.jsxDEV(Sa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:329,columnNumber:50},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:329,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:326,columnNumber:13},this),Z&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"git-dd-backdrop",onClick:()=>ee(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:333,columnNumber:17},this),h.jsxDEV("div",{className:"git-dd-menu",role:"listbox",children:[(C||[]).length===0&&h.jsxDEV("div",{className:"git-empty",children:B("git.noBranches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:335,columnNumber:53},this),(C||[]).map(Re=>{const fe=D?Re.name===D:Re.current;return h.jsxDEV("button",{role:"option","aria-selected":fe,className:`git-dd-item ${Re.current?"current":""} ${fe?"viewing":""}`,onClick:()=>{$t(Re.name),ee(!1)},children:[h.jsxDEV("span",{className:"git-branch-dot",children:Re.current?"●":""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:342,columnNumber:25},this),h.jsxDEV("span",{className:"git-row-path",children:Re.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:343,columnNumber:25},this),Re.upstream&&h.jsxDEV("span",{className:"git-branch-up",children:[Re.upstream,Re.ahead?h.jsxDEV("span",{className:"git-ahead",children:[" ↑",Re.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:346,columnNumber:40},this):null,Re.behind?h.jsxDEV("span",{className:"git-behind",children:[" ↓",Re.behind]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:347,columnNumber:41},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:345,columnNumber:27},this)]},Re.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:339,columnNumber:23},this)})]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:334,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:332,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:325,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:312,columnNumber:9},this),h.jsxDEV("div",{className:"git-body",children:[V&&h.jsxDEV("div",{className:"git-error",children:V},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:361,columnNumber:19},this),_e&&!V&&!me&&h.jsxDEV("div",{className:"git-notice",children:_e},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:362,columnNumber:44},this),!o&&!V&&!_e&&h.jsxDEV("div",{className:"git-empty",children:B("git.noRepoBound")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:364,columnNumber:11},this),me&&o&&!V&&h.jsxDEV("div",{className:"git-scroll",children:tt?p.kind==="diff"?h.jsxDEV(N2,{data:tt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:370,columnNumber:41},this):h.jsxDEV(S2,{data:tt,onOpenFile:Re=>le({kind:"diff",path:Re,commit:p.hash})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:371,columnNumber:17},this):h.jsxDEV("div",{className:"git-loading",children:B("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:369,columnNumber:23},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:368,columnNumber:11},this),!me&&o&&!V&&h.jsxDEV(h.Fragment,{children:[h.jsxDEV(SS,{variant:"top",title:B("git.changes"),count:f==null?void 0:f.length,expanded:Y.changes,onToggle:()=>Yt("changes"),children:f==null?h.jsxDEV("div",{className:"git-loading",children:B("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:380,columnNumber:34},this):h.jsxDEV(w2,{data:{changes:f},onOpenFile:(Re,fe)=>le({kind:"diff",path:Re,staged:fe})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:381,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:379,columnNumber:13},this),h.jsxDEV(SS,{variant:"mid",title:B("git.commits"),subtitle:ne?nt:null,expanded:Y.commits,onToggle:()=>Yt("commits"),bodyRef:oe,onScroll:Je,children:E==null?h.jsxDEV("div",{className:"git-loading",children:B("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:385,columnNumber:34},this):h.jsxDEV(h.Fragment,{children:[h.jsxDEV(x2,{data:{commits:E},onOpen:Re=>le({kind:"commit",hash:Re})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:388,columnNumber:21},this),dt&&h.jsxDEV("div",{className:"git-more",children:B(O?"common.loading":"git.pullToLoadMore")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:389,columnNumber:40},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:387,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:383,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:378,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:360,columnNumber:7},this),h.jsxDEV(du,{open:S,seedCwd:_,pane:a,inset:w,hint:B("git.pickerHint"),onPick:st,onClose:()=>window.history.back()},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:397,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:285,columnNumber:5},this),document.body)}function SS({variant:c,title:a,subtitle:d,count:w,expanded:j,onToggle:L,onScroll:b,bodyRef:r,children:o}){return h.jsxDEV("div",{className:`git-section git-section--${c} ${j?"open":""}`,children:[h.jsxDEV("button",{className:"git-section-head",onClick:L,"aria-expanded":j,children:[h.jsxDEV("span",{className:"git-section-caret",children:h.jsxDEV(Sa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:418,columnNumber:45},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:418,columnNumber:9},this),h.jsxDEV("span",{className:"git-section-title",children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:419,columnNumber:9},this),d&&h.jsxDEV("span",{className:"git-section-sub",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:420,columnNumber:22},this),w!=null&&h.jsxDEV("span",{className:"git-section-count",children:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:421,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:417,columnNumber:7},this),j&&h.jsxDEV("div",{className:"git-section-body",ref:r,onScroll:b,children:o},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:423,columnNumber:20},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:416,columnNumber:5},this)}function w2({data:c,onOpenFile:a}){const d=(c==null?void 0:c.changes)??[];return d.length?h.jsxDEV("div",{className:"git-list",children:d.map((w,j)=>{const L=!!(w.x&&w.x!==" "&&w.x!=="?");return h.jsxDEV("button",{className:"git-row",onClick:()=>a(w.path,L),children:[h.jsxDEV("span",{className:`git-badge git-badge-${Bh(w.x,w.y).toLowerCase().replace("?","q")}`,children:Bh(w.x,w.y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:437,columnNumber:13},this),h.jsxDEV("span",{className:"git-row-path",children:w.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:438,columnNumber:13},this)]},`${w.path}-${j}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:436,columnNumber:11},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:432,columnNumber:5},this):h.jsxDEV("div",{className:"git-empty",children:B("git.cleanTree")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:430,columnNumber:31},this)}function x2({data:c,onOpen:a}){const d=(c==null?void 0:c.commits)??[];return d.length?h.jsxDEV("div",{className:"git-list",children:d.map(w=>h.jsxDEV("button",{className:"git-row git-commit-row",onClick:()=>a(w.hash),children:[h.jsxDEV("span",{className:"git-hash",children:w.short},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:453,columnNumber:11},this),h.jsxDEV("span",{className:"git-commit-main",children:[h.jsxDEV("span",{className:"git-row-path",children:w.subject},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:455,columnNumber:13},this),h.jsxDEV("span",{className:"git-commit-meta",children:[w.author," · ",w.relDate]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:456,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:454,columnNumber:11},this)]},w.hash,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:452,columnNumber:9},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:450,columnNumber:5},this):h.jsxDEV("div",{className:"git-empty",children:B("git.noCommits")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:448,columnNumber:31},this)}function S2({data:c,onOpenFile:a}){if(!c)return null;const d=c.files??[];return h.jsxDEV("div",{className:"git-commit-detail",children:[c.message&&h.jsxDEV("pre",{className:"git-commit-msg",children:c.message},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:469,columnNumber:24},this),h.jsxDEV("div",{className:"git-list",children:d.map((w,j)=>h.jsxDEV("button",{className:"git-row",onClick:()=>a(w.path),children:[h.jsxDEV("span",{className:`git-badge git-badge-${Bh(w.x,w.y).toLowerCase().replace("?","q")}`,children:Bh(w.x,w.y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:473,columnNumber:13},this),h.jsxDEV("span",{className:"git-row-path",children:w.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:474,columnNumber:13},this)]},`${w.path}-${j}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:472,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:470,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:468,columnNumber:5},this)}const NS=Xs.length-1;function N2({data:c}){const[a,d]=H.useState(()=>cA()),w=L=>{const b=Math.min(NS,Math.max(0,a+L));d(b),uA(b)};if(!c)return null;const j=c.files??[];return j.length?h.jsxDEV("div",{className:"git-diff-wrap",style:{fontSize:`${Xs[a]}px`},children:[h.jsxDEV("div",{className:"git-diff-zoom",children:[h.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>w(-1),disabled:a<=0,"aria-label":B("git.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:493,columnNumber:9},this),h.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>w(1),disabled:a>=NS,"aria-label":B("git.fontLarger"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:494,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:492,columnNumber:7},this),c.truncated&&h.jsxDEV("div",{className:"git-diff-trunc",children:B("git.diffTruncated")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:496,columnNumber:26},this),j.map((L,b)=>h.jsxDEV("div",{className:"git-diff-file",children:[j.length>1&&h.jsxDEV("div",{className:"git-diff-fname",children:L.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:499,columnNumber:32},this),h.jsxDEV("div",{className:"git-diff",children:L.hunks.map((r,o)=>h.jsxDEV("div",{className:"git-diff-hunk-block",children:[h.jsxDEV("div",{className:"git-diff-line git-diff-hunk",children:r.header},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:503,columnNumber:17},this),r.lines.map((g,y)=>h.jsxDEV("div",{className:`git-diff-line git-diff-${g.type}`,children:[g.type==="add"?"+":g.type==="del"?"-":" ",g.text]},y,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:505,columnNumber:19},this))]},o,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:502,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:500,columnNumber:11},this)]},`${L.path}-${b}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:498,columnNumber:9},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:491,columnNumber:5},this):h.jsxDEV("div",{className:"git-empty",children:B("git.noDiff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:489,columnNumber:29},this)}function C2(){const c=iU();if(!c.active)return null;const a=c.phase==="sending",d=Math.round((c.pct||0)*100);return uu.createPortal(h.jsxDEV("div",{className:"upload-overlay",role:"alertdialog","aria-modal":"true","aria-label":B("upload.title"),children:h.jsxDEV("div",{className:"upload-card",children:[c.label&&h.jsxDEV("div",{className:"upload-card-label",children:c.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:18,columnNumber:23},this),a?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"upload-bar",children:h.jsxDEV("div",{className:"upload-bar-fill",style:{width:`${d}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:21,columnNumber:41},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:21,columnNumber:13},this),h.jsxDEV("div",{className:"upload-card-sub",children:[d,"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:22,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:20,columnNumber:11},this):h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"upload-spinner","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:26,columnNumber:13},this),h.jsxDEV("div",{className:"upload-card-sub",children:B("upload.processing")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:27,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:25,columnNumber:11},this),h.jsxDEV("button",{type:"button",className:"upload-cancel",onClick:eU,children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:30,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:17,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:16,columnNumber:5},this),document.body)}const wh=8,CS=12;function E2({path:c,x:a,y:d,onOpen:w,onClose:j}){const L=c.split("/").filter(Boolean).pop()||c,b=H.useRef(null),[r,o]=H.useState(null);return H.useLayoutEffect(()=>{const g=b.current;if(!g)return;const y=g.offsetWidth,u=g.offsetHeight,p=window.innerWidth,S=window.innerHeight,N=Math.min(Math.max(a-y/2,wh),p-y-wh);let _=d+CS;_+u>S-wh&&(_=Math.max(wh,d-CS-u)),o({left:N,top:_})},[a,d,c]),h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"doclink-backdrop",onClick:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:33,columnNumber:7},this),h.jsxDEV("div",{ref:b,className:"doclink-pop",style:r?{left:r.left,top:r.top}:{left:0,top:0,visibility:"hidden"},role:"dialog","aria-label":B("doclink.title"),children:[h.jsxDEV("div",{className:"doclink-name",children:[h.jsxDEV(su,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:40,columnNumber:39},this),L]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:40,columnNumber:9},this),h.jsxDEV("div",{className:"doclink-path",children:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:41,columnNumber:9},this),h.jsxDEV("div",{className:"doclink-actions",children:[h.jsxDEV("button",{className:"doclink-cancel",onClick:j,children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:43,columnNumber:11},this),h.jsxDEV("button",{className:"doclink-open",onClick:()=>w(c),children:B("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:44,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:42,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:34,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:32,columnNumber:5},this)}const D2=()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`;function j2(c){const a=(c??"").trim();return a?{id:D2(),text:a}:null}function k2(c,a,d){const w=[...c];if(a<0||a>=w.length||d<0||d>=w.length||a===d)return w;const[j]=w.splice(a,1);return w.splice(d,0,j),w}function R2({open:c,session:a,window:d,onClose:w,onSend:j,onCountChange:L}){const[b,r]=H.useState([]),[o,g]=H.useState(""),[y,u]=H.useState(null),[p,S]=H.useState(null),N=H.useRef(null),_=H.useRef({head:"",tail:""}),l=H.useRef(null),m=H.useRef(!1),f=H.useRef({active:!1}),v=P=>{_x(a,d,P),r(P),L==null||L(P.length)},C=P=>{P&&(P.style.height="auto",P.style.height=`${P.scrollHeight+2}px`)};H.useEffect(()=>{if(!c)return;const P=t1(a,d);r(P),L==null||L(P.length),g(""),u(null)},[c,a,d]);const E=B1({onText:P=>{if(m.current){m.current=!1;return}const{head:W,tail:V}=_.current;g(W+P+V),l.current=W.length+P.length}}),A=V1(),D=E.state==="recording"||E.state==="finalizing";Hg(D),H.useEffect(()=>{if(E.state!=="recording"&&E.state!=="finalizing"||m.current)return;const{head:P,tail:W}=_.current;g(P+E.partial+W),l.current=P.length+E.partial.length},[E.partial,E.state]),H.useLayoutEffect(()=>{const P=N.current;if(!P||(C(P),l.current==null))return;const W=l.current;if(l.current=null,document.activeElement===P)try{P.setSelectionRange(W,W)}catch{}},[o]);const R=()=>{if(D){E.stop();return}const P=N.current,W=P?P.selectionStart:o.length;_.current={head:o.slice(0,W),tail:o.slice(W)},E.start()},M=()=>{D&&(m.current=!0,E.stop())},$=()=>{M();const P=o.trim();if(P){if(y)v(b.map(W=>W.id===y?{...W,text:P}:W));else{const W=j2(P);W&&v([...b,W])}g(""),u(null)}},O=P=>{u(P.id),g(P.text),requestAnimationFrame(()=>{var W;return(W=N.current)==null?void 0:W.focus()})},I=()=>{u(null),g("")},Y=P=>{v(b.filter(W=>W.id!==P)),P===y&&I()},Q=(P,W)=>{var V,J;P.cancelable&&P.preventDefault(),(J=(V=P.currentTarget).setPointerCapture)==null||J.call(V,P.pointerId),f.current={active:!0,pointerId:P.pointerId,id:W},S(W)},Z=P=>{var be;const W=f.current;if(!W.active||P.pointerId!==W.pointerId)return;const V=(be=P.currentTarget.closest(".idea-list"))==null?void 0:be.querySelectorAll("[data-idea]");if(!V||!V.length)return;const J=P.clientY;let _e=V.length-1;for(let Ve=0;Ve<V.length;Ve++){const Le=V[Ve].getBoundingClientRect();if(J<Le.top+Le.height/2){_e=Ve;break}}r(Ve=>{const Le=Ve.findIndex(ie=>ie.id===W.id);return Le<0||Le===_e?Ve:k2(Ve,Le,_e)})},ee=P=>{const W=f.current;!W.active||P.pointerId!==W.pointerId||(f.current={active:!1},S(null),r(V=>(_x(a,d,V),V)))};if(!c)return null;const oe=y!=null;return h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-backdrop",onClick:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:149,columnNumber:7},this),h.jsxDEV("div",{className:"idea-panel",role:"dialog","aria-label":B("idea.title"),children:[h.jsxDEV("div",{className:"cmd-head",children:[h.jsxDEV("span",{className:"cmd-title",children:[B("idea.title"),d?` · ${d}`:"",b.length>0&&h.jsxDEV("span",{className:"idea-head-count",children:b.length},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:152,columnNumber:100},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:152,columnNumber:11},this),h.jsxDEV("button",{className:"cmd-close",onClick:w,"aria-label":B("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:153,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:151,columnNumber:9},this),h.jsxDEV("div",{className:`idea-compose${D?" recording":""}`,children:[h.jsxDEV("textarea",{ref:N,className:"idea-input",rows:1,placeholder:B(oe?"idea.editPlaceholder":"idea.addPlaceholder"),value:o,readOnly:D,onChange:P=>g(P.target.value)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:157,columnNumber:11},this),oe&&h.jsxDEV("button",{className:"idea-cancel",onClick:I,children:B("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:166,columnNumber:23},this),A&&h.jsxDEV(L1,{active:D,disabled:E.state==="requesting",onToggle:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:167,columnNumber:28},this),h.jsxDEV("button",{className:"idea-act",onClick:$,disabled:!o.trim(),"aria-label":B(oe?"common.save":"idea.add"),children:oe?h.jsxDEV(o1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:169,columnNumber:24},this):h.jsxDEV(a1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:169,columnNumber:40},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:168,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:156,columnNumber:9},this),h.jsxDEV("div",{className:"idea-list",children:b.length===0?h.jsxDEV("div",{className:"cmd-empty",children:B("idea.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:175,columnNumber:13},this):b.map(P=>h.jsxDEV("div",{"data-idea":P.id,className:`idea-row${P.id===p?" dragging":""}${P.id===y?" editing":""}`,children:[h.jsxDEV("button",{type:"button",className:"idea-handle","aria-label":B("idea.dragSort"),onPointerDown:W=>Q(W,P.id),onPointerMove:Z,onPointerUp:ee,onPointerCancel:ee,children:"≡"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:182,columnNumber:15},this),h.jsxDEV("span",{className:"idea-text",onClick:()=>O(P),children:P.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:191,columnNumber:15},this),h.jsxDEV("button",{className:"idea-send",onClick:()=>j==null?void 0:j(P.text),"aria-label":B("idea.fillInput"),children:B("idea.send")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:192,columnNumber:15},this),h.jsxDEV("button",{className:"idea-del",onClick:()=>Y(P.id),"aria-label":B("common.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:193,columnNumber:15},this)]},P.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:177,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:173,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:150,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:148,columnNumber:5},this)}function T2({open:c,onClose:a}){return c?h.jsxDEV(h.Fragment,{children:[h.jsxDEV("div",{className:"cmd-backdrop",onClick:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:10,columnNumber:7},this),h.jsxDEV("div",{className:"changelog-panel",role:"dialog","aria-label":B("changelog.title"),children:[h.jsxDEV("div",{className:"cmd-head",children:[h.jsxDEV("span",{className:"cmd-title",children:B("changelog.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:13,columnNumber:11},this),h.jsxDEV("button",{className:"cmd-close",onClick:a,"aria-label":B("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:14,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:12,columnNumber:9},this),h.jsxDEV("div",{className:"changelog-list",children:cg.map(d=>{var L,b;const w=d.items[hl()]||d.items.en||d.items.zh||[],j=d.version?`v${d.version}`:((L=d.label)==null?void 0:L[hl()])||((b=d.label)==null?void 0:b.en);return h.jsxDEV("div",{className:"rel",children:[h.jsxDEV("div",{className:"rel-date",children:[j&&h.jsxDEV("span",{className:"rel-ver",children:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:26,columnNumber:29},this),h.jsxDEV("span",{className:"rel-day",children:d.date},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:27,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:25,columnNumber:17},this),h.jsxDEV("ul",{className:"rel-items",children:w.map((r,o)=>h.jsxDEV("li",{children:r},o,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:30,columnNumber:41},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:29,columnNumber:17},this)]},d.version||d.date,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:24,columnNumber:15},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:16,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:11,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:9,columnNumber:5},this):null}function L2(){const[c,a]=H.useState(0);return H.useEffect(()=>{const d=window.visualViewport;if(!d)return;const w=()=>{const j=window.innerHeight-d.height-d.offsetTop;a(Math.max(0,Math.round(j)))};return w(),d.addEventListener("resize",w),d.addEventListener("scroll",w),()=>{d.removeEventListener("resize",w),d.removeEventListener("scroll",w)}},[]),c}function A2(c){let a=!1,d=!1;for(let w=c;w&&w!==document.body&&w!==document.documentElement;w=w.parentElement){const j=getComputedStyle(w);if(!d&&(j.overflowY==="auto"||j.overflowY==="scroll")&&w.scrollHeight>w.clientHeight&&(d=!0),!a&&(j.overflowX==="auto"||j.overflowX==="scroll")&&w.scrollWidth>w.clientWidth&&(a=!0),a&&d)break}return{x:a,y:d}}function M2(){H.useEffect(()=>{let c="block",a=0,d=0;const w=L=>{const b=L.touches[0];if(a=b?b.clientX:0,d=b?b.clientY:0,!(L.target instanceof Element)){c="block";return}const{x:r,y:o}=A2(L.target);c=o?"free":r?"xonly":"block"},j=L=>{if(!(c==="free"||!L.cancelable)){if(c==="xonly"){const b=L.touches[0];if(b&&Math.abs(b.clientX-a)>=Math.abs(b.clientY-d))return}L.preventDefault()}};return document.addEventListener("touchstart",w,{passive:!0,capture:!0}),document.addEventListener("touchmove",j,{passive:!1,capture:!0}),()=>{document.removeEventListener("touchstart",w,{capture:!0}),document.removeEventListener("touchmove",j,{capture:!0})}},[])}function U2(c,a,d=2e3){const w=H.useRef(a);w.current=a,H.useEffect(()=>{if(!c)return;let j=!1,L=null,b=!1;const r=()=>{var u;(u=window.history.state)!=null&&u.exitRoot||window.history.replaceState({...window.history.state,exitRoot:!0},"")},o=()=>{var u;b||(u=window.history.state)!=null&&u.exitGuard||(window.history.pushState({exitGuard:!0},""),b=!0)},g=()=>{var u;L&&(clearTimeout(L),L=null),j&&(j=!1,(u=w.current)==null||u.call(w,!1))};r(),o();const y=()=>{var u,p,S;if((u=window.history.state)!=null&&u.exitGuard){b=!0,g();return}(p=window.history.state)!=null&&p.exitRoot&&(b=!1,!j&&(j=!0,(S=w.current)==null||S.call(w,!0),L=setTimeout(()=>{var N;j=!1,L=null,(N=w.current)==null||N.call(w,!1),o()},d)))};return window.addEventListener("popstate",y),()=>{var u,p;window.removeEventListener("popstate",y),L&&clearTimeout(L),j&&((u=w.current)==null||u.call(w,!1)),b&&((p=window.history.state)!=null&&p.exitGuard)&&window.history.back()}},[c,d])}function ES(c){history.replaceState(history.state,"",`#${encodeURIComponent(c)}`)}const xh=c=>{try{return decodeURIComponent(c)}catch{return c}};function DS(){const c=location.hash.replace(/^#/,""),a=c.match(/^\/s\/([^/]*)\/w\/([^/]*)\/p\/(.*)$/);return a?{session:xh(a[1]),window:xh(a[2]),pane:xh(a[3])}:{session:xh(c)||null,window:null,pane:null}}const O2="tmw-share-v1",P2="/__share__/";function B2(c=typeof location<"u"?location.search:""){try{return new URLSearchParams(c).has("share")}catch{return!1}}function I2(){if(typeof location>"u"||typeof history>"u")return;const c=new URL(location.href);c.searchParams.delete("share"),history.replaceState(history.state,"",c.pathname+c.search+c.hash)}async function V2(){if(typeof caches>"u")return null;let c;try{c=await caches.open(O2)}catch{return null}const a=await c.keys();if(!a.length)return null;const d=a[a.length-1],w=await c.match(d);if(await c.delete(d),!w)return null;const j=await w.blob();let L="shared";try{L=decodeURIComponent(new URL(d.url).pathname.slice(P2.length))||"shared"}catch{}return new File([j],L,{type:j.type||w.headers.get("Content-Type")||""})}const Qc=(c,a)=>a&&c.some(d=>d.id===a)?a:c[0].id;function F2(){var Ki,$r,Xi,Fi,_r,sn,as,lr,At,Tr,Vn,cr,Ji,Cs,qn,En,os,yi;const[c,a]=H.useState(!co()),[d,w]=H.useState(!1),[j,L]=H.useState(!1),[b,r]=H.useState(!1),[o,g]=H.useState(!1),[y,u]=H.useState(!1),[p,S]=H.useState(null),[N,_]=H.useState(null),[l,m]=H.useState(!1),[f,v]=H.useState(!1),[C,T]=H.useState(null),[E,A]=H.useState(null),[D,R]=H.useState(null),[M,$]=H.useState(!1),[O,I]=H.useState(null),Y=RM(),[Q,Z]=H.useState(so),[ee,oe]=H.useState(kh),[P,W]=H.useState([]),[V,J]=H.useState(null),[_e,be]=H.useState(!0),[Ve,Le]=H.useState({}),[ie,G]=H.useState([]),[pe,le]=H.useState(null),[Be,Te]=H.useState(!1),{status:Xe,enable:Ke}=IU(),[st,jt]=H.useState(!1),[Ye,$t]=H.useState(0),[Yt,dt]=H.useState(!1),[Je,nt]=H.useState(dA),[ne,Fe]=H.useState(null),[tt,me]=H.useState(fA),[rt,Re]=H.useState(hx),[fe,ce]=H.useState(IL),Ee=H.useRef(null),Oe=H.useRef(null),vt=H.useRef(null),Ct=H.useRef(null),ot=H.useCallback(()=>a(!0),[]),St=H.useCallback(he=>AM(he,ot),[ot]),{previewDomain:yn,dynamicEnabled:hn,previewSheetOpen:qt,setPreviewSheetOpen:It,activePreview:Pt,openPreviewSheet:Un,startPreview:Hn,startDynamicPreview:ei,stopPreview:Di,renewPreview:ti}=LM(V,{settingsOpen:j,setSettingsOpen:L});H.useEffect(()=>{c||OA().then(Fe).catch(()=>{})},[c]);const ii=H.useCallback(()=>{PL(),L(!1),g(!1),w(!1),J(null),be(!0),a(!0)},[]);M2();const Cn=L2();rs(qt,()=>It(!1)),rs(d,()=>w(!1)),rs(Be,()=>Te(!1)),rs(b,()=>r(!1)),rs(o,()=>g(!1)),rs(y,()=>u(!1)),rs(st,()=>jt(!1)),rs(!!E,()=>A(null)),rs(j||Yt,()=>{Yt?dt(!1):L(!1)}),rs(!!N||!!p,()=>{p?S(null):_(null)}),U2(!!V,$);const fn=H.useCallback(async he=>{var We,et;const Se=V==null?void 0:V.paneId;if(Se)try{await ug(Se,[he]),(et=(We=Ee.current)==null?void 0:We.wake)==null||et.call(We)}catch(_t){St(_t)}},[V,ot]),zn=H.useCallback(async he=>{var We,et;const Se=V==null?void 0:V.paneId;if(Se)try{await Sh(Se,he,!1),(et=(We=Ee.current)==null?void 0:We.wake)==null||et.call(We)}catch(_t){St(_t)}},[V,ot]),Zt=H.useCallback(async he=>{var _t,Et,Mt,Kt,$n;const Se=(_t=V==null?void 0:V.window)==null?void 0:_t.id,We=vt.current??((Mt=(Et=Ee.current)==null?void 0:Et.getSize())==null?void 0:Mt.cols);if(!Se||!We)return;const et=Math.max(20,Math.min(500,We+he));vt.current=et,($n=(Kt=Ee.current)==null?void 0:Kt.flash)==null||$n.call(Kt);try{Ct.current==null&&(Ct.current=await EA(Se).then(Pn=>Pn.layout||"").catch(()=>"")),V.panes&&V.panes.length>1?await CA(V.paneId,et):await NA(Se,et)}catch(Pn){St(Pn)}},[V,ot]),Ln=H.useCallback(async()=>{var We;const he=(We=V==null?void 0:V.window)==null?void 0:We.id;if(!he)return;const Se=Ct.current;vt.current=null,Ct.current=null;try{await DA(he,Se)}catch(et){St(et)}},[V,ot]),Rn=H.useCallback(async(he,Se=null)=>{var Mt;const We=await Kc(he.id);if(!We.length)return!1;const et=(Se==null?void 0:Se.window)&&We.find(Kt=>Kt.id===Se.window)||We.find(Kt=>Kt.id===Qc(We,$L(he.id))),_t=await ph(et.id);if(!_t.length)return!1;const Et=Se!=null&&Se.pane&&_t.some(Kt=>Kt.id===Se.pane)?Se.pane:Qc(_t,fh(et.id));return J({session:he,windows:We,window:et,panes:_t,paneId:Et}),Yc({sessionId:he.id,windowId:et.id,paneId:Et}),ES(he.name),vt.current=((Mt=_t.find(Kt=>Kt.id===Et))==null?void 0:Mt.width)??null,Ct.current=null,!0},[]),ri=H.useCallback(async he=>{var Se;try{const We=await ph(he.id);if(!We.length)return;const et=Qc(We,fh(he.id));J(_t=>_t&&{..._t,window:he,panes:We,paneId:et}),Yc({sessionId:V.session.id,windowId:he.id,paneId:et}),vt.current=((Se=We.find(_t=>_t.id===et))==null?void 0:Se.width)??null,Ct.current=null}catch(We){St(We)}},[V,ot]),re=H.useCallback(async(he,Se,We)=>{var Et,Mt,Kt,$n;const et=(Et=V==null?void 0:V.session)==null?void 0:Et.id,_t=V==null?void 0:V.paneId;if(!(!et||!_t))try{const{id:Pn}=await kA(et,_t,he||void 0,Se,We),Zi=await Kc(et),wi=Zi.find(oi=>oi.id===Pn)||Zi[Zi.length-1],ur=await ph(wi.id);if(!ur.length)return;const Lr=Qc(ur,fh(wi.id));J(oi=>oi&&{...oi,windows:Zi,window:wi,panes:ur,paneId:Lr}),Yc({sessionId:et,windowId:wi.id,paneId:Lr}),vt.current=((Mt=ur.find(oi=>oi.id===Lr))==null?void 0:Mt.width)??null,Ct.current=null,u(!1),($n=(Kt=Ee.current)==null?void 0:Kt.wake)==null||$n.call(Kt)}catch(Pn){if(St(Pn))return;throw Pn}},[V,ot]),Ie=H.useCallback(async he=>{var et,_t;const Se=p;if(!Se)return;const We=(et=V==null?void 0:V.session)==null?void 0:et.id;if(Se.kind==="session"){try{await RA(Se.id,he)}catch(Et){throw St(Et)?Et:Et.status===409?new Error(Se("app.nameExists")):new Error(Se("app.renameFailed"))}Z(BL(Se.name,he)),Xc(),ES(he),J(Et=>Et&&Et.session.id===Se.id?{...Et,session:{...Et.session,name:he}}:Et)}else{try{await TA(Se.id,he)}catch(Mt){throw St(Mt)?Mt:new Error(Se("app.renameFailed"))}pA((_t=V==null?void 0:V.session)==null?void 0:_t.name,Se.name||Se.id,he);const Et=await Kc(We);J(Mt=>Mt&&{...Mt,windows:Et,window:Et.find(Kt=>Kt.id===Mt.window.id)||Mt.window})}S(null)},[p,V,ot]),Ze=H.useCallback(async()=>{var Et;const he=N,Se=V==null?void 0:V.session;if(!he||!Se)return;const We=Se.id,et=V.windows.length<=1;try{await LA(he.id)}catch(Mt){if(St(Mt))return;window.alert(B("app.deleteFailed")),_(null);return}if(_(null),et){Z(dx(Se.name)),Xc(),J(null);return}const _t=await Kc(We);if(he.id===V.window.id&&_t.length){const Mt=_t.find(Pn=>Pn.active)||_t[0],Kt=await ph(Mt.id);if(!Kt.length)return;const $n=Qc(Kt,fh(Mt.id));J(Pn=>Pn&&{...Pn,windows:_t,window:Mt,panes:Kt,paneId:$n}),Yc({sessionId:We,windowId:Mt.id,paneId:$n}),vt.current=((Et=Kt.find(Pn=>Pn.id===$n))==null?void 0:Et.width)??null,Ct.current=null}else J(Mt=>Mt&&{...Mt,windows:_t})},[N,V,ot]),yt=H.useCallback(async he=>{var _t;const Se=N,We=(_t=V==null?void 0:V.session)==null?void 0:_t.id;if(!Se||!We)return;const et=qv(V.windows,Se.id,he);if(et)try{await AA(Se.id,et.id);const Et=await Kc(We);J(Mt=>Mt&&{...Mt,windows:Et,window:Et.find(Kt=>Kt.id===Mt.window.id)||Mt.window}),_(Et.find(Mt=>Mt.id===Se.id)||null)}catch(Et){if(St(Et)){_(null);return}window.alert(B("app.moveFailed")),_(null)}},[N,V,ot]),wt=Bg(()=>{V!=null&&V.session&&S({kind:"session",id:V.session.id,name:V.session.name})}),gt=H.useCallback(async he=>{try{const Se=(await fl()).find(We=>We.name===he);if(!Se){window.alert(B("app.sessionGone",{name:he}));return}await Rn(Se)&&w(!1)}catch(Se){St(Se)}},[Rn,ot]),Rt=H.useCallback(async he=>{Te(!1),Re(fx(he.pane,he.ts));try{const Se=(await fl()).find(We=>We.name===he.session);if(!Se){window.alert(B("app.sessionGone",{name:he.session}));return}w(!1),await Rn(Se,{window:he.window,pane:he.pane})}catch(Se){St(Se)}},[Rn,ot]),bt=H.useCallback(async({target:he,kill:Se,name:We})=>{const et=pe,_t=await IA({pid:et.pid,sessionId:et.sessionId,target:he,kill:Se,name:We});_t.name&&(Z(ux(_t.name)),Xc()),le(null),Te(!1);try{_t.name&&(w(!1),await Rn({id:_t.session,name:_t.name},{window:_t.window,pane:_t.pane}))}catch(Et){St(Et)}try{G(await wx())}catch{}},[pe,Rn,ot]),wn=H.useCallback(()=>{const he=Dx(Ve);mx(he),ce(he)},[Ve]),on=H.useCallback(he=>{Z(ux(he)),Xc(),g(!1),gt(he)},[gt]),Wt=H.useCallback(he=>{Z(dx(he)),Xc(),J(Se=>Se&&Se.session.name===he?null:Se)},[]),pn=H.useCallback(he=>{J(Se=>Se&&(Yc({windowId:Se.window.id,paneId:he}),{...Se,paneId:he}))},[]),vn=(Ki=V==null?void 0:V.session)==null?void 0:Ki.name,Yn=($r=V==null?void 0:V.window)==null?void 0:$r.id;H.useEffect(()=>{W(vn&&Yn?Rh(vn,Yn):[])},[vn,Yn]);const mn=(Xi=V==null?void 0:V.session)==null?void 0:Xi.name,ji=((Fi=V==null?void 0:V.window)==null?void 0:Fi.name)||((_r=V==null?void 0:V.window)==null?void 0:_r.id);H.useEffect(()=>{$t(mn&&ji?t1(mn,ji).length:0)},[mn,ji]),H.useEffect(()=>{V!=null&&V.paneId&&xM(V.paneId)},[V==null?void 0:V.paneId]),H.useEffect(()=>{var We;const he=V==null?void 0:V.paneId;if(!he)return;const Se=(We=Ve[he])==null?void 0:We.ts;Se!=null&&hx()[he]!==Se&&Re(fx(he,Se))},[V==null?void 0:V.paneId,Ve]),H.useEffect(()=>{if(!B2())return;I2();let he=!1;return(async()=>{const Se=await V2();he||!Se||(T(Se),Y.activate("home"),m(!0))})(),()=>{he=!0}},[]),H.useEffect(()=>{if(c||typeof navigator>"u"||!("serviceWorker"in navigator))return;const he=async({session:et,window:_t,pane:Et})=>{if(et)try{const Kt=(await fl()).find($n=>$n.name===et);Kt&&(w(!1),await Rn(Kt,{window:_t,pane:Et}))}catch(Mt){St(Mt)}},Se=et=>{const _t=et.data;_t&&_t.type==="navigate"&&he(_t)},We=()=>{const et=DS();et.session&&(et.window||et.pane)&&he(et)};return navigator.serviceWorker.addEventListener("message",Se),window.addEventListener("hashchange",We),()=>{navigator.serviceWorker.removeEventListener("message",Se),window.removeEventListener("hashchange",We)}},[c,Rn,ot]);const si=H.useCallback(he=>{var et,_t,Et,Mt;(_t=(et=Ee.current)==null?void 0:et.wake)==null||_t.call(et);const Se=(Et=V==null?void 0:V.session)==null?void 0:Et.name,We=(Mt=V==null?void 0:V.window)==null?void 0:Mt.id;Se&&We&&W(eA(Se,We,he))},[V]),Vt=H.useCallback(he=>{oe(kh().includes(he)?XL(he):KL(he))},[]),ae=H.useCallback(he=>{var et,_t;const Se=(et=V==null?void 0:V.session)==null?void 0:et.name,We=(_t=V==null?void 0:V.window)==null?void 0:_t.id;Se&&We&&W(tA(Se,We,he))},[V]),He=((as=(sn=V==null?void 0:V.panes)==null?void 0:sn.find(he=>he.id===V.paneId))==null?void 0:as.cwd)||null,xe=async he=>{if(bA(he)){const We=he.split("/").pop()||he;if(Y.tabs.some(Et=>Et.key===he)){Y.activate(he),je(he),m(!0);return}const{url:et,mtimeMs:_t}=await Sx(he);Y.openDoc(he,{type:"image",name:We,content:et,mtime:_t}),vx({path:he,name:We,type:"image",ts:Date.now()}),m(!0);return}const Se=await yx(he);Y.openDoc(he,{type:Se.type,name:Se.name,content:Se.content,mtime:Se.mtimeMs}),vx({path:he,name:Se.name,type:Se.type,ts:Date.now()}),m(!0)},X=he=>{const Se=Y.tabs.find(We=>We.key===he);(Se==null?void 0:Se.type)==="image"&&Se.content&&URL.revokeObjectURL(Se.content),Y.closeTab(he)},je=he=>{const Se=Y.tabs.find(We=>We.key===he);if(!(!Se||Se.type==="home")){if(Se.type==="image"){Sx(he,Se.mtime??null).then(We=>{if(We.notModified)return;const et=Se.content;Y.refreshDoc(he,{content:We.url,mtime:We.mtimeMs}),et&&URL.revokeObjectURL(et)}).catch(()=>{});return}yx(he,Se.mtime??null).then(We=>{We.notModified||Y.refreshDoc(he,{type:We.type,name:We.name,content:We.content,mtime:We.mtimeMs})}).catch(()=>{})}},qe=he=>{Y.activate(he),je(he)},kt=()=>{m(!0),je(Y.active)},mt=he=>{const Se=/-> (\d+)/.exec((he==null?void 0:he.message)||""),We=Se?Number(Se[1]):0;return B(We===404?"app.docNotFound":We===413?"app.docTooLarge":We===400?"app.docUnsupported":"app.docOpenFailed")},Tt=async he=>{if(b1(he)){try{await xe(he)}catch(We){R(mt(We))}return}const Se=gx(V==null?void 0:V.paneId)??He;if(Se)try{await xe(ro(Se,he));return}catch{}A({rawPath:he})},tn=async he=>{try{await xe(ro(he,E.rawPath))}catch(Se){R(mt(Se));return}V!=null&&V.paneId&&rA(V.paneId,he),setTimeout(()=>A(null),0)},Xt=(he,Se,We)=>I({path:he,x:Se,y:We}),Qt=he=>{I(null),Tt(he)};if(H.useEffect(()=>{if(!D)return;const he=setTimeout(()=>R(null),4e3);return()=>clearTimeout(he)},[D]),H.useEffect(()=>{if(c)return;const he=so();if(!he.length){be(!1);return}let Se=!1;return(async()=>{try{const We=await fl();if(Se||!We.length)return;const et=We.filter(Kt=>he.includes(Kt.name));if(!et.length)return;const _t=DS();let Et=_t.session?et.find(Kt=>Kt.name===_t.session):null;const Mt=Et?{window:_t.window,pane:_t.pane}:null;if(!Et){const Kt=zL();Kt&&(Et=et.find($n=>$n.id===Kt))}Et||(Et=et[0]),Se||await Rn(Et,Mt)}catch(We){St(We)}finally{Se||be(!1)}})(),()=>{Se=!0}},[c,Rn]),Tx({fetch:()=>BA(Q),apply:he=>Le(he||{}),intervalMs:5e3,enabled:!c,deps:[Q]}),H.useEffect(()=>{if(fe!=null)return;const he=Dx(Ve);he>0&&(mx(he),ce(he))},[Ve,fe]),Tx({fetch:wx,apply:he=>G(Array.isArray(he)?he:[]),intervalMs:15e3,enabled:!c}),c)return h.jsxDEV(xU,{onSaved:()=>{a(!1),be(!0)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:755,columnNumber:12},this);const On=mM(Ve,rt,fe??1/0),Gt=vM(On),An={};for(const he of Object.values(Ve))he.window&&he.agent&&(An[he.window]=he.agent);const Xn={};for(const[he,Se]of Object.entries(Ve))Se.agent&&(Xn[he]=Se.agent);const ai=!!mh&&Je!==mh,Vi=!!(ne!=null&&ne.updateAvailable)&&ne.latest!==tt,Hr=ai||Vi,zr=()=>{L(!0),ne!=null&&ne.latest&&(mA(ne.latest),me(ne.latest))},ss=()=>{L(!1),dt(!0),hA(mh),nt(mh)};return h.jsxDEV("div",{className:"app",style:Cn?{transform:`translateY(-${Cn}px)`}:void 0,children:[h.jsxDEV("header",{className:"topbar",children:[h.jsxDEV("button",{className:"hamburger",onClick:()=>w(!0),children:"☰"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:793,columnNumber:9},this),h.jsxDEV("span",{className:"session-name",...wt,children:((lr=V==null?void 0:V.session)==null?void 0:lr.name)??"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:794,columnNumber:9},this),Pt&&h.jsxDEV("button",{className:"topbar-icon preview-live",onClick:()=>It(!0),"aria-label":B("app.preview"),title:B("app.openPreview"),children:h.jsxDEV(hg,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:798,columnNumber:72},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:797,columnNumber:11},this),h.jsxDEV("button",{className:"topbar-icon",onClick:()=>jt(!0),"aria-label":B("app.ideas"),title:B("app.ideas"),disabled:!V,children:[h.jsxDEV(eM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:803,columnNumber:11},this),Ye>0&&h.jsxDEV("span",{className:"idea-badge",children:Ye},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:804,columnNumber:29},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:801,columnNumber:9},this),h.jsxDEV(AU,{rows:On,top:Gt,open:Be,onToggle:()=>Te(he=>!he),onClose:()=>Te(!1),onSelectRow:Rt,onMarkAllRead:wn,hooksStatus:Xe,onEnableHooks:Ke},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:806,columnNumber:9},this),h.jsxDEV("button",{className:"topbar-icon",onClick:()=>r(!0),"aria-label":B("usage.title"),title:B("usage.title"),children:h.jsxDEV(oM,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:817,columnNumber:131},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:817,columnNumber:9},this),h.jsxDEV("button",{className:"topbar-icon",onClick:kt,"aria-label":B("app.files"),title:B("app.files"),children:h.jsxDEV(su,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:818,columnNumber:114},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:818,columnNumber:9},this),h.jsxDEV("button",{className:"topbar-icon",onClick:()=>v(!0),"aria-label":"Git",title:"Git",children:h.jsxDEV(d1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:819,columnNumber:103},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:819,columnNumber:9},this),h.jsxDEV("button",{className:"topbar-icon",onClick:zr,"aria-label":B("app.settings"),title:B("app.settings"),children:[h.jsxDEV(dg,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:821,columnNumber:11},this),Hr&&h.jsxDEV("span",{className:"topbar-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:822,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:820,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:792,columnNumber:7},this),h.jsxDEV(LU,{open:b,onClose:()=>r(!1),onAuthFail:ot},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:825,columnNumber:7},this),h.jsxDEV(jU,{open:j,onClose:()=>L(!1),termRef:Ee,getColCount:()=>{var he,Se;return vt.current??((Se=(he=Ee.current)==null?void 0:he.getSize())==null?void 0:Se.cols)},onColAdjust:he=>Zt(he),onColRestore:Ln,onOpenChangelog:ss,changelogUnread:ai,updateInfo:ne,activePreview:Pt,pane:V==null?void 0:V.paneId,lastPreviewDir:FL((At=V==null?void 0:V.window)==null?void 0:At.id),dynamicEnabled:hn,onStartPreview:Hn,onStartDynamicPreview:ei,onOpenPreview:Un,onRenew:ti,onStop:Di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:830,columnNumber:7},this),h.jsxDEV(T2,{open:Yt,onClose:()=>dt(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:850,columnNumber:7},this),h.jsxDEV(MM,{open:d,currentSessionName:(Tr=V==null?void 0:V.session)==null?void 0:Tr.name,bound:Q,onSelectSession:gt,onUnbind:Wt,onBind:()=>g(!0),onClose:()=>w(!1),onLogout:ii,orphans:ie,onTakeoverRequest:le},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:851,columnNumber:7},this),h.jsxDEV(zU,{open:o,bound:Q,onBound:on,onClose:()=>g(!1),onAuthFail:ot,inset:Cn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:863,columnNumber:7},this),h.jsxDEV(WU,{open:y,onClose:()=>u(!1),onCreate:re,paneId:V==null?void 0:V.paneId,inset:Cn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:871,columnNumber:7},this),h.jsxDEV(YU,{open:!!p,title:(p==null?void 0:p.kind)==="session"?B("app.renameSession"):B("app.renameWindow"),currentName:(p==null?void 0:p.name)||"",onClose:()=>S(null),onSubmit:Ie,inset:Cn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:878,columnNumber:7},this),h.jsxDEV(MU,{open:!!pe,orphan:pe,onConfirm:bt,onClose:()=>le(null),inset:Cn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:886,columnNumber:7},this),h.jsxDEV(zg,{open:!!N,title:N?N.name||N.id:"",onClose:()=>_(null),actions:N?[...V&&V.windows.length>1?[[{key:"move-left",label:B("app.moveLeft"),disabled:!qv(V.windows,N.id,"left"),onClick:()=>yt("left")},{key:"move-right",label:B("app.moveRight"),disabled:!qv(V.windows,N.id,"right"),onClick:()=>yt("right")}]]:[],{key:"rename",label:B("common.rename"),onClick:()=>{S({kind:"window",id:N.id,name:N.name||""}),_(null)}},{key:"delete",label:B("app.deleteWindow"),danger:!0,confirm:!0,confirmLabel:V&&V.windows.length<=1?B("app.deleteLastWindowConfirm"):B("app.deleteConfirm"),onClick:Ze}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:893,columnNumber:7},this),h.jsxDEV(g2,{open:l,pane:V==null?void 0:V.paneId,windowId:(Vn=V==null?void 0:V.window)==null?void 0:Vn.id,tabs:Y.tabs,active:Y.active,onActivate:qe,onCloseTab:X,onMinimize:()=>m(!1),onOpenDoc:Tt,pendingShare:C,onPendingConsumed:()=>T(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:928,columnNumber:7},this),h.jsxDEV(y2,{open:f,pane:V==null?void 0:V.paneId,windowId:(cr=V==null?void 0:V.window)==null?void 0:cr.id,inset:Cn,onClose:()=>v(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:941,columnNumber:7},this),h.jsxDEV(C2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:944,columnNumber:7},this),h.jsxDEV(PU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:946,columnNumber:7},this),h.jsxDEV(dM,{open:qt&&!!Pt,name:Pt==null?void 0:Pt.name,kind:Pt==null?void 0:Pt.kind,domain:yn,port:Pt==null?void 0:Pt.port,dir:Pt==null?void 0:Pt.dir,expiresAt:Pt==null?void 0:Pt.expiresAt,onRenew:ti,onStop:Di,onMinimize:()=>It(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:948,columnNumber:7},this),D&&h.jsxDEV("div",{className:"doc-toast",role:"alert",onClick:()=>R(null),children:D},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:961,columnNumber:9},this),M&&h.jsxDEV("div",{className:"exit-toast",role:"status",children:B("app.backToExit")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:964,columnNumber:9},this),O&&h.jsxDEV(E2,{path:O.path,x:O.x,y:O.y,onOpen:Qt,onClose:()=>I(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:967,columnNumber:9},this),h.jsxDEV(R2,{open:st,session:(Ji=V==null?void 0:V.session)==null?void 0:Ji.name,window:((Cs=V==null?void 0:V.window)==null?void 0:Cs.name)||((qn=V==null?void 0:V.window)==null?void 0:qn.id),onClose:()=>jt(!1),onSend:he=>{var Se;(Se=Oe.current)==null||Se.fill(he),jt(!1)},onCountChange:$t},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:975,columnNumber:7},this),h.jsxDEV(du,{open:!!E,seedCwd:gx(V==null?void 0:V.paneId)??He??null,pane:(V==null?void 0:V.paneId)??null,hint:E?h.jsxDEV(h.Fragment,{children:[B("app.cannotLocate")," ",h.jsxDEV("code",{children:E.rawPath},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:987,columnNumber:54},this),B("app.pickItsDir")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:987,columnNumber:28},this):null,onPick:tn,onClose:()=>A(null),inset:Cn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:983,columnNumber:7},this),V?h.jsxDEV(h.Fragment,{children:[h.jsxDEV(IM,{windows:V.windows,windowAgents:An,paneAgents:Xn,currentAgent:(En=Ve[V.paneId])==null?void 0:En.agent,currentWindowId:V.window.id,panes:V.panes,currentPaneId:V.paneId,onSelectWindow:ri,onSelectPane:pn,onNewWindow:()=>u(!0),onManageWindow:he=>_(he),trackWindowId:N==null?void 0:N.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:994,columnNumber:11},this),V.paneId&&h.jsxDEV(E3,{ref:Ee,pane:V.paneId,inset:Cn,onAuthFail:ot,onDocLinkTap:Xt,onTap:()=>{var he;return(he=Oe.current)==null?void 0:he.hideKeyboard()}},V.paneId,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1009,columnNumber:13},this),h.jsxDEV(wU,{ref:Oe,pane:V.paneId,onAuthFail:ot,onKey:fn,onText:zn,cwd:He,agent:(os=Ve[V.paneId])==null?void 0:os.agent,windowId:(yi=V.window)==null?void 0:yi.id,recent:P,favorites:ee,onSent:si,onToggleFav:Vt,onRemoveRecent:ae,inset:Cn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1019,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:993,columnNumber:9},this):_e?h.jsxDEV("div",{className:"loading",children:B("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1037,columnNumber:9},this):Q.length===0?h.jsxDEV("button",{className:"empty-cta",onClick:()=>g(!0),children:[B("app.noBoundSession"),h.jsxDEV("span",{children:B("app.tapToBind")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1040,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1039,columnNumber:9},this):h.jsxDEV("div",{className:"loading",children:B("app.selectSessionHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1043,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:791,columnNumber:5},this)}AS(document.getElementById("root")).render(h.jsxDEV(F2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/main.jsx",lineNumber:6,columnNumber:52},void 0));if(typeof window<"u"&&window.__hideBootSplash){const c=[...document.querySelectorAll('link[rel="stylesheet"]')].filter(d=>d.media==="print"),a=c.length?new Promise(d=>{let w=c.length;c.forEach(j=>j.addEventListener("load",()=>{--w||d()},{once:!0}))}):Promise.resolve();requestAnimationFrame(()=>requestAnimationFrame(()=>a.then(()=>window.__hideBootSplash())))}