handmux 0.17.4 → 0.17.6
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.
- package/package.json +4 -4
- package/public/assets/index-CDwW4psj.js +330 -0
- package/public/assets/index-CiaHwIWj.css +32 -0
- package/public/index.html +2 -2
- package/src/agents/claude.js +15 -43
- package/src/agents/codex.js +15 -5
- package/src/agents/processIdentity.js +72 -0
- package/src/claudeEvents.js +7 -5
- package/src/cli/pushCmd.js +7 -1
- package/src/notifications.js +16 -1
- package/src/previewServer.js +5 -14
- package/src/push.js +30 -4
- package/src/routes/push.js +32 -5
- package/src/routes/transcript.js +24 -13
- package/src/transcriptParse.js +14 -3
- package/src/transcriptReader.js +101 -0
- package/public/assets/index-BT03K2MQ.css +0 -32
- package/public/assets/index-BfJTQWOA.js +0 -330
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
var yA=Object.defineProperty;var aN=r=>{throw TypeError(r)};var xA=(r,s,c)=>s in r?yA(r,s,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[s]=c;var Kn=(r,s,c)=>xA(r,typeof s!="symbol"?s+"":s,c),wA=(r,s,c)=>s.has(r)||aN("Cannot "+c);var oN=(r,s,c)=>s.has(r)?aN("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,c);var rm=(r,s,c)=>(wA(r,s,"access private method"),c);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const C of document.querySelectorAll('link[rel="modulepreload"]'))v(C);new MutationObserver(C=>{for(const R of C)if(R.type==="childList")for(const y of R.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&v(y)}).observe(document,{childList:!0,subtree:!0});function c(C){const R={};return C.integrity&&(R.integrity=C.integrity),C.referrerPolicy&&(R.referrerPolicy=C.referrerPolicy),C.crossOrigin==="use-credentials"?R.credentials="include":C.crossOrigin==="anonymous"?R.credentials="omit":R.credentials="same-origin",R}function v(C){if(C.ep)return;C.ep=!0;const R=c(C);fetch(C.href,R)}})();var F1={exports:{}},t_={},H1={exports:{}},gm={exports:{}};gm.exports;(function(r,s){/**
|
|
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 c="18.3.1",v=Symbol.for("react.element"),C=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),g=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),l=Symbol.iterator,m="@@iterator";function f(z){if(z===null||typeof z!="object")return null;var ce=l&&z[l]||z[m];return typeof ce=="function"?ce:null}var p={current:null},S={transition:null},k={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},j={current:null},A={},D=null;function L(z){D=z}A.setExtraStackFrame=function(z){D=z},A.getCurrentStack=null,A.getStackAddendum=function(){var z="";D&&(z+=D);var ce=A.getCurrentStack;return ce&&(z+=ce()||""),z};var O=!1,F=!1,P=!1,B=!1,G=!1,ne={ReactCurrentDispatcher:p,ReactCurrentBatchConfig:S,ReactCurrentOwner:j};ne.ReactDebugCurrentFrame=A,ne.ReactCurrentActQueue=k;function ee(z){{for(var ce=arguments.length,Y=new Array(ce>1?ce-1:0),de=1;de<ce;de++)Y[de-1]=arguments[de];se("warn",z,Y)}}function te(z){{for(var ce=arguments.length,Y=new Array(ce>1?ce-1:0),de=1;de<ce;de++)Y[de-1]=arguments[de];se("error",z,Y)}}function se(z,ce,Y){{var de=ne.ReactDebugCurrentFrame,ye=de.getStackAddendum();ye!==""&&(ce+="%s",Y=Y.concat([ye]));var Le=Y.map(function(Te){return String(Te)});Le.unshift("Warning: "+ce),Function.prototype.apply.call(console[z],console,Le)}}var I={};function W(z,ce){{var Y=z.constructor,de=Y&&(Y.displayName||Y.name)||"ReactClass",ye=de+"."+ce;if(I[ye])return;te("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.",ce,de),I[ye]=!0}}var X={isMounted:function(z){return!1},enqueueForceUpdate:function(z,ce,Y){W(z,"forceUpdate")},enqueueReplaceState:function(z,ce,Y,de){W(z,"replaceState")},enqueueSetState:function(z,ce,Y,de){W(z,"setState")}},K=Object.assign,ve={};Object.freeze(ve);function he(z,ce,Y){this.props=z,this.context=ce,this.refs=ve,this.updater=Y||X}he.prototype.isReactComponent={},he.prototype.setState=function(z,ce){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,ce,"setState")},he.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};{var Ae={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)."]},me=function(z,ce){Object.defineProperty(he.prototype,z,{get:function(){ee("%s(...) is deprecated in plain JavaScript React classes. %s",ce[0],ce[1])}})};for(var ie in Ae)Ae.hasOwnProperty(ie)&&me(ie,Ae[ie])}function $(){}$.prototype=he.prototype;function _e(z,ce,Y){this.props=z,this.context=ce,this.refs=ve,this.updater=Y||X}var ue=_e.prototype=new $;ue.constructor=_e,K(ue,he.prototype),ue.isPureReactComponent=!0;function Ie(){var z={current:null};return Object.seal(z),z}var Ue=Array.isArray;function nt(z){return Ue(z)}function et(z){{var ce=typeof Symbol=="function"&&Symbol.toStringTag,Y=ce&&z[Symbol.toStringTag]||z.constructor.name||"Object";return Y}}function st(z){try{return Dt(z),!1}catch{return!0}}function Dt(z){return""+z}function J(z){if(st(z))return te("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",et(z)),Dt(z)}function yt(z,ce,Y){var de=z.displayName;if(de)return de;var ye=ce.displayName||ce.name||"";return ye!==""?Y+"("+ye+")":Y}function Kt(z){return z.displayName||"Context"}function Se(z){if(z==null)return null;if(typeof z.tag=="number"&&te("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 R:return"Fragment";case C:return"Portal";case a:return"Profiler";case y:return"StrictMode";case h:return"Suspense";case _:return"SuspenseList"}if(typeof z=="object")switch(z.$$typeof){case g:var ce=z;return Kt(ce)+".Consumer";case d:var Y=z;return Kt(Y._context)+".Provider";case x:return yt(z,z.render,"ForwardRef");case N:var de=z.displayName||null;return de!==null?de:Se(z.type)||"Memo";case E:{var ye=z,Le=ye._payload,Te=ye._init;try{return Se(Te(Le))}catch{return null}}}return null}var Re=Object.prototype.hasOwnProperty,We={key:!0,ref:!0,__self:!0,__source:!0},re,$e,Ke;Ke={};function ge(z){if(Re.call(z,"ref")){var ce=Object.getOwnPropertyDescriptor(z,"ref").get;if(ce&&ce.isReactWarning)return!1}return z.ref!==void 0}function Ze(z){if(Re.call(z,"key")){var ce=Object.getOwnPropertyDescriptor(z,"key").get;if(ce&&ce.isReactWarning)return!1}return z.key!==void 0}function Ce(z,ce){var Y=function(){re||(re=!0,te("%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)",ce))};Y.isReactWarning=!0,Object.defineProperty(z,"key",{get:Y,configurable:!0})}function Ve(z,ce){var Y=function(){$e||($e=!0,te("%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)",ce))};Y.isReactWarning=!0,Object.defineProperty(z,"ref",{get:Y,configurable:!0})}function be(z){if(typeof z.ref=="string"&&j.current&&z.__self&&j.current.stateNode!==z.__self){var ce=Se(j.current.type);Ke[ce]||(te('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',ce,z.ref),Ke[ce]=!0)}}var Me=function(z,ce,Y,de,ye,Le,Te){var Xe={$$typeof:v,type:z,key:ce,ref:Y,props:Te,_owner:Le};return Xe._store={},Object.defineProperty(Xe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Xe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.defineProperty(Xe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ye}),Object.freeze&&(Object.freeze(Xe.props),Object.freeze(Xe)),Xe};function He(z,ce,Y){var de,ye={},Le=null,Te=null,Xe=null,at=null;if(ce!=null){ge(ce)&&(Te=ce.ref,be(ce)),Ze(ce)&&(J(ce.key),Le=""+ce.key),Xe=ce.__self===void 0?null:ce.__self,at=ce.__source===void 0?null:ce.__source;for(de in ce)Re.call(ce,de)&&!We.hasOwnProperty(de)&&(ye[de]=ce[de])}var _t=arguments.length-2;if(_t===1)ye.children=Y;else if(_t>1){for(var ct=Array(_t),Zt=0;Zt<_t;Zt++)ct[Zt]=arguments[Zt+2];Object.freeze&&Object.freeze(ct),ye.children=ct}if(z&&z.defaultProps){var kt=z.defaultProps;for(de in kt)ye[de]===void 0&&(ye[de]=kt[de])}if(Le||Te){var Pt=typeof z=="function"?z.displayName||z.name||"Unknown":z;Le&&Ce(ye,Pt),Te&&Ve(ye,Pt)}return Me(z,Le,Te,Xe,at,j.current,ye)}function Ct(z,ce){var Y=Me(z.type,ce,z.ref,z._self,z._source,z._owner,z.props);return Y}function Lt(z,ce,Y){if(z==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var de,ye=K({},z.props),Le=z.key,Te=z.ref,Xe=z._self,at=z._source,_t=z._owner;if(ce!=null){ge(ce)&&(Te=ce.ref,_t=j.current),Ze(ce)&&(J(ce.key),Le=""+ce.key);var ct;z.type&&z.type.defaultProps&&(ct=z.type.defaultProps);for(de in ce)Re.call(ce,de)&&!We.hasOwnProperty(de)&&(ce[de]===void 0&&ct!==void 0?ye[de]=ct[de]:ye[de]=ce[de])}var Zt=arguments.length-2;if(Zt===1)ye.children=Y;else if(Zt>1){for(var kt=Array(Zt),Pt=0;Pt<Zt;Pt++)kt[Pt]=arguments[Pt+2];ye.children=kt}return Me(z.type,Le,Te,Xe,at,_t,ye)}function Ut(z){return typeof z=="object"&&z!==null&&z.$$typeof===v}var Vt=".",dn=":";function Jt(z){var ce=/[=:]/g,Y={"=":"=0",":":"=2"},de=z.replace(ce,function(ye){return Y[ye]});return"$"+de}var Bt=!1,zt=/\/+/g;function an(z){return z.replace(zt,"$&/")}function jn(z,ce){return typeof z=="object"&&z!==null&&z.key!=null?(J(z.key),Jt(""+z.key)):ce.toString(36)}function it(z,ce,Y,de,ye){var Le=typeof z;(Le==="undefined"||Le==="boolean")&&(z=null);var Te=!1;if(z===null)Te=!0;else switch(Le){case"string":case"number":Te=!0;break;case"object":switch(z.$$typeof){case v:case C:Te=!0}}if(Te){var Xe=z,at=ye(Xe),_t=de===""?Vt+jn(Xe,0):de;if(nt(at)){var ct="";_t!=null&&(ct=an(_t)+"/"),it(at,ce,ct,"",function(Po){return Po})}else at!=null&&(Ut(at)&&(at.key&&(!Xe||Xe.key!==at.key)&&J(at.key),at=Ct(at,Y+(at.key&&(!Xe||Xe.key!==at.key)?an(""+at.key)+"/":"")+_t)),ce.push(at));return 1}var Zt,kt,Pt=0,yn=de===""?Vt:de+dn;if(nt(z))for(var Li=0;Li<z.length;Li++)Zt=z[Li],kt=yn+jn(Zt,Li),Pt+=it(Zt,ce,Y,kt,ye);else{var Er=f(z);if(typeof Er=="function"){var gr=z;Er===gr.entries&&(Bt||ee("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Bt=!0);for(var os=Er.call(gr),Gi,fa=0;!(Gi=os.next()).done;)Zt=Gi.value,kt=yn+jn(Zt,fa++),Pt+=it(Zt,ce,Y,kt,ye)}else if(Le==="object"){var $a=String(z);throw new Error("Objects are not valid as a React child (found: "+($a==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":$a)+"). If you meant to render a collection of children, use an array instead.")}}return Pt}function vn(z,ce,Y){if(z==null)return z;var de=[],ye=0;return it(z,de,"","",function(Le){return ce.call(Y,Le,ye++)}),de}function zn(z){var ce=0;return vn(z,function(){ce++}),ce}function $n(z,ce,Y){vn(z,function(){ce.apply(this,arguments)},Y)}function tn(z){return vn(z,function(ce){return ce})||[]}function kn(z){if(!Ut(z))throw new Error("React.Children.only expected to receive a single React element child.");return z}function Un(z){var ce={$$typeof:g,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};ce.Provider={$$typeof:d,_context:ce};var Y=!1,de=!1,ye=!1;{var Le={$$typeof:g,_context:ce};Object.defineProperties(Le,{Provider:{get:function(){return de||(de=!0,te("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),ce.Provider},set:function(Te){ce.Provider=Te}},_currentValue:{get:function(){return ce._currentValue},set:function(Te){ce._currentValue=Te}},_currentValue2:{get:function(){return ce._currentValue2},set:function(Te){ce._currentValue2=Te}},_threadCount:{get:function(){return ce._threadCount},set:function(Te){ce._threadCount=Te}},Consumer:{get:function(){return Y||(Y=!0,te("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),ce.Consumer}},displayName:{get:function(){return ce.displayName},set:function(Te){ye||(ee("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",Te),ye=!0)}}}),ce.Consumer=Le}return ce._currentRenderer=null,ce._currentRenderer2=null,ce}var Qn=-1,on=0,Nn=1,On=2;function mi(z){if(z._status===Qn){var ce=z._result,Y=ce();if(Y.then(function(Le){if(z._status===on||z._status===Qn){var Te=z;Te._status=Nn,Te._result=Le}},function(Le){if(z._status===on||z._status===Qn){var Te=z;Te._status=On,Te._result=Le}}),z._status===Qn){var de=z;de._status=on,de._result=Y}}if(z._status===Nn){var ye=z._result;return ye===void 0&&te(`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?`,ye),"default"in ye||te(`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'))`,ye),ye.default}else throw z._result}function le(z){var ce={_status:Qn,_result:z},Y={$$typeof:E,_payload:ce,_init:mi};{var de,ye;Object.defineProperties(Y,{defaultProps:{configurable:!0,get:function(){return de},set:function(Le){te("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."),de=Le,Object.defineProperty(Y,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return ye},set:function(Le){te("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."),ye=Le,Object.defineProperty(Y,"propTypes",{enumerable:!0})}}})}return Y}function ze(z){z!=null&&z.$$typeof===N?te("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof z!="function"?te("forwardRef requires a render function but was given %s.",z===null?"null":typeof z):z.length!==0&&z.length!==2&&te("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)&&te("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var ce={$$typeof:x,render:z};{var Y;Object.defineProperty(ce,"displayName",{enumerable:!1,configurable:!0,get:function(){return Y},set:function(de){Y=de,!z.name&&!z.displayName&&(z.displayName=de)}})}return ce}var tt;tt=Symbol.for("react.module.reference");function bt(z){return!!(typeof z=="string"||typeof z=="function"||z===R||z===a||G||z===y||z===h||z===_||B||z===b||O||F||P||typeof z=="object"&&z!==null&&(z.$$typeof===E||z.$$typeof===N||z.$$typeof===d||z.$$typeof===g||z.$$typeof===x||z.$$typeof===tt||z.getModuleId!==void 0))}function xt(z,ce){bt(z)||te("memo: The first argument must be a component. Instead received: %s",z===null?"null":typeof z);var Y={$$typeof:N,type:z,compare:ce===void 0?null:ce};{var de;Object.defineProperty(Y,"displayName",{enumerable:!1,configurable:!0,get:function(){return de},set:function(ye){de=ye,!z.name&&!z.displayName&&(z.displayName=ye)}})}return Y}function mt(){var z=p.current;return z===null&&te(`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 jt(z){var ce=mt();if(z._context!==void 0){var Y=z._context;Y.Consumer===z?te("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?"):Y.Provider===z&&te("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return ce.useContext(z)}function gt(z){var ce=mt();return ce.useState(z)}function _n(z,ce,Y){var de=mt();return de.useReducer(z,ce,Y)}function rn(z){var ce=mt();return ce.useRef(z)}function qt(z,ce){var Y=mt();return Y.useEffect(z,ce)}function gn(z,ce){var Y=mt();return Y.useInsertionEffect(z,ce)}function bn(z,ce){var Y=mt();return Y.useLayoutEffect(z,ce)}function li(z,ce){var Y=mt();return Y.useCallback(z,ce)}function Pn(z,ce){var Y=mt();return Y.useMemo(z,ce)}function ci(z,ce,Y){var de=mt();return de.useImperativeHandle(z,ce,Y)}function ri(z,ce){{var Y=mt();return Y.useDebugValue(z,ce)}}function Ft(){var z=mt();return z.useTransition()}function oe(z){var ce=mt();return ce.useDeferredValue(z)}function qe(){var z=mt();return z.useId()}function ke(z,ce,Y){var de=mt();return de.useSyncExternalStore(z,ce,Y)}var Q=0,Ee,Ye,Ot,lt,pt,wt,Tt;function hn(){}hn.__reactDisabledLog=!0;function Dn(){{if(Q===0){Ee=console.log,Ye=console.info,Ot=console.warn,lt=console.error,pt=console.group,wt=console.groupCollapsed,Tt=console.groupEnd;var z={configurable:!0,enumerable:!0,value:hn,writable:!0};Object.defineProperties(console,{info:z,log:z,warn:z,error:z,group:z,groupCollapsed:z,groupEnd:z})}Q++}}function Xt(){{if(Q--,Q===0){var z={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},z,{value:Ee}),info:K({},z,{value:Ye}),warn:K({},z,{value:Ot}),error:K({},z,{value:lt}),group:K({},z,{value:pt}),groupCollapsed:K({},z,{value:wt}),groupEnd:K({},z,{value:Tt})})}Q<0&&te("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Vn=ne.ReactCurrentDispatcher,Xn;function Ri(z,ce,Y){{if(Xn===void 0)try{throw Error()}catch(ye){var de=ye.stack.trim().match(/\n( *(at )?)/);Xn=de&&de[1]||""}return`
|
|
22
|
+
`+Xn+z}}var tr=!1,Vr;{var fr=typeof WeakMap=="function"?WeakMap:Map;Vr=new fr}function Qr(z,ce){if(!z||tr)return"";{var Y=Vr.get(z);if(Y!==void 0)return Y}var de;tr=!0;var ye=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Le;Le=Vn.current,Vn.current=null,Dn();try{if(ce){var Te=function(){throw Error()};if(Object.defineProperty(Te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Te,[])}catch(yn){de=yn}Reflect.construct(z,[],Te)}else{try{Te.call()}catch(yn){de=yn}z.call(Te.prototype)}}else{try{throw Error()}catch(yn){de=yn}z()}}catch(yn){if(yn&&de&&typeof yn.stack=="string"){for(var Xe=yn.stack.split(`
|
|
23
|
+
`),at=de.stack.split(`
|
|
24
|
+
`),_t=Xe.length-1,ct=at.length-1;_t>=1&&ct>=0&&Xe[_t]!==at[ct];)ct--;for(;_t>=1&&ct>=0;_t--,ct--)if(Xe[_t]!==at[ct]){if(_t!==1||ct!==1)do if(_t--,ct--,ct<0||Xe[_t]!==at[ct]){var Zt=`
|
|
25
|
+
`+Xe[_t].replace(" at new "," at ");return z.displayName&&Zt.includes("<anonymous>")&&(Zt=Zt.replace("<anonymous>",z.displayName)),typeof z=="function"&&Vr.set(z,Zt),Zt}while(_t>=1&&ct>=0);break}}}finally{tr=!1,Vn.current=Le,Xt(),Error.prepareStackTrace=ye}var kt=z?z.displayName||z.name:"",Pt=kt?Ri(kt):"";return typeof z=="function"&&Vr.set(z,Pt),Pt}function Nr(z,ce,Y){return Qr(z,!1)}function pr(z){var ce=z.prototype;return!!(ce&&ce.isReactComponent)}function vr(z,ce,Y){if(z==null)return"";if(typeof z=="function")return Qr(z,pr(z));if(typeof z=="string")return Ri(z);switch(z){case h:return Ri("Suspense");case _:return Ri("SuspenseList")}if(typeof z=="object")switch(z.$$typeof){case x:return Nr(z.render);case N:return vr(z.type,ce,Y);case E:{var de=z,ye=de._payload,Le=de._init;try{return vr(Le(ye),ce,Y)}catch{}}}return""}var Hs={},Ir=ne.ReactDebugCurrentFrame;function cn(z){if(z){var ce=z._owner,Y=vr(z.type,z._source,ce?ce.type:null);Ir.setExtraStackFrame(Y)}else Ir.setExtraStackFrame(null)}function es(z,ce,Y,de,ye){{var Le=Function.call.bind(Re);for(var Te in z)if(Le(z,Te)){var Xe=void 0;try{if(typeof z[Te]!="function"){var at=Error((de||"React class")+": "+Y+" type `"+Te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof z[Te]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw at.name="Invariant Violation",at}Xe=z[Te](ce,Te,de,Y,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_t){Xe=_t}Xe&&!(Xe instanceof Error)&&(cn(ye),te("%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).",de||"React class",Y,Te,typeof Xe),cn(null)),Xe instanceof Error&&!(Xe.message in Hs)&&(Hs[Xe.message]=!0,cn(ye),te("Failed %s type: %s",Y,Xe.message),cn(null))}}}function nr(z){if(z){var ce=z._owner,Y=vr(z.type,z._source,ce?ce.type:null);L(Y)}else L(null)}var St;St=!1;function Br(){if(j.current){var z=Se(j.current.type);if(z)return`
|
|
26
|
+
|
|
27
|
+
Check the render method of \``+z+"`."}return""}function si(z){if(z!==void 0){var ce=z.fileName.replace(/^.*[\\\/]/,""),Y=z.lineNumber;return`
|
|
28
|
+
|
|
29
|
+
Check your code at `+ce+":"+Y+"."}return""}function Fr(z){return z!=null?si(z.__source):""}var Sr={};function Ti(z){var ce=Br();if(!ce){var Y=typeof z=="string"?z:z.displayName||z.name;Y&&(ce=`
|
|
30
|
+
|
|
31
|
+
Check the top-level render call using <`+Y+">.")}return ce}function qn(z,ce){if(!(!z._store||z._store.validated||z.key!=null)){z._store.validated=!0;var Y=Ti(ce);if(!Sr[Y]){Sr[Y]=!0;var de="";z&&z._owner&&z._owner!==j.current&&(de=" It was passed a child from "+Se(z._owner.type)+"."),nr(z),te('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Y,de),nr(null)}}}function Mn(z,ce){if(typeof z=="object"){if(nt(z))for(var Y=0;Y<z.length;Y++){var de=z[Y];Ut(de)&&qn(de,ce)}else if(Ut(z))z._store&&(z._store.validated=!0);else if(z){var ye=f(z);if(typeof ye=="function"&&ye!==z.entries)for(var Le=ye.call(z),Te;!(Te=Le.next()).done;)Ut(Te.value)&&qn(Te.value,ce)}}}function ai(z){{var ce=z.type;if(ce==null||typeof ce=="string")return;var Y;if(typeof ce=="function")Y=ce.propTypes;else if(typeof ce=="object"&&(ce.$$typeof===x||ce.$$typeof===N))Y=ce.propTypes;else return;if(Y){var de=Se(ce);es(Y,z.props,"prop",de,z)}else if(ce.PropTypes!==void 0&&!St){St=!0;var ye=Se(ce);te("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ye||"Unknown")}typeof ce.getDefaultProps=="function"&&!ce.getDefaultProps.isReactClassApproved&&te("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ei(z){{for(var ce=Object.keys(z.props),Y=0;Y<ce.length;Y++){var de=ce[Y];if(de!=="children"&&de!=="key"){nr(z),te("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",de),nr(null);break}}z.ref!==null&&(nr(z),te("Invalid attribute `ref` supplied to `React.Fragment`."),nr(null))}}function Wn(z,ce,Y){var de=bt(z);if(!de){var ye="";(z===void 0||typeof z=="object"&&z!==null&&Object.keys(z).length===0)&&(ye+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Le=Fr(ce);Le?ye+=Le:ye+=Br();var Te;z===null?Te="null":nt(z)?Te="array":z!==void 0&&z.$$typeof===v?(Te="<"+(Se(z.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):Te=typeof z,te("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Te,ye)}var Xe=He.apply(this,arguments);if(Xe==null)return Xe;if(de)for(var at=2;at<arguments.length;at++)Mn(arguments[at],z);return z===R?ei(Xe):ai(Xe),Xe}var Bn=!1;function ts(z){var ce=Wn.bind(null,z);return ce.type=z,Bn||(Bn=!0,ee("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(ce,"type",{enumerable:!1,get:function(){return ee("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:z}),z}}),ce}function $i(z,ce,Y){for(var de=Lt.apply(this,arguments),ye=2;ye<arguments.length;ye++)Mn(arguments[ye],de.type);return ai(de),de}function zs(z,ce){var Y=S.transition;S.transition={};var de=S.transition;S.transition._updatedFibers=new Set;try{z()}finally{if(S.transition=Y,Y===null&&de._updatedFibers){var ye=de._updatedFibers.size;ye>10&&ee("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),de._updatedFibers.clear()}}}var ws=!1,ns=null;function ma(z){if(ns===null)try{var ce=("require"+Math.random()).slice(0,7),Y=r&&r[ce];ns=Y.call(r,"timers").setImmediate}catch{ns=function(ye){ws===!1&&(ws=!0,typeof MessageChannel>"u"&&te("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 Le=new MessageChannel;Le.port1.onmessage=ye,Le.port2.postMessage(void 0)}}return ns(z)}var fi=0,Wi=!1;function is(z){{var ce=fi;fi++,k.current===null&&(k.current=[]);var Y=k.isBatchingLegacy,de;try{if(k.isBatchingLegacy=!0,de=z(),!Y&&k.didScheduleLegacyUpdate){var ye=k.current;ye!==null&&(k.didScheduleLegacyUpdate=!1,rr(ye))}}catch(kt){throw Cr(ce),kt}finally{k.isBatchingLegacy=Y}if(de!==null&&typeof de=="object"&&typeof de.then=="function"){var Le=de,Te=!1,Xe={then:function(kt,Pt){Te=!0,Le.then(function(yn){Cr(ce),fi===0?ir(yn,kt,Pt):kt(yn)},function(yn){Cr(ce),Pt(yn)})}};return!Wi&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){Te||(Wi=!0,te("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 () => ...);"))}),Xe}else{var at=de;if(Cr(ce),fi===0){var _t=k.current;_t!==null&&(rr(_t),k.current=null);var ct={then:function(kt,Pt){k.current===null?(k.current=[],ir(at,kt,Pt)):kt(at)}};return ct}else{var Zt={then:function(kt,Pt){kt(at)}};return Zt}}}}function Cr(z){z!==fi-1&&te("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),fi=z}function ir(z,ce,Y){{var de=k.current;if(de!==null)try{rr(de),ma(function(){de.length===0?(k.current=null,ce(z)):ir(z,ce,Y)})}catch(ye){Y(ye)}else ce(z)}}var rs=!1;function rr(z){if(!rs){rs=!0;var ce=0;try{for(;ce<z.length;ce++){var Y=z[ce];do Y=Y(!0);while(Y!==null)}z.length=0}catch(de){throw z=z.slice(ce+1),de}finally{rs=!1}}}var Ns=Wn,ss=$i,as=ts,Ci={map:vn,forEach:$n,count:zn,toArray:tn,only:kn};s.Children=Ci,s.Component=he,s.Fragment=R,s.Profiler=a,s.PureComponent=_e,s.StrictMode=y,s.Suspense=h,s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,s.act=is,s.cloneElement=ss,s.createContext=Un,s.createElement=Ns,s.createFactory=as,s.createRef=Ie,s.forwardRef=ze,s.isValidElement=Ut,s.lazy=le,s.memo=xt,s.startTransition=zs,s.unstable_act=is,s.useCallback=li,s.useContext=jt,s.useDebugValue=ri,s.useDeferredValue=oe,s.useEffect=qt,s.useId=qe,s.useImperativeHandle=ci,s.useInsertionEffect=gn,s.useLayoutEffect=bn,s.useMemo=Pn,s.useReducer=_n,s.useRef=rn,s.useState=gt,s.useSyncExternalStore=ke,s.useTransition=Ft,s.version=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(gm,gm.exports);var NA=gm.exports;H1.exports=NA;var M=H1.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 r=M,s=Symbol.for("react.element"),c=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),a=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),E=Symbol.iterator,b="@@iterator";function l(le){if(le===null||typeof le!="object")return null;var ze=E&&le[E]||le[b];return typeof ze=="function"?ze:null}var m=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(le){{for(var ze=arguments.length,tt=new Array(ze>1?ze-1:0),bt=1;bt<ze;bt++)tt[bt-1]=arguments[bt];p("error",le,tt)}}function p(le,ze,tt){{var bt=m.ReactDebugCurrentFrame,xt=bt.getStackAddendum();xt!==""&&(ze+="%s",tt=tt.concat([xt]));var mt=tt.map(function(jt){return String(jt)});mt.unshift("Warning: "+ze),Function.prototype.apply.call(console[le],console,mt)}}var S=!1,k=!1,j=!1,A=!1,D=!1,L;L=Symbol.for("react.module.reference");function O(le){return!!(typeof le=="string"||typeof le=="function"||le===v||le===R||D||le===C||le===g||le===x||A||le===N||S||k||j||typeof le=="object"&&le!==null&&(le.$$typeof===_||le.$$typeof===h||le.$$typeof===y||le.$$typeof===a||le.$$typeof===d||le.$$typeof===L||le.getModuleId!==void 0))}function F(le,ze,tt){var bt=le.displayName;if(bt)return bt;var xt=ze.displayName||ze.name||"";return xt!==""?tt+"("+xt+")":tt}function P(le){return le.displayName||"Context"}function B(le){if(le==null)return null;if(typeof le.tag=="number"&&f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof le=="function")return le.displayName||le.name||null;if(typeof le=="string")return le;switch(le){case v:return"Fragment";case c:return"Portal";case R:return"Profiler";case C:return"StrictMode";case g:return"Suspense";case x:return"SuspenseList"}if(typeof le=="object")switch(le.$$typeof){case a:var ze=le;return P(ze)+".Consumer";case y:var tt=le;return P(tt._context)+".Provider";case d:return F(le,le.render,"ForwardRef");case h:var bt=le.displayName||null;return bt!==null?bt:B(le.type)||"Memo";case _:{var xt=le,mt=xt._payload,jt=xt._init;try{return B(jt(mt))}catch{return null}}}return null}var G=Object.assign,ne=0,ee,te,se,I,W,X,K;function ve(){}ve.__reactDisabledLog=!0;function he(){{if(ne===0){ee=console.log,te=console.info,se=console.warn,I=console.error,W=console.group,X=console.groupCollapsed,K=console.groupEnd;var le={configurable:!0,enumerable:!0,value:ve,writable:!0};Object.defineProperties(console,{info:le,log:le,warn:le,error:le,group:le,groupCollapsed:le,groupEnd:le})}ne++}}function Ae(){{if(ne--,ne===0){var le={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},le,{value:ee}),info:G({},le,{value:te}),warn:G({},le,{value:se}),error:G({},le,{value:I}),group:G({},le,{value:W}),groupCollapsed:G({},le,{value:X}),groupEnd:G({},le,{value:K})})}ne<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var me=m.ReactCurrentDispatcher,ie;function $(le,ze,tt){{if(ie===void 0)try{throw Error()}catch(xt){var bt=xt.stack.trim().match(/\n( *(at )?)/);ie=bt&&bt[1]||""}return`
|
|
40
|
+
`+ie+le}}var _e=!1,ue;{var Ie=typeof WeakMap=="function"?WeakMap:Map;ue=new Ie}function Ue(le,ze){if(!le||_e)return"";{var tt=ue.get(le);if(tt!==void 0)return tt}var bt;_e=!0;var xt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var mt;mt=me.current,me.current=null,he();try{if(ze){var jt=function(){throw Error()};if(Object.defineProperty(jt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(jt,[])}catch(Pn){bt=Pn}Reflect.construct(le,[],jt)}else{try{jt.call()}catch(Pn){bt=Pn}le.call(jt.prototype)}}else{try{throw Error()}catch(Pn){bt=Pn}le()}}catch(Pn){if(Pn&&bt&&typeof Pn.stack=="string"){for(var gt=Pn.stack.split(`
|
|
41
|
+
`),_n=bt.stack.split(`
|
|
42
|
+
`),rn=gt.length-1,qt=_n.length-1;rn>=1&&qt>=0&>[rn]!==_n[qt];)qt--;for(;rn>=1&&qt>=0;rn--,qt--)if(gt[rn]!==_n[qt]){if(rn!==1||qt!==1)do if(rn--,qt--,qt<0||gt[rn]!==_n[qt]){var gn=`
|
|
43
|
+
`+gt[rn].replace(" at new "," at ");return le.displayName&&gn.includes("<anonymous>")&&(gn=gn.replace("<anonymous>",le.displayName)),typeof le=="function"&&ue.set(le,gn),gn}while(rn>=1&&qt>=0);break}}}finally{_e=!1,me.current=mt,Ae(),Error.prepareStackTrace=xt}var bn=le?le.displayName||le.name:"",li=bn?$(bn):"";return typeof le=="function"&&ue.set(le,li),li}function nt(le,ze,tt){return Ue(le,!1)}function et(le){var ze=le.prototype;return!!(ze&&ze.isReactComponent)}function st(le,ze,tt){if(le==null)return"";if(typeof le=="function")return Ue(le,et(le));if(typeof le=="string")return $(le);switch(le){case g:return $("Suspense");case x:return $("SuspenseList")}if(typeof le=="object")switch(le.$$typeof){case d:return nt(le.render);case h:return st(le.type,ze,tt);case _:{var bt=le,xt=bt._payload,mt=bt._init;try{return st(mt(xt),ze,tt)}catch{}}}return""}var Dt=Object.prototype.hasOwnProperty,J={},yt=m.ReactDebugCurrentFrame;function Kt(le){if(le){var ze=le._owner,tt=st(le.type,le._source,ze?ze.type:null);yt.setExtraStackFrame(tt)}else yt.setExtraStackFrame(null)}function Se(le,ze,tt,bt,xt){{var mt=Function.call.bind(Dt);for(var jt in le)if(mt(le,jt)){var gt=void 0;try{if(typeof le[jt]!="function"){var _n=Error((bt||"React class")+": "+tt+" type `"+jt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof le[jt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _n.name="Invariant Violation",_n}gt=le[jt](ze,jt,bt,tt,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(rn){gt=rn}gt&&!(gt instanceof Error)&&(Kt(xt),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).",bt||"React class",tt,jt,typeof gt),Kt(null)),gt instanceof Error&&!(gt.message in J)&&(J[gt.message]=!0,Kt(xt),f("Failed %s type: %s",tt,gt.message),Kt(null))}}}var Re=Array.isArray;function We(le){return Re(le)}function re(le){{var ze=typeof Symbol=="function"&&Symbol.toStringTag,tt=ze&&le[Symbol.toStringTag]||le.constructor.name||"Object";return tt}}function $e(le){try{return Ke(le),!1}catch{return!0}}function Ke(le){return""+le}function ge(le){if($e(le))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",re(le)),Ke(le)}var Ze=m.ReactCurrentOwner,Ce={key:!0,ref:!0,__self:!0,__source:!0},Ve,be,Me;Me={};function He(le){if(Dt.call(le,"ref")){var ze=Object.getOwnPropertyDescriptor(le,"ref").get;if(ze&&ze.isReactWarning)return!1}return le.ref!==void 0}function Ct(le){if(Dt.call(le,"key")){var ze=Object.getOwnPropertyDescriptor(le,"key").get;if(ze&&ze.isReactWarning)return!1}return le.key!==void 0}function Lt(le,ze){if(typeof le.ref=="string"&&Ze.current&&ze&&Ze.current.stateNode!==ze){var tt=B(Ze.current.type);Me[tt]||(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',B(Ze.current.type),le.ref),Me[tt]=!0)}}function Ut(le,ze){{var tt=function(){Ve||(Ve=!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)",ze))};tt.isReactWarning=!0,Object.defineProperty(le,"key",{get:tt,configurable:!0})}}function Vt(le,ze){{var tt=function(){be||(be=!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)",ze))};tt.isReactWarning=!0,Object.defineProperty(le,"ref",{get:tt,configurable:!0})}}var dn=function(le,ze,tt,bt,xt,mt,jt){var gt={$$typeof:s,type:le,key:ze,ref:tt,props:jt,_owner:mt};return gt._store={},Object.defineProperty(gt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(gt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:bt}),Object.defineProperty(gt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xt}),Object.freeze&&(Object.freeze(gt.props),Object.freeze(gt)),gt};function Jt(le,ze,tt,bt,xt){{var mt,jt={},gt=null,_n=null;tt!==void 0&&(ge(tt),gt=""+tt),Ct(ze)&&(ge(ze.key),gt=""+ze.key),He(ze)&&(_n=ze.ref,Lt(ze,xt));for(mt in ze)Dt.call(ze,mt)&&!Ce.hasOwnProperty(mt)&&(jt[mt]=ze[mt]);if(le&&le.defaultProps){var rn=le.defaultProps;for(mt in rn)jt[mt]===void 0&&(jt[mt]=rn[mt])}if(gt||_n){var qt=typeof le=="function"?le.displayName||le.name||"Unknown":le;gt&&Ut(jt,qt),_n&&Vt(jt,qt)}return dn(le,gt,_n,xt,bt,Ze.current,jt)}}var Bt=m.ReactCurrentOwner,zt=m.ReactDebugCurrentFrame;function an(le){if(le){var ze=le._owner,tt=st(le.type,le._source,ze?ze.type:null);zt.setExtraStackFrame(tt)}else zt.setExtraStackFrame(null)}var jn;jn=!1;function it(le){return typeof le=="object"&&le!==null&&le.$$typeof===s}function vn(){{if(Bt.current){var le=B(Bt.current.type);if(le)return`
|
|
44
|
+
|
|
45
|
+
Check the render method of \``+le+"`."}return""}}function zn(le){{if(le!==void 0){var ze=le.fileName.replace(/^.*[\\\/]/,""),tt=le.lineNumber;return`
|
|
46
|
+
|
|
47
|
+
Check your code at `+ze+":"+tt+"."}return""}}var $n={};function tn(le){{var ze=vn();if(!ze){var tt=typeof le=="string"?le:le.displayName||le.name;tt&&(ze=`
|
|
48
|
+
|
|
49
|
+
Check the top-level render call using <`+tt+">.")}return ze}}function kn(le,ze){{if(!le._store||le._store.validated||le.key!=null)return;le._store.validated=!0;var tt=tn(ze);if($n[tt])return;$n[tt]=!0;var bt="";le&&le._owner&&le._owner!==Bt.current&&(bt=" It was passed a child from "+B(le._owner.type)+"."),an(le),f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',tt,bt),an(null)}}function Un(le,ze){{if(typeof le!="object")return;if(We(le))for(var tt=0;tt<le.length;tt++){var bt=le[tt];it(bt)&&kn(bt,ze)}else if(it(le))le._store&&(le._store.validated=!0);else if(le){var xt=l(le);if(typeof xt=="function"&&xt!==le.entries)for(var mt=xt.call(le),jt;!(jt=mt.next()).done;)it(jt.value)&&kn(jt.value,ze)}}}function Qn(le){{var ze=le.type;if(ze==null||typeof ze=="string")return;var tt;if(typeof ze=="function")tt=ze.propTypes;else if(typeof ze=="object"&&(ze.$$typeof===d||ze.$$typeof===h))tt=ze.propTypes;else return;if(tt){var bt=B(ze);Se(tt,le.props,"prop",bt,le)}else if(ze.PropTypes!==void 0&&!jn){jn=!0;var xt=B(ze);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xt||"Unknown")}typeof ze.getDefaultProps=="function"&&!ze.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function on(le){{for(var ze=Object.keys(le.props),tt=0;tt<ze.length;tt++){var bt=ze[tt];if(bt!=="children"&&bt!=="key"){an(le),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",bt),an(null);break}}le.ref!==null&&(an(le),f("Invalid attribute `ref` supplied to `React.Fragment`."),an(null))}}var Nn={};function On(le,ze,tt,bt,xt,mt){{var jt=O(le);if(!jt){var gt="";(le===void 0||typeof le=="object"&&le!==null&&Object.keys(le).length===0)&&(gt+=" 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 _n=zn(xt);_n?gt+=_n:gt+=vn();var rn;le===null?rn="null":We(le)?rn="array":le!==void 0&&le.$$typeof===s?(rn="<"+(B(le.type)||"Unknown")+" />",gt=" Did you accidentally export a JSX literal instead of a component?"):rn=typeof le,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",rn,gt)}var qt=Jt(le,ze,tt,xt,mt);if(qt==null)return qt;if(jt){var gn=ze.children;if(gn!==void 0)if(bt)if(We(gn)){for(var bn=0;bn<gn.length;bn++)Un(gn[bn],le);Object.freeze&&Object.freeze(gn)}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 Un(gn,le)}if(Dt.call(ze,"key")){var li=B(le),Pn=Object.keys(ze).filter(function(Ft){return Ft!=="key"}),ci=Pn.length>0?"{key: someKey, "+Pn.join(": ..., ")+": ...}":"{key: someKey}";if(!Nn[li+ci]){var ri=Pn.length>0?"{"+Pn.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} />`,ci,li,ri,li),Nn[li+ci]=!0}}return le===v?on(qt):Qn(qt),qt}}var mi=On;t_.Fragment=v,t_.jsxDEV=mi})();F1.exports=t_;var o=F1.exports,z1={exports:{}},Ur={},$1={exports:{}},W1={};(function(r){/**
|
|
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 s=!1,c=5;function v(be,Me){var He=be.length;be.push(Me),y(be,Me,He)}function C(be){return be.length===0?null:be[0]}function R(be){if(be.length===0)return null;var Me=be[0],He=be.pop();return He!==Me&&(be[0]=He,a(be,He,0)),Me}function y(be,Me,He){for(var Ct=He;Ct>0;){var Lt=Ct-1>>>1,Ut=be[Lt];if(d(Ut,Me)>0)be[Lt]=Me,be[Ct]=Ut,Ct=Lt;else return}}function a(be,Me,He){for(var Ct=He,Lt=be.length,Ut=Lt>>>1;Ct<Ut;){var Vt=(Ct+1)*2-1,dn=be[Vt],Jt=Vt+1,Bt=be[Jt];if(d(dn,Me)<0)Jt<Lt&&d(Bt,dn)<0?(be[Ct]=Bt,be[Jt]=Me,Ct=Jt):(be[Ct]=dn,be[Vt]=Me,Ct=Vt);else if(Jt<Lt&&d(Bt,Me)<0)be[Ct]=Bt,be[Jt]=Me,Ct=Jt;else return}}function d(be,Me){var He=be.sortIndex-Me.sortIndex;return He!==0?He:be.id-Me.id}var g=1,x=2,h=3,_=4,N=5;function E(be,Me){}var b=typeof performance=="object"&&typeof performance.now=="function";if(b){var l=performance;r.unstable_now=function(){return l.now()}}else{var m=Date,f=m.now();r.unstable_now=function(){return m.now()-f}}var p=1073741823,S=-1,k=250,j=5e3,A=1e4,D=p,L=[],O=[],F=1,P=null,B=h,G=!1,ne=!1,ee=!1,te=typeof setTimeout=="function"?setTimeout:null,se=typeof clearTimeout=="function"?clearTimeout:null,I=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(be){for(var Me=C(O);Me!==null;){if(Me.callback===null)R(O);else if(Me.startTime<=be)R(O),Me.sortIndex=Me.expirationTime,v(L,Me);else return;Me=C(O)}}function X(be){if(ee=!1,W(be),!ne)if(C(L)!==null)ne=!0,Ke(K);else{var Me=C(O);Me!==null&&ge(X,Me.startTime-be)}}function K(be,Me){ne=!1,ee&&(ee=!1,Ze()),G=!0;var He=B;try{var Ct;if(!s)return ve(be,Me)}finally{P=null,B=He,G=!1}}function ve(be,Me){var He=Me;for(W(He),P=C(L);P!==null&&!(P.expirationTime>He&&(!be||yt()));){var Ct=P.callback;if(typeof Ct=="function"){P.callback=null,B=P.priorityLevel;var Lt=P.expirationTime<=He,Ut=Ct(Lt);He=r.unstable_now(),typeof Ut=="function"?P.callback=Ut:P===C(L)&&R(L),W(He)}else R(L);P=C(L)}if(P!==null)return!0;var Vt=C(O);return Vt!==null&&ge(X,Vt.startTime-He),!1}function he(be,Me){switch(be){case g:case x:case h:case _:case N:break;default:be=h}var He=B;B=be;try{return Me()}finally{B=He}}function Ae(be){var Me;switch(B){case g:case x:case h:Me=h;break;default:Me=B;break}var He=B;B=Me;try{return be()}finally{B=He}}function me(be){var Me=B;return function(){var He=B;B=Me;try{return be.apply(this,arguments)}finally{B=He}}}function ie(be,Me,He){var Ct=r.unstable_now(),Lt;if(typeof He=="object"&&He!==null){var Ut=He.delay;typeof Ut=="number"&&Ut>0?Lt=Ct+Ut:Lt=Ct}else Lt=Ct;var Vt;switch(be){case g:Vt=S;break;case x:Vt=k;break;case N:Vt=D;break;case _:Vt=A;break;case h:default:Vt=j;break}var dn=Lt+Vt,Jt={id:F++,callback:Me,priorityLevel:be,startTime:Lt,expirationTime:dn,sortIndex:-1};return Lt>Ct?(Jt.sortIndex=Lt,v(O,Jt),C(L)===null&&Jt===C(O)&&(ee?Ze():ee=!0,ge(X,Lt-Ct))):(Jt.sortIndex=dn,v(L,Jt),!ne&&!G&&(ne=!0,Ke(K))),Jt}function $(){}function _e(){!ne&&!G&&(ne=!0,Ke(K))}function ue(){return C(L)}function Ie(be){be.callback=null}function Ue(){return B}var nt=!1,et=null,st=-1,Dt=c,J=-1;function yt(){var be=r.unstable_now()-J;return!(be<Dt)}function Kt(){}function Se(be){if(be<0||be>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}be>0?Dt=Math.floor(1e3/be):Dt=c}var Re=function(){if(et!==null){var be=r.unstable_now();J=be;var Me=!0,He=!0;try{He=et(Me,be)}finally{He?We():(nt=!1,et=null)}}else nt=!1},We;if(typeof I=="function")We=function(){I(Re)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,$e=re.port2;re.port1.onmessage=Re,We=function(){$e.postMessage(null)}}else We=function(){te(Re,0)};function Ke(be){et=be,nt||(nt=!0,We())}function ge(be,Me){st=te(function(){be(r.unstable_now())},Me)}function Ze(){se(st),st=-1}var Ce=Kt,Ve=null;r.unstable_IdlePriority=N,r.unstable_ImmediatePriority=g,r.unstable_LowPriority=_,r.unstable_NormalPriority=h,r.unstable_Profiling=Ve,r.unstable_UserBlockingPriority=x,r.unstable_cancelCallback=Ie,r.unstable_continueExecution=_e,r.unstable_forceFrameRate=Se,r.unstable_getCurrentPriorityLevel=Ue,r.unstable_getFirstCallbackNode=ue,r.unstable_next=Ae,r.unstable_pauseExecution=$,r.unstable_requestPaint=Ce,r.unstable_runWithPriority=he,r.unstable_scheduleCallback=ie,r.unstable_shouldYield=yt,r.unstable_wrapCallback=me,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(W1);$1.exports=W1;var SA=$1.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 r=M,s=SA,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,v=!1;function C(e){v=e}function R(e){if(!v){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];a("warn",e,n)}}function y(e){if(!v){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];a("error",e,n)}}function a(e,t,n){{var i=c.ReactDebugCurrentFrame,u=i.getStackAddendum();u!==""&&(t+="%s",n=n.concat([u]));var w=n.map(function(T){return String(T)});w.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,w)}}var d=0,g=1,x=2,h=3,_=4,N=5,E=6,b=7,l=8,m=9,f=10,p=11,S=12,k=13,j=14,A=15,D=16,L=17,O=18,F=19,P=21,B=22,G=23,ne=24,ee=25,te=!0,se=!1,I=!1,W=!1,X=!1,K=!0,ve=!0,he=!0,Ae=!0,me=new Set,ie={},$={};function _e(e,t){ue(e,t),ue(e+"Capture",t)}function ue(e,t){ie[e]&&y("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),ie[e]=t;{var n=e.toLowerCase();$[n]=e,e==="onDoubleClick"&&($.ondblclick=e)}for(var i=0;i<t.length;i++)me.add(t[i])}var Ie=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ue=Object.prototype.hasOwnProperty;function nt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,n=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function et(e){try{return st(e),!1}catch{return!0}}function st(e){return""+e}function Dt(e,t){if(et(e))return y("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",t,nt(e)),st(e)}function J(e){if(et(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",nt(e)),st(e)}function yt(e,t){if(et(e))return y("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",t,nt(e)),st(e)}function Kt(e,t){if(et(e))return y("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",t,nt(e)),st(e)}function Se(e){if(et(e))return y("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",nt(e)),st(e)}function Re(e){if(et(e))return y("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.",nt(e)),st(e)}var We=0,re=1,$e=2,Ke=3,ge=4,Ze=5,Ce=6,Ve=":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",be=Ve+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Me=new RegExp("^["+Ve+"]["+be+"]*$"),He={},Ct={};function Lt(e){return Ue.call(Ct,e)?!0:Ue.call(He,e)?!1:Me.test(e)?(Ct[e]=!0,!0):(He[e]=!0,y("Invalid attribute name: `%s`",e),!1)}function Ut(e,t,n){return t!==null?t.type===We:n?!1:e.length>2&&(e[0]==="o"||e[0]==="O")&&(e[1]==="n"||e[1]==="N")}function Vt(e,t,n,i){if(n!==null&&n.type===We)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":{if(i)return!1;if(n!==null)return!n.acceptsBooleans;var u=e.toLowerCase().slice(0,5);return u!=="data-"&&u!=="aria-"}default:return!1}}function dn(e,t,n,i){if(t===null||typeof t>"u"||Vt(e,t,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case Ke:return!t;case ge:return t===!1;case Ze:return isNaN(t);case Ce:return isNaN(t)||t<1}return!1}function Jt(e){return zt.hasOwnProperty(e)?zt[e]:null}function Bt(e,t,n,i,u,w,T){this.acceptsBooleans=t===$e||t===Ke||t===ge,this.attributeName=i,this.attributeNamespace=u,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=w,this.removeEmptyString=T}var zt={},an=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];an.forEach(function(e){zt[e]=new Bt(e,We,!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];zt[t]=new Bt(t,re,!1,n,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){zt[e]=new Bt(e,$e,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){zt[e]=new Bt(e,$e,!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){zt[e]=new Bt(e,Ke,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){zt[e]=new Bt(e,Ke,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){zt[e]=new Bt(e,ge,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){zt[e]=new Bt(e,Ce,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){zt[e]=new Bt(e,Ze,!1,e.toLowerCase(),null,!1,!1)});var jn=/[\-\:]([a-z])/g,it=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(jn,it);zt[t]=new Bt(t,re,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(jn,it);zt[t]=new Bt(t,re,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(jn,it);zt[t]=new Bt(t,re,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){zt[e]=new Bt(e,re,!1,e.toLowerCase(),null,!1,!1)});var vn="xlinkHref";zt[vn]=new Bt("xlinkHref",re,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){zt[e]=new Bt(e,re,!1,e.toLowerCase(),null,!0,!0)});var zn=/^[\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,$n=!1;function tn(e){!$n&&zn.test(e)&&($n=!0,y("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 kn(e,t,n,i){if(i.mustUseProperty){var u=i.propertyName;return e[u]}else{Dt(n,t),i.sanitizeURL&&tn(""+n);var w=i.attributeName,T=null;if(i.type===ge){if(e.hasAttribute(w)){var V=e.getAttribute(w);return V===""?!0:dn(t,n,i,!1)?V:V===""+n?n:V}}else if(e.hasAttribute(w)){if(dn(t,n,i,!1))return e.getAttribute(w);if(i.type===Ke)return n;T=e.getAttribute(w)}return dn(t,n,i,!1)?T===null?n:T:T===""+n?n:T}}function Un(e,t,n,i){{if(!Lt(t))return;if(!e.hasAttribute(t))return n===void 0?void 0:null;var u=e.getAttribute(t);return Dt(n,t),u===""+n?n:u}}function Qn(e,t,n,i){var u=Jt(t);if(!Ut(t,u,i)){if(dn(t,n,u,i)&&(n=null),i||u===null){if(Lt(t)){var w=t;n===null?e.removeAttribute(w):(Dt(n,t),e.setAttribute(w,""+n))}return}var T=u.mustUseProperty;if(T){var V=u.propertyName;if(n===null){var H=u.type;e[V]=H===Ke?!1:""}else e[V]=n;return}var q=u.attributeName,Z=u.attributeNamespace;if(n===null)e.removeAttribute(q);else{var pe=u.type,fe;pe===Ke||pe===ge&&n===!0?fe="":(Dt(n,q),fe=""+n,u.sanitizeURL&&tn(fe.toString())),Z?e.setAttributeNS(Z,q,fe):e.setAttribute(q,fe)}}}var on=Symbol.for("react.element"),Nn=Symbol.for("react.portal"),On=Symbol.for("react.fragment"),mi=Symbol.for("react.strict_mode"),le=Symbol.for("react.profiler"),ze=Symbol.for("react.provider"),tt=Symbol.for("react.context"),bt=Symbol.for("react.forward_ref"),xt=Symbol.for("react.suspense"),mt=Symbol.for("react.suspense_list"),jt=Symbol.for("react.memo"),gt=Symbol.for("react.lazy"),_n=Symbol.for("react.scope"),rn=Symbol.for("react.debug_trace_mode"),qt=Symbol.for("react.offscreen"),gn=Symbol.for("react.legacy_hidden"),bn=Symbol.for("react.cache"),li=Symbol.for("react.tracing_marker"),Pn=Symbol.iterator,ci="@@iterator";function ri(e){if(e===null||typeof e!="object")return null;var t=Pn&&e[Pn]||e[ci];return typeof t=="function"?t:null}var Ft=Object.assign,oe=0,qe,ke,Q,Ee,Ye,Ot,lt;function pt(){}pt.__reactDisabledLog=!0;function wt(){{if(oe===0){qe=console.log,ke=console.info,Q=console.warn,Ee=console.error,Ye=console.group,Ot=console.groupCollapsed,lt=console.groupEnd;var e={configurable:!0,enumerable:!0,value:pt,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}oe++}}function Tt(){{if(oe--,oe===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ft({},e,{value:qe}),info:Ft({},e,{value:ke}),warn:Ft({},e,{value:Q}),error:Ft({},e,{value:Ee}),group:Ft({},e,{value:Ye}),groupCollapsed:Ft({},e,{value:Ot}),groupEnd:Ft({},e,{value:lt})})}oe<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var hn=c.ReactCurrentDispatcher,Dn;function Xt(e,t,n){{if(Dn===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);Dn=i&&i[1]||""}return`
|
|
71
|
+
`+Dn+e}}var Vn=!1,Xn;{var Ri=typeof WeakMap=="function"?WeakMap:Map;Xn=new Ri}function tr(e,t){if(!e||Vn)return"";{var n=Xn.get(e);if(n!==void 0)return n}var i;Vn=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var w;w=hn.current,hn.current=null,wt();try{if(t){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(De){i=De}Reflect.construct(e,[],T)}else{try{T.call()}catch(De){i=De}e.call(T.prototype)}}else{try{throw Error()}catch(De){i=De}e()}}catch(De){if(De&&i&&typeof De.stack=="string"){for(var V=De.stack.split(`
|
|
72
|
+
`),H=i.stack.split(`
|
|
73
|
+
`),q=V.length-1,Z=H.length-1;q>=1&&Z>=0&&V[q]!==H[Z];)Z--;for(;q>=1&&Z>=0;q--,Z--)if(V[q]!==H[Z]){if(q!==1||Z!==1)do if(q--,Z--,Z<0||V[q]!==H[Z]){var pe=`
|
|
74
|
+
`+V[q].replace(" at new "," at ");return e.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",e.displayName)),typeof e=="function"&&Xn.set(e,pe),pe}while(q>=1&&Z>=0);break}}}finally{Vn=!1,hn.current=w,Tt(),Error.prepareStackTrace=u}var fe=e?e.displayName||e.name:"",je=fe?Xt(fe):"";return typeof e=="function"&&Xn.set(e,je),je}function Vr(e,t,n){return tr(e,!0)}function fr(e,t,n){return tr(e,!1)}function Qr(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Nr(e,t,n){if(e==null)return"";if(typeof e=="function")return tr(e,Qr(e));if(typeof e=="string")return Xt(e);switch(e){case xt:return Xt("Suspense");case mt:return Xt("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case bt:return fr(e.render);case jt:return Nr(e.type,t,n);case gt:{var i=e,u=i._payload,w=i._init;try{return Nr(w(u),t,n)}catch{}}}return""}function pr(e){switch(e._debugOwner&&e._debugOwner.type,e._debugSource,e.tag){case N:return Xt(e.type);case D:return Xt("Lazy");case k:return Xt("Suspense");case F:return Xt("SuspenseList");case d:case x:case A:return fr(e.type);case p:return fr(e.type.render);case g:return Vr(e.type);default:return""}}function vr(e){try{var t="",n=e;do t+=pr(n),n=n.return;while(n);return t}catch(i){return`
|
|
75
|
+
Error generating stack: `+i.message+`
|
|
76
|
+
`+i.stack}}function Hs(e,t,n){var i=e.displayName;if(i)return i;var u=t.displayName||t.name||"";return u!==""?n+"("+u+")":n}function Ir(e){return e.displayName||"Context"}function cn(e){if(e==null)return null;if(typeof e.tag=="number"&&y("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 On:return"Fragment";case Nn:return"Portal";case le:return"Profiler";case mi:return"StrictMode";case xt:return"Suspense";case mt:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case tt:var t=e;return Ir(t)+".Consumer";case ze:var n=e;return Ir(n._context)+".Provider";case bt:return Hs(e,e.render,"ForwardRef");case jt:var i=e.displayName||null;return i!==null?i:cn(e.type)||"Memo";case gt:{var u=e,w=u._payload,T=u._init;try{return cn(T(w))}catch{return null}}}return null}function es(e,t,n){var i=t.displayName||t.name||"";return e.displayName||(i!==""?n+"("+i+")":n)}function nr(e){return e.displayName||"Context"}function St(e){var t=e.tag,n=e.type;switch(t){case ne:return"Cache";case m:var i=n;return nr(i)+".Consumer";case f:var u=n;return nr(u._context)+".Provider";case O:return"DehydratedFragment";case p:return es(n,n.render,"ForwardRef");case b:return"Fragment";case N:return n;case _:return"Portal";case h:return"Root";case E:return"Text";case D:return cn(n);case l:return n===mi?"StrictMode":"Mode";case B:return"Offscreen";case S:return"Profiler";case P:return"Scope";case k:return"Suspense";case F:return"SuspenseList";case ee:return"TracingMarker";case g:case d:case L:case x:case j:case A:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;break}return null}var Br=c.ReactDebugCurrentFrame,si=null,Fr=!1;function Sr(){{if(si===null)return null;var e=si._debugOwner;if(e!==null&&typeof e<"u")return St(e)}return null}function Ti(){return si===null?"":vr(si)}function qn(){Br.getCurrentStack=null,si=null,Fr=!1}function Mn(e){Br.getCurrentStack=e===null?null:Ti,si=e,Fr=!1}function ai(){return si}function ei(e){Fr=e}function Wn(e){return""+e}function Bn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return Re(e),e;default:return""}}var ts={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function $i(e,t){ts[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||y("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||y("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 zs(e){var t=e.type,n=e.nodeName;return n&&n.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ws(e){return e._valueTracker}function ns(e){e._valueTracker=null}function ma(e){var t="";return e&&(zs(e)?t=e.checked?"true":"false":t=e.value),t}function fi(e){var t=zs(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);Re(e[t]);var i=""+e[t];if(!(e.hasOwnProperty(t)||typeof n>"u"||typeof n.get!="function"||typeof n.set!="function")){var u=n.get,w=n.set;Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(V){Re(V),i=""+V,w.call(this,V)}}),Object.defineProperty(e,t,{enumerable:n.enumerable});var T={getValue:function(){return i},setValue:function(V){Re(V),i=""+V},stopTracking:function(){ns(e),delete e[t]}};return T}}function Wi(e){ws(e)||(e._valueTracker=fi(e))}function is(e){if(!e)return!1;var t=ws(e);if(!t)return!0;var n=t.getValue(),i=ma(e);return i!==n?(t.setValue(i),!0):!1}function Cr(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 ir=!1,rs=!1,rr=!1,Ns=!1;function ss(e){var t=e.type==="checkbox"||e.type==="radio";return t?e.checked!=null:e.value!=null}function as(e,t){var n=e,i=t.checked,u=Ft({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??n._wrapperState.initialChecked});return u}function Ci(e,t){$i("input",t),t.checked!==void 0&&t.defaultChecked!==void 0&&!rs&&(y("%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",Sr()||"A component",t.type),rs=!0),t.value!==void 0&&t.defaultValue!==void 0&&!ir&&(y("%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",Sr()||"A component",t.type),ir=!0);var n=e,i=t.defaultValue==null?"":t.defaultValue;n._wrapperState={initialChecked:t.checked!=null?t.checked:t.defaultChecked,initialValue:Bn(t.value!=null?t.value:i),controlled:ss(t)}}function z(e,t){var n=e,i=t.checked;i!=null&&Qn(n,"checked",i,!1)}function ce(e,t){var n=e;{var i=ss(t);!n._wrapperState.controlled&&i&&!Ns&&(y("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"),Ns=!0),n._wrapperState.controlled&&!i&&!rr&&(y("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"),rr=!0)}z(e,t);var u=Bn(t.value),w=t.type;if(u!=null)w==="number"?(u===0&&n.value===""||n.value!=u)&&(n.value=Wn(u)):n.value!==Wn(u)&&(n.value=Wn(u));else if(w==="submit"||w==="reset"){n.removeAttribute("value");return}t.hasOwnProperty("value")?Le(n,t.type,u):t.hasOwnProperty("defaultValue")&&Le(n,t.type,Bn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(n.defaultChecked=!!t.defaultChecked)}function Y(e,t,n){var i=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var u=t.type,w=u==="submit"||u==="reset";if(w&&(t.value===void 0||t.value===null))return;var T=Wn(i._wrapperState.initialValue);n||T!==i.value&&(i.value=T),i.defaultValue=T}var V=i.name;V!==""&&(i.name=""),i.defaultChecked=!i.defaultChecked,i.defaultChecked=!!i._wrapperState.initialChecked,V!==""&&(i.name=V)}function de(e,t){var n=e;ce(n,t),ye(n,t)}function ye(e,t){var n=t.name;if(t.type==="radio"&&n!=null){for(var i=e;i.parentNode;)i=i.parentNode;Dt(n,"name");for(var u=i.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),w=0;w<u.length;w++){var T=u[w];if(!(T===e||T.form!==e.form)){var V=$d(T);if(!V)throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");is(T),ce(T,V)}}}}function Le(e,t,n){(t!=="number"||Cr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=Wn(e._wrapperState.initialValue):e.defaultValue!==Wn(n)&&(e.defaultValue=Wn(n)))}var Te=!1,Xe=!1,at=!1;function _t(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?r.Children.forEach(t.children,function(n){n!=null&&(typeof n=="string"||typeof n=="number"||Xe||(Xe=!0,y("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}):t.dangerouslySetInnerHTML!=null&&(at||(at=!0,y("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),t.selected!=null&&!Te&&(y("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),Te=!0)}function ct(e,t){t.value!=null&&e.setAttribute("value",Wn(Bn(t.value)))}var Zt=Array.isArray;function kt(e){return Zt(e)}var Pt;Pt=!1;function yn(){var e=Sr();return e?`
|
|
77
|
+
|
|
78
|
+
Check the render method of \``+e+"`.":""}var Li=["value","defaultValue"];function Er(e){{$i("select",e);for(var t=0;t<Li.length;t++){var n=Li[t];if(e[n]!=null){var i=kt(e[n]);e.multiple&&!i?y("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,yn()):!e.multiple&&i&&y("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,yn())}}}}function gr(e,t,n,i){var u=e.options;if(t){for(var w=n,T={},V=0;V<w.length;V++)T["$"+w[V]]=!0;for(var H=0;H<u.length;H++){var q=T.hasOwnProperty("$"+u[H].value);u[H].selected!==q&&(u[H].selected=q),q&&i&&(u[H].defaultSelected=!0)}}else{for(var Z=Wn(Bn(n)),pe=null,fe=0;fe<u.length;fe++){if(u[fe].value===Z){u[fe].selected=!0,i&&(u[fe].defaultSelected=!0);return}pe===null&&!u[fe].disabled&&(pe=u[fe])}pe!==null&&(pe.selected=!0)}}function os(e,t){return Ft({},t,{value:void 0})}function Gi(e,t){var n=e;Er(t),n._wrapperState={wasMultiple:!!t.multiple},t.value!==void 0&&t.defaultValue!==void 0&&!Pt&&(y("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"),Pt=!0)}function fa(e,t){var n=e;n.multiple=!!t.multiple;var i=t.value;i!=null?gr(n,!!t.multiple,i,!1):t.defaultValue!=null&&gr(n,!!t.multiple,t.defaultValue,!0)}function $a(e,t){var n=e,i=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!t.multiple;var u=t.value;u!=null?gr(n,!!t.multiple,u,!1):i!==!!t.multiple&&(t.defaultValue!=null?gr(n,!!t.multiple,t.defaultValue,!0):gr(n,!!t.multiple,t.multiple?[]:"",!1))}function Po(e,t){var n=e,i=t.value;i!=null&&gr(n,!!t.multiple,i,!1)}var Kl=!1;function Xl(e,t){var n=e;if(t.dangerouslySetInnerHTML!=null)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var i=Ft({},t,{value:void 0,defaultValue:void 0,children:Wn(n._wrapperState.initialValue)});return i}function Zu(e,t){var n=e;$i("textarea",t),t.value!==void 0&&t.defaultValue!==void 0&&!Kl&&(y("%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",Sr()||"A component"),Kl=!0);var i=t.value;if(i==null){var u=t.children,w=t.defaultValue;if(u!=null){y("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(w!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(kt(u)){if(u.length>1)throw new Error("<textarea> can only have at most one child.");u=u[0]}w=u}}w==null&&(w=""),i=w}n._wrapperState={initialValue:Bn(i)}}function Qu(e,t){var n=e,i=Bn(t.value),u=Bn(t.defaultValue);if(i!=null){var w=Wn(i);w!==n.value&&(n.value=w),t.defaultValue==null&&n.defaultValue!==w&&(n.defaultValue=w)}u!=null&&(n.defaultValue=Wn(u))}function Jl(e,t){var n=e,i=n.textContent;i===n._wrapperState.initialValue&&i!==""&&i!==null&&(n.value=i)}function Fm(e,t){Qu(e,t)}var ls="http://www.w3.org/1999/xhtml",Hm="http://www.w3.org/1998/Math/MathML",Vo="http://www.w3.org/2000/svg";function Io(e){switch(e){case"svg":return Vo;case"math":return Hm;default:return ls}}function Bo(e,t){return e==null||e===ls?Io(t):e===Vo&&t==="foreignObject"?ls:e}var ed=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,i,u){MSApp.execUnsafeLocalFunction(function(){return e(t,n,i,u)})}:e},Wa,Zl=ed(function(e,t){if(e.namespaceURI===Vo&&!("innerHTML"in e)){Wa=Wa||document.createElement("div"),Wa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";for(var n=Wa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild);return}e.innerHTML=t}),Ai=1,Hr=3,Jn=8,zr=9,Fo=11,Ga=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===Hr){n.nodeValue=t;return}}e.textContent=t},td={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"]},pa={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 nd(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var id=["Webkit","ms","Moz","O"];Object.keys(pa).forEach(function(e){id.forEach(function(t){pa[nd(t,e)]=pa[e]})});function Ho(e,t,n){var i=t==null||typeof t=="boolean"||t==="";return i?"":!n&&typeof t=="number"&&t!==0&&!(pa.hasOwnProperty(e)&&pa[e])?t+"px":(Kt(t,e),(""+t).trim())}var rd=/([A-Z])/g,sd=/^ms-/;function ad(e){return e.replace(rd,"-$1").toLowerCase().replace(sd,"-ms-")}var Ql=function(){};{var od=/^(?:webkit|moz|o)[A-Z]/,ae=/^-ms-/,xe=/-(.)/g,Fe=/;\s*$/,rt={},Qe={},Et=!1,$t=!1,Qt=function(e){return e.replace(xe,function(t,n){return n.toUpperCase()})},pi=function(e){rt.hasOwnProperty(e)&&rt[e]||(rt[e]=!0,y("Unsupported style property %s. Did you mean %s?",e,Qt(e.replace(ae,"ms-"))))},Fn=function(e){rt.hasOwnProperty(e)&&rt[e]||(rt[e]=!0,y("Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))},va=function(e,t){Qe.hasOwnProperty(t)&&Qe[t]||(Qe[t]=!0,y(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,e,t.replace(Fe,"")))},Ss=function(e,t){Et||(Et=!0,y("`NaN` is an invalid value for the `%s` css style property.",e))},zo=function(e,t){$t||($t=!0,y("`Infinity` is an invalid value for the `%s` css style property.",e))};Ql=function(e,t){e.indexOf("-")>-1?pi(e):od.test(e)?Fn(e):Fe.test(t)&&va(e,t),typeof t=="number"&&(isNaN(t)?Ss(e,t):isFinite(t)||zo(e,t))}}var ec=Ql;function $s(e){{var t="",n="";for(var i in e)if(e.hasOwnProperty(i)){var u=e[i];if(u!=null){var w=i.indexOf("--")===0;t+=n+(w?i:ad(i))+":",t+=Ho(i,u,w),n=";"}}return t||null}}function ob(e,t){var n=e.style;for(var i in t)if(t.hasOwnProperty(i)){var u=i.indexOf("--")===0;u||ec(i,t[i]);var w=Ho(i,t[i],u);i==="float"&&(i="cssFloat"),u?n.setProperty(i,w):n[i]=w}}function jC(e){return e==null||typeof e=="boolean"||e===""}function lb(e){var t={};for(var n in e)for(var i=td[n]||[n],u=0;u<i.length;u++)t[i[u]]=n;return t}function DC(e,t){{if(!t)return;var n=lb(e),i=lb(t),u={};for(var w in n){var T=n[w],V=i[w];if(V&&T!==V){var H=T+","+V;if(u[H])continue;u[H]=!0,y("%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.",jC(e[T])?"Removing":"Updating",T,V)}}}}var kC={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},RC=Ft({menuitem:!0},kC),TC="__html";function zm(e,t){if(t){if(RC[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"||!(TC 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&&y("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 qa(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 ld={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"},cb={"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},$o={},LC=new RegExp("^(aria)-["+be+"]*$"),AC=new RegExp("^(aria)[A-Z]["+be+"]*$");function MC(e,t){{if(Ue.call($o,t)&&$o[t])return!0;if(AC.test(t)){var n="aria-"+t.slice(4).toLowerCase(),i=cb.hasOwnProperty(n)?n:null;if(i==null)return y("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),$o[t]=!0,!0;if(t!==i)return y("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,i),$o[t]=!0,!0}if(LC.test(t)){var u=t.toLowerCase(),w=cb.hasOwnProperty(u)?u:null;if(w==null)return $o[t]=!0,!1;if(t!==w)return y("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,w),$o[t]=!0,!0}}return!0}function UC(e,t){{var n=[];for(var i in t){var u=MC(e,i);u||n.push(i)}var w=n.map(function(T){return"`"+T+"`"}).join(", ");n.length===1?y("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",w,e):n.length>1&&y("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",w,e)}}function OC(e,t){qa(e,t)||UC(e,t)}var ub=!1;function PC(e,t){{if(e!=="input"&&e!=="textarea"&&e!=="select")return;t!=null&&t.value===null&&!ub&&(ub=!0,e==="select"&&t.multiple?y("`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):y("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e))}}var db=function(){};{var sr={},hb=/^on./,VC=/^on[^A-Z]/,IC=new RegExp("^(aria)-["+be+"]*$"),BC=new RegExp("^(aria)[A-Z]["+be+"]*$");db=function(e,t,n,i){if(Ue.call(sr,t)&&sr[t])return!0;var u=t.toLowerCase();if(u==="onfocusin"||u==="onfocusout")return y("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."),sr[t]=!0,!0;if(i!=null){var w=i.registrationNameDependencies,T=i.possibleRegistrationNames;if(w.hasOwnProperty(t))return!0;var V=T.hasOwnProperty(u)?T[u]:null;if(V!=null)return y("Invalid event handler property `%s`. Did you mean `%s`?",t,V),sr[t]=!0,!0;if(hb.test(t))return y("Unknown event handler property `%s`. It will be ignored.",t),sr[t]=!0,!0}else if(hb.test(t))return VC.test(t)&&y("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),sr[t]=!0,!0;if(IC.test(t)||BC.test(t))return!0;if(u==="innerhtml")return y("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),sr[t]=!0,!0;if(u==="aria")return y("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),sr[t]=!0,!0;if(u==="is"&&n!==null&&n!==void 0&&typeof n!="string")return y("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof n),sr[t]=!0,!0;if(typeof n=="number"&&isNaN(n))return y("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),sr[t]=!0,!0;var H=Jt(t),q=H!==null&&H.type===We;if(ld.hasOwnProperty(u)){var Z=ld[u];if(Z!==t)return y("Invalid DOM property `%s`. Did you mean `%s`?",t,Z),sr[t]=!0,!0}else if(!q&&t!==u)return y("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,u),sr[t]=!0,!0;return typeof n=="boolean"&&Vt(t,n,H,!1)?(n?y('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):y('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),sr[t]=!0,!0):q?!0:Vt(t,n,H,!1)?(sr[t]=!0,!1):((n==="false"||n==="true")&&H!==null&&H.type===Ke&&(y("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),sr[t]=!0),!0)}}var FC=function(e,t,n){{var i=[];for(var u in t){var w=db(e,u,t[u],n);w||i.push(u)}var T=i.map(function(V){return"`"+V+"`"}).join(", ");i.length===1?y("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 ",T,e):i.length>1&&y("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 ",T,e)}};function HC(e,t,n){qa(e,t)||FC(e,t,n)}var mb=1,$m=2,tc=4,zC=mb|$m|tc,nc=null;function $C(e){nc!==null&&y("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),nc=e}function WC(){nc===null&&y("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),nc=null}function GC(e){return e===nc}function Wm(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===Hr?t.parentNode:t}var Gm=null,Wo=null,Go=null;function fb(e){var t=Ca(e);if(t){if(typeof Gm!="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=$d(n);Gm(t.stateNode,t.type,i)}}}function qC(e){Gm=e}function pb(e){Wo?Go?Go.push(e):Go=[e]:Wo=e}function YC(){return Wo!==null||Go!==null}function vb(){if(Wo){var e=Wo,t=Go;if(Wo=null,Go=null,fb(e),t)for(var n=0;n<t.length;n++)fb(t[n])}}var gb=function(e,t){return e(t)},_b=function(){},qm=!1;function KC(){var e=YC();e&&(_b(),vb())}function bb(e,t,n){if(qm)return e(t,n);qm=!0;try{return gb(e,t,n)}finally{qm=!1,KC()}}function XC(e,t,n){gb=e,_b=n}function JC(e){return e==="button"||e==="input"||e==="select"||e==="textarea"}function ZC(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&&JC(t));default:return!1}}function ic(e,t){var n=e.stateNode;if(n===null)return null;var i=$d(n);if(i===null)return null;var u=i[t];if(ZC(t,e.type,i))return null;if(u&&typeof u!="function")throw new Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof u+"` type.");return u}var Ym=!1;if(Ie)try{var rc={};Object.defineProperty(rc,"passive",{get:function(){Ym=!0}}),window.addEventListener("test",rc,rc),window.removeEventListener("test",rc,rc)}catch{Ym=!1}function yb(e,t,n,i,u,w,T,V,H){var q=Array.prototype.slice.call(arguments,3);try{t.apply(n,q)}catch(Z){this.onError(Z)}}var xb=yb;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var Km=document.createElement("react");xb=function(t,n,i,u,w,T,V,H,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 Z=document.createEvent("Event"),pe=!1,fe=!0,je=window.event,De=Object.getOwnPropertyDescriptor(window,"event");function Oe(){Km.removeEventListener(Pe,At,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=je)}var ut=Array.prototype.slice.call(arguments,3);function At(){pe=!0,Oe(),n.apply(i,ut),fe=!1}var Rt,pn=!1,ln=!1;function we(Ne){if(Rt=Ne.error,pn=!0,Rt===null&&Ne.colno===0&&Ne.lineno===0&&(ln=!0),Ne.defaultPrevented&&Rt!=null&&typeof Rt=="object")try{Rt._suppressLogging=!0}catch{}}var Pe="react-"+(t||"invokeguardedcallback");if(window.addEventListener("error",we),Km.addEventListener(Pe,At,!1),Z.initEvent(Pe,!1,!1),Km.dispatchEvent(Z),De&&Object.defineProperty(window,"event",De),pe&&fe&&(pn?ln&&(Rt=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.")):Rt=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(Rt)),window.removeEventListener("error",we),!pe)return Oe(),yb.apply(this,arguments)}}var QC=xb,qo=!1,cd=null,ud=!1,Xm=null,eE={onError:function(e){qo=!0,cd=e}};function Jm(e,t,n,i,u,w,T,V,H){qo=!1,cd=null,QC.apply(eE,arguments)}function tE(e,t,n,i,u,w,T,V,H){if(Jm.apply(this,arguments),qo){var q=Zm();ud||(ud=!0,Xm=q)}}function nE(){if(ud){var e=Xm;throw ud=!1,Xm=null,e}}function iE(){return qo}function Zm(){if(qo){var e=cd;return qo=!1,cd=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 Yo(e){return e._reactInternals}function rE(e){return e._reactInternals!==void 0}function sE(e,t){e._reactInternals=t}var It=0,Ko=1,ui=2,Sn=4,Ya=16,sc=32,wb=64,Cn=128,Ws=256,Ka=512,Xo=1024,ga=2048,Gs=4096,Xa=8192,Qm=16384,aE=32767,dd=32768,ar=65536,ef=131072,Nb=1048576,tf=2097152,Ja=4194304,nf=8388608,_a=16777216,rf=33554432,sf=Sn|Xo|0,af=ui|Sn|Ya|sc|Ka|Gs|Xa,ac=Sn|wb|Ka|Xa,Jo=ga|Ya,qs=Ja|nf|tf,oE=c.ReactCurrentOwner;function Za(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{var i=t;do t=i,(t.flags&(ui|Gs))!==It&&(n=t.return),i=t.return;while(i)}return t.tag===h?n:null}function Sb(e){if(e.tag===k){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 Cb(e){return e.tag===h?e.stateNode.containerInfo:null}function lE(e){return Za(e)===e}function cE(e){{var t=oE.current;if(t!==null&&t.tag===g){var n=t,i=n.stateNode;i._warnedAboutRefsInRender||y("%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.",St(n)||"A component"),i._warnedAboutRefsInRender=!0}}var u=Yo(e);return u?Za(u)===u:!1}function Eb(e){if(Za(e)!==e)throw new Error("Unable to find node on an unmounted component.")}function jb(e){var t=e.alternate;if(!t){var n=Za(e);if(n===null)throw new Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var i=e,u=t;;){var w=i.return;if(w===null)break;var T=w.alternate;if(T===null){var V=w.return;if(V!==null){i=u=V;continue}break}if(w.child===T.child){for(var H=w.child;H;){if(H===i)return Eb(w),e;if(H===u)return Eb(w),t;H=H.sibling}throw new Error("Unable to find node on an unmounted component.")}if(i.return!==u.return)i=w,u=T;else{for(var q=!1,Z=w.child;Z;){if(Z===i){q=!0,i=w,u=T;break}if(Z===u){q=!0,u=w,i=T;break}Z=Z.sibling}if(!q){for(Z=T.child;Z;){if(Z===i){q=!0,i=T,u=w;break}if(Z===u){q=!0,u=T,i=w;break}Z=Z.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!==u)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!==h)throw new Error("Unable to find node on an unmounted component.");return i.stateNode.current===i?e:t}function Db(e){var t=jb(e);return t!==null?kb(t):null}function kb(e){if(e.tag===N||e.tag===E)return e;for(var t=e.child;t!==null;){var n=kb(t);if(n!==null)return n;t=t.sibling}return null}function uE(e){var t=jb(e);return t!==null?Rb(t):null}function Rb(e){if(e.tag===N||e.tag===E)return e;for(var t=e.child;t!==null;){if(t.tag!==_){var n=Rb(t);if(n!==null)return n}t=t.sibling}return null}var Tb=s.unstable_scheduleCallback,dE=s.unstable_cancelCallback,hE=s.unstable_shouldYield,mE=s.unstable_requestPaint,Ei=s.unstable_now,fE=s.unstable_getCurrentPriorityLevel,hd=s.unstable_ImmediatePriority,of=s.unstable_UserBlockingPriority,Qa=s.unstable_NormalPriority,pE=s.unstable_LowPriority,lf=s.unstable_IdlePriority,vE=s.unstable_yieldValue,gE=s.unstable_setDisableYieldValue,Zo=null,qi=null,ht=null,Cs=!1,cs=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function _E(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 y("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{ve&&(e=Ft({},e,{getLaneLabelMap:SE,injectProfilingHooks:NE})),Zo=t.inject(e),qi=t}catch(n){y("React instrumentation encountered an error: %s.",n)}return!!t.checkDCE}function bE(e,t){if(qi&&typeof qi.onScheduleFiberRoot=="function")try{qi.onScheduleFiberRoot(Zo,e,t)}catch(n){Cs||(Cs=!0,y("React instrumentation encountered an error: %s",n))}}function yE(e,t){if(qi&&typeof qi.onCommitFiberRoot=="function")try{var n=(e.current.flags&Cn)===Cn;if(he){var i;switch(t){case kr:i=hd;break;case Ks:i=of;break;case Xs:i=Qa;break;case bd:i=lf;break;default:i=Qa;break}qi.onCommitFiberRoot(Zo,e,i,n)}}catch(u){Cs||(Cs=!0,y("React instrumentation encountered an error: %s",u))}}function xE(e){if(qi&&typeof qi.onPostCommitFiberRoot=="function")try{qi.onPostCommitFiberRoot(Zo,e)}catch(t){Cs||(Cs=!0,y("React instrumentation encountered an error: %s",t))}}function wE(e){if(qi&&typeof qi.onCommitFiberUnmount=="function")try{qi.onCommitFiberUnmount(Zo,e)}catch(t){Cs||(Cs=!0,y("React instrumentation encountered an error: %s",t))}}function ji(e){if(typeof vE=="function"&&(gE(e),C(e)),qi&&typeof qi.setStrictMode=="function")try{qi.setStrictMode(Zo,e)}catch(t){Cs||(Cs=!0,y("React instrumentation encountered an error: %s",t))}}function NE(e){ht=e}function SE(){{for(var e=new Map,t=1,n=0;n<uf;n++){var i=$E(t);e.set(t,i),t*=2}return e}}function CE(e){ht!==null&&typeof ht.markCommitStarted=="function"&&ht.markCommitStarted(e)}function Lb(){ht!==null&&typeof ht.markCommitStopped=="function"&&ht.markCommitStopped()}function oc(e){ht!==null&&typeof ht.markComponentRenderStarted=="function"&&ht.markComponentRenderStarted(e)}function Qo(){ht!==null&&typeof ht.markComponentRenderStopped=="function"&&ht.markComponentRenderStopped()}function EE(e){ht!==null&&typeof ht.markComponentPassiveEffectMountStarted=="function"&&ht.markComponentPassiveEffectMountStarted(e)}function jE(){ht!==null&&typeof ht.markComponentPassiveEffectMountStopped=="function"&&ht.markComponentPassiveEffectMountStopped()}function DE(e){ht!==null&&typeof ht.markComponentPassiveEffectUnmountStarted=="function"&&ht.markComponentPassiveEffectUnmountStarted(e)}function kE(){ht!==null&&typeof ht.markComponentPassiveEffectUnmountStopped=="function"&&ht.markComponentPassiveEffectUnmountStopped()}function RE(e){ht!==null&&typeof ht.markComponentLayoutEffectMountStarted=="function"&&ht.markComponentLayoutEffectMountStarted(e)}function TE(){ht!==null&&typeof ht.markComponentLayoutEffectMountStopped=="function"&&ht.markComponentLayoutEffectMountStopped()}function Ab(e){ht!==null&&typeof ht.markComponentLayoutEffectUnmountStarted=="function"&&ht.markComponentLayoutEffectUnmountStarted(e)}function Mb(){ht!==null&&typeof ht.markComponentLayoutEffectUnmountStopped=="function"&&ht.markComponentLayoutEffectUnmountStopped()}function LE(e,t,n){ht!==null&&typeof ht.markComponentErrored=="function"&&ht.markComponentErrored(e,t,n)}function AE(e,t,n){ht!==null&&typeof ht.markComponentSuspended=="function"&&ht.markComponentSuspended(e,t,n)}function ME(e){ht!==null&&typeof ht.markLayoutEffectsStarted=="function"&&ht.markLayoutEffectsStarted(e)}function UE(){ht!==null&&typeof ht.markLayoutEffectsStopped=="function"&&ht.markLayoutEffectsStopped()}function OE(e){ht!==null&&typeof ht.markPassiveEffectsStarted=="function"&&ht.markPassiveEffectsStarted(e)}function PE(){ht!==null&&typeof ht.markPassiveEffectsStopped=="function"&&ht.markPassiveEffectsStopped()}function Ub(e){ht!==null&&typeof ht.markRenderStarted=="function"&&ht.markRenderStarted(e)}function VE(){ht!==null&&typeof ht.markRenderYielded=="function"&&ht.markRenderYielded()}function Ob(){ht!==null&&typeof ht.markRenderStopped=="function"&&ht.markRenderStopped()}function IE(e){ht!==null&&typeof ht.markRenderScheduled=="function"&&ht.markRenderScheduled(e)}function BE(e,t){ht!==null&&typeof ht.markForceUpdateScheduled=="function"&&ht.markForceUpdateScheduled(e,t)}function cf(e,t){ht!==null&&typeof ht.markStateUpdateScheduled=="function"&&ht.markStateUpdateScheduled(e,t)}var Mt=0,mn=1,Rn=2,ti=8,Es=16,Pb=Math.clz32?Math.clz32:zE,FE=Math.log,HE=Math.LN2;function zE(e){var t=e>>>0;return t===0?32:31-(FE(t)/HE|0)|0}var uf=31,Ge=0,Di=0,Wt=1,el=2,Ys=4,eo=8,js=16,lc=32,tl=4194240,cc=64,df=128,hf=256,mf=512,ff=1024,pf=2048,vf=4096,gf=8192,_f=16384,bf=32768,yf=65536,xf=131072,wf=262144,Nf=524288,Sf=1048576,Cf=2097152,md=130023424,nl=4194304,Ef=8388608,jf=16777216,Df=33554432,kf=67108864,Vb=nl,uc=134217728,Ib=268435455,dc=268435456,to=536870912,jr=1073741824;function $E(e){{if(e&Wt)return"Sync";if(e&el)return"InputContinuousHydration";if(e&Ys)return"InputContinuous";if(e&eo)return"DefaultHydration";if(e&js)return"Default";if(e&lc)return"TransitionHydration";if(e&tl)return"Transition";if(e&md)return"Retry";if(e&uc)return"SelectiveHydration";if(e&dc)return"IdleHydration";if(e&to)return"Idle";if(e&jr)return"Offscreen"}}var Gn=-1,fd=cc,pd=nl;function hc(e){switch(no(e)){case Wt:return Wt;case el:return el;case Ys:return Ys;case eo:return eo;case js:return js;case lc:return lc;case cc:case df:case hf:case mf:case ff:case pf:case vf:case gf:case _f:case bf:case yf:case xf:case wf:case Nf:case Sf:case Cf:return e&tl;case nl:case Ef:case jf:case Df:case kf:return e&md;case uc:return uc;case dc:return dc;case to:return to;case jr:return jr;default:return y("Should have found matching lanes. This is a bug in React."),e}}function vd(e,t){var n=e.pendingLanes;if(n===Ge)return Ge;var i=Ge,u=e.suspendedLanes,w=e.pingedLanes,T=n&Ib;if(T!==Ge){var V=T&~u;if(V!==Ge)i=hc(V);else{var H=T&w;H!==Ge&&(i=hc(H))}}else{var q=n&~u;q!==Ge?i=hc(q):w!==Ge&&(i=hc(w))}if(i===Ge)return Ge;if(t!==Ge&&t!==i&&(t&u)===Ge){var Z=no(i),pe=no(t);if(Z>=pe||Z===js&&(pe&tl)!==Ge)return t}(i&Ys)!==Ge&&(i|=n&js);var fe=e.entangledLanes;if(fe!==Ge)for(var je=e.entanglements,De=i&fe;De>0;){var Oe=io(De),ut=1<<Oe;i|=je[Oe],De&=~ut}return i}function WE(e,t){for(var n=e.eventTimes,i=Gn;t>0;){var u=io(t),w=1<<u,T=n[u];T>i&&(i=T),t&=~w}return i}function GE(e,t){switch(e){case Wt:case el:case Ys:return t+250;case eo:case js:case lc:case cc:case df:case hf:case mf:case ff:case pf:case vf:case gf:case _f:case bf:case yf:case xf:case wf:case Nf:case Sf:case Cf:return t+5e3;case nl:case Ef:case jf:case Df:case kf:return Gn;case uc:case dc:case to:case jr:return Gn;default:return y("Should have found matching lanes. This is a bug in React."),Gn}}function qE(e,t){for(var n=e.pendingLanes,i=e.suspendedLanes,u=e.pingedLanes,w=e.expirationTimes,T=n;T>0;){var V=io(T),H=1<<V,q=w[V];q===Gn?((H&i)===Ge||(H&u)!==Ge)&&(w[V]=GE(H,t)):q<=t&&(e.expiredLanes|=H),T&=~H}}function YE(e){return hc(e.pendingLanes)}function Rf(e){var t=e.pendingLanes&~jr;return t!==Ge?t:t&jr?jr:Ge}function KE(e){return(e&Wt)!==Ge}function Tf(e){return(e&Ib)!==Ge}function Bb(e){return(e&md)===e}function XE(e){var t=Wt|Ys|js;return(e&t)===Ge}function JE(e){return(e&tl)===e}function gd(e,t){var n=el|Ys|eo|js;return(t&n)!==Ge}function ZE(e,t){return(t&e.expiredLanes)!==Ge}function Fb(e){return(e&tl)!==Ge}function Hb(){var e=fd;return fd<<=1,(fd&tl)===Ge&&(fd=cc),e}function QE(){var e=pd;return pd<<=1,(pd&md)===Ge&&(pd=nl),e}function no(e){return e&-e}function mc(e){return no(e)}function io(e){return 31-Pb(e)}function Lf(e){return io(e)}function Dr(e,t){return(e&t)!==Ge}function il(e,t){return(e&t)===t}function nn(e,t){return e|t}function _d(e,t){return e&~t}function zb(e,t){return e&t}function qP(e){return e}function ej(e,t){return e!==Di&&e<t?e:t}function Af(e){for(var t=[],n=0;n<uf;n++)t.push(e);return t}function fc(e,t,n){e.pendingLanes|=t,t!==to&&(e.suspendedLanes=Ge,e.pingedLanes=Ge);var i=e.eventTimes,u=Lf(t);i[u]=n}function tj(e,t){e.suspendedLanes|=t,e.pingedLanes&=~t;for(var n=e.expirationTimes,i=t;i>0;){var u=io(i),w=1<<u;n[u]=Gn,i&=~w}}function $b(e,t,n){e.pingedLanes|=e.suspendedLanes&t}function nj(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=Ge,e.pingedLanes=Ge,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t;for(var i=e.entanglements,u=e.eventTimes,w=e.expirationTimes,T=n;T>0;){var V=io(T),H=1<<V;i[V]=Ge,u[V]=Gn,w[V]=Gn,T&=~H}}function Mf(e,t){for(var n=e.entangledLanes|=t,i=e.entanglements,u=n;u;){var w=io(u),T=1<<w;T&t|i[w]&t&&(i[w]|=t),u&=~T}}function ij(e,t){var n=no(t),i;switch(n){case Ys:i=el;break;case js:i=eo;break;case cc:case df:case hf:case mf:case ff:case pf:case vf:case gf:case _f:case bf:case yf:case xf:case wf:case Nf:case Sf:case Cf:case nl:case Ef:case jf:case Df:case kf:i=lc;break;case to:i=dc;break;default:i=Di;break}return(i&(e.suspendedLanes|t))!==Di?Di:i}function Wb(e,t,n){if(cs)for(var i=e.pendingUpdatersLaneMap;n>0;){var u=Lf(n),w=1<<u,T=i[u];T.add(t),n&=~w}}function Gb(e,t){if(cs)for(var n=e.pendingUpdatersLaneMap,i=e.memoizedUpdaters;t>0;){var u=Lf(t),w=1<<u,T=n[u];T.size>0&&(T.forEach(function(V){var H=V.alternate;(H===null||!i.has(H))&&i.add(V)}),T.clear()),t&=~w}}function qb(e,t){return null}var kr=Wt,Ks=Ys,Xs=js,bd=to,pc=Di;function us(){return pc}function ki(e){pc=e}function rj(e,t){var n=pc;try{return pc=e,t()}finally{pc=n}}function sj(e,t){return e!==0&&e<t?e:t}function aj(e,t){return e>t?e:t}function Uf(e,t){return e!==0&&e<t}function Yb(e){var t=no(e);return Uf(kr,t)?Uf(Ks,t)?Tf(t)?Xs:bd:Ks:kr}function yd(e){var t=e.current.memoizedState;return t.isDehydrated}var Kb;function oj(e){Kb=e}function lj(e){Kb(e)}var Of;function cj(e){Of=e}var Xb;function uj(e){Xb=e}var Jb;function dj(e){Jb=e}var Zb;function hj(e){Zb=e}var Pf=!1,xd=[],ba=null,ya=null,xa=null,vc=new Map,gc=new Map,wa=[],mj=["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 fj(e){return mj.indexOf(e)>-1}function pj(e,t,n,i,u){return{blockedOn:e,domEventName:t,eventSystemFlags:n,nativeEvent:u,targetContainers:[i]}}function Qb(e,t){switch(e){case"focusin":case"focusout":ba=null;break;case"dragenter":case"dragleave":ya=null;break;case"mouseover":case"mouseout":xa=null;break;case"pointerover":case"pointerout":{var n=t.pointerId;vc.delete(n);break}case"gotpointercapture":case"lostpointercapture":{var i=t.pointerId;gc.delete(i);break}}}function _c(e,t,n,i,u,w){if(e===null||e.nativeEvent!==w){var T=pj(t,n,i,u,w);if(t!==null){var V=Ca(t);V!==null&&Of(V)}return T}e.eventSystemFlags|=i;var H=e.targetContainers;return u!==null&&H.indexOf(u)===-1&&H.push(u),e}function vj(e,t,n,i,u){switch(t){case"focusin":{var w=u;return ba=_c(ba,e,t,n,i,w),!0}case"dragenter":{var T=u;return ya=_c(ya,e,t,n,i,T),!0}case"mouseover":{var V=u;return xa=_c(xa,e,t,n,i,V),!0}case"pointerover":{var H=u,q=H.pointerId;return vc.set(q,_c(vc.get(q)||null,e,t,n,i,H)),!0}case"gotpointercapture":{var Z=u,pe=Z.pointerId;return gc.set(pe,_c(gc.get(pe)||null,e,t,n,i,Z)),!0}}return!1}function ey(e){var t=ao(e.target);if(t!==null){var n=Za(t);if(n!==null){var i=n.tag;if(i===k){var u=Sb(n);if(u!==null){e.blockedOn=u,Zb(e.priority,function(){Xb(n)});return}}else if(i===h){var w=n.stateNode;if(yd(w)){e.blockedOn=Cb(n);return}}}}e.blockedOn=null}function gj(e){for(var t=Jb(),n={blockedOn:null,target:e,priority:t},i=0;i<wa.length&&Uf(t,wa[i].priority);i++);wa.splice(i,0,n),i===0&&ey(n)}function wd(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;t.length>0;){var n=t[0],i=Bf(e.domEventName,e.eventSystemFlags,n,e.nativeEvent);if(i===null){var u=e.nativeEvent,w=new u.constructor(u.type,u);$C(w),u.target.dispatchEvent(w),WC()}else{var T=Ca(i);return T!==null&&Of(T),e.blockedOn=i,!1}t.shift()}return!0}function ty(e,t,n){wd(e)&&n.delete(t)}function _j(){Pf=!1,ba!==null&&wd(ba)&&(ba=null),ya!==null&&wd(ya)&&(ya=null),xa!==null&&wd(xa)&&(xa=null),vc.forEach(ty),gc.forEach(ty)}function bc(e,t){e.blockedOn===t&&(e.blockedOn=null,Pf||(Pf=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,_j)))}function yc(e){if(xd.length>0){bc(xd[0],e);for(var t=1;t<xd.length;t++){var n=xd[t];n.blockedOn===e&&(n.blockedOn=null)}}ba!==null&&bc(ba,e),ya!==null&&bc(ya,e),xa!==null&&bc(xa,e);var i=function(V){return bc(V,e)};vc.forEach(i),gc.forEach(i);for(var u=0;u<wa.length;u++){var w=wa[u];w.blockedOn===e&&(w.blockedOn=null)}for(;wa.length>0;){var T=wa[0];if(T.blockedOn!==null)break;ey(T),T.blockedOn===null&&wa.shift()}}var rl=c.ReactCurrentBatchConfig,Vf=!0;function ny(e){Vf=!!e}function bj(){return Vf}function yj(e,t,n){var i=iy(t),u;switch(i){case kr:u=xj;break;case Ks:u=wj;break;case Xs:default:u=If;break}return u.bind(null,t,n,e)}function xj(e,t,n,i){var u=us(),w=rl.transition;rl.transition=null;try{ki(kr),If(e,t,n,i)}finally{ki(u),rl.transition=w}}function wj(e,t,n,i){var u=us(),w=rl.transition;rl.transition=null;try{ki(Ks),If(e,t,n,i)}finally{ki(u),rl.transition=w}}function If(e,t,n,i){Vf&&Nj(e,t,n,i)}function Nj(e,t,n,i){var u=Bf(e,t,n,i);if(u===null){ep(e,t,i,Nd,n),Qb(e,i);return}if(vj(u,e,t,n,i)){i.stopPropagation();return}if(Qb(e,i),t&tc&&fj(e)){for(;u!==null;){var w=Ca(u);w!==null&&lj(w);var T=Bf(e,t,n,i);if(T===null&&ep(e,t,i,Nd,n),T===u)break;u=T}u!==null&&i.stopPropagation();return}ep(e,t,i,null,n)}var Nd=null;function Bf(e,t,n,i){Nd=null;var u=Wm(i),w=ao(u);if(w!==null){var T=Za(w);if(T===null)w=null;else{var V=T.tag;if(V===k){var H=Sb(T);if(H!==null)return H;w=null}else if(V===h){var q=T.stateNode;if(yd(q))return Cb(T);w=null}else T!==w&&(w=null)}}return Nd=w,null}function iy(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 kr;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 Ks;case"message":{var t=fE();switch(t){case hd:return kr;case of:return Ks;case Qa:case pE:return Xs;case lf:return bd;default:return Xs}}default:return Xs}}function Sj(e,t,n){return e.addEventListener(t,n,!1),n}function Cj(e,t,n){return e.addEventListener(t,n,!0),n}function Ej(e,t,n,i){return e.addEventListener(t,n,{capture:!0,passive:i}),n}function jj(e,t,n,i){return e.addEventListener(t,n,{passive:i}),n}var xc=null,Ff=null,wc=null;function Dj(e){return xc=e,Ff=sy(),!0}function kj(){xc=null,Ff=null,wc=null}function ry(){if(wc)return wc;var e,t=Ff,n=t.length,i,u=sy(),w=u.length;for(e=0;e<n&&t[e]===u[e];e++);var T=n-e;for(i=1;i<=T&&t[n-i]===u[w-i];i++);var V=i>1?1-i:void 0;return wc=u.slice(e,V),wc}function sy(){return"value"in xc?xc.value:xc.textContent}function Sd(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 Cd(){return!0}function ay(){return!1}function Rr(e){function t(n,i,u,w,T){this._reactName=n,this._targetInst=u,this.type=i,this.nativeEvent=w,this.target=T,this.currentTarget=null;for(var V in e)if(e.hasOwnProperty(V)){var H=e[V];H?this[V]=H(w):this[V]=w[V]}var q=w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1;return q?this.isDefaultPrevented=Cd:this.isDefaultPrevented=ay,this.isPropagationStopped=ay,this}return Ft(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=Cd)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Cd)},persist:function(){},isPersistent:Cd}),t}var sl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hf=Rr(sl),Nc=Ft({},sl,{view:0,detail:0}),Rj=Rr(Nc),zf,$f,Sc;function Tj(e){e!==Sc&&(Sc&&e.type==="mousemove"?(zf=e.screenX-Sc.screenX,$f=e.screenY-Sc.screenY):(zf=0,$f=0),Sc=e)}var Ed=Ft({},Nc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gf,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:(Tj(e),zf)},movementY:function(e){return"movementY"in e?e.movementY:$f}}),oy=Rr(Ed),Lj=Ft({},Ed,{dataTransfer:0}),Aj=Rr(Lj),Mj=Ft({},Nc,{relatedTarget:0}),Wf=Rr(Mj),Uj=Ft({},sl,{animationName:0,elapsedTime:0,pseudoElement:0}),Oj=Rr(Uj),Pj=Ft({},sl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Vj=Rr(Pj),Ij=Ft({},sl,{data:0}),ly=Rr(Ij),Bj=ly,Fj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hj={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 zj(e){if(e.key){var t=Fj[e.key]||e.key;if(t!=="Unidentified")return t}if(e.type==="keypress"){var n=Sd(e);return n===13?"Enter":String.fromCharCode(n)}return e.type==="keydown"||e.type==="keyup"?Hj[e.keyCode]||"Unidentified":""}var $j={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Wj(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var i=$j[e];return i?!!n[i]:!1}function Gf(e){return Wj}var Gj=Ft({},Nc,{key:zj,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gf,charCode:function(e){return e.type==="keypress"?Sd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Sd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),qj=Rr(Gj),Yj=Ft({},Ed,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cy=Rr(Yj),Kj=Ft({},Nc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gf}),Xj=Rr(Kj),Jj=Ft({},sl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zj=Rr(Jj),Qj=Ft({},Ed,{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}),eD=Rr(Qj),tD=[9,13,27,32],uy=229,qf=Ie&&"CompositionEvent"in window,Cc=null;Ie&&"documentMode"in document&&(Cc=document.documentMode);var nD=Ie&&"TextEvent"in window&&!Cc,dy=Ie&&(!qf||Cc&&Cc>8&&Cc<=11),hy=32,my=String.fromCharCode(hy);function iD(){_e("onBeforeInput",["compositionend","keypress","textInput","paste"]),_e("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),_e("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),_e("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var fy=!1;function rD(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function sD(e){switch(e){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function aD(e,t){return e==="keydown"&&t.keyCode===uy}function py(e,t){switch(e){case"keyup":return tD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==uy;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vy(e){var t=e.detail;return typeof t=="object"&&"data"in t?t.data:null}function gy(e){return e.locale==="ko"}var al=!1;function oD(e,t,n,i,u){var w,T;if(qf?w=sD(t):al?py(t,i)&&(w="onCompositionEnd"):aD(t,i)&&(w="onCompositionStart"),!w)return null;dy&&!gy(i)&&(!al&&w==="onCompositionStart"?al=Dj(u):w==="onCompositionEnd"&&al&&(T=ry()));var V=Td(n,w);if(V.length>0){var H=new ly(w,t,null,i,u);if(e.push({event:H,listeners:V}),T)H.data=T;else{var q=vy(i);q!==null&&(H.data=q)}}}function lD(e,t){switch(e){case"compositionend":return vy(t);case"keypress":var n=t.which;return n!==hy?null:(fy=!0,my);case"textInput":var i=t.data;return i===my&&fy?null:i;default:return null}}function cD(e,t){if(al){if(e==="compositionend"||!qf&&py(e,t)){var n=ry();return kj(),al=!1,n}return null}switch(e){case"paste":return null;case"keypress":if(!rD(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return dy&&!gy(t)?null:t.data;default:return null}}function uD(e,t,n,i,u){var w;if(nD?w=lD(t,i):w=cD(t,i),!w)return null;var T=Td(n,"onBeforeInput");if(T.length>0){var V=new Bj("onBeforeInput","beforeinput",null,i,u);e.push({event:V,listeners:T}),V.data=w}}function dD(e,t,n,i,u,w,T){oD(e,t,n,i,u),uD(e,t,n,i,u)}var hD={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 _y(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hD[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 mD(e){if(!Ie)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(){_e("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function by(e,t,n,i){pb(i);var u=Td(t,"onChange");if(u.length>0){var w=new Hf("onChange","change",null,n,i);e.push({event:w,listeners:u})}}var Ec=null,jc=null;function pD(e){var t=e.nodeName&&e.nodeName.toLowerCase();return t==="select"||t==="input"&&e.type==="file"}function vD(e){var t=[];by(t,jc,e,Wm(e)),bb(gD,t)}function gD(e){Py(e,0)}function jd(e){var t=hl(e);if(is(t))return e}function _D(e,t){if(e==="change")return t}var yy=!1;Ie&&(yy=mD("input")&&(!document.documentMode||document.documentMode>9));function bD(e,t){Ec=e,jc=t,Ec.attachEvent("onpropertychange",wy)}function xy(){Ec&&(Ec.detachEvent("onpropertychange",wy),Ec=null,jc=null)}function wy(e){e.propertyName==="value"&&jd(jc)&&vD(e)}function yD(e,t,n){e==="focusin"?(xy(),bD(t,n)):e==="focusout"&&xy()}function xD(e,t){if(e==="selectionchange"||e==="keyup"||e==="keydown")return jd(jc)}function wD(e){var t=e.nodeName;return t&&t.toLowerCase()==="input"&&(e.type==="checkbox"||e.type==="radio")}function ND(e,t){if(e==="click")return jd(t)}function SD(e,t){if(e==="input"||e==="change")return jd(t)}function CD(e){var t=e._wrapperState;!t||!t.controlled||e.type!=="number"||Le(e,"number",e.value)}function ED(e,t,n,i,u,w,T){var V=n?hl(n):window,H,q;if(pD(V)?H=_D:_y(V)?yy?H=SD:(H=xD,q=yD):wD(V)&&(H=ND),H){var Z=H(t,n);if(Z){by(e,Z,i,u);return}}q&&q(t,V,n),t==="focusout"&&CD(V)}function jD(){ue("onMouseEnter",["mouseout","mouseover"]),ue("onMouseLeave",["mouseout","mouseover"]),ue("onPointerEnter",["pointerout","pointerover"]),ue("onPointerLeave",["pointerout","pointerover"])}function DD(e,t,n,i,u,w,T){var V=t==="mouseover"||t==="pointerover",H=t==="mouseout"||t==="pointerout";if(V&&!GC(i)){var q=i.relatedTarget||i.fromElement;if(q&&(ao(q)||Hc(q)))return}if(!(!H&&!V)){var Z;if(u.window===u)Z=u;else{var pe=u.ownerDocument;pe?Z=pe.defaultView||pe.parentWindow:Z=window}var fe,je;if(H){var De=i.relatedTarget||i.toElement;if(fe=n,je=De?ao(De):null,je!==null){var Oe=Za(je);(je!==Oe||je.tag!==N&&je.tag!==E)&&(je=null)}}else fe=null,je=n;if(fe!==je){var ut=oy,At="onMouseLeave",Rt="onMouseEnter",pn="mouse";(t==="pointerout"||t==="pointerover")&&(ut=cy,At="onPointerLeave",Rt="onPointerEnter",pn="pointer");var ln=fe==null?Z:hl(fe),we=je==null?Z:hl(je),Pe=new ut(At,pn+"leave",fe,i,u);Pe.target=ln,Pe.relatedTarget=we;var Ne=null,Je=ao(u);if(Je===n){var vt=new ut(Rt,pn+"enter",je,i,u);vt.target=we,vt.relatedTarget=ln,Ne=vt}ZD(e,Pe,Ne,fe,je)}}}function kD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tr=typeof Object.is=="function"?Object.is:kD;function Dc(e,t){if(Tr(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 u=0;u<n.length;u++){var w=n[u];if(!Ue.call(t,w)||!Tr(e[w],t[w]))return!1}return!0}function Ny(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function RD(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function Sy(e,t){for(var n=Ny(e),i=0,u=0;n;){if(n.nodeType===Hr){if(u=i+n.textContent.length,i<=t&&u>=t)return{node:n,offset:t-i};i=u}n=Ny(RD(n))}}function TD(e){var t=e.ownerDocument,n=t&&t.defaultView||window,i=n.getSelection&&n.getSelection();if(!i||i.rangeCount===0)return null;var u=i.anchorNode,w=i.anchorOffset,T=i.focusNode,V=i.focusOffset;try{u.nodeType,T.nodeType}catch{return null}return LD(e,u,w,T,V)}function LD(e,t,n,i,u){var w=0,T=-1,V=-1,H=0,q=0,Z=e,pe=null;e:for(;;){for(var fe=null;Z===t&&(n===0||Z.nodeType===Hr)&&(T=w+n),Z===i&&(u===0||Z.nodeType===Hr)&&(V=w+u),Z.nodeType===Hr&&(w+=Z.nodeValue.length),(fe=Z.firstChild)!==null;)pe=Z,Z=fe;for(;;){if(Z===e)break e;if(pe===t&&++H===n&&(T=w),pe===i&&++q===u&&(V=w),(fe=Z.nextSibling)!==null)break;Z=pe,pe=Z.parentNode}Z=fe}return T===-1||V===-1?null:{start:T,end:V}}function AD(e,t){var n=e.ownerDocument||document,i=n&&n.defaultView||window;if(i.getSelection){var u=i.getSelection(),w=e.textContent.length,T=Math.min(t.start,w),V=t.end===void 0?T:Math.min(t.end,w);if(!u.extend&&T>V){var H=V;V=T,T=H}var q=Sy(e,T),Z=Sy(e,V);if(q&&Z){if(u.rangeCount===1&&u.anchorNode===q.node&&u.anchorOffset===q.offset&&u.focusNode===Z.node&&u.focusOffset===Z.offset)return;var pe=n.createRange();pe.setStart(q.node,q.offset),u.removeAllRanges(),T>V?(u.addRange(pe),u.extend(Z.node,Z.offset)):(pe.setEnd(Z.node,Z.offset),u.addRange(pe))}}}function Cy(e){return e&&e.nodeType===Hr}function Ey(e,t){return!e||!t?!1:e===t?!0:Cy(e)?!1:Cy(t)?Ey(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1}function MD(e){return e&&e.ownerDocument&&Ey(e.ownerDocument.documentElement,e)}function UD(e){try{return typeof e.contentWindow.location.href=="string"}catch{return!1}}function jy(){for(var e=window,t=Cr();t instanceof e.HTMLIFrameElement;){if(UD(t))e=t.contentWindow;else return t;t=Cr(e.document)}return t}function Yf(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 OD(){var e=jy();return{focusedElem:e,selectionRange:Yf(e)?VD(e):null}}function PD(e){var t=jy(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&MD(n)){i!==null&&Yf(n)&&ID(n,i);for(var u=[],w=n;w=w.parentNode;)w.nodeType===Ai&&u.push({element:w,left:w.scrollLeft,top:w.scrollTop});typeof n.focus=="function"&&n.focus();for(var T=0;T<u.length;T++){var V=u[T];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}}function VD(e){var t;return"selectionStart"in e?t={start:e.selectionStart,end:e.selectionEnd}:t=TD(e),t||{start:0,end:0}}function ID(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)):AD(e,t)}var BD=Ie&&"documentMode"in document&&document.documentMode<=11;function FD(){_e("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var ol=null,Kf=null,kc=null,Xf=!1;function HD(e){if("selectionStart"in e&&Yf(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 zD(e){return e.window===e?e.document:e.nodeType===zr?e:e.ownerDocument}function Dy(e,t,n){var i=zD(n);if(!(Xf||ol==null||ol!==Cr(i))){var u=HD(ol);if(!kc||!Dc(kc,u)){kc=u;var w=Td(Kf,"onSelect");if(w.length>0){var T=new Hf("onSelect","select",null,t,n);e.push({event:T,listeners:w}),T.target=ol}}}}function $D(e,t,n,i,u,w,T){var V=n?hl(n):window;switch(t){case"focusin":(_y(V)||V.contentEditable==="true")&&(ol=V,Kf=n,kc=null);break;case"focusout":ol=null,Kf=null,kc=null;break;case"mousedown":Xf=!0;break;case"contextmenu":case"mouseup":case"dragend":Xf=!1,Dy(e,i,u);break;case"selectionchange":if(BD)break;case"keydown":case"keyup":Dy(e,i,u)}}function Dd(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ll={animationend:Dd("Animation","AnimationEnd"),animationiteration:Dd("Animation","AnimationIteration"),animationstart:Dd("Animation","AnimationStart"),transitionend:Dd("Transition","TransitionEnd")},Jf={},ky={};Ie&&(ky=document.createElement("div").style,"AnimationEvent"in window||(delete ll.animationend.animation,delete ll.animationiteration.animation,delete ll.animationstart.animation),"TransitionEvent"in window||delete ll.transitionend.transition);function kd(e){if(Jf[e])return Jf[e];if(!ll[e])return e;var t=ll[e];for(var n in t)if(t.hasOwnProperty(n)&&n in ky)return Jf[e]=t[n];return e}var Ry=kd("animationend"),Ty=kd("animationiteration"),Ly=kd("animationstart"),Ay=kd("transitionend"),My=new Map,Uy=["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 Na(e,t){My.set(e,t),_e(t,[e])}function WD(){for(var e=0;e<Uy.length;e++){var t=Uy[e],n=t.toLowerCase(),i=t[0].toUpperCase()+t.slice(1);Na(n,"on"+i)}Na(Ry,"onAnimationEnd"),Na(Ty,"onAnimationIteration"),Na(Ly,"onAnimationStart"),Na("dblclick","onDoubleClick"),Na("focusin","onFocus"),Na("focusout","onBlur"),Na(Ay,"onTransitionEnd")}function GD(e,t,n,i,u,w,T){var V=My.get(t);if(V!==void 0){var H=Hf,q=t;switch(t){case"keypress":if(Sd(i)===0)return;case"keydown":case"keyup":H=qj;break;case"focusin":q="focus",H=Wf;break;case"focusout":q="blur",H=Wf;break;case"beforeblur":case"afterblur":H=Wf;break;case"click":if(i.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=oy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=Aj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=Xj;break;case Ry:case Ty:case Ly:H=Oj;break;case Ay:H=Zj;break;case"scroll":H=Rj;break;case"wheel":H=eD;break;case"copy":case"cut":case"paste":H=Vj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=cy;break}var Z=(w&tc)!==0;{var pe=!Z&&t==="scroll",fe=XD(n,V,i.type,Z,pe);if(fe.length>0){var je=new H(V,q,null,i,u);e.push({event:je,listeners:fe})}}}}WD(),jD(),fD(),FD(),iD();function qD(e,t,n,i,u,w,T){GD(e,t,n,i,u,w);var V=(w&zC)===0;V&&(DD(e,t,n,i,u),ED(e,t,n,i,u),$D(e,t,n,i,u),dD(e,t,n,i,u))}var Rc=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],Zf=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Rc));function Oy(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,tE(i,t,void 0,e),e.currentTarget=null}function YD(e,t,n){var i;if(n)for(var u=t.length-1;u>=0;u--){var w=t[u],T=w.instance,V=w.currentTarget,H=w.listener;if(T!==i&&e.isPropagationStopped())return;Oy(e,H,V),i=T}else for(var q=0;q<t.length;q++){var Z=t[q],pe=Z.instance,fe=Z.currentTarget,je=Z.listener;if(pe!==i&&e.isPropagationStopped())return;Oy(e,je,fe),i=pe}}function Py(e,t){for(var n=(t&tc)!==0,i=0;i<e.length;i++){var u=e[i],w=u.event,T=u.listeners;YD(w,T,n)}nE()}function KD(e,t,n,i,u){var w=Wm(n),T=[];qD(T,e,i,n,w,t),Py(T,t)}function Yn(e,t){Zf.has(e)||y('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var n=!1,i=CR(t),u=QD(e);i.has(u)||(Vy(t,e,$m,n),i.add(u))}function Qf(e,t,n){Zf.has(e)&&!t&&y('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|=tc),Vy(n,e,i,t)}var Rd="_reactListening"+Math.random().toString(36).slice(2);function Tc(e){if(!e[Rd]){e[Rd]=!0,me.forEach(function(n){n!=="selectionchange"&&(Zf.has(n)||Qf(n,!1,e),Qf(n,!0,e))});var t=e.nodeType===zr?e:e.ownerDocument;t!==null&&(t[Rd]||(t[Rd]=!0,Qf("selectionchange",!1,t)))}}function Vy(e,t,n,i,u){var w=yj(e,t,n),T=void 0;Ym&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(T=!0),e=e,i?T!==void 0?Ej(e,t,w,T):Cj(e,t,w):T!==void 0?jj(e,t,w,T):Sj(e,t,w)}function Iy(e,t){return e===t||e.nodeType===Jn&&e.parentNode===t}function ep(e,t,n,i,u){var w=i;if(!(t&mb)&&!(t&$m)){var T=u;if(i!==null){var V=i;e:for(;;){if(V===null)return;var H=V.tag;if(H===h||H===_){var q=V.stateNode.containerInfo;if(Iy(q,T))break;if(H===_)for(var Z=V.return;Z!==null;){var pe=Z.tag;if(pe===h||pe===_){var fe=Z.stateNode.containerInfo;if(Iy(fe,T))return}Z=Z.return}for(;q!==null;){var je=ao(q);if(je===null)return;var De=je.tag;if(De===N||De===E){V=w=je;continue e}q=q.parentNode}}V=V.return}}}bb(function(){return KD(e,t,n,w)})}function Lc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function XD(e,t,n,i,u,w){for(var T=t!==null?t+"Capture":null,V=i?T:t,H=[],q=e,Z=null;q!==null;){var pe=q,fe=pe.stateNode,je=pe.tag;if(je===N&&fe!==null&&(Z=fe,V!==null)){var De=ic(q,V);De!=null&&H.push(Lc(q,De,Z))}if(u)break;q=q.return}return H}function Td(e,t){for(var n=t+"Capture",i=[],u=e;u!==null;){var w=u,T=w.stateNode,V=w.tag;if(V===N&&T!==null){var H=T,q=ic(u,n);q!=null&&i.unshift(Lc(u,q,H));var Z=ic(u,t);Z!=null&&i.push(Lc(u,Z,H))}u=u.return}return i}function cl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==N);return e||null}function JD(e,t){for(var n=e,i=t,u=0,w=n;w;w=cl(w))u++;for(var T=0,V=i;V;V=cl(V))T++;for(;u-T>0;)n=cl(n),u--;for(;T-u>0;)i=cl(i),T--;for(var H=u;H--;){if(n===i||i!==null&&n===i.alternate)return n;n=cl(n),i=cl(i)}return null}function By(e,t,n,i,u){for(var w=t._reactName,T=[],V=n;V!==null&&V!==i;){var H=V,q=H.alternate,Z=H.stateNode,pe=H.tag;if(q!==null&&q===i)break;if(pe===N&&Z!==null){var fe=Z;if(u){var je=ic(V,w);je!=null&&T.unshift(Lc(V,je,fe))}else if(!u){var De=ic(V,w);De!=null&&T.push(Lc(V,De,fe))}}V=V.return}T.length!==0&&e.push({event:t,listeners:T})}function ZD(e,t,n,i,u){var w=i&&u?JD(i,u):null;i!==null&&By(e,t,i,w,!1),u!==null&&n!==null&&By(e,n,u,w,!0)}function QD(e,t){return e+"__bubble"}var _r=!1,Ac="dangerouslySetInnerHTML",Ld="suppressContentEditableWarning",Sa="suppressHydrationWarning",Fy="autoFocus",ro="children",so="style",Ad="__html",tp,Md,Mc,Hy,Ud,zy,$y;tp={dialog:!0,webview:!0},Md=function(e,t){OC(e,t),PC(e,t),HC(e,t,{registrationNameDependencies:ie,possibleRegistrationNames:$})},zy=Ie&&!document.documentMode,Mc=function(e,t,n){if(!_r){var i=Od(n),u=Od(t);u!==i&&(_r=!0,y("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(u),JSON.stringify(i)))}},Hy=function(e){if(!_r){_r=!0;var t=[];e.forEach(function(n){t.push(n)}),y("Extra attributes from the server: %s",t)}},Ud=function(e,t){t===!1?y("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):y("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},$y=function(e,t){var n=e.namespaceURI===ls?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return n.innerHTML=t,n.innerHTML};var ek=/\r\n?/g,tk=/\u0000|\uFFFD/g;function Od(e){Se(e);var t=typeof e=="string"?e:""+e;return t.replace(ek,`
|
|
91
|
+
`).replace(tk,"")}function Pd(e,t,n,i){var u=Od(t),w=Od(e);if(w!==u&&(i&&(_r||(_r=!0,y('Text content did not match. Server: "%s" Client: "%s"',w,u))),n&&te))throw new Error("Text content does not match server-rendered HTML.")}function Wy(e){return e.nodeType===zr?e:e.ownerDocument}function nk(){}function Vd(e){e.onclick=nk}function ik(e,t,n,i,u){for(var w in i)if(i.hasOwnProperty(w)){var T=i[w];if(w===so)T&&Object.freeze(T),ob(t,T);else if(w===Ac){var V=T?T[Ad]:void 0;V!=null&&Zl(t,V)}else if(w===ro)if(typeof T=="string"){var H=e!=="textarea"||T!=="";H&&Ga(t,T)}else typeof T=="number"&&Ga(t,""+T);else w===Ld||w===Sa||w===Fy||(ie.hasOwnProperty(w)?T!=null&&(typeof T!="function"&&Ud(w,T),w==="onScroll"&&Yn("scroll",t)):T!=null&&Qn(t,w,T,u))}}function rk(e,t,n,i){for(var u=0;u<t.length;u+=2){var w=t[u],T=t[u+1];w===so?ob(e,T):w===Ac?Zl(e,T):w===ro?Ga(e,T):Qn(e,w,T,i)}}function sk(e,t,n,i){var u,w=Wy(n),T,V=i;if(V===ls&&(V=Io(e)),V===ls){if(u=qa(e,t),!u&&e!==e.toLowerCase()&&y("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),e==="script"){var H=w.createElement("div");H.innerHTML="<script><\/script>";var q=H.firstChild;T=H.removeChild(q)}else if(typeof t.is=="string")T=w.createElement(e,{is:t.is});else if(T=w.createElement(e),e==="select"){var Z=T;t.multiple?Z.multiple=!0:t.size&&(Z.size=t.size)}}else T=w.createElementNS(V,e);return V===ls&&!u&&Object.prototype.toString.call(T)==="[object HTMLUnknownElement]"&&!Ue.call(tp,e)&&(tp[e]=!0,y("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e)),T}function ak(e,t){return Wy(t).createTextNode(e)}function ok(e,t,n,i){var u=qa(t,n);Md(t,n);var w;switch(t){case"dialog":Yn("cancel",e),Yn("close",e),w=n;break;case"iframe":case"object":case"embed":Yn("load",e),w=n;break;case"video":case"audio":for(var T=0;T<Rc.length;T++)Yn(Rc[T],e);w=n;break;case"source":Yn("error",e),w=n;break;case"img":case"image":case"link":Yn("error",e),Yn("load",e),w=n;break;case"details":Yn("toggle",e),w=n;break;case"input":Ci(e,n),w=as(e,n),Yn("invalid",e);break;case"option":_t(e,n),w=n;break;case"select":Gi(e,n),w=os(e,n),Yn("invalid",e);break;case"textarea":Zu(e,n),w=Xl(e,n),Yn("invalid",e);break;default:w=n}switch(zm(t,w),ik(t,e,i,w,u),t){case"input":Wi(e),Y(e,n,!1);break;case"textarea":Wi(e),Jl(e);break;case"option":ct(e,n);break;case"select":fa(e,n);break;default:typeof w.onClick=="function"&&Vd(e);break}}function lk(e,t,n,i,u){Md(t,i);var w=null,T,V;switch(t){case"input":T=as(e,n),V=as(e,i),w=[];break;case"select":T=os(e,n),V=os(e,i),w=[];break;case"textarea":T=Xl(e,n),V=Xl(e,i),w=[];break;default:T=n,V=i,typeof T.onClick!="function"&&typeof V.onClick=="function"&&Vd(e);break}zm(t,V);var H,q,Z=null;for(H in T)if(!(V.hasOwnProperty(H)||!T.hasOwnProperty(H)||T[H]==null))if(H===so){var pe=T[H];for(q in pe)pe.hasOwnProperty(q)&&(Z||(Z={}),Z[q]="")}else H===Ac||H===ro||H===Ld||H===Sa||H===Fy||(ie.hasOwnProperty(H)?w||(w=[]):(w=w||[]).push(H,null));for(H in V){var fe=V[H],je=T!=null?T[H]:void 0;if(!(!V.hasOwnProperty(H)||fe===je||fe==null&&je==null))if(H===so)if(fe&&Object.freeze(fe),je){for(q in je)je.hasOwnProperty(q)&&(!fe||!fe.hasOwnProperty(q))&&(Z||(Z={}),Z[q]="");for(q in fe)fe.hasOwnProperty(q)&&je[q]!==fe[q]&&(Z||(Z={}),Z[q]=fe[q])}else Z||(w||(w=[]),w.push(H,Z)),Z=fe;else if(H===Ac){var De=fe?fe[Ad]:void 0,Oe=je?je[Ad]:void 0;De!=null&&Oe!==De&&(w=w||[]).push(H,De)}else H===ro?(typeof fe=="string"||typeof fe=="number")&&(w=w||[]).push(H,""+fe):H===Ld||H===Sa||(ie.hasOwnProperty(H)?(fe!=null&&(typeof fe!="function"&&Ud(H,fe),H==="onScroll"&&Yn("scroll",e)),!w&&je!==fe&&(w=[])):(w=w||[]).push(H,fe))}return Z&&(DC(Z,V[so]),(w=w||[]).push(so,Z)),w}function ck(e,t,n,i,u){n==="input"&&u.type==="radio"&&u.name!=null&&z(e,u);var w=qa(n,i),T=qa(n,u);switch(rk(e,t,w,T),n){case"input":ce(e,u);break;case"textarea":Qu(e,u);break;case"select":$a(e,u);break}}function uk(e){{var t=e.toLowerCase();return ld.hasOwnProperty(t)&&ld[t]||null}}function dk(e,t,n,i,u,w,T){var V,H;switch(V=qa(t,n),Md(t,n),t){case"dialog":Yn("cancel",e),Yn("close",e);break;case"iframe":case"object":case"embed":Yn("load",e);break;case"video":case"audio":for(var q=0;q<Rc.length;q++)Yn(Rc[q],e);break;case"source":Yn("error",e);break;case"img":case"image":case"link":Yn("error",e),Yn("load",e);break;case"details":Yn("toggle",e);break;case"input":Ci(e,n),Yn("invalid",e);break;case"option":_t(e,n);break;case"select":Gi(e,n),Yn("invalid",e);break;case"textarea":Zu(e,n),Yn("invalid",e);break}zm(t,n);{H=new Set;for(var Z=e.attributes,pe=0;pe<Z.length;pe++){var fe=Z[pe].name.toLowerCase();switch(fe){case"value":break;case"checked":break;case"selected":break;default:H.add(Z[pe].name)}}}var je=null;for(var De in n)if(n.hasOwnProperty(De)){var Oe=n[De];if(De===ro)typeof Oe=="string"?e.textContent!==Oe&&(n[Sa]!==!0&&Pd(e.textContent,Oe,w,T),je=[ro,Oe]):typeof Oe=="number"&&e.textContent!==""+Oe&&(n[Sa]!==!0&&Pd(e.textContent,Oe,w,T),je=[ro,""+Oe]);else if(ie.hasOwnProperty(De))Oe!=null&&(typeof Oe!="function"&&Ud(De,Oe),De==="onScroll"&&Yn("scroll",e));else if(T&&typeof V=="boolean"){var ut=void 0,At=Jt(De);if(n[Sa]!==!0){if(!(De===Ld||De===Sa||De==="value"||De==="checked"||De==="selected")){if(De===Ac){var Rt=e.innerHTML,pn=Oe?Oe[Ad]:void 0;if(pn!=null){var ln=$y(e,pn);ln!==Rt&&Mc(De,Rt,ln)}}else if(De===so){if(H.delete(De),zy){var we=$s(Oe);ut=e.getAttribute("style"),we!==ut&&Mc(De,ut,we)}}else if(V&&!X)H.delete(De.toLowerCase()),ut=Un(e,De,Oe),Oe!==ut&&Mc(De,ut,Oe);else if(!Ut(De,At,V)&&!dn(De,Oe,At,V)){var Pe=!1;if(At!==null)H.delete(At.attributeName),ut=kn(e,De,Oe,At);else{var Ne=i;if(Ne===ls&&(Ne=Io(t)),Ne===ls)H.delete(De.toLowerCase());else{var Je=uk(De);Je!==null&&Je!==De&&(Pe=!0,H.delete(Je)),H.delete(De)}ut=Un(e,De,Oe)}var vt=X;!vt&&Oe!==ut&&!Pe&&Mc(De,ut,Oe)}}}}}switch(T&&H.size>0&&n[Sa]!==!0&&Hy(H),t){case"input":Wi(e),Y(e,n,!0);break;case"textarea":Wi(e),Jl(e);break;case"select":case"option":break;default:typeof n.onClick=="function"&&Vd(e);break}return je}function hk(e,t,n){var i=e.nodeValue!==t;return i}function np(e,t){{if(_r)return;_r=!0,y("Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase())}}function ip(e,t){{if(_r)return;_r=!0,y('Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase())}}function rp(e,t,n){{if(_r)return;_r=!0,y("Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase())}}function sp(e,t){{if(t===""||_r)return;_r=!0,y('Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())}}function mk(e,t,n){switch(t){case"input":de(e,n);return;case"textarea":Fm(e,n);return;case"select":Po(e,n);return}}var Uc=function(){},Oc=function(){};{var fk=["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"],Gy=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],pk=Gy.concat(["button"]),vk=["dd","dt","li","option","optgroup","p","rp","rt"],qy={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};Oc=function(e,t){var n=Ft({},e||qy),i={tag:t};return Gy.indexOf(t)!==-1&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),pk.indexOf(t)!==-1&&(n.pTagInButtonScope=null),fk.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 gk=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 vk.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},_k=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},Yy={};Uc=function(e,t,n){n=n||qy;var i=n.current,u=i&&i.tag;t!=null&&(e!=null&&y("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var w=gk(e,u)?null:i,T=w?null:_k(e,n),V=w||T;if(V){var H=V.tag,q=!!w+"|"+e+"|"+H;if(!Yy[q]){Yy[q]=!0;var Z=e,pe="";if(e==="#text"?/\S/.test(t)?Z="Text nodes":(Z="Whitespace text nodes",pe=" Make sure you don't have any extra whitespace between tags on each line of your source code."):Z="<"+e+">",w){var fe="";H==="table"&&e==="tr"&&(fe+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),y("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",Z,H,pe,fe)}else y("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",Z,H)}}}}var Id="suppressHydrationWarning",Bd="$",Fd="/$",Pc="$?",Vc="$!",bk="style",ap=null,op=null;function yk(e){var t,n,i=e.nodeType;switch(i){case zr:case Fo:{t=i===zr?"#document":"#fragment";var u=e.documentElement;n=u?u.namespaceURI:Bo(null,"");break}default:{var w=i===Jn?e.parentNode:e,T=w.namespaceURI||null;t=w.tagName,n=Bo(T,t);break}}{var V=t.toLowerCase(),H=Oc(null,V);return{namespace:n,ancestorInfo:H}}}function xk(e,t,n){{var i=e,u=Bo(i.namespace,t),w=Oc(i.ancestorInfo,t);return{namespace:u,ancestorInfo:w}}}function YP(e){return e}function wk(e){ap=bj(),op=OD();var t=null;return ny(!1),t}function Nk(e){PD(op),ny(ap),ap=null,op=null}function Sk(e,t,n,i,u){var w;{var T=i;if(Uc(e,null,T.ancestorInfo),typeof t.children=="string"||typeof t.children=="number"){var V=""+t.children,H=Oc(T.ancestorInfo,e);Uc(null,V,H)}w=T.namespace}var q=sk(e,t,n,w);return Fc(u,q),pp(q,t),q}function Ck(e,t){e.appendChild(t)}function Ek(e,t,n,i,u){switch(ok(e,t,n,i),t){case"button":case"input":case"select":case"textarea":return!!n.autoFocus;case"img":return!0;default:return!1}}function jk(e,t,n,i,u,w){{var T=w;if(typeof i.children!=typeof n.children&&(typeof i.children=="string"||typeof i.children=="number")){var V=""+i.children,H=Oc(T.ancestorInfo,t);Uc(null,V,H)}}return lk(e,t,n,i)}function lp(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 Dk(e,t,n,i){{var u=n;Uc(null,e,u.ancestorInfo)}var w=ak(e,t);return Fc(i,w),w}function kk(){var e=window.event;return e===void 0?Xs:iy(e.type)}var cp=typeof setTimeout=="function"?setTimeout:void 0,Rk=typeof clearTimeout=="function"?clearTimeout:void 0,up=-1,Ky=typeof Promise=="function"?Promise:void 0,Tk=typeof queueMicrotask=="function"?queueMicrotask:typeof Ky<"u"?function(e){return Ky.resolve(null).then(e).catch(Lk)}:cp;function Lk(e){setTimeout(function(){throw e})}function Ak(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 Mk(e,t,n,i,u,w){ck(e,t,n,i,u),pp(e,u)}function Xy(e){Ga(e,"")}function Uk(e,t,n){e.nodeValue=n}function Ok(e,t){e.appendChild(t)}function Pk(e,t){var n;e.nodeType===Jn?(n=e.parentNode,n.insertBefore(t,e)):(n=e,n.appendChild(t));var i=e._reactRootContainer;i==null&&n.onclick===null&&Vd(n)}function Vk(e,t,n){e.insertBefore(t,n)}function Ik(e,t,n){e.nodeType===Jn?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)}function Bk(e,t){e.removeChild(t)}function Fk(e,t){e.nodeType===Jn?e.parentNode.removeChild(t):e.removeChild(t)}function dp(e,t){var n=t,i=0;do{var u=n.nextSibling;if(e.removeChild(n),u&&u.nodeType===Jn){var w=u.data;if(w===Fd)if(i===0){e.removeChild(u),yc(t);return}else i--;else(w===Bd||w===Pc||w===Vc)&&i++}n=u}while(n);yc(t)}function Hk(e,t){e.nodeType===Jn?dp(e.parentNode,t):e.nodeType===Ai&&dp(e,t),yc(e)}function zk(e){e=e;var t=e.style;typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function $k(e){e.nodeValue=""}function Wk(e,t){e=e;var n=t[bk],i=n!=null&&n.hasOwnProperty("display")?n.display:null;e.style.display=Ho("display",i)}function Gk(e,t){e.nodeValue=t}function qk(e){e.nodeType===Ai?e.textContent="":e.nodeType===zr&&e.documentElement&&e.removeChild(e.documentElement)}function Yk(e,t,n){return e.nodeType!==Ai||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}function Kk(e,t){return t===""||e.nodeType!==Hr?null:e}function Xk(e){return e.nodeType!==Jn?null:e}function Jy(e){return e.data===Pc}function hp(e){return e.data===Vc}function Jk(e){var t=e.nextSibling&&e.nextSibling.dataset,n,i,u;return t&&(n=t.dgst,i=t.msg,u=t.stck),{message:i,digest:n,stack:u}}function Zk(e,t){e._reactRetry=t}function Hd(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===Ai||t===Hr)break;if(t===Jn){var n=e.data;if(n===Bd||n===Vc||n===Pc)break;if(n===Fd)return null}}return e}function Ic(e){return Hd(e.nextSibling)}function Qk(e){return Hd(e.firstChild)}function eR(e){return Hd(e.firstChild)}function tR(e){return Hd(e.nextSibling)}function nR(e,t,n,i,u,w,T){Fc(w,e),pp(e,n);var V;{var H=u;V=H.namespace}var q=(w.mode&mn)!==Mt;return dk(e,t,n,V,i,q,T)}function iR(e,t,n,i){return Fc(n,e),n.mode&mn,hk(e,t)}function rR(e,t){Fc(t,e)}function sR(e){for(var t=e.nextSibling,n=0;t;){if(t.nodeType===Jn){var i=t.data;if(i===Fd){if(n===0)return Ic(t);n--}else(i===Bd||i===Vc||i===Pc)&&n++}t=t.nextSibling}return null}function Zy(e){for(var t=e.previousSibling,n=0;t;){if(t.nodeType===Jn){var i=t.data;if(i===Bd||i===Vc||i===Pc){if(n===0)return t;n--}else i===Fd&&n++}t=t.previousSibling}return null}function aR(e){yc(e)}function oR(e){yc(e)}function lR(e){return e!=="head"&&e!=="body"}function cR(e,t,n,i){var u=!0;Pd(t.nodeValue,n,i,u)}function uR(e,t,n,i,u,w){if(t[Id]!==!0){var T=!0;Pd(i.nodeValue,u,w,T)}}function dR(e,t){t.nodeType===Ai?np(e,t):t.nodeType===Jn||ip(e,t)}function hR(e,t){{var n=e.parentNode;n!==null&&(t.nodeType===Ai?np(n,t):t.nodeType===Jn||ip(n,t))}}function mR(e,t,n,i,u){(u||t[Id]!==!0)&&(i.nodeType===Ai?np(n,i):i.nodeType===Jn||ip(n,i))}function fR(e,t,n){rp(e,t)}function pR(e,t){sp(e,t)}function vR(e,t,n){{var i=e.parentNode;i!==null&&rp(i,t)}}function gR(e,t){{var n=e.parentNode;n!==null&&sp(n,t)}}function _R(e,t,n,i,u,w){(w||t[Id]!==!0)&&rp(n,i)}function bR(e,t,n,i,u){(u||t[Id]!==!0)&&sp(n,i)}function yR(e){y("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",e.nodeName.toLowerCase())}function xR(e){Tc(e)}var ul=Math.random().toString(36).slice(2),dl="__reactFiber$"+ul,mp="__reactProps$"+ul,Bc="__reactContainer$"+ul,fp="__reactEvents$"+ul,wR="__reactListeners$"+ul,NR="__reactHandles$"+ul;function SR(e){delete e[dl],delete e[mp],delete e[fp],delete e[wR],delete e[NR]}function Fc(e,t){t[dl]=e}function zd(e,t){t[Bc]=e}function Qy(e){e[Bc]=null}function Hc(e){return!!e[Bc]}function ao(e){var t=e[dl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Bc]||n[dl],t){var i=t.alternate;if(t.child!==null||i!==null&&i.child!==null)for(var u=Zy(e);u!==null;){var w=u[dl];if(w)return w;u=Zy(u)}return t}e=n,n=e.parentNode}return null}function Ca(e){var t=e[dl]||e[Bc];return t&&(t.tag===N||t.tag===E||t.tag===k||t.tag===h)?t:null}function hl(e){if(e.tag===N||e.tag===E)return e.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function $d(e){return e[mp]||null}function pp(e,t){e[mp]=t}function CR(e){var t=e[fp];return t===void 0&&(t=e[fp]=new Set),t}var ex={},tx=c.ReactDebugCurrentFrame;function Wd(e){if(e){var t=e._owner,n=Nr(e.type,e._source,t?t.type:null);tx.setExtraStackFrame(n)}else tx.setExtraStackFrame(null)}function ds(e,t,n,i,u){{var w=Function.call.bind(Ue);for(var T in e)if(w(e,T)){var V=void 0;try{if(typeof e[T]!="function"){var H=Error((i||"React class")+": "+n+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw H.name="Invariant Violation",H}V=e[T](t,T,i,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(q){V=q}V&&!(V instanceof Error)&&(Wd(u),y("%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,T,typeof V),Wd(null)),V instanceof Error&&!(V.message in ex)&&(ex[V.message]=!0,Wd(u),y("Failed %s type: %s",n,V.message),Wd(null))}}}var vp=[],Gd;Gd=[];var Js=-1;function Ea(e){return{current:e}}function Yi(e,t){if(Js<0){y("Unexpected pop.");return}t!==Gd[Js]&&y("Unexpected Fiber popped."),e.current=vp[Js],vp[Js]=null,Gd[Js]=null,Js--}function Ki(e,t,n){Js++,vp[Js]=e.current,Gd[Js]=n,e.current=t}var gp;gp={};var Lr={};Object.freeze(Lr);var Zs=Ea(Lr),Ds=Ea(!1),_p=Lr;function ml(e,t,n){return n&&ks(t)?_p:Zs.current}function nx(e,t,n){{var i=e.stateNode;i.__reactInternalMemoizedUnmaskedChildContext=t,i.__reactInternalMemoizedMaskedChildContext=n}}function fl(e,t){{var n=e.type,i=n.contextTypes;if(!i)return Lr;var u=e.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===t)return u.__reactInternalMemoizedMaskedChildContext;var w={};for(var T in i)w[T]=t[T];{var V=St(e)||"Unknown";ds(i,w,"context",V)}return u&&nx(e,t,w),w}}function qd(){return Ds.current}function ks(e){{var t=e.childContextTypes;return t!=null}}function Yd(e){Yi(Ds,e),Yi(Zs,e)}function bp(e){Yi(Ds,e),Yi(Zs,e)}function ix(e,t,n){{if(Zs.current!==Lr)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Ki(Zs,t,e),Ki(Ds,n,e)}}function rx(e,t,n){{var i=e.stateNode,u=t.childContextTypes;if(typeof i.getChildContext!="function"){{var w=St(e)||"Unknown";gp[w]||(gp[w]=!0,y("%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.",w,w))}return n}var T=i.getChildContext();for(var V in T)if(!(V in u))throw new Error((St(e)||"Unknown")+'.getChildContext(): key "'+V+'" is not defined in childContextTypes.');{var H=St(e)||"Unknown";ds(u,T,"child context",H)}return Ft({},n,T)}}function Kd(e){{var t=e.stateNode,n=t&&t.__reactInternalMemoizedMergedChildContext||Lr;return _p=Zs.current,Ki(Zs,n,e),Ki(Ds,Ds.current,e),!0}}function sx(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 u=rx(e,t,_p);i.__reactInternalMemoizedMergedChildContext=u,Yi(Ds,e),Yi(Zs,e),Ki(Zs,u,e),Ki(Ds,n,e)}else Yi(Ds,e),Ki(Ds,n,e)}}function ER(e){{if(!lE(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 h:return t.stateNode.context;case g:{var n=t.type;if(ks(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 ja=0,Xd=1,Qs=null,yp=!1,xp=!1;function ax(e){Qs===null?Qs=[e]:Qs.push(e)}function jR(e){yp=!0,ax(e)}function ox(){yp&&Da()}function Da(){if(!xp&&Qs!==null){xp=!0;var e=0,t=us();try{var n=!0,i=Qs;for(ki(kr);e<i.length;e++){var u=i[e];do u=u(n);while(u!==null)}Qs=null,yp=!1}catch(w){throw Qs!==null&&(Qs=Qs.slice(e+1)),Tb(hd,Da),w}finally{ki(t),xp=!1}}return null}var pl=[],vl=0,Jd=null,Zd=0,$r=[],Wr=0,oo=null,ea=1,ta="";function DR(e){return co(),(e.flags&Nb)!==It}function kR(e){return co(),Zd}function RR(){var e=ta,t=ea,n=t&~TR(t);return n.toString(32)+e}function lo(e,t){co(),pl[vl++]=Zd,pl[vl++]=Jd,Jd=e,Zd=t}function lx(e,t,n){co(),$r[Wr++]=ea,$r[Wr++]=ta,$r[Wr++]=oo,oo=e;var i=ea,u=ta,w=Qd(i)-1,T=i&~(1<<w),V=n+1,H=Qd(t)+w;if(H>30){var q=w-w%5,Z=(1<<q)-1,pe=(T&Z).toString(32),fe=T>>q,je=w-q,De=Qd(t)+je,Oe=V<<je,ut=Oe|fe,At=pe+u;ea=1<<De|ut,ta=At}else{var Rt=V<<w,pn=Rt|T,ln=u;ea=1<<H|pn,ta=ln}}function wp(e){co();var t=e.return;if(t!==null){var n=1,i=0;lo(e,n),lx(e,n,i)}}function Qd(e){return 32-Pb(e)}function TR(e){return 1<<Qd(e)-1}function Np(e){for(;e===Jd;)Jd=pl[--vl],pl[vl]=null,Zd=pl[--vl],pl[vl]=null;for(;e===oo;)oo=$r[--Wr],$r[Wr]=null,ta=$r[--Wr],$r[Wr]=null,ea=$r[--Wr],$r[Wr]=null}function LR(){return co(),oo!==null?{id:ea,overflow:ta}:null}function AR(e,t){co(),$r[Wr++]=ea,$r[Wr++]=ta,$r[Wr++]=oo,ea=t.id,ta=t.overflow,oo=e}function co(){Ui()||y("Expected to be hydrating. This is a bug in React. Please file an issue.")}var Mi=null,Gr=null,hs=!1,uo=!1,ka=null;function MR(){hs&&y("We should not be hydrating here. This is a bug in React. Please file a bug.")}function cx(){uo=!0}function UR(){return uo}function OR(e){var t=e.stateNode.containerInfo;return Gr=eR(t),Mi=e,hs=!0,ka=null,uo=!1,!0}function PR(e,t,n){return Gr=tR(t),Mi=e,hs=!0,ka=null,uo=!1,n!==null&&AR(e,n),!0}function ux(e,t){switch(e.tag){case h:{dR(e.stateNode.containerInfo,t);break}case N:{var n=(e.mode&mn)!==Mt;mR(e.type,e.memoizedProps,e.stateNode,t,n);break}case k:{var i=e.memoizedState;i.dehydrated!==null&&hR(i.dehydrated,t);break}}}function dx(e,t){ux(e,t);var n=FL();n.stateNode=t,n.return=e;var i=e.deletions;i===null?(e.deletions=[n],e.flags|=Ya):i.push(n)}function Sp(e,t){{if(uo)return;switch(e.tag){case h:{var n=e.stateNode.containerInfo;switch(t.tag){case N:var i=t.type;t.pendingProps,fR(n,i);break;case E:var u=t.pendingProps;pR(n,u);break}break}case N:{var w=e.type,T=e.memoizedProps,V=e.stateNode;switch(t.tag){case N:{var H=t.type,q=t.pendingProps,Z=(e.mode&mn)!==Mt;_R(w,T,V,H,q,Z);break}case E:{var pe=t.pendingProps,fe=(e.mode&mn)!==Mt;bR(w,T,V,pe,fe);break}}break}case k:{var je=e.memoizedState,De=je.dehydrated;if(De!==null)switch(t.tag){case N:var Oe=t.type;t.pendingProps,vR(De,Oe);break;case E:var ut=t.pendingProps;gR(De,ut);break}break}default:return}}}function hx(e,t){t.flags=t.flags&~Gs|ui,Sp(e,t)}function mx(e,t){switch(e.tag){case N:{var n=e.type;e.pendingProps;var i=Yk(t,n);return i!==null?(e.stateNode=i,Mi=e,Gr=Qk(i),!0):!1}case E:{var u=e.pendingProps,w=Kk(t,u);return w!==null?(e.stateNode=w,Mi=e,Gr=null,!0):!1}case k:{var T=Xk(t);if(T!==null){var V={dehydrated:T,treeContext:LR(),retryLane:jr};e.memoizedState=V;var H=HL(T);return H.return=e,e.child=H,Mi=e,Gr=null,!0}return!1}default:return!1}}function Cp(e){return(e.mode&mn)!==Mt&&(e.flags&Cn)===It}function Ep(e){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function jp(e){if(hs){var t=Gr;if(!t){Cp(e)&&(Sp(Mi,e),Ep()),hx(Mi,e),hs=!1,Mi=e;return}var n=t;if(!mx(e,t)){Cp(e)&&(Sp(Mi,e),Ep()),t=Ic(n);var i=Mi;if(!t||!mx(e,t)){hx(Mi,e),hs=!1,Mi=e;return}dx(i,n)}}}function VR(e,t,n){var i=e.stateNode,u=!uo,w=nR(i,e.type,e.memoizedProps,t,n,e,u);return e.updateQueue=w,w!==null}function IR(e){var t=e.stateNode,n=e.memoizedProps,i=iR(t,n,e);if(i){var u=Mi;if(u!==null)switch(u.tag){case h:{var w=u.stateNode.containerInfo,T=(u.mode&mn)!==Mt;cR(w,t,n,T);break}case N:{var V=u.type,H=u.memoizedProps,q=u.stateNode,Z=(u.mode&mn)!==Mt;uR(V,H,q,t,n,Z);break}}}return i}function BR(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.");rR(n,e)}function FR(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 sR(n)}function fx(e){for(var t=e.return;t!==null&&t.tag!==N&&t.tag!==h&&t.tag!==k;)t=t.return;Mi=t}function eh(e){if(e!==Mi)return!1;if(!hs)return fx(e),hs=!0,!1;if(e.tag!==h&&(e.tag!==N||lR(e.type)&&!lp(e.type,e.memoizedProps))){var t=Gr;if(t)if(Cp(e))px(e),Ep();else for(;t;)dx(e,t),t=Ic(t)}return fx(e),e.tag===k?Gr=FR(e):Gr=Mi?Ic(e.stateNode):null,!0}function HR(){return hs&&Gr!==null}function px(e){for(var t=Gr;t;)ux(e,t),t=Ic(t)}function gl(){Mi=null,Gr=null,hs=!1,uo=!1}function vx(){ka!==null&&(c0(ka),ka=null)}function Ui(){return hs}function Dp(e){ka===null?ka=[e]:ka.push(e)}var zR=c.ReactCurrentBatchConfig,$R=null;function WR(){return zR.transition}var ms={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var GR=function(e){for(var t=null,n=e;n!==null;)n.mode&ti&&(t=n),n=n.return;return t},ho=function(e){var t=[];return e.forEach(function(n){t.push(n)}),t.sort().join(", ")},zc=[],$c=[],Wc=[],Gc=[],qc=[],Yc=[],mo=new Set;ms.recordUnsafeLifecycleWarnings=function(e,t){mo.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&zc.push(e),e.mode&ti&&typeof t.UNSAFE_componentWillMount=="function"&&$c.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Wc.push(e),e.mode&ti&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&Gc.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&qc.push(e),e.mode&ti&&typeof t.UNSAFE_componentWillUpdate=="function"&&Yc.push(e))},ms.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;zc.length>0&&(zc.forEach(function(fe){e.add(St(fe)||"Component"),mo.add(fe.type)}),zc=[]);var t=new Set;$c.length>0&&($c.forEach(function(fe){t.add(St(fe)||"Component"),mo.add(fe.type)}),$c=[]);var n=new Set;Wc.length>0&&(Wc.forEach(function(fe){n.add(St(fe)||"Component"),mo.add(fe.type)}),Wc=[]);var i=new Set;Gc.length>0&&(Gc.forEach(function(fe){i.add(St(fe)||"Component"),mo.add(fe.type)}),Gc=[]);var u=new Set;qc.length>0&&(qc.forEach(function(fe){u.add(St(fe)||"Component"),mo.add(fe.type)}),qc=[]);var w=new Set;if(Yc.length>0&&(Yc.forEach(function(fe){w.add(St(fe)||"Component"),mo.add(fe.type)}),Yc=[]),t.size>0){var T=ho(t);y(`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`,T)}if(i.size>0){var V=ho(i);y(`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`,V)}if(w.size>0){var H=ho(w);y(`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`,H)}if(e.size>0){var q=ho(e);R(`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 Z=ho(n);R(`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`,Z)}if(u.size>0){var pe=ho(u);R(`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`,pe)}};var th=new Map,gx=new Set;ms.recordLegacyContextWarning=function(e,t){var n=GR(e);if(n===null){y("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(!gx.has(e.type)){var i=th.get(n);(e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(i===void 0&&(i=[],th.set(n,i)),i.push(e))}},ms.flushLegacyContextWarning=function(){th.forEach(function(e,t){if(e.length!==0){var n=e[0],i=new Set;e.forEach(function(w){i.add(St(w)||"Component"),gx.add(w.type)});var u=ho(i);try{Mn(n),y(`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`,u)}finally{qn()}}})},ms.discardPendingWarnings=function(){zc=[],$c=[],Wc=[],Gc=[],qc=[],Yc=[],th=new Map}}var kp,Rp,Tp,Lp,Ap,_x=function(e,t){};kp=!1,Rp=!1,Tp={},Lp={},Ap={},_x=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=St(t)||"Component";Lp[n]||(Lp[n]=!0,y('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};function qR(e){return e.prototype&&e.prototype.isReactComponent}function Kc(e,t,n){var i=n.ref;if(i!==null&&typeof i!="function"&&typeof i!="object"){if((e.mode&ti||K)&&!(n._owner&&n._self&&n._owner.stateNode!==n._self)&&!(n._owner&&n._owner.tag!==g)&&!(typeof n.type=="function"&&!qR(n.type))&&n._owner){var u=St(e)||"Component";Tp[u]||(y('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',u,i),Tp[u]=!0)}if(n._owner){var w=n._owner,T;if(w){var V=w;if(V.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");T=V.stateNode}if(!T)throw new Error("Missing owner for string ref "+i+". This error is likely caused by a bug in React. Please file an issue.");var H=T;yt(i,"ref");var q=""+i;if(t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===q)return t.ref;var Z=function(pe){var fe=H.refs;pe===null?delete fe[q]:fe[q]=pe};return Z._stringRef=q,Z}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 nh(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 ih(e){{var t=St(e)||"Component";if(Ap[t])return;Ap[t]=!0,y("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 bx(e){var t=e._payload,n=e._init;return n(t)}function yx(e){function t(we,Pe){if(e){var Ne=we.deletions;Ne===null?(we.deletions=[Pe],we.flags|=Ya):Ne.push(Pe)}}function n(we,Pe){if(!e)return null;for(var Ne=Pe;Ne!==null;)t(we,Ne),Ne=Ne.sibling;return null}function i(we,Pe){for(var Ne=new Map,Je=Pe;Je!==null;)Je.key!==null?Ne.set(Je.key,Je):Ne.set(Je.index,Je),Je=Je.sibling;return Ne}function u(we,Pe){var Ne=wo(we,Pe);return Ne.index=0,Ne.sibling=null,Ne}function w(we,Pe,Ne){if(we.index=Ne,!e)return we.flags|=Nb,Pe;var Je=we.alternate;if(Je!==null){var vt=Je.index;return vt<Pe?(we.flags|=ui,Pe):vt}else return we.flags|=ui,Pe}function T(we){return e&&we.alternate===null&&(we.flags|=ui),we}function V(we,Pe,Ne,Je){if(Pe===null||Pe.tag!==E){var vt=Dg(Ne,we.mode,Je);return vt.return=we,vt}else{var dt=u(Pe,Ne);return dt.return=we,dt}}function H(we,Pe,Ne,Je){var vt=Ne.type;if(vt===On)return Z(we,Pe,Ne.props.children,Je,Ne.key);if(Pe!==null&&(Pe.elementType===vt||C0(Pe,Ne)||typeof vt=="object"&&vt!==null&&vt.$$typeof===gt&&bx(vt)===Pe.type)){var dt=u(Pe,Ne.props);return dt.ref=Kc(we,Pe,Ne),dt.return=we,dt._debugSource=Ne._source,dt._debugOwner=Ne._owner,dt}var Ht=jg(Ne,we.mode,Je);return Ht.ref=Kc(we,Pe,Ne),Ht.return=we,Ht}function q(we,Pe,Ne,Je){if(Pe===null||Pe.tag!==_||Pe.stateNode.containerInfo!==Ne.containerInfo||Pe.stateNode.implementation!==Ne.implementation){var vt=kg(Ne,we.mode,Je);return vt.return=we,vt}else{var dt=u(Pe,Ne.children||[]);return dt.return=we,dt}}function Z(we,Pe,Ne,Je,vt){if(Pe===null||Pe.tag!==b){var dt=Ba(Ne,we.mode,Je,vt);return dt.return=we,dt}else{var Ht=u(Pe,Ne);return Ht.return=we,Ht}}function pe(we,Pe,Ne){if(typeof Pe=="string"&&Pe!==""||typeof Pe=="number"){var Je=Dg(""+Pe,we.mode,Ne);return Je.return=we,Je}if(typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case on:{var vt=jg(Pe,we.mode,Ne);return vt.ref=Kc(we,null,Pe),vt.return=we,vt}case Nn:{var dt=kg(Pe,we.mode,Ne);return dt.return=we,dt}case gt:{var Ht=Pe._payload,Yt=Pe._init;return pe(we,Yt(Ht),Ne)}}if(kt(Pe)||ri(Pe)){var Ln=Ba(Pe,we.mode,Ne,null);return Ln.return=we,Ln}nh(we,Pe)}return typeof Pe=="function"&&ih(we),null}function fe(we,Pe,Ne,Je){var vt=Pe!==null?Pe.key:null;if(typeof Ne=="string"&&Ne!==""||typeof Ne=="number")return vt!==null?null:V(we,Pe,""+Ne,Je);if(typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case on:return Ne.key===vt?H(we,Pe,Ne,Je):null;case Nn:return Ne.key===vt?q(we,Pe,Ne,Je):null;case gt:{var dt=Ne._payload,Ht=Ne._init;return fe(we,Pe,Ht(dt),Je)}}if(kt(Ne)||ri(Ne))return vt!==null?null:Z(we,Pe,Ne,Je,null);nh(we,Ne)}return typeof Ne=="function"&&ih(we),null}function je(we,Pe,Ne,Je,vt){if(typeof Je=="string"&&Je!==""||typeof Je=="number"){var dt=we.get(Ne)||null;return V(Pe,dt,""+Je,vt)}if(typeof Je=="object"&&Je!==null){switch(Je.$$typeof){case on:{var Ht=we.get(Je.key===null?Ne:Je.key)||null;return H(Pe,Ht,Je,vt)}case Nn:{var Yt=we.get(Je.key===null?Ne:Je.key)||null;return q(Pe,Yt,Je,vt)}case gt:var Ln=Je._payload,xn=Je._init;return je(we,Pe,Ne,xn(Ln),vt)}if(kt(Je)||ri(Je)){var oi=we.get(Ne)||null;return Z(Pe,oi,Je,vt,null)}nh(Pe,Je)}return typeof Je=="function"&&ih(Pe),null}function De(we,Pe,Ne){{if(typeof we!="object"||we===null)return Pe;switch(we.$$typeof){case on:case Nn:_x(we,Ne);var Je=we.key;if(typeof Je!="string")break;if(Pe===null){Pe=new Set,Pe.add(Je);break}if(!Pe.has(Je)){Pe.add(Je);break}y("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.",Je);break;case gt:var vt=we._payload,dt=we._init;De(dt(vt),Pe,Ne);break}}return Pe}function Oe(we,Pe,Ne,Je){for(var vt=null,dt=0;dt<Ne.length;dt++){var Ht=Ne[dt];vt=De(Ht,vt,we)}for(var Yt=null,Ln=null,xn=Pe,oi=0,wn=0,ni=null;xn!==null&&wn<Ne.length;wn++){xn.index>wn?(ni=xn,xn=null):ni=xn.sibling;var Ji=fe(we,xn,Ne[wn],Je);if(Ji===null){xn===null&&(xn=ni);break}e&&xn&&Ji.alternate===null&&t(we,xn),oi=w(Ji,oi,wn),Ln===null?Yt=Ji:Ln.sibling=Ji,Ln=Ji,xn=ni}if(wn===Ne.length){if(n(we,xn),Ui()){var Hi=wn;lo(we,Hi)}return Yt}if(xn===null){for(;wn<Ne.length;wn++){var Mr=pe(we,Ne[wn],Je);Mr!==null&&(oi=w(Mr,oi,wn),Ln===null?Yt=Mr:Ln.sibling=Mr,Ln=Mr)}if(Ui()){var ur=wn;lo(we,ur)}return Yt}for(var dr=i(we,xn);wn<Ne.length;wn++){var Zi=je(dr,we,wn,Ne[wn],Je);Zi!==null&&(e&&Zi.alternate!==null&&dr.delete(Zi.key===null?wn:Zi.key),oi=w(Zi,oi,wn),Ln===null?Yt=Zi:Ln.sibling=Zi,Ln=Zi)}if(e&&dr.forEach(function(Ol){return t(we,Ol)}),Ui()){var la=wn;lo(we,la)}return Yt}function ut(we,Pe,Ne,Je){var vt=ri(Ne);if(typeof vt!="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"&&Ne[Symbol.toStringTag]==="Generator"&&(Rp||y("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."),Rp=!0),Ne.entries===vt&&(kp||y("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),kp=!0);var dt=vt.call(Ne);if(dt)for(var Ht=null,Yt=dt.next();!Yt.done;Yt=dt.next()){var Ln=Yt.value;Ht=De(Ln,Ht,we)}}var xn=vt.call(Ne);if(xn==null)throw new Error("An iterable object provided no iterator.");for(var oi=null,wn=null,ni=Pe,Ji=0,Hi=0,Mr=null,ur=xn.next();ni!==null&&!ur.done;Hi++,ur=xn.next()){ni.index>Hi?(Mr=ni,ni=null):Mr=ni.sibling;var dr=fe(we,ni,ur.value,Je);if(dr===null){ni===null&&(ni=Mr);break}e&&ni&&dr.alternate===null&&t(we,ni),Ji=w(dr,Ji,Hi),wn===null?oi=dr:wn.sibling=dr,wn=dr,ni=Mr}if(ur.done){if(n(we,ni),Ui()){var Zi=Hi;lo(we,Zi)}return oi}if(ni===null){for(;!ur.done;Hi++,ur=xn.next()){var la=pe(we,ur.value,Je);la!==null&&(Ji=w(la,Ji,Hi),wn===null?oi=la:wn.sibling=la,wn=la)}if(Ui()){var Ol=Hi;lo(we,Ol)}return oi}for(var ju=i(we,ni);!ur.done;Hi++,ur=xn.next()){var Ps=je(ju,we,Hi,ur.value,Je);Ps!==null&&(e&&Ps.alternate!==null&&ju.delete(Ps.key===null?Hi:Ps.key),Ji=w(Ps,Ji,Hi),wn===null?oi=Ps:wn.sibling=Ps,wn=Ps)}if(e&&ju.forEach(function(bA){return t(we,bA)}),Ui()){var _A=Hi;lo(we,_A)}return oi}function At(we,Pe,Ne,Je){if(Pe!==null&&Pe.tag===E){n(we,Pe.sibling);var vt=u(Pe,Ne);return vt.return=we,vt}n(we,Pe);var dt=Dg(Ne,we.mode,Je);return dt.return=we,dt}function Rt(we,Pe,Ne,Je){for(var vt=Ne.key,dt=Pe;dt!==null;){if(dt.key===vt){var Ht=Ne.type;if(Ht===On){if(dt.tag===b){n(we,dt.sibling);var Yt=u(dt,Ne.props.children);return Yt.return=we,Yt._debugSource=Ne._source,Yt._debugOwner=Ne._owner,Yt}}else if(dt.elementType===Ht||C0(dt,Ne)||typeof Ht=="object"&&Ht!==null&&Ht.$$typeof===gt&&bx(Ht)===dt.type){n(we,dt.sibling);var Ln=u(dt,Ne.props);return Ln.ref=Kc(we,dt,Ne),Ln.return=we,Ln._debugSource=Ne._source,Ln._debugOwner=Ne._owner,Ln}n(we,dt);break}else t(we,dt);dt=dt.sibling}if(Ne.type===On){var xn=Ba(Ne.props.children,we.mode,Je,Ne.key);return xn.return=we,xn}else{var oi=jg(Ne,we.mode,Je);return oi.ref=Kc(we,Pe,Ne),oi.return=we,oi}}function pn(we,Pe,Ne,Je){for(var vt=Ne.key,dt=Pe;dt!==null;){if(dt.key===vt)if(dt.tag===_&&dt.stateNode.containerInfo===Ne.containerInfo&&dt.stateNode.implementation===Ne.implementation){n(we,dt.sibling);var Ht=u(dt,Ne.children||[]);return Ht.return=we,Ht}else{n(we,dt);break}else t(we,dt);dt=dt.sibling}var Yt=kg(Ne,we.mode,Je);return Yt.return=we,Yt}function ln(we,Pe,Ne,Je){var vt=typeof Ne=="object"&&Ne!==null&&Ne.type===On&&Ne.key===null;if(vt&&(Ne=Ne.props.children),typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case on:return T(Rt(we,Pe,Ne,Je));case Nn:return T(pn(we,Pe,Ne,Je));case gt:var dt=Ne._payload,Ht=Ne._init;return ln(we,Pe,Ht(dt),Je)}if(kt(Ne))return Oe(we,Pe,Ne,Je);if(ri(Ne))return ut(we,Pe,Ne,Je);nh(we,Ne)}return typeof Ne=="string"&&Ne!==""||typeof Ne=="number"?T(At(we,Pe,""+Ne,Je)):(typeof Ne=="function"&&ih(we),n(we,Pe))}return ln}var _l=yx(!0),xx=yx(!1);function YR(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=wo(n,n.pendingProps);for(t.child=i,i.return=t;n.sibling!==null;)n=n.sibling,i=i.sibling=wo(n,n.pendingProps),i.return=t;i.sibling=null}}function KR(e,t){for(var n=e.child;n!==null;)OL(n,t),n=n.sibling}var Mp=Ea(null),Up;Up={};var rh=null,bl=null,Op=null,sh=!1;function ah(){rh=null,bl=null,Op=null,sh=!1}function wx(){sh=!0}function Nx(){sh=!1}function Sx(e,t,n){Ki(Mp,t._currentValue,e),t._currentValue=n,t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==Up&&y("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=Up}function Pp(e,t){var n=Mp.current;Yi(Mp,t),e._currentValue=n}function Vp(e,t,n){for(var i=e;i!==null;){var u=i.alternate;if(il(i.childLanes,t)?u!==null&&!il(u.childLanes,t)&&(u.childLanes=nn(u.childLanes,t)):(i.childLanes=nn(i.childLanes,t),u!==null&&(u.childLanes=nn(u.childLanes,t))),i===n)break;i=i.return}i!==n&&y("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 XR(e,t,n){JR(e,t,n)}function JR(e,t,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var u=void 0,w=i.dependencies;if(w!==null){u=i.child;for(var T=w.firstContext;T!==null;){if(T.context===t){if(i.tag===g){var V=mc(n),H=na(Gn,V);H.tag=lh;var q=i.updateQueue;if(q!==null){var Z=q.shared,pe=Z.pending;pe===null?H.next=H:(H.next=pe.next,pe.next=H),Z.pending=H}}i.lanes=nn(i.lanes,n);var fe=i.alternate;fe!==null&&(fe.lanes=nn(fe.lanes,n)),Vp(i.return,n,e),w.lanes=nn(w.lanes,n);break}T=T.next}}else if(i.tag===f)u=i.type===e.type?null:i.child;else if(i.tag===O){var je=i.return;if(je===null)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");je.lanes=nn(je.lanes,n);var De=je.alternate;De!==null&&(De.lanes=nn(De.lanes,n)),Vp(je,n,e),u=i.sibling}else u=i.child;if(u!==null)u.return=i;else for(u=i;u!==null;){if(u===e){u=null;break}var Oe=u.sibling;if(Oe!==null){Oe.return=u.return,u=Oe;break}u=u.return}i=u}}function yl(e,t){rh=e,bl=null,Op=null;var n=e.dependencies;if(n!==null){var i=n.firstContext;i!==null&&(Dr(n.lanes,t)&&uu(),n.firstContext=null)}}function di(e){sh&&y("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(Op!==e){var n={context:e,memoizedValue:t,next:null};if(bl===null){if(rh===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().");bl=n,rh.dependencies={lanes:Ge,firstContext:n}}else bl=bl.next=n}return t}var fo=null;function Ip(e){fo===null?fo=[e]:fo.push(e)}function ZR(){if(fo!==null){for(var e=0;e<fo.length;e++){var t=fo[e],n=t.interleaved;if(n!==null){t.interleaved=null;var i=n.next,u=t.pending;if(u!==null){var w=u.next;u.next=i,n.next=w}t.pending=n}}fo=null}}function Cx(e,t,n,i){var u=t.interleaved;return u===null?(n.next=n,Ip(t)):(n.next=u.next,u.next=n),t.interleaved=n,oh(e,i)}function QR(e,t,n,i){var u=t.interleaved;u===null?(n.next=n,Ip(t)):(n.next=u.next,u.next=n),t.interleaved=n}function eT(e,t,n,i){var u=t.interleaved;return u===null?(n.next=n,Ip(t)):(n.next=u.next,u.next=n),t.interleaved=n,oh(e,i)}function br(e,t){return oh(e,t)}var tT=oh;function oh(e,t){e.lanes=nn(e.lanes,t);var n=e.alternate;n!==null&&(n.lanes=nn(n.lanes,t)),n===null&&(e.flags&(ui|Gs))!==It&&x0(e);for(var i=e,u=e.return;u!==null;)u.childLanes=nn(u.childLanes,t),n=u.alternate,n!==null?n.childLanes=nn(n.childLanes,t):(u.flags&(ui|Gs))!==It&&x0(e),i=u,u=u.return;if(i.tag===h){var w=i.stateNode;return w}else return null}var Ex=0,jx=1,lh=2,Bp=3,ch=!1,Fp,uh;Fp=!1,uh=null;function Hp(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:Ge},effects:null};e.updateQueue=t}function Dx(e,t){var n=t.updateQueue,i=e.updateQueue;if(n===i){var u={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects};t.updateQueue=u}}function na(e,t){var n={eventTime:e,lane:t,tag:Ex,payload:null,callback:null,next:null};return n}function Ra(e,t,n){var i=e.updateQueue;if(i===null)return null;var u=i.shared;if(uh===u&&!Fp&&(y("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."),Fp=!0),Q5()){var w=u.pending;return w===null?t.next=t:(t.next=w.next,w.next=t),u.pending=t,tT(e,n)}else return eT(e,u,t,n)}function dh(e,t,n){var i=t.updateQueue;if(i!==null){var u=i.shared;if(Fb(n)){var w=u.lanes;w=zb(w,e.pendingLanes);var T=nn(w,n);u.lanes=T,Mf(e,T)}}}function zp(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null){var u=i.updateQueue;if(n===u){var w=null,T=null,V=n.firstBaseUpdate;if(V!==null){var H=V;do{var q={eventTime:H.eventTime,lane:H.lane,tag:H.tag,payload:H.payload,callback:H.callback,next:null};T===null?w=T=q:(T.next=q,T=q),H=H.next}while(H!==null);T===null?w=T=t:(T.next=t,T=t)}else w=T=t;n={baseState:u.baseState,firstBaseUpdate:w,lastBaseUpdate:T,shared:u.shared,effects:u.effects},e.updateQueue=n;return}}var Z=n.lastBaseUpdate;Z===null?n.firstBaseUpdate=t:Z.next=t,n.lastBaseUpdate=t}function nT(e,t,n,i,u,w){switch(n.tag){case jx:{var T=n.payload;if(typeof T=="function"){wx();var V=T.call(w,i,u);{if(e.mode&ti){ji(!0);try{T.call(w,i,u)}finally{ji(!1)}}Nx()}return V}return T}case Bp:e.flags=e.flags&~ar|Cn;case Ex:{var H=n.payload,q;if(typeof H=="function"){wx(),q=H.call(w,i,u);{if(e.mode&ti){ji(!0);try{H.call(w,i,u)}finally{ji(!1)}}Nx()}}else q=H;return q==null?i:Ft({},i,q)}case lh:return ch=!0,i}return i}function hh(e,t,n,i){var u=e.updateQueue;ch=!1,uh=u.shared;var w=u.firstBaseUpdate,T=u.lastBaseUpdate,V=u.shared.pending;if(V!==null){u.shared.pending=null;var H=V,q=H.next;H.next=null,T===null?w=q:T.next=q,T=H;var Z=e.alternate;if(Z!==null){var pe=Z.updateQueue,fe=pe.lastBaseUpdate;fe!==T&&(fe===null?pe.firstBaseUpdate=q:fe.next=q,pe.lastBaseUpdate=H)}}if(w!==null){var je=u.baseState,De=Ge,Oe=null,ut=null,At=null,Rt=w;do{var pn=Rt.lane,ln=Rt.eventTime;if(il(i,pn)){if(At!==null){var Pe={eventTime:ln,lane:Di,tag:Rt.tag,payload:Rt.payload,callback:Rt.callback,next:null};At=At.next=Pe}je=nT(e,u,Rt,je,t,n);var Ne=Rt.callback;if(Ne!==null&&Rt.lane!==Di){e.flags|=wb;var Je=u.effects;Je===null?u.effects=[Rt]:Je.push(Rt)}}else{var we={eventTime:ln,lane:pn,tag:Rt.tag,payload:Rt.payload,callback:Rt.callback,next:null};At===null?(ut=At=we,Oe=je):At=At.next=we,De=nn(De,pn)}if(Rt=Rt.next,Rt===null){if(V=u.shared.pending,V===null)break;var vt=V,dt=vt.next;vt.next=null,Rt=dt,u.lastBaseUpdate=vt,u.shared.pending=null}}while(!0);At===null&&(Oe=je),u.baseState=Oe,u.firstBaseUpdate=ut,u.lastBaseUpdate=At;var Ht=u.shared.interleaved;if(Ht!==null){var Yt=Ht;do De=nn(De,Yt.lane),Yt=Yt.next;while(Yt!==Ht)}else w===null&&(u.shared.lanes=Ge);wu(De),e.lanes=De,e.memoizedState=je}uh=null}function iT(e,t){if(typeof e!="function")throw new Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+e));e.call(t)}function kx(){ch=!1}function mh(){return ch}function Rx(e,t,n){var i=t.effects;if(t.effects=null,i!==null)for(var u=0;u<i.length;u++){var w=i[u],T=w.callback;T!==null&&(w.callback=null,iT(T,n))}}var Xc={},Ta=Ea(Xc),Jc=Ea(Xc),fh=Ea(Xc);function ph(e){if(e===Xc)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 Tx(){var e=ph(fh.current);return e}function $p(e,t){Ki(fh,t,e),Ki(Jc,e,e),Ki(Ta,Xc,e);var n=yk(t);Yi(Ta,e),Ki(Ta,n,e)}function xl(e){Yi(Ta,e),Yi(Jc,e),Yi(fh,e)}function Wp(){var e=ph(Ta.current);return e}function Lx(e){ph(fh.current);var t=ph(Ta.current),n=xk(t,e.type);t!==n&&(Ki(Jc,e,e),Ki(Ta,n,e))}function Gp(e){Jc.current===e&&(Yi(Ta,e),Yi(Jc,e))}var rT=0,Ax=1,Mx=1,Zc=2,fs=Ea(rT);function qp(e,t){return(e&t)!==0}function wl(e){return e&Ax}function Yp(e,t){return e&Ax|t}function sT(e,t){return e|t}function La(e,t){Ki(fs,t,e)}function Nl(e){Yi(fs,e)}function aT(e,t){var n=e.memoizedState;return n!==null?n.dehydrated!==null:(e.memoizedProps,!0)}function vh(e){for(var t=e;t!==null;){if(t.tag===k){var n=t.memoizedState;if(n!==null){var i=n.dehydrated;if(i===null||Jy(i)||hp(i))return t}}else if(t.tag===F&&t.memoizedProps.revealOrder!==void 0){var u=(t.flags&Cn)!==It;if(u)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 yr=0,vi=1,Rs=2,gi=4,Oi=8,Kp=[];function Xp(){for(var e=0;e<Kp.length;e++){var t=Kp[e];t._workInProgressVersionPrimary=null}Kp.length=0}function oT(e,t){var n=t._getVersion,i=n(t._source);e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,i]:e.mutableSourceEagerHydrationData.push(t,i)}var ft=c.ReactCurrentDispatcher,Qc=c.ReactCurrentBatchConfig,Jp,Sl;Jp=new Set;var po=Ge,Tn=null,_i=null,bi=null,gh=!1,eu=!1,tu=0,lT=0,cT=25,Be=null,qr=null,Aa=-1,Zp=!1;function En(){{var e=Be;qr===null?qr=[e]:qr.push(e)}}function ot(){{var e=Be;qr!==null&&(Aa++,qr[Aa]!==e&&uT(e))}}function Cl(e){e!=null&&!kt(e)&&y("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",Be,typeof e)}function uT(e){{var t=St(Tn);if(!Jp.has(t)&&(Jp.add(t),qr!==null)){for(var n="",i=30,u=0;u<=Aa;u++){for(var w=qr[u],T=u===Aa?e:w,V=u+1+". "+w;V.length<i;)V+=" ";V+=T+`
|
|
131
|
+
`,n+=V}y(`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 Xi(){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 Qp(e,t){if(Zp)return!1;if(t===null)return y("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",Be),!1;e.length!==t.length&&y(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
141
|
+
|
|
142
|
+
Previous: %s
|
|
143
|
+
Incoming: %s`,Be,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var n=0;n<t.length&&n<e.length;n++)if(!Tr(e[n],t[n]))return!1;return!0}function El(e,t,n,i,u,w){po=w,Tn=t,qr=e!==null?e._debugHookTypes:null,Aa=-1,Zp=e!==null&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=Ge,e!==null&&e.memoizedState!==null?ft.current=nw:qr!==null?ft.current=tw:ft.current=ew;var T=n(i,u);if(eu){var V=0;do{if(eu=!1,tu=0,V>=cT)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");V+=1,Zp=!1,_i=null,bi=null,t.updateQueue=null,Aa=-1,ft.current=iw,T=n(i,u)}while(eu)}ft.current=Rh,t._debugHookTypes=qr;var H=_i!==null&&_i.next!==null;if(po=Ge,Tn=null,_i=null,bi=null,Be=null,qr=null,Aa=-1,e!==null&&(e.flags&qs)!==(t.flags&qs)&&(e.mode&mn)!==Mt&&y("Internal React error: Expected static flag was missing. Please notify the React team."),gh=!1,H)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return T}function jl(){var e=tu!==0;return tu=0,e}function Ux(e,t,n){t.updateQueue=e.updateQueue,(t.mode&Es)!==Mt?t.flags&=-50333701:t.flags&=-2053,e.lanes=_d(e.lanes,n)}function Ox(){if(ft.current=Rh,gh){for(var e=Tn.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}gh=!1}po=Ge,Tn=null,_i=null,bi=null,qr=null,Aa=-1,Be=null,Kx=!1,eu=!1,tu=0}function Ts(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bi===null?Tn.memoizedState=bi=e:bi=bi.next=e,bi}function Yr(){var e;if(_i===null){var t=Tn.alternate;t!==null?e=t.memoizedState:e=null}else e=_i.next;var n;if(bi===null?n=Tn.memoizedState:n=bi.next,n!==null)bi=n,n=bi.next,_i=e;else{if(e===null)throw new Error("Rendered more hooks than during the previous render.");_i=e;var i={memoizedState:_i.memoizedState,baseState:_i.baseState,baseQueue:_i.baseQueue,queue:_i.queue,next:null};bi===null?Tn.memoizedState=bi=i:bi=bi.next=i}return bi}function Px(){return{lastEffect:null,stores:null}}function ev(e,t){return typeof t=="function"?t(e):t}function tv(e,t,n){var i=Ts(),u;n!==void 0?u=n(t):u=t,i.memoizedState=i.baseState=u;var w={pending:null,interleaved:null,lanes:Ge,dispatch:null,lastRenderedReducer:e,lastRenderedState:u};i.queue=w;var T=w.dispatch=fT.bind(null,Tn,w);return[i.memoizedState,T]}function nv(e,t,n){var i=Yr(),u=i.queue;if(u===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");u.lastRenderedReducer=e;var w=_i,T=w.baseQueue,V=u.pending;if(V!==null){if(T!==null){var H=T.next,q=V.next;T.next=q,V.next=H}w.baseQueue!==T&&y("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),w.baseQueue=T=V,u.pending=null}if(T!==null){var Z=T.next,pe=w.baseState,fe=null,je=null,De=null,Oe=Z;do{var ut=Oe.lane;if(il(po,ut)){if(De!==null){var Rt={lane:Di,action:Oe.action,hasEagerState:Oe.hasEagerState,eagerState:Oe.eagerState,next:null};De=De.next=Rt}if(Oe.hasEagerState)pe=Oe.eagerState;else{var pn=Oe.action;pe=e(pe,pn)}}else{var At={lane:ut,action:Oe.action,hasEagerState:Oe.hasEagerState,eagerState:Oe.eagerState,next:null};De===null?(je=De=At,fe=pe):De=De.next=At,Tn.lanes=nn(Tn.lanes,ut),wu(ut)}Oe=Oe.next}while(Oe!==null&&Oe!==Z);De===null?fe=pe:De.next=je,Tr(pe,i.memoizedState)||uu(),i.memoizedState=pe,i.baseState=fe,i.baseQueue=De,u.lastRenderedState=pe}var ln=u.interleaved;if(ln!==null){var we=ln;do{var Pe=we.lane;Tn.lanes=nn(Tn.lanes,Pe),wu(Pe),we=we.next}while(we!==ln)}else T===null&&(u.lanes=Ge);var Ne=u.dispatch;return[i.memoizedState,Ne]}function iv(e,t,n){var i=Yr(),u=i.queue;if(u===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");u.lastRenderedReducer=e;var w=u.dispatch,T=u.pending,V=i.memoizedState;if(T!==null){u.pending=null;var H=T.next,q=H;do{var Z=q.action;V=e(V,Z),q=q.next}while(q!==H);Tr(V,i.memoizedState)||uu(),i.memoizedState=V,i.baseQueue===null&&(i.baseState=V),u.lastRenderedState=V}return[V,w]}function KP(e,t,n){}function XP(e,t,n){}function rv(e,t,n){var i=Tn,u=Ts(),w,T=Ui();if(T){if(n===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");w=n(),Sl||w!==n()&&(y("The result of getServerSnapshot should be cached to avoid an infinite loop"),Sl=!0)}else{if(w=t(),!Sl){var V=t();Tr(w,V)||(y("The result of getSnapshot should be cached to avoid an infinite loop"),Sl=!0)}var H=Kh();if(H===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");gd(H,po)||Vx(i,t,w)}u.memoizedState=w;var q={value:w,getSnapshot:t};return u.queue=q,wh(Bx.bind(null,i,q,e),[e]),i.flags|=ga,nu(vi|Oi,Ix.bind(null,i,q,w,t),void 0,null),w}function _h(e,t,n){var i=Tn,u=Yr(),w=t();if(!Sl){var T=t();Tr(w,T)||(y("The result of getSnapshot should be cached to avoid an infinite loop"),Sl=!0)}var V=u.memoizedState,H=!Tr(V,w);H&&(u.memoizedState=w,uu());var q=u.queue;if(ru(Bx.bind(null,i,q,e),[e]),q.getSnapshot!==t||H||bi!==null&&bi.memoizedState.tag&vi){i.flags|=ga,nu(vi|Oi,Ix.bind(null,i,q,w,t),void 0,null);var Z=Kh();if(Z===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");gd(Z,po)||Vx(i,t,w)}return w}function Vx(e,t,n){e.flags|=Qm;var i={getSnapshot:t,value:n},u=Tn.updateQueue;if(u===null)u=Px(),Tn.updateQueue=u,u.stores=[i];else{var w=u.stores;w===null?u.stores=[i]:w.push(i)}}function Ix(e,t,n,i){t.value=n,t.getSnapshot=i,Fx(t)&&Hx(e)}function Bx(e,t,n){var i=function(){Fx(t)&&Hx(e)};return n(i)}function Fx(e){var t=e.getSnapshot,n=e.value;try{var i=t();return!Tr(n,i)}catch{return!0}}function Hx(e){var t=br(e,Wt);t!==null&&Ni(t,e,Wt,Gn)}function bh(e){var t=Ts();typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e;var n={pending:null,interleaved:null,lanes:Ge,dispatch:null,lastRenderedReducer:ev,lastRenderedState:e};t.queue=n;var i=n.dispatch=pT.bind(null,Tn,n);return[t.memoizedState,i]}function sv(e){return nv(ev)}function av(e){return iv(ev)}function nu(e,t,n,i){var u={tag:e,create:t,destroy:n,deps:i,next:null},w=Tn.updateQueue;if(w===null)w=Px(),Tn.updateQueue=w,w.lastEffect=u.next=u;else{var T=w.lastEffect;if(T===null)w.lastEffect=u.next=u;else{var V=T.next;T.next=u,u.next=V,w.lastEffect=u}}return u}function ov(e){var t=Ts();{var n={current:e};return t.memoizedState=n,n}}function yh(e){var t=Yr();return t.memoizedState}function iu(e,t,n,i){var u=Ts(),w=i===void 0?null:i;Tn.flags|=e,u.memoizedState=nu(vi|t,n,void 0,w)}function xh(e,t,n,i){var u=Yr(),w=i===void 0?null:i,T=void 0;if(_i!==null){var V=_i.memoizedState;if(T=V.destroy,w!==null){var H=V.deps;if(Qp(w,H)){u.memoizedState=nu(t,n,T,w);return}}}Tn.flags|=e,u.memoizedState=nu(vi|t,n,T,w)}function wh(e,t){return(Tn.mode&Es)!==Mt?iu(rf|ga|nf,Oi,e,t):iu(ga|nf,Oi,e,t)}function ru(e,t){return xh(ga,Oi,e,t)}function lv(e,t){return iu(Sn,Rs,e,t)}function Nh(e,t){return xh(Sn,Rs,e,t)}function cv(e,t){var n=Sn;return n|=Ja,(Tn.mode&Es)!==Mt&&(n|=_a),iu(n,gi,e,t)}function Sh(e,t){return xh(Sn,gi,e,t)}function zx(e,t){if(typeof t=="function"){var n=t,i=e();return n(i),function(){n(null)}}else if(t!=null){var u=t;u.hasOwnProperty("current")||y("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(u).join(", ")+"}");var w=e();return u.current=w,function(){u.current=null}}}function uv(e,t,n){typeof t!="function"&&y("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,u=Sn;return u|=Ja,(Tn.mode&Es)!==Mt&&(u|=_a),iu(u,gi,zx.bind(null,t,e),i)}function Ch(e,t,n){typeof t!="function"&&y("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 xh(Sn,gi,zx.bind(null,t,e),i)}function dT(e,t){}var Eh=dT;function dv(e,t){var n=Ts(),i=t===void 0?null:t;return n.memoizedState=[e,i],e}function jh(e,t){var n=Yr(),i=t===void 0?null:t,u=n.memoizedState;if(u!==null&&i!==null){var w=u[1];if(Qp(i,w))return u[0]}return n.memoizedState=[e,i],e}function hv(e,t){var n=Ts(),i=t===void 0?null:t,u=e();return n.memoizedState=[u,i],u}function Dh(e,t){var n=Yr(),i=t===void 0?null:t,u=n.memoizedState;if(u!==null&&i!==null){var w=u[1];if(Qp(i,w))return u[0]}var T=e();return n.memoizedState=[T,i],T}function mv(e){var t=Ts();return t.memoizedState=e,e}function $x(e){var t=Yr(),n=_i,i=n.memoizedState;return Gx(t,i,e)}function Wx(e){var t=Yr();if(_i===null)return t.memoizedState=e,e;var n=_i.memoizedState;return Gx(t,n,e)}function Gx(e,t,n){var i=!XE(po);if(i){if(!Tr(n,t)){var u=Hb();Tn.lanes=nn(Tn.lanes,u),wu(u),e.baseState=!0}return t}else return e.baseState&&(e.baseState=!1,uu()),e.memoizedState=n,n}function hT(e,t,n){var i=us();ki(sj(i,Ks)),e(!0);var u=Qc.transition;Qc.transition={};var w=Qc.transition;Qc.transition._updatedFibers=new Set;try{e(!1),t()}finally{if(ki(i),Qc.transition=u,u===null&&w._updatedFibers){var T=w._updatedFibers.size;T>10&&R("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."),w._updatedFibers.clear()}}}function fv(){var e=bh(!1),t=e[0],n=e[1],i=hT.bind(null,n),u=Ts();return u.memoizedState=i,[t,i]}function qx(){var e=sv(),t=e[0],n=Yr(),i=n.memoizedState;return[t,i]}function Yx(){var e=av(),t=e[0],n=Yr(),i=n.memoizedState;return[t,i]}var Kx=!1;function mT(){return Kx}function pv(){var e=Ts(),t=Kh(),n=t.identifierPrefix,i;if(Ui()){var u=RR();i=":"+n+"R"+u;var w=tu++;w>0&&(i+="H"+w.toString(32)),i+=":"}else{var T=lT++;i=":"+n+"r"+T.toString(32)+":"}return e.memoizedState=i,i}function kh(){var e=Yr(),t=e.memoizedState;return t}function fT(e,t,n){typeof arguments[3]=="function"&&y("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=Va(e),u={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xx(e))Jx(t,u);else{var w=Cx(e,t,u,i);if(w!==null){var T=cr();Ni(w,e,i,T),Zx(w,t,i)}}Qx(e,i)}function pT(e,t,n){typeof arguments[3]=="function"&&y("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=Va(e),u={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xx(e))Jx(t,u);else{var w=e.alternate;if(e.lanes===Ge&&(w===null||w.lanes===Ge)){var T=t.lastRenderedReducer;if(T!==null){var V;V=ft.current,ft.current=ps;try{var H=t.lastRenderedState,q=T(H,n);if(u.hasEagerState=!0,u.eagerState=q,Tr(q,H)){QR(e,t,u,i);return}}catch{}finally{ft.current=V}}}var Z=Cx(e,t,u,i);if(Z!==null){var pe=cr();Ni(Z,e,i,pe),Zx(Z,t,i)}}Qx(e,i)}function Xx(e){var t=e.alternate;return e===Tn||t!==null&&t===Tn}function Jx(e,t){eu=gh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zx(e,t,n){if(Fb(n)){var i=t.lanes;i=zb(i,e.pendingLanes);var u=nn(i,n);t.lanes=u,Mf(e,u)}}function Qx(e,t,n){cf(e,t)}var Rh={readContext:di,useCallback:Xi,useContext:Xi,useEffect:Xi,useImperativeHandle:Xi,useInsertionEffect:Xi,useLayoutEffect:Xi,useMemo:Xi,useReducer:Xi,useRef:Xi,useState:Xi,useDebugValue:Xi,useDeferredValue:Xi,useTransition:Xi,useMutableSource:Xi,useSyncExternalStore:Xi,useId:Xi,unstable_isNewReconciler:se},ew=null,tw=null,nw=null,iw=null,Ls=null,ps=null,Th=null;{var vv=function(){y("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().")},Gt=function(){y("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")};ew={readContext:function(e){return di(e)},useCallback:function(e,t){return Be="useCallback",En(),Cl(t),dv(e,t)},useContext:function(e){return Be="useContext",En(),di(e)},useEffect:function(e,t){return Be="useEffect",En(),Cl(t),wh(e,t)},useImperativeHandle:function(e,t,n){return Be="useImperativeHandle",En(),Cl(n),uv(e,t,n)},useInsertionEffect:function(e,t){return Be="useInsertionEffect",En(),Cl(t),lv(e,t)},useLayoutEffect:function(e,t){return Be="useLayoutEffect",En(),Cl(t),cv(e,t)},useMemo:function(e,t){Be="useMemo",En(),Cl(t);var n=ft.current;ft.current=Ls;try{return hv(e,t)}finally{ft.current=n}},useReducer:function(e,t,n){Be="useReducer",En();var i=ft.current;ft.current=Ls;try{return tv(e,t,n)}finally{ft.current=i}},useRef:function(e){return Be="useRef",En(),ov(e)},useState:function(e){Be="useState",En();var t=ft.current;ft.current=Ls;try{return bh(e)}finally{ft.current=t}},useDebugValue:function(e,t){return Be="useDebugValue",En(),void 0},useDeferredValue:function(e){return Be="useDeferredValue",En(),mv(e)},useTransition:function(){return Be="useTransition",En(),fv()},useMutableSource:function(e,t,n){return Be="useMutableSource",En(),void 0},useSyncExternalStore:function(e,t,n){return Be="useSyncExternalStore",En(),rv(e,t,n)},useId:function(){return Be="useId",En(),pv()},unstable_isNewReconciler:se},tw={readContext:function(e){return di(e)},useCallback:function(e,t){return Be="useCallback",ot(),dv(e,t)},useContext:function(e){return Be="useContext",ot(),di(e)},useEffect:function(e,t){return Be="useEffect",ot(),wh(e,t)},useImperativeHandle:function(e,t,n){return Be="useImperativeHandle",ot(),uv(e,t,n)},useInsertionEffect:function(e,t){return Be="useInsertionEffect",ot(),lv(e,t)},useLayoutEffect:function(e,t){return Be="useLayoutEffect",ot(),cv(e,t)},useMemo:function(e,t){Be="useMemo",ot();var n=ft.current;ft.current=Ls;try{return hv(e,t)}finally{ft.current=n}},useReducer:function(e,t,n){Be="useReducer",ot();var i=ft.current;ft.current=Ls;try{return tv(e,t,n)}finally{ft.current=i}},useRef:function(e){return Be="useRef",ot(),ov(e)},useState:function(e){Be="useState",ot();var t=ft.current;ft.current=Ls;try{return bh(e)}finally{ft.current=t}},useDebugValue:function(e,t){return Be="useDebugValue",ot(),void 0},useDeferredValue:function(e){return Be="useDeferredValue",ot(),mv(e)},useTransition:function(){return Be="useTransition",ot(),fv()},useMutableSource:function(e,t,n){return Be="useMutableSource",ot(),void 0},useSyncExternalStore:function(e,t,n){return Be="useSyncExternalStore",ot(),rv(e,t,n)},useId:function(){return Be="useId",ot(),pv()},unstable_isNewReconciler:se},nw={readContext:function(e){return di(e)},useCallback:function(e,t){return Be="useCallback",ot(),jh(e,t)},useContext:function(e){return Be="useContext",ot(),di(e)},useEffect:function(e,t){return Be="useEffect",ot(),ru(e,t)},useImperativeHandle:function(e,t,n){return Be="useImperativeHandle",ot(),Ch(e,t,n)},useInsertionEffect:function(e,t){return Be="useInsertionEffect",ot(),Nh(e,t)},useLayoutEffect:function(e,t){return Be="useLayoutEffect",ot(),Sh(e,t)},useMemo:function(e,t){Be="useMemo",ot();var n=ft.current;ft.current=ps;try{return Dh(e,t)}finally{ft.current=n}},useReducer:function(e,t,n){Be="useReducer",ot();var i=ft.current;ft.current=ps;try{return nv(e,t,n)}finally{ft.current=i}},useRef:function(e){return Be="useRef",ot(),yh()},useState:function(e){Be="useState",ot();var t=ft.current;ft.current=ps;try{return sv(e)}finally{ft.current=t}},useDebugValue:function(e,t){return Be="useDebugValue",ot(),Eh()},useDeferredValue:function(e){return Be="useDeferredValue",ot(),$x(e)},useTransition:function(){return Be="useTransition",ot(),qx()},useMutableSource:function(e,t,n){return Be="useMutableSource",ot(),void 0},useSyncExternalStore:function(e,t,n){return Be="useSyncExternalStore",ot(),_h(e,t)},useId:function(){return Be="useId",ot(),kh()},unstable_isNewReconciler:se},iw={readContext:function(e){return di(e)},useCallback:function(e,t){return Be="useCallback",ot(),jh(e,t)},useContext:function(e){return Be="useContext",ot(),di(e)},useEffect:function(e,t){return Be="useEffect",ot(),ru(e,t)},useImperativeHandle:function(e,t,n){return Be="useImperativeHandle",ot(),Ch(e,t,n)},useInsertionEffect:function(e,t){return Be="useInsertionEffect",ot(),Nh(e,t)},useLayoutEffect:function(e,t){return Be="useLayoutEffect",ot(),Sh(e,t)},useMemo:function(e,t){Be="useMemo",ot();var n=ft.current;ft.current=Th;try{return Dh(e,t)}finally{ft.current=n}},useReducer:function(e,t,n){Be="useReducer",ot();var i=ft.current;ft.current=Th;try{return iv(e,t,n)}finally{ft.current=i}},useRef:function(e){return Be="useRef",ot(),yh()},useState:function(e){Be="useState",ot();var t=ft.current;ft.current=Th;try{return av(e)}finally{ft.current=t}},useDebugValue:function(e,t){return Be="useDebugValue",ot(),Eh()},useDeferredValue:function(e){return Be="useDeferredValue",ot(),Wx(e)},useTransition:function(){return Be="useTransition",ot(),Yx()},useMutableSource:function(e,t,n){return Be="useMutableSource",ot(),void 0},useSyncExternalStore:function(e,t,n){return Be="useSyncExternalStore",ot(),_h(e,t)},useId:function(){return Be="useId",ot(),kh()},unstable_isNewReconciler:se},Ls={readContext:function(e){return vv(),di(e)},useCallback:function(e,t){return Be="useCallback",Gt(),En(),dv(e,t)},useContext:function(e){return Be="useContext",Gt(),En(),di(e)},useEffect:function(e,t){return Be="useEffect",Gt(),En(),wh(e,t)},useImperativeHandle:function(e,t,n){return Be="useImperativeHandle",Gt(),En(),uv(e,t,n)},useInsertionEffect:function(e,t){return Be="useInsertionEffect",Gt(),En(),lv(e,t)},useLayoutEffect:function(e,t){return Be="useLayoutEffect",Gt(),En(),cv(e,t)},useMemo:function(e,t){Be="useMemo",Gt(),En();var n=ft.current;ft.current=Ls;try{return hv(e,t)}finally{ft.current=n}},useReducer:function(e,t,n){Be="useReducer",Gt(),En();var i=ft.current;ft.current=Ls;try{return tv(e,t,n)}finally{ft.current=i}},useRef:function(e){return Be="useRef",Gt(),En(),ov(e)},useState:function(e){Be="useState",Gt(),En();var t=ft.current;ft.current=Ls;try{return bh(e)}finally{ft.current=t}},useDebugValue:function(e,t){return Be="useDebugValue",Gt(),En(),void 0},useDeferredValue:function(e){return Be="useDeferredValue",Gt(),En(),mv(e)},useTransition:function(){return Be="useTransition",Gt(),En(),fv()},useMutableSource:function(e,t,n){return Be="useMutableSource",Gt(),En(),void 0},useSyncExternalStore:function(e,t,n){return Be="useSyncExternalStore",Gt(),En(),rv(e,t,n)},useId:function(){return Be="useId",Gt(),En(),pv()},unstable_isNewReconciler:se},ps={readContext:function(e){return vv(),di(e)},useCallback:function(e,t){return Be="useCallback",Gt(),ot(),jh(e,t)},useContext:function(e){return Be="useContext",Gt(),ot(),di(e)},useEffect:function(e,t){return Be="useEffect",Gt(),ot(),ru(e,t)},useImperativeHandle:function(e,t,n){return Be="useImperativeHandle",Gt(),ot(),Ch(e,t,n)},useInsertionEffect:function(e,t){return Be="useInsertionEffect",Gt(),ot(),Nh(e,t)},useLayoutEffect:function(e,t){return Be="useLayoutEffect",Gt(),ot(),Sh(e,t)},useMemo:function(e,t){Be="useMemo",Gt(),ot();var n=ft.current;ft.current=ps;try{return Dh(e,t)}finally{ft.current=n}},useReducer:function(e,t,n){Be="useReducer",Gt(),ot();var i=ft.current;ft.current=ps;try{return nv(e,t,n)}finally{ft.current=i}},useRef:function(e){return Be="useRef",Gt(),ot(),yh()},useState:function(e){Be="useState",Gt(),ot();var t=ft.current;ft.current=ps;try{return sv(e)}finally{ft.current=t}},useDebugValue:function(e,t){return Be="useDebugValue",Gt(),ot(),Eh()},useDeferredValue:function(e){return Be="useDeferredValue",Gt(),ot(),$x(e)},useTransition:function(){return Be="useTransition",Gt(),ot(),qx()},useMutableSource:function(e,t,n){return Be="useMutableSource",Gt(),ot(),void 0},useSyncExternalStore:function(e,t,n){return Be="useSyncExternalStore",Gt(),ot(),_h(e,t)},useId:function(){return Be="useId",Gt(),ot(),kh()},unstable_isNewReconciler:se},Th={readContext:function(e){return vv(),di(e)},useCallback:function(e,t){return Be="useCallback",Gt(),ot(),jh(e,t)},useContext:function(e){return Be="useContext",Gt(),ot(),di(e)},useEffect:function(e,t){return Be="useEffect",Gt(),ot(),ru(e,t)},useImperativeHandle:function(e,t,n){return Be="useImperativeHandle",Gt(),ot(),Ch(e,t,n)},useInsertionEffect:function(e,t){return Be="useInsertionEffect",Gt(),ot(),Nh(e,t)},useLayoutEffect:function(e,t){return Be="useLayoutEffect",Gt(),ot(),Sh(e,t)},useMemo:function(e,t){Be="useMemo",Gt(),ot();var n=ft.current;ft.current=ps;try{return Dh(e,t)}finally{ft.current=n}},useReducer:function(e,t,n){Be="useReducer",Gt(),ot();var i=ft.current;ft.current=ps;try{return iv(e,t,n)}finally{ft.current=i}},useRef:function(e){return Be="useRef",Gt(),ot(),yh()},useState:function(e){Be="useState",Gt(),ot();var t=ft.current;ft.current=ps;try{return av(e)}finally{ft.current=t}},useDebugValue:function(e,t){return Be="useDebugValue",Gt(),ot(),Eh()},useDeferredValue:function(e){return Be="useDeferredValue",Gt(),ot(),Wx(e)},useTransition:function(){return Be="useTransition",Gt(),ot(),Yx()},useMutableSource:function(e,t,n){return Be="useMutableSource",Gt(),ot(),void 0},useSyncExternalStore:function(e,t,n){return Be="useSyncExternalStore",Gt(),ot(),_h(e,t)},useId:function(){return Be="useId",Gt(),ot(),kh()},unstable_isNewReconciler:se}}var Ma=s.unstable_now,rw=0,Lh=-1,su=-1,Ah=-1,gv=!1,Mh=!1;function sw(){return gv}function vT(){Mh=!0}function gT(){gv=!1,Mh=!1}function _T(){gv=Mh,Mh=!1}function aw(){return rw}function ow(){rw=Ma()}function _v(e){su=Ma(),e.actualStartTime<0&&(e.actualStartTime=Ma())}function lw(e){su=-1}function Uh(e,t){if(su>=0){var n=Ma()-su;e.actualDuration+=n,t&&(e.selfBaseDuration=n),su=-1}}function As(e){if(Lh>=0){var t=Ma()-Lh;Lh=-1;for(var n=e.return;n!==null;){switch(n.tag){case h:var i=n.stateNode;i.effectDuration+=t;return;case S:var u=n.stateNode;u.effectDuration+=t;return}n=n.return}}}function bv(e){if(Ah>=0){var t=Ma()-Ah;Ah=-1;for(var n=e.return;n!==null;){switch(n.tag){case h:var i=n.stateNode;i!==null&&(i.passiveEffectDuration+=t);return;case S:var u=n.stateNode;u!==null&&(u.passiveEffectDuration+=t);return}n=n.return}}}function Ms(){Lh=Ma()}function yv(){Ah=Ma()}function xv(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function vs(e,t){if(e&&e.defaultProps){var n=Ft({},t),i=e.defaultProps;for(var u in i)n[u]===void 0&&(n[u]=i[u]);return n}return t}var wv={},Nv,Sv,Cv,Ev,jv,cw,Oh,Dv,kv,Rv,au;{Nv=new Set,Sv=new Set,Cv=new Set,Ev=new Set,Dv=new Set,jv=new Set,kv=new Set,Rv=new Set,au=new Set;var uw=new Set;Oh=function(e,t){if(!(e===null||typeof e=="function")){var n=t+"_"+e;uw.has(n)||(uw.add(n),y("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},cw=function(e,t){if(t===void 0){var n=cn(e)||"Component";jv.has(n)||(jv.add(n),y("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))}},Object.defineProperty(wv,"_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(wv)}function Tv(e,t,n,i){var u=e.memoizedState,w=n(i,u);{if(e.mode&ti){ji(!0);try{w=n(i,u)}finally{ji(!1)}}cw(t,w)}var T=w==null?u:Ft({},u,w);if(e.memoizedState=T,e.lanes===Ge){var V=e.updateQueue;V.baseState=T}}var Lv={isMounted:cE,enqueueSetState:function(e,t,n){var i=Yo(e),u=cr(),w=Va(i),T=na(u,w);T.payload=t,n!=null&&(Oh(n,"setState"),T.callback=n);var V=Ra(i,T,w);V!==null&&(Ni(V,i,w,u),dh(V,i,w)),cf(i,w)},enqueueReplaceState:function(e,t,n){var i=Yo(e),u=cr(),w=Va(i),T=na(u,w);T.tag=jx,T.payload=t,n!=null&&(Oh(n,"replaceState"),T.callback=n);var V=Ra(i,T,w);V!==null&&(Ni(V,i,w,u),dh(V,i,w)),cf(i,w)},enqueueForceUpdate:function(e,t){var n=Yo(e),i=cr(),u=Va(n),w=na(i,u);w.tag=lh,t!=null&&(Oh(t,"forceUpdate"),w.callback=t);var T=Ra(n,w,u);T!==null&&(Ni(T,n,u,i),dh(T,n,u)),BE(n,u)}};function dw(e,t,n,i,u,w,T){var V=e.stateNode;if(typeof V.shouldComponentUpdate=="function"){var H=V.shouldComponentUpdate(i,w,T);{if(e.mode&ti){ji(!0);try{H=V.shouldComponentUpdate(i,w,T)}finally{ji(!1)}}H===void 0&&y("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",cn(t)||"Component")}return H}return t.prototype&&t.prototype.isPureReactComponent?!Dc(n,i)||!Dc(u,w):!0}function bT(e,t,n){var i=e.stateNode;{var u=cn(t)||"Component",w=i.render;w||(t.prototype&&typeof t.prototype.render=="function"?y("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",u):y("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",u)),i.getInitialState&&!i.getInitialState.isReactClassApproved&&!i.state&&y("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?",u),i.getDefaultProps&&!i.getDefaultProps.isReactClassApproved&&y("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.",u),i.propTypes&&y("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",u),i.contextType&&y("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",u),t.childContextTypes&&!au.has(t)&&(e.mode&ti)===Mt&&(au.add(t),y(`%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`,u)),t.contextTypes&&!au.has(t)&&(e.mode&ti)===Mt&&(au.add(t),y(`%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`,u)),i.contextTypes&&y("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",u),t.contextType&&t.contextTypes&&!kv.has(t)&&(kv.add(t),y("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",u)),typeof i.componentShouldUpdate=="function"&&y("%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.",u),t.prototype&&t.prototype.isPureReactComponent&&typeof i.shouldComponentUpdate<"u"&&y("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",cn(t)||"A pure component"),typeof i.componentDidUnmount=="function"&&y("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",u),typeof i.componentDidReceiveProps=="function"&&y("%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().",u),typeof i.componentWillRecieveProps=="function"&&y("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",u),typeof i.UNSAFE_componentWillRecieveProps=="function"&&y("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",u);var T=i.props!==n;i.props!==void 0&&T&&y("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",u,u),i.defaultProps&&y("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",u,u),typeof i.getSnapshotBeforeUpdate=="function"&&typeof i.componentDidUpdate!="function"&&!Cv.has(t)&&(Cv.add(t),y("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",cn(t))),typeof i.getDerivedStateFromProps=="function"&&y("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",u),typeof i.getDerivedStateFromError=="function"&&y("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",u),typeof t.getSnapshotBeforeUpdate=="function"&&y("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",u);var V=i.state;V&&(typeof V!="object"||kt(V))&&y("%s.state: must be set to an object or null",u),typeof i.getChildContext=="function"&&typeof t.childContextTypes!="object"&&y("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",u)}}function hw(e,t){t.updater=Lv,e.stateNode=t,sE(t,e),t._reactInternalInstance=wv}function mw(e,t,n){var i=!1,u=Lr,w=Lr,T=t.contextType;if("contextType"in t){var V=T===null||T!==void 0&&T.$$typeof===tt&&T._context===void 0;if(!V&&!Rv.has(t)){Rv.add(t);var H="";T===void 0?H=" 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 T!="object"?H=" However, it is set to a "+typeof T+".":T.$$typeof===ze?H=" Did you accidentally pass the Context.Provider instead?":T._context!==void 0?H=" Did you accidentally pass the Context.Consumer instead?":H=" However, it is set to an object with keys {"+Object.keys(T).join(", ")+"}.",y("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",cn(t)||"Component",H)}}if(typeof T=="object"&&T!==null)w=di(T);else{u=ml(e,t,!0);var q=t.contextTypes;i=q!=null,w=i?fl(e,u):Lr}var Z=new t(n,w);if(e.mode&ti){ji(!0);try{Z=new t(n,w)}finally{ji(!1)}}var pe=e.memoizedState=Z.state!==null&&Z.state!==void 0?Z.state:null;hw(e,Z);{if(typeof t.getDerivedStateFromProps=="function"&&pe===null){var fe=cn(t)||"Component";Sv.has(fe)||(Sv.add(fe),y("`%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.",fe,Z.state===null?"null":"undefined",fe))}if(typeof t.getDerivedStateFromProps=="function"||typeof Z.getSnapshotBeforeUpdate=="function"){var je=null,De=null,Oe=null;if(typeof Z.componentWillMount=="function"&&Z.componentWillMount.__suppressDeprecationWarning!==!0?je="componentWillMount":typeof Z.UNSAFE_componentWillMount=="function"&&(je="UNSAFE_componentWillMount"),typeof Z.componentWillReceiveProps=="function"&&Z.componentWillReceiveProps.__suppressDeprecationWarning!==!0?De="componentWillReceiveProps":typeof Z.UNSAFE_componentWillReceiveProps=="function"&&(De="UNSAFE_componentWillReceiveProps"),typeof Z.componentWillUpdate=="function"&&Z.componentWillUpdate.__suppressDeprecationWarning!==!0?Oe="componentWillUpdate":typeof Z.UNSAFE_componentWillUpdate=="function"&&(Oe="UNSAFE_componentWillUpdate"),je!==null||De!==null||Oe!==null){var ut=cn(t)||"Component",At=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";Ev.has(ut)||(Ev.add(ut),y(`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`,ut,At,je!==null?`
|
|
153
|
+
`+je:"",De!==null?`
|
|
154
|
+
`+De:"",Oe!==null?`
|
|
155
|
+
`+Oe:""))}}}return i&&nx(e,u,w),Z}function yT(e,t){var n=t.state;typeof t.componentWillMount=="function"&&t.componentWillMount(),typeof t.UNSAFE_componentWillMount=="function"&&t.UNSAFE_componentWillMount(),n!==t.state&&(y("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",St(e)||"Component"),Lv.enqueueReplaceState(t,t.state,null))}function fw(e,t,n,i){var u=t.state;if(typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==u){{var w=St(e)||"Component";Nv.has(w)||(Nv.add(w),y("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",w))}Lv.enqueueReplaceState(t,t.state,null)}}function Av(e,t,n,i){bT(e,t,n);var u=e.stateNode;u.props=n,u.state=e.memoizedState,u.refs={},Hp(e);var w=t.contextType;if(typeof w=="object"&&w!==null)u.context=di(w);else{var T=ml(e,t,!0);u.context=fl(e,T)}{if(u.state===n){var V=cn(t)||"Component";Dv.has(V)||(Dv.add(V),y("%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.",V))}e.mode&ti&&ms.recordLegacyContextWarning(e,u),ms.recordUnsafeLifecycleWarnings(e,u)}u.state=e.memoizedState;var H=t.getDerivedStateFromProps;if(typeof H=="function"&&(Tv(e,t,H,n),u.state=e.memoizedState),typeof t.getDerivedStateFromProps!="function"&&typeof u.getSnapshotBeforeUpdate!="function"&&(typeof u.UNSAFE_componentWillMount=="function"||typeof u.componentWillMount=="function")&&(yT(e,u),hh(e,n,u,i),u.state=e.memoizedState),typeof u.componentDidMount=="function"){var q=Sn;q|=Ja,(e.mode&Es)!==Mt&&(q|=_a),e.flags|=q}}function xT(e,t,n,i){var u=e.stateNode,w=e.memoizedProps;u.props=w;var T=u.context,V=t.contextType,H=Lr;if(typeof V=="object"&&V!==null)H=di(V);else{var q=ml(e,t,!0);H=fl(e,q)}var Z=t.getDerivedStateFromProps,pe=typeof Z=="function"||typeof u.getSnapshotBeforeUpdate=="function";!pe&&(typeof u.UNSAFE_componentWillReceiveProps=="function"||typeof u.componentWillReceiveProps=="function")&&(w!==n||T!==H)&&fw(e,u,n,H),kx();var fe=e.memoizedState,je=u.state=fe;if(hh(e,n,u,i),je=e.memoizedState,w===n&&fe===je&&!qd()&&!mh()){if(typeof u.componentDidMount=="function"){var De=Sn;De|=Ja,(e.mode&Es)!==Mt&&(De|=_a),e.flags|=De}return!1}typeof Z=="function"&&(Tv(e,t,Z,n),je=e.memoizedState);var Oe=mh()||dw(e,t,w,n,fe,je,H);if(Oe){if(!pe&&(typeof u.UNSAFE_componentWillMount=="function"||typeof u.componentWillMount=="function")&&(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"){var ut=Sn;ut|=Ja,(e.mode&Es)!==Mt&&(ut|=_a),e.flags|=ut}}else{if(typeof u.componentDidMount=="function"){var At=Sn;At|=Ja,(e.mode&Es)!==Mt&&(At|=_a),e.flags|=At}e.memoizedProps=n,e.memoizedState=je}return u.props=n,u.state=je,u.context=H,Oe}function wT(e,t,n,i,u){var w=t.stateNode;Dx(e,t);var T=t.memoizedProps,V=t.type===t.elementType?T:vs(t.type,T);w.props=V;var H=t.pendingProps,q=w.context,Z=n.contextType,pe=Lr;if(typeof Z=="object"&&Z!==null)pe=di(Z);else{var fe=ml(t,n,!0);pe=fl(t,fe)}var je=n.getDerivedStateFromProps,De=typeof je=="function"||typeof w.getSnapshotBeforeUpdate=="function";!De&&(typeof w.UNSAFE_componentWillReceiveProps=="function"||typeof w.componentWillReceiveProps=="function")&&(T!==H||q!==pe)&&fw(t,w,i,pe),kx();var Oe=t.memoizedState,ut=w.state=Oe;if(hh(t,i,w,u),ut=t.memoizedState,T===H&&Oe===ut&&!qd()&&!mh()&&!I)return typeof w.componentDidUpdate=="function"&&(T!==e.memoizedProps||Oe!==e.memoizedState)&&(t.flags|=Sn),typeof w.getSnapshotBeforeUpdate=="function"&&(T!==e.memoizedProps||Oe!==e.memoizedState)&&(t.flags|=Xo),!1;typeof je=="function"&&(Tv(t,n,je,i),ut=t.memoizedState);var At=mh()||dw(t,n,V,i,Oe,ut,pe)||I;return At?(!De&&(typeof w.UNSAFE_componentWillUpdate=="function"||typeof w.componentWillUpdate=="function")&&(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(i,ut,pe),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(i,ut,pe)),typeof w.componentDidUpdate=="function"&&(t.flags|=Sn),typeof w.getSnapshotBeforeUpdate=="function"&&(t.flags|=Xo)):(typeof w.componentDidUpdate=="function"&&(T!==e.memoizedProps||Oe!==e.memoizedState)&&(t.flags|=Sn),typeof w.getSnapshotBeforeUpdate=="function"&&(T!==e.memoizedProps||Oe!==e.memoizedState)&&(t.flags|=Xo),t.memoizedProps=i,t.memoizedState=ut),w.props=i,w.state=ut,w.context=pe,At}function vo(e,t){return{value:e,source:t,stack:vr(t),digest:null}}function Mv(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function NT(e,t){return!0}function Uv(e,t){try{var n=NT(e,t);if(n===!1)return;var i=t.value,u=t.source,w=t.stack,T=w!==null?w:"";if(i!=null&&i._suppressLogging){if(e.tag===g)return;console.error(i)}var V=u?St(u):null,H=V?"The above error occurred in the <"+V+"> component:":"The above error occurred in one of your React components:",q;if(e.tag===h)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 Z=St(e)||"Anonymous";q="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+Z+".")}var pe=H+`
|
|
157
|
+
`+T+`
|
|
158
|
+
|
|
159
|
+
`+(""+q);console.error(pe)}catch(fe){setTimeout(function(){throw fe})}}var ST=typeof WeakMap=="function"?WeakMap:Map;function pw(e,t,n){var i=na(Gn,n);i.tag=Bp,i.payload={element:null};var u=t.value;return i.callback=function(){vL(u),Uv(e,t)},i}function Ov(e,t,n){var i=na(Gn,n);i.tag=Bp;var u=e.type.getDerivedStateFromError;if(typeof u=="function"){var w=t.value;i.payload=function(){return u(w)},i.callback=function(){E0(e),Uv(e,t)}}var T=e.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(i.callback=function(){E0(e),Uv(e,t),typeof u!="function"&&fL(this);var H=t.value,q=t.stack;this.componentDidCatch(H,{componentStack:q!==null?q:""}),typeof u!="function"&&(Dr(e.lanes,Wt)||y("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",St(e)||"Unknown"))}),i}function vw(e,t,n){var i=e.pingCache,u;if(i===null?(i=e.pingCache=new ST,u=new Set,i.set(t,u)):(u=i.get(t),u===void 0&&(u=new Set,i.set(t,u))),!u.has(n)){u.add(n);var w=gL.bind(null,e,t,n);cs&&Nu(e,n),t.then(w,w)}}function CT(e,t,n,i){var u=e.updateQueue;if(u===null){var w=new Set;w.add(n),e.updateQueue=w}else u.add(n)}function ET(e,t){var n=e.tag;if((e.mode&mn)===Mt&&(n===d||n===p||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 gw(e){var t=e;do{if(t.tag===k&&aT(t))return t;t=t.return}while(t!==null);return null}function _w(e,t,n,i,u){if((e.mode&mn)===Mt){if(e===t)e.flags|=ar;else{if(e.flags|=Cn,n.flags|=ef,n.flags&=-52805,n.tag===g){var w=n.alternate;if(w===null)n.tag=L;else{var T=na(Gn,Wt);T.tag=lh,Ra(n,T,Wt)}}n.lanes=nn(n.lanes,Wt)}return e}return e.flags|=ar,e.lanes=u,e}function jT(e,t,n,i,u){if(n.flags|=dd,cs&&Nu(e,u),i!==null&&typeof i=="object"&&typeof i.then=="function"){var w=i;ET(n),Ui()&&n.mode&mn&&cx();var T=gw(t);if(T!==null){T.flags&=~Ws,_w(T,t,n,e,u),T.mode&mn&&vw(e,w,u),CT(T,e,w);return}else{if(!KE(u)){vw(e,w,u),pg();return}var V=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=V}}else if(Ui()&&n.mode&mn){cx();var H=gw(t);if(H!==null){(H.flags&ar)===It&&(H.flags|=Ws),_w(H,t,n,e,u),Dp(vo(i,n));return}}i=vo(i,n),aL(i);var q=t;do{switch(q.tag){case h:{var Z=i;q.flags|=ar;var pe=mc(u);q.lanes=nn(q.lanes,pe);var fe=pw(q,Z,pe);zp(q,fe);return}case g:var je=i,De=q.type,Oe=q.stateNode;if((q.flags&Cn)===It&&(typeof De.getDerivedStateFromError=="function"||Oe!==null&&typeof Oe.componentDidCatch=="function"&&!g0(Oe))){q.flags|=ar;var ut=mc(u);q.lanes=nn(q.lanes,ut);var At=Ov(q,je,ut);zp(q,At);return}break}q=q.return}while(q!==null)}function DT(){return null}var ou=c.ReactCurrentOwner,gs=!1,Pv,lu,Vv,Iv,Bv,go,Fv,Ph,cu;Pv={},lu={},Vv={},Iv={},Bv={},go=!1,Fv={},Ph={},cu={};function or(e,t,n,i){e===null?t.child=xx(t,null,n,i):t.child=_l(t,e.child,n,i)}function kT(e,t,n,i){t.child=_l(t,e.child,null,i),t.child=_l(t,null,n,i)}function bw(e,t,n,i,u){if(t.type!==t.elementType){var w=n.propTypes;w&&ds(w,i,"prop",cn(n))}var T=n.render,V=t.ref,H,q;yl(t,u),oc(t);{if(ou.current=t,ei(!0),H=El(e,t,T,i,V,u),q=jl(),t.mode&ti){ji(!0);try{H=El(e,t,T,i,V,u),q=jl()}finally{ji(!1)}}ei(!1)}return Qo(),e!==null&&!gs?(Ux(e,t,u),ia(e,t,u)):(Ui()&&q&&wp(t),t.flags|=Ko,or(e,t,H,u),t.child)}function yw(e,t,n,i,u){if(e===null){var w=n.type;if(ML(w)&&n.compare===null&&n.defaultProps===void 0){var T=w;return T=Ul(w),t.tag=A,t.type=T,$v(t,w),xw(e,t,T,i,u)}{var V=w.propTypes;if(V&&ds(V,i,"prop",cn(w)),n.defaultProps!==void 0){var H=cn(w)||"Unknown";cu[H]||(y("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",H),cu[H]=!0)}}var q=Eg(n.type,null,i,t,t.mode,u);return q.ref=t.ref,q.return=t,t.child=q,q}{var Z=n.type,pe=Z.propTypes;pe&&ds(pe,i,"prop",cn(Z))}var fe=e.child,je=Xv(e,u);if(!je){var De=fe.memoizedProps,Oe=n.compare;if(Oe=Oe!==null?Oe:Dc,Oe(De,i)&&e.ref===t.ref)return ia(e,t,u)}t.flags|=Ko;var ut=wo(fe,i);return ut.ref=t.ref,ut.return=t,t.child=ut,ut}function xw(e,t,n,i,u){if(t.type!==t.elementType){var w=t.elementType;if(w.$$typeof===gt){var T=w,V=T._payload,H=T._init;try{w=H(V)}catch{w=null}var q=w&&w.propTypes;q&&ds(q,i,"prop",cn(w))}}if(e!==null){var Z=e.memoizedProps;if(Dc(Z,i)&&e.ref===t.ref&&t.type===e.type)if(gs=!1,t.pendingProps=i=Z,Xv(e,u))(e.flags&ef)!==It&&(gs=!0);else return t.lanes=e.lanes,ia(e,t,u)}return Hv(e,t,n,i,u)}function ww(e,t,n){var i=t.pendingProps,u=i.children,w=e!==null?e.memoizedState:null;if(i.mode==="hidden"||W)if((t.mode&mn)===Mt){var T={baseLanes:Ge,cachePool:null,transitions:null};t.memoizedState=T,Xh(t,n)}else if(Dr(n,jr)){var pe={baseLanes:Ge,cachePool:null,transitions:null};t.memoizedState=pe;var fe=w!==null?w.baseLanes:n;Xh(t,fe)}else{var V=null,H;if(w!==null){var q=w.baseLanes;H=nn(q,n)}else H=n;t.lanes=t.childLanes=jr;var Z={baseLanes:H,cachePool:V,transitions:null};return t.memoizedState=Z,t.updateQueue=null,Xh(t,H),null}else{var je;w!==null?(je=nn(w.baseLanes,n),t.memoizedState=null):je=n,Xh(t,je)}return or(e,t,u,n),t.child}function RT(e,t,n){var i=t.pendingProps;return or(e,t,i,n),t.child}function TT(e,t,n){var i=t.pendingProps.children;return or(e,t,i,n),t.child}function LT(e,t,n){{t.flags|=Sn;{var i=t.stateNode;i.effectDuration=0,i.passiveEffectDuration=0}}var u=t.pendingProps,w=u.children;return or(e,t,w,n),t.child}function Nw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=Ka,t.flags|=tf)}function Hv(e,t,n,i,u){if(t.type!==t.elementType){var w=n.propTypes;w&&ds(w,i,"prop",cn(n))}var T;{var V=ml(t,n,!0);T=fl(t,V)}var H,q;yl(t,u),oc(t);{if(ou.current=t,ei(!0),H=El(e,t,n,i,T,u),q=jl(),t.mode&ti){ji(!0);try{H=El(e,t,n,i,T,u),q=jl()}finally{ji(!1)}}ei(!1)}return Qo(),e!==null&&!gs?(Ux(e,t,u),ia(e,t,u)):(Ui()&&q&&wp(t),t.flags|=Ko,or(e,t,H,u),t.child)}function Sw(e,t,n,i,u){{switch(KL(t)){case!1:{var w=t.stateNode,T=t.type,V=new T(t.memoizedProps,w.context),H=V.state;w.updater.enqueueSetState(w,H,null);break}case!0:{t.flags|=Cn,t.flags|=ar;var q=new Error("Simulated error coming from DevTools"),Z=mc(u);t.lanes=nn(t.lanes,Z);var pe=Ov(t,vo(q,t),Z);zp(t,pe);break}}if(t.type!==t.elementType){var fe=n.propTypes;fe&&ds(fe,i,"prop",cn(n))}}var je;ks(n)?(je=!0,Kd(t)):je=!1,yl(t,u);var De=t.stateNode,Oe;De===null?(Ih(e,t),mw(t,n,i),Av(t,n,i,u),Oe=!0):e===null?Oe=xT(t,n,i,u):Oe=wT(e,t,n,i,u);var ut=zv(e,t,n,Oe,je,u);{var At=t.stateNode;Oe&&At.props!==i&&(go||y("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",St(t)||"a component"),go=!0)}return ut}function zv(e,t,n,i,u,w){Nw(e,t);var T=(t.flags&Cn)!==It;if(!i&&!T)return u&&sx(t,n,!1),ia(e,t,w);var V=t.stateNode;ou.current=t;var H;if(T&&typeof n.getDerivedStateFromError!="function")H=null,lw();else{oc(t);{if(ei(!0),H=V.render(),t.mode&ti){ji(!0);try{V.render()}finally{ji(!1)}}ei(!1)}Qo()}return t.flags|=Ko,e!==null&&T?kT(e,t,H,w):or(e,t,H,w),t.memoizedState=V.state,u&&sx(t,n,!0),t.child}function Cw(e){var t=e.stateNode;t.pendingContext?ix(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ix(e,t.context,!1),$p(e,t.containerInfo)}function AT(e,t,n){if(Cw(t),e===null)throw new Error("Should have a current fiber. This is a bug in React.");var i=t.pendingProps,u=t.memoizedState,w=u.element;Dx(e,t),hh(t,i,null,n);var T=t.memoizedState;t.stateNode;var V=T.element;if(u.isDehydrated){var H={element:V,isDehydrated:!1,cache:T.cache,pendingSuspenseBoundaries:T.pendingSuspenseBoundaries,transitions:T.transitions},q=t.updateQueue;if(q.baseState=H,t.memoizedState=H,t.flags&Ws){var Z=vo(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 Ew(e,t,V,n,Z)}else if(V!==w){var pe=vo(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t);return Ew(e,t,V,n,pe)}else{OR(t);var fe=xx(t,null,V,n);t.child=fe;for(var je=fe;je;)je.flags=je.flags&~ui|Gs,je=je.sibling}}else{if(gl(),V===w)return ia(e,t,n);or(e,t,V,n)}return t.child}function Ew(e,t,n,i,u){return gl(),Dp(u),t.flags|=Ws,or(e,t,n,i),t.child}function MT(e,t,n){Lx(t),e===null&&jp(t);var i=t.type,u=t.pendingProps,w=e!==null?e.memoizedProps:null,T=u.children,V=lp(i,u);return V?T=null:w!==null&&lp(i,w)&&(t.flags|=sc),Nw(e,t),or(e,t,T,n),t.child}function UT(e,t){return e===null&&jp(t),null}function OT(e,t,n,i){Ih(e,t);var u=t.pendingProps,w=n,T=w._payload,V=w._init,H=V(T);t.type=H;var q=t.tag=UL(H),Z=vs(H,u),pe;switch(q){case d:return $v(t,H),t.type=H=Ul(H),pe=Hv(null,t,H,Z,i),pe;case g:return t.type=H=yg(H),pe=Sw(null,t,H,Z,i),pe;case p:return t.type=H=xg(H),pe=bw(null,t,H,Z,i),pe;case j:{if(t.type!==t.elementType){var fe=H.propTypes;fe&&ds(fe,Z,"prop",cn(H))}return pe=yw(null,t,H,vs(H.type,Z),i),pe}}var je="";throw H!==null&&typeof H=="object"&&H.$$typeof===gt&&(je=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+H+". "+("Lazy element type must resolve to a class or function."+je))}function PT(e,t,n,i,u){Ih(e,t),t.tag=g;var w;return ks(n)?(w=!0,Kd(t)):w=!1,yl(t,u),mw(t,n,i),Av(t,n,i,u),zv(null,t,n,!0,w,u)}function VT(e,t,n,i){Ih(e,t);var u=t.pendingProps,w;{var T=ml(t,n,!1);w=fl(t,T)}yl(t,i);var V,H;oc(t);{if(n.prototype&&typeof n.prototype.render=="function"){var q=cn(n)||"Unknown";Pv[q]||(y("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),Pv[q]=!0)}t.mode&ti&&ms.recordLegacyContextWarning(t,null),ei(!0),ou.current=t,V=El(null,t,n,u,w,i),H=jl(),ei(!1)}if(Qo(),t.flags|=Ko,typeof V=="object"&&V!==null&&typeof V.render=="function"&&V.$$typeof===void 0){var Z=cn(n)||"Unknown";lu[Z]||(y("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.",Z,Z,Z),lu[Z]=!0)}if(typeof V=="object"&&V!==null&&typeof V.render=="function"&&V.$$typeof===void 0){{var pe=cn(n)||"Unknown";lu[pe]||(y("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.",pe,pe,pe),lu[pe]=!0)}t.tag=g,t.memoizedState=null,t.updateQueue=null;var fe=!1;return ks(n)?(fe=!0,Kd(t)):fe=!1,t.memoizedState=V.state!==null&&V.state!==void 0?V.state:null,Hp(t),hw(t,V),Av(t,n,u,i),zv(null,t,n,!0,fe,i)}else{if(t.tag=d,t.mode&ti){ji(!0);try{V=El(null,t,n,u,w,i),H=jl()}finally{ji(!1)}}return Ui()&&H&&wp(t),or(null,t,V,i),$v(t,n),t.child}}function $v(e,t){{if(t&&t.childContextTypes&&y("%s(...): childContextTypes cannot be defined on a function component.",t.displayName||t.name||"Component"),e.ref!==null){var n="",i=Sr();i&&(n+=`
|
|
160
|
+
|
|
161
|
+
Check the render method of \``+i+"`.");var u=i||"",w=e._debugSource;w&&(u=w.fileName+":"+w.lineNumber),Bv[u]||(Bv[u]=!0,y("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 T=cn(t)||"Unknown";cu[T]||(y("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",T),cu[T]=!0)}if(typeof t.getDerivedStateFromProps=="function"){var V=cn(t)||"Unknown";Iv[V]||(y("%s: Function components do not support getDerivedStateFromProps.",V),Iv[V]=!0)}if(typeof t.contextType=="object"&&t.contextType!==null){var H=cn(t)||"Unknown";Vv[H]||(y("%s: Function components do not support contextType.",H),Vv[H]=!0)}}}var Wv={dehydrated:null,treeContext:null,retryLane:Di};function Gv(e){return{baseLanes:e,cachePool:DT(),transitions:null}}function IT(e,t){var n=null;return{baseLanes:nn(e.baseLanes,t),cachePool:n,transitions:e.transitions}}function BT(e,t,n,i){if(t!==null){var u=t.memoizedState;if(u===null)return!1}return qp(e,Zc)}function FT(e,t){return _d(e.childLanes,t)}function jw(e,t,n){var i=t.pendingProps;XL(t)&&(t.flags|=Cn);var u=fs.current,w=!1,T=(t.flags&Cn)!==It;if(T||BT(u,e)?(w=!0,t.flags&=~Cn):(e===null||e.memoizedState!==null)&&(u=sT(u,Mx)),u=wl(u),La(t,u),e===null){jp(t);var V=t.memoizedState;if(V!==null){var H=V.dehydrated;if(H!==null)return GT(t,H)}var q=i.children,Z=i.fallback;if(w){var pe=HT(t,q,Z,n),fe=t.child;return fe.memoizedState=Gv(n),t.memoizedState=Wv,pe}else return qv(t,q)}else{var je=e.memoizedState;if(je!==null){var De=je.dehydrated;if(De!==null)return qT(e,t,T,i,De,je,n)}if(w){var Oe=i.fallback,ut=i.children,At=$T(e,t,ut,Oe,n),Rt=t.child,pn=e.child.memoizedState;return Rt.memoizedState=pn===null?Gv(n):IT(pn,n),Rt.childLanes=FT(e,n),t.memoizedState=Wv,At}else{var ln=i.children,we=zT(e,t,ln,n);return t.memoizedState=null,we}}}function qv(e,t,n){var i=e.mode,u={mode:"visible",children:t},w=Yv(u,i);return w.return=e,e.child=w,w}function HT(e,t,n,i){var u=e.mode,w=e.child,T={mode:"hidden",children:t},V,H;return(u&mn)===Mt&&w!==null?(V=w,V.childLanes=Ge,V.pendingProps=T,e.mode&Rn&&(V.actualDuration=0,V.actualStartTime=-1,V.selfBaseDuration=0,V.treeBaseDuration=0),H=Ba(n,u,i,null)):(V=Yv(T,u),H=Ba(n,u,i,null)),V.return=e,H.return=e,V.sibling=H,e.child=V,H}function Yv(e,t,n){return D0(e,t,Ge,null)}function Dw(e,t){return wo(e,t)}function zT(e,t,n,i){var u=e.child,w=u.sibling,T=Dw(u,{mode:"visible",children:n});if((t.mode&mn)===Mt&&(T.lanes=i),T.return=t,T.sibling=null,w!==null){var V=t.deletions;V===null?(t.deletions=[w],t.flags|=Ya):V.push(w)}return t.child=T,T}function $T(e,t,n,i,u){var w=t.mode,T=e.child,V=T.sibling,H={mode:"hidden",children:n},q;if((w&mn)===Mt&&t.child!==T){var Z=t.child;q=Z,q.childLanes=Ge,q.pendingProps=H,t.mode&Rn&&(q.actualDuration=0,q.actualStartTime=-1,q.selfBaseDuration=T.selfBaseDuration,q.treeBaseDuration=T.treeBaseDuration),t.deletions=null}else q=Dw(T,H),q.subtreeFlags=T.subtreeFlags&qs;var pe;return V!==null?pe=wo(V,i):(pe=Ba(i,w,u,null),pe.flags|=ui),pe.return=t,q.return=t,q.sibling=pe,t.child=q,pe}function Vh(e,t,n,i){i!==null&&Dp(i),_l(t,e.child,null,n);var u=t.pendingProps,w=u.children,T=qv(t,w);return T.flags|=ui,t.memoizedState=null,T}function WT(e,t,n,i,u){var w=t.mode,T={mode:"visible",children:n},V=Yv(T,w),H=Ba(i,w,u,null);return H.flags|=ui,V.return=t,H.return=t,V.sibling=H,t.child=V,(t.mode&mn)!==Mt&&_l(t,e.child,null,u),H}function GT(e,t,n){return(e.mode&mn)===Mt?(y("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=Wt):hp(t)?e.lanes=eo:e.lanes=jr,null}function qT(e,t,n,i,u,w,T){if(n)if(t.flags&Ws){t.flags&=~Ws;var we=Mv(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return Vh(e,t,T,we)}else{if(t.memoizedState!==null)return t.child=e.child,t.flags|=Cn,null;var Pe=i.children,Ne=i.fallback,Je=WT(e,t,Pe,Ne,T),vt=t.child;return vt.memoizedState=Gv(T),t.memoizedState=Wv,Je}else{if(MR(),(t.mode&mn)===Mt)return Vh(e,t,T,null);if(hp(u)){var V,H,q;{var Z=Jk(u);V=Z.digest,H=Z.message,q=Z.stack}var pe;H?pe=new Error(H):pe=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var fe=Mv(pe,V,q);return Vh(e,t,T,fe)}var je=Dr(T,e.childLanes);if(gs||je){var De=Kh();if(De!==null){var Oe=ij(De,T);if(Oe!==Di&&Oe!==w.retryLane){w.retryLane=Oe;var ut=Gn;br(e,Oe),Ni(De,e,Oe,ut)}}pg();var At=Mv(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 Vh(e,t,T,At)}else if(Jy(u)){t.flags|=Cn,t.child=e.child;var Rt=_L.bind(null,e);return Zk(u,Rt),null}else{PR(t,u,w.treeContext);var pn=i.children,ln=qv(t,pn);return ln.flags|=Gs,ln}}}function kw(e,t,n){e.lanes=nn(e.lanes,t);var i=e.alternate;i!==null&&(i.lanes=nn(i.lanes,t)),Vp(e.return,t,n)}function YT(e,t,n){for(var i=t;i!==null;){if(i.tag===k){var u=i.memoizedState;u!==null&&kw(i,n,e)}else if(i.tag===F)kw(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 KT(e){for(var t=e,n=null;t!==null;){var i=t.alternate;i!==null&&vh(i)===null&&(n=t),t=t.sibling}return n}function XT(e){if(e!==void 0&&e!=="forwards"&&e!=="backwards"&&e!=="together"&&!Fv[e])if(Fv[e]=!0,typeof e=="string")switch(e.toLowerCase()){case"together":case"forwards":case"backwards":{y('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',e,e.toLowerCase());break}case"forward":case"backward":{y('"%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:y('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e);break}else y('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}function JT(e,t){e!==void 0&&!Ph[e]&&(e!=="collapsed"&&e!=="hidden"?(Ph[e]=!0,y('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):t!=="forwards"&&t!=="backwards"&&(Ph[e]=!0,y('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}function Rw(e,t){{var n=kt(e),i=!n&&typeof ri(e)=="function";if(n||i){var u=n?"array":"iterable";return y("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>",u,t,u),!1}}return!0}function ZT(e,t){if((t==="forwards"||t==="backwards")&&e!==void 0&&e!==null&&e!==!1)if(kt(e)){for(var n=0;n<e.length;n++)if(!Rw(e[n],n))return}else{var i=ri(e);if(typeof i=="function"){var u=i.call(e);if(u)for(var w=u.next(),T=0;!w.done;w=u.next()){if(!Rw(w.value,T))return;T++}}else y('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 Kv(e,t,n,i,u){var w=e.memoizedState;w===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:u}:(w.isBackwards=t,w.rendering=null,w.renderingStartTime=0,w.last=i,w.tail=n,w.tailMode=u)}function Tw(e,t,n){var i=t.pendingProps,u=i.revealOrder,w=i.tail,T=i.children;XT(u),JT(w,u),ZT(T,u),or(e,t,T,n);var V=fs.current,H=qp(V,Zc);if(H)V=Yp(V,Zc),t.flags|=Cn;else{var q=e!==null&&(e.flags&Cn)!==It;q&&YT(t,t.child,n),V=wl(V)}if(La(t,V),(t.mode&mn)===Mt)t.memoizedState=null;else switch(u){case"forwards":{var Z=KT(t.child),pe;Z===null?(pe=t.child,t.child=null):(pe=Z.sibling,Z.sibling=null),Kv(t,!1,pe,Z,w);break}case"backwards":{var fe=null,je=t.child;for(t.child=null;je!==null;){var De=je.alternate;if(De!==null&&vh(De)===null){t.child=je;break}var Oe=je.sibling;je.sibling=fe,fe=je,je=Oe}Kv(t,!0,fe,null,w);break}case"together":{Kv(t,!1,null,null,void 0);break}default:t.memoizedState=null}return t.child}function QT(e,t,n){$p(t,t.stateNode.containerInfo);var i=t.pendingProps;return e===null?t.child=_l(t,null,i,n):or(e,t,i,n),t.child}var Lw=!1;function e5(e,t,n){var i=t.type,u=i._context,w=t.pendingProps,T=t.memoizedProps,V=w.value;{"value"in w||Lw||(Lw=!0,y("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var H=t.type.propTypes;H&&ds(H,w,"prop","Context.Provider")}if(Sx(t,u,V),T!==null){var q=T.value;if(Tr(q,V)){if(T.children===w.children&&!qd())return ia(e,t,n)}else XR(t,u,n)}var Z=w.children;return or(e,t,Z,n),t.child}var Aw=!1;function t5(e,t,n){var i=t.type;i._context===void 0?i!==i.Consumer&&(Aw||(Aw=!0,y("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 u=t.pendingProps,w=u.children;typeof w!="function"&&y("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."),yl(t,n);var T=di(i);oc(t);var V;return ou.current=t,ei(!0),V=w(T),ei(!1),Qo(),t.flags|=Ko,or(e,t,V,n),t.child}function uu(){gs=!0}function Ih(e,t){(t.mode&mn)===Mt&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=ui)}function ia(e,t,n){return e!==null&&(t.dependencies=e.dependencies),lw(),wu(t.lanes),Dr(n,t.childLanes)?(YR(e,t),t.child):null}function n5(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 u=i.child;if(u===null)throw new Error("Expected parent to have a child.");for(;u.sibling!==t;)if(u=u.sibling,u===null)throw new Error("Expected to find the previous sibling.");u.sibling=n}var w=i.deletions;return w===null?(i.deletions=[e],i.flags|=Ya):w.push(e),n.flags|=ui,n}}function Xv(e,t){var n=e.lanes;return!!Dr(n,t)}function i5(e,t,n){switch(t.tag){case h:Cw(t),t.stateNode,gl();break;case N:Lx(t);break;case g:{var i=t.type;ks(i)&&Kd(t);break}case _:$p(t,t.stateNode.containerInfo);break;case f:{var u=t.memoizedProps.value,w=t.type._context;Sx(t,w,u);break}case S:{var T=Dr(n,t.childLanes);T&&(t.flags|=Sn);{var V=t.stateNode;V.effectDuration=0,V.passiveEffectDuration=0}}break;case k:{var H=t.memoizedState;if(H!==null){if(H.dehydrated!==null)return La(t,wl(fs.current)),t.flags|=Cn,null;var q=t.child,Z=q.childLanes;if(Dr(n,Z))return jw(e,t,n);La(t,wl(fs.current));var pe=ia(e,t,n);return pe!==null?pe.sibling:null}else La(t,wl(fs.current));break}case F:{var fe=(e.flags&Cn)!==It,je=Dr(n,t.childLanes);if(fe){if(je)return Tw(e,t,n);t.flags|=Cn}var De=t.memoizedState;if(De!==null&&(De.rendering=null,De.tail=null,De.lastEffect=null),La(t,fs.current),je)break;return null}case B:case G:return t.lanes=Ge,ww(e,t,n)}return ia(e,t,n)}function Mw(e,t,n){if(t._debugNeedsRemount&&e!==null)return n5(e,t,Eg(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(e!==null){var i=e.memoizedProps,u=t.pendingProps;if(i!==u||qd()||t.type!==e.type)gs=!0;else{var w=Xv(e,n);if(!w&&(t.flags&Cn)===It)return gs=!1,i5(e,t,n);(e.flags&ef)!==It?gs=!0:gs=!1}}else if(gs=!1,Ui()&&DR(t)){var T=t.index,V=kR();lx(t,V,T)}switch(t.lanes=Ge,t.tag){case x:return VT(e,t,t.type,n);case D:{var H=t.elementType;return OT(e,t,H,n)}case d:{var q=t.type,Z=t.pendingProps,pe=t.elementType===q?Z:vs(q,Z);return Hv(e,t,q,pe,n)}case g:{var fe=t.type,je=t.pendingProps,De=t.elementType===fe?je:vs(fe,je);return Sw(e,t,fe,De,n)}case h:return AT(e,t,n);case N:return MT(e,t,n);case E:return UT(e,t);case k:return jw(e,t,n);case _:return QT(e,t,n);case p:{var Oe=t.type,ut=t.pendingProps,At=t.elementType===Oe?ut:vs(Oe,ut);return bw(e,t,Oe,At,n)}case b:return RT(e,t,n);case l:return TT(e,t,n);case S:return LT(e,t,n);case f:return e5(e,t,n);case m:return t5(e,t,n);case j:{var Rt=t.type,pn=t.pendingProps,ln=vs(Rt,pn);if(t.type!==t.elementType){var we=Rt.propTypes;we&&ds(we,ln,"prop",cn(Rt))}return ln=vs(Rt.type,ln),yw(e,t,Rt,ln,n)}case A:return xw(e,t,t.type,t.pendingProps,n);case L:{var Pe=t.type,Ne=t.pendingProps,Je=t.elementType===Pe?Ne:vs(Pe,Ne);return PT(e,t,Pe,Je,n)}case F:return Tw(e,t,n);case P:break;case B: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 Dl(e){e.flags|=Sn}function Uw(e){e.flags|=Ka,e.flags|=tf}var Ow,Jv,Pw,Vw;Ow=function(e,t,n,i){for(var u=t.child;u!==null;){if(u.tag===N||u.tag===E)Ck(e,u.stateNode);else if(u.tag!==_){if(u.child!==null){u.child.return=u,u=u.child;continue}}if(u===t)return;for(;u.sibling===null;){if(u.return===null||u.return===t)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},Jv=function(e,t){},Pw=function(e,t,n,i,u){var w=e.memoizedProps;if(w!==i){var T=t.stateNode,V=Wp(),H=jk(T,n,w,i,u,V);t.updateQueue=H,H&&Dl(t)}},Vw=function(e,t,n,i){n!==i&&Dl(t)};function du(e,t){if(!Ui())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 u=e.tail,w=null;u!==null;)u.alternate!==null&&(w=u),u=u.sibling;w===null?!t&&e.tail!==null?e.tail.sibling=null:e.tail=null:w.sibling=null;break}}}function Pi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=Ge,i=It;if(t){if((e.mode&Rn)!==Mt){for(var H=e.selfBaseDuration,q=e.child;q!==null;)n=nn(n,nn(q.lanes,q.childLanes)),i|=q.subtreeFlags&qs,i|=q.flags&qs,H+=q.treeBaseDuration,q=q.sibling;e.treeBaseDuration=H}else for(var Z=e.child;Z!==null;)n=nn(n,nn(Z.lanes,Z.childLanes)),i|=Z.subtreeFlags&qs,i|=Z.flags&qs,Z.return=e,Z=Z.sibling;e.subtreeFlags|=i}else{if((e.mode&Rn)!==Mt){for(var u=e.actualDuration,w=e.selfBaseDuration,T=e.child;T!==null;)n=nn(n,nn(T.lanes,T.childLanes)),i|=T.subtreeFlags,i|=T.flags,u+=T.actualDuration,w+=T.treeBaseDuration,T=T.sibling;e.actualDuration=u,e.treeBaseDuration=w}else for(var V=e.child;V!==null;)n=nn(n,nn(V.lanes,V.childLanes)),i|=V.subtreeFlags,i|=V.flags,V.return=e,V=V.sibling;e.subtreeFlags|=i}return e.childLanes=n,t}function r5(e,t,n){if(HR()&&(t.mode&mn)!==Mt&&(t.flags&Cn)===It)return px(t),gl(),t.flags|=Ws|dd|ar,!1;var i=eh(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(BR(t),Pi(t),(t.mode&Rn)!==Mt){var u=n!==null;if(u){var w=t.child;w!==null&&(t.treeBaseDuration-=w.treeBaseDuration)}}return!1}else{if(gl(),(t.flags&Cn)===It&&(t.memoizedState=null),t.flags|=Sn,Pi(t),(t.mode&Rn)!==Mt){var T=n!==null;if(T){var V=t.child;V!==null&&(t.treeBaseDuration-=V.treeBaseDuration)}}return!1}else return vx(),!0}function Iw(e,t,n){var i=t.pendingProps;switch(Np(t),t.tag){case x:case D:case A:case d:case p:case b:case l:case S:case m:case j:return Pi(t),null;case g:{var u=t.type;return ks(u)&&Yd(t),Pi(t),null}case h:{var w=t.stateNode;if(xl(t),bp(t),Xp(),w.pendingContext&&(w.context=w.pendingContext,w.pendingContext=null),e===null||e.child===null){var T=eh(t);if(T)Dl(t);else if(e!==null){var V=e.memoizedState;(!V.isDehydrated||(t.flags&Ws)!==It)&&(t.flags|=Xo,vx())}}return Jv(e,t),Pi(t),null}case N:{Gp(t);var H=Tx(),q=t.type;if(e!==null&&t.stateNode!=null)Pw(e,t,q,i,H),e.ref!==t.ref&&Uw(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 Pi(t),null}var Z=Wp(),pe=eh(t);if(pe)VR(t,H,Z)&&Dl(t);else{var fe=Sk(q,i,H,Z,t);Ow(fe,t,!1,!1),t.stateNode=fe,Ek(fe,q,i,H)&&Dl(t)}t.ref!==null&&Uw(t)}return Pi(t),null}case E:{var je=i;if(e&&t.stateNode!=null){var De=e.memoizedProps;Vw(e,t,De,je)}else{if(typeof je!="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 Oe=Tx(),ut=Wp(),At=eh(t);At?IR(t)&&Dl(t):t.stateNode=Dk(je,Oe,ut,t)}return Pi(t),null}case k:{Nl(t);var Rt=t.memoizedState;if(e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){var pn=r5(e,t,Rt);if(!pn)return t.flags&ar?t:null}if((t.flags&Cn)!==It)return t.lanes=n,(t.mode&Rn)!==Mt&&xv(t),t;var ln=Rt!==null,we=e!==null&&e.memoizedState!==null;if(ln!==we&&ln){var Pe=t.child;if(Pe.flags|=Xa,(t.mode&mn)!==Mt){var Ne=e===null&&(t.memoizedProps.unstable_avoidThisFallback!==!0||!0);Ne||qp(fs.current,Mx)?sL():pg()}}var Je=t.updateQueue;if(Je!==null&&(t.flags|=Sn),Pi(t),(t.mode&Rn)!==Mt&&ln){var vt=t.child;vt!==null&&(t.treeBaseDuration-=vt.treeBaseDuration)}return null}case _:return xl(t),Jv(e,t),e===null&&xR(t.stateNode.containerInfo),Pi(t),null;case f:var dt=t.type._context;return Pp(dt,t),Pi(t),null;case L:{var Ht=t.type;return ks(Ht)&&Yd(t),Pi(t),null}case F:{Nl(t);var Yt=t.memoizedState;if(Yt===null)return Pi(t),null;var Ln=(t.flags&Cn)!==It,xn=Yt.rendering;if(xn===null)if(Ln)du(Yt,!1);else{var oi=oL()&&(e===null||(e.flags&Cn)===It);if(!oi)for(var wn=t.child;wn!==null;){var ni=vh(wn);if(ni!==null){Ln=!0,t.flags|=Cn,du(Yt,!1);var Ji=ni.updateQueue;return Ji!==null&&(t.updateQueue=Ji,t.flags|=Sn),t.subtreeFlags=It,KR(t,n),La(t,Yp(fs.current,Zc)),t.child}wn=wn.sibling}Yt.tail!==null&&Ei()>a0()&&(t.flags|=Cn,Ln=!0,du(Yt,!1),t.lanes=Vb)}else{if(!Ln){var Hi=vh(xn);if(Hi!==null){t.flags|=Cn,Ln=!0;var Mr=Hi.updateQueue;if(Mr!==null&&(t.updateQueue=Mr,t.flags|=Sn),du(Yt,!0),Yt.tail===null&&Yt.tailMode==="hidden"&&!xn.alternate&&!Ui())return Pi(t),null}else Ei()*2-Yt.renderingStartTime>a0()&&n!==jr&&(t.flags|=Cn,Ln=!0,du(Yt,!1),t.lanes=Vb)}if(Yt.isBackwards)xn.sibling=t.child,t.child=xn;else{var ur=Yt.last;ur!==null?ur.sibling=xn:t.child=xn,Yt.last=xn}}if(Yt.tail!==null){var dr=Yt.tail;Yt.rendering=dr,Yt.tail=dr.sibling,Yt.renderingStartTime=Ei(),dr.sibling=null;var Zi=fs.current;return Ln?Zi=Yp(Zi,Zc):Zi=wl(Zi),La(t,Zi),dr}return Pi(t),null}case P:break;case B:case G:{fg(t);var la=t.memoizedState,Ol=la!==null;if(e!==null){var ju=e.memoizedState,Ps=ju!==null;Ps!==Ol&&!W&&(t.flags|=Xa)}return!Ol||(t.mode&mn)===Mt?Pi(t):Dr(Os,jr)&&(Pi(t),t.subtreeFlags&(ui|Sn)&&(t.flags|=Xa)),null}case ne:return null;case ee:return null}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function s5(e,t,n){switch(Np(t),t.tag){case g:{var i=t.type;ks(i)&&Yd(t);var u=t.flags;return u&ar?(t.flags=u&~ar|Cn,(t.mode&Rn)!==Mt&&xv(t),t):null}case h:{t.stateNode,xl(t),bp(t),Xp();var w=t.flags;return(w&ar)!==It&&(w&Cn)===It?(t.flags=w&~ar|Cn,t):null}case N:return Gp(t),null;case k:{Nl(t);var T=t.memoizedState;if(T!==null&&T.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.");gl()}var V=t.flags;return V&ar?(t.flags=V&~ar|Cn,(t.mode&Rn)!==Mt&&xv(t),t):null}case F:return Nl(t),null;case _:return xl(t),null;case f:var H=t.type._context;return Pp(H,t),null;case B:case G:return fg(t),null;case ne:return null;default:return null}}function Bw(e,t,n){switch(Np(t),t.tag){case g:{var i=t.type.childContextTypes;i!=null&&Yd(t);break}case h:{t.stateNode,xl(t),bp(t),Xp();break}case N:{Gp(t);break}case _:xl(t);break;case k:Nl(t);break;case F:Nl(t);break;case f:var u=t.type._context;Pp(u,t);break;case B:case G:fg(t);break}}var Fw=null;Fw=new Set;var Bh=!1,Vi=!1,a5=typeof WeakSet=="function"?WeakSet:Set,Nt=null,kl=null,Rl=null;function o5(e){Jm(null,function(){throw e}),Zm()}var l5=function(e,t){if(t.props=e.memoizedProps,t.state=e.memoizedState,e.mode&Rn)try{Ms(),t.componentWillUnmount()}finally{As(e)}else t.componentWillUnmount()};function Hw(e,t){try{Ua(gi,e)}catch(n){Hn(e,t,n)}}function Zv(e,t,n){try{l5(e,n)}catch(i){Hn(e,t,i)}}function c5(e,t,n){try{n.componentDidMount()}catch(i){Hn(e,t,i)}}function zw(e,t){try{Ww(e)}catch(n){Hn(e,t,n)}}function Tl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function"){var i;try{if(he&&Ae&&e.mode&Rn)try{Ms(),i=n(null)}finally{As(e)}else i=n(null)}catch(u){Hn(e,t,u)}typeof i=="function"&&y("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",St(e))}else n.current=null}function Fh(e,t,n){try{n()}catch(i){Hn(e,t,i)}}var $w=!1;function u5(e,t){wk(e.containerInfo),Nt=t,d5();var n=$w;return $w=!1,n}function d5(){for(;Nt!==null;){var e=Nt,t=e.child;(e.subtreeFlags&sf)!==It&&t!==null?(t.return=e,Nt=t):h5()}}function h5(){for(;Nt!==null;){var e=Nt;Mn(e);try{m5(e)}catch(n){Hn(e,e.return,n)}qn();var t=e.sibling;if(t!==null){t.return=e.return,Nt=t;return}Nt=e.return}}function m5(e){var t=e.alternate,n=e.flags;if((n&Xo)!==It){switch(Mn(e),e.tag){case d:case p:case A:break;case g:{if(t!==null){var i=t.memoizedProps,u=t.memoizedState,w=e.stateNode;e.type===e.elementType&&!go&&(w.props!==e.memoizedProps&&y("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.",St(e)||"instance"),w.state!==e.memoizedState&&y("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.",St(e)||"instance"));var T=w.getSnapshotBeforeUpdate(e.elementType===e.type?i:vs(e.type,i),u);{var V=Fw;T===void 0&&!V.has(e.type)&&(V.add(e.type),y("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",St(e)))}w.__reactInternalSnapshotBeforeUpdate=T}break}case h:{{var H=e.stateNode;qk(H.containerInfo)}break}case N:case E:case _:case L: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 _s(e,t,n){var i=t.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var w=u.next,T=w;do{if((T.tag&e)===e){var V=T.destroy;T.destroy=void 0,V!==void 0&&((e&Oi)!==yr?DE(t):(e&gi)!==yr&&Ab(t),(e&Rs)!==yr&&Su(!0),Fh(t,n,V),(e&Rs)!==yr&&Su(!1),(e&Oi)!==yr?kE():(e&gi)!==yr&&Mb())}T=T.next}while(T!==w)}}function Ua(e,t){var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var u=i.next,w=u;do{if((w.tag&e)===e){(e&Oi)!==yr?EE(t):(e&gi)!==yr&&RE(t);var T=w.create;(e&Rs)!==yr&&Su(!0),w.destroy=T(),(e&Rs)!==yr&&Su(!1),(e&Oi)!==yr?jE():(e&gi)!==yr&&TE();{var V=w.destroy;if(V!==void 0&&typeof V!="function"){var H=void 0;(w.tag&gi)!==It?H="useLayoutEffect":(w.tag&Rs)!==It?H="useInsertionEffect":H="useEffect";var q=void 0;V===null?q=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof V.then=="function"?q=`
|
|
162
|
+
|
|
163
|
+
It looks like you wrote `+H+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
164
|
+
|
|
165
|
+
`+H+`(() => {
|
|
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: "+V,y("%s must not return anything besides a function, which is used for clean-up.%s",H,q)}}}w=w.next}while(w!==u)}}function f5(e,t){if((t.flags&Sn)!==It)switch(t.tag){case S:{var n=t.stateNode.passiveEffectDuration,i=t.memoizedProps,u=i.id,w=i.onPostCommit,T=aw(),V=t.alternate===null?"mount":"update";sw()&&(V="nested-update"),typeof w=="function"&&w(u,V,n,T);var H=t.return;e:for(;H!==null;){switch(H.tag){case h:var q=H.stateNode;q.passiveEffectDuration+=n;break e;case S:var Z=H.stateNode;Z.passiveEffectDuration+=n;break e}H=H.return}break}}}function p5(e,t,n,i){if((n.flags&ac)!==It)switch(n.tag){case d:case p:case A:{if(!Vi)if(n.mode&Rn)try{Ms(),Ua(gi|vi,n)}finally{As(n)}else Ua(gi|vi,n);break}case g:{var u=n.stateNode;if(n.flags&Sn&&!Vi)if(t===null)if(n.type===n.elementType&&!go&&(u.props!==n.memoizedProps&&y("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.",St(n)||"instance"),u.state!==n.memoizedState&&y("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.",St(n)||"instance")),n.mode&Rn)try{Ms(),u.componentDidMount()}finally{As(n)}else u.componentDidMount();else{var w=n.elementType===n.type?t.memoizedProps:vs(n.type,t.memoizedProps),T=t.memoizedState;if(n.type===n.elementType&&!go&&(u.props!==n.memoizedProps&&y("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.",St(n)||"instance"),u.state!==n.memoizedState&&y("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.",St(n)||"instance")),n.mode&Rn)try{Ms(),u.componentDidUpdate(w,T,u.__reactInternalSnapshotBeforeUpdate)}finally{As(n)}else u.componentDidUpdate(w,T,u.__reactInternalSnapshotBeforeUpdate)}var V=n.updateQueue;V!==null&&(n.type===n.elementType&&!go&&(u.props!==n.memoizedProps&&y("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.",St(n)||"instance"),u.state!==n.memoizedState&&y("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.",St(n)||"instance")),Rx(n,V,u));break}case h:{var H=n.updateQueue;if(H!==null){var q=null;if(n.child!==null)switch(n.child.tag){case N:q=n.child.stateNode;break;case g:q=n.child.stateNode;break}Rx(n,H,q)}break}case N:{var Z=n.stateNode;if(t===null&&n.flags&Sn){var pe=n.type,fe=n.memoizedProps;Ak(Z,pe,fe)}break}case E:break;case _:break;case S:{{var je=n.memoizedProps,De=je.onCommit,Oe=je.onRender,ut=n.stateNode.effectDuration,At=aw(),Rt=t===null?"mount":"update";sw()&&(Rt="nested-update"),typeof Oe=="function"&&Oe(n.memoizedProps.id,Rt,n.actualDuration,n.treeBaseDuration,n.actualStartTime,At);{typeof De=="function"&&De(n.memoizedProps.id,Rt,ut,At),hL(n);var pn=n.return;e:for(;pn!==null;){switch(pn.tag){case h:var ln=pn.stateNode;ln.effectDuration+=ut;break e;case S:var we=pn.stateNode;we.effectDuration+=ut;break e}pn=pn.return}}}break}case k:{N5(e,n);break}case F:case L:case P:case B:case G:case ee:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Vi||n.flags&Ka&&Ww(n)}function v5(e){switch(e.tag){case d:case p:case A:{if(e.mode&Rn)try{Ms(),Hw(e,e.return)}finally{As(e)}else Hw(e,e.return);break}case g:{var t=e.stateNode;typeof t.componentDidMount=="function"&&c5(e,e.return,t),zw(e,e.return);break}case N:{zw(e,e.return);break}}}function g5(e,t){for(var n=null,i=e;;){if(i.tag===N){if(n===null){n=i;try{var u=i.stateNode;t?zk(u):Wk(i.stateNode,i.memoizedProps)}catch(T){Hn(e,e.return,T)}}}else if(i.tag===E){if(n===null)try{var w=i.stateNode;t?$k(w):Gk(w,i.memoizedProps)}catch(T){Hn(e,e.return,T)}}else if(!((i.tag===B||i.tag===G)&&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 Ww(e){var t=e.ref;if(t!==null){var n=e.stateNode,i;switch(e.tag){case N:i=n;break;default:i=n}if(typeof t=="function"){var u;if(e.mode&Rn)try{Ms(),u=t(i)}finally{As(e)}else u=t(i);typeof u=="function"&&y("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",St(e))}else t.hasOwnProperty("current")||y("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",St(e)),t.current=i}}function _5(e){var t=e.alternate;t!==null&&(t.return=null),e.return=null}function Gw(e){var t=e.alternate;t!==null&&(e.alternate=null,Gw(t));{if(e.child=null,e.deletions=null,e.sibling=null,e.tag===N){var n=e.stateNode;n!==null&&SR(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 b5(e){for(var t=e.return;t!==null;){if(qw(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 qw(e){return e.tag===N||e.tag===h||e.tag===_}function Yw(e){var t=e;e:for(;;){for(;t.sibling===null;){if(t.return===null||qw(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==N&&t.tag!==E&&t.tag!==O;){if(t.flags&ui||t.child===null||t.tag===_)continue e;t.child.return=t,t=t.child}if(!(t.flags&ui))return t.stateNode}}function y5(e){var t=b5(e);switch(t.tag){case N:{var n=t.stateNode;t.flags&sc&&(Xy(n),t.flags&=~sc);var i=Yw(e);eg(e,i,n);break}case h:case _:{var u=t.stateNode.containerInfo,w=Yw(e);Qv(e,w,u);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function Qv(e,t,n){var i=e.tag,u=i===N||i===E;if(u){var w=e.stateNode;t?Ik(n,w,t):Pk(n,w)}else if(i!==_){var T=e.child;if(T!==null){Qv(T,t,n);for(var V=T.sibling;V!==null;)Qv(V,t,n),V=V.sibling}}}function eg(e,t,n){var i=e.tag,u=i===N||i===E;if(u){var w=e.stateNode;t?Vk(n,w,t):Ok(n,w)}else if(i!==_){var T=e.child;if(T!==null){eg(T,t,n);for(var V=T.sibling;V!==null;)eg(V,t,n),V=V.sibling}}}var Ii=null,bs=!1;function x5(e,t,n){{var i=t;e:for(;i!==null;){switch(i.tag){case N:{Ii=i.stateNode,bs=!1;break e}case h:{Ii=i.stateNode.containerInfo,bs=!0;break e}case _:{Ii=i.stateNode.containerInfo,bs=!0;break e}}i=i.return}if(Ii===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Kw(e,t,n),Ii=null,bs=!1}_5(n)}function Oa(e,t,n){for(var i=n.child;i!==null;)Kw(e,t,i),i=i.sibling}function Kw(e,t,n){switch(wE(n),n.tag){case N:Vi||Tl(n,t);case E:{{var i=Ii,u=bs;Ii=null,Oa(e,t,n),Ii=i,bs=u,Ii!==null&&(bs?Fk(Ii,n.stateNode):Bk(Ii,n.stateNode))}return}case O:{Ii!==null&&(bs?Hk(Ii,n.stateNode):dp(Ii,n.stateNode));return}case _:{{var w=Ii,T=bs;Ii=n.stateNode.containerInfo,bs=!0,Oa(e,t,n),Ii=w,bs=T}return}case d:case p:case j:case A:{if(!Vi){var V=n.updateQueue;if(V!==null){var H=V.lastEffect;if(H!==null){var q=H.next,Z=q;do{var pe=Z,fe=pe.destroy,je=pe.tag;fe!==void 0&&((je&Rs)!==yr?Fh(n,t,fe):(je&gi)!==yr&&(Ab(n),n.mode&Rn?(Ms(),Fh(n,t,fe),As(n)):Fh(n,t,fe),Mb())),Z=Z.next}while(Z!==q)}}}Oa(e,t,n);return}case g:{if(!Vi){Tl(n,t);var De=n.stateNode;typeof De.componentWillUnmount=="function"&&Zv(n,t,De)}Oa(e,t,n);return}case P:{Oa(e,t,n);return}case B:{if(n.mode&mn){var Oe=Vi;Vi=Oe||n.memoizedState!==null,Oa(e,t,n),Vi=Oe}else Oa(e,t,n);break}default:{Oa(e,t,n);return}}}function w5(e){e.memoizedState}function N5(e,t){var n=t.memoizedState;if(n===null){var i=t.alternate;if(i!==null){var u=i.memoizedState;if(u!==null){var w=u.dehydrated;w!==null&&oR(w)}}}}function Xw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new a5),t.forEach(function(i){var u=bL.bind(null,e,i);if(!n.has(i)){if(n.add(i),cs)if(kl!==null&&Rl!==null)Nu(Rl,kl);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");i.then(u,u)}})}}function S5(e,t,n){kl=n,Rl=e,Mn(t),Jw(t,e),Mn(t),kl=null,Rl=null}function ys(e,t,n){var i=t.deletions;if(i!==null)for(var u=0;u<i.length;u++){var w=i[u];try{x5(e,t,w)}catch(H){Hn(w,t,H)}}var T=ai();if(t.subtreeFlags&af)for(var V=t.child;V!==null;)Mn(V),Jw(V,e),V=V.sibling;Mn(T)}function Jw(e,t,n){var i=e.alternate,u=e.flags;switch(e.tag){case d:case p:case j:case A:{if(ys(t,e),Us(e),u&Sn){try{_s(Rs|vi,e,e.return),Ua(Rs|vi,e)}catch(Ht){Hn(e,e.return,Ht)}if(e.mode&Rn){try{Ms(),_s(gi|vi,e,e.return)}catch(Ht){Hn(e,e.return,Ht)}As(e)}else try{_s(gi|vi,e,e.return)}catch(Ht){Hn(e,e.return,Ht)}}return}case g:{ys(t,e),Us(e),u&Ka&&i!==null&&Tl(i,i.return);return}case N:{ys(t,e),Us(e),u&Ka&&i!==null&&Tl(i,i.return);{if(e.flags&sc){var w=e.stateNode;try{Xy(w)}catch(Ht){Hn(e,e.return,Ht)}}if(u&Sn){var T=e.stateNode;if(T!=null){var V=e.memoizedProps,H=i!==null?i.memoizedProps:V,q=e.type,Z=e.updateQueue;if(e.updateQueue=null,Z!==null)try{Mk(T,Z,q,H,V,e)}catch(Ht){Hn(e,e.return,Ht)}}}}return}case E:{if(ys(t,e),Us(e),u&Sn){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 pe=e.stateNode,fe=e.memoizedProps,je=i!==null?i.memoizedProps:fe;try{Uk(pe,je,fe)}catch(Ht){Hn(e,e.return,Ht)}}return}case h:{if(ys(t,e),Us(e),u&Sn&&i!==null){var De=i.memoizedState;if(De.isDehydrated)try{aR(t.containerInfo)}catch(Ht){Hn(e,e.return,Ht)}}return}case _:{ys(t,e),Us(e);return}case k:{ys(t,e),Us(e);var Oe=e.child;if(Oe.flags&Xa){var ut=Oe.stateNode,At=Oe.memoizedState,Rt=At!==null;if(ut.isHidden=Rt,Rt){var pn=Oe.alternate!==null&&Oe.alternate.memoizedState!==null;pn||rL()}}if(u&Sn){try{w5(e)}catch(Ht){Hn(e,e.return,Ht)}Xw(e)}return}case B:{var ln=i!==null&&i.memoizedState!==null;if(e.mode&mn){var we=Vi;Vi=we||ln,ys(t,e),Vi=we}else ys(t,e);if(Us(e),u&Xa){var Pe=e.stateNode,Ne=e.memoizedState,Je=Ne!==null,vt=e;if(Pe.isHidden=Je,Je&&!ln&&(vt.mode&mn)!==Mt){Nt=vt;for(var dt=vt.child;dt!==null;)Nt=dt,E5(dt),dt=dt.sibling}g5(vt,Je)}return}case F:{ys(t,e),Us(e),u&Sn&&Xw(e);return}case P:return;default:{ys(t,e),Us(e);return}}}function Us(e){var t=e.flags;if(t&ui){try{y5(e)}catch(n){Hn(e,e.return,n)}e.flags&=~ui}t&Gs&&(e.flags&=~Gs)}function C5(e,t,n){kl=n,Rl=t,Nt=e,Zw(e,t,n),kl=null,Rl=null}function Zw(e,t,n){for(var i=(e.mode&mn)!==Mt;Nt!==null;){var u=Nt,w=u.child;if(u.tag===B&&i){var T=u.memoizedState!==null,V=T||Bh;if(V){tg(e,t,n);continue}else{var H=u.alternate,q=H!==null&&H.memoizedState!==null,Z=q||Vi,pe=Bh,fe=Vi;Bh=V,Vi=Z,Vi&&!fe&&(Nt=u,j5(u));for(var je=w;je!==null;)Nt=je,Zw(je,t,n),je=je.sibling;Nt=u,Bh=pe,Vi=fe,tg(e,t,n);continue}}(u.subtreeFlags&ac)!==It&&w!==null?(w.return=u,Nt=w):tg(e,t,n)}}function tg(e,t,n){for(;Nt!==null;){var i=Nt;if((i.flags&ac)!==It){var u=i.alternate;Mn(i);try{p5(t,u,i,n)}catch(T){Hn(i,i.return,T)}qn()}if(i===e){Nt=null;return}var w=i.sibling;if(w!==null){w.return=i.return,Nt=w;return}Nt=i.return}}function E5(e){for(;Nt!==null;){var t=Nt,n=t.child;switch(t.tag){case d:case p:case j:case A:{if(t.mode&Rn)try{Ms(),_s(gi,t,t.return)}finally{As(t)}else _s(gi,t,t.return);break}case g:{Tl(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Zv(t,t.return,i);break}case N:{Tl(t,t.return);break}case B:{var u=t.memoizedState!==null;if(u){Qw(e);continue}break}}n!==null?(n.return=t,Nt=n):Qw(e)}}function Qw(e){for(;Nt!==null;){var t=Nt;if(t===e){Nt=null;return}var n=t.sibling;if(n!==null){n.return=t.return,Nt=n;return}Nt=t.return}}function j5(e){for(;Nt!==null;){var t=Nt,n=t.child;if(t.tag===B){var i=t.memoizedState!==null;if(i){e0(e);continue}}n!==null?(n.return=t,Nt=n):e0(e)}}function e0(e){for(;Nt!==null;){var t=Nt;Mn(t);try{v5(t)}catch(i){Hn(t,t.return,i)}if(qn(),t===e){Nt=null;return}var n=t.sibling;if(n!==null){n.return=t.return,Nt=n;return}Nt=t.return}}function D5(e,t,n,i){Nt=t,k5(t,e,n,i)}function k5(e,t,n,i){for(;Nt!==null;){var u=Nt,w=u.child;(u.subtreeFlags&Jo)!==It&&w!==null?(w.return=u,Nt=w):R5(e,t,n,i)}}function R5(e,t,n,i){for(;Nt!==null;){var u=Nt;if((u.flags&ga)!==It){Mn(u);try{T5(t,u,n,i)}catch(T){Hn(u,u.return,T)}qn()}if(u===e){Nt=null;return}var w=u.sibling;if(w!==null){w.return=u.return,Nt=w;return}Nt=u.return}}function T5(e,t,n,i){switch(t.tag){case d:case p:case A:{if(t.mode&Rn){yv();try{Ua(Oi|vi,t)}finally{bv(t)}}else Ua(Oi|vi,t);break}}}function L5(e){Nt=e,A5()}function A5(){for(;Nt!==null;){var e=Nt,t=e.child;if((Nt.flags&Ya)!==It){var n=e.deletions;if(n!==null){for(var i=0;i<n.length;i++){var u=n[i];Nt=u,O5(u,e)}{var w=e.alternate;if(w!==null){var T=w.child;if(T!==null){w.child=null;do{var V=T.sibling;T.sibling=null,T=V}while(T!==null)}}}Nt=e}}(e.subtreeFlags&Jo)!==It&&t!==null?(t.return=e,Nt=t):M5()}}function M5(){for(;Nt!==null;){var e=Nt;(e.flags&ga)!==It&&(Mn(e),U5(e),qn());var t=e.sibling;if(t!==null){t.return=e.return,Nt=t;return}Nt=e.return}}function U5(e){switch(e.tag){case d:case p:case A:{e.mode&Rn?(yv(),_s(Oi|vi,e,e.return),bv(e)):_s(Oi|vi,e,e.return);break}}}function O5(e,t){for(;Nt!==null;){var n=Nt;Mn(n),V5(n,t),qn();var i=n.child;i!==null?(i.return=n,Nt=i):P5(e)}}function P5(e){for(;Nt!==null;){var t=Nt,n=t.sibling,i=t.return;if(Gw(t),t===e){Nt=null;return}if(n!==null){n.return=i,Nt=n;return}Nt=i}}function V5(e,t){switch(e.tag){case d:case p:case A:{e.mode&Rn?(yv(),_s(Oi,e,t),bv(e)):_s(Oi,e,t);break}}}function I5(e){switch(e.tag){case d:case p:case A:{try{Ua(gi|vi,e)}catch(n){Hn(e,e.return,n)}break}case g:{var t=e.stateNode;try{t.componentDidMount()}catch(n){Hn(e,e.return,n)}break}}}function B5(e){switch(e.tag){case d:case p:case A:{try{Ua(Oi|vi,e)}catch(t){Hn(e,e.return,t)}break}}}function F5(e){switch(e.tag){case d:case p:case A:{try{_s(gi|vi,e,e.return)}catch(n){Hn(e,e.return,n)}break}case g:{var t=e.stateNode;typeof t.componentWillUnmount=="function"&&Zv(e,e.return,t);break}}}function H5(e){switch(e.tag){case d:case p:case A:try{_s(Oi|vi,e,e.return)}catch(t){Hn(e,e.return,t)}}}if(typeof Symbol=="function"&&Symbol.for){var hu=Symbol.for;hu("selector.component"),hu("selector.has_pseudo_class"),hu("selector.role"),hu("selector.test_id"),hu("selector.text")}var z5=[];function $5(){z5.forEach(function(e){return e()})}var W5=c.ReactCurrentActQueue;function G5(e){{var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,n=typeof jest<"u";return n&&t!==!1}}function t0(){{var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return!e&&W5.current!==null&&y("The current testing environment is not configured to support act(...)"),e}}var q5=Math.ceil,ng=c.ReactCurrentDispatcher,ig=c.ReactCurrentOwner,Bi=c.ReactCurrentBatchConfig,xs=c.ReactCurrentActQueue,yi=0,n0=1,Fi=2,Kr=4,ra=0,mu=1,_o=2,Hh=3,fu=4,i0=5,rg=6,fn=yi,lr=null,Zn=null,xi=Ge,Os=Ge,sg=Ea(Ge),wi=ra,pu=null,zh=Ge,vu=Ge,$h=Ge,gu=null,xr=null,ag=0,r0=500,s0=1/0,Y5=500,sa=null;function _u(){s0=Ei()+Y5}function a0(){return s0}var Wh=!1,og=null,Ll=null,bo=!1,Pa=null,bu=Ge,lg=[],cg=null,K5=50,yu=0,ug=null,dg=!1,Gh=!1,X5=50,Al=0,qh=null,xu=Gn,Yh=Ge,o0=!1;function Kh(){return lr}function cr(){return(fn&(Fi|Kr))!==yi?Ei():(xu!==Gn||(xu=Ei()),xu)}function Va(e){var t=e.mode;if((t&mn)===Mt)return Wt;if((fn&Fi)!==yi&&xi!==Ge)return mc(xi);var n=WR()!==$R;if(n){if(Bi.transition!==null){var i=Bi.transition;i._updatedFibers||(i._updatedFibers=new Set),i._updatedFibers.add(e)}return Yh===Di&&(Yh=Hb()),Yh}var u=us();if(u!==Di)return u;var w=kk();return w}function J5(e){var t=e.mode;return(t&mn)===Mt?Wt:QE()}function Ni(e,t,n,i){xL(),o0&&y("useInsertionEffect must not schedule updates."),dg&&(Gh=!0),fc(e,n,i),(fn&Fi)!==Ge&&e===lr?SL(t):(cs&&Wb(e,t,n),CL(t),e===lr&&((fn&Fi)===yi&&(vu=nn(vu,n)),wi===fu&&Ia(e,xi)),wr(e,i),n===Wt&&fn===yi&&(t.mode&mn)===Mt&&!xs.isBatchingLegacy&&(_u(),ox()))}function Z5(e,t,n){var i=e.current;i.lanes=t,fc(e,t,n),wr(e,n)}function Q5(e){return(fn&Fi)!==yi}function wr(e,t){var n=e.callbackNode;qE(e,t);var i=vd(e,e===lr?xi:Ge);if(i===Ge){n!==null&&N0(n),e.callbackNode=null,e.callbackPriority=Di;return}var u=no(i),w=e.callbackPriority;if(w===u&&!(xs.current!==null&&n!==_g)){n==null&&w!==Wt&&y("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}n!=null&&N0(n);var T;if(u===Wt)e.tag===ja?(xs.isBatchingLegacy!==null&&(xs.didScheduleLegacyUpdate=!0),jR(u0.bind(null,e))):ax(u0.bind(null,e)),xs.current!==null?xs.current.push(Da):Tk(function(){(fn&(Fi|Kr))===yi&&Da()}),T=null;else{var V;switch(Yb(i)){case kr:V=hd;break;case Ks:V=of;break;case Xs:V=Qa;break;case bd:V=lf;break;default:V=Qa;break}T=bg(V,l0.bind(null,e))}e.callbackPriority=u,e.callbackNode=T}function l0(e,t){if(gT(),xu=Gn,Yh=Ge,(fn&(Fi|Kr))!==yi)throw new Error("Should not already be working.");var n=e.callbackNode,i=oa();if(i&&e.callbackNode!==n)return null;var u=vd(e,e===lr?xi:Ge);if(u===Ge)return null;var w=!gd(e,u)&&!ZE(e,u)&&!t,T=w?cL(e,u):Jh(e,u);if(T!==ra){if(T===_o){var V=Rf(e);V!==Ge&&(u=V,T=hg(e,V))}if(T===mu){var H=pu;throw yo(e,Ge),Ia(e,u),wr(e,Ei()),H}if(T===rg)Ia(e,u);else{var q=!gd(e,u),Z=e.current.alternate;if(q&&!tL(Z)){if(T=Jh(e,u),T===_o){var pe=Rf(e);pe!==Ge&&(u=pe,T=hg(e,pe))}if(T===mu){var fe=pu;throw yo(e,Ge),Ia(e,u),wr(e,Ei()),fe}}e.finishedWork=Z,e.finishedLanes=u,eL(e,T,u)}}return wr(e,Ei()),e.callbackNode===n?l0.bind(null,e):null}function hg(e,t){var n=gu;if(yd(e)){var i=yo(e,t);i.flags|=Ws,yR(e.containerInfo)}var u=Jh(e,t);if(u!==_o){var w=xr;xr=n,w!==null&&c0(w)}return u}function c0(e){xr===null?xr=e:xr.push.apply(xr,e)}function eL(e,t,n){switch(t){case ra:case mu:throw new Error("Root did not complete. This is a bug in React.");case _o:{xo(e,xr,sa);break}case Hh:{if(Ia(e,n),Bb(n)&&!S0()){var i=ag+r0-Ei();if(i>10){var u=vd(e,Ge);if(u!==Ge)break;var w=e.suspendedLanes;if(!il(w,n)){cr(),$b(e,w);break}e.timeoutHandle=cp(xo.bind(null,e,xr,sa),i);break}}xo(e,xr,sa);break}case fu:{if(Ia(e,n),JE(n))break;if(!S0()){var T=WE(e,n),V=T,H=Ei()-V,q=yL(H)-H;if(q>10){e.timeoutHandle=cp(xo.bind(null,e,xr,sa),q);break}}xo(e,xr,sa);break}case i0:{xo(e,xr,sa);break}default:throw new Error("Unknown root exit status.")}}function tL(e){for(var t=e;;){if(t.flags&Qm){var n=t.updateQueue;if(n!==null){var i=n.stores;if(i!==null)for(var u=0;u<i.length;u++){var w=i[u],T=w.getSnapshot,V=w.value;try{if(!Tr(T(),V))return!1}catch{return!1}}}}var H=t.child;if(t.subtreeFlags&Qm&&H!==null){H.return=t,t=H;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 Ia(e,t){t=_d(t,$h),t=_d(t,vu),tj(e,t)}function u0(e){if(_T(),(fn&(Fi|Kr))!==yi)throw new Error("Should not already be working.");oa();var t=vd(e,Ge);if(!Dr(t,Wt))return wr(e,Ei()),null;var n=Jh(e,t);if(e.tag!==ja&&n===_o){var i=Rf(e);i!==Ge&&(t=i,n=hg(e,i))}if(n===mu){var u=pu;throw yo(e,Ge),Ia(e,t),wr(e,Ei()),u}if(n===rg)throw new Error("Root did not complete. This is a bug in React.");var w=e.current.alternate;return e.finishedWork=w,e.finishedLanes=t,xo(e,xr,sa),wr(e,Ei()),null}function nL(e,t){t!==Ge&&(Mf(e,nn(t,Wt)),wr(e,Ei()),(fn&(Fi|Kr))===yi&&(_u(),Da()))}function mg(e,t){var n=fn;fn|=n0;try{return e(t)}finally{fn=n,fn===yi&&!xs.isBatchingLegacy&&(_u(),ox())}}function iL(e,t,n,i,u){var w=us(),T=Bi.transition;try{return Bi.transition=null,ki(kr),e(t,n,i,u)}finally{ki(w),Bi.transition=T,fn===yi&&_u()}}function aa(e){Pa!==null&&Pa.tag===ja&&(fn&(Fi|Kr))===yi&&oa();var t=fn;fn|=n0;var n=Bi.transition,i=us();try{return Bi.transition=null,ki(kr),e?e():void 0}finally{ki(i),Bi.transition=n,fn=t,(fn&(Fi|Kr))===yi&&Da()}}function d0(){return(fn&(Fi|Kr))!==yi}function Xh(e,t){Ki(sg,Os,e),Os=nn(Os,t)}function fg(e){Os=sg.current,Yi(sg,e)}function yo(e,t){e.finishedWork=null,e.finishedLanes=Ge;var n=e.timeoutHandle;if(n!==up&&(e.timeoutHandle=up,Rk(n)),Zn!==null)for(var i=Zn.return;i!==null;){var u=i.alternate;Bw(u,i),i=i.return}lr=e;var w=wo(e.current,null);return Zn=w,xi=Os=t,wi=ra,pu=null,zh=Ge,vu=Ge,$h=Ge,gu=null,xr=null,ZR(),ms.discardPendingWarnings(),w}function h0(e,t){do{var n=Zn;try{if(ah(),Ox(),qn(),ig.current=null,n===null||n.return===null){wi=mu,pu=t,Zn=null;return}if(he&&n.mode&Rn&&Uh(n,!0),ve)if(Qo(),t!==null&&typeof t=="object"&&typeof t.then=="function"){var i=t;AE(n,i,xi)}else LE(n,t,xi);jT(e,n.return,n,t,xi),v0(n)}catch(u){t=u,Zn===n&&n!==null?(n=n.return,Zn=n):n=Zn;continue}return}while(!0)}function m0(){var e=ng.current;return ng.current=Rh,e===null?Rh:e}function f0(e){ng.current=e}function rL(){ag=Ei()}function wu(e){zh=nn(e,zh)}function sL(){wi===ra&&(wi=Hh)}function pg(){(wi===ra||wi===Hh||wi===_o)&&(wi=fu),lr!==null&&(Tf(zh)||Tf(vu))&&Ia(lr,xi)}function aL(e){wi!==fu&&(wi=_o),gu===null?gu=[e]:gu.push(e)}function oL(){return wi===ra}function Jh(e,t){var n=fn;fn|=Fi;var i=m0();if(lr!==e||xi!==t){if(cs){var u=e.memoizedUpdaters;u.size>0&&(Nu(e,xi),u.clear()),Gb(e,t)}sa=qb(),yo(e,t)}Ub(t);do try{lL();break}catch(w){h0(e,w)}while(!0);if(ah(),fn=n,f0(i),Zn!==null)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return Ob(),lr=null,xi=Ge,wi}function lL(){for(;Zn!==null;)p0(Zn)}function cL(e,t){var n=fn;fn|=Fi;var i=m0();if(lr!==e||xi!==t){if(cs){var u=e.memoizedUpdaters;u.size>0&&(Nu(e,xi),u.clear()),Gb(e,t)}sa=qb(),_u(),yo(e,t)}Ub(t);do try{uL();break}catch(w){h0(e,w)}while(!0);return ah(),f0(i),fn=n,Zn!==null?(VE(),ra):(Ob(),lr=null,xi=Ge,wi)}function uL(){for(;Zn!==null&&!hE();)p0(Zn)}function p0(e){var t=e.alternate;Mn(e);var n;(e.mode&Rn)!==Mt?(_v(e),n=vg(t,e,Os),Uh(e,!0)):n=vg(t,e,Os),qn(),e.memoizedProps=e.pendingProps,n===null?v0(e):Zn=n,ig.current=null}function v0(e){var t=e;do{var n=t.alternate,i=t.return;if((t.flags&dd)===It){Mn(t);var u=void 0;if((t.mode&Rn)===Mt?u=Iw(n,t,Os):(_v(t),u=Iw(n,t,Os),Uh(t,!1)),qn(),u!==null){Zn=u;return}}else{var w=s5(n,t);if(w!==null){w.flags&=aE,Zn=w;return}if((t.mode&Rn)!==Mt){Uh(t,!1);for(var T=t.actualDuration,V=t.child;V!==null;)T+=V.actualDuration,V=V.sibling;t.actualDuration=T}if(i!==null)i.flags|=dd,i.subtreeFlags=It,i.deletions=null;else{wi=rg,Zn=null;return}}var H=t.sibling;if(H!==null){Zn=H;return}t=i,Zn=t}while(t!==null);wi===ra&&(wi=i0)}function xo(e,t,n){var i=us(),u=Bi.transition;try{Bi.transition=null,ki(kr),dL(e,t,n,i)}finally{Bi.transition=u,ki(i)}return null}function dL(e,t,n,i){do oa();while(Pa!==null);if(wL(),(fn&(Fi|Kr))!==yi)throw new Error("Should not already be working.");var u=e.finishedWork,w=e.finishedLanes;if(CE(w),u===null)return Lb(),null;if(w===Ge&&y("root.finishedLanes should not be empty during a commit. This is a bug in React."),e.finishedWork=null,e.finishedLanes=Ge,u===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=Di;var T=nn(u.lanes,u.childLanes);nj(e,T),e===lr&&(lr=null,Zn=null,xi=Ge),((u.subtreeFlags&Jo)!==It||(u.flags&Jo)!==It)&&(bo||(bo=!0,cg=n,bg(Qa,function(){return oa(),null})));var V=(u.subtreeFlags&(sf|af|ac|Jo))!==It,H=(u.flags&(sf|af|ac|Jo))!==It;if(V||H){var q=Bi.transition;Bi.transition=null;var Z=us();ki(kr);var pe=fn;fn|=Kr,ig.current=null,u5(e,u),ow(),S5(e,u,w),Nk(e.containerInfo),e.current=u,ME(w),C5(u,e,w),UE(),mE(),fn=pe,ki(Z),Bi.transition=q}else e.current=u,ow();var fe=bo;if(bo?(bo=!1,Pa=e,bu=w):(Al=0,qh=null),T=e.pendingLanes,T===Ge&&(Ll=null),fe||y0(e.current,!1),yE(u.stateNode,i),cs&&e.memoizedUpdaters.clear(),$5(),wr(e,Ei()),t!==null)for(var je=e.onRecoverableError,De=0;De<t.length;De++){var Oe=t[De],ut=Oe.stack,At=Oe.digest;je(Oe.value,{componentStack:ut,digest:At})}if(Wh){Wh=!1;var Rt=og;throw og=null,Rt}return Dr(bu,Wt)&&e.tag!==ja&&oa(),T=e.pendingLanes,Dr(T,Wt)?(vT(),e===ug?yu++:(yu=0,ug=e)):yu=0,Da(),Lb(),null}function oa(){if(Pa!==null){var e=Yb(bu),t=aj(Xs,e),n=Bi.transition,i=us();try{return Bi.transition=null,ki(t),mL()}finally{ki(i),Bi.transition=n}}return!1}function hL(e){lg.push(e),bo||(bo=!0,bg(Qa,function(){return oa(),null}))}function mL(){if(Pa===null)return!1;var e=cg;cg=null;var t=Pa,n=bu;if(Pa=null,bu=Ge,(fn&(Fi|Kr))!==yi)throw new Error("Cannot flush passive effects while already rendering.");dg=!0,Gh=!1,OE(n);var i=fn;fn|=Kr,L5(t.current),D5(t,t.current,n,e);{var u=lg;lg=[];for(var w=0;w<u.length;w++){var T=u[w];f5(t,T)}}PE(),y0(t.current,!0),fn=i,Da(),Gh?t===qh?Al++:(Al=0,qh=t):Al=0,dg=!1,Gh=!1,xE(t);{var V=t.current.stateNode;V.effectDuration=0,V.passiveEffectDuration=0}return!0}function g0(e){return Ll!==null&&Ll.has(e)}function fL(e){Ll===null?Ll=new Set([e]):Ll.add(e)}function pL(e){Wh||(Wh=!0,og=e)}var vL=pL;function _0(e,t,n){var i=vo(n,t),u=pw(e,i,Wt),w=Ra(e,u,Wt),T=cr();w!==null&&(fc(w,Wt,T),wr(w,T))}function Hn(e,t,n){if(o5(n),Su(!1),e.tag===h){_0(e,e,n);return}var i=null;for(i=t;i!==null;){if(i.tag===h){_0(i,e,n);return}else if(i.tag===g){var u=i.type,w=i.stateNode;if(typeof u.getDerivedStateFromError=="function"||typeof w.componentDidCatch=="function"&&!g0(w)){var T=vo(n,e),V=Ov(i,T,Wt),H=Ra(i,V,Wt),q=cr();H!==null&&(fc(H,Wt,q),wr(H,q));return}}i=i.return}y(`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 gL(e,t,n){var i=e.pingCache;i!==null&&i.delete(t);var u=cr();$b(e,n),EL(e),lr===e&&il(xi,n)&&(wi===fu||wi===Hh&&Bb(xi)&&Ei()-ag<r0?yo(e,Ge):$h=nn($h,n)),wr(e,u)}function b0(e,t){t===Di&&(t=J5(e));var n=cr(),i=br(e,t);i!==null&&(fc(i,t,n),wr(i,n))}function _L(e){var t=e.memoizedState,n=Di;t!==null&&(n=t.retryLane),b0(e,n)}function bL(e,t){var n=Di,i;switch(e.tag){case k:i=e.stateNode;var u=e.memoizedState;u!==null&&(n=u.retryLane);break;case F: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),b0(e,n)}function yL(e){return e<120?120:e<480?480:e<1080?1080:e<1920?1920:e<3e3?3e3:e<4320?4320:q5(e/1960)*1960}function xL(){if(yu>K5)throw yu=0,ug=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.");Al>X5&&(Al=0,qh=null,y("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 wL(){ms.flushLegacyContextWarning(),ms.flushPendingUnsafeLifecycleWarnings()}function y0(e,t){Mn(e),Zh(e,_a,F5),t&&Zh(e,rf,H5),Zh(e,_a,I5),t&&Zh(e,rf,B5),qn()}function Zh(e,t,n){for(var i=e,u=null;i!==null;){var w=i.subtreeFlags&t;i!==u&&i.child!==null&&w!==It?i=i.child:((i.flags&t)!==It&&n(i),i.sibling!==null?i=i.sibling:i=u=i.return)}}var Qh=null;function x0(e){{if((fn&Fi)!==yi||!(e.mode&mn))return;var t=e.tag;if(t!==x&&t!==h&&t!==g&&t!==d&&t!==p&&t!==j&&t!==A)return;var n=St(e)||"ReactComponent";if(Qh!==null){if(Qh.has(n))return;Qh.add(n)}else Qh=new Set([n]);var i=si;try{Mn(e),y("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?Mn(e):qn()}}}var vg;{var NL=null;vg=function(e,t,n){var i=k0(NL,t);try{return Mw(e,t,n)}catch(w){if(UR()||w!==null&&typeof w=="object"&&typeof w.then=="function")throw w;if(ah(),Ox(),Bw(e,t),k0(t,i),t.mode&Rn&&_v(t),Jm(null,Mw,null,e,t,n),iE()){var u=Zm();typeof u=="object"&&u!==null&&u._suppressLogging&&typeof w=="object"&&w!==null&&!w._suppressLogging&&(w._suppressLogging=!0)}throw w}}}var w0=!1,gg;gg=new Set;function SL(e){if(Fr&&!mT())switch(e.tag){case d:case p:case A:{var t=Zn&&St(Zn)||"Unknown",n=t;if(!gg.has(n)){gg.add(n);var i=St(e)||"Unknown";y("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||(y("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 Nu(e,t){if(cs){var n=e.memoizedUpdaters;n.forEach(function(i){Wb(e,i,t)})}}var _g={};function bg(e,t){{var n=xs.current;return n!==null?(n.push(t),_g):Tb(e,t)}}function N0(e){if(e!==_g)return dE(e)}function S0(){return xs.current!==null}function CL(e){{if(e.mode&mn){if(!t0())return}else if(!G5()||fn!==yi||e.tag!==d&&e.tag!==p&&e.tag!==A)return;if(xs.current===null){var t=si;try{Mn(e),y(`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`,St(e))}finally{t?Mn(e):qn()}}}}function EL(e){e.tag!==ja&&t0()&&xs.current===null&&y(`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 Su(e){o0=e}var Xr=null,Ml=null,jL=function(e){Xr=e};function Ul(e){{if(Xr===null)return e;var t=Xr(e);return t===void 0?e:t.current}}function yg(e){return Ul(e)}function xg(e){{if(Xr===null)return e;var t=Xr(e);if(t===void 0){if(e!=null&&typeof e.render=="function"){var n=Ul(e.render);if(e.render!==n){var i={$$typeof:bt,render:n};return e.displayName!==void 0&&(i.displayName=e.displayName),i}}return e}return t.current}}function C0(e,t){{if(Xr===null)return!1;var n=e.elementType,i=t.type,u=!1,w=typeof i=="object"&&i!==null?i.$$typeof:null;switch(e.tag){case g:{typeof i=="function"&&(u=!0);break}case d:{(typeof i=="function"||w===gt)&&(u=!0);break}case p:{(w===bt||w===gt)&&(u=!0);break}case j:case A:{(w===jt||w===gt)&&(u=!0);break}default:return!1}if(u){var T=Xr(n);if(T!==void 0&&T===Xr(i))return!0}return!1}}function E0(e){{if(Xr===null||typeof WeakSet!="function")return;Ml===null&&(Ml=new WeakSet),Ml.add(e)}}var DL=function(e,t){{if(Xr===null)return;var n=t.staleFamilies,i=t.updatedFamilies;oa(),aa(function(){wg(e.current,i,n)})}},kL=function(e,t){{if(e.context!==Lr)return;oa(),aa(function(){Cu(t,e,null,null)})}};function wg(e,t,n){{var i=e.alternate,u=e.child,w=e.sibling,T=e.tag,V=e.type,H=null;switch(T){case d:case A:case g:H=V;break;case p:H=V.render;break}if(Xr===null)throw new Error("Expected resolveFamily to be set during hot reload.");var q=!1,Z=!1;if(H!==null){var pe=Xr(H);pe!==void 0&&(n.has(pe)?Z=!0:t.has(pe)&&(T===g?Z=!0:q=!0))}if(Ml!==null&&(Ml.has(e)||i!==null&&Ml.has(i))&&(Z=!0),Z&&(e._debugNeedsRemount=!0),Z||q){var fe=br(e,Wt);fe!==null&&Ni(fe,e,Wt,Gn)}u!==null&&!Z&&wg(u,t,n),w!==null&&wg(w,t,n)}}var RL=function(e,t){{var n=new Set,i=new Set(t.map(function(u){return u.current}));return Ng(e.current,i,n),n}};function Ng(e,t,n){{var i=e.child,u=e.sibling,w=e.tag,T=e.type,V=null;switch(w){case d:case A:case g:V=T;break;case p:V=T.render;break}var H=!1;V!==null&&t.has(V)&&(H=!0),H?TL(e,n):i!==null&&Ng(i,t,n),u!==null&&Ng(u,t,n)}}function TL(e,t){{var n=LL(e,t);if(n)return;for(var i=e;;){switch(i.tag){case N:t.add(i.stateNode);return;case _:t.add(i.stateNode.containerInfo);return;case h:t.add(i.stateNode.containerInfo);return}if(i.return===null)throw new Error("Expected to reach root first.");i=i.return}}}function LL(e,t){for(var n=e,i=!1;;){if(n.tag===N)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 Sg;{Sg=!1;try{var j0=Object.preventExtensions({})}catch{Sg=!0}}function AL(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=It,this.subtreeFlags=It,this.deletions=null,this.lanes=Ge,this.childLanes=Ge,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,!Sg&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var Ar=function(e,t,n,i){return new AL(e,t,n,i)};function Cg(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function ML(e){return typeof e=="function"&&!Cg(e)&&e.defaultProps===void 0}function UL(e){if(typeof e=="function")return Cg(e)?g:d;if(e!=null){var t=e.$$typeof;if(t===bt)return p;if(t===jt)return j}return x}function wo(e,t){var n=e.alternate;n===null?(n=Ar(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=It,n.subtreeFlags=It,n.deletions=null,n.actualDuration=0,n.actualStartTime=-1),n.flags=e.flags&qs,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 x:case d:case A:n.type=Ul(e.type);break;case g:n.type=yg(e.type);break;case p:n.type=xg(e.type);break}return n}function OL(e,t){e.flags&=qs|ui;var n=e.alternate;if(n===null)e.childLanes=Ge,e.lanes=t,e.child=null,e.subtreeFlags=It,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=It,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 PL(e,t,n){var i;return e===Xd?(i=mn,t===!0&&(i|=ti,i|=Es)):i=Mt,cs&&(i|=Rn),Ar(h,null,null,i)}function Eg(e,t,n,i,u,w){var T=x,V=e;if(typeof e=="function")Cg(e)?(T=g,V=yg(V)):V=Ul(V);else if(typeof e=="string")T=N;else e:switch(e){case On:return Ba(n.children,u,w,t);case mi:T=l,u|=ti,(u&mn)!==Mt&&(u|=Es);break;case le:return VL(n,u,w,t);case xt:return IL(n,u,w,t);case mt:return BL(n,u,w,t);case qt:return D0(n,u,w,t);case gn:case _n:case bn:case li:case rn:default:{if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ze:T=f;break e;case tt:T=m;break e;case bt:T=p,V=xg(V);break e;case jt:T=j;break e;case gt:T=D,V=null;break e}var H="";{(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(H+=" 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?St(i):null;q&&(H+=`
|
|
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)+"."+H))}}var Z=Ar(T,n,t,u);return Z.elementType=e,Z.type=V,Z.lanes=w,Z._debugOwner=i,Z}function jg(e,t,n){var i=null;i=e._owner;var u=e.type,w=e.key,T=e.props,V=Eg(u,w,T,i,t,n);return V._debugSource=e._source,V._debugOwner=e._owner,V}function Ba(e,t,n,i){var u=Ar(b,e,i,t);return u.lanes=n,u}function VL(e,t,n,i){typeof e.id!="string"&&y('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id);var u=Ar(S,e,i,t|Rn);return u.elementType=le,u.lanes=n,u.stateNode={effectDuration:0,passiveEffectDuration:0},u}function IL(e,t,n,i){var u=Ar(k,e,i,t);return u.elementType=xt,u.lanes=n,u}function BL(e,t,n,i){var u=Ar(F,e,i,t);return u.elementType=mt,u.lanes=n,u}function D0(e,t,n,i){var u=Ar(B,e,i,t);u.elementType=qt,u.lanes=n;var w={isHidden:!1};return u.stateNode=w,u}function Dg(e,t,n){var i=Ar(E,e,null,t);return i.lanes=n,i}function FL(){var e=Ar(N,null,null,Mt);return e.elementType="DELETED",e}function HL(e){var t=Ar(O,null,null,Mt);return t.stateNode=e,t}function kg(e,t,n){var i=e.children!==null?e.children:[],u=Ar(_,i,e.key,t);return u.lanes=n,u.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},u}function k0(e,t){return e===null&&(e=Ar(x,null,null,Mt)),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 zL(e,t,n,i,u){this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=up,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=Di,this.eventTimes=Af(Ge),this.expirationTimes=Af(Gn),this.pendingLanes=Ge,this.suspendedLanes=Ge,this.pingedLanes=Ge,this.expiredLanes=Ge,this.mutableReadLanes=Ge,this.finishedLanes=Ge,this.entangledLanes=Ge,this.entanglements=Af(Ge),this.identifierPrefix=i,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var w=this.pendingUpdatersLaneMap=[],T=0;T<uf;T++)w.push(new Set)}switch(t){case Xd:this._debugRootType=n?"hydrateRoot()":"createRoot()";break;case ja:this._debugRootType=n?"hydrate()":"render()";break}}function R0(e,t,n,i,u,w,T,V,H,q){var Z=new zL(e,t,n,V,H),pe=PL(t,w);Z.current=pe,pe.stateNode=Z;{var fe={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null};pe.memoizedState=fe}return Hp(pe),Z}var Rg="18.3.1";function $L(e,t,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return J(i),{$$typeof:Nn,key:i==null?null:""+i,children:e,containerInfo:t,implementation:n}}var Tg,Lg;Tg=!1,Lg={};function T0(e){if(!e)return Lr;var t=Yo(e),n=ER(t);if(t.tag===g){var i=t.type;if(ks(i))return rx(t,i,n)}return n}function WL(e,t){{var n=Yo(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 u=Db(n);if(u===null)return null;if(u.mode&ti){var w=St(n)||"Component";if(!Lg[w]){Lg[w]=!0;var T=si;try{Mn(u),n.mode&ti?y("%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,w):y("%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,w)}finally{T?Mn(T):qn()}}}return u.stateNode}}function L0(e,t,n,i,u,w,T,V){var H=!1,q=null;return R0(e,t,H,q,n,i,u,w,T)}function A0(e,t,n,i,u,w,T,V,H,q){var Z=!0,pe=R0(n,i,Z,e,u,w,T,V,H);pe.context=T0(null);var fe=pe.current,je=cr(),De=Va(fe),Oe=na(je,De);return Oe.callback=t??null,Ra(fe,Oe,De),Z5(pe,De,je),pe}function Cu(e,t,n,i){bE(t,e);var u=t.current,w=cr(),T=Va(u);IE(T);var V=T0(n);t.context===null?t.context=V:t.pendingContext=V,Fr&&si!==null&&!Tg&&(Tg=!0,y(`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.`,St(si)||"Unknown"));var H=na(w,T);H.payload={element:e},i=i===void 0?null:i,i!==null&&(typeof i!="function"&&y("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",i),H.callback=i);var q=Ra(u,H,T);return q!==null&&(Ni(q,u,T,w),dh(q,u,T)),T}function em(e){var t=e.current;if(!t.child)return null;switch(t.child.tag){case N:return t.child.stateNode;default:return t.child.stateNode}}function GL(e){switch(e.tag){case h:{var t=e.stateNode;if(yd(t)){var n=YE(t);nL(t,n)}break}case k:{aa(function(){var u=br(e,Wt);if(u!==null){var w=cr();Ni(u,e,Wt,w)}});var i=Wt;Ag(e,i);break}}}function M0(e,t){var n=e.memoizedState;n!==null&&n.dehydrated!==null&&(n.retryLane=ej(n.retryLane,t))}function Ag(e,t){M0(e,t);var n=e.alternate;n&&M0(n,t)}function qL(e){if(e.tag===k){var t=uc,n=br(e,t);if(n!==null){var i=cr();Ni(n,e,t,i)}Ag(e,t)}}function YL(e){if(e.tag===k){var t=Va(e),n=br(e,t);if(n!==null){var i=cr();Ni(n,e,t,i)}Ag(e,t)}}function U0(e){var t=uE(e);return t===null?null:t.stateNode}var O0=function(e){return null};function KL(e){return O0(e)}var P0=function(e){return!1};function XL(e){return P0(e)}var V0=null,I0=null,B0=null,F0=null,H0=null,z0=null,$0=null,W0=null,G0=null;{var q0=function(e,t,n){var i=t[n],u=kt(e)?e.slice():Ft({},e);return n+1===t.length?(kt(u)?u.splice(i,1):delete u[i],u):(u[i]=q0(e[i],t,n+1),u)},Y0=function(e,t){return q0(e,t,0)},K0=function(e,t,n,i){var u=t[i],w=kt(e)?e.slice():Ft({},e);if(i+1===t.length){var T=n[i];w[T]=w[u],kt(w)?w.splice(u,1):delete w[u]}else w[u]=K0(e[u],t,n,i+1);return w},X0=function(e,t,n){if(t.length!==n.length){R("copyWithRename() expects paths of the same length");return}else for(var i=0;i<n.length-1;i++)if(t[i]!==n[i]){R("copyWithRename() expects paths to be the same except for the deepest key");return}return K0(e,t,n,0)},J0=function(e,t,n,i){if(n>=t.length)return i;var u=t[n],w=kt(e)?e.slice():Ft({},e);return w[u]=J0(e[u],t,n+1,i),w},Z0=function(e,t,n){return J0(e,t,0,n)},Mg=function(e,t){for(var n=e.memoizedState;n!==null&&t>0;)n=n.next,t--;return n};V0=function(e,t,n,i){var u=Mg(e,t);if(u!==null){var w=Z0(u.memoizedState,n,i);u.memoizedState=w,u.baseState=w,e.memoizedProps=Ft({},e.memoizedProps);var T=br(e,Wt);T!==null&&Ni(T,e,Wt,Gn)}},I0=function(e,t,n){var i=Mg(e,t);if(i!==null){var u=Y0(i.memoizedState,n);i.memoizedState=u,i.baseState=u,e.memoizedProps=Ft({},e.memoizedProps);var w=br(e,Wt);w!==null&&Ni(w,e,Wt,Gn)}},B0=function(e,t,n,i){var u=Mg(e,t);if(u!==null){var w=X0(u.memoizedState,n,i);u.memoizedState=w,u.baseState=w,e.memoizedProps=Ft({},e.memoizedProps);var T=br(e,Wt);T!==null&&Ni(T,e,Wt,Gn)}},F0=function(e,t,n){e.pendingProps=Z0(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var i=br(e,Wt);i!==null&&Ni(i,e,Wt,Gn)},H0=function(e,t){e.pendingProps=Y0(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var n=br(e,Wt);n!==null&&Ni(n,e,Wt,Gn)},z0=function(e,t,n){e.pendingProps=X0(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var i=br(e,Wt);i!==null&&Ni(i,e,Wt,Gn)},$0=function(e){var t=br(e,Wt);t!==null&&Ni(t,e,Wt,Gn)},W0=function(e){O0=e},G0=function(e){P0=e}}function JL(e){var t=Db(e);return t===null?null:t.stateNode}function ZL(e){return null}function QL(){return si}function eA(e){var t=e.findFiberByHostInstance,n=c.ReactCurrentDispatcher;return _E({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:V0,overrideHookStateDeletePath:I0,overrideHookStateRenamePath:B0,overrideProps:F0,overridePropsDeletePath:H0,overridePropsRenamePath:z0,setErrorHandler:W0,setSuspenseHandler:G0,scheduleUpdate:$0,currentDispatcherRef:n,findHostInstanceByFiber:JL,findFiberByHostInstance:t||ZL,findHostInstancesForRefresh:RL,scheduleRefresh:DL,scheduleRoot:kL,setRefreshHandler:jL,getCurrentFiber:QL,reconcilerVersion:Rg})}var Q0=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ug(e){this._internalRoot=e}tm.prototype.render=Ug.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw new Error("Cannot update an unmounted root.");{typeof arguments[1]=="function"?y("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):nm(arguments[1])?y("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"&&y("You passed a second argument to root.render(...) but it only accepts one argument.");var n=t.containerInfo;if(n.nodeType!==Jn){var i=U0(t.current);i&&i.parentNode!==n&&y("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.")}}Cu(e,t,null,null)},tm.prototype.unmount=Ug.prototype.unmount=function(){typeof arguments[0]=="function"&&y("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;d0()&&y("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."),aa(function(){Cu(null,e,null,null)}),Qy(t)}};function tA(e,t){if(!nm(e))throw new Error("createRoot(...): Target container is not a DOM element.");eN(e);var n=!1,i=!1,u="",w=Q0;t!=null&&(t.hydrate?R("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===on&&y(`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&&(u=t.identifierPrefix),t.onRecoverableError!==void 0&&(w=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var T=L0(e,Xd,null,n,i,u,w);zd(T.current,e);var V=e.nodeType===Jn?e.parentNode:e;return Tc(V),new Ug(T)}function tm(e){this._internalRoot=e}function nA(e){e&&gj(e)}tm.prototype.unstable_scheduleHydration=nA;function iA(e,t,n){if(!nm(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");eN(e),t===void 0&&y("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var i=n??null,u=n!=null&&n.hydratedSources||null,w=!1,T=!1,V="",H=Q0;n!=null&&(n.unstable_strictMode===!0&&(w=!0),n.identifierPrefix!==void 0&&(V=n.identifierPrefix),n.onRecoverableError!==void 0&&(H=n.onRecoverableError));var q=A0(t,null,e,Xd,i,w,T,V,H);if(zd(q.current,e),Tc(e),u)for(var Z=0;Z<u.length;Z++){var pe=u[Z];oT(q,pe)}return new tm(q)}function nm(e){return!!(e&&(e.nodeType===Ai||e.nodeType===zr||e.nodeType===Fo))}function Eu(e){return!!(e&&(e.nodeType===Ai||e.nodeType===zr||e.nodeType===Fo||e.nodeType===Jn&&e.nodeValue===" react-mount-point-unstable "))}function eN(e){e.nodeType===Ai&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&y("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."),Hc(e)&&(e._reactRootContainer?y("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):y("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 rA=c.ReactCurrentOwner,tN;tN=function(e){if(e._reactRootContainer&&e.nodeType!==Jn){var t=U0(e._reactRootContainer.current);t&&t.parentNode!==e&&y("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=Og(e),u=!!(i&&Ca(i));u&&!n&&y("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===Ai&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&y("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 Og(e){return e?e.nodeType===zr?e.documentElement:e.firstChild:null}function nN(){}function sA(e,t,n,i,u){if(u){if(typeof i=="function"){var w=i;i=function(){var fe=em(T);w.call(fe)}}var T=A0(t,i,e,ja,null,!1,!1,"",nN);e._reactRootContainer=T,zd(T.current,e);var V=e.nodeType===Jn?e.parentNode:e;return Tc(V),aa(),T}else{for(var H;H=e.lastChild;)e.removeChild(H);if(typeof i=="function"){var q=i;i=function(){var fe=em(Z);q.call(fe)}}var Z=L0(e,ja,null,!1,!1,"",nN);e._reactRootContainer=Z,zd(Z.current,e);var pe=e.nodeType===Jn?e.parentNode:e;return Tc(pe),aa(function(){Cu(t,Z,n,i)}),Z}}function aA(e,t){e!==null&&typeof e!="function"&&y("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function im(e,t,n,i,u){tN(n),aA(u===void 0?null:u,"render");var w=n._reactRootContainer,T;if(!w)T=sA(n,t,e,u,i);else{if(T=w,typeof u=="function"){var V=u;u=function(){var H=em(T);V.call(H)}}Cu(t,T,e,u)}return em(T)}var iN=!1;function oA(e){{iN||(iN=!0,y("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=rA.current;if(t!==null&&t.stateNode!==null){var n=t.stateNode._warnedAboutRefsInRender;n||y("%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.",cn(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===Ai?e:WL(e,"findDOMNode")}function lA(e,t,n){if(y("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"),!Eu(t))throw new Error("Target container is not a DOM element.");{var i=Hc(t)&&t._reactRootContainer===void 0;i&&y("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 im(null,e,t,!0,n)}function cA(e,t,n){if(y("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"),!Eu(t))throw new Error("Target container is not a DOM element.");{var i=Hc(t)&&t._reactRootContainer===void 0;i&&y("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 im(null,e,t,!1,n)}function uA(e,t,n,i){if(y("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"),!Eu(n))throw new Error("Target container is not a DOM element.");if(e==null||!rE(e))throw new Error("parentComponent must be a valid React Component");return im(e,t,n,!1,i)}var rN=!1;function dA(e){if(rN||(rN=!0,y("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")),!Eu(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=Hc(e)&&e._reactRootContainer===void 0;t&&y("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=Og(e),i=n&&!Ca(n);i&&y("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return aa(function(){im(null,null,e,!1,function(){e._reactRootContainer=null,Qy(e)})}),!0}else{{var u=Og(e),w=!!(u&&Ca(u)),T=e.nodeType===Ai&&Eu(e.parentNode)&&!!e.parentNode._reactRootContainer;w&&y("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",T?"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}}oj(GL),cj(qL),uj(YL),dj(us),hj(rj),(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")&&y("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"),qC(mk),XC(mg,iL,aa);function hA(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!nm(t))throw new Error("Target container is not a DOM element.");return $L(e,t,null,n)}function mA(e,t,n,i){return uA(e,t,n,i)}var Pg={usingClientEntryPoint:!1,Events:[Ca,hl,$d,pb,vb,mg]};function fA(e,t){return Pg.usingClientEntryPoint||y('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),tA(e,t)}function pA(e,t,n){return Pg.usingClientEntryPoint||y('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),iA(e,t,n)}function vA(e){return d0()&&y("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."),aa(e)}var gA=eA({findFiberByHostInstance:ao,bundleType:1,version:Rg,rendererPackageName:"react-dom"});if(!gA&&Ie&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var sN=window.location.protocol;/^(https?|file):$/.test(sN)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(sN==="file:"?`
|
|
204
|
+
You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}Ur.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Pg,Ur.createPortal=hA,Ur.createRoot=fA,Ur.findDOMNode=oA,Ur.flushSync=vA,Ur.hydrate=lA,Ur.hydrateRoot=pA,Ur.render=cA,Ur.unmountComponentAtNode=dA,Ur.unstable_batchedUpdates=mg,Ur.unstable_renderSubtreeIntoContainer=mA,Ur.version=Rg,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})();z1.exports=Ur;var Yl=z1.exports,G1,lN=Yl;{var cN=lN.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;G1=function(r,s){cN.usingClientEntryPoint=!0;try{return lN.createRoot(r,s)}finally{cN.usingClientEntryPoint=!1}}}const q1={"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_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 · letters/digits/hyphens ≤16","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.pickSession":"Choose a session to bind","bind.newSession":"+ New session","bind.modeNew":"New","bind.modeExisting":"Existing","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","localurl.title":"Proxy & preview","localurl.open":"Enable proxy","localurl.disabled":"Dynamic preview is off — set a preview domain in Settings to proxy local ports.","localurl.notListening":"Nothing is listening on :{port}.","localurl.badProtocol":"This link is not a proxyable HTTP or HTTPS address.","localurl.network":"Could not reach the handmux service. Check your connection and try again.","localurl.failed":"Could not start the preview: {reason}. Check the configuration and try again.","changelog.title":"What's new","preview.dynamic":"Dynamic preview","preview.static":"Static preview","preview.tabs":"Open previews","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.composer.placeholder":"Message Claude…","chat.stop":"Stop","chat.interrupted":"You stopped the response","chat.compacted":"Context compacted","chat.slash.handedOff":"Switched to terminal — run {cmd} there","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","pane.splitH":"Split left/right","pane.splitV":"Split top/bottom","pane.manage":"Manage split","pane.close":"Close pane","pane.closeConfirm":"Close? Tap again","pane.splitFailed":"Split failed","pane.closeFailed":"Close failed","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.chat_lens":"Enable chat view (experimental)","settings.chat_lens_hint":"Experimental — may be unstable. View and drive Claude sessions as a chat; enables the view switch in the window bar and the chat colour tones below.","settings.chat_lens_need_hooks":"Requires Claude hooks first — question cards and status cues in the chat view depend on them.","settings.chat_lens_no_claude":"Claude Code not found — install and run it first.","settings.chat_lens_install_hooks":"Install hooks","settings.chat_lens_installing":"Installing…","settings.chat_lens_hooks_err":"Install failed — run handmux hooks install on your computer","boot.loading":"Loading","boot.chat_empty":"Send your first message to start the conversation","settings.chat_tone":"Chat colour","settings.chat_tone_dusk":"Warm Dusk","settings.chat_tone_ink":"Warm Gold","settings.chat_tone_light":"Warm Cream","settings.chat_tone_hint":"The colour tone of the 对话 (chat) view — all warm.","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_more":"{n} more version updates","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.permissionTimeout":"The system did not return the notification permission result. Check notification access for handmux or your browser in system settings, then try again.","push.permissionDenied":"Notification permission denied","push.swRegisterTimeout":"Registering the notification service timed out. Check your connection and try again.","push.swRegisterFailed":"Could not register the notification service: {reason}. Clear this site’s data, reopen it, and try again.","push.swTimeout":"The notification service was registered but did not activate. Clear this site’s data, reopen it, and try again.","push.unknownReason":"unknown reason","push.configTimeout":"Push configuration timed out. Check the connection to your handmux server and try again.","push.browserTimeout":"The browser push service did not respond. On Android Chrome, make sure Google Play services are available, then try again.","push.noVapid":"Push is not configured on the server (VAPID)","push.reportTimeout":"The subscription was created, but reporting it to the server timed out. Check the connection and try again.","push.subscriptionExpired":"Chrome returned an expired push subscription. It has been reset; tap Enable notifications again.","push.deliveryRejected":"The push service rejected the new subscription. Check the server log and try again.","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.).","pushInbox.title":"Notifications","pushInbox.empty":"No notifications yet","pushInbox.delete":"Delete","pushInbox.justNow":"just now","pushInbox.minutesAgo":"{n} min ago","pushInbox.hoursAgo":"{n} h ago","pushInbox.detailTitle":"Notification","pushInbox.openUrl":"Open link","pushInbox.expired":"This message has expired","pushInbox.back":"Back","pushInbox.markAllRead":"Mark all read","pushInbox.unreadCount":"{n} unread","pushInbox.loadFailed":"Could not load notifications. Check the connection and retry.","pushInbox.deleteFailed":"Could not delete the notification. It was kept; please retry.","pushInbox.retry":"Retry","pushInbox.deliveryPending":"Sending","pushInbox.deliverySuccess":"Success","pushInbox.deliveryFailed":"Failed","pushInbox.deliveryReasonExpired":"subscription expired","pushInbox.deliveryReasonRateLimited":"push service rate limit","pushInbox.deliveryReasonUnavailable":"push service unavailable","pushInbox.deliveryReasonRejected":"push service rejected it","pushInbox.deliveryReasonNetwork":"network error","pushInbox.deliveryReasonNotConfigured":"push is not configured","pushInbox.deliveryReasonUnknown":"unknown reason"},CA={"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_rule":"只能用字母、数字、横线(≤16)","rename.failed":"重命名失败,请重试","rename.saving":"保存中…","newwindow.title":"新建窗口","newwindow.window_name":"窗口名称(可选)","newwindow.name_placeholder":"留空自动命名 · 字母/数字/横线 ≤16","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.pickSession":"选择要绑定的会话","bind.newSession":"+ 新建会话","bind.modeNew":"新建会话","bind.modeExisting":"已有会话","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":"打开文件","localurl.title":"开启代理并预览","localurl.open":"开启代理","localurl.disabled":"动态预览未开启——在设置里配置预览域名后可代理本机端口。","localurl.notListening":"端口 :{port} 没有服务在监听。","localurl.badProtocol":"该链接不是可代理的 HTTP 或 HTTPS 地址。","localurl.network":"连接 handmux 服务失败,请检查网络后重试。","localurl.failed":"无法开启预览:{reason}。请检查配置后重试。","changelog.title":"新功能","preview.dynamic":"动态预览","preview.static":"静态预览","preview.tabs":"打开的预览","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.composer.placeholder":"和 Claude 对话…","chat.stop":"停止","chat.interrupted":"你终止了这次回复","chat.compacted":"上下文已压缩","chat.slash.handedOff":"已切到终端视图 · 在这里操作 {cmd}","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":"删除窗口","pane.splitH":"左右分屏","pane.splitV":"上下分屏","pane.manage":"管理分屏","pane.close":"关闭此格","pane.closeConfirm":"确认关闭?再点一次","pane.splitFailed":"分屏失败","pane.closeFailed":"关闭失败","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.chat_lens":"启用对话视图(实验性功能)","settings.chat_lens_hint":"实验性功能,可能不稳定。以对话形式查看和操作 Claude 会话;开启后,窗口栏出现视图切换,并可选择对话配色。","boot.loading":"正在加载","boot.chat_empty":"发送你的第一条消息,对话就开始啦","settings.chat_lens_need_hooks":"需先安装 Claude hooks:对话里的问题卡、状态提示都依赖它。","settings.chat_lens_no_claude":"未检测到 Claude Code;安装并运行后再开启。","settings.chat_lens_install_hooks":"一键安装 hooks","settings.chat_lens_installing":"安装中…","settings.chat_lens_hooks_err":"安装失败,请到电脑上运行 handmux hooks install","settings.chat_tone":"对话配色","settings.chat_tone_dusk":"暖夜","settings.chat_tone_ink":"暖金","settings.chat_tone_light":"暖黄","settings.chat_tone_hint":"对话视图的色调,均为暖色系。暖夜=暖棕暗、暖金=品牌橄榄金、暖黄=奶油亮。","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_more":"另有 {n} 个版本更新","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.permissionTimeout":"系统未返回通知授权结果,请在系统设置中检查 handmux 或浏览器的通知权限后重试","push.permissionDenied":"通知权限被拒绝","push.swRegisterTimeout":"注册通知服务超时,请检查网络后重试","push.swRegisterFailed":"注册通知服务失败:{reason}。请清除本站数据后重新打开再试","push.swTimeout":"通知服务已注册但未能激活,请清除本站数据后重新打开再试","push.unknownReason":"原因未知","push.configTimeout":"读取推送配置超时,请检查与 handmux 服务的连接后重试","push.browserTimeout":"浏览器推送服务没有响应;Android Chrome 请确认 Google Play 服务可用后重试","push.noVapid":"服务端未配置推送(VAPID)","push.reportTimeout":"订阅已创建,但上报服务器超时,请检查连接后重试","push.subscriptionExpired":"Chrome 返回的推送订阅已经失效,已为你重置;请再次点击开启通知","push.deliveryRejected":"推送服务拒绝了新订阅,请检查服务器日志后重试","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 等)。","pushInbox.title":"通知记录","pushInbox.empty":"还没有脚本通知","pushInbox.delete":"删除","pushInbox.justNow":"刚刚","pushInbox.minutesAgo":"{n}分钟前","pushInbox.hoursAgo":"{n}小时前","pushInbox.detailTitle":"通知详情","pushInbox.openUrl":"打开链接","pushInbox.expired":"这条消息已过期","pushInbox.back":"返回","pushInbox.markAllRead":"全部已读","pushInbox.unreadCount":"{n} 未读","pushInbox.loadFailed":"通知记录加载失败,请检查连接后重试","pushInbox.deleteFailed":"通知删除失败,消息已保留,请重试","pushInbox.retry":"重试","pushInbox.deliveryPending":"发送中","pushInbox.deliverySuccess":"成功","pushInbox.deliveryFailed":"失败","pushInbox.deliveryReasonExpired":"订阅已失效","pushInbox.deliveryReasonRateLimited":"推送服务限流","pushInbox.deliveryReasonUnavailable":"推送服务暂不可用","pushInbox.deliveryReasonRejected":"推送服务已拒绝","pushInbox.deliveryReasonNetwork":"网络错误","pushInbox.deliveryReasonNotConfigured":"服务端未配置推送","pushInbox.deliveryReasonUnknown":"未知原因"},EA={"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_rule":"只能使用字母、數字、連字號(≤16)","rename.failed":"重新命名失敗,請重試","rename.saving":"儲存中…","newwindow.title":"新增視窗","newwindow.window_name":"視窗名稱(選填)","newwindow.name_placeholder":"留空自動命名 · 字母/數字/連字號 ≤16","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.pickSession":"選擇要綁定的工作階段","bind.newSession":"+ 新增工作階段","bind.modeNew":"新增工作階段","bind.modeExisting":"既有工作階段","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":"刪除視窗","pane.splitH":"左右分割","pane.splitV":"上下分割","pane.manage":"管理分割","pane.close":"關閉此格","pane.closeConfirm":"確認關閉?再點一次","pane.splitFailed":"分割失敗","pane.closeFailed":"關閉失敗","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.chat_lens":"啟用對話視圖(實驗性功能)","settings.chat_lens_hint":"實驗性功能,可能不穩定。以對話形式查看和操作 Claude 工作階段;開啟後,視窗列出現視圖切換,並可選擇對話配色。","boot.loading":"正在載入","boot.chat_empty":"發送你的第一則訊息,對話就開始啦","settings.chat_lens_need_hooks":"需先安裝 Claude hooks:對話裡的問題卡、狀態提示都依賴它。","settings.chat_lens_no_claude":"未檢測到 Claude Code;安裝並運行後再開啟。","settings.chat_lens_install_hooks":"一鍵安裝 hooks","settings.chat_lens_installing":"安裝中…","settings.chat_lens_hooks_err":"安裝失敗,請到電腦上運行 handmux hooks install","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_more":"另有 {n} 個版本更新","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":"啟動失敗","localurl.title":"開啟代理並預覽","localurl.open":"開啟代理","localurl.disabled":"動態預覽未開啟——在設定中配置預覽網域後即可代理本機連接埠。","localurl.notListening":"連接埠 :{port} 沒有服務在監聽。","localurl.badProtocol":"此連結不是可代理的 HTTP 或 HTTPS 位址。","localurl.network":"無法連線 handmux 服務,請檢查網路後重試。","localurl.failed":"無法開啟預覽:{reason}。請檢查設定後重試。","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.permissionTimeout":"系統未回傳通知授權結果,請在系統設定中檢查 handmux 或瀏覽器的通知權限後再試","push.permissionDenied":"通知權限被拒絕","push.swRegisterTimeout":"註冊通知服務逾時,請檢查網路後再試","push.swRegisterFailed":"註冊通知服務失敗:{reason}。請清除本站資料後重新開啟再試","push.swTimeout":"通知服務已註冊但未能啟用,請清除本站資料後重新開啟再試","push.unknownReason":"原因不明","push.configTimeout":"讀取推播設定逾時,請檢查與 handmux 伺服器的連線後再試","push.browserTimeout":"瀏覽器推播服務沒有回應;Android Chrome 請確認 Google Play 服務可用後再試","push.noVapid":"伺服器未設定推播(VAPID)","push.reportTimeout":"訂閱已建立,但回報伺服器逾時,請檢查連線後再試","push.subscriptionExpired":"Chrome 回傳的推播訂閱已失效,已為你重設;請再次點擊開啟通知","push.deliveryRejected":"推播服務拒絕了新訂閱,請檢查伺服器記錄後再試","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 等)。","pushInbox.title":"通知記錄","pushInbox.empty":"還沒有腳本通知","pushInbox.delete":"刪除","pushInbox.justNow":"剛剛","pushInbox.minutesAgo":"{n}分鐘前","pushInbox.hoursAgo":"{n}小時前","pushInbox.detailTitle":"通知詳情","pushInbox.openUrl":"打開連結","pushInbox.expired":"這條訊息已過期","pushInbox.back":"返回","pushInbox.markAllRead":"全部已讀","pushInbox.unreadCount":"{n} 未讀","pushInbox.loadFailed":"通知記錄載入失敗,請檢查連線後重試","pushInbox.deleteFailed":"通知刪除失敗,訊息已保留,請重試","pushInbox.retry":"重試","pushInbox.deliveryPending":"傳送中","pushInbox.deliverySuccess":"成功","pushInbox.deliveryFailed":"失敗","pushInbox.deliveryReasonExpired":"訂閱已失效","pushInbox.deliveryReasonRateLimited":"推播服務限流","pushInbox.deliveryReasonUnavailable":"推播服務暫不可用","pushInbox.deliveryReasonRejected":"推播服務已拒絕","pushInbox.deliveryReasonNetwork":"網路錯誤","pushInbox.deliveryReasonNotConfigured":"伺服器未設定推播","pushInbox.deliveryReasonUnknown":"不明原因"},jA={"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_rule":"英数字とハイフンのみ(≤16文字)","rename.failed":"名前の変更に失敗しました。再試行してください","rename.saving":"保存中…","newwindow.title":"新規ウィンドウ","newwindow.window_name":"ウィンドウ名(任意)","newwindow.name_placeholder":"空白で自動命名 · 英数字/ハイフン ≤16","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.pickSession":"紐付けるセッションを選択","bind.newSession":"+ 新規セッション","bind.modeNew":"新規作成","bind.modeExisting":"既存を選択","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":"ウィンドウを削除","pane.splitH":"左右に分割","pane.splitV":"上下に分割","pane.manage":"分割を管理","pane.close":"ペインを閉じる","pane.closeConfirm":"閉じますか?もう一度タップ","pane.splitFailed":"分割に失敗しました","pane.closeFailed":"閉じる操作に失敗しました","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_more":"ほか {n} バージョンの更新","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":"起動に失敗しました","localurl.title":"プロキシを有効にしてプレビュー","localurl.open":"プロキシを有効化","localurl.disabled":"ダイナミックプレビューは無効です。設定でプレビュードメインを構成するとローカルポートをプロキシできます。","localurl.notListening":"ポート :{port} で待ち受けているサービスがありません。","localurl.badProtocol":"このリンクはプロキシ可能な HTTP または HTTPS アドレスではありません。","localurl.network":"handmux サービスに接続できません。ネットワークを確認して再試行してください。","localurl.failed":"プレビューを開始できません:{reason}。設定を確認して再試行してください。","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.permissionTimeout":"通知権限の結果が返されませんでした。システム設定で handmux またはブラウザの通知権限を確認して再試行してください。","push.permissionDenied":"通知の権限が拒否されました","push.swRegisterTimeout":"通知サービスの登録がタイムアウトしました。接続を確認して再試行してください。","push.swRegisterFailed":"通知サービスを登録できませんでした:{reason}。このサイトのデータを消去し、再度開いてお試しください。","push.swTimeout":"通知サービスは登録されましたが有効化できませんでした。このサイトのデータを消去し、再度開いてお試しください。","push.unknownReason":"原因不明","push.configTimeout":"プッシュ設定の読み込みがタイムアウトしました。handmux サーバーへの接続を確認して再試行してください。","push.browserTimeout":"ブラウザのプッシュサービスが応答しません。Android Chrome では Google Play 開発者サービスが利用可能か確認して再試行してください。","push.noVapid":"サーバーにプッシュ通知(VAPID)が設定されていません","push.reportTimeout":"購読は作成されましたが、サーバーへの登録がタイムアウトしました。接続を確認して再試行してください。","push.subscriptionExpired":"Chrome が期限切れのプッシュ購読を返しました。リセットしたので、もう一度「通知を有効にする」をタップしてください。","push.deliveryRejected":"プッシュサービスが新しい購読を拒否しました。サーバーログを確認して再試行してください。","push.subscribeFailed":"サブスクリプションの登録に失敗しました","push.sendFailed":"送信に失敗しました","pushInbox.loadFailed":"通知を読み込めませんでした。接続を確認して再試行してください。","pushInbox.deleteFailed":"通知を削除できませんでした。メッセージは保持されています。再試行してください。","pushInbox.retry":"再試行","pushInbox.deliveryPending":"送信中","pushInbox.deliverySuccess":"成功","pushInbox.deliveryFailed":"失敗","pushInbox.deliveryReasonExpired":"購読の有効期限切れ","pushInbox.deliveryReasonRateLimited":"プッシュサービスの制限","pushInbox.deliveryReasonUnavailable":"プッシュサービスを利用できません","pushInbox.deliveryReasonRejected":"プッシュサービスが拒否","pushInbox.deliveryReasonNetwork":"ネットワークエラー","pushInbox.deliveryReasonNotConfigured":"プッシュ未設定","pushInbox.deliveryReasonUnknown":"原因不明","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} 分"},DA={"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_rule":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","rename.failed":"이름 변경에 실패했습니다. 다시 시도하세요","rename.saving":"저장 중…","newwindow.title":"새 창","newwindow.window_name":"창 이름(선택 사항)","newwindow.name_placeholder":"비워두면 자동 이름 지정 · 영문/숫자/하이픈 ≤16","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.pickSession":"연결할 세션 선택","bind.newSession":"+ 새 세션","bind.modeNew":"새 세션","bind.modeExisting":"기존 세션","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":"창 삭제","pane.splitH":"좌우 분할","pane.splitV":"상하 분할","pane.manage":"분할 관리","pane.close":"창 닫기","pane.closeConfirm":"닫을까요? 다시 탭","pane.splitFailed":"분할 실패","pane.closeFailed":"닫기 실패","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_more":"이전 버전 업데이트 {n}개 더 보기","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":"시작에 실패했습니다","localurl.title":"프록시를 활성화하여 미리보기","localurl.open":"프록시 활성화","localurl.disabled":"동적 미리보기가 비활성화되어 있습니다. 설정에서 미리보기 도메인을 구성하면 로컬 포트를 프록시할 수 있습니다.","localurl.notListening":"포트 :{port}에서 수신 중인 서비스가 없습니다.","localurl.badProtocol":"이 링크는 프록시할 수 있는 HTTP 또는 HTTPS 주소가 아닙니다.","localurl.network":"handmux 서비스에 연결할 수 없습니다. 네트워크를 확인한 후 다시 시도하세요.","localurl.failed":"미리보기를 시작할 수 없습니다: {reason}. 설정을 확인한 후 다시 시도하세요.","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.permissionTimeout":"알림 권한 결과가 반환되지 않았습니다. 시스템 설정에서 handmux 또는 브라우저의 알림 권한을 확인한 후 다시 시도하세요.","push.permissionDenied":"알림 권한이 거부되었습니다","push.swRegisterTimeout":"알림 서비스 등록 시간이 초과되었습니다. 연결을 확인한 후 다시 시도하세요.","push.swRegisterFailed":"알림 서비스를 등록하지 못했습니다: {reason}. 이 사이트의 데이터를 삭제하고 다시 열어 시도하세요.","push.swTimeout":"알림 서비스가 등록되었지만 활성화되지 않았습니다. 이 사이트의 데이터를 삭제하고 다시 열어 시도하세요.","push.unknownReason":"알 수 없는 원인","push.configTimeout":"푸시 설정을 불러오는 시간이 초과되었습니다. handmux 서버 연결을 확인한 후 다시 시도하세요.","push.browserTimeout":"브라우저 푸시 서비스가 응답하지 않습니다. Android Chrome에서는 Google Play 서비스를 사용할 수 있는지 확인한 후 다시 시도하세요.","push.noVapid":"서버에 푸시 알림(VAPID)이 설정되지 않았습니다","push.reportTimeout":"구독은 생성되었지만 서버 등록 시간이 초과되었습니다. 연결을 확인한 후 다시 시도하세요.","push.subscriptionExpired":"Chrome이 만료된 푸시 구독을 반환했습니다. 구독을 초기화했으니 알림 켜기를 다시 누르세요.","push.deliveryRejected":"푸시 서비스가 새 구독을 거부했습니다. 서버 로그를 확인한 후 다시 시도하세요.","push.subscribeFailed":"구독 등록에 실패했습니다","push.sendFailed":"전송에 실패했습니다","pushInbox.loadFailed":"알림을 불러오지 못했습니다. 연결을 확인한 후 다시 시도하세요.","pushInbox.deleteFailed":"알림을 삭제하지 못했습니다. 메시지는 유지됩니다. 다시 시도하세요.","pushInbox.retry":"다시 시도","pushInbox.deliveryPending":"전송 중","pushInbox.deliverySuccess":"성공","pushInbox.deliveryFailed":"실패","pushInbox.deliveryReasonExpired":"구독 만료","pushInbox.deliveryReasonRateLimited":"푸시 서비스 요청 제한","pushInbox.deliveryReasonUnavailable":"푸시 서비스를 사용할 수 없음","pushInbox.deliveryReasonRejected":"푸시 서비스가 거부함","pushInbox.deliveryReasonNetwork":"네트워크 오류","pushInbox.deliveryReasonNotConfigured":"푸시가 설정되지 않음","pushInbox.deliveryReasonUnknown":"알 수 없는 원인","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}분"},A_={zh:CA,"zh-TW":EA,en:q1,ja:jA,ko:DA},uN=[{code:"zh",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"en",label:"English"},{code:"ja",label:"日本語"},{code:"ko",label:"한국어"}],Y1="tw_lang";function kA(r,s,c=A_){if(r&&c[r])return r;for(const v of s&&s.length?s:["en"]){const C=String(v).toLowerCase();if(c[C])return C;const R=C.split("-")[0];if(c[R])return R}return"en"}function RA(r,s,c,v){let C=r&&r[c]!=null?r[c]:s&&s[c]!=null?s[c]:c;return v&&(C=C.replace(/\{(\w+)\}/g,(R,y)=>v[y]!=null?v[y]:`{${y}}`)),C}const TA=()=>typeof navigator<"u"?navigator.languages||[navigator.language]:null,LA=()=>{try{return localStorage.getItem(Y1)}catch{return null}};let _m=kA(LA(),TA());function U(r,s){return RA(A_[_m],q1,r,s)}function So(){return _m}function AA(r){if(!(!A_[r]||r===_m)){try{localStorage.setItem(Y1,r)}catch{}_m=r,typeof location<"u"&&location.reload()}}const M_="tw_token",U_="tw_font",Am="tw_bound",K1="tw_last_session",X1="tw_win",J1="tw_pane",O_="tw_favs",MA="tw_recent",UA=30,n_="tw_inbox_seen",Z1="tw_inbox_read_ts",Q1="tw_browse_dir",eS="tw_preview_dir",tS="tw_startup_cmd",i_="tw_chat_draft",nS="tw_chat_tone",r_="tw_chat_lens",OA="tw_ideas",iS="tw_changelog_seen",rS="tw_version_seen",P_="tw_git_repos",Ha=()=>localStorage.getItem(M_),PA=r=>localStorage.setItem(M_,r),VA=()=>localStorage.removeItem(M_);function ko(){try{return JSON.parse(localStorage.getItem(Am))||[]}catch{return[]}}function dN(r){const s=ko();return s.includes(r)||s.push(r),localStorage.setItem(Am,JSON.stringify(s)),s}function hN(r){const s=ko().filter(c=>c!==r);return localStorage.setItem(Am,JSON.stringify(s)),s}function IA(r,s){const c=ko().map(v=>v===r?s:v);return localStorage.setItem(Am,JSON.stringify(c)),V_.renameSession(r,s),Mm.renameSession(r,s),c}function Pr(r){try{const s=JSON.parse(localStorage.getItem(r));return s&&typeof s=="object"&&!Array.isArray(s)?s:{}}catch{return{}}}function za(r,s,c){const v=Pr(r);v[s]=c,localStorage.setItem(r,JSON.stringify(v))}function sS(r){const s=c=>c&&typeof c=="object"&&!Array.isArray(c)?c:{};return{get(c,v){return!c||!v?[]:s(Pr(r)[c])[v]??[]},set(c,v,C){const R=Pr(r),y=s(R[c]);return C&&C.length?y[v]=C:delete y[v],Object.keys(y).length?R[c]=y:delete R[c],localStorage.setItem(r,JSON.stringify(R)),C??[]},renameWindow(c,v,C){if(!c||!v||!C||v===C)return;const R=Pr(r),y=s(R[c]);y[v]!=null&&(y[C]=y[v],delete y[v],R[c]=y,localStorage.setItem(r,JSON.stringify(R)))},renameSession(c,v){const C=Pr(r);C[c]!=null&&(C[v]=C[c],delete C[c],localStorage.setItem(r,JSON.stringify(C)))}}}const V_=sS(MA),Mm=sS(OA),mN=()=>Pr(n_);function fN(r,s){return za(n_,r,s),Pr(n_)}const BA=()=>{const r=localStorage.getItem(Z1);return r==null?null:Number(r)},pN=r=>localStorage.setItem(Z1,String(r)),aS="tw_notif_seen_ts",FA=()=>{const r=localStorage.getItem(aS);return r==null?0:Number(r)},HA=r=>localStorage.setItem(aS,String(r)),I_="tw_notif_read_ids",Ou=()=>{try{const r=JSON.parse(localStorage.getItem(I_)||"[]");return Array.isArray(r)?r:[]}catch{return[]}},vN=r=>{const s=Ou();s.includes(r)||localStorage.setItem(I_,JSON.stringify([...s,r]))},zA=r=>{const s=Ou().filter(c=>r.includes(c));return localStorage.setItem(I_,JSON.stringify(s)),s},$A=r=>r?Pr(Q1)[r]??null:null,gN=(r,s)=>{r&&s&&za(Q1,r,s)},WA=r=>r?Pr(eS)[r]??null:null,GA=(r,s)=>{r&&s&&za(eS,r,s)},qA=()=>localStorage.getItem(K1),YA=r=>Pr(X1)[r]??null,sm=r=>Pr(J1)[r]??null;function Pl({sessionId:r,windowId:s,paneId:c}={}){r&&localStorage.setItem(K1,r),r&&s&&za(X1,r,s),s&&c&&za(J1,s,c)}function KA(){const r=Number(localStorage.getItem(U_));return Number.isFinite(r)&&r>0?r:null}const Du=r=>localStorage.setItem(U_,String(r)),XA=()=>localStorage.removeItem(U_),oS=["dusk","ink","light"],JA=()=>{const r=localStorage.getItem(nS);return oS.includes(r)?r:"dusk"},ZA=r=>{oS.includes(r)&&localStorage.setItem(nS,r)},QA=()=>localStorage.getItem(r_)==="1",eM=r=>{r?localStorage.setItem(r_,"1"):localStorage.removeItem(r_)},lS=()=>localStorage.getItem(i_)||"",cS=r=>{r?localStorage.setItem(i_,r):localStorage.removeItem(i_)};function bm(){try{return JSON.parse(localStorage.getItem(O_))||[]}catch{return[]}}function tM(r){const s=r.trim(),c=bm();return s&&!c.includes(s)&&c.push(s),localStorage.setItem(O_,JSON.stringify(c)),c}function nM(r){const s=bm().filter(c=>c!==r);return localStorage.setItem(O_,JSON.stringify(s)),s}const uS=()=>localStorage.getItem(tS)||"",dS=r=>localStorage.setItem(tS,r||""),hS="tw_orphan_kill",iM=()=>localStorage.getItem(hS)!=="0",rM=r=>localStorage.setItem(hS,r?"1":"0"),mS="tw_doc_highlight",fS=()=>localStorage.getItem(mS)==="1",sM=r=>localStorage.setItem(mS,r?"1":"0"),ym=(r,s)=>V_.get(r,s),pS=(r,s,c)=>V_.set(r,s,c);function aM(r,s,c){const v=(c||"").trim(),C=ym(r,s);return!v||!r||!s?C:pS(r,s,[v,...C.filter(R=>R!==v)].slice(0,UA))}function oM(r,s,c){return!r||!s?ym(r,s):pS(r,s,ym(r,s).filter(v=>v!==c))}const B_="tw_recent_docs",vS="tw_pane_base",lM=30;function Pu(){try{return JSON.parse(localStorage.getItem(B_))||[]}catch{return[]}}function _N({path:r,name:s,type:c,ts:v=Date.now()}){const C=[{path:r,name:s,type:c,ts:v},...Pu().filter(R=>R.path!==r)].slice(0,lM);return localStorage.setItem(B_,JSON.stringify(C)),C}function cM(r){const s=Pu().filter(c=>c.path!==r);return localStorage.setItem(B_,JSON.stringify(s)),s}const bN=r=>Pr(vS)[r]??null,uM=(r,s)=>za(vS,r,s),da=[10,11,12,13,14,16,18,20,22],dM=4,gS="tw_doc_font";function hM(){const r=localStorage.getItem(gS),s=Number(r);return r!==null&&Number.isInteger(s)&&s>=0&&s<da.length?s:dM}const mM=r=>localStorage.setItem(gS,String(Math.min(da.length-1,Math.max(0,r)))),fM=2,_S="tw_diff_font";function pM(){const r=localStorage.getItem(_S),s=Number(r);return r!==null&&Number.isInteger(s)&&s>=0&&s<da.length?s:fM}const vM=r=>localStorage.setItem(_S,String(Math.min(da.length-1,Math.max(0,r)))),bS=(r,s)=>Mm.get(r,s);function yN(r,s,c){return!r||!s?[]:Mm.set(r,s,c)}const gM=()=>localStorage.getItem(iS),_M=r=>{r&&localStorage.setItem(iS,r)},bM=()=>localStorage.getItem(rS),yM=r=>{r&&localStorage.setItem(rS,r)};function xM(r,s,c){Mm.renameWindow(r,s,c)}function F_(r){if(!r)return[];const s=Pr(P_)[r];return Array.isArray(s)?s:[]}function xN(r,s){if(!r)return[];const c=[...F_(r)];for(const v of s)v&&!c.includes(v)&&c.push(v);return za(P_,r,c),c}function wM(r,s){if(!r)return[];const c=F_(r).filter(v=>v!==s);return za(P_,r,c),c}const s_=[{version:"0.17.6",date:"2026-07-20",highlight:{zh:"推送结果可追踪 · 对话与权限操作更可靠",en:"Traceable push results · safer chats and permissions"},items:{zh:["脚本通知现在会按设备显示成功或失败,失败详情会区分订阅失效、限流、推送服务不可用、拒绝和网络错误;handmux push 也不会再把零送达或部分失败报告为成功。","修复了关闭通知、打开或删除通知记录、查询设备 key 等操作在浏览器或网络无响应时可能一直等待的问题;关闭本地通知开关现在会立即生效。","长对话轮询不再遍历整段会话;历史记录统一每次加载 20 条,首次打开不足一屏时也会自动继续补取更早内容。","权限确认卡调整为左侧取消、右侧确认;取消需要在 2 秒内再次点击,避免误触中断正在等待的请求。"],en:["Script notifications now show success or failure per device, with details for expired subscriptions, rate limits, unavailable push services, rejection, and network errors; handmux push no longer reports zero delivery or partial failure as success.","Fixed notification disabling, inbox loading or deletion, and device-key lookup waiting forever when the browser or network stops responding; the local notification switch now turns off immediately.","Long-chat polling no longer walks the entire session; history loads 20 messages at a time and automatically keeps fetching older messages when the first page does not fill the screen.","Permission cards now place Cancel on the left and Confirm on the right; cancellation requires a second tap within two seconds to prevent accidentally interrupting a pending request."]}},{version:"0.17.5",date:"2026-07-20",highlight:{zh:"通知开启修复 · 长会话与设置可靠性提升",en:"Notification setup fixed · stronger chat and settings reliability"},items:{zh:["修复了安卓 Chrome 开启通知永久转圈、失效订阅假报成功以及更换域名后收不到通知的问题;注册、激活、FCM 与服务器上报现在会分别检查,失效订阅可自动重置。","修复了超长对话反复全量解析、可能拖慢服务并持续占用手机内存的问题;对话记录改为增量读取并限制缓存规模。","恢复设置里的完整版本更新历史;有新版本时的升级提示仍只展示最新一条,更早版本可按需展开。","修复通知记录加载或删除失败时误显示为空、消息短暂消失的问题,现在会保留已有内容并提示重试。","修复 Agent 退出后偶尔残留旧状态、普通 Node 程序被误认成 Codex 的问题;动态预览认证也限制在当前子域,启动失败会显示真实原因。"],en:["Fixed Android Chrome notification setup spinning forever, stale subscriptions being reported as enabled, and notifications not arriving after a domain change; registration, activation, FCM, and server reporting are now checked separately, with expired subscriptions reset automatically.","Fixed very long chats being repeatedly parsed in full, which could slow the service and keep growing phone memory use; transcripts now load incrementally with bounded caches.","Restored the complete version history in Settings; the upgrade prompt still shows only the newest release by default, with older versions expandable on demand.","Fixed notification history appearing empty or briefly losing a message when loading or deletion failed; existing content is now preserved with a retry action.","Fixed stale Agent state after exit and ordinary Node programs occasionally being mistaken for Codex; dynamic-preview authentication is now scoped to the current subdomain and startup failures show their real cause."]}},{version:"0.17.4",date:"2026-07-19",highlight:{zh:"HTTPS 本机预览修复 · 通知链接安全加固",en:"HTTPS localhost previews fixed · safer notification links"},items:{zh:["修复了 HTTPS/WSS 本机服务无法一键预览、带 # 的深链打开失败,以及 Codex pane 偶尔误出现 Claude 对话视图的问题;通知跳转链接也增加了安全校验。"],en:["Fixed one-tap previews for local HTTPS/WSS services, deep links with # fragments, and Claude chat view occasionally appearing on a Codex pane; notification links now receive stricter safety checks too."]}},{version:"0.17.3",date:"2026-07-19",highlight:{zh:"三修官方一键安装的 Claude 识别,真机已验证",en:"Third fix for native-install Claude detection, device-verified"},items:{zh:["修复了官方一键安装器版 Claude Code 仍识别不出的问题(0.17.2 的对账依据在真实环境不成立);本次按真机数据修正,已验证所有官方安装方式都能正确识别(agent 图标、对话视图切换钮正常出现)。"],en:["Fixed native-installer Claude detection still not working (0.17.2 relied on a signal that doesn't hold in the real environment); corrected against real-device data — verified across all official install methods (agent icon and chat-view switch appear)."]}},{version:"0.17.0",date:"2026-07-18",highlight:{zh:"对话视图(实验性)· 通知记录 · 本机地址一键预览",en:"Chat view (experimental) · notification inbox · one-tap localhost preview"},items:{zh:["新增「对话视图」(实验性功能,默认关):到设置里打开「启用对话视图(实验性功能)」后,窗口栏就能把 Claude 会话在终端/对话两个视图间一键切换(需已装 Claude hooks,没装可一键安装)。对话视图把会话读成聊天记录——气泡 + Markdown、工具卡(编辑文件带 +A/−B 和彩色 diff)、Claude 提问时点按即答的问题卡、上下文压缩动画、三套暖色配色;终端视图照旧,完全不受影响。","新增「通知记录」:脚本推送(handmux push)的通知按设备留存(各 100 条),全屏翻看、点开看详情、逐条删除;点手机上的通知直接跳到那条消息的详情。","终端里打印的本机地址(localhost:3000 等)自动变成可点的:点一下就能起代理在手机上预览(带路径),多个端口还能并行切换、自动续期。"],en:["New chat view (experimental, off by default): enable it in Settings → Enable chat view, then flip a Claude pane between terminal and chat from the window bar (requires Claude hooks — one-tap install offered). The chat view reads the session as a conversation — bubbles with Markdown, tool cards (+A/−B and colored diffs for file edits), question cards you answer with a tap, a visible compaction animation, and three warm colour tones. The terminal view is untouched.","New notification inbox: pushes from handmux push are kept per device (latest 100) — browse full-screen, open details, delete one by one; tapping a push lands on that message’s detail.","Localhost URLs printed in the terminal (localhost:3000, …) are now tappable: one tap proxies and previews them on your phone (path preserved), with several ports open in parallel and auto-renewed."]}},{version:"0.16.0",date:"2026-07-15",highlight:{zh:"分屏布局地图 · 手机也能建/删窗格",en:"Split-layout map · create & close panes from the phone"},items:{zh:["有多个窗格的窗口,选择器不再是一条干巴巴的下拉列表,而是照着你屏幕上真实的分屏样子画出来:每一格对应一个窗格,标着序号、正在跑的命令和 Agent 图标,一眼就看出谁在左谁在右、谁在上谁在下,点一下就切过去看那一格。","现在手机上就能直接分屏和关窗格了:长按地图里的某一格,就能把它「左右分屏」或「上下分屏」,也能「关闭」;还没分屏的窗口在它的菜单里也能分,已经分屏的窗口菜单里点「管理分屏」直接进地图。分好之后自动就落在新的那格里,地图也一直开着,随时能接着分或关。","绑定会话的弹窗更清楚了:「新建会话」和「选已有会话」分成两个明确的选项,不会再让人以为点一下「新建」就直接把会话建出来。"],en:["For a window with several panes, the picker is no longer a plain dropdown — it’s drawn to match the way your screen is actually split: each tile is one pane, labelled with its number, the command it’s running, and its agent, so you can tell at a glance which pane is where. Tap a tile to jump to that pane.","You can now split and close panes right from the phone: long-press a tile in the map to Split it left/right or top/bottom, or Close it; a window that isn’t split yet can be split from its menu, and a split window has a “Manage split” entry that opens the map. After a split you’re dropped into the new pane, and the map stays open so you can keep splitting or closing.","The bind-session dialog is clearer: “New session” and “Pick an existing session” are now two distinct choices, so tapping “New” no longer looks like it creates a session on the spot."]}},{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)."]}}],NM=r=>r.version||r.date,am=s_[0]?NM(s_[0]):null,SM={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 Um(r){const s=(r||"").lastIndexOf(".");return s<0?"":SM[r.slice(s+1).toLowerCase()]||""}function CM(r){return Um(r).startsWith("image/")}class Si extends Error{}class EM extends Error{constructor(s,c,v){super(s),this.status=c,this.serverError=v??null}}async function en(r,s={}){const c=Ha(),{timeoutMs:v,...C}=s,R={Authorization:`Bearer ${c??""}`,...C.headers||{}};C.body&&(R["Content-Type"]="application/json");let y=null,a=null;v&&(y=new AbortController,a=setTimeout(()=>y.abort(),v));try{const d=await fetch(r,{cache:"no-store",...C,headers:R,signal:y==null?void 0:y.signal});if(d.status===401)throw new Si;if(!d.ok){let g=null;try{const x=await d.json();x!=null&&x.error&&(g=x.error)}catch{}throw new EM(g||`${r} -> ${d.status}`,d.status,g)}return d.status===204?{unchanged:!0}:await d.json()}catch(d){throw y!=null&&y.signal.aborted?new Error(`${r} -> timeout`):d}finally{a&&clearTimeout(a)}}const $l=()=>en("/api/sessions"),jM=()=>en("/api/usage"),ku=r=>en(`/api/windows?session=${encodeURIComponent(r)}`),Fa=r=>en(`/api/panes?window=${encodeURIComponent(r)}`),DM=(r,s=1500,c)=>en(`/api/history?pane=${encodeURIComponent(r)}&lines=${s}${c?`&since=${c}`:""}`,{timeoutMs:8e3}),wN=(r,{since:s,before:c,limit:v=10}={})=>{let C=`/api/transcript?pane=${encodeURIComponent(r)}&agent=claude&limit=${encodeURIComponent(v)}`;return s&&(C+=`&since=${encodeURIComponent(s)}`),c!=null&&(C+=`&before=${encodeURIComponent(c)}`),en(C,{timeoutMs:8e3}).then(R=>R.unchanged?null:R)},kM=r=>en(`/api/context?pane=${encodeURIComponent(r)}&agent=claude`,{timeoutMs:8e3}),RM=r=>en(`/api/pending-prompt?pane=${encodeURIComponent(r)}&agent=claude`,{timeoutMs:8e3}).then(s=>s.prompt||null),jo=(r,s,c=!0)=>en("/api/send",{method:"POST",body:JSON.stringify({pane:r,text:s,enter:c})}),Hu=(r,s)=>en("/api/keys",{method:"POST",body:JSON.stringify({pane:r,keys:s})}),TM=(r,s,c=1)=>en("/api/scroll",{method:"POST",body:JSON.stringify({pane:r,dir:s,lines:c})}),LM=(r,s,c)=>en("/api/resize",{method:"POST",body:JSON.stringify({window:r,cols:s,rows:c})}),AM=(r,s)=>en("/api/resize",{method:"POST",body:JSON.stringify({pane:r,cols:s})}),MM=r=>en(`/api/layout?window=${encodeURIComponent(r)}`),UM=(r,s)=>en("/api/resize",{method:"POST",body:JSON.stringify({window:r,auto:!0,layout:s})}),OM=(r,s,c)=>en("/api/sessions",{method:"POST",body:JSON.stringify({name:r,cwd:s,cmd:c})}),PM=(r,s,c,v,C)=>en("/api/windows",{method:"POST",body:JSON.stringify({session:r,pane:s,name:c,cwd:v,cmd:C})}),VM=(r,s)=>en("/api/sessions",{method:"PATCH",body:JSON.stringify({id:r,name:s})}),IM=(r,s)=>en("/api/windows",{method:"PATCH",body:JSON.stringify({id:r,name:s})}),BM=r=>en(`/api/windows?window=${encodeURIComponent(r)}`,{method:"DELETE"}),FM=(r,s)=>en("/api/windows/swap",{method:"POST",body:JSON.stringify({a:r,b:s})}),NN=(r,s)=>en("/api/panes/split",{method:"POST",body:JSON.stringify({pane:r,dir:s})}),HM=r=>en(`/api/panes?pane=${encodeURIComponent(r)}`,{method:"DELETE"}),zM=(r,s)=>en("/api/dir",{method:"POST",body:JSON.stringify({dir:r,name:s})}),SN=(r,s=null)=>en(`/api/file?path=${encodeURIComponent(r)}${s!=null?`&mtime=${encodeURIComponent(s)}`:""}`,{timeoutMs:8e3}),yS=r=>en(`/api/dir${r?`?path=${encodeURIComponent(r)}`:""}`,{timeoutMs:8e3}),Ro=r=>en(`/api/pane-cwd?pane=${encodeURIComponent(r)}`,{timeoutMs:8e3}),$M=()=>en("/api/asr/sign",{timeoutMs:8e3}),xS=()=>en("/api/config",{timeoutMs:8e3}),WM=()=>en("/api/version",{timeoutMs:8e3}),GM=()=>en("/api/hooks/install",{method:"POST",timeoutMs:15e3}),qM=(r=[])=>en(`/api/states?sessions=${encodeURIComponent(r.join(","))}`,{timeoutMs:4e3}),CN=()=>en("/api/orphans",{timeoutMs:8e3}),YM=r=>en("/api/orphans/takeover",{method:"POST",body:JSON.stringify(r),timeoutMs:15e3}),EN=r=>en(`/api/git/repos?dir=${encodeURIComponent(r)}`,{timeoutMs:8e3}),KM=r=>en(`/api/git/status?repo=${encodeURIComponent(r)}`,{timeoutMs:8e3}),XM=(r,{limit:s=50,ref:c}={})=>{let v=`/api/git/log?repo=${encodeURIComponent(r)}&limit=${s}`;return c&&(v+=`&ref=${encodeURIComponent(c)}`),en(v,{timeoutMs:8e3})},JM=r=>en(`/api/git/branches?repo=${encodeURIComponent(r)}`,{timeoutMs:8e3}),ZM=(r,{path:s,commit:c,staged:v}={})=>{let C=`/api/git/diff?repo=${encodeURIComponent(r)}&path=${encodeURIComponent(s??"")}`;return c&&(C+=`&commit=${encodeURIComponent(c)}`),v&&(C+="&staged=1"),en(C,{timeoutMs:8e3})},QM=(r,s)=>en(`/api/git/commit?repo=${encodeURIComponent(r)}&hash=${encodeURIComponent(s)}`,{timeoutMs:8e3});function eU(r,s){return new Promise((c,v)=>{const C=Ha(),R=new XMLHttpRequest;R.open("GET",`/api/download?path=${encodeURIComponent(r)}`),R.setRequestHeader("Authorization",`Bearer ${C??""}`),R.responseType="blob",R.onprogress=y=>{s&&y.lengthComputable&&s(y.loaded/y.total)},R.onerror=()=>v(new Error("download failed")),R.onload=()=>{if(R.status===401)return v(new Si);if(R.status<200||R.status>=300)return v(new Error(`download -> ${R.status}`));const y=r.split("/").pop()||"download";let a=R.response;const d=Um(y);d&&a&&a.type!==d&&(a=a.slice(0,a.size,d));const g=URL.createObjectURL(a),x=document.createElement("a");x.href=g,x.download=y,document.body.appendChild(x),x.click(),x.remove(),setTimeout(()=>URL.revokeObjectURL(g),1e3),c()},R.send()})}function jN(r,s=null){return new Promise((c,v)=>{const C=Ha(),R=new XMLHttpRequest,y=s!=null?`&mtime=${encodeURIComponent(s)}`:"";R.open("GET",`/api/download?path=${encodeURIComponent(r)}${y}`),R.setRequestHeader("Authorization",`Bearer ${C??""}`),R.responseType="blob",R.onerror=()=>v(new Error(U("api.loadFailed"))),R.onload=()=>{if(R.status===304)return c({notModified:!0});if(R.status===401)return v(new Si);if(R.status<200||R.status>=300)return v(new Error(`image -> ${R.status}`));let a=R.response;const d=Um(r.split("/").pop()||"");d&&a&&a.type!==d&&(a=a.slice(0,a.size,d));const g=Number(R.getResponseHeader("X-Mtime"));c({url:URL.createObjectURL(a),mtimeMs:Number.isFinite(g)?g:null})},R.send()})}const tU=(r,s,c="/")=>{if((r==null?void 0:r.kind)==="dynamic"){const v=c&&c.startsWith("/")?c:"/",C=new URL(v,`https://${encodeURIComponent(r.name)}.${s}/`);return C.searchParams.set("token",Ha()??""),C.toString()}return`/preview/${encodeURIComponent(r==null?void 0:r.name)}/?token=${encodeURIComponent(Ha()??"")}`},Ru=(r,s={})=>{const c=s.port!=null?{name:r,port:s.port}:{name:r,dir:s.dir};return s.port!=null&&s.protocol&&(c.protocol=s.protocol),en("/api/previews",{method:"POST",body:JSON.stringify(c)})},nU=()=>en("/api/previews"),iU=r=>en(`/api/previews/${encodeURIComponent(r)}`,{method:"DELETE"});class xm extends Error{constructor(){super("upload aborted"),this.name="UploadAbort"}}function wS(r,s,c,v=!1,{signal:C}={}){return new Promise((R,y)=>{if(C!=null&&C.aborted)return y(new xm);const a=Ha(),d=new FormData;d.append("dir",r),v&&d.append("stash","1"),d.append("file",s,s.name);const g=new XMLHttpRequest;g.open("POST","/api/upload"),g.setRequestHeader("Authorization",`Bearer ${a??""}`),g.upload.onprogress=_=>{c&&_.lengthComputable&&c(_.loaded/_.total,"sending")},g.upload.onload=()=>{c==null||c(1,"processing")};const x=()=>g.abort();C&&C.addEventListener("abort",x,{once:!0});const h=()=>{C&&C.removeEventListener("abort",x)};g.onabort=()=>{h(),y(new xm)},g.onerror=()=>{h(),y(new Error(U("api.uploadFailed")))},g.onload=()=>{if(h(),g.status===401)return y(new Si);if(g.status>=200&&g.status<300)try{return R(JSON.parse(g.responseText))}catch{return R({})}const _={400:U("api.uploadBadDir"),409:U("api.uploadDuplicate"),413:U("api.uploadTooLarge"),415:U("api.uploadBadType")}[g.status]||U("api.uploadFailed");y(new Error(_))},g.send(d)})}async function DN({paneId:r,dir:s,windowId:c,api:v,getPanes:C}){const{id:R}=await v.splitPane(r,s);return{panes:await C(c),selectPaneId:R}}async function rU({paneId:r,windowId:s,viewedPaneId:c,api:v,getPanes:C,pickId:R}){await v.closePane(r);const y=await C(s),a=r===c&&y.length?R(y,null):null;return{panes:y,selectPaneId:a}}const sU=`<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
|
+
`,aU=`<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
|
+
`,un={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};function zu(){return o.jsxDEV("svg",{...un,children:o.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 oU(){return o.jsxDEV("svg",{...un,children:[o.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),o.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 wm(){return o.jsxDEV("svg",{...un,children:[o.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),o.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 NS(){return o.jsxDEV("svg",{...un,children:[o.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),o.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 lU(){return o.jsxDEV("svg",{...un,children:[o.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),o.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),o.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 H_(){return o.jsxDEV("svg",{...un,children:[o.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),o.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 cU(){return o.jsxDEV("svg",{...un,children:[o.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),o.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),o.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),o.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),o.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 ha(){return o.jsxDEV("svg",{...un,children:o.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 z_(){return o.jsxDEV("svg",{...un,children:o.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 $_(){return o.jsxDEV("svg",{...un,children:o.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 SS(){return o.jsxDEV("svg",{...un,children:[o.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),o.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 uU(){return o.jsxDEV("svg",{...un,children:[o.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),o.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),o.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 dU(){return o.jsxDEV("svg",{...un,children:[o.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),o.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 hU(){return o.jsxDEV("svg",{...un,children:[o.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),o.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),o.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 CS(){return o.jsxDEV("svg",{...un,children:[o.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),o.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),o.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),o.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 ES(){return o.jsxDEV("svg",{...un,children:[o.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),o.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 mU(){return o.jsxDEV("svg",{...un,children:o.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 fU(){return o.jsxDEV("svg",{...un,children:[o.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),o.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 jS(){return o.jsxDEV("svg",{...un,children:o.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 pU(){return o.jsxDEV("svg",{...un,children:[o.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),o.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),o.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 Nm(){return o.jsxDEV("svg",{...un,children:[o.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),o.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 vU(){return o.jsxDEV("svg",{...un,children:[o.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),o.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 gU(){return o.jsxDEV("svg",{...un,children:[o.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),o.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 _U(){return o.jsxDEV("svg",{...un,children:[o.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),o.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),o.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),o.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 DS(){return o.jsxDEV("svg",{...un,children:[o.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),o.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),o.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),o.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 ca(){return o.jsxDEV("svg",{...un,children:[o.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),o.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 bU(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"m7 11 2-2-2-2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:302,columnNumber:7},this),o.jsxDEV("path",{d:"M11 13h4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:303,columnNumber:7},this),o.jsxDEV("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:304,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:301,columnNumber:5},this)}function yU({down:r=!1}){return o.jsxDEV("svg",{...un,children:[o.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),o.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),r?o.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):o.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)}function kN(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:337,columnNumber:7},this),o.jsxDEV("path",{d:"M12 4v16"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:338,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:336,columnNumber:5},this)}function RN(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:347,columnNumber:7},this),o.jsxDEV("path",{d:"M3 12h18"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:348,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:346,columnNumber:5},this)}function xU(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:357,columnNumber:7},this),o.jsxDEV("path",{d:"M12 3v18M3 12h18"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:358,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:356,columnNumber:5},this)}function kS(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"m18 5-2.4-2.4A2 2 0 0 0 14.2 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:369,columnNumber:7},this),o.jsxDEV("path",{d:"M21.4 12.6a1 1 0 0 0-3-3l-4 4a2 2 0 0 0-.5.9l-.8 2.9a.5.5 0 0 0 .6.6l2.9-.8a2 2 0 0 0 .8-.5z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:370,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:368,columnNumber:5},this)}function wU(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("circle",{cx:"11",cy:"11",r:"8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:378,columnNumber:7},this),o.jsxDEV("path",{d:"m21 21-4.3-4.3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:379,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:377,columnNumber:5},this)}function NU(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("circle",{cx:"12",cy:"12",r:"10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:387,columnNumber:7},this),o.jsxDEV("path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:388,columnNumber:7},this),o.jsxDEV("path",{d:"M2 12h20"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:389,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:386,columnNumber:5},this)}function SU(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"m3 17 2 2 4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:397,columnNumber:7},this),o.jsxDEV("path",{d:"m3 7 2 2 4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:398,columnNumber:7},this),o.jsxDEV("path",{d:"M13 6h8M13 12h8M13 18h8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:399,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:396,columnNumber:5},this)}function CU(){return o.jsxDEV("svg",{...un,children:o.jsxDEV("path",{d:"M19.439 7.85c-.049.322.059.648.289.878l1.568 1.568c.47.47.706 1.087.706 1.704s-.235 1.233-.706 1.704l-1.611 1.611a.98.98 0 0 1-.837.276c-.47-.07-.802-.48-.968-.925a2.501 2.501 0 1 0-3.214 3.214c.446.166.855.497.925.968a.979.979 0 0 1-.276.837l-1.61 1.61a2.404 2.404 0 0 1-1.705.707 2.402 2.402 0 0 1-1.704-.706l-1.568-1.568a1.026 1.026 0 0 0-.877-.29c-.493.074-.84.504-1.02.968a2.5 2.5 0 1 1-3.237-3.237c.464-.18.894-.527.967-1.02a1.026 1.026 0 0 0-.289-.877l-1.568-1.568A2.402 2.402 0 0 1 1.998 12c0-.617.236-1.234.706-1.704L4.23 8.77c.24-.24.581-.353.917-.303.515.077.877.528 1.073 1.01a2.5 2.5 0 1 0 3.259-3.259c-.482-.196-.933-.558-1.01-1.073-.05-.336.062-.676.303-.917l1.525-1.525A2.402 2.402 0 0 1 12 1.998c.617 0 1.234.236 1.704.706l1.568 1.568c.23.23.556.338.877.29.493-.074.84-.504 1.02-.968a2.5 2.5 0 1 1 3.237 3.237c-.464.18-.894.527-.967 1.02Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:407,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:406,columnNumber:5},this)}function EU(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"M12 8V4H8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:415,columnNumber:7},this),o.jsxDEV("rect",{x:"4",y:"8",width:"16",height:"12",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:416,columnNumber:7},this),o.jsxDEV("path",{d:"M2 14h2M20 14h2M15 13v2M9 13v2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:417,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:414,columnNumber:5},this)}function jU(){return o.jsxDEV("svg",{...un,children:o.jsxDEV("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:425,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:424,columnNumber:5},this)}const TN={claude:sU,codex:aU};function To({agent:r}){const s=TN[r]?r:"claude";return o.jsxDEV("span",{className:"agent-mark",role:"img","aria-label":s,dangerouslySetInnerHTML:{__html:TN[s]}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:440,columnNumber:10},this)}const RS=r=>{if(r<=0)return U("time.expired");const s=Math.max(1,Math.round(r/6e4));return U("time.minutes",{n:s})};function TS(r,s=!0){const[c,v]=M.useState(()=>Date.now());return M.useEffect(()=>{if(!s||r==null)return;v(Date.now());const C=setInterval(()=>v(Date.now()),1e3);return()=>clearInterval(C)},[s,r]),r!=null?Math.max(0,r-c):0}const Vg=1280,LN=6;function DU({open:r,tabs:s,activeName:c,name:v,kind:C="static",domain:R=null,port:y,dir:a,expiresAt:d,initialPath:g="/",onSwitchTab:x,onCloseTab:h,onRenew:_,onStop:N,onMinimize:E}){const b=s&&s.length?s:v?[{name:v,kind:C,port:y,dir:a,expiresAt:d,path:g}]:[],l=b.find(K=>K.name===c)||b[0]||null,[m,f]=M.useState(!1),[p,S]=M.useState("mobile"),[k,j]=M.useState(1),[A,D]=M.useState({w:0,h:0}),L=M.useRef(null),O=M.useRef(null);M.useEffect(()=>{r||f(!1)},[r]),M.useEffect(()=>{p==="mobile"&&j(1)},[p]),M.useEffect(()=>{const K=O.current;if(!r||!K)return;const ve=()=>D({w:K.clientWidth,h:K.clientHeight});if(ve(),typeof ResizeObserver>"u")return;const he=new ResizeObserver(ve);return he.observe(K),()=>he.disconnect()},[r]);const F=TS(l==null?void 0:l.expiresAt,r),P=(l==null?void 0:l.kind)==="dynamic"?l.port!=null?`:${l.port}`:"":(l==null?void 0:l.dir)||"",B=K=>K.kind==="dynamic"?K.port!=null?`:${K.port}`:K.name:K.dir?K.dir.split("/").filter(Boolean).pop():U("preview.static"),G=p==="pc"&&A.w>0,ne=A.w>0?A.w/Vg:1,ee=A.h>0?A.h/ne:0,te=ne*k,se=G?{width:`${Vg*te}px`,height:`${ee*te}px`}:void 0,I=G?{width:`${Vg}px`,height:`${ee}px`,transform:`scale(${te})`,transformOrigin:"0 0"}:void 0,W=K=>j(ve=>Math.min(LN,Math.max(1,+(ve+K).toFixed(2)))),X=()=>{const K=L.current;if(K)try{K.contentWindow.location.reload()}catch{K.src=K.src}};return Yl.createPortal(o.jsxDEV("div",{className:`file-sheet ${r?"open":""}`,"aria-hidden":!r,children:[o.jsxDEV("div",{className:"file-tabs preview-head",children:[o.jsxDEV("span",{className:"preview-status",children:[o.jsxDEV(Nm,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:79,columnNumber:11},this),o.jsxDEV("span",{className:"preview-state",children:(l==null?void 0:l.kind)==="dynamic"?U("preview.dynamic"):U("preview.static")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:80,columnNumber:11},this),(l==null?void 0:l.name)&&o.jsxDEV("span",{className:"preview-name",title:`${l.name}${P?" "+P:""}`,children:[l.name,P&&o.jsxDEV("span",{className:"preview-detail",children:P},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:83,columnNumber:39},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:82,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:78,columnNumber:9},this),o.jsxDEV("button",{className:"preview-remain",title:U("preview.remainTitle"),"aria-haspopup":"dialog","aria-expanded":m,onClick:()=>f(K=>!K),children:RS(F)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:87,columnNumber:9},this),o.jsxDEV("button",{className:"preview-iconbtn",onClick:()=>S(K=>K==="mobile"?"pc":"mobile"),"aria-label":U(p==="mobile"?"preview.toPcView":"preview.toMobileView"),title:U(p==="mobile"?"preview.pcView":"preview.mobileView"),"aria-pressed":p==="pc",children:p==="mobile"?o.jsxDEV(Nm,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:92,columnNumber:34},this):o.jsxDEV(gU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:92,columnNumber:52},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:89,columnNumber:9},this),o.jsxDEV("button",{className:"preview-iconbtn",onClick:X,"aria-label":U("preview.refresh"),title:U("preview.refresh"),children:o.jsxDEV(_U,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:94,columnNumber:126},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:94,columnNumber:9},this),o.jsxDEV("button",{className:"file-min","aria-label":U("preview.minimize"),title:U("preview.minimize"),onClick:E,children:o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:95,columnNumber:124},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:95,columnNumber:9},this),m&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"preview-pop-backdrop",onClick:()=>f(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:98,columnNumber:13},this),o.jsxDEV("div",{className:"preview-pop",role:"dialog","aria-label":U("preview.ttlDialog"),children:[o.jsxDEV("button",{className:"preview-pop-item",onClick:()=>{f(!1),_==null||_()},children:U("preview.renew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:100,columnNumber:15},this),o.jsxDEV("button",{className:"preview-pop-item preview-pop-danger",onClick:()=>{f(!1),N==null||N()},children:U("preview.stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:101,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:99,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:97,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:77,columnNumber:7},this),b.length>1&&o.jsxDEV("div",{className:"preview-tabs",role:"tablist","aria-label":U("preview.tabs"),children:b.map(K=>{const ve=l&&K.name===l.name;return o.jsxDEV("span",{className:`preview-tab ${ve?"active":""}`,children:[o.jsxDEV("button",{className:"preview-tab-btn",role:"tab","aria-selected":ve,title:K.name,onClick:()=>x==null?void 0:x(K.name),children:B(K)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:112,columnNumber:17},this),o.jsxDEV("button",{className:"preview-tab-close","aria-label":U("preview.stop"),title:U("preview.stop"),onClick:()=>h==null?void 0:h(K.name),children:"×"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:114,columnNumber:17},this)]},K.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:111,columnNumber:15},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:107,columnNumber:9},this),o.jsxDEV("div",{className:`file-body preview-body ${G?"pc":""}`,ref:O,children:b.map(K=>{const ve=l&&K.name===l.name,he=me=>{ve&&(L.current=me)},Ae=tU({name:K.name,kind:K.kind},R,K.path||"/");return o.jsxDEV("div",{className:"preview-pane",style:ve?void 0:{display:"none"},children:ve&&G?o.jsxDEV("div",{className:"preview-scaler",style:se,children:o.jsxDEV("iframe",{ref:he,className:"preview-frame",title:U("preview.iframeTitle"),style:I,src:Ae},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:132,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:131,columnNumber:17},this):o.jsxDEV("iframe",{ref:he,className:"preview-frame",title:U("preview.iframeTitle"),src:Ae},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:135,columnNumber:17},this)},K.name,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:129,columnNumber:13},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:121,columnNumber:7},this),G&&o.jsxDEV("div",{className:"preview-zoom",children:[o.jsxDEV("button",{className:"preview-zoom-btn",onClick:()=>W(-.5),disabled:k<=1,"aria-label":U("preview.zoomOut"),children:"−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:143,columnNumber:11},this),o.jsxDEV("span",{className:"preview-zoom-val","aria-hidden":"true",children:[Math.round(k*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:144,columnNumber:11},this),o.jsxDEV("button",{className:"preview-zoom-btn",onClick:()=>W(.5),disabled:k>=LN,"aria-label":U("preview.zoomIn"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:145,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:142,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:76,columnNumber:5},this),document.body)}const kU={working:"working",compacting:"working",done:"done",idle:"done",permission:"needs"},a_={needs:3,done:2,working:1},RU={working:U("inbox.view.working"),done:U("inbox.view.done"),needs:U("inbox.view.needs")};function TU(r,s={},c=0){const v=[];for(const[C,R]of Object.entries(r)){const y=kU[R.kind];if(!y)continue;const a=R.ts||0;y==="done"&&!(a>Math.max(c||0,s[C]||0))||v.push({pane:C,session:R.session,window:R.window,windowName:R.windowName,view:y,msg:R.msg||"",ts:a,agent:R.agent||"claude"})}return v.sort((C,R)=>C.session<R.session?-1:C.session>R.session?1:a_[R.view]-a_[C.view]||R.ts-C.ts),v}function LU(r){const s={working:0,done:0,needs:0};for(const c of r)s[c.view]!=null&&(s[c.view]+=1);return s}function AU(r){let s=null,c=0;for(const v of r){const C=a_[v.view]||0;C>c&&(c=C,s=v.view)}return s}function AN(r){let s=0;for(const c of Object.values(r))(c.ts||0)>s&&(s=c.ts);return s}function LS(r,s){if(!r)return"";const c=Math.max(0,Math.round((s-r)/1e3));if(c<60)return U("time.secAgo",{n:c});const v=Math.round(c/60);if(v<60)return U("time.minAgo",{n:v});const C=Math.round(v/60);return C<24?U("time.hourAgo",{n:C}):U("time.dayAgo",{n:Math.round(C/24)})}function Ig(r,s,c){const v=r.findIndex(C=>C.id===s);return v<0?null:r[c==="left"?v-1:v+1]??null}const AS="tw_notify",$u=1e4,W_=2e4,o_=()=>localStorage.getItem(AS)==="1",l_=r=>localStorage.setItem(AS,r?"1":"0");function ql(){return typeof navigator<"u"&&"serviceWorker"in navigator&&typeof window<"u"&&"PushManager"in window&&"Notification"in window}function MS(){var r;return typeof window<"u"&&(((r=window.matchMedia)==null?void 0:r.call(window,"(display-mode: standalone)").matches)||window.navigator.standalone===!0)||!1}const MU=()=>/iP(hone|ad|od)/.test(navigator.userAgent||"");function Lo(r={}){return{Authorization:`Bearer ${Ha()??""}`,...r}}function c_(r){const s=new Error(U(r));return s.code=r,s}function Bg(r,s){const c=new Error(U(r,s));return c.code=r,c}function Do(r,s,c){let v;return Promise.race([Promise.resolve(r),new Promise((C,R)=>{v=setTimeout(()=>R(c_(c)),s)})]).finally(()=>clearTimeout(v))}async function Ao(r,s,c){const v=new AbortController;let C,R=!1;try{return await Promise.race([fetch(r,{...s,signal:v.signal}),new Promise((y,a)=>{C=setTimeout(()=>{R=!0,v.abort(),a(c_(c))},$u)})])}catch(y){throw R?c_(c):y}finally{clearTimeout(C)}}const Yu=()=>Do(navigator.serviceWorker.ready,$u,"push.swTimeout"),Om=r=>Do(r.pushManager.getSubscription(),W_,"push.browserTimeout");function UU(r){const s="=".repeat((4-r.length%4)%4),c=(r+s).replace(/-/g,"+").replace(/_/g,"/"),v=atob(c),C=new Uint8Array(v.length);for(let R=0;R<v.length;R+=1)C[R]=v.charCodeAt(R);return C}async function OU(){if(!ql())throw new Error(U("push.unsupported"));if(MU()&&!MS())throw new Error(U("push.iosAddToHome"));if(await Do(Notification.requestPermission(),$u,"push.permissionTimeout")!=="granted")throw new Error(U("push.permissionDenied"));try{await Do(navigator.serviceWorker.register("/sw.js"),$u,"push.swRegisterTimeout")}catch(y){throw(y==null?void 0:y.code)==="push.swRegisterTimeout"?y:Bg("push.swRegisterFailed",{reason:(y==null?void 0:y.message)||U("push.unknownReason")})}const s=await Yu(),c=await Ao("/api/push/vapid",{headers:Lo(),cache:"no-store"},"push.configTimeout");if(!c.ok)throw new Error(U("push.noVapid"));const{key:v}=await c.json();let C=await Om(s);C||(C=await Do(s.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:UU(v)}),W_,"push.browserTimeout"));const R=await Ao("/api/push/subscribe",{method:"POST",headers:Lo({"Content-Type":"application/json"}),body:JSON.stringify({subscription:C,boundSessions:ko()})},"push.reportTimeout");if(!R.ok){if(R.status===410){try{await C.unsubscribe()}catch{}throw l_(!1),Bg("push.subscriptionExpired")}throw R.status===502?Bg("push.deliveryRejected"):new Error(U("push.subscribeFailed"))}return l_(!0),!0}async function PU(){l_(!1),(async()=>{try{const r=await Yu(),s=await Om(r);if(!s)return;await Promise.allSettled([Ao("/api/push/unsubscribe",{method:"POST",headers:Lo({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:s.endpoint})},"push.reportTimeout"),Do(Promise.resolve().then(()=>s.unsubscribe()),W_,"push.browserTimeout")])}catch{}})()}async function Tu(){if(!(!o_()||!ql()))try{const r=await Yu(),s=await Om(r);if(!s)return;await Ao("/api/push/bound",{method:"POST",headers:Lo({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:s.endpoint,boundSessions:ko()})},"push.reportTimeout")}catch{}}async function G_(r){if(!ql())return null;try{const s=await Yu(),c=await Om(s);if(!c)return null;const v=await Ao("/api/push/key",{method:"POST",headers:Lo({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:c.endpoint})},"push.configTimeout");if(v.status===401)throw new Si;if(!v.ok){if(r)throw new Error("push key lookup failed");return null}return(await v.json()).pushKey||null}catch(s){if(r)throw s;return null}}const VU=()=>G_(!1);async function IU(r){if(ql())try{const s=await Yu();(await Do(s.getNotifications({tag:`pane-${r}`}),$u,"push.swTimeout")).forEach(v=>v.close())}catch{}}async function BU(){const r=await G_(!0);if(!r)return[];const s=await Ao(`/api/notifications?device=${encodeURIComponent(r)}`,{headers:Lo(),cache:"no-store"},"push.configTimeout");if(s.status===401)throw new Si;if(!s.ok)throw new Error("notification inbox load failed");return(await s.json()).items||[]}async function FU(r){const s=await G_(!0);if(!s)throw new Error("notification device unavailable");const c=await Ao(`/api/notifications/${encodeURIComponent(r)}?device=${encodeURIComponent(s)}`,{method:"DELETE",headers:Lo()},"push.reportTimeout");if(c.status===401)throw new Si;if(!c.ok||(await c.json()).ok!==!0)throw new Error("notification delete failed");return!0}function HU(r){if(typeof r!="string")return null;const s=r.trim();if(!s)return null;try{const c=new URL(s,window.location.origin);return c.protocol!=="http:"&&c.protocol!=="https:"?null:s}catch{return null}}function MN(r){const s=Math.max(0,Date.now()-r),c=Math.floor(s/6e4);if(c<1)return U("pushInbox.justNow");if(c<60)return U("pushInbox.minutesAgo").replace("{n}",c);const v=Math.floor(c/60);return v<24?U("pushInbox.hoursAgo").replace("{n}",v):new Date(r).toLocaleDateString()}const zU={expired:"pushInbox.deliveryReasonExpired",rate_limited:"pushInbox.deliveryReasonRateLimited",service_unavailable:"pushInbox.deliveryReasonUnavailable",rejected:"pushInbox.deliveryReasonRejected",network_error:"pushInbox.deliveryReasonNetwork",not_configured:"pushInbox.deliveryReasonNotConfigured"};function Fg(r,s=!1){if((r==null?void 0:r.status)==="pending")return U("pushInbox.deliveryPending");if((r==null?void 0:r.status)==="success")return U("pushInbox.deliverySuccess");if((r==null?void 0:r.status)==="failed"){if(!s)return U("pushInbox.deliveryFailed");const c=U(zU[r.reason]||"pushInbox.deliveryReasonUnknown");return`${U("pushInbox.deliveryFailed")} · ${c}`}return""}function $U({open:r,detailId:s,items:c,readIds:v=[],onOpenDetail:C,onCloseDetail:R,onClose:y,onDelete:a,deletingId:d=null,error:g="",onRetry:x,onMarkAllRead:h,unreadCount:_=0}){const N=new Set(v),E=s!=null,b=E?c.find(p=>p.id===s):null,l=HU(b==null?void 0:b.url),m=Fg(b==null?void 0:b.delivery,!0),f=c.some(p=>!N.has(p.id));return Yl.createPortal(o.jsxDEV("div",{className:`file-sheet push-inbox-sheet ${r?"open":""}`,"aria-hidden":!r,role:"dialog","aria-label":U("pushInbox.title"),children:[o.jsxDEV("div",{className:"file-tabs push-inbox-head",children:[E?o.jsxDEV("div",{className:"push-inbox-drill-head",children:[o.jsxDEV("button",{className:"push-inbox-back","aria-label":U("pushInbox.back"),title:U("pushInbox.back"),onClick:R,children:"‹"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:57,columnNumber:13},this),o.jsxDEV("span",{className:"push-inbox-head-title",children:U("pushInbox.detailTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:58,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:56,columnNumber:11},this):o.jsxDEV("span",{className:"push-inbox-head-title push-inbox-list-title",children:[U("pushInbox.title"),_>0&&o.jsxDEV("span",{className:"push-inbox-unread-count",children:U("pushInbox.unreadCount").replace("{n}",_)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:63,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:61,columnNumber:11},this),!E&&f&&o.jsxDEV("button",{className:"push-inbox-markall",onClick:h,children:U("pushInbox.markAllRead")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:67,columnNumber:11},this),o.jsxDEV("button",{className:"file-min","aria-label":U("common.close"),title:U("common.close"),onClick:y,children:o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:69,columnNumber:113},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:69,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:54,columnNumber:7},this),o.jsxDEV("div",{className:"push-inbox-body",children:[g&&o.jsxDEV("div",{className:"push-inbox-error",role:"alert",children:[o.jsxDEV("span",{children:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:75,columnNumber:13},this),o.jsxDEV("button",{type:"button",onClick:x,children:U("pushInbox.retry")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:76,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:74,columnNumber:11},this),E?b?o.jsxDEV("div",{className:"push-inbox-detail",children:[o.jsxDEV("div",{className:"push-inbox-detail-title",children:b.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:82,columnNumber:15},this),o.jsxDEV("div",{className:"push-inbox-detail-time",children:MN(b.ts)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:83,columnNumber:15},this),m&&o.jsxDEV("div",{className:`push-inbox-delivery detail ${b.delivery.status}`,children:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:84,columnNumber:34},this),o.jsxDEV("div",{className:"push-inbox-detail-text",children:b.body},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:85,columnNumber:15},this),l&&o.jsxDEV("a",{className:"fontbtn push-inbox-openurl",href:l,children:U("pushInbox.openUrl")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:86,columnNumber:29},this),o.jsxDEV("button",{className:"fontbtn push-inbox-detail-del",disabled:d!=null,onClick:async()=>{await a(b.id)&&R()},children:U("pushInbox.delete")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:87,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:81,columnNumber:13},this):o.jsxDEV("p",{className:"push-inbox-empty",children:U("pushInbox.expired")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:93,columnNumber:13},this):c.length===0&&!g?o.jsxDEV("p",{className:"push-inbox-empty",children:U("pushInbox.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:96,columnNumber:11},this):c.length>0?o.jsxDEV("ul",{className:"push-inbox-list",children:c.map(p=>o.jsxDEV("li",{className:`push-inbox-row${N.has(p.id)?"":" push-inbox-unread"}`,children:[o.jsxDEV("button",{className:"push-inbox-main",onClick:()=>C(p.id),children:[o.jsxDEV("div",{className:"push-inbox-row-top",children:[o.jsxDEV("span",{className:"push-inbox-row-title",children:p.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:103,columnNumber:21},this),Fg(p.delivery)&&o.jsxDEV("span",{className:`push-inbox-delivery ${p.delivery.status}`,children:Fg(p.delivery)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:105,columnNumber:23},this),o.jsxDEV("span",{className:"push-inbox-row-time",children:MN(p.ts)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:107,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:102,columnNumber:19},this),o.jsxDEV("div",{className:"push-inbox-row-body",children:p.body},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:109,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:101,columnNumber:17},this),o.jsxDEV("button",{className:"push-inbox-del",disabled:d!=null,onClick:()=>a(p.id),"aria-label":U("pushInbox.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:111,columnNumber:17},this)]},p.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:100,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:98,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:72,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:52,columnNumber:5},this),document.body)}const u_="\\s'\"`()\\[\\]<>,;,。、;:!?()【】《》「」“”‘’*…:│",WU=["md","markdown","html","htm","txt","log","sh"],GU=["png","jpg","jpeg","jfif","gif","webp","svg","bmp","ico","avif","apng"],qU=[...WU,...GU].join("|"),UN=new RegExp(`[^${u_}]+\\.(?:${qU})(?=$|[${u_}.])`,"gi");function YU(r){const s=[];if(!r)return s;UN.lastIndex=0;let c;for(;(c=UN.exec(r))!==null;){let v=c.index,C=c[0];const R=/^@+/.exec(C);R&&(v+=R[0].length,C=C.slice(R[0].length)),C&&s.push({start:v,end:v+C.length,path:C})}return s}const US=r=>typeof r=="string"&&r.startsWith("/");function Co(r,s){const c=US(s)?s:`${r.replace(/\/+$/,"")}/${s}`,v=c.startsWith("/"),C=[];for(const R of c.split("/"))if(!(!R||R===".")){if(R===".."){C.pop();continue}C.push(R)}return(v?"/":"")+C.join("/")}const KU={key:"home",type:"home",name:U("doc.home")},OS=(r,s)=>({...r,type:s.type??r.type,name:s.name??r.name,content:s.content!==void 0?s.content:r.content,mtime:s.mtime!==void 0?s.mtime:r.mtime});function XU(r,s,c){if(r.tabs.some(C=>C.key===s))return{tabs:r.tabs.map(C=>C.key===s?OS(C,c):C),active:s};const v={key:s,type:c.type,name:c.name,content:c.content,mtime:c.mtime,path:s};return{tabs:[...r.tabs,v],active:s}}function JU(r,s,c){return r.tabs.some(v=>v.key===s)?{...r,tabs:r.tabs.map(v=>v.key===s?OS(v,c):v)}:r}function ZU(r,s){const c=r.tabs.findIndex(R=>R.key===s);if(c<=0)return r;const v=r.tabs.filter(R=>R.key!==s),C=r.active===s?r.tabs[c-1].key:r.active;return{tabs:v,active:C}}function QU(){const[r,s]=M.useState({tabs:[KU],active:"home"}),c=M.useCallback((y,a)=>s(d=>XU(d,y,a)),[]),v=M.useCallback((y,a)=>s(d=>JU(d,y,a)),[]),C=M.useCallback(y=>s(a=>ZU(a,y)),[]),R=M.useCallback(y=>s(a=>({...a,active:y})),[]);return{tabs:r.tabs,active:r.active,openDoc:c,refreshDoc:v,closeTab:C,activate:R}}function ON(r){return String(r||"").replace(/[^A-Za-z0-9._-]+/g,"-").replace(/-{2,}/g,"-").replace(/^[-.]+|-+$/g,"").toLowerCase()}function e3({session:r,windowName:s,windowId:c}){const v=[r,s].map(ON).filter(Boolean);return v.push(ON(c)||"w"),v.join("-")}function t3(r,{settingsOpen:s,setSettingsOpen:c}){var W,X,K,ve,he,Ae;const[v,C]=M.useState([]),[R,y]=M.useState(null),[a,d]=M.useState(!1),[g,x]=M.useState(!1),[h,_]=M.useState(null),[N,E]=M.useState({}),b=M.useCallback(async()=>{try{const me=await nU();C(me.previews||[]),y(me.domain??null),d(!!me.dynamicEnabled)}catch{}},[]);M.useEffect(()=>{b()},[b]);const l=r?e3({session:(W=r.session)==null?void 0:W.name,windowName:(X=r.window)==null?void 0:X.name,windowId:(K=r.window)==null?void 0:K.id}):null,m=v.find(me=>me.name===l&&me.expiresAt>Date.now())||null,f=(m==null?void 0:m.expiresAt)??null,p=me=>!!l&&(me===l||me.startsWith(`${l}-`)),S=Date.now(),k=v.filter(me=>me&&me.expiresAt>S&&p(me.name)).map(me=>({name:me.name,kind:me.kind,port:me.port,protocol:me.protocol,dir:me.dir,expiresAt:me.expiresAt,path:N[me.name]||"/"})).sort((me,ie)=>me.name===l?-1:ie.name===l?1:(me.port||0)-(ie.port||0)),j=((ve=k.find(me=>me.name===h))==null?void 0:ve.name)??((he=k[0])==null?void 0:he.name)??null,A=k.find(me=>me.name===j)??null,D=(A==null?void 0:A.path)||"/";M.useEffect(()=>{_(null)},[l]);const L=k.length>0;M.useEffect(()=>{L||x(!1)},[L]),M.useEffect(()=>{if(f==null)return;const me=setTimeout(b,Math.max(0,f-Date.now())+500);return()=>clearTimeout(me)},[f,b]);const O=M.useCallback(()=>{_(l),s?(c(!1),requestAnimationFrame(()=>x(!0))):x(!0)},[s,c,l]),F=M.useCallback(async me=>{var ie;if(l)try{await Ru(l,{dir:me}),GA((ie=r==null?void 0:r.window)==null?void 0:ie.id,me),E($=>({...$,[l]:"/"})),await b(),O()}catch{}},[l,(Ae=r==null?void 0:r.window)==null?void 0:Ae.id,b,O]),P=M.useCallback(async me=>{if(!l)return;await Ru(l,{port:me}),E(Ie=>({...Ie,[l]:"/"})),_(l),await b();let ie=!1;const $=()=>{ie||(ie=!0,window.removeEventListener("popstate",_e),clearTimeout(ue),x(!0))},_e=()=>$();window.addEventListener("popstate",_e);const ue=setTimeout($,300);c(!1)},[l,b,c]),B=M.useCallback(async({protocol:me="http",port:ie,path:$})=>{if(!l)return;const _e=`${l}-${ie}`;await Ru(_e,{port:ie,protocol:me}),E(ue=>({...ue,[_e]:$||"/"})),_(_e),await b(),x(!0)},[l,b]),G=M.useCallback(me=>_(me),[]),ne=M.useCallback(async me=>{if(me)try{await iU(me),E(ie=>{const $={...ie};return delete $[me],$}),h===me&&_(null),await b()}catch{}},[h,b]),ee=M.useCallback(()=>ne(j),[ne,j]),te=M.useCallback(async()=>{const me=k.find($=>$.name===j);if(!me)return;const ie=me.kind==="dynamic"?{port:me.port,protocol:me.protocol||"http"}:{dir:me.dir};try{await Ru(me.name,ie),await b()}catch{}},[k,j,b]),se=k.map(me=>me.name).join("|"),I=k.length?Math.min(...k.map(me=>me.expiresAt)):null;return M.useEffect(()=>{if(!g||I==null||!se)return;const me=se.split("|"),ie=Math.max(0,I-Date.now()-6e4),$=setTimeout(async()=>{try{await Promise.all(me.map(_e=>{const ue=v.find(Ie=>Ie&&Ie.name===_e);return ue?Ru(_e,ue.kind==="dynamic"?{port:ue.port,protocol:ue.protocol||"http"}:{dir:ue.dir}):null})),await b()}catch{}},ie);return()=>clearTimeout($)},[g,I,se,v,b]),{previews:v,previewDomain:R,dynamicEnabled:a,previewSheetOpen:g,setPreviewSheetOpen:x,activePreview:m,curPreviewName:l,tabs:k,activeName:j,shownPreview:A,shownPath:D,refreshPreviews:b,openPreviewSheet:O,startPreview:F,startDynamicPreview:P,startUrlPreview:B,switchTab:G,closeTab:ne,stopPreview:ee,renewPreview:te}}function PS(r,{port:s}={}){const c=(r==null?void 0:r.serverError)||(r==null?void 0:r.message)||"";return c==="port not listening"?U("localurl.notListening",{port:s??"?"}):c==="bad port"?U("settings.err_bad_port"):c==="dynamic disabled"||c==="previews disabled"?U("localurl.disabled"):c==="bad protocol"?U("localurl.badProtocol"):(r==null?void 0:r.name)==="TypeError"||/(?:timeout|failed to fetch|network)/i.test(c)?U("localurl.network"):c?U("localurl.failed",{reason:c}):U("settings.err_start_failed")}function d_({fetch:r,apply:s,intervalMs:c,enabled:v=!0,deps:C=[]}){const R=M.useRef(r),y=M.useRef(s);R.current=r,y.current=s,M.useEffect(()=>{if(!v)return;let a=!1,d=null;const g=async()=>{if(!document.hidden)try{const _=await R.current();a||y.current(_)}catch{}},x=()=>{g(),d=setTimeout(x,c)};x();const h=()=>{document.hidden||(clearTimeout(d),x())};return document.addEventListener("visibilitychange",h),()=>{a=!0,clearTimeout(d),document.removeEventListener("visibilitychange",h)}},[v,c,...C])}function n3(r,s){return r instanceof Si?(s==null||s(),!0):!1}function i3({open:r,currentSessionName:s,bound:c,onSelectSession:v,onUnbind:C,onBind:R,onClose:y,onLogout:a,orphans:d=[],onTakeoverRequest:g}){const[x,h]=M.useState(!1);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:`drawer ${r?"open":""}`,children:[o.jsxDEV("div",{className:"drawer-list",children:[o.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),c.length===0&&o.jsxDEV("div",{className:"drawer-empty",children:U("drawer.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:20,columnNumber:34},this),c.map(_=>o.jsxDEV("div",{className:`drawer-row drawer-session ${_===s?"active":""}`,children:[o.jsxDEV("span",{className:"drawer-name",onClick:()=>v(_),children:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:26,columnNumber:15},this),o.jsxDEV("button",{className:"drawer-unbind",onClick:N=>{N.stopPropagation(),C(_)},"aria-label":U("drawer.unbind"),title:U("drawer.unbind"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:27,columnNumber:15},this)]},_,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:22,columnNumber:13},this)),o.jsxDEV("button",{className:"drawer-bind",onClick:R,children:["+ ",U("drawer.bind")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:35,columnNumber:11},this),d.length>0&&o.jsxDEV("div",{className:"drawer-orphans",children:[o.jsxDEV("button",{className:"drawer-orphans-head",onClick:()=>h(_=>!_),children:[o.jsxDEV("span",{children:U("drawer.orphans.title",{n:d.length})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:40,columnNumber:17},this),o.jsxDEV("span",{className:"drawer-orphans-caret","aria-hidden":"true",children:x?"▾":"▸"},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),x&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"drawer-orphans-hint",children:U("drawer.orphans.hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:45,columnNumber:19},this),d.map(_=>{const N=!_.sessionId,E=_.state==="busy"||N;return o.jsxDEV("div",{className:"drawer-orphan-row",children:[o.jsxDEV("div",{className:"drawer-orphan-head",children:[o.jsxDEV("span",{className:"drawer-orphan-cwd",title:_.cwd,children:_.cwdLabel||_.cwd},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:52,columnNumber:27},this),o.jsxDEV("button",{className:"drawer-orphan-btn",disabled:E,title:N?U("inbox.orphans.noSession"):void 0,onClick:()=>g==null?void 0:g(_),children:U("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),o.jsxDEV("div",{className:"drawer-orphan-meta",children:[_.agentLabel&&o.jsxDEV("span",{className:"drawer-orphan-agent",children:_.agentLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:63,columnNumber:44},this),o.jsxDEV("span",{className:`drawer-orphan-state ${_.state==="busy"?"busy":"idle"}`,children:_.state==="busy"?U("inbox.orphans.busy"):U("inbox.orphans.idle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:64,columnNumber:27},this),o.jsxDEV("span",{className:"drawer-orphan-time",children:LS(_.startedAt||_.lastActivity,Date.now())},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:67,columnNumber:27},this),_.snippet&&o.jsxDEV("span",{className:"drawer-orphan-msg",children:_.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)]},_.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),o.jsxDEV("button",{className:"drawer-logout",onClick:a,children:U("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),r&&o.jsxDEV("div",{className:"drawer-backdrop",onClick:y},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 r3=500,PN=10;function Pm(r,{onClick:s}={}){const c=M.useRef(null),v=M.useRef(null),C=M.useRef(!1),R=()=>{c.current&&(clearTimeout(c.current),c.current=null)};return{onPointerDown:y=>{C.current=!1,v.current={x:y.clientX,y:y.clientY},R(),c.current=setTimeout(()=>{c.current=null,C.current=!0,r==null||r()},r3)},onPointerMove:y=>{!c.current||!v.current||(Math.abs(y.clientX-v.current.x)>PN||Math.abs(y.clientY-v.current.y)>PN)&&R()},onPointerUp:R,onPointerLeave:R,onPointerCancel:R,onClick:y=>{var a,d;if(C.current){C.current=!1,(a=y.preventDefault)==null||a.call(y),(d=y.stopPropagation)==null||d.call(y);return}s==null||s(y)}}}const h_=248,m_=158,Sm=6,VN=2,s3=52,a3=34,om=r=>typeof r=="number"&&Number.isFinite(r);function f_(r){return Array.isArray(r)&&r.length>0&&r.every(s=>om(s.left)&&om(s.top)&&om(s.width)&&om(s.height))}const IN=r=>[...new Set(r)].sort((s,c)=>s-c);function BN(r,s,c){const v=[];for(let d=0;d<r.length-1;d+=1){const g=r[d],x=r[d+1],h=s.some(([_,N])=>_===g&&N===x);v.push(x-g<=1&&!h)}const C=v.filter(d=>!d).length,R=C>0?(c-v.filter(Boolean).length*VN)/C:c,y=[{at:0}];let a=0;for(let d=0;d<v.length;d+=1)a+=v[d]?VN:R,y.push({at:a});return y}function o3(r){if(!f_(r))return null;const s=Math.max(...r.map(x=>x.left+x.width)),c=Math.max(...r.map(x=>x.top+x.height));if(s<=0||c<=0)return null;const v=IN(r.flatMap(x=>[x.left,x.left+x.width])),C=IN(r.flatMap(x=>[x.top,x.top+x.height])),R=r.map(x=>[x.left,x.left+x.width]),y=r.map(x=>[x.top,x.top+x.height]),a=BN(v,R,h_-Sm*2),d=BN(C,y,m_-Sm*2),g=r.map((x,h)=>{const _=a[v.indexOf(x.left)].at,N=a[v.indexOf(x.left+x.width)].at,E=d[C.indexOf(x.top)].at,b=d[C.indexOf(x.top+x.height)].at;return{id:x.id,active:!!x.active,command:x.command,seq:h,left:_,top:E,width:N-_,height:b-E}});return{w:h_,h:m_,cells:g}}function l3(r){const s=r.width<s3,c=r.height<a3;return s&&c?"tiny":s?"narrow":c?"flat":""}const Hg={terminal:"终端",chat:"对话"};function c3(){return o.jsxDEV("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsxDEV("path",{d:"M4 8h13M13 4l4 4-4 4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:12,columnNumber:7},this),o.jsxDEV("path",{d:"M20 16H7M11 20l-4-4 4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:13,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:10,columnNumber:5},this)}function u3({value:r,onChange:s}){const c=r==="chat"?"terminal":"chat";return o.jsxDEV("button",{type:"button",className:"lens-toggle",onClick:()=>s(c),"aria-label":`切换到${Hg[c]}视图`,title:`切换到${Hg[c]}视图`,children:[o.jsxDEV(c3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:28,columnNumber:7},this),o.jsxDEV("span",{className:"lens-toggle-label",children:Hg[r]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:29,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:21,columnNumber:5},this)}const FN="①②③④⑤⑥⑦⑧⑨",Vu=r=>r<FN.length?FN[r]:String(r+1),d3=(r,s)=>`${Vu(s)} ${r.command||r.id}`;function h3({window:r,active:s,agent:c,onSelect:v,onManage:C}){const R=Pm(()=>C(r),{onClick:()=>v(r)});return o.jsxDEV("button",{"data-win":r.id,className:`win-tab ${s?"active":""}`,...R,children:[c&&o.jsxDEV(To,{agent:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:24,columnNumber:17},this),r.name||r.id,r.panes>1&&o.jsxDEV("span",{className:"win-panes",children:r.panes},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:26,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:23,columnNumber:5},this)}const m3=200;function f3({cell:r,cur:s,releasing:c,picking:v,agent:C,onChoose:R,onManage:y}){const a=l3(r),d=r.command||r.id,g=Pm(()=>y(r.id),{onClick:()=>R(r.id)});return o.jsxDEV("button",{type:"button",role:"option","aria-selected":s,"aria-label":d,className:`pane-map-cell${s?" is-current":""}${c?" is-releasing":""}${a?` is-${a}`:""}${v?" is-picking":""}`,style:{left:`${r.left+Sm}px`,top:`${r.top+Sm}px`,width:`${r.width}px`,height:`${r.height}px`},...g,children:o.jsxDEV("span",{className:"pmc-surf",children:a==="narrow"||a==="tiny"?o.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:Vu(r.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:56,columnNumber:11},this):a==="flat"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:Vu(r.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:59,columnNumber:13},this),o.jsxDEV("span",{className:"pmc-cmd",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:60,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:58,columnNumber:11},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("span",{className:"pmc-row",children:[o.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:Vu(r.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:65,columnNumber:15},this),C&&o.jsxDEV(To,{agent:C},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:66,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:64,columnNumber:13},this),o.jsxDEV("span",{className:"pmc-cmd",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:68,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:63,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:54,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:45,columnNumber:5},this)}function p3({window:r,panes:s,paneAgents:c={},currentPaneId:v,agent:C,onManage:R,onManagePane:y,onSelectPane:a,paneSheetOpen:d=!1,openMapFor:g=null,onMapOpened:x}){const[h,_]=M.useState(!1),[N,E]=M.useState(null),b=M.useRef(null);M.useEffect(()=>()=>clearTimeout(b.current),[]);const l=F=>{var B;try{(B=navigator.vibrate)==null||B.call(navigator,10)}catch{}if(d&&(y==null||y(F)),typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){a(F);return}E(F),clearTimeout(b.current),b.current=setTimeout(()=>{E(null),a(F)},m3)},[m,f]=M.useState(null),p=M.useRef(null),S=f_(s)?o3(s):null,k=S?S.w:h_,j=S?S.h:m_,A=()=>{var te;const F=(te=p.current)==null?void 0:te.getBoundingClientRect();if(!F)return;const P=8,B=window.innerWidth,G=window.innerHeight,ne=Math.max(P,Math.min(F.left,B-k-P));let ee=F.bottom+6;if(ee+j+P>G){const se=F.top-6-j;ee=se>=P?se:Math.max(P,G-j-P)}f({top:ee,left:ne})},D=Pm(()=>R(r),{onClick:()=>{h||A(),_(F=>!F)}});M.useEffect(()=>{g&&g===r.id&&(A(),_(!0),x==null||x())},[g,r.id]),M.useEffect(()=>{if(!h)return;const F=B=>{var G;d||(G=p.current)!=null&&G.contains(B.target)||_(!1)},P=()=>A();return document.addEventListener("pointerdown",F,!0),window.addEventListener("scroll",P,!0),window.addEventListener("resize",P),()=>{document.removeEventListener("pointerdown",F,!0),window.removeEventListener("scroll",P,!0),window.removeEventListener("resize",P)}},[h,d]);const L=Math.max(0,s.findIndex(F=>F.id===v)),O=s[L];return o.jsxDEV("div",{className:"wt-dd active","data-win":r.id,ref:p,children:[o.jsxDEV("button",{className:"win-tab active wt-trigger","aria-haspopup":"listbox","aria-expanded":h,...D,children:[C&&o.jsxDEV(To,{agent:C},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:177,columnNumber:19},this),o.jsxDEV("span",{className:"wt-name",children:r.name||r.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:178,columnNumber:9},this),o.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:179,columnNumber:9},this),o.jsxDEV("span",{className:"wt-pane",children:d3(O,L)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:180,columnNumber:9},this),o.jsxDEV("span",{className:`wt-caret${h?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:181,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:171,columnNumber:7},this),h&&m&&(f_(s)?o.jsxDEV("div",{className:"pane-map",role:"listbox",style:{top:m.top,left:m.left,width:k,height:j},children:S.cells.map(F=>{const P=F.id===v;return o.jsxDEV(f3,{cell:F,cur:P,releasing:P&&!!N&&N!==v,picking:N===F.id,agent:c[F.id],onChoose:l,onManage:y},F.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:189,columnNumber:17},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:185,columnNumber:11},this):o.jsxDEV("div",{className:"dd-menu wt-menu",role:"listbox",style:{top:m.top,left:m.left},children:s.map((F,P)=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":F.id===v,className:`dd-option${F.id===v?" is-selected":""}`,onClick:()=>{a(F.id),_(!1)},children:[o.jsxDEV("span",{className:"dd-option-label",children:[o.jsxDEV("span",{className:"dd-pane-seq","aria-hidden":"true",children:Vu(P)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:214,columnNumber:19},this),c[F.id]&&o.jsxDEV(To,{agent:c[F.id]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:215,columnNumber:40},this),o.jsxDEV("span",{className:"dd-pane-cmd",children:F.command||F.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:216,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:213,columnNumber:17},this),F.id===v&&o.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:218,columnNumber:44},this)]},F.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:205,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:203,columnNumber:11},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:170,columnNumber:5},this)}function v3({windows:r,windowAgents:s={},paneAgents:c={},currentAgent:v,currentWindowId:C,panes:R,currentPaneId:y,onSelectWindow:a,onSelectPane:d,onNewWindow:g,onManageWindow:x,onManagePane:h,paneSheetOpen:_=!1,openMapFor:N=null,onMapOpened:E,trackWindowId:b,lens:l="terminal",onLensChange:m=()=>{},chatLensEnabled:f=!1}){const p=M.useRef(null);return M.useLayoutEffect(()=>{var S,k;b&&((k=(S=p.current)==null?void 0:S.querySelector(`[data-win="${b}"]`))==null||k.scrollIntoView({block:"nearest",inline:"nearest"}))},[r,b]),o.jsxDEV("div",{className:"windowbar",children:[o.jsxDEV("div",{className:"windowbar-scroll",ref:p,children:[r.map(S=>{const k=S.id===C;return k&&R.length>1?o.jsxDEV(p3,{window:S,panes:R,paneAgents:c,currentPaneId:y,agent:v,onManage:x,onManagePane:h,onSelectPane:d,paneSheetOpen:_,openMapFor:N,onMapOpened:E},S.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:250,columnNumber:15},this):o.jsxDEV(h3,{window:S,active:k,agent:s[S.id],onSelect:a,onManage:x},S.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:267,columnNumber:13},this)}),o.jsxDEV("button",{className:"win-tab win-new",onClick:g,"aria-label":U("windowbar.newWindow"),title:U("windowbar.newWindow"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:277,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:245,columnNumber:7},this),v==="claude"&&f&&o.jsxDEV(u3,{value:l,onChange:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:280,columnNumber:56},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:244,columnNumber:5},this)}var VS={exports:{}};(function(r,s){(function(c,v){r.exports=v()})(globalThis,()=>(()=>{var c={4567:function(y,a,d){var g=this&&this.__decorate||function(f,p,S,k){var j,A=arguments.length,D=A<3?p:k===null?k=Object.getOwnPropertyDescriptor(p,S):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,p,S,k);else for(var L=f.length-1;L>=0;L--)(j=f[L])&&(D=(A<3?j(D):A>3?j(p,S,D):j(p,S))||D);return A>3&&D&&Object.defineProperty(p,S,D),D},x=this&&this.__param||function(f,p){return function(S,k){p(S,k,f)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const h=d(9042),_=d(9924),N=d(844),E=d(4725),b=d(2585),l=d(3656);let m=a.AccessibilityManager=class extends N.Disposable{constructor(f,p,S,k){super(),this._terminal=f,this._coreBrowserService=S,this._renderService=k,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 j=0;j<this._terminal.rows;j++)this._rowElements[j]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[j]);if(this._topBoundaryFocusListener=j=>this._handleBoundaryFocus(j,0),this._bottomBoundaryFocusListener=j=>this._handleBoundaryFocus(j,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 _.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(j=>this._handleResize(j.rows))),this.register(this._terminal.onRender(j=>this._refreshRows(j.start,j.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(j=>this._handleChar(j))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
207
|
+
`))),this.register(this._terminal.onA11yTab(j=>this._handleTab(j))),this.register(this._terminal.onKey(j=>this._handleKey(j.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,N.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(f){for(let p=0;p<f;p++)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+=h.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,p){this._liveRegionDebouncer.refresh(f,p,this._terminal.rows)}_renderRows(f,p){const S=this._terminal.buffer,k=S.lines.length.toString();for(let j=f;j<=p;j++){const A=S.lines.get(S.ydisp+j),D=[],L=(A==null?void 0:A.translateToString(!0,void 0,void 0,D))||"",O=(S.ydisp+j+1).toString(),F=this._rowElements[j];F&&(L.length===0?(F.innerText=" ",this._rowColumns.set(F,[0,1])):(F.textContent=L,this._rowColumns.set(F,D)),F.setAttribute("aria-posinset",O),F.setAttribute("aria-setsize",k))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(f,p){const S=f.target,k=this._rowElements[p===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")===(p===0?"1":`${this._terminal.buffer.lines.length}`)||f.relatedTarget!==k)return;let j,A;if(p===0?(j=S,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(j=this._rowElements.shift(),A=S,this._rowContainer.removeChild(j)),j.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),p===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(p===0?-1:1),this._rowElements[p===0?1:this._rowElements.length-2].focus(),f.preventDefault(),f.stopImmediatePropagation()}_handleSelectionChange(){var L;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 p={node:f.anchorNode,offset:f.anchorOffset},S={node:f.focusNode,offset:f.focusOffset};if((p.node.compareDocumentPosition(S.node)&Node.DOCUMENT_POSITION_PRECEDING||p.node===S.node&&p.offset>S.offset)&&([p,S]=[S,p]),p.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(p={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(p.node))return;const k=this._rowElements.slice(-1)[0];if(S.node.compareDocumentPosition(k)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(S={node:k,offset:((L=k.textContent)==null?void 0:L.length)??0}),!this._rowContainer.contains(S.node))return;const j=({node:O,offset:F})=>{const P=O instanceof Text?O.parentNode:O;let B=parseInt(P==null?void 0:P.getAttribute("aria-posinset"),10)-1;if(isNaN(B))return console.warn("row is invalid. Race condition?"),null;const G=this._rowColumns.get(P);if(!G)return console.warn("columns is null. Race condition?"),null;let ne=F<G.length?G[F]:G.slice(-1)[0]+1;return ne>=this._terminal.cols&&(++B,ne=0),{row:B,column:ne}},A=j(p),D=j(S);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 p=this._rowContainer.children.length;p<this._terminal.rows;p++)this._rowElements[p]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[p]);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`}};a.AccessibilityManager=m=g([x(1,b.IInstantiationService),x(2,E.ICoreBrowserService),x(3,E.IRenderService)],m)},3614:(y,a)=>{function d(_){return _.replace(/\r?\n/g,"\r")}function g(_,N){return N?"\x1B[200~"+_+"\x1B[201~":_}function x(_,N,E,b){_=g(_=d(_),E.decPrivateModes.bracketedPasteMode&&b.rawOptions.ignoreBracketedPasteMode!==!0),E.triggerDataEvent(_,!0),N.value=""}function h(_,N,E){const b=E.getBoundingClientRect(),l=_.clientX-b.left-10,m=_.clientY-b.top-10;N.style.width="20px",N.style.height="20px",N.style.left=`${l}px`,N.style.top=`${m}px`,N.style.zIndex="1000",N.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=d,a.bracketTextForPaste=g,a.copyHandler=function(_,N){_.clipboardData&&_.clipboardData.setData("text/plain",N.selectionText),_.preventDefault()},a.handlePasteEvent=function(_,N,E,b){_.stopPropagation(),_.clipboardData&&x(_.clipboardData.getData("text/plain"),N,E,b)},a.paste=x,a.moveTextAreaUnderMouseCursor=h,a.rightClickHandler=function(_,N,E,b,l){h(_,N,E),l&&b.rightClickSelect(_),N.value=b.selectionText,N.select()}},7239:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const g=d(1505);a.ColorContrastCache=class{constructor(){this._color=new g.TwoKeyMap,this._css=new g.TwoKeyMap}setCss(x,h,_){this._css.set(x,h,_)}getCss(x,h){return this._css.get(x,h)}setColor(x,h,_){this._color.set(x,h,_)}getColor(x,h){return this._color.get(x,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(d,g,x,h){d.addEventListener(g,x,h);let _=!1;return{dispose:()=>{_||(_=!0,d.removeEventListener(g,x,h))}}}},3551:function(y,a,d){var g=this&&this.__decorate||function(m,f,p,S){var k,j=arguments.length,A=j<3?f:S===null?S=Object.getOwnPropertyDescriptor(f,p):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(m,f,p,S);else for(var D=m.length-1;D>=0;D--)(k=m[D])&&(A=(j<3?k(A):j>3?k(f,p,A):k(f,p))||A);return j>3&&A&&Object.defineProperty(f,p,A),A},x=this&&this.__param||function(m,f){return function(p,S){f(p,S,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const h=d(3656),_=d(8460),N=d(844),E=d(2585),b=d(4725);let l=a.Linkifier=class extends N.Disposable{get currentLink(){return this._currentLink}constructor(m,f,p,S,k){super(),this._element=m,this._mouseService=f,this._renderService=p,this._bufferService=S,this._linkProviderService=k,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new _.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new _.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,N.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,N.toDisposable)(()=>{var j;this._lastMouseEvent=void 0,(j=this._activeProviderReplies)==null||j.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.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 p=m.composedPath();for(let S=0;S<p.length;S++){const k=p[S];if(k.classList.contains("xterm"))break;if(k.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 S,k;this._activeProviderReplies&&f||((S=this._activeProviderReplies)==null||S.forEach(j=>{j==null||j.forEach(A=>{A.link.dispose&&A.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=m.y);let p=!1;for(const[j,A]of this._linkProviderService.linkProviders.entries())f?(k=this._activeProviderReplies)!=null&&k.get(j)&&(p=this._checkLinkProviderResult(j,m,p)):A.provideLinks(m.y,D=>{var O,F;if(this._isMouseOut)return;const L=D==null?void 0:D.map(P=>({link:P}));(O=this._activeProviderReplies)==null||O.set(j,L),p=this._checkLinkProviderResult(j,m,p),((F=this._activeProviderReplies)==null?void 0:F.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(m.y,this._activeProviderReplies)})}_removeIntersectingLinks(m,f){const p=new Set;for(let S=0;S<f.size;S++){const k=f.get(S);if(k)for(let j=0;j<k.length;j++){const A=k[j],D=A.link.range.start.y<m?0:A.link.range.start.x,L=A.link.range.end.y>m?this._bufferService.cols:A.link.range.end.x;for(let O=D;O<=L;O++){if(p.has(O)){k.splice(j--,1);break}p.add(O)}}}}_checkLinkProviderResult(m,f,p){var j;if(!this._activeProviderReplies)return p;const S=this._activeProviderReplies.get(m);let k=!1;for(let A=0;A<m;A++)this._activeProviderReplies.has(A)&&!this._activeProviderReplies.get(A)||(k=!0);if(!k&&S){const A=S.find(D=>this._linkAtPosition(D.link,f));A&&(p=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!p)for(let A=0;A<this._activeProviderReplies.size;A++){const D=(j=this._activeProviderReplies.get(A))==null?void 0:j.find(L=>this._linkAtPosition(L.link,f));if(D){p=!0,this._handleNewLink(D);break}}return p}_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,N.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 p,S;return(S=(p=this._currentLink)==null?void 0:p.state)==null?void 0:S.decorations.pointerCursor},set:p=>{var S;(S=this._currentLink)!=null&&S.state&&this._currentLink.state.decorations.pointerCursor!==p&&(this._currentLink.state.decorations.pointerCursor=p,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",p))}},underline:{get:()=>{var p,S;return(S=(p=this._currentLink)==null?void 0:p.state)==null?void 0:S.decorations.underline},set:p=>{var S,k,j;(S=this._currentLink)!=null&&S.state&&((j=(k=this._currentLink)==null?void 0:k.state)==null?void 0:j.decorations.underline)!==p&&(this._currentLink.state.decorations.underline=p,this._currentLink.state.isHovered&&this._fireUnderlineEvent(m.link,p))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(p=>{if(!this._currentLink)return;const S=p.start===0?0:p.start+1+this._bufferService.buffer.ydisp,k=this._bufferService.buffer.ydisp+1+p.end;if(this._currentLink.link.range.start.y>=S&&this._currentLink.link.range.end.y<=k&&(this._clearCurrentLink(S,k),this._lastMouseEvent)){const j=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);j&&this._askForLink(j,!1)}})))}_linkHover(m,f,p){var S;(S=this._currentLink)!=null&&S.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(p,f.text)}_fireUnderlineEvent(m,f){const p=m.range,S=this._bufferService.buffer.ydisp,k=this._createLinkUnderlineEvent(p.start.x-1,p.start.y-S-1,p.end.x,p.end.y-S-1,void 0);(f?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(k)}_linkLeave(m,f,p){var S;(S=this._currentLink)!=null&&S.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(p,f.text)}_linkAtPosition(m,f){const p=m.range.start.y*this._bufferService.cols+m.range.start.x,S=m.range.end.y*this._bufferService.cols+m.range.end.x,k=f.y*this._bufferService.cols+f.x;return p<=k&&k<=S}_positionFromMouseEvent(m,f,p){const S=p.getCoords(m,f,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(m,f,p,S,k){return{x1:m,y1:f,x2:p,y2:S,cols:this._bufferService.cols,fg:k}}};a.Linkifier=l=g([x(1,b.IMouseService),x(2,b.IRenderService),x(3,E.IBufferService),x(4,b.ILinkProviderService)],l)},9042:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(y,a,d){var g=this&&this.__decorate||function(b,l,m,f){var p,S=arguments.length,k=S<3?l:f===null?f=Object.getOwnPropertyDescriptor(l,m):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(b,l,m,f);else for(var j=b.length-1;j>=0;j--)(p=b[j])&&(k=(S<3?p(k):S>3?p(l,m,k):p(l,m))||k);return S>3&&k&&Object.defineProperty(l,m,k),k},x=this&&this.__param||function(b,l){return function(m,f){l(m,f,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const h=d(511),_=d(2585);let N=a.OscLinkProvider=class{constructor(b,l,m){this._bufferService=b,this._optionsService=l,this._oscLinkService=m}provideLinks(b,l){var L;const m=this._bufferService.buffer.lines.get(b-1);if(!m)return void l(void 0);const f=[],p=this._optionsService.rawOptions.linkHandler,S=new h.CellData,k=m.getTrimmedLength();let j=-1,A=-1,D=!1;for(let O=0;O<k;O++)if(A!==-1||m.hasContent(O)){if(m.loadCell(O,S),S.hasExtendedAttrs()&&S.extended.urlId){if(A===-1){A=O,j=S.extended.urlId;continue}D=S.extended.urlId!==j}else A!==-1&&(D=!0);if(D||A!==-1&&O===k-1){const F=(L=this._oscLinkService.getLinkData(j))==null?void 0:L.uri;if(F){const P={start:{x:A+1,y:b},end:{x:O+(D||O!==k-1?0:1),y:b}};let B=!1;if(!(p!=null&&p.allowNonHttpProtocols))try{const G=new URL(F);["http:","https:"].includes(G.protocol)||(B=!0)}catch{B=!0}B||f.push({text:F,range:P,activate:(G,ne)=>p?p.activate(G,ne,P):E(0,ne),hover:(G,ne)=>{var ee;return(ee=p==null?void 0:p.hover)==null?void 0:ee.call(p,G,ne,P)},leave:(G,ne)=>{var ee;return(ee=p==null?void 0:p.leave)==null?void 0:ee.call(p,G,ne,P)}})}D=!1,S.hasExtendedAttrs()&&S.extended.urlId?(A=O,j=S.extended.urlId):(A=-1,j=-1)}}l(f)}};function E(b,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")}}a.OscLinkProvider=N=g([x(0,_.IBufferService),x(1,_.IOptionsService),x(2,_.IOscLinkService)],N)},6193:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(d,g){this._renderCallback=d,this._coreBrowserService=g,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(d){return this._refreshCallbacks.push(d),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(d,g,x){this._rowCount=x,d=d!==void 0?d:0,g=g!==void 0?g:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,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 d=Math.max(this._rowStart,0),g=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,g),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const d of this._refreshCallbacks)d(0);this._refreshCallbacks=[]}}},3236:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const g=d(3614),x=d(3656),h=d(3551),_=d(9042),N=d(3730),E=d(1680),b=d(3107),l=d(5744),m=d(2950),f=d(1296),p=d(428),S=d(4269),k=d(5114),j=d(8934),A=d(3230),D=d(9312),L=d(4725),O=d(6731),F=d(8055),P=d(8969),B=d(8460),G=d(844),ne=d(6114),ee=d(8437),te=d(2584),se=d(7399),I=d(5941),W=d(9074),X=d(2585),K=d(5435),ve=d(4567),he=d(779);class Ae extends P.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=ne,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new G.MutableDisposable),this._onCursorMove=this.register(new B.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new B.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new B.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new B.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new B.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new B.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new B.EventEmitter),this._onBlur=this.register(new B.EventEmitter),this._onA11yCharEmitter=this.register(new B.EventEmitter),this._onA11yTabEmitter=this.register(new B.EventEmitter),this._onWillOpen=this.register(new B.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(W.DecorationService),this._instantiationService.setService(X.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(he.LinkProviderService),this._instantiationService.setService(L.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(N.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows(($,_e)=>this.refresh($,_e))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport($=>this._reportWindowsOptions($))),this.register(this._inputHandler.onColor($=>this._handleColorEvent($))),this.register((0,B.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,B.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,B.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize($=>this._afterResize($.cols,$.rows))),this.register((0,G.toDisposable)(()=>{var $,_e;this._customKeyEventHandler=void 0,(_e=($=this.element)==null?void 0:$.parentNode)==null||_e.removeChild(this.element)}))}_handleColorEvent(ie){if(this._themeService)for(const $ of ie){let _e,ue="";switch($.index){case 256:_e="foreground",ue="10";break;case 257:_e="background",ue="11";break;case 258:_e="cursor",ue="12";break;default:_e="ansi",ue="4;"+$.index}switch($.type){case 0:const Ie=F.color.toColorRGB(_e==="ansi"?this._themeService.colors.ansi[$.index]:this._themeService.colors[_e]);this.coreService.triggerDataEvent(`${te.C0.ESC}]${ue};${(0,I.toRgbString)(Ie)}${te.C1_ESCAPED.ST}`);break;case 1:if(_e==="ansi")this._themeService.modifyColors(Ue=>Ue.ansi[$.index]=F.channels.toColor(...$.color));else{const Ue=_e;this._themeService.modifyColors(nt=>nt[Ue]=F.channels.toColor(...$.color))}break;case 2:this._themeService.restoreColor($.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(ie){ie?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(ve.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ie){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(te.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(te.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,$=this.buffer.lines.get(ie);if(!$)return;const _e=Math.min(this.buffer.x,this.cols-1),ue=this._renderService.dimensions.css.cell.height,Ie=$.getWidth(_e),Ue=this._renderService.dimensions.css.cell.width*Ie,nt=this.buffer.y*this._renderService.dimensions.css.cell.height,et=_e*this._renderService.dimensions.css.cell.width;this.textarea.style.left=et+"px",this.textarea.style.top=nt+"px",this.textarea.style.width=Ue+"px",this.textarea.style.height=ue+"px",this.textarea.style.lineHeight=ue+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,x.addDisposableDomListener)(this.element,"copy",$=>{this.hasSelection()&&(0,g.copyHandler)($,this._selectionService)}));const ie=$=>(0,g.handlePasteEvent)($,this.textarea,this.coreService,this.optionsService);this.register((0,x.addDisposableDomListener)(this.textarea,"paste",ie)),this.register((0,x.addDisposableDomListener)(this.element,"paste",ie)),ne.isFirefox?this.register((0,x.addDisposableDomListener)(this.element,"mousedown",$=>{$.button===2&&(0,g.rightClickHandler)($,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,x.addDisposableDomListener)(this.element,"contextmenu",$=>{(0,g.rightClickHandler)($,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),ne.isLinux&&this.register((0,x.addDisposableDomListener)(this.element,"auxclick",$=>{$.button===1&&(0,g.moveTextAreaUnderMouseCursor)($,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,x.addDisposableDomListener)(this.textarea,"keyup",ie=>this._keyUp(ie),!0)),this.register((0,x.addDisposableDomListener)(this.textarea,"keydown",ie=>this._keyDown(ie),!0)),this.register((0,x.addDisposableDomListener)(this.textarea,"keypress",ie=>this._keyPress(ie),!0)),this.register((0,x.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,x.addDisposableDomListener)(this.textarea,"compositionupdate",ie=>this._compositionHelper.compositionupdate(ie))),this.register((0,x.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,x.addDisposableDomListener)(this.textarea,"input",ie=>this._inputEvent(ie),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(ie){var _e;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"),((_e=this.element)==null?void 0:_e.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 $=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),$.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,x.addDisposableDomListener)(this.screenElement,"mousemove",ue=>this.updateCursorStyle(ue))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),$.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",_.promptLabel),ne.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(k.CoreBrowserService,this.textarea,ie.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(L.ICoreBrowserService,this._coreBrowserService),this.register((0,x.addDisposableDomListener)(this.textarea,"focus",ue=>this._handleTextAreaFocus(ue))),this.register((0,x.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(p.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(L.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(O.ThemeService),this._instantiationService.setService(L.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(S.CharacterJoinerService),this._instantiationService.setService(L.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(A.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(L.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(ue=>this._onRender.fire(ue))),this.onResize(ue=>this._renderService.resize(ue.cols,ue.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(j.MouseService),this._instantiationService.setService(L.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild($);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(E.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(ue=>this.scrollLines(ue.amount,ue.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(L.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(ue=>this.scrollLines(ue.amount,ue.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(ue=>this._renderService.handleSelectionChanged(ue.start,ue.end,ue.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(ue=>{this.textarea.value=ue,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(ue=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,x.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(b.BufferDecorationRenderer,this.screenElement)),this.register((0,x.addDisposableDomListener)(this.element,"mousedown",ue=>this._selectionService.handleMouseDown(ue))),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(ve.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",ue=>this._handleScreenReaderModeOptionChange(ue))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",ue=>{!this._overviewRulerRenderer&&ue&&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,$=this.element;function _e(Ue){const nt=ie._mouseService.getMouseReportCoords(Ue,ie.screenElement);if(!nt)return!1;let et,st;switch(Ue.overrideType||Ue.type){case"mousemove":st=32,Ue.buttons===void 0?(et=3,Ue.button!==void 0&&(et=Ue.button<3?Ue.button:3)):et=1&Ue.buttons?0:4&Ue.buttons?1:2&Ue.buttons?2:3;break;case"mouseup":st=0,et=Ue.button<3?Ue.button:3;break;case"mousedown":st=1,et=Ue.button<3?Ue.button:3;break;case"wheel":if(ie._customWheelEventHandler&&ie._customWheelEventHandler(Ue)===!1||ie.viewport.getLinesScrolled(Ue)===0)return!1;st=Ue.deltaY<0?0:1,et=4;break;default:return!1}return!(st===void 0||et===void 0||et>4)&&ie.coreMouseService.triggerMouseEvent({col:nt.col,row:nt.row,x:nt.x,y:nt.y,button:et,action:st,ctrl:Ue.ctrlKey,alt:Ue.altKey,shift:Ue.shiftKey})}const ue={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Ie={mouseup:Ue=>(_e(Ue),Ue.buttons||(this._document.removeEventListener("mouseup",ue.mouseup),ue.mousedrag&&this._document.removeEventListener("mousemove",ue.mousedrag)),this.cancel(Ue)),wheel:Ue=>(_e(Ue),this.cancel(Ue,!0)),mousedrag:Ue=>{Ue.buttons&&_e(Ue)},mousemove:Ue=>{Ue.buttons||_e(Ue)}};this.register(this.coreMouseService.onProtocolChange(Ue=>{Ue?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Ue)),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&Ue?ue.mousemove||($.addEventListener("mousemove",Ie.mousemove),ue.mousemove=Ie.mousemove):($.removeEventListener("mousemove",ue.mousemove),ue.mousemove=null),16&Ue?ue.wheel||($.addEventListener("wheel",Ie.wheel,{passive:!1}),ue.wheel=Ie.wheel):($.removeEventListener("wheel",ue.wheel),ue.wheel=null),2&Ue?ue.mouseup||(ue.mouseup=Ie.mouseup):(this._document.removeEventListener("mouseup",ue.mouseup),ue.mouseup=null),4&Ue?ue.mousedrag||(ue.mousedrag=Ie.mousedrag):(this._document.removeEventListener("mousemove",ue.mousedrag),ue.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,x.addDisposableDomListener)($,"mousedown",Ue=>{if(Ue.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Ue))return _e(Ue),ue.mouseup&&this._document.addEventListener("mouseup",ue.mouseup),ue.mousedrag&&this._document.addEventListener("mousemove",ue.mousedrag),this.cancel(Ue)})),this.register((0,x.addDisposableDomListener)($,"wheel",Ue=>{if(!ue.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Ue)===!1)return!1;if(!this.buffer.hasScrollback){const nt=this.viewport.getLinesScrolled(Ue);if(nt===0)return;const et=te.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Ue.deltaY<0?"A":"B");let st="";for(let Dt=0;Dt<Math.abs(nt);Dt++)st+=et;return this.coreService.triggerDataEvent(st,!0),this.cancel(Ue,!0)}return this.viewport.handleWheel(Ue)?this.cancel(Ue):void 0}},{passive:!1})),this.register((0,x.addDisposableDomListener)($,"touchstart",Ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Ue),this.cancel(Ue)},{passive:!0})),this.register((0,x.addDisposableDomListener)($,"touchmove",Ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Ue)?void 0:this.cancel(Ue)},{passive:!1}))}refresh(ie,$){var _e;(_e=this._renderService)==null||_e.refreshRows(ie,$)}updateCursorStyle(ie){var $;($=this._selectionService)!=null&&$.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,$,_e=0){var ue;_e===1?(super.scrollLines(ie,$,_e),this.refresh(0,this.rows-1)):(ue=this.viewport)==null||ue.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 $=this._characterJoinerService.register(ie);return this.refresh(0,this.rows-1),$}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,$,_e){this._selectionService.setSelection(ie,$,_e)}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,$){var _e;(_e=this._selectionService)==null||_e.selectLines(ie,$)}_keyDown(ie){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1)return!1;const $=this.browser.isMac&&this.options.macOptionIsMeta&&ie.altKey;if(!$&&!this._compositionHelper.keydown(ie))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;$||ie.key!=="Dead"&&ie.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const _e=(0,se.evaluateKeyboardEvent)(ie,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ie),_e.type===3||_e.type===2){const ue=this.rows-1;return this.scrollLines(_e.type===2?-ue:ue),this.cancel(ie,!0)}return _e.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ie)||(_e.cancel&&this.cancel(ie,!0),!_e.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):(_e.key!==te.C0.ETX&&_e.key!==te.C0.CR||(this.textarea.value=""),this._onKey.fire({key:_e.key,domEvent:ie}),this._showCursor(),this.coreService.triggerDataEvent(_e.key,!0),!this.optionsService.rawOptions.screenReaderMode||ie.altKey||ie.ctrlKey?this.cancel(ie,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ie,$){const _e=ie.isMac&&!this.options.macOptionIsMeta&&$.altKey&&!$.ctrlKey&&!$.metaKey||ie.isWindows&&$.altKey&&$.ctrlKey&&!$.metaKey||ie.isWindows&&$.getModifierState("AltGraph");return $.type==="keypress"?_e:_e&&(!$.keyCode||$.keyCode>47)}_keyUp(ie){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1||(function($){return $.keyCode===16||$.keyCode===17||$.keyCode===18}(ie)||this.focus(),this.updateCursorStyle(ie),this._keyPressHandled=!1)}_keyPress(ie){let $;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1)return!1;if(this.cancel(ie),ie.charCode)$=ie.charCode;else if(ie.which===null||ie.which===void 0)$=ie.keyCode;else{if(ie.which===0||ie.charCode===0)return!1;$=ie.which}return!(!$||(ie.altKey||ie.ctrlKey||ie.metaKey)&&!this._isThirdLevelShift(this.browser,ie)||($=String.fromCharCode($),this._onKey.fire({key:$,domEvent:ie}),this._showCursor(),this.coreService.triggerDataEvent($,!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 $=ie.data;return this.coreService.triggerDataEvent($,!0),this.cancel(ie),!0}return!1}resize(ie,$){ie!==this.cols||$!==this.rows?super.resize(ie,$):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(ie,$){var _e,ue;(_e=this._charSizeService)==null||_e.measure(),(ue=this.viewport)==null||ue.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 $=1;$<this.rows;$++)this.buffer.lines.push(this.buffer.getBlankLine(ee.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 $,_e;this.options.rows=this.rows,this.options.cols=this.cols;const ie=this._customKeyEventHandler;this._setup(),super.reset(),($=this._selectionService)==null||$.reset(),this._decorationService.reset(),(_e=this.viewport)==null||_e.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(te.C0.ESC+"[I"):this.coreService.triggerDataEvent(te.C0.ESC+"[O")}_reportWindowsOptions(ie){if(this._renderService)switch(ie){case K.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const $=this._renderService.dimensions.css.canvas.width.toFixed(0),_e=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${te.C0.ESC}[4;${_e};${$}t`);break;case K.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ue=this._renderService.dimensions.css.cell.width.toFixed(0),Ie=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${te.C0.ESC}[6;${Ie};${ue}t`)}}cancel(ie,$){if(this.options.cancelEvents||$)return ie.preventDefault(),ie.stopPropagation(),!1}}a.Terminal=Ae},9924:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(d,g=1e3){this._renderCallback=d,this._debounceThresholdMS=g,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(d,g,x){this._rowCount=x,d=d!==void 0?d:0,g=g!==void 0?g:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,g):g;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const _=h-this._lastRefreshMs,N=this._debounceThresholdMS-_;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},N)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const d=Math.max(this._rowStart,0),g=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,g)}}},1680:function(y,a,d){var g=this&&this.__decorate||function(m,f,p,S){var k,j=arguments.length,A=j<3?f:S===null?S=Object.getOwnPropertyDescriptor(f,p):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(m,f,p,S);else for(var D=m.length-1;D>=0;D--)(k=m[D])&&(A=(j<3?k(A):j>3?k(f,p,A):k(f,p))||A);return j>3&&A&&Object.defineProperty(f,p,A),A},x=this&&this.__param||function(m,f){return function(p,S){f(p,S,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const h=d(3656),_=d(4725),N=d(8460),E=d(844),b=d(2585);let l=a.Viewport=class extends E.Disposable{constructor(m,f,p,S,k,j,A,D){super(),this._viewportElement=m,this._scrollArea=f,this._bufferService=p,this._optionsService=S,this._charSizeService=k,this._renderService=j,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 N.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(L=>this._activeBuffer=L.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(L=>this._renderDimensions=L)),this._handleThemeChange(D.colors),this.register(D.onChangeColors(L=>this._handleThemeChange(L))),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 p=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(f<0&&this._viewportElement.scrollTop!==0||f>0&&p<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 p,S="";const k=[],j=f??this._bufferService.buffer.lines.length,A=this._bufferService.buffer.lines;for(let L=m;L<j;L++){const O=A.get(L);if(!O)continue;const F=(D=A.get(L+1))==null?void 0:D.isWrapped;if(S+=O.translateToString(!F),!F||L===A.length-1){const P=document.createElement("div");P.textContent=S,k.push(P),S.length>0&&(p=P),S=""}}return{bufferElements:k,cursorElement:p}}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 p=this._optionsService.rawOptions.fastScrollModifier;return p==="alt"&&f.altKey||p==="ctrl"&&f.ctrlKey||p==="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))}};a.Viewport=l=g([x(2,b.IBufferService),x(3,b.IOptionsService),x(4,_.ICharSizeService),x(5,_.IRenderService),x(6,_.ICoreBrowserService),x(7,_.IThemeService)],l)},3107:function(y,a,d){var g=this&&this.__decorate||function(b,l,m,f){var p,S=arguments.length,k=S<3?l:f===null?f=Object.getOwnPropertyDescriptor(l,m):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(b,l,m,f);else for(var j=b.length-1;j>=0;j--)(p=b[j])&&(k=(S<3?p(k):S>3?p(l,m,k):p(l,m))||k);return S>3&&k&&Object.defineProperty(l,m,k),k},x=this&&this.__param||function(b,l){return function(m,f){l(m,f,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const h=d(4725),_=d(844),N=d(2585);let E=a.BufferDecorationRenderer=class extends _.Disposable{constructor(b,l,m,f,p){super(),this._screenElement=b,this._bufferService=l,this._coreBrowserService=m,this._decorationService=f,this._renderService=p,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(S=>this._removeDecoration(S))),this.register((0,_.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 b of this._decorationService.decorations)this._renderDecoration(b);this._dimensionsChanged=!1}_renderDecoration(b){this._refreshStyle(b),this._dimensionsChanged&&this._refreshXPosition(b)}_createElement(b){var f;const l=this._coreBrowserService.mainDocument.createElement("div");l.classList.add("xterm-decoration"),l.classList.toggle("xterm-decoration-top-layer",((f=b==null?void 0:b.options)==null?void 0:f.layer)==="top"),l.style.width=`${Math.round((b.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,l.style.height=(b.options.height||1)*this._renderService.dimensions.css.cell.height+"px",l.style.top=(b.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=b.options.x??0;return m&&m>this._bufferService.cols&&(l.style.display="none"),this._refreshXPosition(b,l),l}_refreshStyle(b){const l=b.marker.line-this._bufferService.buffers.active.ydisp;if(l<0||l>=this._bufferService.rows)b.element&&(b.element.style.display="none",b.onRenderEmitter.fire(b.element));else{let m=this._decorationElements.get(b);m||(m=this._createElement(b),b.element=m,this._decorationElements.set(b,m),this._container.appendChild(m),b.onDispose(()=>{this._decorationElements.delete(b),m.remove()})),m.style.top=l*this._renderService.dimensions.css.cell.height+"px",m.style.display=this._altBufferIsActive?"none":"block",b.onRenderEmitter.fire(m)}}_refreshXPosition(b,l=b.element){if(!l)return;const m=b.options.x??0;(b.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(b){var l;(l=this._decorationElements.get(b))==null||l.remove(),this._decorationElements.delete(b),b.dispose()}};a.BufferDecorationRenderer=E=g([x(1,N.IBufferService),x(2,h.ICoreBrowserService),x(3,N.IDecorationService),x(4,h.IRenderService)],E)},5871:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(d){if(d.options.overviewRulerOptions){for(const g of this._zones)if(g.color===d.options.overviewRulerOptions.color&&g.position===d.options.overviewRulerOptions.position){if(this._lineIntersectsZone(g,d.marker.line))return;if(this._lineAdjacentToZone(g,d.marker.line,d.options.overviewRulerOptions.position))return void this._addLineToZone(g,d.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=d.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=d.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=d.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=d.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:d.options.overviewRulerOptions.color,position:d.options.overviewRulerOptions.position,startBufferLine:d.marker.line,endBufferLine:d.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(d){this._linePadding=d}_lineIntersectsZone(d,g){return g>=d.startBufferLine&&g<=d.endBufferLine}_lineAdjacentToZone(d,g,x){return g>=d.startBufferLine-this._linePadding[x||"full"]&&g<=d.endBufferLine+this._linePadding[x||"full"]}_addLineToZone(d,g){d.startBufferLine=Math.min(d.startBufferLine,g),d.endBufferLine=Math.max(d.endBufferLine,g)}}},5744:function(y,a,d){var g=this&&this.__decorate||function(p,S,k,j){var A,D=arguments.length,L=D<3?S:j===null?j=Object.getOwnPropertyDescriptor(S,k):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(p,S,k,j);else for(var O=p.length-1;O>=0;O--)(A=p[O])&&(L=(D<3?A(L):D>3?A(S,k,L):A(S,k))||L);return D>3&&L&&Object.defineProperty(S,k,L),L},x=this&&this.__param||function(p,S){return function(k,j){S(k,j,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const h=d(5871),_=d(4725),N=d(844),E=d(2585),b={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=a.OverviewRulerRenderer=class extends N.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(p,S,k,j,A,D,L){var F;super(),this._viewportElement=p,this._screenElement=S,this._bufferService=k,this._decorationService=j,this._renderService=A,this._optionsService=D,this._coreBrowserService=L,this._colorZoneStore=new h.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(),(F=this._viewportElement.parentElement)==null||F.insertBefore(this._canvas,this._viewportElement);const O=this._canvas.getContext("2d");if(!O)throw new Error("Ctx cannot be null");this._ctx=O,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,N.toDisposable)(()=>{var P;(P=this._canvas)==null||P.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 p=Math.floor(this._canvas.width/3),S=Math.ceil(this._canvas.width/3);l.full=this._canvas.width,l.left=p,l.center=S,l.right=p,this._refreshDrawHeightConstants(),m.full=0,m.left=0,m.center=l.left,m.right=l.left+l.center}_refreshDrawHeightConstants(){b.full=Math.round(2*this._coreBrowserService.dpr);const p=this._canvas.height/this._bufferService.buffer.lines.length,S=Math.round(Math.max(Math.min(p,12),6)*this._coreBrowserService.dpr);b.left=S,b.center=S,b.right=S}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.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 S of this._decorationService.decorations)this._colorZoneStore.addDecoration(S);this._ctx.lineWidth=1;const p=this._colorZoneStore.zones;for(const S of p)S.position!=="full"&&this._renderColorZone(S);for(const S of p)S.position==="full"&&this._renderColorZone(S);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(p){this._ctx.fillStyle=p.color,this._ctx.fillRect(m[p.position||"full"],Math.round((this._canvas.height-1)*(p.startBufferLine/this._bufferService.buffers.active.lines.length)-b[p.position||"full"]/2),l[p.position||"full"],Math.round((this._canvas.height-1)*((p.endBufferLine-p.startBufferLine)/this._bufferService.buffers.active.lines.length)+b[p.position||"full"]))}_queueRefresh(p,S){this._shouldUpdateDimensions=p||this._shouldUpdateDimensions,this._shouldUpdateAnchor=S||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};a.OverviewRulerRenderer=f=g([x(2,E.IBufferService),x(3,E.IDecorationService),x(4,_.IRenderService),x(5,E.IOptionsService),x(6,_.ICoreBrowserService)],f)},2950:function(y,a,d){var g=this&&this.__decorate||function(b,l,m,f){var p,S=arguments.length,k=S<3?l:f===null?f=Object.getOwnPropertyDescriptor(l,m):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(b,l,m,f);else for(var j=b.length-1;j>=0;j--)(p=b[j])&&(k=(S<3?p(k):S>3?p(l,m,k):p(l,m))||k);return S>3&&k&&Object.defineProperty(l,m,k),k},x=this&&this.__param||function(b,l){return function(m,f){l(m,f,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const h=d(4725),_=d(2585),N=d(2584);let E=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(b,l,m,f,p,S){this._textarea=b,this._compositionView=l,this._bufferService=m,this._optionsService=f,this._coreService=p,this._renderService=S,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(b){this._compositionView.textContent=b.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(b){if(this._isComposing||this._isSendingComposition){if(b.keyCode===229||b.keyCode===16||b.keyCode===17||b.keyCode===18)return!1;this._finalizeComposition(!1)}return b.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(b){if(this._compositionView.classList.remove("active"),this._isComposing=!1,b){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 b=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const l=this._textarea.value,m=l.replace(b,"");this._dataAlreadySent=m,l.length>b.length?this._coreService.triggerDataEvent(m,!0):l.length<b.length?this._coreService.triggerDataEvent(`${N.C0.DEL}`,!0):l.length===b.length&&l!==b&&this._coreService.triggerDataEvent(l,!0)}},0)}updateCompositionElements(b){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,p=l*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=p+"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 S=this._compositionView.getBoundingClientRect();this._textarea.style.left=p+"px",this._textarea.style.top=f+"px",this._textarea.style.width=Math.max(S.width,1)+"px",this._textarea.style.height=Math.max(S.height,1)+"px",this._textarea.style.lineHeight=S.height+"px"}b||setTimeout(()=>this.updateCompositionElements(!0),0)}}};a.CompositionHelper=E=g([x(2,_.IBufferService),x(3,_.IOptionsService),x(4,_.ICoreService),x(5,h.IRenderService)],E)},9806:(y,a)=>{function d(g,x,h){const _=h.getBoundingClientRect(),N=g.getComputedStyle(h),E=parseInt(N.getPropertyValue("padding-left")),b=parseInt(N.getPropertyValue("padding-top"));return[x.clientX-_.left-E,x.clientY-_.top-b]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=d,a.getCoords=function(g,x,h,_,N,E,b,l,m){if(!E)return;const f=d(g,x,h);return f?(f[0]=Math.ceil((f[0]+(m?b/2:0))/b),f[1]=Math.ceil(f[1]/l),f[0]=Math.min(Math.max(f[0],1),_+(m?1:0)),f[1]=Math.min(Math.max(f[1],1),N),f):void 0}},9504:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const g=d(2584);function x(l,m,f,p){const S=l-h(l,f),k=m-h(m,f),j=Math.abs(S-k)-function(A,D,L){let O=0;const F=A-h(A,L),P=D-h(D,L);for(let B=0;B<Math.abs(F-P);B++){const G=_(A,D)==="A"?-1:1,ne=L.buffer.lines.get(F+G*B);ne!=null&&ne.isWrapped&&O++}return O}(l,m,f);return b(j,E(_(l,m),p))}function h(l,m){let f=0,p=m.buffer.lines.get(l),S=p==null?void 0:p.isWrapped;for(;S&&l>=0&&l<m.rows;)f++,p=m.buffer.lines.get(--l),S=p==null?void 0:p.isWrapped;return f}function _(l,m){return l>m?"A":"B"}function N(l,m,f,p,S,k){let j=l,A=m,D="";for(;j!==f||A!==p;)j+=S?1:-1,S&&j>k.cols-1?(D+=k.buffer.translateBufferLineToString(A,!1,l,j),j=0,l=0,A++):!S&&j<0&&(D+=k.buffer.translateBufferLineToString(A,!1,0,l+1),j=k.cols-1,l=j,A--);return D+k.buffer.translateBufferLineToString(A,!1,l,j)}function E(l,m){const f=m?"O":"[";return g.C0.ESC+f+l}function b(l,m){l=Math.floor(l);let f="";for(let p=0;p<l;p++)f+=m;return f}a.moveToCellSequence=function(l,m,f,p){const S=f.buffer.x,k=f.buffer.y;if(!f.buffer.hasScrollback)return function(D,L,O,F,P,B){return x(L,F,P,B).length===0?"":b(N(D,L,D,L-h(L,P),!1,P).length,E("D",B))}(S,k,0,m,f,p)+x(k,m,f,p)+function(D,L,O,F,P,B){let G;G=x(L,F,P,B).length>0?F-h(F,P):L;const ne=F,ee=function(te,se,I,W,X,K){let ve;return ve=x(I,W,X,K).length>0?W-h(W,X):se,te<I&&ve<=W||te>=I&&ve<W?"C":"D"}(D,L,O,F,P,B);return b(N(D,G,O,ne,ee==="C",P).length,E(ee,B))}(S,k,l,m,f,p);let j;if(k===m)return j=S>l?"D":"C",b(Math.abs(S-l),E(j,p));j=k>m?"D":"C";const A=Math.abs(k-m);return b(function(D,L){return L.cols-D}(k>m?l:S,f)+(A-1)*f.cols+1+((k>m?S:l)-1),E(j,p))}},1296:function(y,a,d){var g=this&&this.__decorate||function(B,G,ne,ee){var te,se=arguments.length,I=se<3?G:ee===null?ee=Object.getOwnPropertyDescriptor(G,ne):ee;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(B,G,ne,ee);else for(var W=B.length-1;W>=0;W--)(te=B[W])&&(I=(se<3?te(I):se>3?te(G,ne,I):te(G,ne))||I);return se>3&&I&&Object.defineProperty(G,ne,I),I},x=this&&this.__param||function(B,G){return function(ne,ee){G(ne,ee,B)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const h=d(3787),_=d(2550),N=d(2223),E=d(6171),b=d(6052),l=d(4725),m=d(8055),f=d(8460),p=d(844),S=d(2585),k="xterm-dom-renderer-owner-",j="xterm-rows",A="xterm-fg-",D="xterm-bg-",L="xterm-focus",O="xterm-selection";let F=1,P=a.DomRenderer=class extends p.Disposable{constructor(B,G,ne,ee,te,se,I,W,X,K,ve,he,Ae){super(),this._terminal=B,this._document=G,this._element=ne,this._screenElement=ee,this._viewportElement=te,this._helperContainer=se,this._linkifier2=I,this._charSizeService=X,this._optionsService=K,this._bufferService=ve,this._coreBrowserService=he,this._themeService=Ae,this._terminalClass=F++,this._rowElements=[],this._selectionRenderModel=(0,b.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new f.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(j),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(O),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,E.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(me=>this._injectCss(me))),this._injectCss(this._themeService.colors),this._rowFactory=W.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(k+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(me=>this._handleLinkHover(me))),this.register(this._linkifier2.onHideLinkUnderline(me=>this._handleLinkLeave(me))),this.register((0,p.toDisposable)(()=>{this._element.classList.remove(k+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new _.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const B=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*B,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*B),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/B),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/B),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const ne of this._rowElements)ne.style.width=`${this.dimensions.css.canvas.width}px`,ne.style.height=`${this.dimensions.css.cell.height}px`,ne.style.lineHeight=`${this.dimensions.css.cell.height}px`,ne.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const G=`${this._terminalSelector} .${j} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=G,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(B){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let G=`${this._terminalSelector} .${j} { color: ${B.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;G+=`${this._terminalSelector} .${j} .xterm-dim { color: ${m.color.multiplyOpacity(B.foreground,.5).css};}`,G+=`${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 ne=`blink_underline_${this._terminalClass}`,ee=`blink_bar_${this._terminalClass}`,te=`blink_block_${this._terminalClass}`;G+=`@keyframes ${ne} { 50% { border-bottom-style: hidden; }}`,G+=`@keyframes ${ee} { 50% { box-shadow: none; }}`,G+=`@keyframes ${te} { 0% { background-color: ${B.cursor.css}; color: ${B.cursorAccent.css}; } 50% { background-color: inherit; color: ${B.cursor.css}; }}`,G+=`${this._terminalSelector} .${j}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ne} 1s step-end infinite;}${this._terminalSelector} .${j}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${ee} 1s step-end infinite;}${this._terminalSelector} .${j}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${te} 1s step-end infinite;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-block { background-color: ${B.cursor.css}; color: ${B.cursorAccent.css};}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${B.cursor.css} !important; color: ${B.cursorAccent.css} !important;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${B.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${B.cursor.css} inset;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${B.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,G+=`${this._terminalSelector} .${O} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${O} div { position: absolute; background-color: ${B.selectionBackgroundOpaque.css};}${this._terminalSelector} .${O} div { position: absolute; background-color: ${B.selectionInactiveBackgroundOpaque.css};}`;for(const[se,I]of B.ansi.entries())G+=`${this._terminalSelector} .${A}${se} { color: ${I.css}; }${this._terminalSelector} .${A}${se}.xterm-dim { color: ${m.color.multiplyOpacity(I,.5).css}; }${this._terminalSelector} .${D}${se} { background-color: ${I.css}; }`;G+=`${this._terminalSelector} .${A}${N.INVERTED_DEFAULT_COLOR} { color: ${m.color.opaque(B.background).css}; }${this._terminalSelector} .${A}${N.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${m.color.multiplyOpacity(m.color.opaque(B.background),.5).css}; }${this._terminalSelector} .${D}${N.INVERTED_DEFAULT_COLOR} { background-color: ${B.foreground.css}; }`,this._themeStyleElement.textContent=G}_setDefaultSpacing(){const B=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${B}px`,this._rowFactory.defaultSpacing=B}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(B,G){for(let ne=this._rowElements.length;ne<=G;ne++){const ee=this._document.createElement("div");this._rowContainer.appendChild(ee),this._rowElements.push(ee)}for(;this._rowElements.length>G;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(B,G){this._refreshRowElements(B,G),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(L),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(L),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(B,G,ne){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(B,G,ne),this.renderRows(0,this._bufferService.rows-1),!B||!G)return;this._selectionRenderModel.update(this._terminal,B,G,ne);const ee=this._selectionRenderModel.viewportStartRow,te=this._selectionRenderModel.viewportEndRow,se=this._selectionRenderModel.viewportCappedStartRow,I=this._selectionRenderModel.viewportCappedEndRow;if(se>=this._bufferService.rows||I<0)return;const W=this._document.createDocumentFragment();if(ne){const X=B[0]>G[0];W.appendChild(this._createSelectionElement(se,X?G[0]:B[0],X?B[0]:G[0],I-se+1))}else{const X=ee===se?B[0]:0,K=se===te?G[0]:this._bufferService.cols;W.appendChild(this._createSelectionElement(se,X,K));const ve=I-se-1;if(W.appendChild(this._createSelectionElement(se+1,0,this._bufferService.cols,ve)),se!==I){const he=te===I?G[0]:this._bufferService.cols;W.appendChild(this._createSelectionElement(I,0,he))}}this._selectionContainer.appendChild(W)}_createSelectionElement(B,G,ne,ee=1){const te=this._document.createElement("div"),se=G*this.dimensions.css.cell.width;let I=this.dimensions.css.cell.width*(ne-G);return se+I>this.dimensions.css.canvas.width&&(I=this.dimensions.css.canvas.width-se),te.style.height=ee*this.dimensions.css.cell.height+"px",te.style.top=B*this.dimensions.css.cell.height+"px",te.style.left=`${se}px`,te.style.width=`${I}px`,te}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const B of this._rowElements)B.replaceChildren()}renderRows(B,G){const ne=this._bufferService.buffer,ee=ne.ybase+ne.y,te=Math.min(ne.x,this._bufferService.cols-1),se=this._optionsService.rawOptions.cursorBlink,I=this._optionsService.rawOptions.cursorStyle,W=this._optionsService.rawOptions.cursorInactiveStyle;for(let X=B;X<=G;X++){const K=X+ne.ydisp,ve=this._rowElements[X],he=ne.lines.get(K);if(!ve||!he)break;ve.replaceChildren(...this._rowFactory.createRow(he,K,K===ee,I,W,te,se,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${k}${this._terminalClass}`}_handleLinkHover(B){this._setCellUnderline(B.x1,B.x2,B.y1,B.y2,B.cols,!0)}_handleLinkLeave(B){this._setCellUnderline(B.x1,B.x2,B.y1,B.y2,B.cols,!1)}_setCellUnderline(B,G,ne,ee,te,se){ne<0&&(B=0),ee<0&&(G=0);const I=this._bufferService.rows-1;ne=Math.max(Math.min(ne,I),0),ee=Math.max(Math.min(ee,I),0),te=Math.min(te,this._bufferService.cols);const W=this._bufferService.buffer,X=W.ybase+W.y,K=Math.min(W.x,te-1),ve=this._optionsService.rawOptions.cursorBlink,he=this._optionsService.rawOptions.cursorStyle,Ae=this._optionsService.rawOptions.cursorInactiveStyle;for(let me=ne;me<=ee;++me){const ie=me+W.ydisp,$=this._rowElements[me],_e=W.lines.get(ie);if(!$||!_e)break;$.replaceChildren(...this._rowFactory.createRow(_e,ie,ie===X,he,Ae,K,ve,this.dimensions.css.cell.width,this._widthCache,se?me===ne?B:0:-1,se?(me===ee?G:te)-1:-1))}}};a.DomRenderer=P=g([x(7,S.IInstantiationService),x(8,l.ICharSizeService),x(9,S.IOptionsService),x(10,S.IBufferService),x(11,l.ICoreBrowserService),x(12,l.IThemeService)],P)},3787:function(y,a,d){var g=this&&this.__decorate||function(j,A,D,L){var O,F=arguments.length,P=F<3?A:L===null?L=Object.getOwnPropertyDescriptor(A,D):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(j,A,D,L);else for(var B=j.length-1;B>=0;B--)(O=j[B])&&(P=(F<3?O(P):F>3?O(A,D,P):O(A,D))||P);return F>3&&P&&Object.defineProperty(A,D,P),P},x=this&&this.__param||function(j,A){return function(D,L){A(D,L,j)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const h=d(2223),_=d(643),N=d(511),E=d(2585),b=d(8055),l=d(4725),m=d(4269),f=d(6171),p=d(3734);let S=a.DomRendererRowFactory=class{constructor(j,A,D,L,O,F,P){this._document=j,this._characterJoinerService=A,this._optionsService=D,this._coreBrowserService=L,this._coreService=O,this._decorationService=F,this._themeService=P,this._workCell=new N.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(j,A,D){this._selectionStart=j,this._selectionEnd=A,this._columnSelectMode=D}createRow(j,A,D,L,O,F,P,B,G,ne,ee){const te=[],se=this._characterJoinerService.getJoinedCharacters(A),I=this._themeService.colors;let W,X=j.getNoBgTrimmedLength();D&&X<F+1&&(X=F+1);let K=0,ve="",he=0,Ae=0,me=0,ie=!1,$=0,_e=!1,ue=0;const Ie=[],Ue=ne!==-1&&ee!==-1;for(let nt=0;nt<X;nt++){j.loadCell(nt,this._workCell);let et=this._workCell.getWidth();if(et===0)continue;let st=!1,Dt=nt,J=this._workCell;if(se.length>0&&nt===se[0][0]){st=!0;const He=se.shift();J=new m.JoinedCellData(this._workCell,j.translateToString(!0,He[0],He[1]),He[1]-He[0]),Dt=He[1]-1,et=J.getWidth()}const yt=this._isCellInSelection(nt,A),Kt=D&&nt===F,Se=Ue&&nt>=ne&&nt<=ee;let Re=!1;this._decorationService.forEachDecorationAtCell(nt,A,void 0,He=>{Re=!0});let We=J.getChars()||_.WHITESPACE_CELL_CHAR;if(We===" "&&(J.isUnderline()||J.isOverline())&&(We=" "),ue=et*B-G.get(We,J.isBold(),J.isItalic()),W){if(K&&(yt&&_e||!yt&&!_e&&J.bg===he)&&(yt&&_e&&I.selectionForeground||J.fg===Ae)&&J.extended.ext===me&&Se===ie&&ue===$&&!Kt&&!st&&!Re){J.isInvisible()?ve+=_.WHITESPACE_CELL_CHAR:ve+=We,K++;continue}K&&(W.textContent=ve),W=this._document.createElement("span"),K=0,ve=""}else W=this._document.createElement("span");if(he=J.bg,Ae=J.fg,me=J.extended.ext,ie=Se,$=ue,_e=yt,st&&F>=nt&&F<=Dt&&(F=nt),!this._coreService.isCursorHidden&&Kt&&this._coreService.isCursorInitialized){if(Ie.push("xterm-cursor"),this._coreBrowserService.isFocused)P&&Ie.push("xterm-cursor-blink"),Ie.push(L==="bar"?"xterm-cursor-bar":L==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":Ie.push("xterm-cursor-outline");break;case"block":Ie.push("xterm-cursor-block");break;case"bar":Ie.push("xterm-cursor-bar");break;case"underline":Ie.push("xterm-cursor-underline")}}if(J.isBold()&&Ie.push("xterm-bold"),J.isItalic()&&Ie.push("xterm-italic"),J.isDim()&&Ie.push("xterm-dim"),ve=J.isInvisible()?_.WHITESPACE_CELL_CHAR:J.getChars()||_.WHITESPACE_CELL_CHAR,J.isUnderline()&&(Ie.push(`xterm-underline-${J.extended.underlineStyle}`),ve===" "&&(ve=" "),!J.isUnderlineColorDefault()))if(J.isUnderlineColorRGB())W.style.textDecorationColor=`rgb(${p.AttributeData.toColorRGB(J.getUnderlineColor()).join(",")})`;else{let He=J.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&J.isBold()&&He<8&&(He+=8),W.style.textDecorationColor=I.ansi[He].css}J.isOverline()&&(Ie.push("xterm-overline"),ve===" "&&(ve=" ")),J.isStrikethrough()&&Ie.push("xterm-strikethrough"),Se&&(W.style.textDecoration="underline");let re=J.getFgColor(),$e=J.getFgColorMode(),Ke=J.getBgColor(),ge=J.getBgColorMode();const Ze=!!J.isInverse();if(Ze){const He=re;re=Ke,Ke=He;const Ct=$e;$e=ge,ge=Ct}let Ce,Ve,be,Me=!1;switch(this._decorationService.forEachDecorationAtCell(nt,A,void 0,He=>{He.options.layer!=="top"&&Me||(He.backgroundColorRGB&&(ge=50331648,Ke=He.backgroundColorRGB.rgba>>8&16777215,Ce=He.backgroundColorRGB),He.foregroundColorRGB&&($e=50331648,re=He.foregroundColorRGB.rgba>>8&16777215,Ve=He.foregroundColorRGB),Me=He.options.layer==="top")}),!Me&&yt&&(Ce=this._coreBrowserService.isFocused?I.selectionBackgroundOpaque:I.selectionInactiveBackgroundOpaque,Ke=Ce.rgba>>8&16777215,ge=50331648,Me=!0,I.selectionForeground&&($e=50331648,re=I.selectionForeground.rgba>>8&16777215,Ve=I.selectionForeground)),Me&&Ie.push("xterm-decoration-top"),ge){case 16777216:case 33554432:be=I.ansi[Ke],Ie.push(`xterm-bg-${Ke}`);break;case 50331648:be=b.channels.toColor(Ke>>16,Ke>>8&255,255&Ke),this._addStyle(W,`background-color:#${k((Ke>>>0).toString(16),"0",6)}`);break;default:Ze?(be=I.foreground,Ie.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):be=I.background}switch(Ce||J.isDim()&&(Ce=b.color.multiplyOpacity(be,.5)),$e){case 16777216:case 33554432:J.isBold()&&re<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(re+=8),this._applyMinimumContrast(W,be,I.ansi[re],J,Ce,void 0)||Ie.push(`xterm-fg-${re}`);break;case 50331648:const He=b.channels.toColor(re>>16&255,re>>8&255,255&re);this._applyMinimumContrast(W,be,He,J,Ce,Ve)||this._addStyle(W,`color:#${k(re.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(W,be,I.foreground,J,Ce,Ve)||Ze&&Ie.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}Ie.length&&(W.className=Ie.join(" "),Ie.length=0),Kt||st||Re?W.textContent=ve:K++,ue!==this.defaultSpacing&&(W.style.letterSpacing=`${ue}px`),te.push(W),nt=Dt}return W&&K&&(W.textContent=ve),te}_applyMinimumContrast(j,A,D,L,O,F){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,f.treatGlyphAsBackgroundColor)(L.getCode()))return!1;const P=this._getContrastCache(L);let B;if(O||F||(B=P.getColor(A.rgba,D.rgba)),B===void 0){const G=this._optionsService.rawOptions.minimumContrastRatio/(L.isDim()?2:1);B=b.color.ensureContrastRatio(O||A,F||D,G),P.setColor((O||A).rgba,(F||D).rgba,B??null)}return!!B&&(this._addStyle(j,`color:${B.css}`),!0)}_getContrastCache(j){return j.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(j,A){j.setAttribute("style",`${j.getAttribute("style")||""}${A};`)}_isCellInSelection(j,A){const D=this._selectionStart,L=this._selectionEnd;return!(!D||!L)&&(this._columnSelectMode?D[0]<=L[0]?j>=D[0]&&A>=D[1]&&j<L[0]&&A<=L[1]:j<D[0]&&A>=D[1]&&j>=L[0]&&A<=L[1]:A>D[1]&&A<L[1]||D[1]===L[1]&&A===D[1]&&j>=D[0]&&j<L[0]||D[1]<L[1]&&A===L[1]&&j<L[0]||D[1]<L[1]&&A===D[1]&&j>=D[0])}};function k(j,A,D){for(;j.length<D;)j=A+j;return j}a.DomRendererRowFactory=S=g([x(1,l.ICharacterJoinerService),x(2,E.IOptionsService),x(3,l.ICoreBrowserService),x(4,E.ICoreService),x(5,E.IDecorationService),x(6,l.IThemeService)],S)},2550:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(d,g){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=d.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 x=d.createElement("span");x.classList.add("xterm-char-measure-element");const h=d.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const _=d.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontStyle="italic";const N=d.createElement("span");N.classList.add("xterm-char-measure-element"),N.style.fontWeight="bold",N.style.fontStyle="italic",this._measureElements=[x,h,_,N],this._container.appendChild(x),this._container.appendChild(h),this._container.appendChild(_),this._container.appendChild(N),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(d,g,x,h){d===this._font&&g===this._fontSize&&x===this._weight&&h===this._weightBold||(this._font=d,this._fontSize=g,this._weight=x,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${x}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${x}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(d,g,x){let h=0;if(!g&&!x&&d.length===1&&(h=d.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const E=this._measure(d,0);return E>0&&(this._flat[h]=E),E}let _=d;g&&(_+="B"),x&&(_+="I");let N=this._holey.get(_);if(N===void 0){let E=0;g&&(E|=1),x&&(E|=2),N=this._measure(d,E),N>0&&this._holey.set(_,N)}return N}_measure(d,g){const x=this._measureElements[g];return x.textContent=d.repeat(32),x.offsetWidth/32}}},2223:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const g=d(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=g.isFirefox||g.isLegacyEdge?"bottom":"ideographic"},6171:(y,a)=>{function d(x){return 57508<=x&&x<=57558}function g(x){return x>=128512&&x<=128591||x>=127744&&x<=128511||x>=128640&&x<=128767||x>=9728&&x<=9983||x>=9984&&x<=10175||x>=65024&&x<=65039||x>=129280&&x<=129535||x>=127462&&x<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(x){if(!x)throw new Error("value must not be falsy");return x},a.isPowerlineGlyph=d,a.isRestrictedPowerlineGlyph=function(x){return 57520<=x&&x<=57527},a.isEmoji=g,a.allowRescaling=function(x,h,_,N){return h===1&&_>Math.ceil(1.5*N)&&x!==void 0&&x>255&&!g(x)&&!d(x)&&!function(E){return 57344<=E&&E<=63743}(x)},a.treatGlyphAsBackgroundColor=function(x){return d(x)||function(h){return 9472<=h&&h<=9631}(x)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(x,h,_=0){return(x-(2*Math.round(h)-_))%(2*Math.round(h))}},6052:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class d{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(x,h,_,N=!1){if(this.selectionStart=h,this.selectionEnd=_,!h||!_||h[0]===_[0]&&h[1]===_[1])return void this.clear();const E=x.buffers.active.ydisp,b=h[1]-E,l=_[1]-E,m=Math.max(b,0),f=Math.min(l,x.rows-1);m>=x.rows||f<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=N,this.viewportStartRow=b,this.viewportEndRow=l,this.viewportCappedStartRow=m,this.viewportCappedEndRow=f,this.startCol=h[0],this.endCol=_[0])}isCellSelected(x,h,_){return!!this.hasSelection&&(_-=x.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&_>=this.viewportCappedStartRow&&h<this.endCol&&_<=this.viewportCappedEndRow:h<this.startCol&&_>=this.viewportCappedStartRow&&h>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportStartRow&&h>=this.startCol)}}a.createSelectionRenderModel=function(){return new d}},456:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(d){this._bufferService=d,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 d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?d%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)-1]:[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[d,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[Math.max(d,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const d=this.selectionStart,g=this.selectionEnd;return!(!d||!g)&&(d[1]>g[1]||d[1]===g[1]&&d[0]>g[0])}handleTrim(d){return this.selectionStart&&(this.selectionStart[1]-=d),this.selectionEnd&&(this.selectionEnd[1]-=d),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(y,a,d){var g=this&&this.__decorate||function(f,p,S,k){var j,A=arguments.length,D=A<3?p:k===null?k=Object.getOwnPropertyDescriptor(p,S):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,p,S,k);else for(var L=f.length-1;L>=0;L--)(j=f[L])&&(D=(A<3?j(D):A>3?j(p,S,D):j(p,S))||D);return A>3&&D&&Object.defineProperty(p,S,D),D},x=this&&this.__param||function(f,p){return function(S,k){p(S,k,f)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const h=d(2585),_=d(8460),N=d(844);let E=a.CharSizeService=class extends N.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(f,p,S){super(),this._optionsService=S,this.width=0,this.height=0,this._onCharSizeChange=this.register(new _.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new m(this._optionsService))}catch{this._measureStrategy=this.register(new l(f,p,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())}};a.CharSizeService=E=g([x(2,h.IOptionsService)],E);class b extends N.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(p,S){p!==void 0&&p>0&&S!==void 0&&S>0&&(this._result.width=p,this._result.height=S)}}class l extends b{constructor(p,S,k){super(),this._document=p,this._parentElement=S,this._optionsService=k,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 b{constructor(p){super(),this._optionsService=p,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const S=this._ctx.measureText("W");if(!("width"in S&&"fontBoundingBoxAscent"in S&&"fontBoundingBoxDescent"in S))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const p=this._ctx.measureText("W");return this._validateAndSet(p.width,p.fontBoundingBoxAscent+p.fontBoundingBoxDescent),this._result}}},4269:function(y,a,d){var g=this&&this.__decorate||function(m,f,p,S){var k,j=arguments.length,A=j<3?f:S===null?S=Object.getOwnPropertyDescriptor(f,p):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(m,f,p,S);else for(var D=m.length-1;D>=0;D--)(k=m[D])&&(A=(j<3?k(A):j>3?k(f,p,A):k(f,p))||A);return j>3&&A&&Object.defineProperty(f,p,A),A},x=this&&this.__param||function(m,f){return function(p,S){f(p,S,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const h=d(3734),_=d(643),N=d(511),E=d(2585);class b extends h.AttributeData{constructor(f,p,S){super(),this.content=0,this.combinedData="",this.fg=f.fg,this.bg=f.bg,this.combinedData=p,this._width=S}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()]}}a.JoinedCellData=b;let l=a.CharacterJoinerService=class IS{constructor(f){this._bufferService=f,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new N.CellData}register(f){const p={id:this._nextCharacterJoinerId++,handler:f};return this._characterJoiners.push(p),p.id}deregister(f){for(let p=0;p<this._characterJoiners.length;p++)if(this._characterJoiners[p].id===f)return this._characterJoiners.splice(p,1),!0;return!1}getJoinedCharacters(f){if(this._characterJoiners.length===0)return[];const p=this._bufferService.buffer.lines.get(f);if(!p||p.length===0)return[];const S=[],k=p.translateToString(!0);let j=0,A=0,D=0,L=p.getFg(0),O=p.getBg(0);for(let F=0;F<p.getTrimmedLength();F++)if(p.loadCell(F,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==L||this._workCell.bg!==O){if(F-j>1){const P=this._getJoinedRanges(k,D,A,p,j);for(let B=0;B<P.length;B++)S.push(P[B])}j=F,D=A,L=this._workCell.fg,O=this._workCell.bg}A+=this._workCell.getChars().length||_.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-j>1){const F=this._getJoinedRanges(k,D,A,p,j);for(let P=0;P<F.length;P++)S.push(F[P])}return S}_getJoinedRanges(f,p,S,k,j){const A=f.substring(p,S);let D=[];try{D=this._characterJoiners[0].handler(A)}catch(L){console.error(L)}for(let L=1;L<this._characterJoiners.length;L++)try{const O=this._characterJoiners[L].handler(A);for(let F=0;F<O.length;F++)IS._mergeRanges(D,O[F])}catch(O){console.error(O)}return this._stringRangesToCellRanges(D,k,j),D}_stringRangesToCellRanges(f,p,S){let k=0,j=!1,A=0,D=f[k];if(D){for(let L=S;L<this._bufferService.cols;L++){const O=p.getWidth(L),F=p.getString(L).length||_.WHITESPACE_CELL_CHAR.length;if(O!==0){if(!j&&D[0]<=A&&(D[0]=L,j=!0),D[1]<=A){if(D[1]=L,D=f[++k],!D)break;D[0]<=A?(D[0]=L,j=!0):j=!1}A+=F}}D&&(D[1]=this._bufferService.cols)}}static _mergeRanges(f,p){let S=!1;for(let k=0;k<f.length;k++){const j=f[k];if(S){if(p[1]<=j[0])return f[k-1][1]=p[1],f;if(p[1]<=j[1])return f[k-1][1]=Math.max(p[1],j[1]),f.splice(k,1),f;f.splice(k,1),k--}else{if(p[1]<=j[0])return f.splice(k,0,p),f;if(p[1]<=j[1])return j[0]=Math.min(p[0],j[0]),f;p[0]<j[1]&&(j[0]=Math.min(p[0],j[0]),S=!0)}}return S?f[f.length-1][1]=p[1]:f.push(p),f}};a.CharacterJoinerService=l=g([x(0,E.IBufferService)],l)},5114:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const g=d(844),x=d(8460),h=d(3656);class _ extends g.Disposable{constructor(b,l,m){super(),this._textarea=b,this._window=l,this.mainDocument=m,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new N(this._window),this._onDprChange=this.register(new x.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new x.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(f=>this._screenDprMonitor.setWindow(f))),this.register((0,x.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(b){this._window!==b&&(this._window=b,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}}a.CoreBrowserService=_;class N extends g.Disposable{constructor(b){super(),this._parentWindow=b,this._windowResizeListener=this.register(new g.MutableDisposable),this._onDprChange=this.register(new x.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(b){this._parentWindow=b,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var b;this._outerListener&&((b=this._resolutionMediaMatchList)==null||b.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:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const g=d(844);class x extends g.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,g.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(_){return this.linkProviders.push(_),{dispose:()=>{const N=this.linkProviders.indexOf(_);N!==-1&&this.linkProviders.splice(N,1)}}}}a.LinkProviderService=x},8934:function(y,a,d){var g=this&&this.__decorate||function(E,b,l,m){var f,p=arguments.length,S=p<3?b:m===null?m=Object.getOwnPropertyDescriptor(b,l):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(E,b,l,m);else for(var k=E.length-1;k>=0;k--)(f=E[k])&&(S=(p<3?f(S):p>3?f(b,l,S):f(b,l))||S);return p>3&&S&&Object.defineProperty(b,l,S),S},x=this&&this.__param||function(E,b){return function(l,m){b(l,m,E)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const h=d(4725),_=d(9806);let N=a.MouseService=class{constructor(E,b){this._renderService=E,this._charSizeService=b}getCoords(E,b,l,m,f){return(0,_.getCoords)(window,E,b,l,m,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,f)}getMouseReportCoords(E,b){const l=(0,_.getCoordsRelativeToElement)(window,E,b);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])}}};a.MouseService=N=g([x(0,h.IRenderService),x(1,h.ICharSizeService)],N)},3230:function(y,a,d){var g=this&&this.__decorate||function(f,p,S,k){var j,A=arguments.length,D=A<3?p:k===null?k=Object.getOwnPropertyDescriptor(p,S):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,p,S,k);else for(var L=f.length-1;L>=0;L--)(j=f[L])&&(D=(A<3?j(D):A>3?j(p,S,D):j(p,S))||D);return A>3&&D&&Object.defineProperty(p,S,D),D},x=this&&this.__param||function(f,p){return function(S,k){p(S,k,f)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const h=d(6193),_=d(4725),N=d(8460),E=d(844),b=d(7226),l=d(2585);let m=a.RenderService=class extends E.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(f,p,S,k,j,A,D,L){super(),this._rowCount=f,this._charSizeService=k,this._renderer=this.register(new E.MutableDisposable),this._pausedResizeTask=new b.DebouncedIdleTask,this._observerDisposable=this.register(new E.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new N.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new N.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new N.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new N.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer((O,F)=>this._renderRows(O,F),D),this.register(this._renderDebouncer),this.register(D.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(A.onResize(()=>this._fullRefresh())),this.register(A.buffers.onBufferActivate(()=>{var O;return(O=this._renderer.value)==null?void 0:O.clear()})),this.register(S.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(j.onDecorationRegistered(()=>this._fullRefresh())),this.register(j.onDecorationRemoved(()=>this._fullRefresh())),this.register(S.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(A.cols,A.rows),this._fullRefresh()})),this.register(S.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(A.buffer.y,A.buffer.y,!0))),this.register(L.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(D.window,p),this.register(D.onWindowChange(O=>this._registerIntersectionObserver(O,p)))}_registerIntersectionObserver(f,p){if("IntersectionObserver"in f){const S=new f.IntersectionObserver(k=>this._handleIntersectionChange(k[k.length-1]),{threshold:0});S.observe(p),this._observerDisposable.value=(0,E.toDisposable)(()=>S.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,p,S=!1){this._isPaused?this._needsFullRefresh=!0:(S||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(f,p,this._rowCount))}_renderRows(f,p){this._renderer.value&&(f=Math.min(f,this._rowCount-1),p=Math.min(p,this._rowCount-1),this._renderer.value.renderRows(f,p),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:p}),this._onRender.fire({start:f,end:p}),this._isNextRenderRedrawOnly=!0)}resize(f,p){this._rowCount=p,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(p=>this.refreshRows(p.start,p.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,p;this._renderer.value&&((p=(f=this._renderer.value).clearTextureAtlas)==null||p.call(f),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(f,p){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var S;return(S=this._renderer.value)==null?void 0:S.handleResize(f,p)}):this._renderer.value.handleResize(f,p),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,p,S){var k;this._selectionState.start=f,this._selectionState.end=p,this._selectionState.columnSelectMode=S,(k=this._renderer.value)==null||k.handleSelectionChanged(f,p,S)}handleCursorMove(){var f;(f=this._renderer.value)==null||f.handleCursorMove()}clear(){var f;(f=this._renderer.value)==null||f.clear()}};a.RenderService=m=g([x(2,l.IOptionsService),x(3,_.ICharSizeService),x(4,l.IDecorationService),x(5,l.IBufferService),x(6,_.ICoreBrowserService),x(7,_.IThemeService)],m)},9312:function(y,a,d){var g=this&&this.__decorate||function(D,L,O,F){var P,B=arguments.length,G=B<3?L:F===null?F=Object.getOwnPropertyDescriptor(L,O):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(D,L,O,F);else for(var ne=D.length-1;ne>=0;ne--)(P=D[ne])&&(G=(B<3?P(G):B>3?P(L,O,G):P(L,O))||G);return B>3&&G&&Object.defineProperty(L,O,G),G},x=this&&this.__param||function(D,L){return function(O,F){L(O,F,D)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const h=d(9806),_=d(9504),N=d(456),E=d(4725),b=d(8460),l=d(844),m=d(6114),f=d(4841),p=d(511),S=d(2585),k=" ",j=new RegExp(k,"g");let A=a.SelectionService=class extends l.Disposable{constructor(D,L,O,F,P,B,G,ne,ee){super(),this._element=D,this._screenElement=L,this._linkifier=O,this._bufferService=F,this._coreService=P,this._mouseService=B,this._optionsService=G,this._renderService=ne,this._coreBrowserService=ee,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new p.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new b.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new b.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new b.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=te=>this._handleMouseMove(te),this._mouseUpListener=te=>this._handleMouseUp(te),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(te=>this._handleTrim(te)),this.register(this._bufferService.buffers.onBufferActivate(te=>this._handleBufferActivate(te))),this.enable(),this._model=new N.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,L=this._model.finalSelectionEnd;return!(!D||!L||D[0]===L[0]&&D[1]===L[1])}get selectionText(){const D=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;if(!D||!L)return"";const O=this._bufferService.buffer,F=[];if(this._activeSelectionMode===3){if(D[0]===L[0])return"";const P=D[0]<L[0]?D[0]:L[0],B=D[0]<L[0]?L[0]:D[0];for(let G=D[1];G<=L[1];G++){const ne=O.translateBufferLineToString(G,!0,P,B);F.push(ne)}}else{const P=D[1]===L[1]?L[0]:void 0;F.push(O.translateBufferLineToString(D[1],!0,D[0],P));for(let B=D[1]+1;B<=L[1]-1;B++){const G=O.lines.get(B),ne=O.translateBufferLineToString(B,!0);G!=null&&G.isWrapped?F[F.length-1]+=ne:F.push(ne)}if(D[1]!==L[1]){const B=O.lines.get(L[1]),G=O.translateBufferLineToString(L[1],!0,0,L[0]);B&&B.isWrapped?F[F.length-1]+=G:F.push(G)}}return F.map(P=>P.replace(j," ")).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 L=this._getMouseBufferCoords(D),O=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!!(O&&F&&L)&&this._areCoordsInSelection(L,O,F)}isCellInSelection(D,L){const O=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!(!O||!F)&&this._areCoordsInSelection([D,L],O,F)}_areCoordsInSelection(D,L,O){return D[1]>L[1]&&D[1]<O[1]||L[1]===O[1]&&D[1]===L[1]&&D[0]>=L[0]&&D[0]<O[0]||L[1]<O[1]&&D[1]===O[1]&&D[0]<O[0]||L[1]<O[1]&&D[1]===L[1]&&D[0]>=L[0]}_selectWordAtCursor(D,L){var P,B;const O=(B=(P=this._linkifier.currentLink)==null?void 0:P.link)==null?void 0:B.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,f.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const F=this._getMouseBufferCoords(D);return!!F&&(this._selectWordAt(F,L),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(D,L){this._model.clearSelection(),D=Math.max(D,0),L=Math.min(L,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,D],this._model.selectionEnd=[this._bufferService.cols,L],this.refresh(),this._onSelectionChange.fire()}_handleTrim(D){this._model.handleTrim(D)&&this.refresh()}_getMouseBufferCoords(D){const L=this._mouseService.getCoords(D,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(L)return L[0]--,L[1]--,L[1]+=this._bufferService.buffer.ydisp,L}_getMouseEventScrollAmount(D){let L=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,D,this._screenElement)[1];const O=this._renderService.dimensions.css.canvas.height;return L>=0&&L<=O?0:(L>O&&(L-=O),L=Math.min(Math.max(L,-50),50),L/=50,L/Math.abs(L)+Math.round(14*L))}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 L=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);L&&L.length!==this._model.selectionStart[0]&&L.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(D){this._selectWordAtCursor(D,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(D){const L=this._getMouseBufferCoords(D);L&&(this._activeSelectionMode=2,this._selectLineAt(L[1]))}shouldColumnSelect(D){return D.altKey&&!(m.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(D){if(D.stopImmediatePropagation(),!this._model.selectionStart)return;const L=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 O=this._bufferService.buffer;if(this._model.selectionEnd[1]<O.lines.length){const F=O.lines.get(this._model.selectionEnd[1]);F&&F.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}L&&L[0]===this._model.selectionEnd[0]&&L[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 L=D.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&L<500&&D.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const O=this._mouseService.getCoords(D,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const F=(0,_.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(F,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const D=this._model.finalSelectionStart,L=this._model.finalSelectionEnd,O=!(!D||!L||D[0]===L[0]&&D[1]===L[1]);O?D&&L&&(this._oldSelectionStart&&this._oldSelectionEnd&&D[0]===this._oldSelectionStart[0]&&D[1]===this._oldSelectionStart[1]&&L[0]===this._oldSelectionEnd[0]&&L[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(D,L,O)):this._oldHasSelection&&this._fireOnSelectionChange(D,L,O)}_fireOnSelectionChange(D,L,O){this._oldSelectionStart=D,this._oldSelectionEnd=L,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(D){this.clearSelection(),this._trimListener.dispose(),this._trimListener=D.activeBuffer.lines.onTrim(L=>this._handleTrim(L))}_convertViewportColToCharacterIndex(D,L){let O=L;for(let F=0;L>=F;F++){const P=D.loadCell(F,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:P>1&&L!==F&&(O+=P-1)}return O}setSelection(D,L,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[D,L],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(D){this._isClickInSelection(D)||(this._selectWordAtCursor(D,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(D,L,O=!0,F=!0){if(D[0]>=this._bufferService.cols)return;const P=this._bufferService.buffer,B=P.lines.get(D[1]);if(!B)return;const G=P.translateBufferLineToString(D[1],!1);let ne=this._convertViewportColToCharacterIndex(B,D[0]),ee=ne;const te=D[0]-ne;let se=0,I=0,W=0,X=0;if(G.charAt(ne)===" "){for(;ne>0&&G.charAt(ne-1)===" ";)ne--;for(;ee<G.length&&G.charAt(ee+1)===" ";)ee++}else{let he=D[0],Ae=D[0];B.getWidth(he)===0&&(se++,he--),B.getWidth(Ae)===2&&(I++,Ae++);const me=B.getString(Ae).length;for(me>1&&(X+=me-1,ee+=me-1);he>0&&ne>0&&!this._isCharWordSeparator(B.loadCell(he-1,this._workCell));){B.loadCell(he-1,this._workCell);const ie=this._workCell.getChars().length;this._workCell.getWidth()===0?(se++,he--):ie>1&&(W+=ie-1,ne-=ie-1),ne--,he--}for(;Ae<B.length&&ee+1<G.length&&!this._isCharWordSeparator(B.loadCell(Ae+1,this._workCell));){B.loadCell(Ae+1,this._workCell);const ie=this._workCell.getChars().length;this._workCell.getWidth()===2?(I++,Ae++):ie>1&&(X+=ie-1,ee+=ie-1),ee++,Ae++}}ee++;let K=ne+te-se+W,ve=Math.min(this._bufferService.cols,ee-ne+se+I-W-X);if(L||G.slice(ne,ee).trim()!==""){if(O&&K===0&&B.getCodePoint(0)!==32){const he=P.lines.get(D[1]-1);if(he&&B.isWrapped&&he.getCodePoint(this._bufferService.cols-1)!==32){const Ae=this._getWordAt([this._bufferService.cols-1,D[1]-1],!1,!0,!1);if(Ae){const me=this._bufferService.cols-Ae.start;K-=me,ve+=me}}}if(F&&K+ve===this._bufferService.cols&&B.getCodePoint(this._bufferService.cols-1)!==32){const he=P.lines.get(D[1]+1);if(he!=null&&he.isWrapped&&he.getCodePoint(0)!==32){const Ae=this._getWordAt([0,D[1]+1],!1,!1,!0);Ae&&(ve+=Ae.length)}}return{start:K,length:ve}}}_selectWordAt(D,L){const O=this._getWordAt(D,L);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,D[1]--;this._model.selectionStart=[O.start,D[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(D){const L=this._getWordAt(D,!0);if(L){let O=D[1];for(;L.start<0;)L.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;L.start+L.length>this._bufferService.cols;)L.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?L.start:L.start+L.length,O]}}_isCharWordSeparator(D){return D.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(D.getChars())>=0}_selectLineAt(D){const L=this._bufferService.buffer.getWrappedRangeForLine(D),O={start:{x:0,y:L.first},end:{x:this._bufferService.cols-1,y:L.last}};this._model.selectionStart=[0,L.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,f.getRangeLength)(O,this._bufferService.cols)}};a.SelectionService=A=g([x(3,S.IBufferService),x(4,S.ICoreService),x(5,E.IMouseService),x(6,S.IOptionsService),x(7,E.IRenderService),x(8,E.ICoreBrowserService)],A)},4725:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const g=d(8343);a.ICharSizeService=(0,g.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,g.createDecorator)("CoreBrowserService"),a.IMouseService=(0,g.createDecorator)("MouseService"),a.IRenderService=(0,g.createDecorator)("RenderService"),a.ISelectionService=(0,g.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,g.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,g.createDecorator)("ThemeService"),a.ILinkProviderService=(0,g.createDecorator)("LinkProviderService")},6731:function(y,a,d){var g=this&&this.__decorate||function(A,D,L,O){var F,P=arguments.length,B=P<3?D:O===null?O=Object.getOwnPropertyDescriptor(D,L):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(A,D,L,O);else for(var G=A.length-1;G>=0;G--)(F=A[G])&&(B=(P<3?F(B):P>3?F(D,L,B):F(D,L))||B);return P>3&&B&&Object.defineProperty(D,L,B),B},x=this&&this.__param||function(A,D){return function(L,O){D(L,O,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const h=d(7239),_=d(8055),N=d(8460),E=d(844),b=d(2585),l=_.css.toColor("#ffffff"),m=_.css.toColor("#000000"),f=_.css.toColor("#ffffff"),p=_.css.toColor("#000000"),S={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const A=[_.css.toColor("#2e3436"),_.css.toColor("#cc0000"),_.css.toColor("#4e9a06"),_.css.toColor("#c4a000"),_.css.toColor("#3465a4"),_.css.toColor("#75507b"),_.css.toColor("#06989a"),_.css.toColor("#d3d7cf"),_.css.toColor("#555753"),_.css.toColor("#ef2929"),_.css.toColor("#8ae234"),_.css.toColor("#fce94f"),_.css.toColor("#729fcf"),_.css.toColor("#ad7fa8"),_.css.toColor("#34e2e2"),_.css.toColor("#eeeeec")],D=[0,95,135,175,215,255];for(let L=0;L<216;L++){const O=D[L/36%6|0],F=D[L/6%6|0],P=D[L%6];A.push({css:_.channels.toCss(O,F,P),rgba:_.channels.toRgba(O,F,P)})}for(let L=0;L<24;L++){const O=8+10*L;A.push({css:_.channels.toCss(O,O,O),rgba:_.channels.toRgba(O,O,O)})}return A})());let k=a.ThemeService=class extends E.Disposable{get colors(){return this._colors}constructor(A){super(),this._optionsService=A,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new N.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:l,background:m,cursor:f,cursorAccent:p,selectionForeground:void 0,selectionBackgroundTransparent:S,selectionBackgroundOpaque:_.color.blend(m,S),selectionInactiveBackgroundTransparent:S,selectionInactiveBackgroundOpaque:_.color.blend(m,S),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(A={}){const D=this._colors;if(D.foreground=j(A.foreground,l),D.background=j(A.background,m),D.cursor=j(A.cursor,f),D.cursorAccent=j(A.cursorAccent,p),D.selectionBackgroundTransparent=j(A.selectionBackground,S),D.selectionBackgroundOpaque=_.color.blend(D.background,D.selectionBackgroundTransparent),D.selectionInactiveBackgroundTransparent=j(A.selectionInactiveBackground,D.selectionBackgroundTransparent),D.selectionInactiveBackgroundOpaque=_.color.blend(D.background,D.selectionInactiveBackgroundTransparent),D.selectionForeground=A.selectionForeground?j(A.selectionForeground,_.NULL_COLOR):void 0,D.selectionForeground===_.NULL_COLOR&&(D.selectionForeground=void 0),_.color.isOpaque(D.selectionBackgroundTransparent)&&(D.selectionBackgroundTransparent=_.color.opacity(D.selectionBackgroundTransparent,.3)),_.color.isOpaque(D.selectionInactiveBackgroundTransparent)&&(D.selectionInactiveBackgroundTransparent=_.color.opacity(D.selectionInactiveBackgroundTransparent,.3)),D.ansi=a.DEFAULT_ANSI_COLORS.slice(),D.ansi[0]=j(A.black,a.DEFAULT_ANSI_COLORS[0]),D.ansi[1]=j(A.red,a.DEFAULT_ANSI_COLORS[1]),D.ansi[2]=j(A.green,a.DEFAULT_ANSI_COLORS[2]),D.ansi[3]=j(A.yellow,a.DEFAULT_ANSI_COLORS[3]),D.ansi[4]=j(A.blue,a.DEFAULT_ANSI_COLORS[4]),D.ansi[5]=j(A.magenta,a.DEFAULT_ANSI_COLORS[5]),D.ansi[6]=j(A.cyan,a.DEFAULT_ANSI_COLORS[6]),D.ansi[7]=j(A.white,a.DEFAULT_ANSI_COLORS[7]),D.ansi[8]=j(A.brightBlack,a.DEFAULT_ANSI_COLORS[8]),D.ansi[9]=j(A.brightRed,a.DEFAULT_ANSI_COLORS[9]),D.ansi[10]=j(A.brightGreen,a.DEFAULT_ANSI_COLORS[10]),D.ansi[11]=j(A.brightYellow,a.DEFAULT_ANSI_COLORS[11]),D.ansi[12]=j(A.brightBlue,a.DEFAULT_ANSI_COLORS[12]),D.ansi[13]=j(A.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),D.ansi[14]=j(A.brightCyan,a.DEFAULT_ANSI_COLORS[14]),D.ansi[15]=j(A.brightWhite,a.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const L=Math.min(D.ansi.length-16,A.extendedAnsi.length);for(let O=0;O<L;O++)D.ansi[O+16]=j(A.extendedAnsi[O],a.DEFAULT_ANSI_COLORS[O+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 j(A,D){if(A!==void 0)try{return _.css.toColor(A)}catch{}return D}a.ThemeService=k=g([x(0,b.IOptionsService)],k)},6349:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const g=d(8460),x=d(844);class h extends x.Disposable{constructor(N){super(),this._maxLength=N,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(N){if(this._maxLength===N)return;const E=new Array(N);for(let b=0;b<Math.min(N,this.length);b++)E[b]=this._array[this._getCyclicIndex(b)];this._array=E,this._maxLength=N,this._startIndex=0}get length(){return this._length}set length(N){if(N>this._length)for(let E=this._length;E<N;E++)this._array[E]=void 0;this._length=N}get(N){return this._array[this._getCyclicIndex(N)]}set(N,E){this._array[this._getCyclicIndex(N)]=E}push(N){this._array[this._getCyclicIndex(this._length)]=N,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(N,E,...b){if(E){for(let l=N;l<this._length-E;l++)this._array[this._getCyclicIndex(l)]=this._array[this._getCyclicIndex(l+E)];this._length-=E,this.onDeleteEmitter.fire({index:N,amount:E})}for(let l=this._length-1;l>=N;l--)this._array[this._getCyclicIndex(l+b.length)]=this._array[this._getCyclicIndex(l)];for(let l=0;l<b.length;l++)this._array[this._getCyclicIndex(N+l)]=b[l];if(b.length&&this.onInsertEmitter.fire({index:N,amount:b.length}),this._length+b.length>this._maxLength){const l=this._length+b.length-this._maxLength;this._startIndex+=l,this._length=this._maxLength,this.onTrimEmitter.fire(l)}else this._length+=b.length}trimStart(N){N>this._length&&(N=this._length),this._startIndex+=N,this._length-=N,this.onTrimEmitter.fire(N)}shiftElements(N,E,b){if(!(E<=0)){if(N<0||N>=this._length)throw new Error("start argument out of range");if(N+b<0)throw new Error("Cannot shift elements in list beyond index 0");if(b>0){for(let m=E-1;m>=0;m--)this.set(N+m+b,this.get(N+m));const l=N+E+b-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<E;l++)this.set(N+l+b,this.get(N+l))}}_getCyclicIndex(N){return(this._startIndex+N)%this._maxLength}}a.CircularList=h},1439:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function d(g,x=5){if(typeof g!="object")return g;const h=Array.isArray(g)?[]:{};for(const _ in g)h[_]=x<=1?g[_]:g[_]&&d(g[_],x-1);return h}},8055:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let d=0,g=0,x=0,h=0;var _,N,E,b,l;function m(p){const S=p.toString(16);return S.length<2?"0"+S:S}function f(p,S){return p<S?(S+.05)/(p+.05):(p+.05)/(S+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},function(p){p.toCss=function(S,k,j,A){return A!==void 0?`#${m(S)}${m(k)}${m(j)}${m(A)}`:`#${m(S)}${m(k)}${m(j)}`},p.toRgba=function(S,k,j,A=255){return(S<<24|k<<16|j<<8|A)>>>0},p.toColor=function(S,k,j,A){return{css:p.toCss(S,k,j,A),rgba:p.toRgba(S,k,j,A)}}}(_||(a.channels=_={})),function(p){function S(k,j){return h=Math.round(255*j),[d,g,x]=l.toChannels(k.rgba),{css:_.toCss(d,g,x,h),rgba:_.toRgba(d,g,x,h)}}p.blend=function(k,j){if(h=(255&j.rgba)/255,h===1)return{css:j.css,rgba:j.rgba};const A=j.rgba>>24&255,D=j.rgba>>16&255,L=j.rgba>>8&255,O=k.rgba>>24&255,F=k.rgba>>16&255,P=k.rgba>>8&255;return d=O+Math.round((A-O)*h),g=F+Math.round((D-F)*h),x=P+Math.round((L-P)*h),{css:_.toCss(d,g,x),rgba:_.toRgba(d,g,x)}},p.isOpaque=function(k){return(255&k.rgba)==255},p.ensureContrastRatio=function(k,j,A){const D=l.ensureContrastRatio(k.rgba,j.rgba,A);if(D)return _.toColor(D>>24&255,D>>16&255,D>>8&255)},p.opaque=function(k){const j=(255|k.rgba)>>>0;return[d,g,x]=l.toChannels(j),{css:_.toCss(d,g,x),rgba:j}},p.opacity=S,p.multiplyOpacity=function(k,j){return h=255&k.rgba,S(k,h*j/255)},p.toColorRGB=function(k){return[k.rgba>>24&255,k.rgba>>16&255,k.rgba>>8&255]}}(N||(a.color=N={})),function(p){let S,k;try{const j=document.createElement("canvas");j.width=1,j.height=1;const A=j.getContext("2d",{willReadFrequently:!0});A&&(S=A,S.globalCompositeOperation="copy",k=S.createLinearGradient(0,0,1,1))}catch{}p.toColor=function(j){if(j.match(/#[\da-f]{3,8}/i))switch(j.length){case 4:return d=parseInt(j.slice(1,2).repeat(2),16),g=parseInt(j.slice(2,3).repeat(2),16),x=parseInt(j.slice(3,4).repeat(2),16),_.toColor(d,g,x);case 5:return d=parseInt(j.slice(1,2).repeat(2),16),g=parseInt(j.slice(2,3).repeat(2),16),x=parseInt(j.slice(3,4).repeat(2),16),h=parseInt(j.slice(4,5).repeat(2),16),_.toColor(d,g,x,h);case 7:return{css:j,rgba:(parseInt(j.slice(1),16)<<8|255)>>>0};case 9:return{css:j,rgba:parseInt(j.slice(1),16)>>>0}}const A=j.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 d=parseInt(A[1]),g=parseInt(A[2]),x=parseInt(A[3]),h=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),_.toColor(d,g,x,h);if(!S||!k)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=k,S.fillStyle=j,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[d,g,x,h]=S.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(d,g,x,h),css:j}}}(E||(a.css=E={})),function(p){function S(k,j,A){const D=k/255,L=j/255,O=A/255;return .2126*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}p.relativeLuminance=function(k){return S(k>>16&255,k>>8&255,255&k)},p.relativeLuminance2=S}(b||(a.rgb=b={})),function(p){function S(j,A,D){const L=j>>24&255,O=j>>16&255,F=j>>8&255;let P=A>>24&255,B=A>>16&255,G=A>>8&255,ne=f(b.relativeLuminance2(P,B,G),b.relativeLuminance2(L,O,F));for(;ne<D&&(P>0||B>0||G>0);)P-=Math.max(0,Math.ceil(.1*P)),B-=Math.max(0,Math.ceil(.1*B)),G-=Math.max(0,Math.ceil(.1*G)),ne=f(b.relativeLuminance2(P,B,G),b.relativeLuminance2(L,O,F));return(P<<24|B<<16|G<<8|255)>>>0}function k(j,A,D){const L=j>>24&255,O=j>>16&255,F=j>>8&255;let P=A>>24&255,B=A>>16&255,G=A>>8&255,ne=f(b.relativeLuminance2(P,B,G),b.relativeLuminance2(L,O,F));for(;ne<D&&(P<255||B<255||G<255);)P=Math.min(255,P+Math.ceil(.1*(255-P))),B=Math.min(255,B+Math.ceil(.1*(255-B))),G=Math.min(255,G+Math.ceil(.1*(255-G))),ne=f(b.relativeLuminance2(P,B,G),b.relativeLuminance2(L,O,F));return(P<<24|B<<16|G<<8|255)>>>0}p.blend=function(j,A){if(h=(255&A)/255,h===1)return A;const D=A>>24&255,L=A>>16&255,O=A>>8&255,F=j>>24&255,P=j>>16&255,B=j>>8&255;return d=F+Math.round((D-F)*h),g=P+Math.round((L-P)*h),x=B+Math.round((O-B)*h),_.toRgba(d,g,x)},p.ensureContrastRatio=function(j,A,D){const L=b.relativeLuminance(j>>8),O=b.relativeLuminance(A>>8);if(f(L,O)<D){if(O<L){const B=S(j,A,D),G=f(L,b.relativeLuminance(B>>8));if(G<D){const ne=k(j,A,D);return G>f(L,b.relativeLuminance(ne>>8))?B:ne}return B}const F=k(j,A,D),P=f(L,b.relativeLuminance(F>>8));if(P<D){const B=S(j,A,D);return P>f(L,b.relativeLuminance(B>>8))?F:B}return F}},p.reduceLuminance=S,p.increaseLuminance=k,p.toChannels=function(j){return[j>>24&255,j>>16&255,j>>8&255,255&j]}}(l||(a.rgba=l={})),a.toPaddedHex=m,a.contrastRatio=f},8969:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const g=d(844),x=d(2585),h=d(4348),_=d(7866),N=d(744),E=d(7302),b=d(6975),l=d(8460),m=d(1753),f=d(1480),p=d(7994),S=d(9282),k=d(5435),j=d(5981),A=d(2660);let D=!1;class L extends g.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new l.EventEmitter),this._onScroll.event(F=>{var P;(P=this._onScrollApi)==null||P.fire(F.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(F){for(const P in F)this.optionsService.options[P]=F[P]}constructor(F){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 h.InstantiationService,this.optionsService=this.register(new E.OptionsService(F)),this._instantiationService.setService(x.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(N.BufferService)),this._instantiationService.setService(x.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(_.LogService)),this._instantiationService.setService(x.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(b.CoreService)),this._instantiationService.setService(x.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(m.CoreMouseService)),this._instantiationService.setService(x.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(f.UnicodeService)),this._instantiationService.setService(x.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(p.CharsetService),this._instantiationService.setService(x.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(x.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new k.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(P=>{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(P=>{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 j.WriteBuffer((P,B)=>this._inputHandler.parse(P,B))),this.register((0,l.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(F,P){this._writeBuffer.write(F,P)}writeSync(F,P){this._logService.logLevel<=x.LogLevelEnum.WARN&&!D&&(this._logService.warn("writeSync is unreliable and will be removed soon."),D=!0),this._writeBuffer.writeSync(F,P)}input(F,P=!0){this.coreService.triggerDataEvent(F,P)}resize(F,P){isNaN(F)||isNaN(P)||(F=Math.max(F,N.MINIMUM_COLS),P=Math.max(P,N.MINIMUM_ROWS),this._bufferService.resize(F,P))}scroll(F,P=!1){this._bufferService.scroll(F,P)}scrollLines(F,P,B){this._bufferService.scrollLines(F,P,B)}scrollPages(F){this.scrollLines(F*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(F){const P=F-this._bufferService.buffer.ydisp;P!==0&&this.scrollLines(P)}registerEscHandler(F,P){return this._inputHandler.registerEscHandler(F,P)}registerDcsHandler(F,P){return this._inputHandler.registerDcsHandler(F,P)}registerCsiHandler(F,P){return this._inputHandler.registerCsiHandler(F,P)}registerOscHandler(F,P){return this._inputHandler.registerOscHandler(F,P)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let F=!1;const P=this.optionsService.rawOptions.windowsPty;P&&P.buildNumber!==void 0&&P.buildNumber!==void 0?F=P.backend==="conpty"&&P.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(F=!0),F?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const F=[];F.push(this.onLineFeed(S.updateWindowsModeWrappedState.bind(null,this._bufferService))),F.push(this.registerCsiHandler({final:"H"},()=>((0,S.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,g.toDisposable)(()=>{for(const P of F)P.dispose()})}}}a.CoreTerminal=L},8460:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let g=0;g<this._listeners.length;g++)if(this._listeners[g]===d)return void this._listeners.splice(g,1)}}})),this._event}fire(d,g){const x=[];for(let h=0;h<this._listeners.length;h++)x.push(this._listeners[h]);for(let h=0;h<x.length;h++)x[h].call(void 0,d,g)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(d,g){return d(x=>g.fire(x))},a.runAndSubscribe=function(d,g){return g(void 0),d(x=>g(x))}},5435:function(y,a,d){var g=this&&this.__decorate||function(se,I,W,X){var K,ve=arguments.length,he=ve<3?I:X===null?X=Object.getOwnPropertyDescriptor(I,W):X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")he=Reflect.decorate(se,I,W,X);else for(var Ae=se.length-1;Ae>=0;Ae--)(K=se[Ae])&&(he=(ve<3?K(he):ve>3?K(I,W,he):K(I,W))||he);return ve>3&&he&&Object.defineProperty(I,W,he),he},x=this&&this.__param||function(se,I){return function(W,X){I(W,X,se)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const h=d(2584),_=d(7116),N=d(2015),E=d(844),b=d(482),l=d(8437),m=d(8460),f=d(643),p=d(511),S=d(3734),k=d(2585),j=d(1480),A=d(6242),D=d(6351),L=d(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},F=131072;function P(se,I){if(se>24)return I.setWinLines||!1;switch(se){case 1:return!!I.restoreWin;case 2:return!!I.minimizeWin;case 3:return!!I.setWinPosition;case 4:return!!I.setWinSizePixels;case 5:return!!I.raiseWin;case 6:return!!I.lowerWin;case 7:return!!I.refreshWin;case 8:return!!I.setWinSizeChars;case 9:return!!I.maximizeWin;case 10:return!!I.fullscreenWin;case 11:return!!I.getWinState;case 13:return!!I.getWinPosition;case 14:return!!I.getWinSizePixels;case 15:return!!I.getScreenSizePixels;case 16:return!!I.getCellSizePixels;case 18:return!!I.getWinSizeChars;case 19:return!!I.getScreenSizeChars;case 20:return!!I.getIconTitle;case 21:return!!I.getWinTitle;case 22:return!!I.pushTitle;case 23:return!!I.popTitle;case 24:return!!I.setWinLines}return!1}var B;(function(se){se[se.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",se[se.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(B||(a.WindowsOptionsReportType=B={}));let G=0;class ne extends E.Disposable{getAttrData(){return this._curAttrData}constructor(I,W,X,K,ve,he,Ae,me,ie=new N.EscapeSequenceParser){super(),this._bufferService=I,this._charsetService=W,this._coreService=X,this._logService=K,this._optionsService=ve,this._oscLinkService=he,this._coreMouseService=Ae,this._unicodeService=me,this._parser=ie,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new b.StringToUtf32,this._utf8Decoder=new b.Utf8ToUtf32,this._workCell=new p.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 ee(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate($=>this._activeBuffer=$.activeBuffer)),this._parser.setCsiHandlerFallback(($,_e)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString($),params:_e.toArray()})}),this._parser.setEscHandlerFallback($=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString($)})}),this._parser.setExecuteHandlerFallback($=>{this._logService.debug("Unknown EXECUTE code: ",{code:$})}),this._parser.setOscHandlerFallback(($,_e,ue)=>{this._logService.debug("Unknown OSC code: ",{identifier:$,action:_e,data:ue})}),this._parser.setDcsHandlerFallback(($,_e,ue)=>{_e==="HOOK"&&(ue=ue.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString($),action:_e,payload:ue})}),this._parser.setPrintHandler(($,_e,ue)=>this.print($,_e,ue)),this._parser.registerCsiHandler({final:"@"},$=>this.insertChars($)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},$=>this.scrollLeft($)),this._parser.registerCsiHandler({final:"A"},$=>this.cursorUp($)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},$=>this.scrollRight($)),this._parser.registerCsiHandler({final:"B"},$=>this.cursorDown($)),this._parser.registerCsiHandler({final:"C"},$=>this.cursorForward($)),this._parser.registerCsiHandler({final:"D"},$=>this.cursorBackward($)),this._parser.registerCsiHandler({final:"E"},$=>this.cursorNextLine($)),this._parser.registerCsiHandler({final:"F"},$=>this.cursorPrecedingLine($)),this._parser.registerCsiHandler({final:"G"},$=>this.cursorCharAbsolute($)),this._parser.registerCsiHandler({final:"H"},$=>this.cursorPosition($)),this._parser.registerCsiHandler({final:"I"},$=>this.cursorForwardTab($)),this._parser.registerCsiHandler({final:"J"},$=>this.eraseInDisplay($,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},$=>this.eraseInDisplay($,!0)),this._parser.registerCsiHandler({final:"K"},$=>this.eraseInLine($,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},$=>this.eraseInLine($,!0)),this._parser.registerCsiHandler({final:"L"},$=>this.insertLines($)),this._parser.registerCsiHandler({final:"M"},$=>this.deleteLines($)),this._parser.registerCsiHandler({final:"P"},$=>this.deleteChars($)),this._parser.registerCsiHandler({final:"S"},$=>this.scrollUp($)),this._parser.registerCsiHandler({final:"T"},$=>this.scrollDown($)),this._parser.registerCsiHandler({final:"X"},$=>this.eraseChars($)),this._parser.registerCsiHandler({final:"Z"},$=>this.cursorBackwardTab($)),this._parser.registerCsiHandler({final:"`"},$=>this.charPosAbsolute($)),this._parser.registerCsiHandler({final:"a"},$=>this.hPositionRelative($)),this._parser.registerCsiHandler({final:"b"},$=>this.repeatPrecedingCharacter($)),this._parser.registerCsiHandler({final:"c"},$=>this.sendDeviceAttributesPrimary($)),this._parser.registerCsiHandler({prefix:">",final:"c"},$=>this.sendDeviceAttributesSecondary($)),this._parser.registerCsiHandler({final:"d"},$=>this.linePosAbsolute($)),this._parser.registerCsiHandler({final:"e"},$=>this.vPositionRelative($)),this._parser.registerCsiHandler({final:"f"},$=>this.hVPosition($)),this._parser.registerCsiHandler({final:"g"},$=>this.tabClear($)),this._parser.registerCsiHandler({final:"h"},$=>this.setMode($)),this._parser.registerCsiHandler({prefix:"?",final:"h"},$=>this.setModePrivate($)),this._parser.registerCsiHandler({final:"l"},$=>this.resetMode($)),this._parser.registerCsiHandler({prefix:"?",final:"l"},$=>this.resetModePrivate($)),this._parser.registerCsiHandler({final:"m"},$=>this.charAttributes($)),this._parser.registerCsiHandler({final:"n"},$=>this.deviceStatus($)),this._parser.registerCsiHandler({prefix:"?",final:"n"},$=>this.deviceStatusPrivate($)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},$=>this.softReset($)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},$=>this.setCursorStyle($)),this._parser.registerCsiHandler({final:"r"},$=>this.setScrollRegion($)),this._parser.registerCsiHandler({final:"s"},$=>this.saveCursor($)),this._parser.registerCsiHandler({final:"t"},$=>this.windowOptions($)),this._parser.registerCsiHandler({final:"u"},$=>this.restoreCursor($)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},$=>this.insertColumns($)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},$=>this.deleteColumns($)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},$=>this.selectProtected($)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},$=>this.requestMode($,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},$=>this.requestMode($,!1)),this._parser.setExecuteHandler(h.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(h.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(h.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(h.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(h.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(h.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(h.C1.IND,()=>this.index()),this._parser.setExecuteHandler(h.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(h.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new A.OscHandler($=>(this.setTitle($),this.setIconName($),!0))),this._parser.registerOscHandler(1,new A.OscHandler($=>this.setIconName($))),this._parser.registerOscHandler(2,new A.OscHandler($=>this.setTitle($))),this._parser.registerOscHandler(4,new A.OscHandler($=>this.setOrReportIndexedColor($))),this._parser.registerOscHandler(8,new A.OscHandler($=>this.setHyperlink($))),this._parser.registerOscHandler(10,new A.OscHandler($=>this.setOrReportFgColor($))),this._parser.registerOscHandler(11,new A.OscHandler($=>this.setOrReportBgColor($))),this._parser.registerOscHandler(12,new A.OscHandler($=>this.setOrReportCursorColor($))),this._parser.registerOscHandler(104,new A.OscHandler($=>this.restoreIndexedColor($))),this._parser.registerOscHandler(110,new A.OscHandler($=>this.restoreFgColor($))),this._parser.registerOscHandler(111,new A.OscHandler($=>this.restoreBgColor($))),this._parser.registerOscHandler(112,new A.OscHandler($=>this.restoreCursorColor($))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(const $ in _.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:$},()=>this.selectCharset("("+$)),this._parser.registerEscHandler({intermediates:")",final:$},()=>this.selectCharset(")"+$)),this._parser.registerEscHandler({intermediates:"*",final:$},()=>this.selectCharset("*"+$)),this._parser.registerEscHandler({intermediates:"+",final:$},()=>this.selectCharset("+"+$)),this._parser.registerEscHandler({intermediates:"-",final:$},()=>this.selectCharset("-"+$)),this._parser.registerEscHandler({intermediates:".",final:$},()=>this.selectCharset("."+$)),this._parser.registerEscHandler({intermediates:"/",final:$},()=>this.selectCharset("/"+$));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler($=>(this._logService.error("Parsing error: ",$),$)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new D.DcsHandler(($,_e)=>this.requestStatusString($,_e)))}_preserveStack(I,W,X,K){this._parseStack.paused=!0,this._parseStack.cursorStartX=I,this._parseStack.cursorStartY=W,this._parseStack.decodedLength=X,this._parseStack.position=K}_logSlowResolvingAsync(I){this._logService.logLevel<=k.LogLevelEnum.WARN&&Promise.race([I,new Promise((W,X)=>setTimeout(()=>X("#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(I,W){let X,K=this._activeBuffer.x,ve=this._activeBuffer.y,he=0;const Ae=this._parseStack.paused;if(Ae){if(X=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,W))return this._logSlowResolvingAsync(X),X;K=this._parseStack.cursorStartX,ve=this._parseStack.cursorStartY,this._parseStack.paused=!1,I.length>F&&(he=this._parseStack.position+F)}if(this._logService.logLevel<=k.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof I=="string"?` "${I}"`:` "${Array.prototype.map.call(I,$=>String.fromCharCode($)).join("")}"`),typeof I=="string"?I.split("").map($=>$.charCodeAt(0)):I),this._parseBuffer.length<I.length&&this._parseBuffer.length<F&&(this._parseBuffer=new Uint32Array(Math.min(I.length,F))),Ae||this._dirtyRowTracker.clearRange(),I.length>F)for(let $=he;$<I.length;$+=F){const _e=$+F<I.length?$+F:I.length,ue=typeof I=="string"?this._stringDecoder.decode(I.substring($,_e),this._parseBuffer):this._utf8Decoder.decode(I.subarray($,_e),this._parseBuffer);if(X=this._parser.parse(this._parseBuffer,ue))return this._preserveStack(K,ve,ue,$),this._logSlowResolvingAsync(X),X}else if(!Ae){const $=typeof I=="string"?this._stringDecoder.decode(I,this._parseBuffer):this._utf8Decoder.decode(I,this._parseBuffer);if(X=this._parser.parse(this._parseBuffer,$))return this._preserveStack(K,ve,$,0),this._logSlowResolvingAsync(X),X}this._activeBuffer.x===K&&this._activeBuffer.y===ve||this._onCursorMove.fire();const me=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(me,this._bufferService.rows-1))}print(I,W,X){let K,ve;const he=this._charsetService.charset,Ae=this._optionsService.rawOptions.screenReaderMode,me=this._bufferService.cols,ie=this._coreService.decPrivateModes.wraparound,$=this._coreService.modes.insertMode,_e=this._curAttrData;let ue=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&X-W>0&&ue.getWidth(this._activeBuffer.x-1)===2&&ue.setCellFromCodepoint(this._activeBuffer.x-1,0,1,_e);let Ie=this._parser.precedingJoinState;for(let Ue=W;Ue<X;++Ue){if(K=I[Ue],K<127&&he){const Dt=he[String.fromCharCode(K)];Dt&&(K=Dt.charCodeAt(0))}const nt=this._unicodeService.charProperties(K,Ie);ve=j.UnicodeService.extractWidth(nt);const et=j.UnicodeService.extractShouldJoin(nt),st=et?j.UnicodeService.extractWidth(Ie):0;if(Ie=nt,Ae&&this._onA11yChar.fire((0,b.stringFromCodePoint)(K)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+ve-st>me){if(ie){const Dt=ue;let J=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),ue=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),st>0&&ue instanceof l.BufferLine&&ue.copyCellsFrom(Dt,J,0,st,!1);J<me;)Dt.setCellFromCodepoint(J++,0,1,_e)}else if(this._activeBuffer.x=me-1,ve===2)continue}if(et&&this._activeBuffer.x){const Dt=ue.getWidth(this._activeBuffer.x-1)?1:2;ue.addCodepointToCell(this._activeBuffer.x-Dt,K,ve);for(let J=ve-st;--J>=0;)ue.setCellFromCodepoint(this._activeBuffer.x++,0,0,_e)}else if($&&(ue.insertCells(this._activeBuffer.x,ve-st,this._activeBuffer.getNullCell(_e)),ue.getWidth(me-1)===2&&ue.setCellFromCodepoint(me-1,f.NULL_CELL_CODE,f.NULL_CELL_WIDTH,_e)),ue.setCellFromCodepoint(this._activeBuffer.x++,K,ve,_e),ve>0)for(;--ve;)ue.setCellFromCodepoint(this._activeBuffer.x++,0,0,_e)}this._parser.precedingJoinState=Ie,this._activeBuffer.x<me&&X-W>0&&ue.getWidth(this._activeBuffer.x)===0&&!ue.hasContent(this._activeBuffer.x)&&ue.setCellFromCodepoint(this._activeBuffer.x,0,1,_e),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(I,W){return I.final!=="t"||I.prefix||I.intermediates?this._parser.registerCsiHandler(I,W):this._parser.registerCsiHandler(I,X=>!P(X.params[0],this._optionsService.rawOptions.windowOptions)||W(X))}registerDcsHandler(I,W){return this._parser.registerDcsHandler(I,new D.DcsHandler(W))}registerEscHandler(I,W){return this._parser.registerEscHandler(I,W)}registerOscHandler(I,W){return this._parser.registerOscHandler(I,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 I;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&&((I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&I.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 I=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-I),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(I=this._bufferService.cols-1){this._activeBuffer.x=Math.min(I,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(I,W){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=I,this._activeBuffer.y=this._activeBuffer.scrollTop+W):(this._activeBuffer.x=I,this._activeBuffer.y=W),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(I,W){this._restrictCursor(),this._setCursor(this._activeBuffer.x+I,this._activeBuffer.y+W)}cursorUp(I){const W=this._activeBuffer.y-this._activeBuffer.scrollTop;return W>=0?this._moveCursor(0,-Math.min(W,I.params[0]||1)):this._moveCursor(0,-(I.params[0]||1)),!0}cursorDown(I){const W=this._activeBuffer.scrollBottom-this._activeBuffer.y;return W>=0?this._moveCursor(0,Math.min(W,I.params[0]||1)):this._moveCursor(0,I.params[0]||1),!0}cursorForward(I){return this._moveCursor(I.params[0]||1,0),!0}cursorBackward(I){return this._moveCursor(-(I.params[0]||1),0),!0}cursorNextLine(I){return this.cursorDown(I),this._activeBuffer.x=0,!0}cursorPrecedingLine(I){return this.cursorUp(I),this._activeBuffer.x=0,!0}cursorCharAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(I){return this._setCursor(I.length>=2?(I.params[1]||1)-1:0,(I.params[0]||1)-1),!0}charPosAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(I){return this._moveCursor(I.params[0]||1,0),!0}linePosAbsolute(I){return this._setCursor(this._activeBuffer.x,(I.params[0]||1)-1),!0}vPositionRelative(I){return this._moveCursor(0,I.params[0]||1),!0}hVPosition(I){return this.cursorPosition(I),!0}tabClear(I){const W=I.params[0];return W===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:W===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let W=I.params[0]||1;for(;W--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let W=I.params[0]||1;for(;W--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(I){const W=I.params[0];return W===1&&(this._curAttrData.bg|=536870912),W!==2&&W!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(I,W,X,K=!1,ve=!1){const he=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);he.replaceCells(W,X,this._activeBuffer.getNullCell(this._eraseAttrData()),ve),K&&(he.isWrapped=!1)}_resetBufferLine(I,W=!1){const X=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);X&&(X.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),W),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+I),X.isWrapped=!1)}eraseInDisplay(I,W=!1){let X;switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:for(X=this._activeBuffer.y,this._dirtyRowTracker.markDirty(X),this._eraseInBufferLine(X++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,W);X<this._bufferService.rows;X++)this._resetBufferLine(X,W);this._dirtyRowTracker.markDirty(X);break;case 1:for(X=this._activeBuffer.y,this._dirtyRowTracker.markDirty(X),this._eraseInBufferLine(X,0,this._activeBuffer.x+1,!0,W),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(X+1).isWrapped=!1);X--;)this._resetBufferLine(X,W);this._dirtyRowTracker.markDirty(0);break;case 2:for(X=this._bufferService.rows,this._dirtyRowTracker.markDirty(X-1);X--;)this._resetBufferLine(X,W);this._dirtyRowTracker.markDirty(0);break;case 3:const K=this._activeBuffer.lines.length-this._bufferService.rows;K>0&&(this._activeBuffer.lines.trimStart(K),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-K,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-K,0),this._onScroll.fire(0))}return!0}eraseInLine(I,W=!1){switch(this._restrictCursor(this._bufferService.cols),I.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(I){this._restrictCursor();let W=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const X=this._activeBuffer.ybase+this._activeBuffer.y,K=this._bufferService.rows-1-this._activeBuffer.scrollBottom,ve=this._bufferService.rows-1+this._activeBuffer.ybase-K+1;for(;W--;)this._activeBuffer.lines.splice(ve-1,1),this._activeBuffer.lines.splice(X,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(I){this._restrictCursor();let W=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const X=this._activeBuffer.ybase+this._activeBuffer.y;let K;for(K=this._bufferService.rows-1-this._activeBuffer.scrollBottom,K=this._bufferService.rows-1+this._activeBuffer.ybase-K;W--;)this._activeBuffer.lines.splice(X,1),this._activeBuffer.lines.splice(K,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(I){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.insertCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(I){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.deleteCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(I){let W=I.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(I){let W=I.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(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=I.params[0]||1;for(let X=this._activeBuffer.scrollTop;X<=this._activeBuffer.scrollBottom;++X){const K=this._activeBuffer.lines.get(this._activeBuffer.ybase+X);K.deleteCells(0,W,this._activeBuffer.getNullCell(this._eraseAttrData())),K.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=I.params[0]||1;for(let X=this._activeBuffer.scrollTop;X<=this._activeBuffer.scrollBottom;++X){const K=this._activeBuffer.lines.get(this._activeBuffer.ybase+X);K.insertCells(0,W,this._activeBuffer.getNullCell(this._eraseAttrData())),K.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=I.params[0]||1;for(let X=this._activeBuffer.scrollTop;X<=this._activeBuffer.scrollBottom;++X){const K=this._activeBuffer.lines.get(this._activeBuffer.ybase+X);K.insertCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(this._eraseAttrData())),K.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=I.params[0]||1;for(let X=this._activeBuffer.scrollTop;X<=this._activeBuffer.scrollBottom;++X){const K=this._activeBuffer.lines.get(this._activeBuffer.ybase+X);K.deleteCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(this._eraseAttrData())),K.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(I){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(I.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(I){const W=this._parser.precedingJoinState;if(!W)return!0;const X=I.params[0]||1,K=j.UnicodeService.extractWidth(W),ve=this._activeBuffer.x-K,he=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(ve),Ae=new Uint32Array(he.length*X);let me=0;for(let $=0;$<he.length;){const _e=he.codePointAt($)||0;Ae[me++]=_e,$+=_e>65535?2:1}let ie=me;for(let $=1;$<X;++$)Ae.copyWithin(ie,0,me),ie+=me;return this.print(Ae,0,ie),!0}sendDeviceAttributesPrimary(I){return I.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(I){return I.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(I.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(I){return(this._optionsService.rawOptions.termName+"").indexOf(I)===0}setMode(I){for(let W=0;W<I.length;W++)switch(I.params[W]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(I){for(let W=0;W<I.length;W++)switch(I.params[W]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,_.DEFAULT_CHARSET),this._charsetService.setgCharset(1,_.DEFAULT_CHARSET),this._charsetService.setgCharset(2,_.DEFAULT_CHARSET),this._charsetService.setgCharset(3,_.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(I){for(let W=0;W<I.length;W++)switch(I.params[W]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(I){for(let W=0;W<I.length;W++)switch(I.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(),I.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(I,W){const X=this._coreService.decPrivateModes,{activeProtocol:K,activeEncoding:ve}=this._coreMouseService,he=this._coreService,{buffers:Ae,cols:me}=this._bufferService,{active:ie,alt:$}=Ae,_e=this._optionsService.rawOptions,ue=et=>et?1:2,Ie=I.params[0];return Ue=Ie,nt=W?Ie===2?4:Ie===4?ue(he.modes.insertMode):Ie===12?3:Ie===20?ue(_e.convertEol):0:Ie===1?ue(X.applicationCursorKeys):Ie===3?_e.windowOptions.setWinLines?me===80?2:me===132?1:0:0:Ie===6?ue(X.origin):Ie===7?ue(X.wraparound):Ie===8?3:Ie===9?ue(K==="X10"):Ie===12?ue(_e.cursorBlink):Ie===25?ue(!he.isCursorHidden):Ie===45?ue(X.reverseWraparound):Ie===66?ue(X.applicationKeypad):Ie===67?4:Ie===1e3?ue(K==="VT200"):Ie===1002?ue(K==="DRAG"):Ie===1003?ue(K==="ANY"):Ie===1004?ue(X.sendFocus):Ie===1005?4:Ie===1006?ue(ve==="SGR"):Ie===1015?4:Ie===1016?ue(ve==="SGR_PIXELS"):Ie===1048?1:Ie===47||Ie===1047||Ie===1049?ue(ie===$):Ie===2004?ue(X.bracketedPasteMode):0,he.triggerDataEvent(`${h.C0.ESC}[${W?"":"?"}${Ue};${nt}$y`),!0;var Ue,nt}_updateAttrColor(I,W,X,K,ve){return W===2?(I|=50331648,I&=-16777216,I|=S.AttributeData.fromColorRGB([X,K,ve])):W===5&&(I&=-50331904,I|=33554432|255&X),I}_extractColor(I,W,X){const K=[0,0,-1,0,0,0];let ve=0,he=0;do{if(K[he+ve]=I.params[W+he],I.hasSubParams(W+he)){const Ae=I.getSubParams(W+he);let me=0;do K[1]===5&&(ve=1),K[he+me+1+ve]=Ae[me];while(++me<Ae.length&&me+he+1+ve<K.length);break}if(K[1]===5&&he+ve>=2||K[1]===2&&he+ve>=5)break;K[1]&&(ve=1)}while(++he+W<I.length&&he+ve<K.length);for(let Ae=2;Ae<K.length;++Ae)K[Ae]===-1&&(K[Ae]=0);switch(K[0]){case 38:X.fg=this._updateAttrColor(X.fg,K[1],K[3],K[4],K[5]);break;case 48:X.bg=this._updateAttrColor(X.bg,K[1],K[3],K[4],K[5]);break;case 58:X.extended=X.extended.clone(),X.extended.underlineColor=this._updateAttrColor(X.extended.underlineColor,K[1],K[3],K[4],K[5])}return he}_processUnderline(I,W){W.extended=W.extended.clone(),(!~I||I>5)&&(I=1),W.extended.underlineStyle=I,W.fg|=268435456,I===0&&(W.fg&=-268435457),W.updateExtended()}_processSGR0(I){I.fg=l.DEFAULT_ATTR_DATA.fg,I.bg=l.DEFAULT_ATTR_DATA.bg,I.extended=I.extended.clone(),I.extended.underlineStyle=0,I.extended.underlineColor&=-67108864,I.updateExtended()}charAttributes(I){if(I.length===1&&I.params[0]===0)return this._processSGR0(this._curAttrData),!0;const W=I.length;let X;const K=this._curAttrData;for(let ve=0;ve<W;ve++)X=I.params[ve],X>=30&&X<=37?(K.fg&=-50331904,K.fg|=16777216|X-30):X>=40&&X<=47?(K.bg&=-50331904,K.bg|=16777216|X-40):X>=90&&X<=97?(K.fg&=-50331904,K.fg|=16777224|X-90):X>=100&&X<=107?(K.bg&=-50331904,K.bg|=16777224|X-100):X===0?this._processSGR0(K):X===1?K.fg|=134217728:X===3?K.bg|=67108864:X===4?(K.fg|=268435456,this._processUnderline(I.hasSubParams(ve)?I.getSubParams(ve)[0]:1,K)):X===5?K.fg|=536870912:X===7?K.fg|=67108864:X===8?K.fg|=1073741824:X===9?K.fg|=2147483648:X===2?K.bg|=134217728:X===21?this._processUnderline(2,K):X===22?(K.fg&=-134217729,K.bg&=-134217729):X===23?K.bg&=-67108865:X===24?(K.fg&=-268435457,this._processUnderline(0,K)):X===25?K.fg&=-536870913:X===27?K.fg&=-67108865:X===28?K.fg&=-1073741825:X===29?K.fg&=2147483647:X===39?(K.fg&=-67108864,K.fg|=16777215&l.DEFAULT_ATTR_DATA.fg):X===49?(K.bg&=-67108864,K.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):X===38||X===48||X===58?ve+=this._extractColor(I,ve,K):X===53?K.bg|=1073741824:X===55?K.bg&=-1073741825:X===59?(K.extended=K.extended.clone(),K.extended.underlineColor=-1,K.updateExtended()):X===100?(K.fg&=-67108864,K.fg|=16777215&l.DEFAULT_ATTR_DATA.fg,K.bg&=-67108864,K.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",X);return!0}deviceStatus(I){switch(I.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const W=this._activeBuffer.y+1,X=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${W};${X}R`)}return!0}deviceStatusPrivate(I){if(I.params[0]===6){const W=this._activeBuffer.y+1,X=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${W};${X}R`)}return!0}softReset(I){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(I){const W=I.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 X=W%2==1;return this._optionsService.options.cursorBlink=X,!0}setScrollRegion(I){const W=I.params[0]||1;let X;return(I.length<2||(X=I.params[1])>this._bufferService.rows||X===0)&&(X=this._bufferService.rows),X>W&&(this._activeBuffer.scrollTop=W-1,this._activeBuffer.scrollBottom=X-1,this._setCursor(0,0)),!0}windowOptions(I){if(!P(I.params[0],this._optionsService.rawOptions.windowOptions))return!0;const W=I.length>1?I.params[1]:0;switch(I.params[0]){case 14:W!==2&&this._onRequestWindowsOptionsReport.fire(B.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(B.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.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(I){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(I){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(I){return this._windowTitle=I,this._onTitleChange.fire(I),!0}setIconName(I){return this._iconName=I,!0}setOrReportIndexedColor(I){const W=[],X=I.split(";");for(;X.length>1;){const K=X.shift(),ve=X.shift();if(/^\d+$/.exec(K)){const he=parseInt(K);if(te(he))if(ve==="?")W.push({type:0,index:he});else{const Ae=(0,L.parseColor)(ve);Ae&&W.push({type:1,index:he,color:Ae})}}}return W.length&&this._onColor.fire(W),!0}setHyperlink(I){const W=I.split(";");return!(W.length<2)&&(W[1]?this._createHyperlink(W[0],W[1]):!W[0]&&this._finishHyperlink())}_createHyperlink(I,W){this._getCurrentLinkId()&&this._finishHyperlink();const X=I.split(":");let K;const ve=X.findIndex(he=>he.startsWith("id="));return ve!==-1&&(K=X[ve].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:K,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(I,W){const X=I.split(";");for(let K=0;K<X.length&&!(W>=this._specialColors.length);++K,++W)if(X[K]==="?")this._onColor.fire([{type:0,index:this._specialColors[W]}]);else{const ve=(0,L.parseColor)(X[K]);ve&&this._onColor.fire([{type:1,index:this._specialColors[W],color:ve}])}return!0}setOrReportFgColor(I){return this._setOrReportSpecialColor(I,0)}setOrReportBgColor(I){return this._setOrReportSpecialColor(I,1)}setOrReportCursorColor(I){return this._setOrReportSpecialColor(I,2)}restoreIndexedColor(I){if(!I)return this._onColor.fire([{type:2}]),!0;const W=[],X=I.split(";");for(let K=0;K<X.length;++K)if(/^\d+$/.exec(X[K])){const ve=parseInt(X[K]);te(ve)&&W.push({type:2,index:ve})}return W.length&&this._onColor.fire(W),!0}restoreFgColor(I){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(I){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(I){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,_.DEFAULT_CHARSET),!0}selectCharset(I){return I.length!==2?(this.selectDefaultCharset(),!0):(I[0]==="/"||this._charsetService.setgCharset(O[I[0]],_.CHARSETS[I[1]]||_.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 I=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,I,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(I){return this._charsetService.setgLevel(I),!0}screenAlignmentPattern(){const I=new p.CellData;I.content=4194373,I.fg=this._curAttrData.fg,I.bg=this._curAttrData.bg,this._setCursor(0,0);for(let W=0;W<this._bufferService.rows;++W){const X=this._activeBuffer.ybase+this._activeBuffer.y+W,K=this._activeBuffer.lines.get(X);K&&(K.fill(I),K.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(I,W){const X=this._bufferService.buffer,K=this._optionsService.rawOptions;return(ve=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${ve}${h.C0.ESC}\\`),!0))(I==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:I==='"p'?'P1$r61;1"p':I==="r"?`P1$r${X.scrollTop+1};${X.scrollBottom+1}r`:I==="m"?"P1$r0m":I===" q"?`P1$r${{block:2,underline:4,bar:6}[K.cursorStyle]-(K.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(I,W){this._dirtyRowTracker.markRangeDirty(I,W)}}a.InputHandler=ne;let ee=class{constructor(se){this._bufferService=se,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(se){se<this.start?this.start=se:se>this.end&&(this.end=se)}markRangeDirty(se,I){se>I&&(G=se,se=I,I=G),se<this.start&&(this.start=se),I>this.end&&(this.end=I)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function te(se){return 0<=se&&se<256}ee=g([x(0,k.IBufferService)],ee)},844:(y,a)=>{function d(g){for(const x of g)x.dispose();g.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const g of this._disposables)g.dispose();this._disposables.length=0}register(g){return this._disposables.push(g),g}unregister(g){const x=this._disposables.indexOf(g);x!==-1&&this._disposables.splice(x,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(g){var x;this._isDisposed||g===this._value||((x=this._value)==null||x.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}},a.toDisposable=function(g){return{dispose:g}},a.disposeArray=d,a.getDisposeArrayDisposable=function(g){return{dispose:()=>d(g)}}},1505:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(x,h,_){this._data[x]||(this._data[x]={}),this._data[x][h]=_}get(x,h){return this._data[x]?this._data[x][h]:void 0}clear(){this._data={}}}a.TwoKeyMap=d,a.FourKeyMap=class{constructor(){this._data=new d}set(g,x,h,_,N){this._data.get(g,x)||this._data.set(g,x,new d),this._data.get(g,x).set(h,_,N)}get(g,x,h,_){var N;return(N=this._data.get(g,x))==null?void 0:N.get(h,_)}clear(){this._data.clear()}}},6114:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const d=a.isNode?"node":navigator.userAgent,g=a.isNode?"node":navigator.platform;a.isFirefox=d.includes("Firefox"),a.isLegacyEdge=d.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(d),a.getSafariVersion=function(){if(!a.isSafari)return 0;const x=d.match(/Version\/(\d+)/);return x===null||x.length<2?0:parseInt(x[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(g),a.isIpad=g==="iPad",a.isIphone=g==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(g),a.isLinux=g.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(d)},6106:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let d=0;a.SortedList=class{constructor(g){this._getKey=g,this._array=[]}clear(){this._array.length=0}insert(g){this._array.length!==0?(d=this._search(this._getKey(g)),this._array.splice(d,0,g)):this._array.push(g)}delete(g){if(this._array.length===0)return!1;const x=this._getKey(g);if(x===void 0||(d=this._search(x),d===-1)||this._getKey(this._array[d])!==x)return!1;do if(this._array[d]===g)return this._array.splice(d,1),!0;while(++d<this._array.length&&this._getKey(this._array[d])===x);return!1}*getKeyIterator(g){if(this._array.length!==0&&(d=this._search(g),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===g))do yield this._array[d];while(++d<this._array.length&&this._getKey(this._array[d])===g)}forEachByKey(g,x){if(this._array.length!==0&&(d=this._search(g),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===g))do x(this._array[d]);while(++d<this._array.length&&this._getKey(this._array[d])===g)}values(){return[...this._array].values()}_search(g){let x=0,h=this._array.length-1;for(;h>=x;){let _=x+h>>1;const N=this._getKey(this._array[_]);if(N>g)h=_-1;else{if(!(N<g)){for(;_>0&&this._getKey(this._array[_-1])===g;)_--;return _}x=_+1}}return x}}},7226:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const g=d(6114);class x{constructor(){this._tasks=[],this._i=0}enqueue(N){this._tasks.push(N),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(N){this._idleCallback=void 0;let E=0,b=0,l=N.timeRemaining(),m=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),b=Math.max(E,b),m=N.timeRemaining(),1.5*b>m)return l-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(l-E))}ms`),void this._start();l=m}this.clear()}}class h extends x{_requestCallback(N){return setTimeout(()=>N(this._createDeadline(16)))}_cancelCallback(N){clearTimeout(N)}_createDeadline(N){const E=Date.now()+N;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}a.PriorityTaskQueue=h,a.IdleTaskQueue=!g.isNode&&"requestIdleCallback"in window?class extends x{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:h,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},9282:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const g=d(643);a.updateWindowsModeWrappedState=function(x){const h=x.buffer.lines.get(x.buffer.ybase+x.buffer.y-1),_=h==null?void 0:h.get(x.cols-1),N=x.buffer.lines.get(x.buffer.ybase+x.buffer.y);N&&_&&(N.isWrapped=_[g.CHAR_DATA_CODE_INDEX]!==g.NULL_CELL_CODE&&_[g.CHAR_DATA_CODE_INDEX]!==g.WHITESPACE_CELL_CODE)}},3734:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new g}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new d;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=d;class g{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,_=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=_}clone(){return new g(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=g},9092:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const g=d(6349),x=d(7226),h=d(3734),_=d(8437),N=d(4634),E=d(511),b=d(643),l=d(4863),m=d(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(f,p,S){this._hasScrollback=f,this._optionsService=p,this._bufferService=S,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=_.DEFAULT_ATTR_DATA.clone(),this.savedCharset=m.DEFAULT_CHARSET,this.markers=[],this._nullCell=E.CellData.fromCharData([0,b.NULL_CELL_CHAR,b.NULL_CELL_WIDTH,b.NULL_CELL_CODE]),this._whitespaceCell=E.CellData.fromCharData([0,b.WHITESPACE_CELL_CHAR,b.WHITESPACE_CELL_WIDTH,b.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new x.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 h.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 h.ExtendedAttrs),this._whitespaceCell}getBlankLine(f,p){return new _.BufferLine(this._bufferService.cols,this.getNullCell(f),p)}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 p=f+this._optionsService.rawOptions.scrollback;return p>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:p}fillViewportRows(f){if(this.lines.length===0){f===void 0&&(f=_.DEFAULT_ATTR_DATA);let p=this._rows;for(;p--;)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,p){const S=this.getNullCell(_.DEFAULT_ATTR_DATA);let k=0;const j=this._getCorrectBufferLength(p);if(j>this.lines.maxLength&&(this.lines.maxLength=j),this.lines.length>0){if(this._cols<f)for(let D=0;D<this.lines.length;D++)k+=+this.lines.get(D).resize(f,S);let A=0;if(this._rows<p)for(let D=this._rows;D<p;D++)this.lines.length<p+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new _.BufferLine(f,S)):this.ybase>0&&this.lines.length<=this.ybase+this.y+A+1?(this.ybase--,A++,this.ydisp>0&&this.ydisp--):this.lines.push(new _.BufferLine(f,S)));else for(let D=this._rows;D>p;D--)this.lines.length>p+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(j<this.lines.maxLength){const D=this.lines.length-j;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=j}this.x=Math.min(this.x,f-1),this.y=Math.min(this.y,p-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,f-1),this.scrollTop=0}if(this.scrollBottom=p-1,this._isReflowEnabled&&(this._reflow(f,p),this._cols>f))for(let A=0;A<this.lines.length;A++)k+=+this.lines.get(A).resize(f,S);this._cols=f,this._rows=p,this._memoryCleanupQueue.clear(),k>.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 p=0;for(;this._memoryCleanupPosition<this.lines.length;)if(p+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),p>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,p){this._cols!==f&&(f>this._cols?this._reflowLarger(f,p):this._reflowSmaller(f,p))}_reflowLarger(f,p){const S=(0,N.reflowLargerGetLinesToRemove)(this.lines,this._cols,f,this.ybase+this.y,this.getNullCell(_.DEFAULT_ATTR_DATA));if(S.length>0){const k=(0,N.reflowLargerCreateNewLayout)(this.lines,S);(0,N.reflowLargerApplyNewLayout)(this.lines,k.layout),this._reflowLargerAdjustViewport(f,p,k.countRemoved)}}_reflowLargerAdjustViewport(f,p,S){const k=this.getNullCell(_.DEFAULT_ATTR_DATA);let j=S;for(;j-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<p&&this.lines.push(new _.BufferLine(f,k))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-S,0)}_reflowSmaller(f,p){const S=this.getNullCell(_.DEFAULT_ATTR_DATA),k=[];let j=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 L=[D];for(;D.isWrapped&&A>0;)D=this.lines.get(--A),L.unshift(D);const O=this.ybase+this.y;if(O>=A&&O<A+L.length)continue;const F=L[L.length-1].getTrimmedLength(),P=(0,N.reflowSmallerGetNewLineLengths)(L,this._cols,f),B=P.length-L.length;let G;G=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+B):Math.max(0,this.lines.length-this.lines.maxLength+B);const ne=[];for(let X=0;X<B;X++){const K=this.getBlankLine(_.DEFAULT_ATTR_DATA,!0);ne.push(K)}ne.length>0&&(k.push({start:A+L.length+j,newLines:ne}),j+=ne.length),L.push(...ne);let ee=P.length-1,te=P[ee];te===0&&(ee--,te=P[ee]);let se=L.length-B-1,I=F;for(;se>=0;){const X=Math.min(I,te);if(L[ee]===void 0)break;if(L[ee].copyCellsFrom(L[se],I-X,te-X,X,!0),te-=X,te===0&&(ee--,te=P[ee]),I-=X,I===0){se--;const K=Math.max(se,0);I=(0,N.getWrappedLineTrimmedLength)(L,K,this._cols)}}for(let X=0;X<L.length;X++)P[X]<f&&L[X].setCell(P[X],S);let W=B-G;for(;W-- >0;)this.ybase===0?this.y<p-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+j)-p&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+B,this.ybase+p-1)}if(k.length>0){const A=[],D=[];for(let ee=0;ee<this.lines.length;ee++)D.push(this.lines.get(ee));const L=this.lines.length;let O=L-1,F=0,P=k[F];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+j);let B=0;for(let ee=Math.min(this.lines.maxLength-1,L+j-1);ee>=0;ee--)if(P&&P.start>O+B){for(let te=P.newLines.length-1;te>=0;te--)this.lines.set(ee--,P.newLines[te]);ee++,A.push({index:O+1,amount:P.newLines.length}),B+=P.newLines.length,P=k[++F]}else this.lines.set(ee,D[O--]);let G=0;for(let ee=A.length-1;ee>=0;ee--)A[ee].index+=G,this.lines.onInsertEmitter.fire(A[ee]),G+=A[ee].amount;const ne=Math.max(0,L+j-this.lines.maxLength);ne>0&&this.lines.onTrimEmitter.fire(ne)}}translateBufferLineToString(f,p,S=0,k){const j=this.lines.get(f);return j?j.translateToString(p,S,k):""}getWrappedRangeForLine(f){let p=f,S=f;for(;p>0&&this.lines.get(p).isWrapped;)p--;for(;S+1<this.lines.length&&this.lines.get(S+1).isWrapped;)S++;return{first:p,last:S}}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 p=0;p<this.markers.length;p++)this.markers[p].line===f&&(this.markers[p].dispose(),this.markers.splice(p--,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 p=new l.Marker(f);return this.markers.push(p),p.register(this.lines.onTrim(S=>{p.line-=S,p.line<0&&p.dispose()})),p.register(this.lines.onInsert(S=>{p.line>=S.index&&(p.line+=S.amount)})),p.register(this.lines.onDelete(S=>{p.line>=S.index&&p.line<S.index+S.amount&&p.dispose(),p.line>S.index&&(p.line-=S.amount)})),p.register(p.onDispose(()=>this._removeMarker(p))),p}_removeMarker(f){this._isClearing||this.markers.splice(this.markers.indexOf(f),1)}}},8437:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const g=d(3734),x=d(511),h=d(643),_=d(482);a.DEFAULT_ATTR_DATA=Object.freeze(new g.AttributeData);let N=0;class E{constructor(l,m,f=!1){this.isWrapped=f,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*l);const p=m||x.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let S=0;S<l;++S)this.setCell(S,p);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,_.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[h.CHAR_DATA_ATTR_INDEX],m[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[l]=m[1],this._data[3*l+0]=2097152|l|m[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*l+0]=m[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|m[h.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,_.stringFromCodePoint)(2097151&m):""}isProtected(l){return 536870912&this._data[3*l+2]}loadCell(l,m){return N=3*l,m.content=this._data[N+0],m.fg=this._data[N+1],m.bg=this._data[N+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,p){268435456&p.bg&&(this._extendedAttrs[l]=p.extended),this._data[3*l+0]=m|f<<22,this._data[3*l+1]=p.fg,this._data[3*l+2]=p.bg}addCodepointToCell(l,m,f){let p=this._data[3*l+0];2097152&p?this._combined[l]+=(0,_.stringFromCodePoint)(m):2097151&p?(this._combined[l]=(0,_.stringFromCodePoint)(2097151&p)+(0,_.stringFromCodePoint)(m),p&=-2097152,p|=2097152):p=m|4194304,f&&(p&=-12582913,p|=f<<22),this._data[3*l+0]=p}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 p=new x.CellData;for(let S=this.length-l-m-1;S>=0;--S)this.setCell(l+m+S,this.loadCell(l+S,p));for(let S=0;S<m;++S)this.setCell(l+S,f)}else for(let p=l;p<this.length;++p)this.setCell(p,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 p=new x.CellData;for(let S=0;S<this.length-l-m;++S)this.setCell(l+S,this.loadCell(l+m+S,p));for(let S=this.length-m;S<this.length;++S)this.setCell(S,f)}else for(let p=l;p<this.length;++p)this.setCell(p,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,p=!1){if(p)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 p=new Uint32Array(f);p.set(this._data),this._data=p}for(let p=this.length;p<l;++p)this.setCell(p,m)}else{this._data=this._data.subarray(0,f);const p=Object.keys(this._combined);for(let k=0;k<p.length;k++){const j=parseInt(p[k],10);j>=l&&delete this._combined[j]}const S=Object.keys(this._extendedAttrs);for(let k=0;k<S.length;k++){const j=parseInt(S[k],10);j>=l&&delete this._extendedAttrs[j]}}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 E(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,p,S){const k=l._data;if(S)for(let A=p-1;A>=0;A--){for(let D=0;D<3;D++)this._data[3*(f+A)+D]=k[3*(m+A)+D];268435456&k[3*(m+A)+2]&&(this._extendedAttrs[f+A]=l._extendedAttrs[m+A])}else for(let A=0;A<p;A++){for(let D=0;D<3;D++)this._data[3*(f+A)+D]=k[3*(m+A)+D];268435456&k[3*(m+A)+2]&&(this._extendedAttrs[f+A]=l._extendedAttrs[m+A])}const j=Object.keys(l._combined);for(let A=0;A<j.length;A++){const D=parseInt(j[A],10);D>=m&&(this._combined[D-m+f]=l._combined[D])}}translateToString(l,m,f,p){m=m??0,f=f??this.length,l&&(f=Math.min(f,this.getTrimmedLength())),p&&(p.length=0);let S="";for(;m<f;){const k=this._data[3*m+0],j=2097151&k,A=2097152&k?this._combined[m]:j?(0,_.stringFromCodePoint)(j):h.WHITESPACE_CELL_CHAR;if(S+=A,p)for(let D=0;D<A.length;++D)p.push(m);m+=k>>22||1}return p&&p.push(m),S}}a.BufferLine=E},4841:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(d,g){if(d.start.y>d.end.y)throw new Error(`Buffer range end (${d.end.x}, ${d.end.y}) cannot be before start (${d.start.x}, ${d.start.y})`);return g*(d.end.y-d.start.y)+(d.end.x-d.start.x+1)}},4634:(y,a)=>{function d(g,x,h){if(x===g.length-1)return g[x].getTrimmedLength();const _=!g[x].hasContent(h-1)&&g[x].getWidth(h-1)===1,N=g[x+1].getWidth(0)===2;return _&&N?h-1:h}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(g,x,h,_,N){const E=[];for(let b=0;b<g.length-1;b++){let l=b,m=g.get(++l);if(!m.isWrapped)continue;const f=[g.get(b)];for(;l<g.length&&m.isWrapped;)f.push(m),m=g.get(++l);if(_>=b&&_<l){b+=f.length-1;continue}let p=0,S=d(f,p,x),k=1,j=0;for(;k<f.length;){const D=d(f,k,x),L=D-j,O=h-S,F=Math.min(L,O);f[p].copyCellsFrom(f[k],j,S,F,!1),S+=F,S===h&&(p++,S=0),j+=F,j===D&&(k++,j=0),S===0&&p!==0&&f[p-1].getWidth(h-1)===2&&(f[p].copyCellsFrom(f[p-1],h-1,S++,1,!1),f[p-1].setCell(h-1,N))}f[p].replaceCells(S,h,N);let A=0;for(let D=f.length-1;D>0&&(D>p||f[D].getTrimmedLength()===0);D--)A++;A>0&&(E.push(b+f.length-A),E.push(A)),b+=f.length-1}return E},a.reflowLargerCreateNewLayout=function(g,x){const h=[];let _=0,N=x[_],E=0;for(let b=0;b<g.length;b++)if(N===b){const l=x[++_];g.onDeleteEmitter.fire({index:b-E,amount:l}),b+=l-1,E+=l,N=x[++_]}else h.push(b);return{layout:h,countRemoved:E}},a.reflowLargerApplyNewLayout=function(g,x){const h=[];for(let _=0;_<x.length;_++)h.push(g.get(x[_]));for(let _=0;_<h.length;_++)g.set(_,h[_]);g.length=x.length},a.reflowSmallerGetNewLineLengths=function(g,x,h){const _=[],N=g.map((m,f)=>d(g,f,x)).reduce((m,f)=>m+f);let E=0,b=0,l=0;for(;l<N;){if(N-l<h){_.push(N-l);break}E+=h;const m=d(g,b,x);E>m&&(E-=m,b++);const f=g[b].getWidth(E-1)===2;f&&E--;const p=f?h-1:h;_.push(p),l+=p}return _},a.getWrappedLineTrimmedLength=d},5295:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const g=d(8460),x=d(844),h=d(9092);class _ extends x.Disposable{constructor(E,b){super(),this._optionsService=E,this._bufferService=b,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 h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(E){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(E),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(E,b){this._normal.resize(E,b),this._alt.resize(E,b),this.setupTabStops(E)}setupTabStops(E){this._normal.setupTabStops(E),this._alt.setupTabStops(E)}}a.BufferSet=_},511:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const g=d(482),x=d(643),h=d(3734);class _ extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const b=new _;return b.setFromCharData(E),b}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(E){this.fg=E[x.CHAR_DATA_ATTR_INDEX],this.bg=0;let b=!1;if(E[x.CHAR_DATA_CHAR_INDEX].length>2)b=!0;else if(E[x.CHAR_DATA_CHAR_INDEX].length===2){const l=E[x.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=l&&l<=56319){const m=E[x.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=m&&m<=57343?this.content=1024*(l-55296)+m-56320+65536|E[x.CHAR_DATA_WIDTH_INDEX]<<22:b=!0}else b=!0}else this.content=E[x.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[x.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=E[x.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[x.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=_},643:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const g=d(8460),x=d(844);class h{get id(){return this._id}constructor(N){this.line=N,this.isDisposed=!1,this._disposables=[],this._id=h._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,x.disposeArray)(this._disposables),this._disposables.length=0)}register(N){return this._disposables.push(N),N}}a.Marker=h,h._nextId=1},7116:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(y,a)=>{var d,g,x;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
|
|
213
|
+
`,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""}(d||(a.C0=d={})),function(h){h.PAD="",h.HOP="",h.BPH="",h.NBH="",h.IND="",h.NEL="
",h.SSA="",h.ESA="",h.HTS="",h.HTJ="",h.VTS="",h.PLD="",h.PLU="",h.RI="",h.SS2="",h.SS3="",h.DCS="",h.PU1="",h.PU2="",h.STS="",h.CCH="",h.MW="",h.SPA="",h.EPA="",h.SOS="",h.SGCI="",h.SCI="",h.CSI="",h.ST="",h.OSC="",h.PM="",h.APC=""}(g||(a.C1=g={})),function(h){h.ST=`${d.ESC}\\`}(x||(a.C1_ESCAPED=x={}))},7399:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const g=d(2584),x={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(h,_,N,E){const b={type:0,cancel:!1,key:void 0},l=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?b.key=_?g.C0.ESC+"OA":g.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?b.key=_?g.C0.ESC+"OD":g.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?b.key=_?g.C0.ESC+"OC":g.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(b.key=_?g.C0.ESC+"OB":g.C0.ESC+"[B");break;case 8:b.key=h.ctrlKey?"\b":g.C0.DEL,h.altKey&&(b.key=g.C0.ESC+b.key);break;case 9:if(h.shiftKey){b.key=g.C0.ESC+"[Z";break}b.key=g.C0.HT,b.cancel=!0;break;case 13:b.key=h.altKey?g.C0.ESC+g.C0.CR:g.C0.CR,b.cancel=!0;break;case 27:b.key=g.C0.ESC,h.altKey&&(b.key=g.C0.ESC+g.C0.ESC),b.cancel=!0;break;case 37:if(h.metaKey)break;l?(b.key=g.C0.ESC+"[1;"+(l+1)+"D",b.key===g.C0.ESC+"[1;3D"&&(b.key=g.C0.ESC+(N?"b":"[1;5D"))):b.key=_?g.C0.ESC+"OD":g.C0.ESC+"[D";break;case 39:if(h.metaKey)break;l?(b.key=g.C0.ESC+"[1;"+(l+1)+"C",b.key===g.C0.ESC+"[1;3C"&&(b.key=g.C0.ESC+(N?"f":"[1;5C"))):b.key=_?g.C0.ESC+"OC":g.C0.ESC+"[C";break;case 38:if(h.metaKey)break;l?(b.key=g.C0.ESC+"[1;"+(l+1)+"A",N||b.key!==g.C0.ESC+"[1;3A"||(b.key=g.C0.ESC+"[1;5A")):b.key=_?g.C0.ESC+"OA":g.C0.ESC+"[A";break;case 40:if(h.metaKey)break;l?(b.key=g.C0.ESC+"[1;"+(l+1)+"B",N||b.key!==g.C0.ESC+"[1;3B"||(b.key=g.C0.ESC+"[1;5B")):b.key=_?g.C0.ESC+"OB":g.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(b.key=g.C0.ESC+"[2~");break;case 46:b.key=l?g.C0.ESC+"[3;"+(l+1)+"~":g.C0.ESC+"[3~";break;case 36:b.key=l?g.C0.ESC+"[1;"+(l+1)+"H":_?g.C0.ESC+"OH":g.C0.ESC+"[H";break;case 35:b.key=l?g.C0.ESC+"[1;"+(l+1)+"F":_?g.C0.ESC+"OF":g.C0.ESC+"[F";break;case 33:h.shiftKey?b.type=2:h.ctrlKey?b.key=g.C0.ESC+"[5;"+(l+1)+"~":b.key=g.C0.ESC+"[5~";break;case 34:h.shiftKey?b.type=3:h.ctrlKey?b.key=g.C0.ESC+"[6;"+(l+1)+"~":b.key=g.C0.ESC+"[6~";break;case 112:b.key=l?g.C0.ESC+"[1;"+(l+1)+"P":g.C0.ESC+"OP";break;case 113:b.key=l?g.C0.ESC+"[1;"+(l+1)+"Q":g.C0.ESC+"OQ";break;case 114:b.key=l?g.C0.ESC+"[1;"+(l+1)+"R":g.C0.ESC+"OR";break;case 115:b.key=l?g.C0.ESC+"[1;"+(l+1)+"S":g.C0.ESC+"OS";break;case 116:b.key=l?g.C0.ESC+"[15;"+(l+1)+"~":g.C0.ESC+"[15~";break;case 117:b.key=l?g.C0.ESC+"[17;"+(l+1)+"~":g.C0.ESC+"[17~";break;case 118:b.key=l?g.C0.ESC+"[18;"+(l+1)+"~":g.C0.ESC+"[18~";break;case 119:b.key=l?g.C0.ESC+"[19;"+(l+1)+"~":g.C0.ESC+"[19~";break;case 120:b.key=l?g.C0.ESC+"[20;"+(l+1)+"~":g.C0.ESC+"[20~";break;case 121:b.key=l?g.C0.ESC+"[21;"+(l+1)+"~":g.C0.ESC+"[21~";break;case 122:b.key=l?g.C0.ESC+"[23;"+(l+1)+"~":g.C0.ESC+"[23~";break;case 123:b.key=l?g.C0.ESC+"[24;"+(l+1)+"~":g.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(N&&!E||!h.altKey||h.metaKey)!N||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?b.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(b.key=g.C0.US),h.key==="@"&&(b.key=g.C0.NUL)):h.keyCode===65&&(b.type=1);else{const m=x[h.keyCode],f=m==null?void 0:m[h.shiftKey?1:0];if(f)b.key=g.C0.ESC+f;else if(h.keyCode>=65&&h.keyCode<=90){const p=h.ctrlKey?h.keyCode-64:h.keyCode+32;let S=String.fromCharCode(p);h.shiftKey&&(S=S.toUpperCase()),b.key=g.C0.ESC+S}else if(h.keyCode===32)b.key=g.C0.ESC+(h.ctrlKey?g.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let p=h.code.slice(3,4);h.shiftKey||(p=p.toLowerCase()),b.key=g.C0.ESC+p,b.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?b.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?b.key=g.C0.NUL:h.keyCode>=51&&h.keyCode<=55?b.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?b.key=g.C0.DEL:h.keyCode===219?b.key=g.C0.ESC:h.keyCode===220?b.key=g.C0.FS:h.keyCode===221&&(b.key=g.C0.GS)}return b}},482:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},a.utf32ToString=function(d,g=0,x=d.length){let h="";for(let _=g;_<x;++_){let N=d[_];N>65535?(N-=65536,h+=String.fromCharCode(55296+(N>>10))+String.fromCharCode(N%1024+56320)):h+=String.fromCharCode(N)}return h},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,g){const x=d.length;if(!x)return 0;let h=0,_=0;if(this._interim){const N=d.charCodeAt(_++);56320<=N&&N<=57343?g[h++]=1024*(this._interim-55296)+N-56320+65536:(g[h++]=this._interim,g[h++]=N),this._interim=0}for(let N=_;N<x;++N){const E=d.charCodeAt(N);if(55296<=E&&E<=56319){if(++N>=x)return this._interim=E,h;const b=d.charCodeAt(N);56320<=b&&b<=57343?g[h++]=1024*(E-55296)+b-56320+65536:(g[h++]=E,g[h++]=b)}else E!==65279&&(g[h++]=E)}return h}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,g){const x=d.length;if(!x)return 0;let h,_,N,E,b=0,l=0,m=0;if(this.interim[0]){let S=!1,k=this.interim[0];k&=(224&k)==192?31:(240&k)==224?15:7;let j,A=0;for(;(j=63&this.interim[++A])&&A<4;)k<<=6,k|=j;const D=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=D-A;for(;m<L;){if(m>=x)return 0;if(j=d[m++],(192&j)!=128){m--,S=!0;break}this.interim[A++]=j,k<<=6,k|=63&j}S||(D===2?k<128?m--:g[b++]=k:D===3?k<2048||k>=55296&&k<=57343||k===65279||(g[b++]=k):k<65536||k>1114111||(g[b++]=k)),this.interim.fill(0)}const f=x-4;let p=m;for(;p<x;){for(;!(!(p<f)||128&(h=d[p])||128&(_=d[p+1])||128&(N=d[p+2])||128&(E=d[p+3]));)g[b++]=h,g[b++]=_,g[b++]=N,g[b++]=E,p+=4;if(h=d[p++],h<128)g[b++]=h;else if((224&h)==192){if(p>=x)return this.interim[0]=h,b;if(_=d[p++],(192&_)!=128){p--;continue}if(l=(31&h)<<6|63&_,l<128){p--;continue}g[b++]=l}else if((240&h)==224){if(p>=x)return this.interim[0]=h,b;if(_=d[p++],(192&_)!=128){p--;continue}if(p>=x)return this.interim[0]=h,this.interim[1]=_,b;if(N=d[p++],(192&N)!=128){p--;continue}if(l=(15&h)<<12|(63&_)<<6|63&N,l<2048||l>=55296&&l<=57343||l===65279)continue;g[b++]=l}else if((248&h)==240){if(p>=x)return this.interim[0]=h,b;if(_=d[p++],(192&_)!=128){p--;continue}if(p>=x)return this.interim[0]=h,this.interim[1]=_,b;if(N=d[p++],(192&N)!=128){p--;continue}if(p>=x)return this.interim[0]=h,this.interim[1]=_,this.interim[2]=N,b;if(E=d[p++],(192&E)!=128){p--;continue}if(l=(7&h)<<18|(63&_)<<12|(63&N)<<6|63&E,l<65536||l>1114111)continue;g[b++]=l}}return b}}},225:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const g=d(1480),x=[[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]],h=[[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 _;a.UnicodeV6=class{constructor(){if(this.version="6",!_){_=new Uint8Array(65536),_.fill(1),_[0]=0,_.fill(0,1,32),_.fill(0,127,160),_.fill(2,4352,4448),_[9001]=2,_[9002]=2,_.fill(2,11904,42192),_[12351]=1,_.fill(2,44032,55204),_.fill(2,63744,64256),_.fill(2,65040,65050),_.fill(2,65072,65136),_.fill(2,65280,65377),_.fill(2,65504,65511);for(let N=0;N<x.length;++N)_.fill(0,x[N][0],x[N][1]+1)}}wcwidth(N){return N<32?0:N<127?1:N<65536?_[N]:function(E,b){let l,m=0,f=b.length-1;if(E<b[0][0]||E>b[f][1])return!1;for(;f>=m;)if(l=m+f>>1,E>b[l][1])m=l+1;else{if(!(E<b[l][0]))return!0;f=l-1}return!1}(N,h)?0:N>=131072&&N<=196605||N>=196608&&N<=262141?2:1}charProperties(N,E){let b=this.wcwidth(N),l=b===0&&E!==0;if(l){const m=g.UnicodeService.extractWidth(E);m===0?l=!1:m>b&&(b=m)}return g.UnicodeService.createPropertyValue(0,b,l)}}},5981:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const g=d(8460),x=d(844);class h extends x.Disposable{constructor(N){super(),this._action=N,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(N,E){if(E!==void 0&&this._syncCalls>E)return void(this._syncCalls=0);if(this._pendingData+=N.length,this._writeBuffer.push(N),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let b;for(this._isSyncWriting=!0;b=this._writeBuffer.shift();){this._action(b);const l=this._callbacks.shift();l&&l()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(N,E){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=N.length,this._writeBuffer.push(N),this._callbacks.push(E),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=N.length,this._writeBuffer.push(N),this._callbacks.push(E)}_innerWrite(N=0,E=!0){const b=N||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const l=this._writeBuffer[this._bufferOffset],m=this._action(l,E);if(m){const p=S=>Date.now()-b>=12?setTimeout(()=>this._innerWrite(0,S)):this._innerWrite(b,S);return void m.catch(S=>(queueMicrotask(()=>{throw S}),Promise.resolve(!1))).then(p)}const f=this._callbacks[this._bufferOffset];if(f&&f(),this._bufferOffset++,this._pendingData-=l.length,Date.now()-b>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=h},5941:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const d=/^([\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 x(h,_){const N=h.toString(16),E=N.length<2?"0"+N:N;switch(_){case 4:return N[0];case 8:return E;case 12:return(E+E).slice(0,3);default:return E+E}}a.parseColor=function(h){if(!h)return;let _=h.toLowerCase();if(_.indexOf("rgb:")===0){_=_.slice(4);const N=d.exec(_);if(N){const E=N[1]?15:N[4]?255:N[7]?4095:65535;return[Math.round(parseInt(N[1]||N[4]||N[7]||N[10],16)/E*255),Math.round(parseInt(N[2]||N[5]||N[8]||N[11],16)/E*255),Math.round(parseInt(N[3]||N[6]||N[9]||N[12],16)/E*255)]}}else if(_.indexOf("#")===0&&(_=_.slice(1),g.exec(_)&&[3,6,9,12].includes(_.length))){const N=_.length/3,E=[0,0,0];for(let b=0;b<3;++b){const l=parseInt(_.slice(N*b,N*b+N),16);E[b]=N===1?l<<4:N===2?l:N===3?l>>4:l>>8}return E}},a.toRgbString=function(h,_=16){const[N,E,b]=h;return`rgb:${x(N,_)}/${x(E,_)}/${x(b,_)}`}},5770:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const g=d(482),x=d(8742),h=d(5770),_=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=_,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}registerHandler(E,b){this._handlers[E]===void 0&&(this._handlers[E]=[]);const l=this._handlers[E];return l.push(b),{dispose:()=>{const m=l.indexOf(b);m!==-1&&l.splice(m,1)}}}clearHandler(E){this._handlers[E]&&delete this._handlers[E]}setHandlerFallback(E){this._handlerFb=E}reset(){if(this._active.length)for(let E=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;E>=0;--E)this._active[E].unhook(!1);this._stack.paused=!1,this._active=_,this._ident=0}hook(E,b){if(this.reset(),this._ident=E,this._active=this._handlers[E]||_,this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].hook(b);else this._handlerFb(this._ident,"HOOK",b)}put(E,b,l){if(this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].put(E,b,l);else this._handlerFb(this._ident,"PUT",(0,g.utf32ToString)(E,b,l))}unhook(E,b=!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=b,f=this._stack.fallThrough,this._stack.paused=!1),!f&&l===!1){for(;m>=0&&(l=this._active[m].unhook(E),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",E);this._active=_,this._ident=0}};const N=new x.Params;N.addParam(0),a.DcsHandler=class{constructor(E){this._handler=E,this._data="",this._params=N,this._hitLimit=!1}hook(E){this._params=E.length>1||E.params[0]?E.clone():N,this._data="",this._hitLimit=!1}put(E,b,l){this._hitLimit||(this._data+=(0,g.utf32ToString)(E,b,l),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(E){let b=!1;if(this._hitLimit)b=!1;else if(E&&(b=this._handler(this._data,this._params),b instanceof Promise))return b.then(l=>(this._params=N,this._data="",this._hitLimit=!1,l));return this._params=N,this._data="",this._hitLimit=!1,b}}},2015:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const g=d(844),x=d(8742),h=d(6242),_=d(6351);class N{constructor(m){this.table=new Uint8Array(m)}setDefault(m,f){this.table.fill(m<<4|f)}add(m,f,p,S){this.table[f<<8|m]=p<<4|S}addMany(m,f,p,S){for(let k=0;k<m.length;k++)this.table[f<<8|m[k]]=p<<4|S}}a.TransitionTable=N;const E=160;a.VT500_TRANSITION_TABLE=function(){const l=new N(4095),m=Array.apply(null,Array(256)).map((A,D)=>D),f=(A,D)=>m.slice(A,D),p=f(32,127),S=f(0,24);S.push(25),S.push.apply(S,f(28,32));const k=f(0,14);let j;for(j in l.setDefault(1,0),l.addMany(p,0,2,0),k)l.addMany([24,26,153,154],j,3,0),l.addMany(f(128,144),j,3,0),l.addMany(f(144,152),j,3,0),l.add(156,j,0,0),l.add(27,j,11,1),l.add(157,j,4,8),l.addMany([152,158,159],j,0,7),l.add(155,j,11,3),l.add(144,j,11,9);return l.addMany(S,0,3,0),l.addMany(S,1,3,1),l.add(127,1,0,1),l.addMany(S,8,0,8),l.addMany(S,3,3,3),l.add(127,3,0,3),l.addMany(S,4,3,4),l.add(127,4,0,4),l.addMany(S,6,3,6),l.addMany(S,5,3,5),l.add(127,5,0,5),l.addMany(S,2,3,2),l.add(127,2,0,2),l.add(93,1,4,8),l.addMany(p,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(p,7,0,7),l.addMany(S,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(S,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(S,11,0,11),l.addMany(f(32,128),11,0,11),l.addMany(f(28,32),11,0,11),l.addMany(S,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(S,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(S,13,13,13),l.addMany(p,13,13,13),l.add(127,13,0,13),l.addMany([27,156,24,26],13,14,0),l.add(E,0,2,0),l.add(E,8,5,8),l.add(E,6,0,6),l.add(E,11,0,11),l.add(E,13,13,13),l}();class b extends g.Disposable{constructor(m=a.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 x.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(f,p,S)=>{},this._executeHandlerFb=f=>{},this._csiHandlerFb=(f,p)=>{},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 h.OscParser),this._dcsParser=this.register(new _.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(m,f=[64,126]){let p=0;if(m.prefix){if(m.prefix.length>1)throw new Error("only one byte as prefix supported");if(p=m.prefix.charCodeAt(0),p&&60>p||p>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 k=0;k<m.intermediates.length;++k){const j=m.intermediates.charCodeAt(k);if(32>j||j>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");p<<=8,p|=j}}if(m.final.length!==1)throw new Error("final must be a single byte");const S=m.final.charCodeAt(0);if(f[0]>S||S>f[1])throw new Error(`final must be in range ${f[0]} .. ${f[1]}`);return p<<=8,p|=S,p}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 p=this._identifier(m,[48,126]);this._escHandlers[p]===void 0&&(this._escHandlers[p]=[]);const S=this._escHandlers[p];return S.push(f),{dispose:()=>{const k=S.indexOf(f);k!==-1&&S.splice(k,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 p=this._identifier(m);this._csiHandlers[p]===void 0&&(this._csiHandlers[p]=[]);const S=this._csiHandlers[p];return S.push(f),{dispose:()=>{const k=S.indexOf(f);k!==-1&&S.splice(k,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,p,S,k){this._parseStack.state=m,this._parseStack.handlers=f,this._parseStack.handlerPos=p,this._parseStack.transition=S,this._parseStack.chunkPos=k}parse(m,f,p){let S,k=0,j=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(p===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 L=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(p===!1&&L>-1){for(;L>=0&&(S=D[L](this._params),S!==!0);L--)if(S instanceof Promise)return this._parseStack.handlerPos=L,S}this._parseStack.handlers=[];break;case 4:if(p===!1&&L>-1){for(;L>=0&&(S=D[L](),S!==!0);L--)if(S instanceof Promise)return this._parseStack.handlerPos=L,S}this._parseStack.handlers=[];break;case 6:if(k=m[this._parseStack.chunkPos],S=this._dcsParser.unhook(k!==24&&k!==26,p),S)return S;k===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(k=m[this._parseStack.chunkPos],S=this._oscParser.end(k!==24&&k!==26,p),S)return S;k===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(k=m[D],j=this._transitions.table[this.currentState<<8|(k<160?k:E)],j>>4){case 2:for(let B=D+1;;++B){if(B>=f||(k=m[B])<32||k>126&&k<E){this._printHandler(m,D,B),D=B-1;break}if(++B>=f||(k=m[B])<32||k>126&&k<E){this._printHandler(m,D,B),D=B-1;break}if(++B>=f||(k=m[B])<32||k>126&&k<E){this._printHandler(m,D,B),D=B-1;break}if(++B>=f||(k=m[B])<32||k>126&&k<E){this._printHandler(m,D,B),D=B-1;break}}break;case 3:this._executeHandlers[k]?this._executeHandlers[k]():this._executeHandlerFb(k),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:D,code:k,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const L=this._csiHandlers[this._collect<<8|k];let O=L?L.length-1:-1;for(;O>=0&&(S=L[O](this._params),S!==!0);O--)if(S instanceof Promise)return this._preserveStack(3,L,O,j,D),S;O<0&&this._csiHandlerFb(this._collect<<8|k,this._params),this.precedingJoinState=0;break;case 8:do switch(k){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(k-48)}while(++D<f&&(k=m[D])>47&&k<60);D--;break;case 9:this._collect<<=8,this._collect|=k;break;case 10:const F=this._escHandlers[this._collect<<8|k];let P=F?F.length-1:-1;for(;P>=0&&(S=F[P](),S!==!0);P--)if(S instanceof Promise)return this._preserveStack(4,F,P,j,D),S;P<0&&this._escHandlerFb(this._collect<<8|k),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|k,this._params);break;case 13:for(let B=D+1;;++B)if(B>=f||(k=m[B])===24||k===26||k===27||k>127&&k<E){this._dcsParser.put(m,D,B),D=B-1;break}break;case 14:if(S=this._dcsParser.unhook(k!==24&&k!==26),S)return this._preserveStack(6,[],0,j,D),S;k===27&&(j|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let B=D+1;;B++)if(B>=f||(k=m[B])<32||k>127&&k<E){this._oscParser.put(m,D,B),D=B-1;break}break;case 6:if(S=this._oscParser.end(k!==24&&k!==26),S)return this._preserveStack(5,[],0,j,D),S;k===27&&(j|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&j}}}a.EscapeSequenceParser=b},6242:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const g=d(5770),x=d(482),h=[];a.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(_,N){this._handlers[_]===void 0&&(this._handlers[_]=[]);const E=this._handlers[_];return E.push(N),{dispose:()=>{const b=E.indexOf(N);b!==-1&&E.splice(b,1)}}}clearHandler(_){this._handlers[_]&&delete this._handlers[_]}setHandlerFallback(_){this._handlerFb=_}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let _=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;_>=0;--_)this._active[_].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].start();else this._handlerFb(this._id,"START")}_put(_,N,E){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(_,N,E);else this._handlerFb(this._id,"PUT",(0,x.utf32ToString)(_,N,E))}start(){this.reset(),this._state=1}put(_,N,E){if(this._state!==3){if(this._state===1)for(;N<E;){const b=_[N++];if(b===59){this._state=2,this._start();break}if(b<48||57<b)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+b-48}this._state===2&&E-N>0&&this._put(_,N,E)}}end(_,N=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let E=!1,b=this._active.length-1,l=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,E=N,l=this._stack.fallThrough,this._stack.paused=!1),!l&&E===!1){for(;b>=0&&(E=this._active[b].end(_),E!==!0);b--)if(E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,E;b--}for(;b>=0;b--)if(E=this._active[b].end(!1),E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,E}else this._handlerFb(this._id,"END",_);this._active=h,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(_){this._handler=_,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(_,N,E){this._hitLimit||(this._data+=(0,x.utf32ToString)(_,N,E),this._data.length>g.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(_){let N=!1;if(this._hitLimit)N=!1;else if(_&&(N=this._handler(this._data),N instanceof Promise))return N.then(E=>(this._data="",this._hitLimit=!1,E));return this._data="",this._hitLimit=!1,N}}},8742:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const d=2147483647;class g{static fromArray(h){const _=new g;if(!h.length)return _;for(let N=Array.isArray(h[0])?1:0;N<h.length;++N){const E=h[N];if(Array.isArray(E))for(let b=0;b<E.length;++b)_.addSubParam(E[b]);else _.addParam(E)}return _}constructor(h=32,_=32){if(this.maxLength=h,this.maxSubParamsLength=_,_>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(_),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new g(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let _=0;_<this.length;++_){h.push(this.params[_]);const N=this._subParamsIdx[_]>>8,E=255&this._subParamsIdx[_];E-N>0&&h.push(Array.prototype.slice.call(this._subParams,N,E))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>d?d:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>d?d:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const _=this._subParamsIdx[h]>>8,N=255&this._subParamsIdx[h];return N-_>0?this._subParams.subarray(_,N):null}getSubParamsAll(){const h={};for(let _=0;_<this.length;++_){const N=this._subParamsIdx[_]>>8,E=255&this._subParamsIdx[_];E-N>0&&(h[_]=this._subParams.slice(N,E))}return h}addDigit(h){let _;if(this._rejectDigits||!(_=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const N=this._digitIsSub?this._subParams:this.params,E=N[_-1];N[_-1]=~E?Math.min(10*E+h,d):h}}a.Params=g},5741:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let d=this._addons.length-1;d>=0;d--)this._addons[d].instance.dispose()}loadAddon(d,g){const x={instance:g,dispose:g.dispose,isDisposed:!1};this._addons.push(x),g.dispose=()=>this._wrappedAddonDispose(x),g.activate(d)}_wrappedAddonDispose(d){if(d.isDisposed)return;let g=-1;for(let x=0;x<this._addons.length;x++)if(this._addons[x]===d){g=x;break}if(g===-1)throw new Error("Could not dispose an addon that has not been loaded");d.isDisposed=!0,d.dispose.apply(d.instance),this._addons.splice(g,1)}}},8771:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const g=d(3785),x=d(511);a.BufferApiView=class{constructor(h,_){this._buffer=h,this.type=_}init(h){return this._buffer=h,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(h){const _=this._buffer.lines.get(h);if(_)return new g.BufferLineApiView(_)}getNullCell(){return new x.CellData}}},3785:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const g=d(511);a.BufferLineApiView=class{constructor(x){this._line=x}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(x,h){if(!(x<0||x>=this._line.length))return h?(this._line.loadCell(x,h),h):this._line.loadCell(x,new g.CellData)}translateToString(x,h,_){return this._line.translateToString(x,h,_)}}},8285:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const g=d(8771),x=d(8460),h=d(844);class _ extends h.Disposable{constructor(E){super(),this._core=E,this._onBufferChange=this.register(new x.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)}}a.BufferNamespaceApi=_},7975:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(d){this._core=d}registerCsiHandler(d,g){return this._core.registerCsiHandler(d,x=>g(x.toArray()))}addCsiHandler(d,g){return this.registerCsiHandler(d,g)}registerDcsHandler(d,g){return this._core.registerDcsHandler(d,(x,h)=>g(x,h.toArray()))}addDcsHandler(d,g){return this.registerDcsHandler(d,g)}registerEscHandler(d,g){return this._core.registerEscHandler(d,g)}addEscHandler(d,g){return this.registerEscHandler(d,g)}registerOscHandler(d,g){return this._core.registerOscHandler(d,g)}addOscHandler(d,g){return this.registerOscHandler(d,g)}}},7090:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(d){this._core=d}register(d){this._core.unicodeService.register(d)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(d){this._core.unicodeService.activeVersion=d}}},744:function(y,a,d){var g=this&&this.__decorate||function(l,m,f,p){var S,k=arguments.length,j=k<3?m:p===null?p=Object.getOwnPropertyDescriptor(m,f):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(l,m,f,p);else for(var A=l.length-1;A>=0;A--)(S=l[A])&&(j=(k<3?S(j):k>3?S(m,f,j):S(m,f))||j);return k>3&&j&&Object.defineProperty(m,f,j),j},x=this&&this.__param||function(l,m){return function(f,p){m(f,p,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const h=d(8460),_=d(844),N=d(5295),E=d(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let b=a.BufferService=class extends _.Disposable{get buffer(){return this.buffers.active}constructor(l){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(l.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(l.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new N.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 p;p=this._cachedBlankLine,p&&p.length===this.cols&&p.getFg(0)===l.fg&&p.getBg(0)===l.bg||(p=f.getBlankLine(l,m),this._cachedBlankLine=p),p.isWrapped=m;const S=f.ybase+f.scrollTop,k=f.ybase+f.scrollBottom;if(f.scrollTop===0){const j=f.lines.isFull;k===f.lines.length-1?j?f.lines.recycle().copyFrom(p):f.lines.push(p.clone()):f.lines.splice(k+1,0,p.clone()),j?this.isUserScrolling&&(f.ydisp=Math.max(f.ydisp-1,0)):(f.ybase++,this.isUserScrolling||f.ydisp++)}else{const j=k-S+1;f.lines.shiftElements(S+1,j-1,-1),f.lines.set(k,p.clone())}this.isUserScrolling||(f.ydisp=f.ybase),this._onScroll.fire(f.ydisp)}scrollLines(l,m,f){const p=this.buffer;if(l<0){if(p.ydisp===0)return;this.isUserScrolling=!0}else l+p.ydisp>=p.ybase&&(this.isUserScrolling=!1);const S=p.ydisp;p.ydisp=Math.max(Math.min(p.ydisp+l,p.ybase),0),S!==p.ydisp&&(m||this._onScroll.fire(p.ydisp))}};a.BufferService=b=g([x(0,E.IOptionsService)],b)},7994:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(d){this.glevel=d,this.charset=this._charsets[d]}setgCharset(d,g){this._charsets[d]=g,this.glevel===d&&(this.charset=g)}}},1753:function(y,a,d){var g=this&&this.__decorate||function(p,S,k,j){var A,D=arguments.length,L=D<3?S:j===null?j=Object.getOwnPropertyDescriptor(S,k):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(p,S,k,j);else for(var O=p.length-1;O>=0;O--)(A=p[O])&&(L=(D<3?A(L):D>3?A(S,k,L):A(S,k))||L);return D>3&&L&&Object.defineProperty(S,k,L),L},x=this&&this.__param||function(p,S){return function(k,j){S(k,j,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const h=d(2585),_=d(8460),N=d(844),E={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:p=>p.button!==4&&p.action===1&&(p.ctrl=!1,p.alt=!1,p.shift=!1,!0)},VT200:{events:19,restrict:p=>p.action!==32},DRAG:{events:23,restrict:p=>p.action!==32||p.button!==3},ANY:{events:31,restrict:p=>!0}};function b(p,S){let k=(p.ctrl?16:0)|(p.shift?4:0)|(p.alt?8:0);return p.button===4?(k|=64,k|=p.action):(k|=3&p.button,4&p.button&&(k|=64),8&p.button&&(k|=128),p.action===32?k|=32:p.action!==0||S||(k|=3)),k}const l=String.fromCharCode,m={DEFAULT:p=>{const S=[b(p,!1)+32,p.col+32,p.row+32];return S[0]>255||S[1]>255||S[2]>255?"":`\x1B[M${l(S[0])}${l(S[1])}${l(S[2])}`},SGR:p=>{const S=p.action===0&&p.button!==4?"m":"M";return`\x1B[<${b(p,!0)};${p.col};${p.row}${S}`},SGR_PIXELS:p=>{const S=p.action===0&&p.button!==4?"m":"M";return`\x1B[<${b(p,!0)};${p.x};${p.y}${S}`}};let f=a.CoreMouseService=class extends N.Disposable{constructor(p,S){super(),this._bufferService=p,this._coreService=S,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new _.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const k of Object.keys(E))this.addProtocol(k,E[k]);for(const k of Object.keys(m))this.addEncoding(k,m[k]);this.reset()}addProtocol(p,S){this._protocols[p]=S}addEncoding(p,S){this._encodings[p]=S}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(p){if(!this._protocols[p])throw new Error(`unknown protocol "${p}"`);this._activeProtocol=p,this._onProtocolChange.fire(this._protocols[p].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(p){if(!this._encodings[p])throw new Error(`unknown encoding "${p}"`);this._activeEncoding=p}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(p){if(p.col<0||p.col>=this._bufferService.cols||p.row<0||p.row>=this._bufferService.rows||p.button===4&&p.action===32||p.button===3&&p.action!==32||p.button!==4&&(p.action===2||p.action===3)||(p.col++,p.row++,p.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,p,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(p))return!1;const S=this._encodings[this._activeEncoding](p);return S&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(S):this._coreService.triggerDataEvent(S,!0)),this._lastEvent=p,!0}explainEvents(p){return{down:!!(1&p),up:!!(2&p),drag:!!(4&p),move:!!(8&p),wheel:!!(16&p)}}_equalEvents(p,S,k){if(k){if(p.x!==S.x||p.y!==S.y)return!1}else if(p.col!==S.col||p.row!==S.row)return!1;return p.button===S.button&&p.action===S.action&&p.ctrl===S.ctrl&&p.alt===S.alt&&p.shift===S.shift}};a.CoreMouseService=f=g([x(0,h.IBufferService),x(1,h.ICoreService)],f)},6975:function(y,a,d){var g=this&&this.__decorate||function(f,p,S,k){var j,A=arguments.length,D=A<3?p:k===null?k=Object.getOwnPropertyDescriptor(p,S):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(f,p,S,k);else for(var L=f.length-1;L>=0;L--)(j=f[L])&&(D=(A<3?j(D):A>3?j(p,S,D):j(p,S))||D);return A>3&&D&&Object.defineProperty(p,S,D),D},x=this&&this.__param||function(f,p){return function(S,k){p(S,k,f)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const h=d(1439),_=d(8460),N=d(844),E=d(2585),b=Object.freeze({insertMode:!1}),l=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let m=a.CoreService=class extends N.Disposable{constructor(f,p,S){super(),this._bufferService=f,this._logService=p,this._optionsService=S,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new _.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new _.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new _.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new _.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(b),this.decPrivateModes=(0,h.clone)(l)}reset(){this.modes=(0,h.clone)(b),this.decPrivateModes=(0,h.clone)(l)}triggerDataEvent(f,p=!1){if(this._optionsService.rawOptions.disableStdin)return;const S=this._bufferService.buffer;p&&this._optionsService.rawOptions.scrollOnUserInput&&S.ybase!==S.ydisp&&this._onRequestScrollToBottom.fire(),p&&this._onUserInput.fire(),this._logService.debug(`sending data "${f}"`,()=>f.split("").map(k=>k.charCodeAt(0))),this._onData.fire(f)}triggerBinaryEvent(f){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${f}"`,()=>f.split("").map(p=>p.charCodeAt(0))),this._onBinary.fire(f))}};a.CoreService=m=g([x(0,E.IBufferService),x(1,E.ILogService),x(2,E.IOptionsService)],m)},9074:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const g=d(8055),x=d(8460),h=d(844),_=d(6106);let N=0,E=0;class b extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new _.SortedList(f=>f==null?void 0:f.marker.line),this._onDecorationRegistered=this.register(new x.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new x.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)(()=>this.reset()))}registerDecoration(f){if(f.marker.isDisposed)return;const p=new l(f);if(p){const S=p.marker.onDispose(()=>p.dispose());p.onDispose(()=>{p&&(this._decorations.delete(p)&&this._onDecorationRemoved.fire(p),S.dispose())}),this._decorations.insert(p),this._onDecorationRegistered.fire(p)}return p}reset(){for(const f of this._decorations.values())f.dispose();this._decorations.clear()}*getDecorationsAtCell(f,p,S){let k=0,j=0;for(const A of this._decorations.getKeyIterator(p))k=A.options.x??0,j=k+(A.options.width??1),f>=k&&f<j&&(!S||(A.options.layer??"bottom")===S)&&(yield A)}forEachDecorationAtCell(f,p,S,k){this._decorations.forEachByKey(p,j=>{N=j.options.x??0,E=N+(j.options.width??1),f>=N&&f<E&&(!S||(j.options.layer??"bottom")===S)&&k(j)})}}a.DecorationService=b;class l extends h.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 x.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new x.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:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const g=d(2585),x=d(8343);class h{constructor(...N){this._entries=new Map;for(const[E,b]of N)this.set(E,b)}set(N,E){const b=this._entries.get(N);return this._entries.set(N,E),b}forEach(N){for(const[E,b]of this._entries.entries())N(E,b)}has(N){return this._entries.has(N)}get(N){return this._entries.get(N)}}a.ServiceCollection=h,a.InstantiationService=class{constructor(){this._services=new h,this._services.set(g.IInstantiationService,this)}setService(_,N){this._services.set(_,N)}getService(_){return this._services.get(_)}createInstance(_,...N){const E=(0,x.getServiceDependencies)(_).sort((m,f)=>m.index-f.index),b=[];for(const m of E){const f=this._services.get(m.id);if(!f)throw new Error(`[createInstance] ${_.name} depends on UNKNOWN service ${m.id}.`);b.push(f)}const l=E.length>0?E[0].index:N.length;if(N.length!==l)throw new Error(`[createInstance] First service dependency of ${_.name} at position ${l+1} conflicts with ${N.length} static arguments`);return new _(...N,...b)}}},7866:function(y,a,d){var g=this&&this.__decorate||function(l,m,f,p){var S,k=arguments.length,j=k<3?m:p===null?p=Object.getOwnPropertyDescriptor(m,f):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(l,m,f,p);else for(var A=l.length-1;A>=0;A--)(S=l[A])&&(j=(k<3?S(j):k>3?S(m,f,j):S(m,f))||j);return k>3&&j&&Object.defineProperty(m,f,j),j},x=this&&this.__param||function(l,m){return function(f,p){m(f,p,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const h=d(844),_=d(2585),N={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let E,b=a.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(l){super(),this._optionsService=l,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),E=this}_updateLogLevel(){this._logLevel=N[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<=_.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<=_.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<=_.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<=_.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<=_.LogLevelEnum.ERROR&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.error.bind(this._optionsService.options.logger))??console.error,l,m)}};a.LogService=b=g([x(0,_.IOptionsService)],b),a.setTraceLogger=function(l){E=l},a.traceCall=function(l,m,f){if(typeof f.value!="function")throw new Error("not supported");const p=f.value;f.value=function(...S){if(E.logLevel!==_.LogLevelEnum.TRACE)return p.apply(this,S);E.trace(`GlyphRenderer#${p.name}(${S.map(j=>JSON.stringify(j)).join(", ")})`);const k=p.apply(this,S);return E.trace(`GlyphRenderer#${p.name} return`,k),k}}},7302:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const g=d(8460),x=d(844),h=d(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const _=["normal","bold","100","200","300","400","500","600","700","800","900"];class N extends x.Disposable{constructor(b){super(),this._onOptionChange=this.register(new g.EventEmitter),this.onOptionChange=this._onOptionChange.event;const l={...a.DEFAULT_OPTIONS};for(const m in b)if(m in l)try{const f=b[m];l[m]=this._sanitizeAndValidateOption(m,f)}catch(f){console.error(f)}this.rawOptions=l,this.options={...l},this._setupOptions(),this.register((0,x.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(b,l){return this.onOptionChange(m=>{m===b&&l(this.rawOptions[b])})}onMultipleOptionChange(b,l){return this.onOptionChange(m=>{b.indexOf(m)!==-1&&l()})}_setupOptions(){const b=m=>{if(!(m in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);return this.rawOptions[m]},l=(m,f)=>{if(!(m in a.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:b.bind(this,m),set:l.bind(this,m)};Object.defineProperty(this.options,m,f)}}_sanitizeAndValidateOption(b,l){switch(b){case"cursorStyle":if(l||(l=a.DEFAULT_OPTIONS[b]),!function(m){return m==="block"||m==="underline"||m==="bar"}(l))throw new Error(`"${l}" is not a valid value for ${b}`);break;case"wordSeparator":l||(l=a.DEFAULT_OPTIONS[b]);break;case"fontWeight":case"fontWeightBold":if(typeof l=="number"&&1<=l&&l<=1e3)break;l=_.includes(l)?l:a.DEFAULT_OPTIONS[b];break;case"cursorWidth":l=Math.floor(l);case"lineHeight":case"tabStopWidth":if(l<1)throw new Error(`${b} 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(`${b} cannot be less than 0, value: ${l}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(l<=0)throw new Error(`${b} cannot be less than or equal to 0, value: ${l}`);break;case"rows":case"cols":if(!l&&l!==0)throw new Error(`${b} must be numeric, value: ${l}`);break;case"windowsPty":l=l??{}}return l}}a.OptionsService=N},2660:function(y,a,d){var g=this&&this.__decorate||function(N,E,b,l){var m,f=arguments.length,p=f<3?E:l===null?l=Object.getOwnPropertyDescriptor(E,b):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(N,E,b,l);else for(var S=N.length-1;S>=0;S--)(m=N[S])&&(p=(f<3?m(p):f>3?m(E,b,p):m(E,b))||p);return f>3&&p&&Object.defineProperty(E,b,p),p},x=this&&this.__param||function(N,E){return function(b,l){E(b,l,N)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const h=d(2585);let _=a.OscLinkService=class{constructor(N){this._bufferService=N,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(N){const E=this._bufferService.buffer;if(N.id===void 0){const S=E.addMarker(E.ybase+E.y),k={data:N,id:this._nextId++,lines:[S]};return S.onDispose(()=>this._removeMarkerFromLink(k,S)),this._dataByLinkId.set(k.id,k),k.id}const b=N,l=this._getEntryIdKey(b),m=this._entriesWithId.get(l);if(m)return this.addLineToLink(m.id,E.ybase+E.y),m.id;const f=E.addMarker(E.ybase+E.y),p={id:this._nextId++,key:this._getEntryIdKey(b),data:b,lines:[f]};return f.onDispose(()=>this._removeMarkerFromLink(p,f)),this._entriesWithId.set(p.key,p),this._dataByLinkId.set(p.id,p),p.id}addLineToLink(N,E){const b=this._dataByLinkId.get(N);if(b&&b.lines.every(l=>l.line!==E)){const l=this._bufferService.buffer.addMarker(E);b.lines.push(l),l.onDispose(()=>this._removeMarkerFromLink(b,l))}}getLinkData(N){var E;return(E=this._dataByLinkId.get(N))==null?void 0:E.data}_getEntryIdKey(N){return`${N.id};;${N.uri}`}_removeMarkerFromLink(N,E){const b=N.lines.indexOf(E);b!==-1&&(N.lines.splice(b,1),N.lines.length===0&&(N.data.id!==void 0&&this._entriesWithId.delete(N.key),this._dataByLinkId.delete(N.id)))}};a.OscLinkService=_=g([x(0,h.IBufferService)],_)},8343:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const d="di$target",g="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(x){return x[g]||[]},a.createDecorator=function(x){if(a.serviceRegistry.has(x))return a.serviceRegistry.get(x);const h=function(_,N,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(b,l,m){l[d]===l?l[g].push({id:b,index:m}):(l[g]=[{id:b,index:m}],l[d]=l)})(h,_,E)};return h.toString=()=>x,a.serviceRegistry.set(x,h),h}},2585:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const g=d(8343);var x;a.IBufferService=(0,g.createDecorator)("BufferService"),a.ICoreMouseService=(0,g.createDecorator)("CoreMouseService"),a.ICoreService=(0,g.createDecorator)("CoreService"),a.ICharsetService=(0,g.createDecorator)("CharsetService"),a.IInstantiationService=(0,g.createDecorator)("InstantiationService"),function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"}(x||(a.LogLevelEnum=x={})),a.ILogService=(0,g.createDecorator)("LogService"),a.IOptionsService=(0,g.createDecorator)("OptionsService"),a.IOscLinkService=(0,g.createDecorator)("OscLinkService"),a.IUnicodeService=(0,g.createDecorator)("UnicodeService"),a.IDecorationService=(0,g.createDecorator)("DecorationService")},1480:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const g=d(8460),x=d(225);class h{static extractShouldJoin(N){return(1&N)!=0}static extractWidth(N){return N>>1&3}static extractCharKind(N){return N>>3}static createPropertyValue(N,E,b=!1){return(16777215&N)<<3|(3&E)<<1|(b?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new g.EventEmitter,this.onChange=this._onChange.event;const N=new x.UnicodeV6;this.register(N),this._active=N.version,this._activeProvider=N}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(N){if(!this._providers[N])throw new Error(`unknown Unicode version "${N}"`);this._active=N,this._activeProvider=this._providers[N],this._onChange.fire(N)}register(N){this._providers[N.version]=N}wcwidth(N){return this._activeProvider.wcwidth(N)}getStringCellWidth(N){let E=0,b=0;const l=N.length;for(let m=0;m<l;++m){let f=N.charCodeAt(m);if(55296<=f&&f<=56319){if(++m>=l)return E+this.wcwidth(f);const k=N.charCodeAt(m);56320<=k&&k<=57343?f=1024*(f-55296)+k-56320+65536:E+=this.wcwidth(k)}const p=this.charProperties(f,b);let S=h.extractWidth(p);h.extractShouldJoin(p)&&(S-=h.extractWidth(b)),E+=S,b=p}return E}charProperties(N,E){return this._activeProvider.charProperties(N,E)}}a.UnicodeService=h}},v={};function C(y){var a=v[y];if(a!==void 0)return a.exports;var d=v[y]={exports:{}};return c[y].call(d.exports,d,d.exports,C),d.exports}var R={};return(()=>{var y=R;Object.defineProperty(y,"__esModule",{value:!0}),y.Terminal=void 0;const a=C(9042),d=C(3236),g=C(844),x=C(5741),h=C(8285),_=C(7975),N=C(7090),E=["cols","rows"];class b extends g.Disposable{constructor(m){super(),this._core=this.register(new d.Terminal(m)),this._addonManager=this.register(new x.AddonManager),this._publicOptions={...this._core.options};const f=S=>this._core.options[S],p=(S,k)=>{this._checkReadonlyOptions(S),this._core.options[S]=k};for(const S in this._core.options){const k={get:f.bind(this,S),set:p.bind(this,S)};Object.defineProperty(this._publicOptions,S,k)}}_checkReadonlyOptions(m){if(E.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 _.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new N.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 h.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,p){this._verifyIntegers(m,f,p),this._core.select(m,f,p)}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 a}_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")}}y.Terminal=b})(),R})())})(VS);var g3=VS.exports,BS={exports:{}};(function(r,s){(function(c,v){r.exports=v()})(self,()=>(()=>{var c={965:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GlyphRenderer=void 0;const g=d(374),x=d(509),h=d(855),_=d(859),N=d(381),E=11,b=E*Float32Array.BYTES_PER_ELEMENT;let l,m=0,f=0,p=0;class S extends _.Disposable{constructor(j,A,D,L){super(),this._terminal=j,this._gl=A,this._dimensions=D,this._optionsService=L,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const O=this._gl;x.TextureAtlas.maxAtlasPages===void 0&&(x.TextureAtlas.maxAtlasPages=Math.min(32,(0,g.throwIfFalsy)(O.getParameter(O.MAX_TEXTURE_IMAGE_UNITS))),x.TextureAtlas.maxTextureSize=(0,g.throwIfFalsy)(O.getParameter(O.MAX_TEXTURE_SIZE))),this._program=(0,g.throwIfFalsy)((0,N.createProgram)(O,`#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(ee){let te="";for(let se=1;se<ee;se++)te+=` else if (v_texpage == ${se}) { outColor = texture(u_texture[${se}], 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[${ee}];
|
|
241
|
+
|
|
242
|
+
out vec4 outColor;
|
|
243
|
+
|
|
244
|
+
void main() {
|
|
245
|
+
if (v_texpage == 0) {
|
|
246
|
+
outColor = texture(u_texture[0], v_texcoord);
|
|
247
|
+
} ${te}
|
|
248
|
+
}`}(x.TextureAtlas.maxAtlasPages))),this.register((0,_.toDisposable)(()=>O.deleteProgram(this._program))),this._projectionLocation=(0,g.throwIfFalsy)(O.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,g.throwIfFalsy)(O.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,g.throwIfFalsy)(O.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=O.createVertexArray(),O.bindVertexArray(this._vertexArrayObject);const F=new Float32Array([0,0,1,0,0,1,1,1]),P=O.createBuffer();this.register((0,_.toDisposable)(()=>O.deleteBuffer(P))),O.bindBuffer(O.ARRAY_BUFFER,P),O.bufferData(O.ARRAY_BUFFER,F,O.STATIC_DRAW),O.enableVertexAttribArray(0),O.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const B=new Uint8Array([0,1,2,3]),G=O.createBuffer();this.register((0,_.toDisposable)(()=>O.deleteBuffer(G))),O.bindBuffer(O.ELEMENT_ARRAY_BUFFER,G),O.bufferData(O.ELEMENT_ARRAY_BUFFER,B,O.STATIC_DRAW),this._attributesBuffer=(0,g.throwIfFalsy)(O.createBuffer()),this.register((0,_.toDisposable)(()=>O.deleteBuffer(this._attributesBuffer))),O.bindBuffer(O.ARRAY_BUFFER,this._attributesBuffer),O.enableVertexAttribArray(2),O.vertexAttribPointer(2,2,O.FLOAT,!1,b,0),O.vertexAttribDivisor(2,1),O.enableVertexAttribArray(3),O.vertexAttribPointer(3,2,O.FLOAT,!1,b,2*Float32Array.BYTES_PER_ELEMENT),O.vertexAttribDivisor(3,1),O.enableVertexAttribArray(4),O.vertexAttribPointer(4,1,O.FLOAT,!1,b,4*Float32Array.BYTES_PER_ELEMENT),O.vertexAttribDivisor(4,1),O.enableVertexAttribArray(5),O.vertexAttribPointer(5,2,O.FLOAT,!1,b,5*Float32Array.BYTES_PER_ELEMENT),O.vertexAttribDivisor(5,1),O.enableVertexAttribArray(6),O.vertexAttribPointer(6,2,O.FLOAT,!1,b,7*Float32Array.BYTES_PER_ELEMENT),O.vertexAttribDivisor(6,1),O.enableVertexAttribArray(1),O.vertexAttribPointer(1,2,O.FLOAT,!1,b,9*Float32Array.BYTES_PER_ELEMENT),O.vertexAttribDivisor(1,1),O.useProgram(this._program);const ne=new Int32Array(x.TextureAtlas.maxAtlasPages);for(let ee=0;ee<x.TextureAtlas.maxAtlasPages;ee++)ne[ee]=ee;O.uniform1iv(this._textureLocation,ne),O.uniformMatrix4fv(this._projectionLocation,!1,N.PROJECTION_MATRIX),this._atlasTextures=[];for(let ee=0;ee<x.TextureAtlas.maxAtlasPages;ee++){const te=new N.GLTexture((0,g.throwIfFalsy)(O.createTexture()));this.register((0,_.toDisposable)(()=>O.deleteTexture(te.texture))),O.activeTexture(O.TEXTURE0+ee),O.bindTexture(O.TEXTURE_2D,te.texture),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_S,O.CLAMP_TO_EDGE),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_T,O.CLAMP_TO_EDGE),O.texImage2D(O.TEXTURE_2D,0,O.RGBA,1,1,0,O.RGBA,O.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[ee]=te}O.enable(O.BLEND),O.blendFunc(O.SRC_ALPHA,O.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(j,A,D,L,O,F,P,B,G){this._updateCell(this._vertices.attributes,j,A,D,L,O,F,P,B,G)}_updateCell(j,A,D,L,O,F,P,B,G,ne){m=(D*this._terminal.cols+A)*E,L!==h.NULL_CELL_CODE&&L!==void 0?this._atlas&&(l=B&&B.length>1?this._atlas.getRasterizedGlyphCombinedChar(B,O,F,P,!1):this._atlas.getRasterizedGlyph(L,O,F,P,!1),f=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),O!==ne&&l.offset.x>f?(p=l.offset.x-f,j[m]=-(l.offset.x-p)+this._dimensions.device.char.left,j[m+1]=-l.offset.y+this._dimensions.device.char.top,j[m+2]=(l.size.x-p)/this._dimensions.device.canvas.width,j[m+3]=l.size.y/this._dimensions.device.canvas.height,j[m+4]=l.texturePage,j[m+5]=l.texturePositionClipSpace.x+p/this._atlas.pages[l.texturePage].canvas.width,j[m+6]=l.texturePositionClipSpace.y,j[m+7]=l.sizeClipSpace.x-p/this._atlas.pages[l.texturePage].canvas.width,j[m+8]=l.sizeClipSpace.y):(j[m]=-l.offset.x+this._dimensions.device.char.left,j[m+1]=-l.offset.y+this._dimensions.device.char.top,j[m+2]=l.size.x/this._dimensions.device.canvas.width,j[m+3]=l.size.y/this._dimensions.device.canvas.height,j[m+4]=l.texturePage,j[m+5]=l.texturePositionClipSpace.x,j[m+6]=l.texturePositionClipSpace.y,j[m+7]=l.sizeClipSpace.x,j[m+8]=l.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,g.allowRescaling)(L,G,l.size.x,this._dimensions.device.cell.width)&&(j[m+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):j.fill(0,m,m+E-1-2)}clear(){const j=this._terminal,A=j.cols*j.rows*E;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 L=0;L<j.rows;L++)for(let O=0;O<j.cols;O++)this._vertices.attributes[D+9]=O/j.cols,this._vertices.attributes[D+10]=L/j.rows,D+=E}handleResize(){const j=this._gl;j.useProgram(this._program),j.viewport(0,0,j.canvas.width,j.canvas.height),j.uniform2f(this._resolutionLocation,j.canvas.width,j.canvas.height),this.clear()}render(j){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 L=0;for(let O=0;O<j.lineLengths.length;O++){const F=O*this._terminal.cols*E,P=this._vertices.attributes.subarray(F,F+j.lineLengths[O]*E);D.set(P,L),L+=P.length}A.bindBuffer(A.ARRAY_BUFFER,this._attributesBuffer),A.bufferData(A.ARRAY_BUFFER,D.subarray(0,L),A.STREAM_DRAW);for(let O=0;O<this._atlas.pages.length;O++)this._atlas.pages[O].version!==this._atlasTextures[O].version&&this._bindAtlasPageTexture(A,this._atlas,O);A.drawElementsInstanced(A.TRIANGLE_STRIP,4,A.UNSIGNED_BYTE,0,L/E)}setAtlas(j){this._atlas=j;for(const A of this._atlasTextures)A.version=-1}_bindAtlasPageTexture(j,A,D){j.activeTexture(j.TEXTURE0+D),j.bindTexture(j.TEXTURE_2D,this._atlasTextures[D].texture),j.texParameteri(j.TEXTURE_2D,j.TEXTURE_WRAP_S,j.CLAMP_TO_EDGE),j.texParameteri(j.TEXTURE_2D,j.TEXTURE_WRAP_T,j.CLAMP_TO_EDGE),j.texImage2D(j.TEXTURE_2D,0,j.RGBA,j.RGBA,j.UNSIGNED_BYTE,A.pages[D].canvas),j.generateMipmap(j.TEXTURE_2D),this._atlasTextures[D].version=A.pages[D].version}setDimensions(j){this._dimensions=j}}a.GlyphRenderer=S},742:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RectangleRenderer=void 0;const g=d(374),x=d(859),h=d(310),_=d(381),N=8*Float32Array.BYTES_PER_ELEMENT;class E{constructor(){this.attributes=new Float32Array(160),this.count=0}}let b=0,l=0,m=0,f=0,p=0,S=0,k=0;class j extends x.Disposable{constructor(D,L,O,F){super(),this._terminal=D,this._gl=L,this._dimensions=O,this._themeService=F,this._vertices=new E,this._verticesCursor=new E;const P=this._gl;this._program=(0,g.throwIfFalsy)((0,_.createProgram)(P,`#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,x.toDisposable)(()=>P.deleteProgram(this._program))),this._projectionLocation=(0,g.throwIfFalsy)(P.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=P.createVertexArray(),P.bindVertexArray(this._vertexArrayObject);const B=new Float32Array([0,0,1,0,0,1,1,1]),G=P.createBuffer();this.register((0,x.toDisposable)(()=>P.deleteBuffer(G))),P.bindBuffer(P.ARRAY_BUFFER,G),P.bufferData(P.ARRAY_BUFFER,B,P.STATIC_DRAW),P.enableVertexAttribArray(3),P.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const ne=new Uint8Array([0,1,2,3]),ee=P.createBuffer();this.register((0,x.toDisposable)(()=>P.deleteBuffer(ee))),P.bindBuffer(P.ELEMENT_ARRAY_BUFFER,ee),P.bufferData(P.ELEMENT_ARRAY_BUFFER,ne,P.STATIC_DRAW),this._attributesBuffer=(0,g.throwIfFalsy)(P.createBuffer()),this.register((0,x.toDisposable)(()=>P.deleteBuffer(this._attributesBuffer))),P.bindBuffer(P.ARRAY_BUFFER,this._attributesBuffer),P.enableVertexAttribArray(0),P.vertexAttribPointer(0,2,P.FLOAT,!1,N,0),P.vertexAttribDivisor(0,1),P.enableVertexAttribArray(1),P.vertexAttribPointer(1,2,P.FLOAT,!1,N,2*Float32Array.BYTES_PER_ELEMENT),P.vertexAttribDivisor(1,1),P.enableVertexAttribArray(2),P.vertexAttribPointer(2,4,P.FLOAT,!1,N,4*Float32Array.BYTES_PER_ELEMENT),P.vertexAttribDivisor(2,1),this._updateCachedColors(F.colors),this.register(this._themeService.onChangeColors(te=>{this._updateCachedColors(te),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(D){const L=this._gl;L.useProgram(this._program),L.bindVertexArray(this._vertexArrayObject),L.uniformMatrix4fv(this._projectionLocation,!1,_.PROJECTION_MATRIX),L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.bufferData(L.ARRAY_BUFFER,D.attributes,L.DYNAMIC_DRAW),L.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,L.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 L=this._terminal,O=this._vertices;let F,P,B,G,ne,ee,te,se,I,W,X,K=1;for(F=0;F<L.rows;F++){for(B=-1,G=0,ne=0,ee=!1,P=0;P<L.cols;P++)te=(F*L.cols+P)*h.RENDER_MODEL_INDICIES_PER_CELL,se=D.cells[te+h.RENDER_MODEL_BG_OFFSET],I=D.cells[te+h.RENDER_MODEL_FG_OFFSET],W=!!(67108864&I),(se!==G||I!==ne&&(ee||W))&&((G!==0||ee&&ne!==0)&&(X=8*K++,this._updateRectangle(O,X,ne,G,B,P,F)),B=P,G=se,ne=I,ee=W);(G!==0||ee&&ne!==0)&&(X=8*K++,this._updateRectangle(O,X,ne,G,B,L.cols,F))}O.count=K}updateCursor(D){const L=this._verticesCursor,O=D.cursor;if(!O||O.style==="block")return void(L.count=0);let F,P=0;O.style!=="bar"&&O.style!=="outline"||(F=8*P++,this._addRectangleFloat(L.attributes,F,O.x*this._dimensions.device.cell.width,O.y*this._dimensions.device.cell.height,O.style==="bar"?O.dpr*O.cursorWidth:O.dpr,this._dimensions.device.cell.height,this._cursorFloat)),O.style!=="underline"&&O.style!=="outline"||(F=8*P++,this._addRectangleFloat(L.attributes,F,O.x*this._dimensions.device.cell.width,(O.y+1)*this._dimensions.device.cell.height-O.dpr,O.width*this._dimensions.device.cell.width,O.dpr,this._cursorFloat)),O.style==="outline"&&(F=8*P++,this._addRectangleFloat(L.attributes,F,O.x*this._dimensions.device.cell.width,O.y*this._dimensions.device.cell.height,O.width*this._dimensions.device.cell.width,O.dpr,this._cursorFloat),F=8*P++,this._addRectangleFloat(L.attributes,F,(O.x+O.width)*this._dimensions.device.cell.width-O.dpr,O.y*this._dimensions.device.cell.height,O.dpr,this._dimensions.device.cell.height,this._cursorFloat)),L.count=P}_updateRectangle(D,L,O,F,P,B,G){if(67108864&O)switch(50331648&O){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&O].rgba;break;case 50331648:b=(16777215&O)<<8;break;default:b=this._themeService.colors.foreground.rgba}else switch(50331648&F){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&F].rgba;break;case 50331648:b=(16777215&F)<<8;break;default:b=this._themeService.colors.background.rgba}D.attributes.length<L+4&&(D.attributes=(0,_.expandFloat32Array)(D.attributes,this._terminal.rows*this._terminal.cols*8)),l=P*this._dimensions.device.cell.width,m=G*this._dimensions.device.cell.height,f=(b>>24&255)/255,p=(b>>16&255)/255,S=(b>>8&255)/255,k=1,this._addRectangle(D.attributes,L,l,m,(B-P)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,f,p,S,k)}_addRectangle(D,L,O,F,P,B,G,ne,ee,te){D[L]=O/this._dimensions.device.canvas.width,D[L+1]=F/this._dimensions.device.canvas.height,D[L+2]=P/this._dimensions.device.canvas.width,D[L+3]=B/this._dimensions.device.canvas.height,D[L+4]=G,D[L+5]=ne,D[L+6]=ee,D[L+7]=te}_addRectangleFloat(D,L,O,F,P,B,G){D[L]=O/this._dimensions.device.canvas.width,D[L+1]=F/this._dimensions.device.canvas.height,D[L+2]=P/this._dimensions.device.canvas.width,D[L+3]=B/this._dimensions.device.canvas.height,D[L+4]=G[0],D[L+5]=G[1],D[L+6]=G[2],D[L+7]=G[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])}}a.RectangleRenderer=j},310:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderModel=a.COMBINED_CHAR_BIT_MASK=a.RENDER_MODEL_EXT_OFFSET=a.RENDER_MODEL_FG_OFFSET=a.RENDER_MODEL_BG_OFFSET=a.RENDER_MODEL_INDICIES_PER_CELL=void 0;const g=d(296);a.RENDER_MODEL_INDICIES_PER_CELL=4,a.RENDER_MODEL_BG_OFFSET=1,a.RENDER_MODEL_FG_OFFSET=2,a.RENDER_MODEL_EXT_OFFSET=3,a.COMBINED_CHAR_BIT_MASK=2147483648,a.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,g.createSelectionRenderModel)()}resize(x,h){const _=x*h*a.RENDER_MODEL_INDICIES_PER_CELL;_!==this.cells.length&&(this.cells=new Uint32Array(_),this.lineLengths=new Uint32Array(h))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.JoinedCellData=a.WebglRenderer=void 0;const g=d(820),x=d(274),h=d(627),_=d(457),N=d(56),E=d(374),b=d(345),l=d(859),m=d(147),f=d(782),p=d(855),S=d(965),k=d(742),j=d(310),A=d(733);class D extends l.Disposable{constructor(P,B,G,ne,ee,te,se,I,W){super(),this._terminal=P,this._characterJoinerService=B,this._charSizeService=G,this._coreBrowserService=ne,this._coreService=ee,this._decorationService=te,this._optionsService=se,this._themeService=I,this._cursorBlinkStateManager=new l.MutableDisposable,this._charAtlasDisposable=this.register(new l.MutableDisposable),this._observerDisposable=this.register(new l.MutableDisposable),this._model=new j.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 b.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new b.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new b.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new b.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new b.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new x.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,se,this._themeService)],this.dimensions=(0,E.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(se.onOptionChange(()=>this._handleOptionsChanged())),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const X={antialias:!1,depth:!1,preserveDrawingBuffer:W};if(this._gl=this._canvas.getContext("webgl2",X),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,g.addDisposableDomListener)(this._canvas,"webglcontextlost",K=>{console.log("webglcontextlost event received"),K.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(K)},3e3)})),this.register((0,g.addDisposableDomListener)(this._canvas,"webglcontextrestored",K=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,h.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=(0,N.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(K,ve)=>this._setCanvasDevicePixelDimensions(K,ve)),this.register(this._coreBrowserService.onWindowChange(K=>{this._observerDisposable.value=(0,N.observeDevicePixelDimensions)(this._canvas,K,(ve,he)=>this._setCanvasDevicePixelDimensions(ve,he))})),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 K;for(const ve of this._renderLayers)ve.dispose();(K=this._canvas.parentElement)==null||K.removeChild(this._canvas),(0,h.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){var P;return(P=this._charAtlas)==null?void 0:P.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(P,B){var G,ne,ee,te;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const se of this._renderLayers)se.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`,(G=this._rectangleRenderer.value)==null||G.setDimensions(this.dimensions),(ne=this._rectangleRenderer.value)==null||ne.handleResize(),(ee=this._glyphRenderer.value)==null||ee.setDimensions(this.dimensions),(te=this._glyphRenderer.value)==null||te.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var P;for(const B of this._renderLayers)B.handleBlur(this._terminal);(P=this._cursorBlinkStateManager.value)==null||P.pause(),this._requestRedrawViewport()}handleFocus(){var P;for(const B of this._renderLayers)B.handleFocus(this._terminal);(P=this._cursorBlinkStateManager.value)==null||P.resume(),this._requestRedrawViewport()}handleSelectionChanged(P,B,G){for(const ne of this._renderLayers)ne.handleSelectionChanged(this._terminal,P,B,G);this._model.selection.update(this._core,P,B,G),this._requestRedrawViewport()}handleCursorMove(){var P;for(const B of this._renderLayers)B.handleCursorMove(this._terminal);(P=this._cursorBlinkStateManager.value)==null||P.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new k.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new S.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var B;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const P=(0,h.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!==P&&(this._onChangeTextureAtlas.fire(P.pages[0].canvas),this._charAtlasDisposable.value=(0,l.getDisposeArrayDisposable)([(0,b.forwardEvent)(P.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,b.forwardEvent)(P.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=P,this._charAtlas.warmUp(),(B=this._glyphRenderer.value)==null||B.setAtlas(this._charAtlas)}_clearModel(P){var B;this._model.clear(),P&&((B=this._glyphRenderer.value)==null||B.clear())}clearTextureAtlas(){var P;(P=this._charAtlas)==null||P.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var P;this._clearModel(!0);for(const B of this._renderLayers)B.reset(this._terminal);(P=this._cursorBlinkStateManager.value)==null||P.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(P){return-1}deregisterCharacterJoiner(P){return!1}renderRows(P,B){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const G of this._renderLayers)G.handleGridChanged(this._terminal,P,B);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(P,B),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new _.CursorBlinkStateManager(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(P,B){const G=this._core;let ne,ee,te,se,I,W,X,K,ve,he,Ae,me,ie,$,_e=this._workCell;P=O(P,G.rows-1,0),B=O(B,G.rows-1,0);const ue=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,Ie=ue-G.buffer.ydisp,Ue=Math.min(this._terminal.buffer.active.cursorX,G.cols-1);let nt=-1;const et=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let st=!1;for(ee=P;ee<=B;ee++)for(te=ee+G.buffer.ydisp,se=G.buffer.lines.get(te),this._model.lineLengths[ee]=0,I=this._characterJoinerService.getJoinedCharacters(te),ie=0;ie<G.cols;ie++)if(ne=this._cellColorResolver.result.bg,se.loadCell(ie,_e),ie===0&&(ne=this._cellColorResolver.result.bg),W=!1,X=ie,I.length>0&&ie===I[0][0]&&(W=!0,K=I.shift(),_e=new L(_e,se.translateToString(!0,K[0],K[1]),K[1]-K[0]),X=K[1]-1),ve=_e.getChars(),he=_e.getCode(),me=(ee*G.cols+ie)*j.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(_e,ie,te,this.dimensions.device.cell.width),et&&te===ue&&(ie===Ue&&(this._model.cursor={x:Ue,y:Ie,width:_e.getWidth(),style:this._coreBrowserService.isFocused?G.options.cursorStyle||"block":G.options.cursorInactiveStyle,cursorWidth:G.options.cursorWidth,dpr:this._devicePixelRatio},nt=Ue+_e.getWidth()-1),ie>=Ue&&ie<=nt&&(this._coreBrowserService.isFocused&&(G.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&G.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)),he!==p.NULL_CELL_CODE&&(this._model.lineLengths[ee]=ie+1),(this._model.cells[me]!==he||this._model.cells[me+j.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[me+j.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[me+j.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(st=!0,ve.length>1&&(he|=j.COMBINED_CHAR_BIT_MASK),this._model.cells[me]=he,this._model.cells[me+j.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[me+j.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[me+j.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,Ae=_e.getWidth(),this._glyphRenderer.value.updateCell(ie,ee,he,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,ve,Ae,ne),W))for(_e=this._workCell,ie++;ie<X;ie++)$=(ee*G.cols+ie)*j.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(ie,ee,p.NULL_CELL_CODE,0,0,0,p.NULL_CELL_CHAR,0,0),this._model.cells[$]=p.NULL_CELL_CODE,this._model.cells[$+j.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[$+j.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[$+j.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(P,B){this._canvas.width===P&&this._canvas.height===B||(this._canvas.width=P,this._canvas.height=B,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const P=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:P,end:P})}}a.WebglRenderer=D;class L extends m.AttributeData{constructor(P,B,G){super(),this.content=0,this.combinedData="",this.fg=P.fg,this.bg=P.bg,this.combinedData=B,this._width=G}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(P){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function O(F,P,B=0){return Math.max(Math.min(F,P),B)}a.JoinedCellData=L},381:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GLTexture=a.expandFloat32Array=a.createShader=a.createProgram=a.PROJECTION_MATRIX=void 0;const g=d(374);function x(h,_,N){const E=(0,g.throwIfFalsy)(h.createShader(_));if(h.shaderSource(E,N),h.compileShader(E),h.getShaderParameter(E,h.COMPILE_STATUS))return E;console.error(h.getShaderInfoLog(E)),h.deleteShader(E)}a.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),a.createProgram=function(h,_,N){const E=(0,g.throwIfFalsy)(h.createProgram());if(h.attachShader(E,(0,g.throwIfFalsy)(x(h,h.VERTEX_SHADER,_))),h.attachShader(E,(0,g.throwIfFalsy)(x(h,h.FRAGMENT_SHADER,N))),h.linkProgram(E),h.getProgramParameter(E,h.LINK_STATUS))return E;console.error(h.getProgramInfoLog(E)),h.deleteProgram(E)},a.createShader=x,a.expandFloat32Array=function(h,_){const N=Math.min(2*h.length,_),E=new Float32Array(N);for(let b=0;b<h.length;b++)E[b]=h[b];return E},a.GLTexture=class{constructor(h){this.texture=h,this.version=-1}}},592:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;const g=d(627),x=d(237),h=d(374),_=d(859);class N extends _.Disposable{constructor(b,l,m,f,p,S,k,j){super(),this._container=l,this._alpha=p,this._coreBrowserService=S,this._optionsService=k,this._themeService=j,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(b,A),this.reset(b)})),this.register((0,_.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,h.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(b){}handleFocus(b){}handleCursorMove(b){}handleGridChanged(b,l,m){}handleSelectionChanged(b,l,m,f=!1){}_setTransparency(b,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(b,this._themeService.colors),this.handleGridChanged(b,0,b.rows-1)}_refreshCharAtlas(b,l){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,g.acquireTextureAtlas)(b,this._optionsService.rawOptions,l,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(b,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(b,this._themeService.colors)}_fillBottomLineAtCells(b,l,m=1){this._ctx.fillRect(b*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(b,l,m,f){this._alpha?this._ctx.clearRect(b*this._deviceCellWidth,l*this._deviceCellHeight,m*this._deviceCellWidth,f*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(b*this._deviceCellWidth,l*this._deviceCellHeight,m*this._deviceCellWidth,f*this._deviceCellHeight))}_fillCharTrueColor(b,l,m,f){this._ctx.font=this._getFont(b,!1,!1),this._ctx.textBaseline=x.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(b,l,m){this._ctx.beginPath(),this._ctx.rect(b*this._deviceCellWidth,l*this._deviceCellHeight,m*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(b,l,m){return`${m?"italic":""} ${l?b.options.fontWeightBold:b.options.fontWeight} ${b.options.fontSize*this._coreBrowserService.dpr}px ${b.options.fontFamily}`}}a.BaseRenderLayer=N},733:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;const g=d(197),x=d(237),h=d(592);class _ extends h.BaseRenderLayer{constructor(E,b,l,m,f,p,S){super(l,E,"link",b,!0,f,p,S),this.register(m.onShowLinkUnderline(k=>this._handleShowLinkUnderline(k))),this.register(m.onHideLinkUnderline(k=>this._handleHideLinkUnderline(k)))}resize(E,b){super.resize(E,b),this._state=void 0}reset(E){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const E=this._state.y2-this._state.y1-1;E>0&&this._clearCells(0,this._state.y1+1,this._state.cols,E),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(E){if(E.fg===x.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:E.fg!==void 0&&(0,g.is256Color)(E.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[E.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,E.y1===E.y2)this._fillBottomLineAtCells(E.x1,E.y1,E.x2-E.x1);else{this._fillBottomLineAtCells(E.x1,E.y1,E.cols-E.x1);for(let b=E.y1+1;b<E.y2;b++)this._fillBottomLineAtCells(0,b,E.cols);this._fillBottomLineAtCells(0,E.y2,E.x2)}this._state=E}_handleHideLinkUnderline(E){this._clearCurrentLink()}}a.LinkRenderLayer=_},820:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(d,g,x,h){d.addEventListener(g,x,h);let _=!1;return{dispose:()=>{_||(_=!0,d.removeEventListener(g,x,h))}}}},274:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellColorResolver=void 0;const g=d(855),x=d(160),h=d(374);let _,N=0,E=0,b=!1,l=!1,m=!1,f=0;a.CellColorResolver=class{constructor(p,S,k,j,A,D){this._terminal=p,this._optionService=S,this._selectionRenderModel=k,this._decorationService=j,this._coreBrowserService=A,this._themeService=D,this.result={fg:0,bg:0,ext:0}}resolve(p,S,k,j){if(this.result.bg=p.bg,this.result.fg=p.fg,this.result.ext=268435456&p.bg?p.extended.ext:0,E=0,N=0,l=!1,b=!1,m=!1,_=this._themeService.colors,f=0,p.getCode()!==g.NULL_CELL_CODE&&p.extended.underlineStyle===4){const A=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));f=S*j%(2*Math.round(A))}if(this._decorationService.forEachDecorationAtCell(S,k,"bottom",A=>{A.backgroundColorRGB&&(E=A.backgroundColorRGB.rgba>>8&16777215,l=!0),A.foregroundColorRGB&&(N=A.foregroundColorRGB.rgba>>8&16777215,b=!0)}),m=this._selectionRenderModel.isCellSelected(this._terminal,S,k),m){if(67108864&this.result.fg||50331648&this.result.bg){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:E=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:E=(16777215&this.result.fg)<<8|255;break;default:E=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:E=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:E=(16777215&this.result.bg)<<8|255}E=x.rgba.blend(E,4294967040&(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else E=(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(l=!0,_.selectionForeground&&(N=_.selectionForeground.rgba>>8&16777215,b=!0),(0,h.treatGlyphAsBackgroundColor)(p.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))N=(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)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}else 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}N=x.rgba.blend(N,4294967040&(this._coreBrowserService.isFocused?_.selectionBackgroundOpaque:_.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}b=!0}}this._decorationService.forEachDecorationAtCell(S,k,"top",A=>{A.backgroundColorRGB&&(E=A.backgroundColorRGB.rgba>>8&16777215,l=!0),A.foregroundColorRGB&&(N=A.foregroundColorRGB.rgba>>8&16777215,b=!0)}),l&&(E=m?-16777216&p.bg&-134217729|E|50331648:-16777216&p.bg|E|50331648),b&&(N=-16777216&p.fg&-67108865|N|50331648),67108864&this.result.fg&&(l&&!b&&(N=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&_.background.rgba>>8|50331648,b=!0),!l&&b&&(E=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&_.foreground.rgba>>8|50331648,l=!0)),_=void 0,this.result.bg=l?E:this.result.bg,this.result.fg=b?N:this.result.fg,this.result.ext&=536870911,this.result.ext|=f<<29&3758096384}}},627:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireTextureAtlas=void 0;const g=d(509),x=d(197),h=[];a.acquireTextureAtlas=function(_,N,E,b,l,m,f,p){const S=(0,x.generateConfig)(b,l,m,f,N,E,p);for(let A=0;A<h.length;A++){const D=h[A],L=D.ownedBy.indexOf(_);if(L>=0){if((0,x.configEquals)(D.config,S))return D.atlas;D.ownedBy.length===1?(D.atlas.dispose(),h.splice(A,1)):D.ownedBy.splice(L,1);break}}for(let A=0;A<h.length;A++){const D=h[A];if((0,x.configEquals)(D.config,S))return D.ownedBy.push(_),D.atlas}const k=_._core,j={atlas:new g.TextureAtlas(document,S,k.unicodeService),config:S,ownedBy:[_]};return h.push(j),j.atlas},a.removeTerminalFromCache=function(_){for(let N=0;N<h.length;N++){const E=h[N].ownedBy.indexOf(_);if(E!==-1){h[N].ownedBy.length===1?(h[N].atlas.dispose(),h.splice(N,1)):h[N].ownedBy.splice(E,1);break}}}},197:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;const g=d(160);a.generateConfig=function(x,h,_,N,E,b,l){const m={foreground:b.foreground,background:b.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:b.ansi.slice(),contrastCache:b.contrastCache,halfContrastCache:b.halfContrastCache};return{customGlyphs:E.customGlyphs,devicePixelRatio:l,letterSpacing:E.letterSpacing,lineHeight:E.lineHeight,deviceCellWidth:x,deviceCellHeight:h,deviceCharWidth:_,deviceCharHeight:N,fontFamily:E.fontFamily,fontSize:E.fontSize,fontWeight:E.fontWeight,fontWeightBold:E.fontWeightBold,allowTransparency:E.allowTransparency,drawBoldTextInBrightColors:E.drawBoldTextInBrightColors,minimumContrastRatio:E.minimumContrastRatio,colors:m}},a.configEquals=function(x,h){for(let _=0;_<x.colors.ansi.length;_++)if(x.colors.ansi[_].rgba!==h.colors.ansi[_].rgba)return!1;return x.devicePixelRatio===h.devicePixelRatio&&x.customGlyphs===h.customGlyphs&&x.lineHeight===h.lineHeight&&x.letterSpacing===h.letterSpacing&&x.fontFamily===h.fontFamily&&x.fontSize===h.fontSize&&x.fontWeight===h.fontWeight&&x.fontWeightBold===h.fontWeightBold&&x.allowTransparency===h.allowTransparency&&x.deviceCharWidth===h.deviceCharWidth&&x.deviceCharHeight===h.deviceCharHeight&&x.drawBoldTextInBrightColors===h.drawBoldTextInBrightColors&&x.minimumContrastRatio===h.minimumContrastRatio&&x.colors.foreground.rgba===h.colors.foreground.rgba&&x.colors.background.rgba===h.colors.background.rgba},a.is256Color=function(x){return(50331648&x)==16777216||(50331648&x)==33554432}},237:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const g=d(399);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=g.isFirefox||g.isLegacyEdge?"bottom":"ideographic"},457:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CursorBlinkStateManager=void 0,a.CursorBlinkStateManager=class{constructor(d,g){this._renderCallback=d,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(d=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)},d)}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:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.powerlineDefinitions=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;const g=d(374);a.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const x={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};a.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(b,l)=>`M0,${.5-l} L1,${.5-l} M0,${.5+l} L1,${.5+l}`},"║":{1:(b,l)=>`M${.5-b},0 L${.5-b},1 M${.5+b},0 L${.5+b},1`},"╒":{1:(b,l)=>`M.5,1 L.5,${.5-l} L1,${.5-l} M.5,${.5+l} L1,${.5+l}`},"╓":{1:(b,l)=>`M${.5-b},1 L${.5-b},.5 L1,.5 M${.5+b},.5 L${.5+b},1`},"╔":{1:(b,l)=>`M1,${.5-l} L${.5-b},${.5-l} L${.5-b},1 M1,${.5+l} L${.5+b},${.5+l} L${.5+b},1`},"╕":{1:(b,l)=>`M0,${.5-l} L.5,${.5-l} L.5,1 M0,${.5+l} L.5,${.5+l}`},"╖":{1:(b,l)=>`M${.5+b},1 L${.5+b},.5 L0,.5 M${.5-b},.5 L${.5-b},1`},"╗":{1:(b,l)=>`M0,${.5+l} L${.5-b},${.5+l} L${.5-b},1 M0,${.5-l} L${.5+b},${.5-l} L${.5+b},1`},"╘":{1:(b,l)=>`M.5,0 L.5,${.5+l} L1,${.5+l} M.5,${.5-l} L1,${.5-l}`},"╙":{1:(b,l)=>`M1,.5 L${.5-b},.5 L${.5-b},0 M${.5+b},.5 L${.5+b},0`},"╚":{1:(b,l)=>`M1,${.5-l} L${.5+b},${.5-l} L${.5+b},0 M1,${.5+l} L${.5-b},${.5+l} L${.5-b},0`},"╛":{1:(b,l)=>`M0,${.5+l} L.5,${.5+l} L.5,0 M0,${.5-l} L.5,${.5-l}`},"╜":{1:(b,l)=>`M0,.5 L${.5+b},.5 L${.5+b},0 M${.5-b},.5 L${.5-b},0`},"╝":{1:(b,l)=>`M0,${.5-l} L${.5-b},${.5-l} L${.5-b},0 M0,${.5+l} L${.5+b},${.5+l} L${.5+b},0`},"╞":{1:(b,l)=>`M.5,0 L.5,1 M.5,${.5-l} L1,${.5-l} M.5,${.5+l} L1,${.5+l}`},"╟":{1:(b,l)=>`M${.5-b},0 L${.5-b},1 M${.5+b},0 L${.5+b},1 M${.5+b},.5 L1,.5`},"╠":{1:(b,l)=>`M${.5-b},0 L${.5-b},1 M1,${.5+l} L${.5+b},${.5+l} L${.5+b},1 M1,${.5-l} L${.5+b},${.5-l} L${.5+b},0`},"╡":{1:(b,l)=>`M.5,0 L.5,1 M0,${.5-l} L.5,${.5-l} M0,${.5+l} L.5,${.5+l}`},"╢":{1:(b,l)=>`M0,.5 L${.5-b},.5 M${.5-b},0 L${.5-b},1 M${.5+b},0 L${.5+b},1`},"╣":{1:(b,l)=>`M${.5+b},0 L${.5+b},1 M0,${.5+l} L${.5-b},${.5+l} L${.5-b},1 M0,${.5-l} L${.5-b},${.5-l} L${.5-b},0`},"╤":{1:(b,l)=>`M0,${.5-l} L1,${.5-l} M0,${.5+l} L1,${.5+l} M.5,${.5+l} L.5,1`},"╥":{1:(b,l)=>`M0,.5 L1,.5 M${.5-b},.5 L${.5-b},1 M${.5+b},.5 L${.5+b},1`},"╦":{1:(b,l)=>`M0,${.5-l} L1,${.5-l} M0,${.5+l} L${.5-b},${.5+l} L${.5-b},1 M1,${.5+l} L${.5+b},${.5+l} L${.5+b},1`},"╧":{1:(b,l)=>`M.5,0 L.5,${.5-l} M0,${.5-l} L1,${.5-l} M0,${.5+l} L1,${.5+l}`},"╨":{1:(b,l)=>`M0,.5 L1,.5 M${.5-b},.5 L${.5-b},0 M${.5+b},.5 L${.5+b},0`},"╩":{1:(b,l)=>`M0,${.5+l} L1,${.5+l} M0,${.5-l} L${.5-b},${.5-l} L${.5-b},0 M1,${.5-l} L${.5+b},${.5-l} L${.5+b},0`},"╪":{1:(b,l)=>`M.5,0 L.5,1 M0,${.5-l} L1,${.5-l} M0,${.5+l} L1,${.5+l}`},"╫":{1:(b,l)=>`M0,.5 L1,.5 M${.5-b},0 L${.5-b},1 M${.5+b},0 L${.5+b},1`},"╬":{1:(b,l)=>`M0,${.5+l} L${.5-b},${.5+l} L${.5-b},1 M1,${.5+l} L${.5+b},${.5+l} L${.5+b},1 M0,${.5-l} L${.5-b},${.5-l} L${.5-b},0 M1,${.5-l} L${.5+b},${.5-l} L${.5+b},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:(b,l)=>`M.5,1 L.5,${.5+l/.15*.5} C.5,${.5+l/.15*.5},.5,.5,1,.5`},"╮":{1:(b,l)=>`M.5,1 L.5,${.5+l/.15*.5} C.5,${.5+l/.15*.5},.5,.5,0,.5`},"╯":{1:(b,l)=>`M.5,0 L.5,${.5-l/.15*.5} C.5,${.5-l/.15*.5},.5,.5,0,.5`},"╰":{1:(b,l)=>`M.5,0 L.5,${.5-l/.15*.5} C.5,${.5-l/.15*.5},.5,.5,1,.5`}},a.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.tryDrawCustomChar=function(b,l,m,f,p,S,k,j){const A=a.blockElementDefinitions[l];if(A)return function(F,P,B,G,ne,ee){for(let te=0;te<P.length;te++){const se=P[te],I=ne/8,W=ee/8;F.fillRect(B+se.x*I,G+se.y*W,se.w*I,se.h*W)}}(b,A,m,f,p,S),!0;const D=x[l];if(D)return function(F,P,B,G,ne,ee){let te=h.get(P);te||(te=new Map,h.set(P,te));const se=F.fillStyle;if(typeof se!="string")throw new Error(`Unexpected fillStyle type "${se}"`);let I=te.get(se);if(!I){const W=P[0].length,X=P.length,K=F.canvas.ownerDocument.createElement("canvas");K.width=W,K.height=X;const ve=(0,g.throwIfFalsy)(K.getContext("2d")),he=new ImageData(W,X);let Ae,me,ie,$;if(se.startsWith("#"))Ae=parseInt(se.slice(1,3),16),me=parseInt(se.slice(3,5),16),ie=parseInt(se.slice(5,7),16),$=se.length>7&&parseInt(se.slice(7,9),16)||1;else{if(!se.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${se}" when drawing pattern glyph`);[Ae,me,ie,$]=se.substring(5,se.length-1).split(",").map(_e=>parseFloat(_e))}for(let _e=0;_e<X;_e++)for(let ue=0;ue<W;ue++)he.data[4*(_e*W+ue)]=Ae,he.data[4*(_e*W+ue)+1]=me,he.data[4*(_e*W+ue)+2]=ie,he.data[4*(_e*W+ue)+3]=P[_e][ue]*(255*$);ve.putImageData(he,0,0),I=(0,g.throwIfFalsy)(F.createPattern(K,null)),te.set(se,I)}F.fillStyle=I,F.fillRect(B,G,ne,ee)}(b,D,m,f,p,S),!0;const L=a.boxDrawingDefinitions[l];if(L)return function(F,P,B,G,ne,ee,te){F.strokeStyle=F.fillStyle;for(const[se,I]of Object.entries(P)){let W;F.beginPath(),F.lineWidth=te*Number.parseInt(se),W=typeof I=="function"?I(.15,.15/ee*ne):I;for(const X of W.split(" ")){const K=X[0],ve=N[K];if(!ve){console.error(`Could not find drawing instructions for "${K}"`);continue}const he=X.substring(1).split(",");he[0]&&he[1]&&ve(F,E(he,ne,ee,B,G,!0,te))}F.stroke(),F.closePath()}}(b,L,m,f,p,S,j),!0;const O=a.powerlineDefinitions[l];return!!O&&(function(F,P,B,G,ne,ee,te,se){const I=new Path2D;I.rect(B,G,ne,ee),F.clip(I),F.beginPath();const W=te/12;F.lineWidth=se*W;for(const X of P.d.split(" ")){const K=X[0],ve=N[K];if(!ve){console.error(`Could not find drawing instructions for "${K}"`);continue}const he=X.substring(1).split(",");he[0]&&he[1]&&ve(F,E(he,ne,ee,B,G,!1,se,(P.leftPadding??0)*(W/2),(P.rightPadding??0)*(W/2)))}P.type===1?(F.strokeStyle=F.fillStyle,F.stroke()):F.fill(),F.closePath()}(b,O,m,f,p,S,k,j),!0)};const h=new Map;function _(b,l,m=0){return Math.max(Math.min(b,l),m)}const N={C:(b,l)=>b.bezierCurveTo(l[0],l[1],l[2],l[3],l[4],l[5]),L:(b,l)=>b.lineTo(l[0],l[1]),M:(b,l)=>b.moveTo(l[0],l[1])};function E(b,l,m,f,p,S,k,j=0,A=0){const D=b.map(L=>parseFloat(L)||parseInt(L));if(D.length<2)throw new Error("Too few arguments for instruction");for(let L=0;L<D.length;L+=2)D[L]*=l-j*k-A*k,S&&D[L]!==0&&(D[L]=_(Math.round(D[L]+.5)-.5,l,0)),D[L]+=f+j*k;for(let L=1;L<D.length;L+=2)D[L]*=m,S&&D[L]!==0&&(D[L]=_(Math.round(D[L]+.5)-.5,m,0)),D[L]+=p;return D}},56:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.observeDevicePixelDimensions=void 0;const g=d(859);a.observeDevicePixelDimensions=function(x,h,_){let N=new h.ResizeObserver(E=>{const b=E.find(f=>f.target===x);if(!b)return;if(!("devicePixelContentBoxSize"in b))return N==null||N.disconnect(),void(N=void 0);const l=b.devicePixelContentBoxSize[0].inlineSize,m=b.devicePixelContentBoxSize[0].blockSize;l>0&&m>0&&_(l,m)});try{N.observe(x,{box:["device-pixel-content-box"]})}catch{N.disconnect(),N=void 0}return(0,g.toDisposable)(()=>N==null?void 0:N.disconnect())}},374:(y,a)=>{function d(x){return 57508<=x&&x<=57558}function g(x){return x>=128512&&x<=128591||x>=127744&&x<=128511||x>=128640&&x<=128767||x>=9728&&x<=9983||x>=9984&&x<=10175||x>=65024&&x<=65039||x>=129280&&x<=129535||x>=127462&&x<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(x){if(!x)throw new Error("value must not be falsy");return x},a.isPowerlineGlyph=d,a.isRestrictedPowerlineGlyph=function(x){return 57520<=x&&x<=57527},a.isEmoji=g,a.allowRescaling=function(x,h,_,N){return h===1&&_>Math.ceil(1.5*N)&&x!==void 0&&x>255&&!g(x)&&!d(x)&&!function(E){return 57344<=E&&E<=63743}(x)},a.treatGlyphAsBackgroundColor=function(x){return d(x)||function(h){return 9472<=h&&h<=9631}(x)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(x,h,_=0){return(x-(2*Math.round(h)-_))%(2*Math.round(h))}},296:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class d{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(x,h,_,N=!1){if(this.selectionStart=h,this.selectionEnd=_,!h||!_||h[0]===_[0]&&h[1]===_[1])return void this.clear();const E=x.buffers.active.ydisp,b=h[1]-E,l=_[1]-E,m=Math.max(b,0),f=Math.min(l,x.rows-1);m>=x.rows||f<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=N,this.viewportStartRow=b,this.viewportEndRow=l,this.viewportCappedStartRow=m,this.viewportCappedEndRow=f,this.startCol=h[0],this.endCol=_[0])}isCellSelected(x,h,_){return!!this.hasSelection&&(_-=x.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&_>=this.viewportCappedStartRow&&h<this.endCol&&_<=this.viewportCappedEndRow:h<this.startCol&&_>=this.viewportCappedStartRow&&h>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportStartRow&&h>=this.startCol)}}a.createSelectionRenderModel=function(){return new d}},509:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TextureAtlas=void 0;const g=d(237),x=d(860),h=d(374),_=d(160),N=d(345),E=d(485),b=d(385),l=d(147),m=d(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 p;class S{get pages(){return this._pages}constructor(L,O,F){this._document=L,this._config=O,this._unicodeService=F,this._didWarmUp=!1,this._cacheMap=new E.FourKeyMap,this._cacheMapCombined=new E.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new l.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new N.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new N.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=A(L,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,h.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const L of this.pages)L.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const L=new b.IdleTaskQueue;for(let O=33;O<126;O++)L.enqueue(()=>{if(!this._cacheMap.get(O,m.DEFAULT_COLOR,m.DEFAULT_COLOR,m.DEFAULT_EXT)){const F=this._drawToCache(O,m.DEFAULT_COLOR,m.DEFAULT_COLOR,m.DEFAULT_EXT);this._cacheMap.set(O,m.DEFAULT_COLOR,m.DEFAULT_COLOR,m.DEFAULT_EXT,F)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const L of this._pages)L.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(S.maxAtlasPages&&this._pages.length>=Math.max(4,S.maxAtlasPages)){const O=this._pages.filter(te=>2*te.canvas.width<=(S.maxTextureSize||4096)).sort((te,se)=>se.canvas.width!==te.canvas.width?se.canvas.width-te.canvas.width:se.percentageUsed-te.percentageUsed);let F=-1,P=0;for(let te=0;te<O.length;te++)if(O[te].canvas.width!==P)F=te,P=O[te].canvas.width;else if(te-F==3)break;const B=O.slice(F,F+4),G=B.map(te=>te.glyphs[0].texturePage).sort((te,se)=>te>se?1:-1),ne=this.pages.length-B.length,ee=this._mergePages(B,ne);ee.version++;for(let te=G.length-1;te>=0;te--)this._deletePage(G[te]);this.pages.push(ee),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(ee.canvas)}const L=new k(this._document,this._textureSize);return this._pages.push(L),this._activePages.push(L),this._onAddTextureAtlasCanvas.fire(L.canvas),L}_mergePages(L,O){const F=2*L[0].canvas.width,P=new k(this._document,F,L);for(const[B,G]of L.entries()){const ne=B*G.canvas.width%F,ee=Math.floor(B/2)*G.canvas.height;P.ctx.drawImage(G.canvas,ne,ee);for(const se of G.glyphs)se.texturePage=O,se.sizeClipSpace.x=se.size.x/F,se.sizeClipSpace.y=se.size.y/F,se.texturePosition.x+=ne,se.texturePosition.y+=ee,se.texturePositionClipSpace.x=se.texturePosition.x/F,se.texturePositionClipSpace.y=se.texturePosition.y/F;this._onRemoveTextureAtlasCanvas.fire(G.canvas);const te=this._activePages.indexOf(G);te!==-1&&this._activePages.splice(te,1)}return P}_deletePage(L){this._pages.splice(L,1);for(let O=L;O<this._pages.length;O++){const F=this._pages[O];for(const P of F.glyphs)P.texturePage--;F.version++}}getRasterizedGlyphCombinedChar(L,O,F,P,B){return this._getFromCacheMap(this._cacheMapCombined,L,O,F,P,B)}getRasterizedGlyph(L,O,F,P,B){return this._getFromCacheMap(this._cacheMap,L,O,F,P,B)}_getFromCacheMap(L,O,F,P,B,G=!1){return p=L.get(O,F,P,B),p||(p=this._drawToCache(O,F,P,B,G),L.set(O,F,P,B,p)),p}_getColorFromAnsiIndex(L){if(L>=this._config.colors.ansi.length)throw new Error("No color found for idx "+L);return this._config.colors.ansi[L]}_getBackgroundColor(L,O,F,P){if(this._config.allowTransparency)return _.NULL_COLOR;let B;switch(L){case 16777216:case 33554432:B=this._getColorFromAnsiIndex(O);break;case 50331648:const G=l.AttributeData.toColorRGB(O);B=_.channels.toColor(G[0],G[1],G[2]);break;default:B=F?_.color.opaque(this._config.colors.foreground):this._config.colors.background}return B}_getForegroundColor(L,O,F,P,B,G,ne,ee,te,se){const I=this._getMinimumContrastColor(L,O,F,P,B,G,ne,te,ee,se);if(I)return I;let W;switch(B){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&te&&G<8&&(G+=8),W=this._getColorFromAnsiIndex(G);break;case 50331648:const X=l.AttributeData.toColorRGB(G);W=_.channels.toColor(X[0],X[1],X[2]);break;default:W=ne?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(W=_.color.opaque(W)),ee&&(W=_.color.multiplyOpacity(W,g.DIM_OPACITY)),W}_resolveBackgroundRgba(L,O,F){switch(L){case 16777216:case 33554432:return this._getColorFromAnsiIndex(O).rgba;case 50331648:return O<<8;default:return F?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(L,O,F,P){switch(L){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&P&&O<8&&(O+=8),this._getColorFromAnsiIndex(O).rgba;case 50331648:return O<<8;default:return F?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(L,O,F,P,B,G,ne,ee,te,se){if(this._config.minimumContrastRatio===1||se)return;const I=this._getContrastCache(te),W=I.getColor(L,P);if(W!==void 0)return W||void 0;const X=this._resolveBackgroundRgba(O,F,ne),K=this._resolveForegroundRgba(B,G,ne,ee),ve=_.rgba.ensureContrastRatio(X,K,this._config.minimumContrastRatio/(te?2:1));if(!ve)return void I.setColor(L,P,null);const he=_.channels.toColor(ve>>24&255,ve>>16&255,ve>>8&255);return I.setColor(L,P,he),he}_getContrastCache(L){return L?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(L,O,F,P,B=!1){const G=typeof L=="number"?String.fromCharCode(L):L,ne=Math.min(this._config.deviceCellWidth*Math.max(G.length,2)+4,this._textureSize);this._tmpCanvas.width<ne&&(this._tmpCanvas.width=ne);const ee=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<ee&&(this._tmpCanvas.height=ee),this._tmpCtx.save(),this._workAttributeData.fg=F,this._workAttributeData.bg=O,this._workAttributeData.extended.ext=P,this._workAttributeData.isInvisible())return f;const te=!!this._workAttributeData.isBold(),se=!!this._workAttributeData.isInverse(),I=!!this._workAttributeData.isDim(),W=!!this._workAttributeData.isItalic(),X=!!this._workAttributeData.isUnderline(),K=!!this._workAttributeData.isStrikethrough(),ve=!!this._workAttributeData.isOverline();let he=this._workAttributeData.getFgColor(),Ae=this._workAttributeData.getFgColorMode(),me=this._workAttributeData.getBgColor(),ie=this._workAttributeData.getBgColorMode();if(se){const re=he;he=me,me=re;const $e=Ae;Ae=ie,ie=$e}const $=this._getBackgroundColor(ie,me,se,I);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=$.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const _e=te?this._config.fontWeightBold:this._config.fontWeight,ue=W?"italic":"";this._tmpCtx.font=`${ue} ${_e} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=g.TEXT_BASELINE;const Ie=G.length===1&&(0,h.isPowerlineGlyph)(G.charCodeAt(0)),Ue=G.length===1&&(0,h.isRestrictedPowerlineGlyph)(G.charCodeAt(0)),nt=this._getForegroundColor(O,ie,me,F,Ae,he,se,I,te,(0,h.treatGlyphAsBackgroundColor)(G.charCodeAt(0)));this._tmpCtx.fillStyle=nt.css;const et=Ue?0:4;let st=!1;this._config.customGlyphs!==!1&&(st=(0,x.tryDrawCustomChar)(this._tmpCtx,G,et,et,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Dt,J=!Ie;if(Dt=typeof L=="number"?this._unicodeService.wcwidth(L):this._unicodeService.getStringCellWidth(L),X){this._tmpCtx.save();const re=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),$e=re%2==1?.5:0;if(this._tmpCtx.lineWidth=re,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())J=!1,this._tmpCtx.strokeStyle=`rgb(${l.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{J=!1;let be=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&be<8&&(be+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(be).css}this._tmpCtx.beginPath();const Ke=et,ge=Math.ceil(et+this._config.deviceCharHeight)-$e-(B?2*re:0),Ze=ge+re,Ce=ge+2*re;let Ve=this._workAttributeData.getUnderlineVariantOffset();for(let be=0;be<Dt;be++){this._tmpCtx.save();const Me=Ke+be*this._config.deviceCellWidth,He=Ke+(be+1)*this._config.deviceCellWidth,Ct=Me+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Me,ge),this._tmpCtx.lineTo(He,ge),this._tmpCtx.moveTo(Me,Ce),this._tmpCtx.lineTo(He,Ce);break;case 3:const Lt=re<=1?Ce:Math.ceil(et+this._config.deviceCharHeight-re/2)-$e,Ut=re<=1?ge:Math.ceil(et+this._config.deviceCharHeight+re/2)-$e,Vt=new Path2D;Vt.rect(Me,ge,this._config.deviceCellWidth,Ce-ge),this._tmpCtx.clip(Vt),this._tmpCtx.moveTo(Me-this._config.deviceCellWidth/2,Ze),this._tmpCtx.bezierCurveTo(Me-this._config.deviceCellWidth/2,Ut,Me,Ut,Me,Ze),this._tmpCtx.bezierCurveTo(Me,Lt,Ct,Lt,Ct,Ze),this._tmpCtx.bezierCurveTo(Ct,Ut,He,Ut,He,Ze),this._tmpCtx.bezierCurveTo(He,Lt,He+this._config.deviceCellWidth/2,Lt,He+this._config.deviceCellWidth/2,Ze);break;case 4:const dn=Ve===0?0:Ve>=re?2*re-Ve:re-Ve;Ve>=re||dn===0?(this._tmpCtx.setLineDash([Math.round(re),Math.round(re)]),this._tmpCtx.moveTo(Me+dn,ge),this._tmpCtx.lineTo(He,ge)):(this._tmpCtx.setLineDash([Math.round(re),Math.round(re)]),this._tmpCtx.moveTo(Me,ge),this._tmpCtx.lineTo(Me+dn,ge),this._tmpCtx.moveTo(Me+dn+re,ge),this._tmpCtx.lineTo(He,ge)),Ve=(0,h.computeNextVariantOffset)(He-Me,re,Ve);break;case 5:const Jt=.6,Bt=.3,zt=He-Me,an=Math.floor(Jt*zt),jn=Math.floor(Bt*zt),it=zt-an-jn;this._tmpCtx.setLineDash([an,jn,it]),this._tmpCtx.moveTo(Me,ge),this._tmpCtx.lineTo(He,ge);break;default:this._tmpCtx.moveTo(Me,ge),this._tmpCtx.lineTo(He,ge)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!st&&this._config.fontSize>=12&&!this._config.allowTransparency&&G!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const be=this._tmpCtx.measureText(G);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in be&&be.actualBoundingBoxDescent>0){this._tmpCtx.save();const Me=new Path2D;Me.rect(Ke,ge-Math.ceil(re/2),this._config.deviceCellWidth*Dt,Ce-ge+Math.ceil(re/2)),this._tmpCtx.clip(Me),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=$.css,this._tmpCtx.strokeText(G,et,et+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(ve){const re=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),$e=re%2==1?.5:0;this._tmpCtx.lineWidth=re,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(et,et+$e),this._tmpCtx.lineTo(et+this._config.deviceCharWidth*Dt,et+$e),this._tmpCtx.stroke()}if(st||this._tmpCtx.fillText(G,et,et+this._config.deviceCharHeight),G==="_"&&!this._config.allowTransparency){let re=j(this._tmpCtx.getImageData(et,et,this._config.deviceCellWidth,this._config.deviceCellHeight),$,nt,J);if(re)for(let $e=1;$e<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=$.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(G,et,et+this._config.deviceCharHeight-$e),re=j(this._tmpCtx.getImageData(et,et,this._config.deviceCellWidth,this._config.deviceCellHeight),$,nt,J),re);$e++);}if(K){const re=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),$e=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=re,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(et,et+Math.floor(this._config.deviceCharHeight/2)-$e),this._tmpCtx.lineTo(et+this._config.deviceCharWidth*Dt,et+Math.floor(this._config.deviceCharHeight/2)-$e),this._tmpCtx.stroke()}this._tmpCtx.restore();const yt=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Kt;if(Kt=this._config.allowTransparency?function(re){for(let $e=0;$e<re.data.length;$e+=4)if(re.data[$e+3]>0)return!1;return!0}(yt):j(yt,$,nt,J),Kt)return f;const Se=this._findGlyphBoundingBox(yt,this._workBoundingBox,ne,Ue,st,et);let Re,We;for(;;){if(this._activePages.length===0){const re=this._createNewPage();Re=re,We=re.currentRow,We.height=Se.size.y;break}Re=this._activePages[this._activePages.length-1],We=Re.currentRow;for(const re of this._activePages)Se.size.y<=re.currentRow.height&&(Re=re,We=re.currentRow);for(let re=this._activePages.length-1;re>=0;re--)for(const $e of this._activePages[re].fixedRows)$e.height<=We.height&&Se.size.y<=$e.height&&(Re=this._activePages[re],We=$e);if(We.y+Se.size.y>=Re.canvas.height||We.height>Se.size.y+2){let re=!1;if(Re.currentRow.y+Re.currentRow.height+Se.size.y>=Re.canvas.height){let $e;for(const Ke of this._activePages)if(Ke.currentRow.y+Ke.currentRow.height+Se.size.y<Ke.canvas.height){$e=Ke;break}if($e)Re=$e;else if(S.maxAtlasPages&&this._pages.length>=S.maxAtlasPages&&We.y+Se.size.y<=Re.canvas.height&&We.height>=Se.size.y&&We.x+Se.size.x<=Re.canvas.width)re=!0;else{const Ke=this._createNewPage();Re=Ke,We=Ke.currentRow,We.height=Se.size.y,re=!0}}re||(Re.currentRow.height>0&&Re.fixedRows.push(Re.currentRow),We={x:0,y:Re.currentRow.y+Re.currentRow.height,height:Se.size.y},Re.fixedRows.push(We),Re.currentRow={x:0,y:We.y+We.height,height:0})}if(We.x+Se.size.x<=Re.canvas.width)break;We===Re.currentRow?(We.x=0,We.y+=We.height,We.height=0):Re.fixedRows.splice(Re.fixedRows.indexOf(We),1)}return Se.texturePage=this._pages.indexOf(Re),Se.texturePosition.x=We.x,Se.texturePosition.y=We.y,Se.texturePositionClipSpace.x=We.x/Re.canvas.width,Se.texturePositionClipSpace.y=We.y/Re.canvas.height,Se.sizeClipSpace.x/=Re.canvas.width,Se.sizeClipSpace.y/=Re.canvas.height,We.height=Math.max(We.height,Se.size.y),We.x+=Se.size.x,Re.ctx.putImageData(yt,Se.texturePosition.x-this._workBoundingBox.left,Se.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Se.size.x,Se.size.y),Re.addGlyph(Se),Re.version++,Se}_findGlyphBoundingBox(L,O,F,P,B,G){O.top=0;const ne=P?this._config.deviceCellHeight:this._tmpCanvas.height,ee=P?this._config.deviceCellWidth:F;let te=!1;for(let se=0;se<ne;se++){for(let I=0;I<ee;I++){const W=se*this._tmpCanvas.width*4+4*I+3;if(L.data[W]!==0){O.top=se,te=!0;break}}if(te)break}O.left=0,te=!1;for(let se=0;se<G+ee;se++){for(let I=0;I<ne;I++){const W=I*this._tmpCanvas.width*4+4*se+3;if(L.data[W]!==0){O.left=se,te=!0;break}}if(te)break}O.right=ee,te=!1;for(let se=G+ee-1;se>=G;se--){for(let I=0;I<ne;I++){const W=I*this._tmpCanvas.width*4+4*se+3;if(L.data[W]!==0){O.right=se,te=!0;break}}if(te)break}O.bottom=ne,te=!1;for(let se=ne-1;se>=0;se--){for(let I=0;I<ee;I++){const W=se*this._tmpCanvas.width*4+4*I+3;if(L.data[W]!==0){O.bottom=se,te=!0;break}}if(te)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:O.right-O.left+1,y:O.bottom-O.top+1},sizeClipSpace:{x:O.right-O.left+1,y:O.bottom-O.top+1},offset:{x:-O.left+G+(P||B?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-O.top+G+(P||B?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}a.TextureAtlas=S;class k{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(L){this._glyphs.push(L),this._usedPixels+=L.size.x*L.size.y}constructor(L,O,F){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],F)for(const P of F)this._glyphs.push(...P.glyphs),this._usedPixels+=P._usedPixels;this.canvas=A(L,O,O),this.ctx=(0,h.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 j(D,L,O,F){const P=L.rgba>>>24,B=L.rgba>>>16&255,G=L.rgba>>>8&255,ne=O.rgba>>>24,ee=O.rgba>>>16&255,te=O.rgba>>>8&255,se=Math.floor((Math.abs(P-ne)+Math.abs(B-ee)+Math.abs(G-te))/12);let I=!0;for(let W=0;W<D.data.length;W+=4)D.data[W]===P&&D.data[W+1]===B&&D.data[W+2]===G||F&&Math.abs(D.data[W]-P)+Math.abs(D.data[W+1]-B)+Math.abs(D.data[W+2]-G)<se?D.data[W+3]=0:I=!1;return I}function A(D,L,O){const F=D.createElement("canvas");return F.width=L,F.height=O,F}},160:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let d=0,g=0,x=0,h=0;var _,N,E,b,l;function m(p){const S=p.toString(16);return S.length<2?"0"+S:S}function f(p,S){return p<S?(S+.05)/(p+.05):(p+.05)/(S+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},function(p){p.toCss=function(S,k,j,A){return A!==void 0?`#${m(S)}${m(k)}${m(j)}${m(A)}`:`#${m(S)}${m(k)}${m(j)}`},p.toRgba=function(S,k,j,A=255){return(S<<24|k<<16|j<<8|A)>>>0},p.toColor=function(S,k,j,A){return{css:p.toCss(S,k,j,A),rgba:p.toRgba(S,k,j,A)}}}(_||(a.channels=_={})),function(p){function S(k,j){return h=Math.round(255*j),[d,g,x]=l.toChannels(k.rgba),{css:_.toCss(d,g,x,h),rgba:_.toRgba(d,g,x,h)}}p.blend=function(k,j){if(h=(255&j.rgba)/255,h===1)return{css:j.css,rgba:j.rgba};const A=j.rgba>>24&255,D=j.rgba>>16&255,L=j.rgba>>8&255,O=k.rgba>>24&255,F=k.rgba>>16&255,P=k.rgba>>8&255;return d=O+Math.round((A-O)*h),g=F+Math.round((D-F)*h),x=P+Math.round((L-P)*h),{css:_.toCss(d,g,x),rgba:_.toRgba(d,g,x)}},p.isOpaque=function(k){return(255&k.rgba)==255},p.ensureContrastRatio=function(k,j,A){const D=l.ensureContrastRatio(k.rgba,j.rgba,A);if(D)return _.toColor(D>>24&255,D>>16&255,D>>8&255)},p.opaque=function(k){const j=(255|k.rgba)>>>0;return[d,g,x]=l.toChannels(j),{css:_.toCss(d,g,x),rgba:j}},p.opacity=S,p.multiplyOpacity=function(k,j){return h=255&k.rgba,S(k,h*j/255)},p.toColorRGB=function(k){return[k.rgba>>24&255,k.rgba>>16&255,k.rgba>>8&255]}}(N||(a.color=N={})),function(p){let S,k;try{const j=document.createElement("canvas");j.width=1,j.height=1;const A=j.getContext("2d",{willReadFrequently:!0});A&&(S=A,S.globalCompositeOperation="copy",k=S.createLinearGradient(0,0,1,1))}catch{}p.toColor=function(j){if(j.match(/#[\da-f]{3,8}/i))switch(j.length){case 4:return d=parseInt(j.slice(1,2).repeat(2),16),g=parseInt(j.slice(2,3).repeat(2),16),x=parseInt(j.slice(3,4).repeat(2),16),_.toColor(d,g,x);case 5:return d=parseInt(j.slice(1,2).repeat(2),16),g=parseInt(j.slice(2,3).repeat(2),16),x=parseInt(j.slice(3,4).repeat(2),16),h=parseInt(j.slice(4,5).repeat(2),16),_.toColor(d,g,x,h);case 7:return{css:j,rgba:(parseInt(j.slice(1),16)<<8|255)>>>0};case 9:return{css:j,rgba:parseInt(j.slice(1),16)>>>0}}const A=j.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 d=parseInt(A[1]),g=parseInt(A[2]),x=parseInt(A[3]),h=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),_.toColor(d,g,x,h);if(!S||!k)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=k,S.fillStyle=j,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[d,g,x,h]=S.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(d,g,x,h),css:j}}}(E||(a.css=E={})),function(p){function S(k,j,A){const D=k/255,L=j/255,O=A/255;return .2126*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}p.relativeLuminance=function(k){return S(k>>16&255,k>>8&255,255&k)},p.relativeLuminance2=S}(b||(a.rgb=b={})),function(p){function S(j,A,D){const L=j>>24&255,O=j>>16&255,F=j>>8&255;let P=A>>24&255,B=A>>16&255,G=A>>8&255,ne=f(b.relativeLuminance2(P,B,G),b.relativeLuminance2(L,O,F));for(;ne<D&&(P>0||B>0||G>0);)P-=Math.max(0,Math.ceil(.1*P)),B-=Math.max(0,Math.ceil(.1*B)),G-=Math.max(0,Math.ceil(.1*G)),ne=f(b.relativeLuminance2(P,B,G),b.relativeLuminance2(L,O,F));return(P<<24|B<<16|G<<8|255)>>>0}function k(j,A,D){const L=j>>24&255,O=j>>16&255,F=j>>8&255;let P=A>>24&255,B=A>>16&255,G=A>>8&255,ne=f(b.relativeLuminance2(P,B,G),b.relativeLuminance2(L,O,F));for(;ne<D&&(P<255||B<255||G<255);)P=Math.min(255,P+Math.ceil(.1*(255-P))),B=Math.min(255,B+Math.ceil(.1*(255-B))),G=Math.min(255,G+Math.ceil(.1*(255-G))),ne=f(b.relativeLuminance2(P,B,G),b.relativeLuminance2(L,O,F));return(P<<24|B<<16|G<<8|255)>>>0}p.blend=function(j,A){if(h=(255&A)/255,h===1)return A;const D=A>>24&255,L=A>>16&255,O=A>>8&255,F=j>>24&255,P=j>>16&255,B=j>>8&255;return d=F+Math.round((D-F)*h),g=P+Math.round((L-P)*h),x=B+Math.round((O-B)*h),_.toRgba(d,g,x)},p.ensureContrastRatio=function(j,A,D){const L=b.relativeLuminance(j>>8),O=b.relativeLuminance(A>>8);if(f(L,O)<D){if(O<L){const B=S(j,A,D),G=f(L,b.relativeLuminance(B>>8));if(G<D){const ne=k(j,A,D);return G>f(L,b.relativeLuminance(ne>>8))?B:ne}return B}const F=k(j,A,D),P=f(L,b.relativeLuminance(F>>8));if(P<D){const B=S(j,A,D);return P>f(L,b.relativeLuminance(B>>8))?F:B}return F}},p.reduceLuminance=S,p.increaseLuminance=k,p.toChannels=function(j){return[j>>24&255,j>>16&255,j>>8&255,255&j]}}(l||(a.rgba=l={})),a.toPaddedHex=m,a.contrastRatio=f},345:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let g=0;g<this._listeners.length;g++)if(this._listeners[g]===d)return void this._listeners.splice(g,1)}}})),this._event}fire(d,g){const x=[];for(let h=0;h<this._listeners.length;h++)x.push(this._listeners[h]);for(let h=0;h<x.length;h++)x[h].call(void 0,d,g)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(d,g){return d(x=>g.fire(x))},a.runAndSubscribe=function(d,g){return g(void 0),d(x=>g(x))}},859:(y,a)=>{function d(g){for(const x of g)x.dispose();g.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const g of this._disposables)g.dispose();this._disposables.length=0}register(g){return this._disposables.push(g),g}unregister(g){const x=this._disposables.indexOf(g);x!==-1&&this._disposables.splice(x,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(g){var x;this._isDisposed||g===this._value||((x=this._value)==null||x.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}},a.toDisposable=function(g){return{dispose:g}},a.disposeArray=d,a.getDisposeArrayDisposable=function(g){return{dispose:()=>d(g)}}},485:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(x,h,_){this._data[x]||(this._data[x]={}),this._data[x][h]=_}get(x,h){return this._data[x]?this._data[x][h]:void 0}clear(){this._data={}}}a.TwoKeyMap=d,a.FourKeyMap=class{constructor(){this._data=new d}set(g,x,h,_,N){this._data.get(g,x)||this._data.set(g,x,new d),this._data.get(g,x).set(h,_,N)}get(g,x,h,_){var N;return(N=this._data.get(g,x))==null?void 0:N.get(h,_)}clear(){this._data.clear()}}},399:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const d=a.isNode?"node":navigator.userAgent,g=a.isNode?"node":navigator.platform;a.isFirefox=d.includes("Firefox"),a.isLegacyEdge=d.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(d),a.getSafariVersion=function(){if(!a.isSafari)return 0;const x=d.match(/Version\/(\d+)/);return x===null||x.length<2?0:parseInt(x[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(g),a.isIpad=g==="iPad",a.isIphone=g==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(g),a.isLinux=g.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(d)},385:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const g=d(399);class x{constructor(){this._tasks=[],this._i=0}enqueue(N){this._tasks.push(N),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(N){this._idleCallback=void 0;let E=0,b=0,l=N.timeRemaining(),m=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),b=Math.max(E,b),m=N.timeRemaining(),1.5*b>m)return l-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(l-E))}ms`),void this._start();l=m}this.clear()}}class h extends x{_requestCallback(N){return setTimeout(()=>N(this._createDeadline(16)))}_cancelCallback(N){clearTimeout(N)}_createDeadline(N){const E=Date.now()+N;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}a.PriorityTaskQueue=h,a.IdleTaskQueue=!g.isNode&&"requestIdleCallback"in window?class extends x{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:h,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},147:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new g}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new d;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=d;class g{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,_=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=_}clone(){return new g(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=g},782:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const g=d(133),x=d(855),h=d(147);class _ extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const b=new _;return b.setFromCharData(E),b}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(E){this.fg=E[x.CHAR_DATA_ATTR_INDEX],this.bg=0;let b=!1;if(E[x.CHAR_DATA_CHAR_INDEX].length>2)b=!0;else if(E[x.CHAR_DATA_CHAR_INDEX].length===2){const l=E[x.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=l&&l<=56319){const m=E[x.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=m&&m<=57343?this.content=1024*(l-55296)+m-56320+65536|E[x.CHAR_DATA_WIDTH_INDEX]<<22:b=!0}else b=!0}else this.content=E[x.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[x.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=E[x.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[x.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=_},855:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},133:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},a.utf32ToString=function(d,g=0,x=d.length){let h="";for(let _=g;_<x;++_){let N=d[_];N>65535?(N-=65536,h+=String.fromCharCode(55296+(N>>10))+String.fromCharCode(N%1024+56320)):h+=String.fromCharCode(N)}return h},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,g){const x=d.length;if(!x)return 0;let h=0,_=0;if(this._interim){const N=d.charCodeAt(_++);56320<=N&&N<=57343?g[h++]=1024*(this._interim-55296)+N-56320+65536:(g[h++]=this._interim,g[h++]=N),this._interim=0}for(let N=_;N<x;++N){const E=d.charCodeAt(N);if(55296<=E&&E<=56319){if(++N>=x)return this._interim=E,h;const b=d.charCodeAt(N);56320<=b&&b<=57343?g[h++]=1024*(E-55296)+b-56320+65536:(g[h++]=E,g[h++]=b)}else E!==65279&&(g[h++]=E)}return h}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,g){const x=d.length;if(!x)return 0;let h,_,N,E,b=0,l=0,m=0;if(this.interim[0]){let S=!1,k=this.interim[0];k&=(224&k)==192?31:(240&k)==224?15:7;let j,A=0;for(;(j=63&this.interim[++A])&&A<4;)k<<=6,k|=j;const D=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=D-A;for(;m<L;){if(m>=x)return 0;if(j=d[m++],(192&j)!=128){m--,S=!0;break}this.interim[A++]=j,k<<=6,k|=63&j}S||(D===2?k<128?m--:g[b++]=k:D===3?k<2048||k>=55296&&k<=57343||k===65279||(g[b++]=k):k<65536||k>1114111||(g[b++]=k)),this.interim.fill(0)}const f=x-4;let p=m;for(;p<x;){for(;!(!(p<f)||128&(h=d[p])||128&(_=d[p+1])||128&(N=d[p+2])||128&(E=d[p+3]));)g[b++]=h,g[b++]=_,g[b++]=N,g[b++]=E,p+=4;if(h=d[p++],h<128)g[b++]=h;else if((224&h)==192){if(p>=x)return this.interim[0]=h,b;if(_=d[p++],(192&_)!=128){p--;continue}if(l=(31&h)<<6|63&_,l<128){p--;continue}g[b++]=l}else if((240&h)==224){if(p>=x)return this.interim[0]=h,b;if(_=d[p++],(192&_)!=128){p--;continue}if(p>=x)return this.interim[0]=h,this.interim[1]=_,b;if(N=d[p++],(192&N)!=128){p--;continue}if(l=(15&h)<<12|(63&_)<<6|63&N,l<2048||l>=55296&&l<=57343||l===65279)continue;g[b++]=l}else if((248&h)==240){if(p>=x)return this.interim[0]=h,b;if(_=d[p++],(192&_)!=128){p--;continue}if(p>=x)return this.interim[0]=h,this.interim[1]=_,b;if(N=d[p++],(192&N)!=128){p--;continue}if(p>=x)return this.interim[0]=h,this.interim[1]=_,this.interim[2]=N,b;if(E=d[p++],(192&E)!=128){p--;continue}if(l=(7&h)<<18|(63&_)<<12|(63&N)<<6|63&E,l<65536||l>1114111)continue;g[b++]=l}}return b}}},776:function(y,a,d){var g=this&&this.__decorate||function(l,m,f,p){var S,k=arguments.length,j=k<3?m:p===null?p=Object.getOwnPropertyDescriptor(m,f):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(l,m,f,p);else for(var A=l.length-1;A>=0;A--)(S=l[A])&&(j=(k<3?S(j):k>3?S(m,f,j):S(m,f))||j);return k>3&&j&&Object.defineProperty(m,f,j),j},x=this&&this.__param||function(l,m){return function(f,p){m(f,p,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const h=d(859),_=d(97),N={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let E,b=a.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(l){super(),this._optionsService=l,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),E=this}_updateLogLevel(){this._logLevel=N[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<=_.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<=_.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<=_.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<=_.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<=_.LogLevelEnum.ERROR&&this._log(((f=this._optionsService.options.logger)==null?void 0:f.error.bind(this._optionsService.options.logger))??console.error,l,m)}};a.LogService=b=g([x(0,_.IOptionsService)],b),a.setTraceLogger=function(l){E=l},a.traceCall=function(l,m,f){if(typeof f.value!="function")throw new Error("not supported");const p=f.value;f.value=function(...S){if(E.logLevel!==_.LogLevelEnum.TRACE)return p.apply(this,S);E.trace(`GlyphRenderer#${p.name}(${S.map(j=>JSON.stringify(j)).join(", ")})`);const k=p.apply(this,S);return E.trace(`GlyphRenderer#${p.name} return`,k),k}}},726:(y,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const d="di$target",g="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(x){return x[g]||[]},a.createDecorator=function(x){if(a.serviceRegistry.has(x))return a.serviceRegistry.get(x);const h=function(_,N,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(b,l,m){l[d]===l?l[g].push({id:b,index:m}):(l[g]=[{id:b,index:m}],l[d]=l)})(h,_,E)};return h.toString=()=>x,a.serviceRegistry.set(x,h),h}},97:(y,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const g=d(726);var x;a.IBufferService=(0,g.createDecorator)("BufferService"),a.ICoreMouseService=(0,g.createDecorator)("CoreMouseService"),a.ICoreService=(0,g.createDecorator)("CoreService"),a.ICharsetService=(0,g.createDecorator)("CharsetService"),a.IInstantiationService=(0,g.createDecorator)("InstantiationService"),function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"}(x||(a.LogLevelEnum=x={})),a.ILogService=(0,g.createDecorator)("LogService"),a.IOptionsService=(0,g.createDecorator)("OptionsService"),a.IOscLinkService=(0,g.createDecorator)("OscLinkService"),a.IUnicodeService=(0,g.createDecorator)("UnicodeService"),a.IDecorationService=(0,g.createDecorator)("DecorationService")}},v={};function C(y){var a=v[y];if(a!==void 0)return a.exports;var d=v[y]={exports:{}};return c[y].call(d.exports,d,d.exports,C),d.exports}var R={};return(()=>{var y=R;Object.defineProperty(y,"__esModule",{value:!0}),y.WebglAddon=void 0;const a=C(345),d=C(859),g=C(399),x=C(666),h=C(776);class _ extends d.Disposable{constructor(E){if(g.isSafari&&(0,g.getSafariVersion)()<16){const b={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",b))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=E,this._onChangeTextureAtlas=this.register(new a.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new a.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new a.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new a.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(E){const b=E._core;if(!E.element)return void this.register(b.onWillOpen(()=>this.activate(E)));this._terminal=E;const l=b.coreService,m=b.optionsService,f=b,p=f._renderService,S=f._characterJoinerService,k=f._charSizeService,j=f._coreBrowserService,A=f._decorationService,D=f._logService,L=f._themeService;(0,h.setTraceLogger)(D),this._renderer=this.register(new x.WebglRenderer(E,S,k,j,l,A,m,L,this._preserveDrawingBuffer)),this.register((0,a.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,a.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,a.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,a.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),p.setRenderer(this._renderer),this.register((0,d.toDisposable)(()=>{const O=this._terminal._core._renderService;O.setRenderer(this._terminal._core._createRenderer()),O.handleResize(E.cols,E.rows)}))}get textureAtlas(){var E;return(E=this._renderer)==null?void 0:E.textureAtlas}clearTextureAtlas(){var E;(E=this._renderer)==null||E.clearTextureAtlas()}}y.WebglAddon=_})(),R})())})(BS);var _3=BS.exports;function HN(r,s){let c=0,v=r;for(;Math.abs(v)>=s;)v>0?(c+=1,v-=s):(c-=1,v+=s);return{notches:c,rem:v}}const b3=r=>r>0?"up":"down";function y3(r,s,c=24){return Math.abs(s)<=Math.abs(r)?null:s<=-c?"show":s>=c?"hide":null}function x3(r,s){if(!r)return!1;const c=r.scrollHeight-r.clientHeight;return c<=1?!1:s<0?r.scrollTop<c-1:s>0?r.scrollTop>1:!1}function w3(r,s=44,c=.5){return r*s*c/(s+c*Math.abs(r))}function zN(r){if(!r)return!1;const s=r.tagName;return!(s!=="INPUT"&&s!=="TEXTAREA"||r.closest&&r.closest(".xterm"))}function N3(r){return r.replace(/\r?\n/g,`\r
|
|
272
|
+
`)}function S3(r,s){let c=s,v=!1,C=!1,R=!1;const y=x=>{/\S/.test(x)&&(v=!0,c&&(C=!0)),c&&x.length&&(R=!0)},a=/\x1b\[([0-9;]*)m/g;let d=0,g=a.exec(r);for(;g;){y(r.slice(d,g.index)),d=a.lastIndex;const x=g[1]===""?[0]:g[1].split(";").map(Number);for(let h=0;h<x.length;h+=1){const _=x[h];if(_===0||_===49)c=!1;else if(_>=40&&_<=47||_>=100&&_<=107)c=!0;else if(_===38||_===48){const N=_===48;x[h+1]===5?(h+=2,N&&(c=!0)):x[h+1]===2&&(h+=4,N&&(c=!0))}}g=a.exec(r)}return y(r.slice(d)),{bgEnd:c,hasText:v,hasShadeText:C,hasShadeBlank:R}}function C3(r){const s=[];let c=!1,v=[],C=-1,R=!1;const y=()=>{C>=0&&R&&(s[C]+="\x1B[49m"),C=-1,R=!1},a=()=>{if(v.length){s.push("\x1B[0m");for(let d=1;d<v.length;d+=1)s.push("");v=[]}};for(const d of r){const g=S3(d,c);g.hasShadeText?(s.push(...v),v=[],s.push(d),C=s.length-1,R=g.bgEnd):!g.hasText&&(c||g.bgEnd||g.hasShadeBlank)?v.push(d):(y(),a(),s.push(d)),c=g.bgEnd}return y(),a(),s}function E3(r){const s=N3(r.replace(/\n$/,""));return C3(s.split(`\r
|
|
273
|
+
`)).join(`\r
|
|
274
|
+
`)}function j3(r,s,c=0,v=!1){if(!r||!r.vis&&!v)return"\x1B[?25l";const C=c?Math.min(s|0,c|0):s|0,R=Math.max(1,C-Math.max(0,r.row|0)),y=Math.max(0,r.col|0)+1;return`\x1B[${R};${y}H\x1B[?25h`}function FS({hint:r}){return o.jsxDEV("div",{className:"lens-boot","aria-live":"polite",children:[o.jsxDEV("div",{className:"lens-boot-dots","aria-hidden":"true",children:[o.jsxDEV("span",{className:"lens-boot-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:7,columnNumber:9},this),o.jsxDEV("span",{className:"lens-boot-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:8,columnNumber:9},this),o.jsxDEV("span",{className:"lens-boot-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:9,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:6,columnNumber:7},this),r&&o.jsxDEV("div",{className:"lens-boot-hint",children:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:11,columnNumber:16},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensBoot.jsx",lineNumber:5,columnNumber:5},this)}function D3(r,{base:s=1e3,max:c=1e4,factor:v=2,jitter:C=.2,rng:R=Math.random}={}){if(r<=0)return 0;const y=Math.min(c,s*v**(r-1));return Math.round(y*(1+C*(R()*2-1)))}const k3=1e3;function R3(r){return r<8e3?k3:r<6e4?5e3:1e4}const T3=.95,L3=.015,A3=.1,M3=50;function U3(r,s,c=T3,v=L3){const C=r*s,R=r*c**(s/16);return{delta:C,v:R,done:Math.abs(R)<v}}function O3(r,s,c=A3,v=M3){return s<=v&&Math.abs(r)>=c}const P3={failCount:0,connected:!0};function zg(r,s,{threshold:c=2}={}){switch(s){case"ok":case"reset":return{failCount:0,connected:!0};case"fail":{const v=r.failCount+1;return{failCount:v,connected:v<c}}default:return r}}const V3="(?:localhost|127\\.0\\.0\\.1|0\\.0\\.0\\.0|\\[::1\\])",$N=new RegExp(`https?://${V3}(?::(\\d{1,5}))?(/[^${u_}]*)?`,"gi");function HS(r){const s=[];if(!r)return s;$N.lastIndex=0;let c;for(;(c=$N.exec(r))!==null;){const v=/^https:/i.test(c[0]),C=c[1]?Number(c[1]):v?443:80;if(!Number.isInteger(C)||C<1||C>65535)continue;const R=c[2]||"",y=R.replace(/\.+$/,""),a=c.index+c[0].length-(R.length-y.length);s.push({start:c.index,end:a,protocol:v?"https":"http",port:C,path:y||"/",raw:r.slice(c.index,a)})}return s}function zS(r){const s=HS(r),c=s.map(v=>({start:v.start,end:v.end,kind:"url",protocol:v.protocol,port:v.port,urlPath:v.path,raw:v.raw}));for(const v of YU(r))s.some(C=>v.start<C.end&&v.end>C.start)||c.push({start:v.start,end:v.end,kind:"doc"});return c.sort((v,C)=>v.start-C.start),c}function I3(r,s){const c=r.getCell(s-1);if(!c)return!1;if(c.getWidth()===0)return!0;const v=c.getChars();if(v&&v!==" ")return!0;const C=r.getCell(s-2);return!!C&&C.getWidth()===0}function p_(r,s,c){var y;const v=r.getLine(s+1);if(!v)return!1;if(v.isWrapped)return!0;const C=r.getLine(s);if(!C||!I3(C,c))return!1;const R=(y=v.getCell(0))==null?void 0:y.getChars();return!!R&&R!==" "}function $S(r,s,c){let v=s;for(;v>0&&p_(r,v-1,c);)v--;let C="";const R=[];let y=v;for(;;){const a=r.getLine(y);if(!a)break;const d=y+1<r.length&&p_(r,y,c),g=[],x=[];for(let _=0;_<c;_++){const N=a.getCell(_);if(!N)continue;const E=N.getWidth();E!==0&&(g.push(N.getChars()),x.push({row:y,col:_,w:E}))}let h=g.length;if(d)for(;h>0&&(g[h-1]===""||g[h-1]===" ");)h--;for(let _=0;_<h;_++)C+=g[_]||" ",R.push(x[_]);if(d){y++;continue}break}return{text:C,cells:R}}function B3(r){const s=r.buffer.active,c=r.cols,v=0,C=s.length,R=[];let y=v;for(;y>0&&p_(s,y-1,c);)y--;for(;y<C;){if(!s.getLine(y)){y++;continue}const{text:a,cells:d}=$S(s,y,c);for(const{start:g,end:x,kind:h}of zS(a)){let _=g;for(;_<x;){const N=d[_].row;let E=_;for(;E<x&&d[E].row===N;)E++;const b=d[_].col,l=d[E-1],m=l.col+l.w;N>=v&&N<C&&R.push({y:N,x:b,width:m-b,kind:h,path:a.slice(g,x)}),_=E}}y=d.length?d[d.length-1].row+1:y+1}return R}function F3(r,s){const c=r.buffer.active,v=r.cols,C=s-1;if(C<0||C>=c.length)return[];const{text:R,cells:y}=$S(c,C,v),a=[];for(const{start:d,end:g,kind:x,protocol:h,port:_,urlPath:N,raw:E}of zS(R)){const b=y[d],l=y[g-1];C<b.row||C>l.row||a.push({range:{start:{x:b.col+1,y:b.row+1},end:{x:l.col+l.w,y:l.row+1}},kind:x,path:R.slice(d,g),protocol:h,port:_,urlPath:N,raw:E})}return a}const WS=(r,s,c)=>Math.max(s,Math.min(c,r));function H3(r,s){return!s||s<=0?1:Math.max(1,Math.floor(r/s))}function WN(r,s,c){return c<0?r>0?"internal":"forward":r<s?"internal":"forward"}function z3(r,s){return WS(r,0,s)}function $3(r,s,c){return WS(r-s+1,0,c)}function GN(r,s){return!r||!r.vis?null:Math.max(0,s-1-Math.max(0,r.row|0))}function qN(r,s){return Math.max(0,s-r)}function YN({cursorLine:r,viewportY:s,visibleRows:c,baseY:v,armed:C}){return C?r<s?z3(r,v):r>=s+c?$3(r,c,v):null:null}const W3=[{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"}],G3=4,q3=1500,Y3=r=>{for(const s of document.fonts)if(s.family.replace(/["']/g,"")===r)return s;return null},K3=async({family:r,url:s,probe:c,unicodeRange:v},C)=>{var R;for(let y=0;y<G3;y++){try{await document.fonts.load(`${C}px "${r}"`,c)}catch{}if(((R=Y3(r))==null?void 0:R.status)==="loaded")return!0;try{const a=new FontFace(r,`url(${s}) format('woff2')`,v?{unicodeRange:v}:{});return await a.load(),document.fonts.add(a),!0}catch{}await new Promise(a=>setTimeout(a,q3*2**y))}return!1};let $g=null;function X3(r=14){var s;return $g||($g=typeof document<"u"&&((s=document.fonts)!=null&&s.load)?Promise.all(W3.map(c=>K3(c,r))):Promise.resolve([!1,!1])),$g}function GS(r){const s=r.split(`
|
|
275
|
+
`).map(C=>C.trim());let c=0,v=s.length;for(;c<v&&s[c]==="";)c++;for(;v>c&&s[v-1]==="";)v--;return s.slice(c,v).join(`
|
|
276
|
+
`)}function J3(r){return r?{lines:r.split(`
|
|
277
|
+
`).length,chars:GS(r).replace(/\n/g,"").length}:{lines:0,chars:0}}function Z3(r,s){return{start:{col:0,row:r.start.row},end:{col:s-1,row:r.end.row}}}function Q3(r,s,c,v,C){let R=r.start.row,y=r.end.row;for(;R>v&&c(R-1).trim()!=="";)R--;for(;y<C&&c(y+1).trim()!=="";)y++;return{start:{col:0,row:R},end:{col:s-1,row:y}}}function KN(r,s,c,v,C){return{x:r*v,y:(s-c)*C}}function e2(r){const[s,c]=M.useState(""),[v,C]=M.useState(!1),R=M.useRef(null),y=M.useRef(null);return M.useEffect(()=>()=>{clearTimeout(R.current),clearInterval(y.current)},[]),{dbg:s,dbgVisible:v,flash:()=>{const d=()=>{const g=r.current;g&&c(`${g.cols}×${g.rows} · ${g.options.fontSize}px`)};d(),C(!0),clearTimeout(R.current),clearInterval(y.current),y.current=setInterval(d,400),R.current=setTimeout(()=>{C(!1),clearInterval(y.current)},3e3)}}}const t2=200,n2=20,Wg=100,lm=5e3,i2=15;function r2(r,s){const c=s==null?void 0:s.querySelector(".xterm-helper-textarea");c&&(c.readOnly=!0,c.tabIndex=-1,c.setAttribute("inputmode","none"),c.setAttribute("aria-hidden","true"));const v=document.activeElement;r.focus(),r.blur(),v&&v!==document.body&&typeof v.focus=="function"&&v.focus()}const s2=M.forwardRef(function({pane:s,inset:c=0,onAuthFail:v,onDocLinkTap:C,onTap:R},y){const a=M.useRef(null),d=M.useRef(null),g=M.useRef(0),x=M.useRef(!1),h=M.useRef(!1),_=M.useRef(""),N=M.useRef(R);N.current=R;const E=M.useRef([]),b=M.useRef(null),l=M.useRef(null),m=M.useRef(!1),f=M.useRef(null),p=M.useRef(C);p.current=C;const S=M.useRef(fS()),k=M.useRef(null),j=M.useRef(KA()),A=M.useRef(null),[D,L]=M.useState(!1),[O,F]=M.useState(!0),P=M.useRef(!1),[B,G]=M.useState(""),[ne,ee]=M.useState(null),te=M.useRef(!1),se=M.useRef(!1),[I,W]=M.useState(!1),[X,K]=M.useState(!1),{dbg:ve,dbgVisible:he,flash:Ae}=e2(d),[me,ie]=M.useState(""),[$,_e]=M.useState(!1),ue=M.useRef(null),Ie=M.useRef(!1),Ue=M.useRef(!1),nt=M.useRef(!1),et=M.useRef(0),st=M.useRef(null),Dt=M.useRef(!1),J=M.useRef(null);M.useImperativeHandle(y,()=>({getSize:()=>{const re=d.current;return re?{cols:re.cols,rows:re.rows}:null},flash:Ae,getFontSize:()=>{const re=d.current;return re?{size:re.options.fontSize,auto:j.current==null}:null},setFontSize:re=>{var ge;const $e=d.current;if(!$e)return null;const Ke=Math.max(8,Math.min(40,Math.round(re)));return $e.options.fontSize=Ke,j.current=Ke,Du(Ke),(ge=ue.current)==null||ge.call(ue),Ke},autoFont:()=>{var $e;const re=d.current;re&&(re.options.fontSize=14,j.current=null,XA(),($e=ue.current)==null||$e.call(ue))},wake:()=>{var re;return(re=st.current)==null?void 0:re.call(st)},setDocHighlight:re=>{var $e;S.current=!!re,($e=k.current)==null||$e.call(k)}}),[]),M.useEffect(()=>{var $e;const re=g.current;g.current=c,c>0&&re===0&&(h.current=!0),c===0&&re>0&&(nt.current=!0),($e=ue.current)==null||$e.call(ue),c===0&&(h.current=!1)},[c]),M.useEffect(()=>{var ce;const re=new g3.Terminal({disableStdin:!0,allowProposedApi:!0,scrollback:lm+100,convertEol:!1,fontSize:j.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",linkHandler:{activate:(Y,de)=>{const ye=HS(de)[0];if(ye&&p.current){p.current({kind:"url",protocol:ye.protocol,port:ye.port,urlPath:ye.path,raw:ye.raw,path:ye.raw},(Y==null?void 0:Y.clientX)??0,(Y==null?void 0:Y.clientY)??0);return}try{window.open(de,"_blank","noopener,noreferrer")}catch{}}}});re.open(a.current),d.current=re,r2(re,a.current);const $e=re.registerLinkProvider({provideLinks(Y,de){if(!p.current){de(void 0);return}const ye=F3(re,Y).map(Le=>({range:Le.range,text:Le.raw??Le.path,decorations:{pointerCursor:!0,underline:!1},activate:Te=>{var Xe;return(Xe=p.current)==null?void 0:Xe.call(p,Le,(Te==null?void 0:Te.clientX)??0,(Te==null?void 0:Te.clientY)??0)}}));de(ye.length?ye:void 0)}});let Ke=null;const ge=()=>{try{Ke=new _3.WebglAddon,Ke.onContextLoss(()=>Ke.dispose()),re.loadAddon(Ke)}catch{Ke=null}};ge();let Ze=null,Ce=!1,Ve=!1,be=!1,Me=!1;te.current=!1,se.current=!1,W(!1),P.current=!1,ee(null),G("");const He=()=>Math.min(lm,Math.max(24,re.rows+n2));let Ct=He(),Lt=!0,Ut=0,Vt=null,dn="",Jt=null,Bt=0,zt=null,an=null,jn=Date.now();L(!1),_e(!1);let it=!1;const vn=()=>{Ce||it||(it=!0,requestAnimationFrame(()=>{Ce||_e(!0)}))};let zn=P3;const $n=Y=>{zn=Y,F(Y.connected)};X3(j.current??14).then(()=>{if(!(Ce||!Ke)){try{Ke.dispose()}catch{}ge(),re.refresh(0,re.rows-1)}});const tn=()=>re.buffer.active,kn=(Y="")=>{const de=tn();ie(Me&&!Qn()&&!te.current?`历史模式 · 距底 ${de.baseY-de.viewportY}/${de.baseY} 行${Ve?" · 拉取中":""}${Y}`:"")},Un=()=>tn().viewportY>=tn().baseY,Qn=()=>tn().baseY-tn().viewportY<=i2,on=()=>tn().viewportY<=3,Nn=()=>{!Me||Ve||!Lt||Ct>=lm||!on()||(Lt=!1,vr(),Ct=Math.min(Math.floor(Ct/Wg)*Wg+Wg,lm),kn(" · 拉取↑"),is(Ct,!0,!0))};let On=0;const mi=()=>{b.current&&(b.current.deco.dispose(),b.current.marker.dispose(),b.current=null)},le=()=>{if(Ce)return;const Y=Jt,de=re.buffer.active;if(!(Y&&(Y.vis||Dt.current)&&te.current&&de.viewportY<de.baseY)){mi(),re.write(j3(Y,re.rows,Bt,Dt.current)),tt();return}re.write("\x1B[?25l"),mi();const Le=Bt-1-(Y.row|0),Te=re.registerMarker(Le-(de.baseY+de.cursorY));if(!Te){tt();return}const Xe=re.registerDecoration({marker:Te,x:Math.max(0,Y.col|0),width:1});if(!Xe){Te.dispose(),tt();return}Xe.onRender(at=>{at.classList.add("cursor-deco")}),b.current={deco:Xe,marker:Te},tt()},ze=()=>{l.current&&(l.current.deco.dispose(),l.current.marker.dispose(),l.current=null)},tt=()=>{ze();const Y=Jt;if(Ce||!m.current||!te.current||!Y)return;const de=re.buffer.active,ye=Bt-1-(Y.row|0),Le=re.registerMarker(ye-(de.baseY+de.cursorY));if(!Le)return;const Te=re.registerDecoration({marker:Le,x:0,width:re.cols});if(!Te){Le.dispose();return}Te.onRender(Xe=>{Xe.classList.add("locate-deco")}),l.current={deco:Te,marker:Le}};f.current=tt;const bt=()=>{if(Ce||!zt||zt.alt)return Promise.resolve();const{seed:Y,contentRows:de}=zt,ye=de<re.rows?qN(de,re.rows):0;if(de+ye===Bt)return Promise.resolve();const Le=ye?`
|
|
278
|
+
`.repeat(ye)+Y:Y;return Bt=Le.split(`
|
|
279
|
+
`).length,new Promise(Te=>re.write("\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H"+Le,()=>{if(!Ce){re.scrollToBottom();try{Wi(re)}catch{}}Te()}))},xt=(Y=0)=>{var Zt;if(Ce||!a.current||!re.rows)return;const de=a.current.getBoundingClientRect(),ye=Math.min(de.bottom,window.innerHeight-(g.current||0)),Le=Math.max(de.top,0),Te=Math.max(0,ye-Le),Xe=a.current.querySelector(".xterm-screen"),at=Xe?Xe.getBoundingClientRect().height:0;if(!Te||!at)return;(Zt=a.current.parentElement)==null||Zt.style.setProperty("--vis-h",`${Te}px`),g.current===0&&(et.current=Te);const _t=at/re.rows;if(Ie.current&&On){Ie.current=!1;const kt=re.options.fontSize||14,Pt=Math.max(8,Math.min(40,Math.round(kt*(et.current||Te)/(On*_t))));if(Ue.current=!0,j.current=Pt,Du(Pt),Pt!==kt){re.options.fontSize=Pt,requestAnimationFrame(()=>xt(Y));return}}if(Ue.current&&On){const kt=Math.floor((et.current||Te)/_t),Pt=re.options.fontSize||14;if(kt<On&&Pt>8){j.current=Pt-1,Du(Pt-1),re.options.fontSize=Pt-1,requestAnimationFrame(()=>xt(Y));return}Ue.current=!1,j.current=Pt,Du(Pt)}if(g.current===0&&j.current==null&&On&&Y<4){const kt=On*_t;if(kt>Te+4){const Pt=re.options.fontSize||14,yn=Math.max(6,Math.round(Pt*(Te/kt)));if(yn<Pt){re.options.fontSize=yn,requestAnimationFrame(()=>xt(Y+1));return}}}const ct=H3(Te,_t);if(ct!==re.rows){re.write(`\x1B[?25l\x1B[${re.rows};1H`,()=>{if(!Ce){if(re.resize(re.cols,ct),te.current){const kt=GN(Jt,Bt),Pt=()=>{const yn=kt==null?null:YN({cursorLine:kt,viewportY:tn().viewportY,visibleRows:re.rows,baseY:tn().baseY,armed:!0});yn!=null&&re.scrollToLine(yn)};g.current>0?(re.scrollToTop(),Pt()):nt.current?(nt.current=!1,Pt()):re.scrollToTop()}else re.scrollToBottom();Y<4?requestAnimationFrame(()=>xt(Y+1)):bt().then(()=>{Ce||(le(),vn())})}});return}bt().then(()=>{Ce||(le(),vn())})},mt=()=>requestAnimationFrame(()=>xt(0));ue.current=mt;const jt=()=>mt();window.addEventListener("resize",jt),window.addEventListener("orientationchange",jt);let gt=((ce=a.current)==null?void 0:ce.clientHeight)||0;const _n=typeof ResizeObserver<"u"?new ResizeObserver(()=>{var ye;const Y=((ye=a.current)==null?void 0:ye.clientHeight)||0;if(!Y)return;const de=Y>gt;gt=Y,de&&mt()}):null;_n&&a.current&&_n.observe(a.current);const rn=(Y,de)=>{var ct;const ye=(ct=a.current)==null?void 0:ct.querySelector(".xterm-screen");if(!ye||!re.cols||!re.rows)return null;const Le=ye.getBoundingClientRect(),Te=Le.width/re.cols,Xe=Le.height/re.rows;if(!Te||!Xe)return null;const at=Math.max(0,Math.min(re.cols-1,Math.floor((Y-Le.left)/Te))),_t=Math.max(0,Math.min(re.rows-1,Math.floor((de-Le.top)/Xe)));return{col:at,row:tn().viewportY+_t}};let qt=null;const gn=()=>{var Le;const Y=(Le=re.getSelectionPosition)==null?void 0:Le.call(re);if(!Y)return null;let de=Y.end.x-1,ye=Y.end.y;return de<0&&(ye-=1,de=re.cols-1),{start:{col:Y.start.x,row:Y.start.y},end:{col:de,row:ye}}},bn=()=>{var Pt;const Y=gn(),de=(Pt=a.current)==null?void 0:Pt.querySelector(".xterm-screen");if(!Y||!de){ee(null),G("");return}const ye=de.getBoundingClientRect(),Le=a.current.parentElement.getBoundingClientRect(),Te=ye.width/re.cols,Xe=ye.height/re.rows,at=tn().viewportY,_t={x:ye.left-Le.left,y:ye.top-Le.top},ct=KN(Y.start.col,Y.start.row,at,Te,Xe),Zt=KN(Y.end.col+1,Y.end.row,at,Te,Xe);ee({start:{x:ct.x+_t.x,y:ct.y+_t.y,ch:Xe},end:{x:Zt.x+_t.x,y:Zt.y+_t.y,ch:Xe},wrapW:Le.width});const kt=re.getSelection();if(kt){const{lines:yn,chars:Li}=J3(kt);G(`复制模式 · ${yn} 行 · ${Li} 字`)}else G("")},li=()=>gn(),Pn=Y=>{var de;return((de=tn().getLine(Y))==null?void 0:de.translateToString(!0))??""},ci=Y=>{if(!Y)return;const de=re.cols,ye=Y.end.row*de+Y.end.col-(Y.start.row*de+Y.start.col)+1;re.select(Y.start.col,Y.start.row,ye),bn()};J.current={currentRange:li,paraLineText:Pn,selectRange:ci};const ri=(Y,de)=>{var at,_t;const ye=rn(Y,de);if(!ye)return;const Le=((at=tn().getLine(ye.row))==null?void 0:at.translateToString(!1))??"";let Te=ye.col,Xe=ye.col;if(/\S/.test(Le[ye.col]||"")){for(;Te>0&&/\S/.test(Le[Te-1]);)Te--;for(;Xe<re.cols-1&&/\S/.test(Le[Xe+1]);)Xe++}qt={col:Te,row:ye.row},P.current=!0,ee(null),re.select(Te,ye.row,Xe-Te+1),bn(),(_t=navigator.vibrate)==null||_t.call(navigator,12)},Ft=(Y,de)=>{var ye,Le;return((Le=(ye=tn().getLine(Math.floor(Y/de)))==null?void 0:ye.getCell(Y%de))==null?void 0:Le.getWidth())??1},oe=(Y,de)=>Y>0&&Ft(Y,de)===0?Y-1:Y,qe=(Y,de)=>Ft(Y,de)===2?Y+1:Y,ke=(Y,de)=>{const ye=rn(Y,de);if(!ye||!qt)return;const Le=re.cols,Te=qt.row*Le+qt.col,Xe=ye.row*Le+ye.col,at=oe(Math.min(Te,Xe),Le),_t=qe(Math.max(Te,Xe),Le);re.select(at%Le,Math.floor(at/Le),_t-at+1),bn()},Q=()=>{qt=null,P.current=!1,ee(null),G(""),re.clearSelection()},Ee=a.current;let Ye=0,Ot=0,lt=0,pt=0,wt=!1,Tt=0,hn=0,Dn=!1,Xt=!1,Vn=null;const Xn=()=>{Vn&&(clearTimeout(Vn),Vn=null)},Ri=Y=>Math.hypot(Y[0].clientX-Y[1].clientX,Y[0].clientY-Y[1].clientY);let tr=0,Vr=0,fr=0,Qr=0,Nr=0,pr=null;const vr=()=>{pr!=null&&(cancelAnimationFrame(pr),pr=null)};A.current=vr;const Hs=(Y,de,ye)=>{if(!Y)return;let Le=ye,Te=null;const Xe=at=>{if(Te==null){Te=at,pr=requestAnimationFrame(Xe);return}const _t=at-Te;Te=at;const ct=U3(Le,_t);Le=ct.v;const Zt=Y[de];Y[de]=Zt+ct.delta;const kt=Math.abs(ct.delta)>=1&&Y[de]===Zt;if(de==="scrollTop"&&(kn(),Nn()),ct.done||kt||pr==null){pr=null;return}pr=requestAnimationFrame(Xe)};pr=requestAnimationFrame(Xe)},Ir=22,cn=12;let es=0,nr=0,St=0,Br=!1;const si=async()=>{var ye;if(Br||St===0)return;Br=!0;const Y=b3(St),de=Math.min(Math.abs(St),40);St=0;try{se.current?await TM(s,Y,de):await Hu(s,Array(de).fill(Y==="up"?"Up":"Down")),(ye=st.current)==null||ye.call(st)}catch{}finally{Br=!1,St!==0&&si()}},Fr=Y=>{if(jn=Date.now(),Xn(),vr(),Lt=!0,Xt=P.current,Dn=!1,Y.touches.length===2){wt=!0,pt=-1,Tt=Ri(Y.touches),hn=re.options.fontSize||14;return}if(wt=!1,Y.touches.length!==1){pt=-1;return}Ye=Y.touches[0].clientX,Ot=Y.touches[0].clientY,lt=Ee.scrollLeft,pt=0,tr=Ye,Vr=Ot,fr=Y.timeStamp,Qr=0,Nr=0,nr=Ot,es=0,Vn=setTimeout(()=>{Vn=null,Dn=!0,pt=-1,ri(Ye,Ot)},500)},Sr=Y=>{if(wt&&Y.touches.length===2){if(Tt>0){const Le=Math.max(8,Math.min(40,Math.round(hn*(Ri(Y.touches)/Tt))));Le!==(re.options.fontSize||14)&&(re.options.fontSize=Le,j.current=Le)}Y.preventDefault(),Y.stopPropagation();return}if(Dn&&Y.touches.length===1){ke(Y.touches[0].clientX,Y.touches[0].clientY),Y.preventDefault(),Y.stopPropagation();return}if(Y.touches.length===1&&(kn(),Nn()),Y.touches.length!==1)return;const de=Y.touches[0].clientX-Ye,ye=Y.touches[0].clientY-Ot;if((Math.abs(de)>6||Math.abs(ye)>6)&&Xn(),pt===0){if(Math.abs(de)<6&&Math.abs(ye)<6)return;pt=Math.abs(de)>Math.abs(ye)?1:-1}if(pt===1){Ee.scrollLeft=lt-de;const Le=Y.touches[0].clientX,Te=Y.timeStamp-fr;Te>0&&(Qr=(tr-Le)/Te),tr=Le,fr=Y.timeStamp,Y.preventDefault(),Y.stopPropagation()}else{if(te.current){Y.preventDefault(),Y.stopPropagation();const Xe=Y.touches[0].clientY,at=Xe-nr;nr=Xe;const _t=a.current.querySelector(".xterm-viewport"),ct=at>0?-1:1;if(_t&&WN(tn().viewportY,tn().baseY,ct)==="internal"){_t.scrollTop-=at,x.current=!0;return}const{notches:Zt,rem:kt}=HN(es+at,cn);es=kt,Zt&&(St+=Zt,si());return}const Le=Y.touches[0].clientY,Te=Y.timeStamp-fr;Te>0&&(Nr=(Vr-Le)/Te),Vr=Le,fr=Y.timeStamp}},Ti=Y=>{var de;if(Xn(),Dn&&Y.touches.length===0){Dn=!1;const ye=re.getSelection();ye&&ye.trim()?bn():Q();return}if(wt&&Y.touches.length<2){wt=!1,Du(re.options.fontSize||14),mt();return}Y.touches.length===0&&O3(pt===1?Qr:Nr,Y.timeStamp-fr)&&(pt===1?Hs(Ee,"scrollLeft",Qr):pt===-1&&Hs(Ee.querySelector(".xterm-viewport"),"scrollTop",Nr)),Y.touches.length===0&&!Dn&&!wt&&pt===0&&(Xt?Q():(de=N.current)==null||de.call(N))},qn=Y=>{if(Y.deltaY){if(te.current){Y.preventDefault(),Y.stopPropagation();const de=Y.deltaMode===1?Y.deltaY*Ir:Y.deltaMode===2?Y.deltaY*re.rows*Ir:Y.deltaY,{notches:ye,rem:Le}=HN(es-de,Ir);es=Le,ye&&(St+=ye,si());return}Y.timeStamp-Ut>200&&(Lt=!0),Ut=Y.timeStamp,kn(),Nn()}},Mn=Y=>{zN(document.activeElement)&&Y.cancelable&&Y.preventDefault()};Ee.addEventListener("pointerdown",Mn,{capture:!0}),Ee.addEventListener("wheel",qn,{capture:!0,passive:!1}),Ee.addEventListener("touchstart",Fr,{capture:!0,passive:!0}),Ee.addEventListener("touchmove",Sr,{capture:!0,passive:!1}),Ee.addEventListener("touchend",Ti,{capture:!0,passive:!0});const ai=a.current.parentElement;let ei=null,Wn=null,Bn=null,ts=null,$i=0,zs=0;const ws=(Y,de)=>{const ye=rn(Y,de);if(!ye||Wn==null)return;const Le=re.cols,Te=ye.row*Le+ye.col,Xe=ei==="start"?Te:Te+1;let at=Math.min(Wn,Xe),_t=Math.max(Wn,Xe);_t<=at&&(_t=at+1),at=oe(at,Le),_t=qe(_t-1,Le)+1,re.select(at%Le,Math.floor(at/Le),_t-at),bn()},ns=Y=>{var Le,Te,Xe;const de=(Te=(Le=Y.target).closest)==null?void 0:Te.call(Le,".sel-handle");if(!de)return;ei=de.dataset.end;const ye=gn();if(ye){const at=re.cols,_t=ye.start.row*at+ye.start.col,ct=ye.end.row*at+ye.end.col;Wn=ei==="start"?ct+1:_t}else Wn=null;Y.preventDefault(),Y.stopPropagation(),(Xe=ai.setPointerCapture)==null||Xe.call(ai,Y.pointerId)},ma=Y=>{if(!ei||Wn==null)return;ws(Y.clientX,Y.clientY);const de=28;ts={x:Y.clientX,y:Y.clientY};const ye=Ci.getBoundingClientRect();let Le=0;if(Y.clientY<ye.top+de?($i=-1,Le=ye.top+de-Y.clientY):Y.clientY>ye.bottom-de?($i=1,Le=Y.clientY-(ye.bottom-de)):$i=0,zs=Math.min(14,2+Le*.28),$i!==0&&Bn==null){const Te=()=>{if(!ei||$i===0){Bn=null;return}const Xe=Ci.scrollTop;if(Ci.scrollTop=Xe+$i*zs,ws(ts.x,ts.y),Ci.scrollTop===Xe){Bn=null;return}Bn=requestAnimationFrame(Te)};Bn=requestAnimationFrame(Te)}else $i===0&&Bn!=null&&(cancelAnimationFrame(Bn),Bn=null);Y.preventDefault()},fi=Y=>{var de;ei&&(ei=null,Wn=null,$i=0,Bn!=null&&(cancelAnimationFrame(Bn),Bn=null),(de=ai.releasePointerCapture)==null||de.call(ai,Y.pointerId))};ai.addEventListener("pointerdown",ns,{capture:!0}),ai.addEventListener("pointermove",ma,{capture:!0}),ai.addEventListener("pointerup",fi,{capture:!0}),ai.addEventListener("pointercancel",fi,{capture:!0});const Wi=Y=>{for(const{deco:Le,marker:Te}of E.current)Le.dispose(),Te.dispose();if(E.current=[],!p.current||!S.current)return;const de=Y.buffer.active,ye=de.baseY+de.cursorY;for(const{y:Le,x:Te,width:Xe}of B3(Y)){const at=Y.registerMarker(Le-ye);if(!at)continue;const _t=Y.registerDecoration({marker:at,x:Te,width:Xe});if(!_t){at.dispose();continue}_t.onRender(ct=>{ct.classList.add("doc-deco")}),E.current.push({deco:_t,marker:at})}};k.current=()=>{!Ce&&Me&&Wi(re)};const is=async(Y,de,ye=!1)=>{var _t;if(Ve||Ce)return;Ve=!0;const Le=de&&ye?(_t=a.current)==null?void 0:_t.querySelector(".xterm-viewport"):null,Te=Le&&tn().length?Le.scrollHeight/tn().length:0,Xe=Te?Math.floor(Le.scrollTop/Te):tn().viewportY,at=de?tn().length-Xe:0;try{const ct=await DM(s,Y,an);if(Ce)return;if($n(zg(zn,"ok")),ct.unchanged){L(de);return}an=ct.hash,te.current=!!ct.alt,se.current=!!ct.mouseAware,W(Gi=>Gi===!!ct.alt?Gi:!!ct.alt),jn=Date.now();let Zt=!1;ct.width&&ct.width!==re.cols&&(re.resize(ct.width,re.rows),Zt=!0);const kt=On;ct.height&&(On=ct.height);const Pt=!Me,yn=ct.cur?`${ct.cur.row},${ct.cur.col},${ct.cur.vis?1:0}`:"";if(!Zt&&!Pt&&ct.ansi===Vt&&yn===dn){L(de);return}const Li=E3(ct.ansi),Er=Li?Li.split(`
|
|
280
|
+
`).length:0;zt={seed:Li,contentRows:Er,alt:ct.alt};const gr=!ct.alt&&Er<re.rows?qN(Er,re.rows):0,os=gr?`
|
|
281
|
+
`.repeat(gr)+Li:Li;if(Bt=os?os.split(`
|
|
282
|
+
`).length:0,await new Promise(Gi=>re.write("\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H"+os,Gi)),Ce)return;if(Vt=ct.ansi,dn=yn,Jt=ct.cur,ct.cur&&ct.cur.vis&&(Dt.current=!1),de?re.scrollToLine(Math.max(0,tn().length-at)):te.current&&Pt?re.scrollToTop():re.scrollToBottom(),te.current&&g.current>0){yn!==_.current&&(Pt||(h.current=!0),_.current=yn);const Gi=GN(ct.cur,Bt);if(Gi!=null){const fa=YN({cursorLine:Gi,viewportY:tn().viewportY,visibleRows:re.rows,baseY:tn().baseY,armed:h.current});fa!=null&&re.scrollToLine(fa)}}Me=!0;try{Wi(re)}catch{}L(de),le(),(Zt||Pt||On!==kt)&&mt(),Pt&&setTimeout(vn,400)}catch(ct){ct instanceof Si?v==null||v():Ce||$n(zg(zn,"fail"))}finally{Ve=!1,!Ce&&Me&&kn(),be&&!Ce&&(be=!1,rr())}},Cr=async()=>{if(!(Ve||Ce)&&!P.current){if(Me&&!Qn()&&!te.current){L(!0);return}Ct=He(),await is(Ct,!Un())}};let ir=0;async function rs(Y){if(!Ce&&Y===ir&&await Cr(),Ce||document.hidden||Y!==ir)return;const de=zn.failCount>0?D3(zn.failCount):R3(Date.now()-jn);Ze=setTimeout(()=>rs(Y),de)}const rr=()=>{ir+=1,Ze&&(clearTimeout(Ze),Ze=null),rs(ir)};rr();const Ns=()=>{if(jn=Date.now(),Dt.current=!0,le(),Ve){be=!0;return}rr()};st.current=Ns;const ss=()=>{document.hidden?(ir+=1,Ze&&(clearTimeout(Ze),Ze=null)):($n(zg(zn,"reset")),Ct=He(),jn=Date.now(),rr())};document.addEventListener("visibilitychange",ss);const as=re.onScroll(()=>{if(!Ce){if(Un()){L(!1),ie("");return}L(!0),kn(),Nn()}}),Ci=a.current.querySelector(".xterm-viewport"),z=()=>{P.current&&bn()};return Ci==null||Ci.addEventListener("scroll",z,{passive:!0}),()=>{Ce=!0,Bn!=null&&cancelAnimationFrame(Bn),ue.current=null,st.current=null,A.current=null,k.current=null,J.current=null,Xn(),vr(),Ze&&clearTimeout(Ze),document.removeEventListener("visibilitychange",ss),window.removeEventListener("resize",jt),window.removeEventListener("orientationchange",jt),_n==null||_n.disconnect(),Ee.removeEventListener("pointerdown",Mn,{capture:!0}),Ee.removeEventListener("wheel",qn,{capture:!0}),Ee.removeEventListener("touchstart",Fr,{capture:!0}),Ee.removeEventListener("touchmove",Sr,{capture:!0}),Ee.removeEventListener("touchend",Ti,{capture:!0}),ai.removeEventListener("pointerdown",ns,{capture:!0}),ai.removeEventListener("pointermove",ma,{capture:!0}),ai.removeEventListener("pointerup",fi,{capture:!0}),ai.removeEventListener("pointercancel",fi,{capture:!0}),Ci==null||Ci.removeEventListener("scroll",z),as.dispose(),$e.dispose();for(const{deco:Y,marker:de}of E.current)Y.dispose(),de.dispose();E.current=[],mi(),ze(),f.current=null,re.dispose(),d.current=null}},[s]);const yt=()=>{var $e,Ke,ge,Ze;($e=A.current)==null||$e.call(A);const re=(Ke=a.current)==null?void 0:Ke.querySelector(".xterm-viewport");re&&(re.scrollTop=re.scrollHeight),(ge=d.current)==null||ge.scrollToBottom(),L(!1),ie(""),(Ze=st.current)==null||Ze.call(st)},Kt=async re=>{var Ze;const $e=d.current,Ke=$e==null?void 0:$e.buffer.active,ge=re==="up"?-1:1;if($e&&Ke&&WN(Ke.viewportY,Ke.baseY,ge)==="internal"){$e.scrollLines(ge*Math.max(1,$e.rows-1)),x.current=!0;return}try{await Hu(s,[re==="up"?"PageUp":"PageDown"]),(Ze=st.current)==null||Ze.call(st)}catch{}},Se=()=>{var $e;const re=!X;K(re),m.current=re,($e=f.current)==null||$e.call(f)},Re=()=>{var re;Ie.current=!0,(re=ue.current)==null||re.call(ue)},We=async()=>{const re=d.current,$e=GS((re==null?void 0:re.getSelection())??"");if($e){let Ke=!1;if(navigator.clipboard&&window.isSecureContext)try{await navigator.clipboard.writeText($e),Ke=!0}catch{}if(!Ke){const ge=document.createElement("textarea");ge.value=$e,ge.style.cssText="position:fixed;top:0;left:0;opacity:0",document.body.appendChild(ge),ge.focus(),ge.select();try{document.execCommand("copy")}catch{}document.body.removeChild(ge)}}re==null||re.clearSelection(),P.current=!1,ee(null),G("")};return o.jsxDEV("div",{className:"terminal-wrap",children:[o.jsxDEV("div",{ref:a,className:$?"terminal":"terminal terminal--loading"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1415,columnNumber:7},this),!$&&o.jsxDEV(FS,{hint:U("boot.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1416,columnNumber:18},this),!O&&o.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:1417,columnNumber:22},this),he&&o.jsxDEV("div",{className:"dbg",children:ve},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1418,columnNumber:22},this),O&&me&&!B&&o.jsxDEV("div",{className:"term-banner term-banner--hist",children:me},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1419,columnNumber:47},this),B&&o.jsxDEV("div",{className:"term-banner term-banner--sel",children:B},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1420,columnNumber:19},this),me&&o.jsxDEV("button",{className:"new-output",onClick:yt,children:"↓ 回到底部"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1421,columnNumber:22},this),I&&o.jsxDEV("div",{className:"term-pager",role:"group","aria-label":"翻页",onPointerDown:re=>{zN(document.activeElement)&&re.cancelable&&re.preventDefault()},children:[o.jsxDEV("div",{className:"term-pager-grp",children:[o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"上翻页",onClick:()=>Kt("up"),children:o.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:o.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:1434,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1433,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1432,columnNumber:13},this),o.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:1437,columnNumber:13},this),o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"下翻页",onClick:()=>Kt("down"),children:o.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:o.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:1440,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1439,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1438,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1431,columnNumber:11},this),o.jsxDEV("div",{className:"term-pager-grp",children:[o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"适配高度",title:"适配高度",onClick:Re,children:o.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:[o.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:1447,columnNumber:17},this),o.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:1448,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1446,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1445,columnNumber:13},this),o.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:1451,columnNumber:13},this),o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"定位光标行",title:"定位光标行","aria-pressed":X,onClick:Se,children:o.jsxDEV("svg",{viewBox:"0 0 24 24",width:"19",height:"19","aria-hidden":"true",children:[o.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:1454,columnNumber:17},this),o.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:1455,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1453,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1452,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1444,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1423,columnNumber:9},this),ne&&(()=>{const re=Math.min(ne.start.x,ne.end.x),$e=Math.min(ne.start.y,ne.end.y),Ke=Math.max(ne.start.y,ne.end.y),ge=Math.max(8,Math.min(re,(ne.wrapW??0)-t2-8)),Ze=$e-44,Ce=Ke+(ne.start.ch||0)+8,Ve=Ze<4?Ce:Ze;return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"sel-handle sel-handle--start",style:{left:ne.start.x,top:ne.start.y,"--h":`${ne.start.ch}px`},"data-end":"start"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1473,columnNumber:11},this),o.jsxDEV("div",{className:"sel-handle sel-handle--end",style:{left:ne.end.x,top:ne.end.y,"--h":`${ne.end.ch}px`},"data-end":"end"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1476,columnNumber:11},this),o.jsxDEV("div",{className:"sel-callout",style:{left:ge,top:Ve},children:[o.jsxDEV("button",{type:"button",onClick:We,children:"拷贝"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1481,columnNumber:13},this),o.jsxDEV("button",{type:"button",onClick:()=>{const be=J.current;be&&be.selectRange(Z3(be.currentRange(),d.current.cols))},children:"整行"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1482,columnNumber:13},this),o.jsxDEV("button",{type:"button",onClick:()=>{const be=J.current;if(!be)return;const Me=d.current.buffer.active;be.selectRange(Q3(be.currentRange(),d.current.cols,be.paraLineText,0,Me.length-1))},children:"整段"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1486,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1479,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1472,columnNumber:9},this)})()]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1414,columnNumber:5},this)}),a2=[["esc","tab","tilde","slash","up","at","del"],["ctrl","shift","alt","left","down","right","enter"]],Wu=["ctrl","shift","alt"],v_={kbd:"⌨",esc:"Esc",up:"▲",tab:"Tab",ctrl:"Ctrl",shift:"Shift",del:"⌫",left:"◀",down:"▼",right:"▶",alt:"Alt",slash:"/",tilde:"~",at:"@",enter:"Enter"},o2=new Set(["up","down","left","right","del"]),XN={esc:"Escape",tab:"Tab",del:"BSpace",enter:"Enter",up:"Up",down:"Down",left:"Left",right:"Right"},JN={slash:"/",tilde:"~",at:"@"};function l2(r){return r in XN?{kind:"key",name:XN[r]}:r in JN?{kind:"text",ch:JN[r]}:null}const g_="off",q_="armed",__="locked",ua=r=>r===q_||r===__,c2=r=>Wu.some(s=>ua(r[s]));function b_(r){const s={};for(const c of Wu)s[c]=r[c]===q_?g_:r[c]??g_;return s}function qS(r,s){if(!r||!c2(s))return r;const c=ua(s.ctrl),v=ua(s.shift),C=ua(s.alt);if(v&&r.kind==="key"){if(r.name==="Tab")return{kind:"key",name:"BTab"};if(["Up","Down","Left","Right"].includes(r.name))return{kind:"key",name:`S-${r.name}`}}return(c||C)&&r.kind==="text"&&/^[a-z0-9]$/i.test(r.ch)?{kind:"key",name:`${c?"C":"M"}-${r.ch.toLowerCase()}`}:r}const u2={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"},d2={Escape:"Esc",BSpace:"⌫",Space:"Space",PageUp:"PgUp",PageDown:"PgDn"};function h2(r,s){const c=!!r.ctrl,v=!!r.shift,C=!!r.alt,R=(s||"").trim();if(!R)return null;const y=[];c&&y.push("Ctrl"),v&&y.push("Shift"),C&&y.push("Alt");const a=g=>[...y,g].join("+"),d=u2[R.toLowerCase()];return d?{name:d==="Tab"&&v&&!c&&!C?"BTab":(c?"C-":"")+(C?"M-":"")+(v?"S-":"")+d,label:a(d2[d]||d)}:R.length!==1||!c&&!C&&!v?null:c||C?{name:(c?"C-":"")+(C?"M-":"")+R.toLowerCase(),label:a(R.toUpperCase())}:{name:R.toUpperCase(),label:a(R.toUpperCase())}}function m2(r,{delay:s=400,interval:c=120}={}){let v=null,C=null;const R=()=>{v&&clearTimeout(v),C&&clearInterval(C),v=null,C=null};return{start:()=>{R(),r(),v=setTimeout(()=>{C=setInterval(r,c)},s)},stop:R}}const ZN={up:"Up",down:"Down",left:"Left",right:"Right",tilde:"Tilde",slash:"Slash",at:"At",del:"Backspace"},YS=r=>{r.cancelable&&r.preventDefault()},f2=500;function p2({onKey:r,onText:s,mods:c,setMods:v,keyHeldRef:C}){const R=M.useRef(c);R.current=c;const y=d=>{const g=l2(d);if(!g)return;const x=Wu.some(_=>ua(R.current[_])),h=x?qS(g,R.current):g;h.kind==="key"?r(h.name):s(h.ch),x&&v(b_)},a=d=>Wu.includes(d)?o.jsxDEV(g2,{id:d,state:c[d],setMods:v},d,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:43,columnNumber:40},this):o.jsxDEV(_2,{id:d,dispatch:y,keyHeldRef:C},d,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:44,columnNumber:12},this);return o.jsxDEV("div",{className:"keybar-grid",children:a2.flat().map(a)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:49,columnNumber:10},this)}const v2=300;function g2({id:r,state:s,setMods:c}){const v=M.useRef(-1/0),C=y=>{const a=y.timeStamp||0;if(a-v.current<v2){v.current=-1/0,c(d=>({...d,[r]:__}));return}v.current=a,c(d=>({...d,[r]:ua(d[r])?g_:q_}))},R=s===__?" locked":ua(s)?" armed":"";return o.jsxDEV("button",{type:"button",className:`keybar-key keybar-mod${R}`,"data-key":r,"data-state":s,"aria-pressed":ua(s),"aria-label":v_[r],onPointerDown:YS,onClick:C,children:v_[r]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:75,columnNumber:5},this)}function _2({id:r,dispatch:s,keyHeldRef:c}){const v=M.useRef(null),C=M.useRef(s);C.current=s;const R=M.useRef(null),y=N=>{c&&(c.current=N)},a=v_[r];if(!o2.has(r))return o.jsxDEV("button",{type:"button",className:"keybar-key","data-key":r,"aria-label":ZN[r]||a,onPointerDown:YS,onClick:()=>s(r),children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:94,columnNumber:12},this);const d=()=>{const N=R.current;N!=null&&N.guard&&(clearTimeout(N.guard),N.guard=null)},g=N=>{N.cancelable&&N.preventDefault(),v.current||(v.current=m2(()=>C.current(r)));const E={x:N.clientX,y:N.clientY,held:!1,moved:!1,guard:null};E.guard=setTimeout(()=>{E.held=!0,E.guard=null,v.current.start()},f2),R.current=E,y(!0)},x=N=>{const E=R.current;!E||E.held||(Math.abs(N.clientX-E.x)>8||Math.abs(N.clientY-E.y)>8)&&(E.moved=!0,d(),y(!1))},h=()=>{const N=R.current;y(!1),N&&(d(),N.held?v.current.stop():N.moved||C.current(r),R.current=null)},_=()=>{var N;y(!1),d(),(N=R.current)!=null&&N.held&&v.current.stop(),R.current=null};return o.jsxDEV("button",{type:"button",className:"keybar-key","data-key":r,"aria-label":ZN[r]||a,onPointerDown:g,onPointerMove:x,onPointerUp:h,onPointerCancel:_,onPointerLeave:_,children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:130,columnNumber:5},this)}const KS=r=>`hm_favs6_${r}`,XS="command",y_=r=>r?`command@${r}`:XS,b2={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 er(r){try{const s=localStorage.getItem(KS(r));if(s)return JSON.parse(s)}catch{}return(b2[r]||[]).map(s=>({...s}))}function Vm(r,s){try{localStorage.setItem(KS(r),JSON.stringify(s))}catch{}return s}function x_(r,s){const c=er(r);if(c.some(C=>C.text===s.text))return c;const v=s.kind==="key"?{kind:"key",text:s.text,label:s.label}:{kind:s.kind,text:s.text,enter:!!s.enter};return Vm(r,[...c,v])}function w_(r,s){return Vm(r,er(r).filter(c=>c.text!==s))}function y2(r,s,c){const v=er(r),C=v.findIndex(y=>y.text===s);if(C<0||v.some((y,a)=>a!==C&&y.text===c.text))return v;const R=v.slice();return R[C]=c.kind==="key"?{kind:"key",text:c.text,label:c.label}:{kind:c.kind,text:c.text,enter:!!c.enter},Vm(r,R)}function x2(r,s,c){const v=er(r),C=v.findIndex(a=>a.text===s),R=C+(c<0?-1:1);if(C<0||R<0||R>=v.length)return v;const y=v.slice();return[y[C],y[R]]=[y[R],y[C]],Vm(r,y)}const w2=r=>{var s;try{(s=navigator.clipboard)==null||s.writeText(r)}catch{}};function N2({open:r,mode:s,recent:c=[],onSend:v,onFill:C,onClose:R,onDelete:y,historyOnly:a=!1}){const[d,g]=M.useState(()=>er(s)),x=M.useRef(null),[h,_]=M.useState(s);if(h!==s&&(_(s),g(er(s))),!r)return null;const N=a?[]:d.filter(m=>m.kind==="reply"),E=a?[]:d.filter(m=>m.kind==="cmd"),b=()=>{var p;const m=(((p=x.current)==null?void 0:p.value)||"").trim();if(!m)return;const f=s==="agent"&&!m.startsWith("/")?"reply":"cmd";g(x_(s,{kind:f,text:m})),x.current&&(x.current.value="")},l=m=>g(w_(s,m));return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:35,columnNumber:7},this),o.jsxDEV("div",{className:`cmd-panel${a?" history":""}`,role:"dialog","aria-label":U("fav.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:U(a?"dock.history":"fav.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:38,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:R,"aria-label":U("common.close"),children:o.jsxDEV(ca,{},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),o.jsxDEV("div",{className:"cmd-list",children:[a&&o.jsxDEV("div",{className:"cmd-hint",children:U("history.scope")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:42,columnNumber:27},this),N.length>0&&o.jsxDEV("div",{className:"fav-chips",children:N.map(m=>o.jsxDEV("span",{className:"fav-chip",onClick:()=>v(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),E.map(m=>o.jsxDEV("div",{className:"cmd-row",children:[o.jsxDEV("span",{className:"cmd-text",onClick:()=>v(m.text),onDoubleClick:()=>C(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),o.jsxDEV("button",{className:"cmd-del",onClick:()=>l(m.text),"aria-label":U("common.delete"),children:o.jsxDEV(ca,{},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)),c.map(m=>o.jsxDEV("div",{className:"cmd-row",children:[o.jsxDEV("span",{className:"cmd-text",onClick:()=>v(m),onDoubleClick:()=>C(m),children:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:59,columnNumber:15},this),o.jsxDEV("button",{className:"cmd-copy",onClick:()=>w2(m),"aria-label":U("common.copy"),children:o.jsxDEV(ES,{},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),y&&o.jsxDEV("button",{className:"cmd-del",onClick:()=>y(m),"aria-label":U("common.delete"),children:o.jsxDEV(ca,{},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)),a&&c.length===0&&o.jsxDEV("div",{className:"cmd-empty",children:U("history.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:66,columnNumber:50},this),!a&&o.jsxDEV("div",{className:"fav-add",children:[o.jsxDEV("input",{ref:x,className:"fav-add-input",placeholder:U("fav.addPlaceholder"),onKeyDown:m=>{m.key==="Enter"&&b()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:69,columnNumber:15},this),o.jsxDEV("button",{className:"fav-add-btn",onClick:b,children:U("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 Cm=[{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}}],S2=r=>Cm.find(s=>s.key===r)||Cm[0],C2=[["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"]],E2=[...C2.map(([r,s])=>({value:r,label:s})),..."abcdefghijklmnopqrstuvwxyz".split("").map(r=>({value:r,label:r.toUpperCase()})),..."0123456789".split("").map(r=>({value:r,label:r}))];function j2(r){let s=r.text||"";if(s==="BTab")return{sticky:"shift",base:"Tab"};let c=!1,v=!1,C=!1;s.startsWith("C-")&&(c=!0,s=s.slice(2)),s.startsWith("M-")&&(v=!0,s=s.slice(2)),s.startsWith("S-")&&(C=!0,s=s.slice(2)),!c&&!v&&!C&&s.length===1&&s>="A"&&s<="Z"&&(C=!0);const R=Cm.find(y=>!!y.mods.ctrl===c&&!!y.mods.shift===C&&!!y.mods.alt===v);return{sticky:R?R.key:"none",base:s.length===1?s.toLowerCase():s}}function QN({value:r,options:s,onChange:c,placeholder:v}){const[C,R]=M.useState(!1),y=s.find(a=>a.value===r);return o.jsxDEV("div",{className:"cmd-dd",children:[o.jsxDEV("button",{type:"button",className:`cmd-dd-btn${C?" open":""}`,onClick:()=>R(a=>!a),"aria-haspopup":"listbox","aria-expanded":C,children:[o.jsxDEV("span",{className:y?void 0:"cmd-dd-ph",children:y?y.label:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:61,columnNumber:9},this),o.jsxDEV(ha,{},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),C&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-dd-scrim",onClick:()=>R(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:65,columnNumber:11},this),o.jsxDEV("div",{className:"cmd-dd-menu",role:"listbox",children:s.map(a=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":a.value===r,className:`cmd-dd-opt${a.value===r?" on":""}`,onClick:()=>{c(a.value),R(!1)},children:[o.jsxDEV("span",{children:a.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:71,columnNumber:17},this),a.value===r&&o.jsxDEV($_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:72,columnNumber:39},this)]},a.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 D2({title:r,accent:s,items:c,showTitle:v=!0,onMove:C,onDel:R,onEdit:y}){return o.jsxDEV("div",{className:`cmd-esection ${s}`,children:[v&&o.jsxDEV("div",{className:`cmd-section ${s}`,children:o.jsxDEV("span",{className:"cmd-section-name",children:r},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),c.length===0&&o.jsxDEV("div",{className:"cmd-empty",children:U("cmd.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:88,columnNumber:30},this),c.map((a,d)=>o.jsxDEV("div",{className:"cmd-row",children:[o.jsxDEV("button",{type:"button",className:"cmd-text cmd-fav-text",onClick:()=>y(a),children:[a.kind==="key"&&a.label||a.text,a.kind!=="key"&&a.enter&&o.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),o.jsxDEV("button",{className:"cmd-move up",disabled:d===0,onClick:()=>C(a.text,-1),"aria-label":U("cmd.moveUp"),children:o.jsxDEV(ha,{},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),o.jsxDEV("button",{className:"cmd-move",disabled:d===c.length-1,onClick:()=>C(a.text,1),"aria-label":U("cmd.moveDown"),children:o.jsxDEV(ha,{},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),o.jsxDEV("button",{className:"cmd-del",onClick:()=>R(a.text),"aria-label":U("common.delete"),children:o.jsxDEV(ca,{},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)]},a.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 k2({scopes:r,cfg:s,edit:c,inset:v,onAdd:C,onUpdate:R,onClose:y}){const a=c&&c.fav.kind==="key"?j2(c.fav):null,[d,g]=M.useState(c&&c.fav.kind==="key"?"key":"msg"),[x,h]=M.useState(c?c.scope:r[0].key),[_,N]=M.useState(c?a?a.base:c.fav.text:""),[E,b]=M.useState(c&&c.fav.kind!=="key"?!!c.fav.enter:!1),[l,m]=M.useState(a?a.sticky:"none"),f=M.useRef(null),p=L=>{L!==d&&(g(L),N(""))},S=Cm.map(L=>({value:L.key,label:L.label??U("cmd.stickyNone")})),k=d==="key"?h2(S2(l).mods,_):null,j=r.some(L=>L.key===x)?x:r[0].key,A=d==="key"?!!k:!!_.trim(),D=()=>{var O;if(!A)return;const L=d==="key"?{kind:"key",text:k.name,label:k.label}:{kind:s.msgKind(_.trim()),text:_.trim(),enter:E};if(c){R(c.scope,c.fav.text,j,L);return}C(j,L),N(""),(O=f.current)==null||O.focus()};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop cmd-add-backdrop",onClick:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:144,columnNumber:7},this),o.jsxDEV("div",{className:"cmd-addcard",role:"dialog","aria-label":U(c?"cmd.editItem":"cmd.addTitle"),style:{transform:`translate(-50%, calc(-50% + ${v/2}px))`},children:[o.jsxDEV("div",{className:"cmd-addcard-head",children:[o.jsxDEV("span",{className:"cmd-title",children:U(c?"cmd.editItem":"cmd.addTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:148,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:y,"aria-label":U("common.close"),children:o.jsxDEV(ca,{},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),o.jsxDEV("div",{className:"cmd-modetabs",role:"tablist",children:[o.jsxDEV("button",{type:"button",role:"tab","aria-selected":d==="msg",className:`cmd-modetab${d==="msg"?" on":""}`,onClick:()=>p("msg"),children:s.msgLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:155,columnNumber:11},this),o.jsxDEV("button",{type:"button",role:"tab","aria-selected":d==="key",className:`cmd-modetab${d==="key"?" on":""}`,onClick:()=>p("key"),children:U("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),r.length>1&&o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:U("cmd.addTo")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:164,columnNumber:13},this),o.jsxDEV("div",{className:"cmd-seg",role:"group",children:r.map(L=>o.jsxDEV("button",{type:"button","aria-pressed":j===L.key,className:`cmd-seg-btn${L.accent==="win"?" win":""}${j===L.key?" on":""}`,onClick:()=>h(L.key),children:L.title},L.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),d==="key"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:U("cmd.sticky")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:179,columnNumber:15},this),o.jsxDEV(QN,{value:l,options:S,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),o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:U("cmd.baseKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:183,columnNumber:15},this),o.jsxDEV(QN,{value:_,options:E2,onChange:N,placeholder:U("cmd.pickKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:184,columnNumber:15},this),k&&o.jsxDEV("span",{className:"cmd-chord-preview",children:k.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):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:s.msgLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:191,columnNumber:15},this),o.jsxDEV("input",{ref:f,className:"cmd-add-input",value:_,placeholder:s.placeholder,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:L=>N(L.target.value),onKeyDown:L=>{L.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),s.hasEnter&&o.jsxDEV("label",{className:"cmd-toggle-row",children:[o.jsxDEV("span",{children:U("cmd.withEnter")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:200,columnNumber:17},this),o.jsxDEV("span",{className:"cmd-switch",children:[o.jsxDEV("input",{type:"checkbox",checked:E,onChange:L=>b(L.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:202,columnNumber:19},this),o.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),o.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),o.jsxDEV("button",{type:"button",className:"cmd-submit",disabled:!A,onClick:D,children:U(c?"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 R2(r,s){if(r==="chat")return{title:U("chat.editTitle"),scopes:[{key:"agent",title:U("chat.favs"),accent:"global"}],card:{msgLabel:U("chat.tabMsg"),placeholder:U("chat.addPlaceholder"),hasEnter:!1,msgKind:v=>v.startsWith("/")?"cmd":"reply"}};const c=s?y_(s):null;return{title:U("cmd.editTitle"),scopes:[{key:XS,title:U("cmd.global"),accent:"global"},...c?[{key:c,title:U("cmd.window"),accent:"win"}]:[]],card:{msgLabel:U("cmd.tabCmd"),placeholder:U("cmd.addPlaceholder"),hasEnter:!0,msgKind:()=>"cmd"}}}function N_({windowId:r,inset:s=0,variant:c="command",onClose:v}){const{title:C,scopes:R,card:y}=R2(c,r),[a,d]=M.useState(()=>Object.fromEntries(R.map(l=>[l.key,er(l.key)]))),[g,x]=M.useState(null),h=()=>d(Object.fromEntries(R.map(l=>[l.key,er(l.key)]))),_=(l,m,f)=>{x2(l,m,f),h()},N=(l,m)=>{w_(l,m),h()},E=(l,m)=>{x_(l,m),h()},b=(l,m,f,p)=>{l===f?y2(l,m,p):(w_(l,m),x_(f,p)),h(),x(null)};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:271,columnNumber:7},this),o.jsxDEV("div",{className:"cmd-panel cmd-editor",role:"dialog","aria-label":C,children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:C},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:274,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-add-open",onClick:()=>x({edit:null}),"aria-label":U("cmd.addTitle"),children:o.jsxDEV(z_,{},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),o.jsxDEV("button",{className:"cmd-close",onClick:v,"aria-label":U("common.close"),children:o.jsxDEV(ca,{},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),o.jsxDEV("div",{className:"cmd-list",children:R.map(l=>o.jsxDEV(D2,{title:l.title,accent:l.accent,items:a[l.key]||[],showTitle:R.length>1,onMove:(m,f)=>_(l.key,m,f),onDel:m=>N(l.key,m),onEdit:m=>x({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&&o.jsxDEV(k2,{scopes:R,cfg:y,edit:g.edit,inset:s,onAdd:E,onUpdate:b,onClose:()=>x(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 Y_({active:r,disabled:s,onToggle:c}){const v=M.useRef({x:0,y:0,moved:!1}),C=a=>{v.current={x:a.clientX,y:a.clientY,moved:!1}},R=a=>{const d=v.current;!d.moved&&Math.hypot(a.clientX-d.x,a.clientY-d.y)>10&&(d.moved=!0)},y=()=>{v.current.moved||c()};return o.jsxDEV("button",{type:"button",className:`input-mic${r?" on":""}`,"aria-label":U(r?"mic.stop":"mic.start"),"aria-pressed":r,disabled:s,onPointerDown:C,onPointerMove:R,onPointerUp:y,children:o.jsxDEV(pU,{},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 JS=["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"],K_=JS.map(r=>`.${r}`).join(","),T2=new Set(JS);function L2(r){const s=/\.([A-Za-z0-9]+)$/.exec(r||"");return s?T2.has(s[1].toLowerCase()):!1}function ZS(r){const c=(Array.isArray(r)?r:r&&typeof r.length=="number"?Array.from(r):[r]).filter(Boolean),v=[],C=[];for(const R of c)(L2(R.name)?v:C).push(R);return{allowed:v,rejected:C.map(R=>R.name)}}const QS={active:!1,phase:null,pct:0,label:""};let Gu=QS,Iu=null;const S_=new Set,X_=()=>{for(const r of[...S_])r()};function eC(r,s=""){Iu=r,Gu={active:!0,phase:"sending",pct:0,label:s},X_()}function Em(r){Gu={...Gu,...r},X_()}function C_(){Iu=null,Gu=QS,X_()}function A2(){Iu==null||Iu.abort()}const M2=r=>(S_.add(r),()=>S_.delete(r)),U2=()=>Gu;function O2(){return M.useSyncExternalStore(M2,U2)}function tC({cwd:r,onAuthFail:s,onPaths:c}){const[v,C]=M.useState(null),R=M.useRef(null);return M.useEffect(()=>()=>clearTimeout(R.current),[]),{upload:v,uploadFiles:async a=>{const{allowed:d,rejected:g}=ZS(a);if(!d.length){g.length&&(clearTimeout(R.current),C({label:U("dock.upload.rejected",{names:g.join("、")}),error:!0}),R.current=setTimeout(()=>C(null),3500));return}clearTimeout(R.current),C(null);const x=d.length,h=[],_=[],N=new AbortController;eC(N,U("dock.upload.progress",{name:d[0].name,tag:x>1?`(1/${x})`:""}));try{for(let E=0;E<x&&!N.signal.aborted;E++){const b=d[E],l=x>1?`(${E+1}/${x})`:"";Em({label:U("dock.upload.progress",{name:b.name,tag:l}),phase:"sending",pct:0});try{const m=await wS(r||"",b,(f,p)=>Em({pct:f,phase:p}),!0,{signal:N.signal});m!=null&&m.path&&h.push(m.path)}catch(m){if(m instanceof xm)break;if(m instanceof Si){s==null||s(),C_(),C(null);return}_.push({name:b.name,reason:(m==null?void 0:m.message)||U("api.uploadFailed")})}}}finally{C_()}if(h.length&&c(h),_.length||g.length){const E=_.map(b=>`${b.name}:${b.reason}`);g.length&&E.push(U("dock.upload.rejected",{names:g.join("、")})),C({label:E.join(";"),error:!0}),R.current=setTimeout(()=>C(null),5e3)}else C(null)}}}function P2(r,s){const c=s/16e3,v=Math.floor(r.length/c),C=new Int16Array(v);for(let R=0;R<v;R++){let y=r[Math.floor(R*c)];y>1?y=1:y<-1&&(y=-1),C[R]=y<0?y*32768:y*32767}return new Uint8Array(C.buffer)}function V2(r=1280){let s=new Uint8Array(0);return{push(c){const v=new Uint8Array(s.length+c.length);v.set(s),v.set(c,s.length);const C=[];let R=0;for(;v.length-R>=r;)C.push(v.slice(R,R+r)),R+=r;return s=v.slice(R),C},flush(){if(s.length===0)return null;const c=s;return s=new Uint8Array(0),c}}}function e1(r){let s="";for(let c=0;c<r.length;c++)s+=String.fromCharCode(r[c]);return btoa(s)}const I2="data:text/javascript;base64,Ly8gd2ViL3NyYy92b2ljZS9wY20td29ya2xldC5qcwovLyBNaW5pbWFsIEF1ZGlvV29ya2xldDogZm9yd2FyZCBlYWNoIHJlbmRlciBxdWFudHVtJ3MgbW9ubyBzYW1wbGVzIHRvIHRoZSBtYWluIHRocmVhZCwgd2hpY2ggZG9lcyB0aGUKLy8gKHVuaXQtdGVzdGVkKSBkb3duc2FtcGxlL2ZyYW1lL2VuY29kZS4gS2VwdCB0cml2aWFsIG9uIHB1cnBvc2Ug4oCUIHdvcmtsZXQgY29kZSBjYW4ndCBiZSB1bml0LXRlc3RlZC4KY2xhc3MgUGNtRm9yd2FyZGVyIGV4dGVuZHMgQXVkaW9Xb3JrbGV0UHJvY2Vzc29yIHsKICBwcm9jZXNzKGlucHV0cykgewogICAgY29uc3QgY2ggPSBpbnB1dHNbMF0gJiYgaW5wdXRzWzBdWzBdOwogICAgaWYgKGNoICYmIGNoLmxlbmd0aCkgdGhpcy5wb3J0LnBvc3RNZXNzYWdlKGNoLnNsaWNlKDApKTsgLy8gY29weTogdGhlIGJ1ZmZlciBpcyByZXVzZWQgYWZ0ZXIgcHJvY2VzcygpCiAgICByZXR1cm4gdHJ1ZTsKICB9Cn0KcmVnaXN0ZXJQcm9jZXNzb3IoJ3BjbS1mb3J3YXJkZXInLCBQY21Gb3J3YXJkZXIpOwo=";function B2({getUserMedia:r=c=>navigator.mediaDevices.getUserMedia(c),AudioCtor:s=window.AudioContext||window.webkitAudioContext}={}){let c=null,v=null,C=null,R=null;const y=V2(1280);async function a(g){v=await r({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0}}),c=new s,await c.resume(),await c.audioWorklet.addModule(I2),R=c.createMediaStreamSource(v),C=new AudioWorkletNode(c,"pcm-forwarder"),C.port.onmessage=x=>{const h=P2(x.data,c.sampleRate);for(const _ of y.push(h))g(e1(_))},R.connect(C),C.connect(c.destination)}async function d(){try{C&&(C.port.onmessage=null)}catch{}try{R&&R.disconnect(),C&&C.disconnect()}catch{}try{v&&v.getTracks().forEach(x=>x.stop())}catch{}try{c&&await c.close()}catch{}const g=y.flush();return c=v=C=R=null,g?e1(g):null}return{start:a,stop:d}}const F2={language:"zh_cn",domain:"iat",accent:"mandarin",vad_eos:1e4,dwa:"wpgs",ptt:1,nunum:1},J_="audio/L16;rate=16000";function H2(r,s){return{common:{app_id:r},business:{...F2},data:{status:0,format:J_,encoding:"raw",audio:s}}}function z2(r){return{data:{status:1,format:J_,encoding:"raw",audio:r}}}function $2(){return{data:{status:2,format:J_,encoding:"raw",audio:""}}}function t1(){return{sentences:new Map}}function W2(r,s){var R;const c=(R=s==null?void 0:s.data)==null?void 0:R.result;if(!c||!Array.isArray(c.ws))return r;const v=c.ws.map(y=>(y.cw||[]).map(a=>a.w).join("")).join(""),C=new Map(r.sentences);if(c.pgs==="rpl"&&Array.isArray(c.rg))for(let y=c.rg[0];y<=c.rg[1];y++)C.delete(y);return C.set(c.sn,v),{sentences:C}}function n1(r){return[...r.sentences.keys()].sort((s,c)=>s-c).map(s=>r.sentences.get(s)).join("")}const G2=55e3,q2=4e3;function Z_({onText:r,deps:s={}}){const c=s.signAsr||$M,v=s.WebSocketCtor||window.WebSocket,C=s.makeRecorder||(()=>B2()),[R,y]=M.useState("idle"),[a,d]=M.useState(""),g=M.useRef("idle"),x=M.useCallback(L=>{g.current=L,y(L)},[]),h=M.useRef(null),_=M.useRef(null),N=M.useRef(t1()),E=M.useRef(""),b=M.useRef(!1),l=M.useRef(null),m=M.useRef(null),f=M.useRef(null),p=M.useRef(r);p.current=r;const S=M.useCallback(()=>{clearTimeout(l.current),clearTimeout(m.current);try{h.current&&h.current.close()}catch{}h.current=null,_.current=null,b.current=!1},[]),k=M.useCallback(()=>{var L;g.current!=="idle"&&((L=p.current)==null||L.call(p,n1(N.current)),d(""),x("idle"),S())},[S,x]),j=M.useCallback(L=>{const O=h.current;!O||O.readyState!==1||(O.send(JSON.stringify(b.current?z2(L):H2(E.current,L))),b.current=!0)},[]),A=M.useCallback(async()=>{if(g.current==="recording"){x("finalizing"),clearTimeout(l.current);try{const L=_.current?await _.current.stop():null;L&&j(L);const O=h.current;O&&O.readyState===1?(O.send(JSON.stringify($2())),m.current=setTimeout(()=>k(),q2)):k()}catch{x("error"),S()}}},[j,S,x,k]);f.current=A;const D=M.useCallback(async()=>{if(!(g.current!=="idle"&&g.current!=="error")){x("requesting"),d(""),N.current=t1(),b.current=!1;try{const{url:L,appId:O}=await c();E.current=O;const F=new v(L);h.current=F,F.onmessage=B=>{var ne;const G=JSON.parse(B.data);N.current=W2(N.current,G),d(n1(N.current)),((ne=G==null?void 0:G.data)==null?void 0:ne.status)===2&&k()},F.onerror=()=>{x("error"),S()},F.onclose=()=>{(g.current==="recording"||g.current==="finalizing")&&k()};const P=C();_.current=P,await P.start(j),x("recording"),l.current=setTimeout(()=>{var B;(B=f.current)==null||B.call(f)},G2)}catch{x("error"),S()}}},[c,v,C,j,S,x,k]);return M.useEffect(()=>S,[S]),{state:R,partial:a,start:D,stop:A}}const nC="tw_asr";function Y2(){try{const r=localStorage.getItem(nC);return r==null?null:r==="1"}catch{return null}}function Q_(){const[r,s]=M.useState(Y2);return M.useEffect(()=>{let c=!0;return Promise.resolve().then(xS).then(v=>{if(!c)return;const C=!!(v!=null&&v.asr);s(C);try{localStorage.setItem(nC,C?"1":"0")}catch{}}).catch(()=>{}),()=>{c=!1}},[]),r}function Im(r){M.useEffect(()=>{if(!r||!("wakeLock"in navigator))return;let s=null,c=!1;const v=async()=>{try{const R=await navigator.wakeLock.request("screen");if(c){try{R.release()}catch{}return}s=R}catch{}},C=()=>{document.visibilityState==="visible"&&!c&&v()};return v(),document.addEventListener("visibilitychange",C),()=>{c=!0,document.removeEventListener("visibilitychange",C);try{s&&s.release()}catch{}s=null}},[r])}function Jr(r,s){const c=M.useRef(s);c.current=s,M.useEffect(()=>{if(!r)return;window.history.pushState({overlay:!0},"");const v=()=>{var C;return(C=c.current)==null?void 0:C.call(c)};return window.addEventListener("popstate",v),()=>{var C;window.removeEventListener("popstate",v),(C=window.history.state)!=null&&C.overlay&&window.history.back()}},[r])}function i1(){const r=window.visualViewport;return r?window.innerHeight-r.height>120:!1}function K2(){const[r,s]=M.useState(0);return M.useEffect(()=>{const c=window.visualViewport;if(!c)return;const v=()=>{const C=window.innerHeight-c.height-c.offsetTop;s(Math.max(0,Math.round(C)))};return v(),c.addEventListener("resize",v),c.addEventListener("scroll",v),()=>{c.removeEventListener("resize",v),c.removeEventListener("scroll",v)}},[]),r}const Hl={ESC:"Escape",Esc:"Escape",Tab:"Tab","⌫":"BSpace"},r1=r=>{r.cancelable&&r.preventDefault()},X2=r=>{var s,c;(c=(s=r.target).closest)!=null&&c.call(s,"input, textarea, [contenteditable]")||r.cancelable&&r.preventDefault()},s1=80,J2=r=>Hl[r]?"esc":r.startsWith("/")?"cmd":"reply",Z2=450;function Gg({className:r,onTap:s,onHold:c,children:v,...C}){const R=M.useRef({timer:null,long:!1,moved:!1,x:0,y:0}),y=x=>{x.cancelable&&x.preventDefault();const h=R.current;h.long=!1,h.moved=!1,h.x=x.clientX,h.y=x.clientY,c&&(h.timer=setTimeout(()=>{var _;h.long=!0,(_=navigator.vibrate)==null||_.call(navigator,12),c()},Z2))},a=x=>{const h=R.current;h.moved||(Math.abs(x.clientX-h.x)>8||Math.abs(x.clientY-h.y)>8)&&(h.moved=!0,clearTimeout(h.timer))},d=()=>{const x=R.current;if(clearTimeout(x.timer),x.timer=null,x.moved){x.moved=!1;return}if(x.long){x.long=!1;return}s()},g=()=>{const x=R.current;clearTimeout(x.timer),x.timer=null,x.long=!1,x.moved=!1};return o.jsxDEV("button",{type:"button",className:r,...C,onPointerDown:y,onPointerMove:a,onPointerUp:d,onPointerCancel:g,onPointerLeave:g,children:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:90,columnNumber:5},this)}function Q2({pane:r,onAuthFail:s,onKey:c,onText:v,cwd:C=null,agent:R=null,windowId:y=null,recent:a=[],onSent:d,onRemoveRecent:g,inset:x=0},h){const[_,N]=M.useState(()=>lS());M.useEffect(()=>{cS(_)},[_]);const[E,b]=M.useState(!1),[l,m]=M.useState(!1),[f,p]=M.useState(!1),[S,k]=M.useState(()=>er("agent")),[j,A]=M.useState(!1);M.useEffect(()=>{!f&&!j&&k(er("agent"))},[f,j]);const[D,L]=M.useState(()=>er("command")),[O,F]=M.useState(()=>y?er(y_(y)):[]),[P,B]=M.useState(!1);M.useEffect(()=>{P||(L(er("command")),F(y?er(y_(y)):[]))},[P,y]);const[G,ne]=M.useState({}),ee=G[r]||(R?"agent":"command"),te=oe=>{var ke;const qe=i1()||document.activeElement===We.current||document.activeElement===Re.current;ne(Q=>({...Q,[r]:oe})),qe&&((ke=oe==="command"?We.current:Re.current)==null||ke.focus({preventScroll:!0}))},[se,I]=M.useState({ctrl:"off",shift:"off",alt:"off"}),[W,X]=M.useState(!1),K=M.useRef(null),ve=M.useRef(null),he=M.useRef(null),Ae=ee==="command"?0:1,me=M.useRef(Ae);me.current=Ae;const ie=M.useRef(te);ie.current=te;const $=M.useRef(!1),_e=M.useRef(!1),ue=()=>{var oe;return((oe=K.current)==null?void 0:oe.clientWidth)||0},Ie=oe=>{const qe=ve.current;qe&&(qe.style.transition="none",qe.style.transform=`translate3d(${oe}px, 0, 0)`)},Ue=()=>{const oe=ve.current;!oe||!oe.style.transform||(oe.style.transition="",oe.style.transform="")},nt=M.useRef(null),et=50,st=12,Dt=38,J=oe=>{const qe=nt.current;qe&&(qe.classList.add("dragging"),qe.style.setProperty("--drag",`${w3(oe)}px`),qe.style.setProperty("--morph",`${Math.min(1,Math.max(0,(Math.abs(oe)-st)/Dt))}`),qe.classList.toggle("armed",Math.abs(oe)>=et))},yt=()=>{const oe=nt.current;oe&&(oe.classList.remove("dragging","armed"),oe.style.removeProperty("--drag"),oe.style.removeProperty("--morph"))};M.useLayoutEffect(()=>{$.current||Ue()});const Kt=()=>{const oe=K.current;if(!oe)return;const qe=oe.querySelector(ee==="command"?".dock-page.command":".dock-page.chat");qe&&(oe.style.height=`${qe.offsetHeight}px`)};M.useLayoutEffect(()=>{ee==="agent"&&Vt(Re.current),Kt()});const Se=M.useRef(Kt);Se.current=Kt,M.useEffect(()=>{const oe=K.current;if(!oe||typeof ResizeObserver>"u")return;const qe=new ResizeObserver(()=>{$.current||Se.current()});return oe.querySelectorAll(".dock-page").forEach(ke=>qe.observe(ke)),()=>qe.disconnect()},[]),M.useEffect(()=>{if(ee!=="agent")return;const oe=requestAnimationFrame(()=>{Vt(Re.current),Kt()});return()=>cancelAnimationFrame(oe)},[ee]),M.useEffect(()=>{var qe;if(ee==="agent")return;document.activeElement===Re.current&&((qe=Re.current)==null||qe.blur());const oe=K.current;oe&&(oe.scrollLeft=0,oe.scrollTop=0)},[ee]),M.useEffect(()=>{const oe=he.current,qe=K.current;if(!oe||!qe)return;let ke=null;const Q=lt=>{var hn,Dn,Xt,Vn;Ue(),oe.classList.remove("dock-swiping");const pt=((Dn=(hn=lt.target)==null?void 0:hn.closest)==null?void 0:Dn.call(hn,".quick-scroll"))||null,wt=((Vn=(Xt=lt.target)==null?void 0:Xt.closest)==null?void 0:Vn.call(Xt,".input-text"))||null,Tt=i1()||document.activeElement===We.current||document.activeElement===Re.current;ke=lt.touches.length===1?{x:lt.touches[0].clientX,y:lt.touches[0].clientY,dx:0,dy:0,decided:!1,horiz:!1,vert:!1,strip:pt,cmp:wt,kbUp:Tt}:null},Ee=lt=>{if(!ke||lt.touches.length!==1||_e.current&&!ke.horiz)return;const pt=lt.touches[0].clientX-ke.x,wt=lt.touches[0].clientY-ke.y;if(!ke.decided){if(Math.abs(pt)<16&&Math.abs(wt)<16)return;if(ke.decided=!0,ke.horiz=Math.abs(pt)>Math.abs(wt)*1.4,!ke.kbUp&&(document.activeElement===We.current||document.activeElement===Re.current)&&document.activeElement.blur(),ke.horiz&&!ke.kbUp&&oe.classList.add("dock-swiping"),ke.horiz&&ke.strip){const Dn=ke.strip,Xt=me.current,Vn=Dn.scrollLeft<=0,Xn=Dn.scrollLeft>=Dn.scrollWidth-Dn.clientWidth-1,Ri=pt>0&&Vn&&Xt===1,tr=pt<0&&Xn&&Xt===0;Ri||tr||(ke.horiz=!1)}!ke.horiz&&Math.abs(wt)>Math.abs(pt)*1.4&&!x3(ke.cmp,wt)&&(ke.vert=!0)}if(ke.vert){ke.dx=pt,ke.dy=wt,J(wt),lt.cancelable&<.preventDefault();return}if(!ke.horiz)return;lt.preventDefault(),$.current=!0,ke.dx=pt;const Tt=ue()||1;let hn=pt;me.current===0?hn=Math.min(0,Math.max(-Tt,hn)):hn=Math.max(0,Math.min(Tt,hn)),Ie(-me.current*Tt+hn)},Ye=()=>{var hn,Dn,Xt,Vn;if($.current=!1,oe.classList.remove("dock-swiping"),ke&&ke.vert){const Xn=y3(ke.dx,ke.dy,et),Ri=me.current;ke=null,Ue(),yt(),Xn==="show"?(hn=$n(Ri))==null||hn.focus({preventScroll:!0}):Xn==="hide"&&((Dn=$n(Ri))==null||Dn.blur());return}if(!ke||!ke.horiz){ke=null,Ue();return}const lt=me.current,pt=ke.dx,wt=ke.kbUp;ke=null;let Tt=lt;lt===0&&pt<-s1?Tt=1:lt===1&&pt>s1&&(Tt=0),wt||((Xt=We.current)==null||Xt.blur(),(Vn=Re.current)==null||Vn.blur()),Ue(),Tt!==lt&&ie.current(Tt===1?"agent":"command")},Ot=()=>{(qe.scrollLeft||qe.scrollTop)&&(qe.scrollLeft=0,qe.scrollTop=0)};return qe.addEventListener("scroll",Ot,{passive:!0}),oe.addEventListener("touchstart",Q,{passive:!0}),oe.addEventListener("touchmove",Ee,{passive:!1}),oe.addEventListener("touchend",Ye,{passive:!0}),oe.addEventListener("touchcancel",Ye,{passive:!0}),()=>{qe.removeEventListener("scroll",Ot),oe.removeEventListener("touchstart",Q),oe.removeEventListener("touchmove",Ee),oe.removeEventListener("touchend",Ye),oe.removeEventListener("touchcancel",Ye)}},[]),Jr(f,()=>p(!1));const Re=M.useRef(null),We=M.useRef(null),re=M.useRef(null),$e=M.useRef(!1);M.useEffect(()=>{const oe=window.visualViewport;if(!oe)return;const qe=()=>{if(window.innerHeight-oe.height>120){$e.current=!0;return}if(!$e.current)return;$e.current=!1;const Q=document.activeElement;(Q===We.current||Q===Re.current)&&Q.blur(),X(!1)};return qe(),oe.addEventListener("resize",qe),()=>oe.removeEventListener("resize",qe)},[]);const Ke=M.useRef({head:"",tail:""}),ge=M.useRef(null),Ze=M.useRef(!1),Ve=Z_({onText:oe=>{if(Ze.current){Ze.current=!1;return}const{head:qe,tail:ke}=Ke.current;N(qe+oe+ke),ge.current=qe.length+oe.length}}),be=Q_(),Me=Ve.state==="recording"||Ve.state==="finalizing";Im(Me),M.useEffect(()=>{if(Ve.state!=="recording"&&Ve.state!=="finalizing"||Ze.current)return;const{head:oe,tail:qe}=Ke.current;N(oe+Ve.partial+qe),ge.current=oe.length+Ve.partial.length},[Ve.partial,Ve.state]),M.useLayoutEffect(()=>{const oe=Re.current;if(!oe)return;let qe=!1;if(ge.current!=null){const ke=ge.current;if(ge.current=null,document.activeElement===oe)try{oe.setSelectionRange(ke,ke)}catch{}qe=ke>=_.length}Vt(oe),qe&&(oe.scrollTop=oe.scrollHeight)},[_]);const He=()=>{if(Me){Ve.stop();return}const oe=Re.current,qe=oe?oe.selectionStart:_.length;Ke.current={head:_.slice(0,qe),tail:_.slice(qe)},Ve.start()},Ct=40,Lt=M.useRef(null),Ut=(oe,qe)=>{const ke=Lt.current;if(!ke)return null;ke.style.width=`${qe}px`,ke.textContent=oe;const Q=document.createElement("span");return ke.appendChild(Q),{h:ke.offsetHeight,endX:Q.offsetLeft}},Vt=oe=>{if(!oe)return;oe.style.height="auto";const qe=be?76:38,ke=be?86:48,Q=oe.parentElement.clientWidth-11,Ee=oe.value?Ut(oe.value,Q-qe):null,Ye=Ee?Ee.h>Ct:!1;b(Ye);const Ot=Ye?Ut(oe.value,Q):null;m(!!Ot&&Q-Ot.endX<ke),oe.style.height=`${oe.scrollHeight+2}px`},dn=()=>{Me&&(Ze.current=!0,Ve.stop())},Jt=async()=>{if(r){dn();try{await jo(r,_,!0),d==null||d(_),N(""),requestAnimationFrame(()=>Vt(Re.current))}catch(oe){oe instanceof Si&&(s==null||s())}}},Bt=M.useRef(!1),zt=oe=>{const qe=oe.value;if(oe.value="",!qe)return;const ke=Wu.some(Q=>ua(se[Q]));if(ke&&qe.length===1){const Q=qS({kind:"text",ch:qe},se);if(Q.kind==="key"){c(Q.name),I(b_);return}}v(qe),ke&&I(b_)},an=oe=>{var qe;(qe=oe.nativeEvent)!=null&&qe.isComposing||Bt.current||zt(oe.target)},jn=()=>{ee==="command"&&(Bt.current=!0)},it=oe=>{ee==="command"&&(Bt.current=!1,zt(oe.target))},vn=oe=>{var qe;if(!(ee!=="command"||(qe=oe.nativeEvent)!=null&&qe.isComposing)){if(oe.key==="Enter"&&!oe.shiftKey){oe.preventDefault(),c("Enter");return}oe.key==="Backspace"&&(oe.preventDefault(),c("BSpace"))}},zn=()=>{const oe=We.current;oe&&(document.activeElement===oe?oe.blur():oe.focus({preventScroll:!0}))},$n=oe=>oe===0?We.current:Re.current,tn=oe=>{N(oe),p(!1),requestAnimationFrame(()=>{var qe;(qe=Re.current)==null||qe.focus(),Vt(Re.current)})},kn=async oe=>{if(r)try{await jo(r,oe,!0),d==null||d(oe)}catch(qe){qe instanceof Si&&(s==null||s())}},Un=oe=>tn(oe),Qn=oe=>{if(Hl[oe]){c(Hl[oe]);return}kn(oe)},on=oe=>{if(oe.kind==="key"){c(oe.text);return}Qn(oe.text)},Nn=oe=>{if(oe.kind==="key"){c(oe.text);return}if(Hl[oe.text]){c(Hl[oe.text]);return}if(oe.enter){kn(oe.text);return}v(oe.text)},On=oe=>oe.kind==="key"&&oe.label||oe.text,mi=oe=>oe.kind==="key"||Hl[oe.text]||!oe.enter?void 0:()=>v(oe.text);M.useImperativeHandle(h,()=>({fill:tn,hideKeyboard:()=>{const oe=document.activeElement;(oe===We.current||oe===Re.current)&&oe.blur()}}),[]);const le=oe=>{if(!oe.length)return;let qe;if(oe.length===1)qe=oe[0];else{const ke=oe[0].slice(0,oe[0].lastIndexOf("/")+1);qe=oe.every(Q=>Q.startsWith(ke))?`${ke}{${oe.map(Q=>Q.slice(ke.length)).join(",")}}`:oe.join(" ")}N(ke=>ke&&!/\s$/.test(ke)?`${ke} ${qe}`:ke+qe),requestAnimationFrame(()=>{var ke;(ke=Re.current)==null||ke.focus(),Vt(Re.current)})},{upload:ze,uploadFiles:tt}=tC({cwd:C,onAuthFail:s,onPaths:le}),bt=async()=>{if(!(!r||!_)){dn();try{await jo(r,_,!1),d==null||d(_),N(""),requestAnimationFrame(()=>Vt(Re.current))}catch(oe){oe instanceof Si&&(s==null||s())}}},xt=M.useRef(null),mt=M.useRef(!1),jt=M.useRef({x:0,y:0,moved:!1}),gt=oe=>{oe.cancelable&&oe.preventDefault(),mt.current=!1,jt.current={x:oe.clientX,y:oe.clientY,moved:!1},_&&(xt.current=setTimeout(()=>{var qe;mt.current=!0,(qe=navigator.vibrate)==null||qe.call(navigator,12),bt()},450))},_n=oe=>{const qe=jt.current;qe.moved||Math.hypot(oe.clientX-qe.x,oe.clientY-qe.y)<=10||(qe.moved=!0,clearTimeout(xt.current),xt.current=null)},rn=()=>{if(clearTimeout(xt.current),xt.current=null,mt.current){mt.current=!1;return}jt.current.moved||Jt()},qt=()=>{clearTimeout(xt.current),xt.current=null,mt.current=!1},gn=M.useRef(null),bn=M.useRef({x:0,y:0,moved:!1}),li=oe=>{if(!E)return null;for(const[qe,ke]of[["send",".input-send"],["mic",".input-mic"]]){const Q=oe.currentTarget.querySelector(ke);if(!Q)continue;const Ee=Q.getBoundingClientRect();if(oe.clientX>=Ee.left&&oe.clientX<=Ee.right&&oe.clientY>=Ee.top&&oe.clientY<=Ee.bottom)return qe}return null},Pn=oe=>{const qe=li(oe);qe&&(oe.stopPropagation(),oe.cancelable&&oe.preventDefault(),gn.current=qe,qe==="send"?gt(oe):bn.current={x:oe.clientX,y:oe.clientY,moved:!1})},ci=oe=>{const qe=gn.current;if(!qe)return;if(qe==="send"){_n(oe);return}const ke=bn.current;!ke.moved&&Math.hypot(oe.clientX-ke.x,oe.clientY-ke.y)>10&&(ke.moved=!0)},ri=()=>{const oe=gn.current;if(gn.current=null,!!oe){if(oe==="send"){_?rn():qt();return}!bn.current.moved&&Ve.state!=="requesting"&&He()}},Ft=()=>{const oe=gn.current;gn.current=null,oe==="send"&&qt()};return o.jsxDEV("div",{className:"bottom-dock",children:[o.jsxDEV("div",{className:"dock-left",ref:he,onPointerDown:X2,children:[o.jsxDEV("button",{type:"button",className:"dock-handle",ref:nt,"aria-label":U("dock.mode.toggle"),onClick:()=>te(ee==="command"?"agent":"command"),children:[o.jsxDEV("span",{className:"dock-mode-label",children:U(ee==="command"?"dock.mode.command":"dock.mode.chat")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:822,columnNumber:11},this),o.jsxDEV("span",{className:"dock-dots",children:[o.jsxDEV("i",{className:`dock-dot${ee==="command"?" on":""}`,"data-page":"command","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:824,columnNumber:13},this),o.jsxDEV("i",{className:`dock-dot${ee==="agent"?" on":""}`,"data-page":"agent","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:825,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:823,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:820,columnNumber:9},this),o.jsxDEV("div",{className:"dock-pager",ref:K,children:o.jsxDEV("div",{className:`dock-track${Ae===1?" at-chat":""}`,ref:ve,children:[o.jsxDEV("div",{className:`dock-page command${ee==="command"?" on":""}`,children:[o.jsxDEV("input",{ref:We,className:"cmd-capture",type:"text",onInput:an,onKeyDown:vn,onCompositionStart:jn,onCompositionEnd:it,onFocus:()=>X(!0),onBlur:()=>X(!1),enterKeyHint:"send","aria-label":U("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:834,columnNumber:15},this),o.jsxDEV("div",{className:"quick-bar",children:[o.jsxDEV("div",{className:"quick-fixed",children:o.jsxDEV("button",{type:"button",className:"quick-fix quick-fix-kbd","aria-pressed":W,"aria-label":U(W?"dock.kbdHide":"dock.kbdShow"),onPointerDown:r1,onClick:zn,children:[o.jsxDEV(yU,{down:W},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:858,columnNumber:21},this),o.jsxDEV("span",{children:U(W?"dock.kbdHide":"dock.kbdShow")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:858,columnNumber:55},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:855,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:854,columnNumber:17},this),o.jsxDEV("div",{className:"quick-scroll",children:[D.map(oe=>o.jsxDEV(Gg,{className:"quick-cmd quick-cmd-plain",onTap:()=>Nn(oe),onHold:mi(oe),children:[On(oe),oe.kind!=="key"&&oe.enter&&o.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:867,columnNumber:68},this)]},`g:${oe.text}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:865,columnNumber:21},this)),O.map(oe=>o.jsxDEV(Gg,{className:"quick-cmd quick-cmd-win",onTap:()=>Nn(oe),onHold:mi(oe),children:[On(oe),oe.kind!=="key"&&oe.enter&&o.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:872,columnNumber:68},this)]},`w:${oe.text}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:870,columnNumber:21},this)),o.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":U("cmd.editTitle"),onPointerDown:r1,onClick:()=>B(!0),children:o.jsxDEV(wm,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:875,columnNumber:84},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:874,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:860,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:853,columnNumber:15},this),o.jsxDEV(p2,{onKey:c,onText:v,mods:se,setMods:I,keyHeldRef:_e},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:878,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:830,columnNumber:13},this),o.jsxDEV("div",{className:`dock-page chat${ee==="agent"?" on":""}`,children:[ze&&o.jsxDEV("div",{className:"dock-upload error",children:o.jsxDEV("span",{className:"dock-upload-label",children:ze.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:885,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:884,columnNumber:17},this),o.jsxDEV("div",{className:"quick-bar",children:[o.jsxDEV("div",{className:"quick-fixed",children:o.jsxDEV("button",{type:"button",className:"quick-fix","aria-label":U("dock.attach"),disabled:!!ze&&!ze.error,onClick:()=>{var oe;return(oe=re.current)==null?void 0:oe.click()},children:[o.jsxDEV(CS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:894,columnNumber:21},this),o.jsxDEV("span",{children:U("dock.attach")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:894,columnNumber:35},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:892,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:891,columnNumber:17},this),o.jsxDEV("div",{className:"quick-scroll",children:[S.map(oe=>o.jsxDEV(Gg,{className:`quick-cmd qc-${oe.kind==="key"?"esc":J2(oe.text)}`,onTap:()=>on(oe),onHold:oe.kind==="key"?void 0:()=>v(oe.text),children:On(oe)},oe.text,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:902,columnNumber:21},this)),o.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":U("chat.editTitle"),onClick:()=>A(!0),children:o.jsxDEV(wm,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:908,columnNumber:59},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:907,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:896,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:890,columnNumber:15},this),o.jsxDEV("input",{ref:re,className:"browse-file-input",type:"file",multiple:!0,accept:K_,onChange:oe=>{tt(oe.target.files),oe.target.value=""}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:912,columnNumber:15},this),o.jsxDEV("div",{className:`input-wrap${Me?" recording":""}${E?" multi":""}${l?" crowd":""}`,onPointerDownCapture:Pn,onPointerMoveCapture:ci,onPointerUpCapture:ri,onPointerCancelCapture:Ft,children:[o.jsxDEV("textarea",{ref:Re,className:"input-text",rows:1,value:_,onPointerDown:oe=>{Me&&(dn(),oe.currentTarget.focus())},onChange:oe=>{N(oe.target.value),Vt(oe.target)},onFocus:()=>X(!0),onBlur:()=>X(!1),placeholder:U("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:920,columnNumber:17},this),o.jsxDEV("div",{ref:Lt,className:"input-mirror","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:943,columnNumber:17},this),!_&&o.jsxDEV("button",{type:"button",className:"input-history","aria-label":U("dock.history"),title:U("dock.history"),onClick:()=>p(oe=>!oe),children:o.jsxDEV(SS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:947,columnNumber:61},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:946,columnNumber:19},this),be&&o.jsxDEV(Y_,{active:Me,disabled:Ve.state==="requesting",onToggle:He},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:949,columnNumber:34},this),o.jsxDEV("button",{type:"button",className:"input-send","aria-label":U("dock.send"),title:U("dock.send.hint"),disabled:!_,onPointerDown:gt,onPointerMove:_n,onPointerUp:rn,onPointerCancel:qt,onPointerLeave:qt,children:o.jsxDEV(H_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:954,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:951,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:917,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:880,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:829,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:828,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:814,columnNumber:7},this),o.jsxDEV(N2,{open:f,mode:ee,recent:a,historyOnly:!0,onDelete:g,onSend:oe=>{p(!1),Qn(oe)},onFill:oe=>{p(!1),Un(oe)},onClose:()=>p(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:961,columnNumber:7},this),P&&o.jsxDEV(N_,{windowId:y,inset:x,onClose:()=>B(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:968,columnNumber:23},this),j&&o.jsxDEV(N_,{variant:"chat",inset:x,onClose:()=>A(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:971,columnNumber:24},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:813,columnNumber:5},this)}const eO=M.forwardRef(Q2),tO=new Set(["clear","compact","cost","status","usage","context","help","init","exit","quit","vim","terminal-setup","release-notes"]);function E_(r){const s=/^\s*\/([a-z][\w-]*)\s*(.*)$/i.exec(typeof r=="string"?r:"");return!s||s[2].trim()?!1:!tO.has(s[1].toLowerCase())}function nO(r){const s=/^\s*\/([a-z][\w-]*)\s*(.*)$/i.exec(typeof r=="string"?r:"");if(!s||E_(r))return null;const c={name:"/"+s[1]},v=s[2].trim();return v&&(c.args=v),c}const iO=15e3;function rO(r){const[s,c]=M.useState({model:null,usedPercent:null}),v=M.useRef(r);return v.current=r,M.useEffect(()=>{if(!r){c({model:null,usedPercent:null});return}let C=!0,R=null;const y=async()=>{try{const a=await kM(r);C&&v.current===r&&a&&c({model:a.model??null,usedPercent:typeof a.usedPercent=="number"?a.usedPercent:null})}catch{}C&&(R=setTimeout(y,iO))};return y(),()=>{C=!1,R&&clearTimeout(R)}},[r]),s}const sO=r=>{var s,c;(c=(s=r.target).closest)!=null&&c.call(s,"input, textarea, [contenteditable]")||r.cancelable&&r.preventDefault()},aO=r=>r.startsWith("/")?"cmd":"reply";function oO({pane:r,kind:s,cwd:c=null,onKey:v=()=>{},onAuthFail:C,onSent:R,onInteractiveSlash:y}){const[a,d]=M.useState(()=>lS());M.useEffect(()=>{cS(a)},[a]);const g=M.useRef(null),x=M.useRef(null),h=M.useRef({x:0,y:0,moved:!1}),[_,N]=M.useState(()=>er("agent")),[E,b]=M.useState(!1);M.useEffect(()=>{E||N(er("agent"))},[E]);const l=_.filter(he=>he.kind!=="key"),m=s==="working",f=rO(r),p=f.model?f.model.replace(/\s*\(.*\)\s*$/,"").trim():null,S=f.usedPercent,k=typeof S=="number",j=k&&S>=80,A=he=>{he&&(he.style.height="auto",he.style.height=`${he.scrollHeight+2}px`)};M.useLayoutEffect(()=>{A(g.current)},[a]);const D=M.useRef({head:"",tail:""}),L=M.useRef(!1),F=Z_({onText:he=>{if(L.current){L.current=!1;return}const{head:Ae,tail:me}=D.current;d(Ae+he+me)}}),P=Q_(),B=F.state==="recording"||F.state==="finalizing";Im(B),M.useEffect(()=>{if(F.state!=="recording"&&F.state!=="finalizing"||L.current)return;const{head:he,tail:Ae}=D.current;d(he+F.partial+Ae)},[F.partial,F.state]);const G=()=>{if(B){F.stop();return}const he=g.current,Ae=he?he.selectionStart:a.length;D.current={head:a.slice(0,Ae),tail:a.slice(Ae)},F.start()},ne=()=>{B&&(L.current=!0,F.stop())},ee=async()=>{if(!(!r||!a.trim())){ne();try{await jo(r,a,!0),R==null||R(a),E_(a)&&(y==null||y(a.trim())),d(""),requestAnimationFrame(()=>A(g.current))}catch(he){he instanceof Si&&(C==null||C())}}},te=()=>v("Escape"),se=he=>{h.current={x:he.clientX,y:he.clientY,moved:!1}},I=he=>{const Ae=h.current;!Ae.moved&&Math.hypot(he.clientX-Ae.x,he.clientY-Ae.y)>10&&(Ae.moved=!0)},W=he=>{var me,ie,$;const Ae=h.current;Ae.moved||Math.hypot(he.clientX-Ae.x,he.clientY-Ae.y)>10||(ie=(me=he.target).closest)!=null&&ie.call(me,"button, a, input, textarea, [contenteditable]")||($=g.current)==null||$.focus()},X=async he=>{if(r)try{await jo(r,he,!0),R==null||R(he),E_(he)&&(y==null||y(he.trim()))}catch(Ae){Ae instanceof Si&&(C==null||C())}},K=he=>{if(!he.length)return;let Ae;if(he.length===1)Ae=he[0];else{const me=he[0].slice(0,he[0].lastIndexOf("/")+1);Ae=he.every(ie=>ie.startsWith(me))?`${me}{${he.map(ie=>ie.slice(me.length)).join(",")}}`:he.join(" ")}d(me=>me&&!/\s$/.test(me)?`${me} ${Ae}`:me+Ae),requestAnimationFrame(()=>{var me;(me=g.current)==null||me.focus(),A(g.current)})},{uploadFiles:ve}=tC({cwd:c,onAuthFail:C,onPaths:K});return o.jsxDEV("div",{className:"chat-composer",onPointerDown:sO,children:[o.jsxDEV("div",{className:"cc-quick quick-scroll",children:[l.map(he=>o.jsxDEV("button",{type:"button",className:`quick-cmd qc-${aO(he.text)}`,onClick:()=>X(he.text),children:he.text},he.text,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:179,columnNumber:11},this)),o.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":U("chat.editTitle"),onClick:()=>b(!0),children:o.jsxDEV(wm,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:184,columnNumber:45},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:183,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:177,columnNumber:7},this),o.jsxDEV("input",{ref:x,className:"browse-file-input",type:"file",multiple:!0,accept:K_,onChange:he=>{ve(he.target.files),he.target.value=""}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:187,columnNumber:7},this),o.jsxDEV("div",{className:`cc-card${B?" recording":""}`,onPointerDown:se,onPointerMove:I,onPointerUp:W,children:[o.jsxDEV("textarea",{ref:g,className:"cc-text",rows:1,value:a,onChange:he=>{d(he.target.value),A(he.target)},placeholder:U("chat.composer.placeholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:191,columnNumber:9},this),o.jsxDEV("div",{className:"cc-actions",children:[o.jsxDEV("button",{type:"button",className:"cc-attach","aria-label":U("dock.attach"),onClick:()=>{var he;return(he=x.current)==null?void 0:he.click()},children:o.jsxDEV(z_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:204,columnNumber:56},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:203,columnNumber:11},this),o.jsxDEV("div",{className:"cc-actions-right",children:[k&&o.jsxDEV("div",{className:`cc-ctx${j?" warn":""}`,"aria-hidden":"true",children:[p&&o.jsxDEV("span",{className:"cc-ctx-model",children:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:211,columnNumber:30},this),o.jsxDEV("span",{className:"cc-ctx-pct",children:[Math.round(S),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:212,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:210,columnNumber:15},this),P&&o.jsxDEV(Y_,{active:B,disabled:F.state==="requesting",onToggle:G},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:215,columnNumber:30},this),m?o.jsxDEV("button",{type:"button",className:"cc-send cc-stop","aria-label":U("chat.stop"),onClick:te,children:o.jsxDEV(jS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:218,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:217,columnNumber:15},this):o.jsxDEV("button",{type:"button",className:"cc-send","aria-label":U("dock.send"),disabled:!a.trim(),onClick:ee,children:o.jsxDEV(H_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:221,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:220,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:205,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:202,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:189,columnNumber:7},this),E&&o.jsxDEV(N_,{variant:"chat",onClose:()=>b(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:226,columnNumber:20},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:175,columnNumber:5},this)}function eb(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Oo=eb();function iC(r){Oo=r}const rC=/[&<>"']/,lO=new RegExp(rC.source,"g"),sC=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,cO=new RegExp(sC.source,"g"),uO={"&":"&","<":"<",">":">",'"':""","'":"'"},a1=r=>uO[r];function Or(r,s){if(s){if(rC.test(r))return r.replace(lO,a1)}else if(sC.test(r))return r.replace(cO,a1);return r}const dO=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function hO(r){return r.replace(dO,(s,c)=>(c=c.toLowerCase(),c==="colon"?":":c.charAt(0)==="#"?c.charAt(1)==="x"?String.fromCharCode(parseInt(c.substring(2),16)):String.fromCharCode(+c.substring(1)):""))}const mO=/(^|[^\[])\^/g;function In(r,s){let c=typeof r=="string"?r:r.source;s=s||"";const v={replace:(C,R)=>{let y=typeof R=="string"?R:R.source;return y=y.replace(mO,"$1"),c=c.replace(C,y),v},getRegex:()=>new RegExp(c,s)};return v}function o1(r){try{r=encodeURI(r).replace(/%25/g,"%")}catch{return null}return r}const Bu={exec:()=>null};function l1(r,s){const c=r.replace(/\|/g,(R,y,a)=>{let d=!1,g=y;for(;--g>=0&&a[g]==="\\";)d=!d;return d?"|":" |"}),v=c.split(/ \|/);let C=0;if(v[0].trim()||v.shift(),v.length>0&&!v[v.length-1].trim()&&v.pop(),s)if(v.length>s)v.splice(s);else for(;v.length<s;)v.push("");for(;C<v.length;C++)v[C]=v[C].trim().replace(/\\\|/g,"|");return v}function cm(r,s,c){const v=r.length;if(v===0)return"";let C=0;for(;C<v&&r.charAt(v-C-1)===s;)C++;return r.slice(0,v-C)}function fO(r,s){if(r.indexOf(s[1])===-1)return-1;let c=0;for(let v=0;v<r.length;v++)if(r[v]==="\\")v++;else if(r[v]===s[0])c++;else if(r[v]===s[1]&&(c--,c<0))return v;return-1}function c1(r,s,c,v){const C=s.href,R=s.title?Or(s.title):null,y=r[1].replace(/\\([\[\]])/g,"$1");if(r[0].charAt(0)!=="!"){v.state.inLink=!0;const a={type:"link",raw:c,href:C,title:R,text:y,tokens:v.inlineTokens(y)};return v.state.inLink=!1,a}return{type:"image",raw:c,href:C,title:R,text:Or(y)}}function pO(r,s){const c=r.match(/^(\s+)(?:```)/);if(c===null)return s;const v=c[1];return s.split(`
|
|
283
|
+
`).map(C=>{const R=C.match(/^\s+/);if(R===null)return C;const[y]=R;return y.length>=v.length?C.slice(v.length):C}).join(`
|
|
284
|
+
`)}class jm{constructor(s){Kn(this,"options");Kn(this,"rules");Kn(this,"lexer");this.options=s||Oo}space(s){const c=this.rules.block.newline.exec(s);if(c&&c[0].length>0)return{type:"space",raw:c[0]}}code(s){const c=this.rules.block.code.exec(s);if(c){const v=c[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:c[0],codeBlockStyle:"indented",text:this.options.pedantic?v:cm(v,`
|
|
285
|
+
`)}}}fences(s){const c=this.rules.block.fences.exec(s);if(c){const v=c[0],C=pO(v,c[3]||"");return{type:"code",raw:v,lang:c[2]?c[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):c[2],text:C}}}heading(s){const c=this.rules.block.heading.exec(s);if(c){let v=c[2].trim();if(/#$/.test(v)){const C=cm(v,"#");(this.options.pedantic||!C||/ $/.test(C))&&(v=C.trim())}return{type:"heading",raw:c[0],depth:c[1].length,text:v,tokens:this.lexer.inline(v)}}}hr(s){const c=this.rules.block.hr.exec(s);if(c)return{type:"hr",raw:c[0]}}blockquote(s){const c=this.rules.block.blockquote.exec(s);if(c){let v=c[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
|
286
|
+
$1`);v=cm(v.replace(/^ *>[ \t]?/gm,""),`
|
|
287
|
+
`);const C=this.lexer.state.top;this.lexer.state.top=!0;const R=this.lexer.blockTokens(v);return this.lexer.state.top=C,{type:"blockquote",raw:c[0],tokens:R,text:v}}}list(s){let c=this.rules.block.list.exec(s);if(c){let v=c[1].trim();const C=v.length>1,R={type:"list",raw:"",ordered:C,start:C?+v.slice(0,-1):"",loose:!1,items:[]};v=C?`\\d{1,9}\\${v.slice(-1)}`:`\\${v}`,this.options.pedantic&&(v=C?v:"[*+-]");const y=new RegExp(`^( {0,3}${v})((?:[ ][^\\n]*)?(?:\\n|$))`);let a="",d="",g=!1;for(;s;){let x=!1;if(!(c=y.exec(s))||this.rules.block.hr.test(s))break;a=c[0],s=s.substring(a.length);let h=c[2].split(`
|
|
288
|
+
`,1)[0].replace(/^\t+/,m=>" ".repeat(3*m.length)),_=s.split(`
|
|
289
|
+
`,1)[0],N=0;this.options.pedantic?(N=2,d=h.trimStart()):(N=c[2].search(/[^ ]/),N=N>4?1:N,d=h.slice(N),N+=c[1].length);let E=!1;if(!h&&/^ *$/.test(_)&&(a+=_+`
|
|
290
|
+
`,s=s.substring(_.length+1),x=!0),!x){const m=new RegExp(`^ {0,${Math.min(3,N-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),f=new RegExp(`^ {0,${Math.min(3,N-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),p=new RegExp(`^ {0,${Math.min(3,N-1)}}(?:\`\`\`|~~~)`),S=new RegExp(`^ {0,${Math.min(3,N-1)}}#`);for(;s;){const k=s.split(`
|
|
291
|
+
`,1)[0];if(_=k,this.options.pedantic&&(_=_.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),p.test(_)||S.test(_)||m.test(_)||f.test(s))break;if(_.search(/[^ ]/)>=N||!_.trim())d+=`
|
|
292
|
+
`+_.slice(N);else{if(E||h.search(/[^ ]/)>=4||p.test(h)||S.test(h)||f.test(h))break;d+=`
|
|
293
|
+
`+_}!E&&!_.trim()&&(E=!0),a+=k+`
|
|
294
|
+
`,s=s.substring(k.length+1),h=_.slice(N)}}R.loose||(g?R.loose=!0:/\n *\n *$/.test(a)&&(g=!0));let b=null,l;this.options.gfm&&(b=/^\[[ xX]\] /.exec(d),b&&(l=b[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),R.items.push({type:"list_item",raw:a,task:!!b,checked:l,loose:!1,text:d,tokens:[]}),R.raw+=a}R.items[R.items.length-1].raw=a.trimEnd(),R.items[R.items.length-1].text=d.trimEnd(),R.raw=R.raw.trimEnd();for(let x=0;x<R.items.length;x++)if(this.lexer.state.top=!1,R.items[x].tokens=this.lexer.blockTokens(R.items[x].text,[]),!R.loose){const h=R.items[x].tokens.filter(N=>N.type==="space"),_=h.length>0&&h.some(N=>/\n.*\n/.test(N.raw));R.loose=_}if(R.loose)for(let x=0;x<R.items.length;x++)R.items[x].loose=!0;return R}}html(s){const c=this.rules.block.html.exec(s);if(c)return{type:"html",block:!0,raw:c[0],pre:c[1]==="pre"||c[1]==="script"||c[1]==="style",text:c[0]}}def(s){const c=this.rules.block.def.exec(s);if(c){const v=c[1].toLowerCase().replace(/\s+/g," "),C=c[2]?c[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",R=c[3]?c[3].substring(1,c[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):c[3];return{type:"def",tag:v,raw:c[0],href:C,title:R}}}table(s){const c=this.rules.block.table.exec(s);if(!c||!/[:|]/.test(c[2]))return;const v=l1(c[1]),C=c[2].replace(/^\||\| *$/g,"").split("|"),R=c[3]&&c[3].trim()?c[3].replace(/\n[ \t]*$/,"").split(`
|
|
295
|
+
`):[],y={type:"table",raw:c[0],header:[],align:[],rows:[]};if(v.length===C.length){for(const a of C)/^ *-+: *$/.test(a)?y.align.push("right"):/^ *:-+: *$/.test(a)?y.align.push("center"):/^ *:-+ *$/.test(a)?y.align.push("left"):y.align.push(null);for(const a of v)y.header.push({text:a,tokens:this.lexer.inline(a)});for(const a of R)y.rows.push(l1(a,y.header.length).map(d=>({text:d,tokens:this.lexer.inline(d)})));return y}}lheading(s){const c=this.rules.block.lheading.exec(s);if(c)return{type:"heading",raw:c[0],depth:c[2].charAt(0)==="="?1:2,text:c[1],tokens:this.lexer.inline(c[1])}}paragraph(s){const c=this.rules.block.paragraph.exec(s);if(c){const v=c[1].charAt(c[1].length-1)===`
|
|
296
|
+
`?c[1].slice(0,-1):c[1];return{type:"paragraph",raw:c[0],text:v,tokens:this.lexer.inline(v)}}}text(s){const c=this.rules.block.text.exec(s);if(c)return{type:"text",raw:c[0],text:c[0],tokens:this.lexer.inline(c[0])}}escape(s){const c=this.rules.inline.escape.exec(s);if(c)return{type:"escape",raw:c[0],text:Or(c[1])}}tag(s){const c=this.rules.inline.tag.exec(s);if(c)return!this.lexer.state.inLink&&/^<a /i.test(c[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(c[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(c[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(c[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:c[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:c[0]}}link(s){const c=this.rules.inline.link.exec(s);if(c){const v=c[2].trim();if(!this.options.pedantic&&/^</.test(v)){if(!/>$/.test(v))return;const y=cm(v.slice(0,-1),"\\");if((v.length-y.length)%2===0)return}else{const y=fO(c[2],"()");if(y>-1){const d=(c[0].indexOf("!")===0?5:4)+c[1].length+y;c[2]=c[2].substring(0,y),c[0]=c[0].substring(0,d).trim(),c[3]=""}}let C=c[2],R="";if(this.options.pedantic){const y=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(C);y&&(C=y[1],R=y[3])}else R=c[3]?c[3].slice(1,-1):"";return C=C.trim(),/^</.test(C)&&(this.options.pedantic&&!/>$/.test(v)?C=C.slice(1):C=C.slice(1,-1)),c1(c,{href:C&&C.replace(this.rules.inline.anyPunctuation,"$1"),title:R&&R.replace(this.rules.inline.anyPunctuation,"$1")},c[0],this.lexer)}}reflink(s,c){let v;if((v=this.rules.inline.reflink.exec(s))||(v=this.rules.inline.nolink.exec(s))){const C=(v[2]||v[1]).replace(/\s+/g," "),R=c[C.toLowerCase()];if(!R){const y=v[0].charAt(0);return{type:"text",raw:y,text:y}}return c1(v,R,v[0],this.lexer)}}emStrong(s,c,v=""){let C=this.rules.inline.emStrongLDelim.exec(s);if(!C||C[3]&&v.match(/[\p{L}\p{N}]/u))return;if(!(C[1]||C[2]||"")||!v||this.rules.inline.punctuation.exec(v)){const y=[...C[0]].length-1;let a,d,g=y,x=0;const h=C[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,c=c.slice(-1*s.length+y);(C=h.exec(c))!=null;){if(a=C[1]||C[2]||C[3]||C[4]||C[5]||C[6],!a)continue;if(d=[...a].length,C[3]||C[4]){g+=d;continue}else if((C[5]||C[6])&&y%3&&!((y+d)%3)){x+=d;continue}if(g-=d,g>0)continue;d=Math.min(d,d+g+x);const _=[...C[0]][0].length,N=s.slice(0,y+C.index+_+d);if(Math.min(y,d)%2){const b=N.slice(1,-1);return{type:"em",raw:N,text:b,tokens:this.lexer.inlineTokens(b)}}const E=N.slice(2,-2);return{type:"strong",raw:N,text:E,tokens:this.lexer.inlineTokens(E)}}}}codespan(s){const c=this.rules.inline.code.exec(s);if(c){let v=c[2].replace(/\n/g," ");const C=/[^ ]/.test(v),R=/^ /.test(v)&&/ $/.test(v);return C&&R&&(v=v.substring(1,v.length-1)),v=Or(v,!0),{type:"codespan",raw:c[0],text:v}}}br(s){const c=this.rules.inline.br.exec(s);if(c)return{type:"br",raw:c[0]}}del(s){const c=this.rules.inline.del.exec(s);if(c)return{type:"del",raw:c[0],text:c[2],tokens:this.lexer.inlineTokens(c[2])}}autolink(s){const c=this.rules.inline.autolink.exec(s);if(c){let v,C;return c[2]==="@"?(v=Or(c[1]),C="mailto:"+v):(v=Or(c[1]),C=v),{type:"link",raw:c[0],text:v,href:C,tokens:[{type:"text",raw:v,text:v}]}}}url(s){var v;let c;if(c=this.rules.inline.url.exec(s)){let C,R;if(c[2]==="@")C=Or(c[0]),R="mailto:"+C;else{let y;do y=c[0],c[0]=((v=this.rules.inline._backpedal.exec(c[0]))==null?void 0:v[0])??"";while(y!==c[0]);C=Or(c[0]),c[1]==="www."?R="http://"+c[0]:R=c[0]}return{type:"link",raw:c[0],text:C,href:R,tokens:[{type:"text",raw:C,text:C}]}}}inlineText(s){const c=this.rules.inline.text.exec(s);if(c){let v;return this.lexer.state.inRawBlock?v=c[0]:v=Or(c[0]),{type:"text",raw:c[0],text:v}}}}const vO=/^(?: *(?:\n|$))+/,gO=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,_O=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ku=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,bO=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,aC=/(?:[*+-]|\d{1,9}[.)])/,oC=In(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,aC).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(),tb=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,yO=/^[^\n]+/,nb=/(?!\s*\])(?:\\.|[^\[\]\\])+/,xO=In(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",nb).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),wO=In(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,aC).getRegex(),Bm="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",ib=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,NO=In("^ {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",ib).replace("tag",Bm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lC=In(tb).replace("hr",Ku).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",Bm).getRegex(),SO=In(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",lC).getRegex(),rb={blockquote:SO,code:gO,def:xO,fences:_O,heading:bO,hr:Ku,html:NO,lheading:oC,list:wO,newline:vO,paragraph:lC,table:Bu,text:yO},u1=In("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ku).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",Bm).getRegex(),CO={...rb,table:u1,paragraph:In(tb).replace("hr",Ku).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",u1).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",Bm).getRegex()},EO={...rb,html:In(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ib).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:Bu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:In(tb).replace("hr",Ku).replace("heading",` *#{1,6} *[^
|
|
297
|
+
]`).replace("lheading",oC).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},cC=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jO=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,uC=/^( {2,}|\\)\n(?!\s*$)/,DO=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Xu="\\p{P}\\p{S}",kO=In(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Xu).getRegex(),RO=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,TO=In(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Xu).getRegex(),LO=In("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Xu).getRegex(),AO=In("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Xu).getRegex(),MO=In(/\\([punct])/,"gu").replace(/punct/g,Xu).getRegex(),UO=In(/^<(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(),OO=In(ib).replace("(?:-->|$)","-->").getRegex(),PO=In("^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",OO).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Dm=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,VO=In(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Dm).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),dC=In(/^!?\[(label)\]\[(ref)\]/).replace("label",Dm).replace("ref",nb).getRegex(),hC=In(/^!?\[(ref)\](?:\[\])?/).replace("ref",nb).getRegex(),IO=In("reflink|nolink(?!\\()","g").replace("reflink",dC).replace("nolink",hC).getRegex(),sb={_backpedal:Bu,anyPunctuation:MO,autolink:UO,blockSkip:RO,br:uC,code:jO,del:Bu,emStrongLDelim:TO,emStrongRDelimAst:LO,emStrongRDelimUnd:AO,escape:cC,link:VO,nolink:hC,punctuation:kO,reflink:dC,reflinkSearch:IO,tag:PO,text:DO,url:Bu},BO={...sb,link:In(/^!?\[(label)\]\((.*?)\)/).replace("label",Dm).getRegex(),reflink:In(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Dm).getRegex()},j_={...sb,escape:In(cC).replace("])","~|])").getRegex(),url:In(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},FO={...j_,br:In(uC).replace("{2,}","*").getRegex(),text:In(j_.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},um={normal:rb,gfm:CO,pedantic:EO},Lu={normal:sb,gfm:j_,breaks:FO,pedantic:BO};class Bs{constructor(s){Kn(this,"tokens");Kn(this,"options");Kn(this,"state");Kn(this,"tokenizer");Kn(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=s||Oo,this.options.tokenizer=this.options.tokenizer||new jm,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 c={block:um.normal,inline:Lu.normal};this.options.pedantic?(c.block=um.pedantic,c.inline=Lu.pedantic):this.options.gfm&&(c.block=um.gfm,this.options.breaks?c.inline=Lu.breaks:c.inline=Lu.gfm),this.tokenizer.rules=c}static get rules(){return{block:um,inline:Lu}}static lex(s,c){return new Bs(c).lex(s)}static lexInline(s,c){return new Bs(c).inlineTokens(s)}lex(s){s=s.replace(/\r\n|\r/g,`
|
|
298
|
+
`),this.blockTokens(s,this.tokens);for(let c=0;c<this.inlineQueue.length;c++){const v=this.inlineQueue[c];this.inlineTokens(v.src,v.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(s,c=[]){this.options.pedantic?s=s.replace(/\t/g," ").replace(/^ +$/gm,""):s=s.replace(/^( *)(\t+)/gm,(a,d,g)=>d+" ".repeat(g.length));let v,C,R,y;for(;s;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(v=a.call({lexer:this},s,c))?(s=s.substring(v.raw.length),c.push(v),!0):!1))){if(v=this.tokenizer.space(s)){s=s.substring(v.raw.length),v.raw.length===1&&c.length>0?c[c.length-1].raw+=`
|
|
299
|
+
`:c.push(v);continue}if(v=this.tokenizer.code(s)){s=s.substring(v.raw.length),C=c[c.length-1],C&&(C.type==="paragraph"||C.type==="text")?(C.raw+=`
|
|
300
|
+
`+v.raw,C.text+=`
|
|
301
|
+
`+v.text,this.inlineQueue[this.inlineQueue.length-1].src=C.text):c.push(v);continue}if(v=this.tokenizer.fences(s)){s=s.substring(v.raw.length),c.push(v);continue}if(v=this.tokenizer.heading(s)){s=s.substring(v.raw.length),c.push(v);continue}if(v=this.tokenizer.hr(s)){s=s.substring(v.raw.length),c.push(v);continue}if(v=this.tokenizer.blockquote(s)){s=s.substring(v.raw.length),c.push(v);continue}if(v=this.tokenizer.list(s)){s=s.substring(v.raw.length),c.push(v);continue}if(v=this.tokenizer.html(s)){s=s.substring(v.raw.length),c.push(v);continue}if(v=this.tokenizer.def(s)){s=s.substring(v.raw.length),C=c[c.length-1],C&&(C.type==="paragraph"||C.type==="text")?(C.raw+=`
|
|
302
|
+
`+v.raw,C.text+=`
|
|
303
|
+
`+v.raw,this.inlineQueue[this.inlineQueue.length-1].src=C.text):this.tokens.links[v.tag]||(this.tokens.links[v.tag]={href:v.href,title:v.title});continue}if(v=this.tokenizer.table(s)){s=s.substring(v.raw.length),c.push(v);continue}if(v=this.tokenizer.lheading(s)){s=s.substring(v.raw.length),c.push(v);continue}if(R=s,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const d=s.slice(1);let g;this.options.extensions.startBlock.forEach(x=>{g=x.call({lexer:this},d),typeof g=="number"&&g>=0&&(a=Math.min(a,g))}),a<1/0&&a>=0&&(R=s.substring(0,a+1))}if(this.state.top&&(v=this.tokenizer.paragraph(R))){C=c[c.length-1],y&&C.type==="paragraph"?(C.raw+=`
|
|
304
|
+
`+v.raw,C.text+=`
|
|
305
|
+
`+v.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=C.text):c.push(v),y=R.length!==s.length,s=s.substring(v.raw.length);continue}if(v=this.tokenizer.text(s)){s=s.substring(v.raw.length),C=c[c.length-1],C&&C.type==="text"?(C.raw+=`
|
|
306
|
+
`+v.raw,C.text+=`
|
|
307
|
+
`+v.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=C.text):c.push(v);continue}if(s){const a="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,c}inline(s,c=[]){return this.inlineQueue.push({src:s,tokens:c}),c}inlineTokens(s,c=[]){let v,C,R,y=s,a,d,g;if(this.tokens.links){const x=Object.keys(this.tokens.links);if(x.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(y))!=null;)x.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(y=y.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+y.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(y))!=null;)y=y.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+y.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(y))!=null;)y=y.slice(0,a.index)+"++"+y.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;s;)if(d||(g=""),d=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(x=>(v=x.call({lexer:this},s,c))?(s=s.substring(v.raw.length),c.push(v),!0):!1))){if(v=this.tokenizer.escape(s)){s=s.substring(v.raw.length),c.push(v);continue}if(v=this.tokenizer.tag(s)){s=s.substring(v.raw.length),C=c[c.length-1],C&&v.type==="text"&&C.type==="text"?(C.raw+=v.raw,C.text+=v.text):c.push(v);continue}if(v=this.tokenizer.link(s)){s=s.substring(v.raw.length),c.push(v);continue}if(v=this.tokenizer.reflink(s,this.tokens.links)){s=s.substring(v.raw.length),C=c[c.length-1],C&&v.type==="text"&&C.type==="text"?(C.raw+=v.raw,C.text+=v.text):c.push(v);continue}if(v=this.tokenizer.emStrong(s,y,g)){s=s.substring(v.raw.length),c.push(v);continue}if(v=this.tokenizer.codespan(s)){s=s.substring(v.raw.length),c.push(v);continue}if(v=this.tokenizer.br(s)){s=s.substring(v.raw.length),c.push(v);continue}if(v=this.tokenizer.del(s)){s=s.substring(v.raw.length),c.push(v);continue}if(v=this.tokenizer.autolink(s)){s=s.substring(v.raw.length),c.push(v);continue}if(!this.state.inLink&&(v=this.tokenizer.url(s))){s=s.substring(v.raw.length),c.push(v);continue}if(R=s,this.options.extensions&&this.options.extensions.startInline){let x=1/0;const h=s.slice(1);let _;this.options.extensions.startInline.forEach(N=>{_=N.call({lexer:this},h),typeof _=="number"&&_>=0&&(x=Math.min(x,_))}),x<1/0&&x>=0&&(R=s.substring(0,x+1))}if(v=this.tokenizer.inlineText(R)){s=s.substring(v.raw.length),v.raw.slice(-1)!=="_"&&(g=v.raw.slice(-1)),d=!0,C=c[c.length-1],C&&C.type==="text"?(C.raw+=v.raw,C.text+=v.text):c.push(v);continue}if(s){const x="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return c}}class km{constructor(s){Kn(this,"options");this.options=s||Oo}code(s,c,v){var R;const C=(R=(c||"").match(/^\S*/))==null?void 0:R[0];return s=s.replace(/\n$/,"")+`
|
|
308
|
+
`,C?'<pre><code class="language-'+Or(C)+'">'+(v?s:Or(s,!0))+`</code></pre>
|
|
309
|
+
`:"<pre><code>"+(v?s:Or(s,!0))+`</code></pre>
|
|
310
|
+
`}blockquote(s){return`<blockquote>
|
|
311
|
+
${s}</blockquote>
|
|
312
|
+
`}html(s,c){return s}heading(s,c,v){return`<h${c}>${s}</h${c}>
|
|
313
|
+
`}hr(){return`<hr>
|
|
314
|
+
`}list(s,c,v){const C=c?"ol":"ul",R=c&&v!==1?' start="'+v+'"':"";return"<"+C+R+`>
|
|
315
|
+
`+s+"</"+C+`>
|
|
316
|
+
`}listitem(s,c,v){return`<li>${s}</li>
|
|
317
|
+
`}checkbox(s){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(s){return`<p>${s}</p>
|
|
318
|
+
`}table(s,c){return c&&(c=`<tbody>${c}</tbody>`),`<table>
|
|
319
|
+
<thead>
|
|
320
|
+
`+s+`</thead>
|
|
321
|
+
`+c+`</table>
|
|
322
|
+
`}tablerow(s){return`<tr>
|
|
323
|
+
${s}</tr>
|
|
324
|
+
`}tablecell(s,c){const v=c.header?"th":"td";return(c.align?`<${v} align="${c.align}">`:`<${v}>`)+s+`</${v}>
|
|
325
|
+
`}strong(s){return`<strong>${s}</strong>`}em(s){return`<em>${s}</em>`}codespan(s){return`<code>${s}</code>`}br(){return"<br>"}del(s){return`<del>${s}</del>`}link(s,c,v){const C=o1(s);if(C===null)return v;s=C;let R='<a href="'+s+'"';return c&&(R+=' title="'+c+'"'),R+=">"+v+"</a>",R}image(s,c,v){const C=o1(s);if(C===null)return v;s=C;let R=`<img src="${s}" alt="${v}"`;return c&&(R+=` title="${c}"`),R+=">",R}text(s){return s}}class ab{strong(s){return s}em(s){return s}codespan(s){return s}del(s){return s}html(s){return s}text(s){return s}link(s,c,v){return""+v}image(s,c,v){return""+v}br(){return""}}class Fs{constructor(s){Kn(this,"options");Kn(this,"renderer");Kn(this,"textRenderer");this.options=s||Oo,this.options.renderer=this.options.renderer||new km,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ab}static parse(s,c){return new Fs(c).parse(s)}static parseInline(s,c){return new Fs(c).parseInline(s)}parse(s,c=!0){let v="";for(let C=0;C<s.length;C++){const R=s[C];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[R.type]){const y=R,a=this.options.extensions.renderers[y.type].call({parser:this},y);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(y.type)){v+=a||"";continue}}switch(R.type){case"space":continue;case"hr":{v+=this.renderer.hr();continue}case"heading":{const y=R;v+=this.renderer.heading(this.parseInline(y.tokens),y.depth,hO(this.parseInline(y.tokens,this.textRenderer)));continue}case"code":{const y=R;v+=this.renderer.code(y.text,y.lang,!!y.escaped);continue}case"table":{const y=R;let a="",d="";for(let x=0;x<y.header.length;x++)d+=this.renderer.tablecell(this.parseInline(y.header[x].tokens),{header:!0,align:y.align[x]});a+=this.renderer.tablerow(d);let g="";for(let x=0;x<y.rows.length;x++){const h=y.rows[x];d="";for(let _=0;_<h.length;_++)d+=this.renderer.tablecell(this.parseInline(h[_].tokens),{header:!1,align:y.align[_]});g+=this.renderer.tablerow(d)}v+=this.renderer.table(a,g);continue}case"blockquote":{const y=R,a=this.parse(y.tokens);v+=this.renderer.blockquote(a);continue}case"list":{const y=R,a=y.ordered,d=y.start,g=y.loose;let x="";for(let h=0;h<y.items.length;h++){const _=y.items[h],N=_.checked,E=_.task;let b="";if(_.task){const l=this.renderer.checkbox(!!N);g?_.tokens.length>0&&_.tokens[0].type==="paragraph"?(_.tokens[0].text=l+" "+_.tokens[0].text,_.tokens[0].tokens&&_.tokens[0].tokens.length>0&&_.tokens[0].tokens[0].type==="text"&&(_.tokens[0].tokens[0].text=l+" "+_.tokens[0].tokens[0].text)):_.tokens.unshift({type:"text",text:l+" "}):b+=l+" "}b+=this.parse(_.tokens,g),x+=this.renderer.listitem(b,E,!!N)}v+=this.renderer.list(x,a,d);continue}case"html":{const y=R;v+=this.renderer.html(y.text,y.block);continue}case"paragraph":{const y=R;v+=this.renderer.paragraph(this.parseInline(y.tokens));continue}case"text":{let y=R,a=y.tokens?this.parseInline(y.tokens):y.text;for(;C+1<s.length&&s[C+1].type==="text";)y=s[++C],a+=`
|
|
326
|
+
`+(y.tokens?this.parseInline(y.tokens):y.text);v+=c?this.renderer.paragraph(a):a;continue}default:{const y='Token with "'+R.type+'" type was not found.';if(this.options.silent)return console.error(y),"";throw new Error(y)}}}return v}parseInline(s,c){c=c||this.renderer;let v="";for(let C=0;C<s.length;C++){const R=s[C];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[R.type]){const y=this.options.extensions.renderers[R.type].call({parser:this},R);if(y!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(R.type)){v+=y||"";continue}}switch(R.type){case"escape":{const y=R;v+=c.text(y.text);break}case"html":{const y=R;v+=c.html(y.text);break}case"link":{const y=R;v+=c.link(y.href,y.title,this.parseInline(y.tokens,c));break}case"image":{const y=R;v+=c.image(y.href,y.title,y.text);break}case"strong":{const y=R;v+=c.strong(this.parseInline(y.tokens,c));break}case"em":{const y=R;v+=c.em(this.parseInline(y.tokens,c));break}case"codespan":{const y=R;v+=c.codespan(y.text);break}case"br":{v+=c.br();break}case"del":{const y=R;v+=c.del(this.parseInline(y.tokens,c));break}case"text":{const y=R;v+=c.text(y.text);break}default:{const y='Token with "'+R.type+'" type was not found.';if(this.options.silent)return console.error(y),"";throw new Error(y)}}}return v}}class Fu{constructor(s){Kn(this,"options");this.options=s||Oo}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}}Kn(Fu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var Uo,D_,mC;class HO{constructor(...s){oN(this,Uo);Kn(this,"defaults",eb());Kn(this,"options",this.setOptions);Kn(this,"parse",rm(this,Uo,D_).call(this,Bs.lex,Fs.parse));Kn(this,"parseInline",rm(this,Uo,D_).call(this,Bs.lexInline,Fs.parseInline));Kn(this,"Parser",Fs);Kn(this,"Renderer",km);Kn(this,"TextRenderer",ab);Kn(this,"Lexer",Bs);Kn(this,"Tokenizer",jm);Kn(this,"Hooks",Fu);this.use(...s)}walkTokens(s,c){var C,R;let v=[];for(const y of s)switch(v=v.concat(c.call(this,y)),y.type){case"table":{const a=y;for(const d of a.header)v=v.concat(this.walkTokens(d.tokens,c));for(const d of a.rows)for(const g of d)v=v.concat(this.walkTokens(g.tokens,c));break}case"list":{const a=y;v=v.concat(this.walkTokens(a.items,c));break}default:{const a=y;(R=(C=this.defaults.extensions)==null?void 0:C.childTokens)!=null&&R[a.type]?this.defaults.extensions.childTokens[a.type].forEach(d=>{const g=a[d].flat(1/0);v=v.concat(this.walkTokens(g,c))}):a.tokens&&(v=v.concat(this.walkTokens(a.tokens,c)))}}return v}use(...s){const c=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(v=>{const C={...v};if(C.async=this.defaults.async||C.async||!1,v.extensions&&(v.extensions.forEach(R=>{if(!R.name)throw new Error("extension name required");if("renderer"in R){const y=c.renderers[R.name];y?c.renderers[R.name]=function(...a){let d=R.renderer.apply(this,a);return d===!1&&(d=y.apply(this,a)),d}:c.renderers[R.name]=R.renderer}if("tokenizer"in R){if(!R.level||R.level!=="block"&&R.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const y=c[R.level];y?y.unshift(R.tokenizer):c[R.level]=[R.tokenizer],R.start&&(R.level==="block"?c.startBlock?c.startBlock.push(R.start):c.startBlock=[R.start]:R.level==="inline"&&(c.startInline?c.startInline.push(R.start):c.startInline=[R.start]))}"childTokens"in R&&R.childTokens&&(c.childTokens[R.name]=R.childTokens)}),C.extensions=c),v.renderer){const R=this.defaults.renderer||new km(this.defaults);for(const y in v.renderer){if(!(y in R))throw new Error(`renderer '${y}' does not exist`);if(y==="options")continue;const a=y,d=v.renderer[a],g=R[a];R[a]=(...x)=>{let h=d.apply(R,x);return h===!1&&(h=g.apply(R,x)),h||""}}C.renderer=R}if(v.tokenizer){const R=this.defaults.tokenizer||new jm(this.defaults);for(const y in v.tokenizer){if(!(y in R))throw new Error(`tokenizer '${y}' does not exist`);if(["options","rules","lexer"].includes(y))continue;const a=y,d=v.tokenizer[a],g=R[a];R[a]=(...x)=>{let h=d.apply(R,x);return h===!1&&(h=g.apply(R,x)),h}}C.tokenizer=R}if(v.hooks){const R=this.defaults.hooks||new Fu;for(const y in v.hooks){if(!(y in R))throw new Error(`hook '${y}' does not exist`);if(y==="options")continue;const a=y,d=v.hooks[a],g=R[a];Fu.passThroughHooks.has(y)?R[a]=x=>{if(this.defaults.async)return Promise.resolve(d.call(R,x)).then(_=>g.call(R,_));const h=d.call(R,x);return g.call(R,h)}:R[a]=(...x)=>{let h=d.apply(R,x);return h===!1&&(h=g.apply(R,x)),h}}C.hooks=R}if(v.walkTokens){const R=this.defaults.walkTokens,y=v.walkTokens;C.walkTokens=function(a){let d=[];return d.push(y.call(this,a)),R&&(d=d.concat(R.call(this,a))),d}}this.defaults={...this.defaults,...C}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,c){return Bs.lex(s,c??this.defaults)}parser(s,c){return Fs.parse(s,c??this.defaults)}}Uo=new WeakSet,D_=function(s,c){return(v,C)=>{const R={...C},y={...this.defaults,...R};this.defaults.async===!0&&R.async===!1&&(y.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),y.async=!0);const a=rm(this,Uo,mC).call(this,!!y.silent,!!y.async);if(typeof v>"u"||v===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof v!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(v)+", string expected"));if(y.hooks&&(y.hooks.options=y),y.async)return Promise.resolve(y.hooks?y.hooks.preprocess(v):v).then(d=>s(d,y)).then(d=>y.hooks?y.hooks.processAllTokens(d):d).then(d=>y.walkTokens?Promise.all(this.walkTokens(d,y.walkTokens)).then(()=>d):d).then(d=>c(d,y)).then(d=>y.hooks?y.hooks.postprocess(d):d).catch(a);try{y.hooks&&(v=y.hooks.preprocess(v));let d=s(v,y);y.hooks&&(d=y.hooks.processAllTokens(d)),y.walkTokens&&this.walkTokens(d,y.walkTokens);let g=c(d,y);return y.hooks&&(g=y.hooks.postprocess(g)),g}catch(d){return a(d)}}},mC=function(s,c){return v=>{if(v.message+=`
|
|
327
|
+
Please report this to https://github.com/markedjs/marked.`,s){const C="<p>An error occurred:</p><pre>"+Or(v.message+"",!0)+"</pre>";return c?Promise.resolve(C):C}if(c)return Promise.reject(v);throw v}};const Mo=new HO;function An(r,s){return Mo.parse(r,s)}An.options=An.setOptions=function(r){return Mo.setOptions(r),An.defaults=Mo.defaults,iC(An.defaults),An};An.getDefaults=eb;An.defaults=Oo;An.use=function(...r){return Mo.use(...r),An.defaults=Mo.defaults,iC(An.defaults),An};An.walkTokens=function(r,s){return Mo.walkTokens(r,s)};An.parseInline=Mo.parseInline;An.Parser=Fs;An.parser=Fs.parse;An.Renderer=km;An.TextRenderer=ab;An.Lexer=Bs;An.lexer=Bs.lex;An.Tokenizer=jm;An.Hooks=Fu;An.parse=An;An.options;An.setOptions;An.use;An.walkTokens;An.parseInline;Fs.parse;Bs.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 d1(r,s){(s==null||s>r.length)&&(s=r.length);for(var c=0,v=Array(s);c<s;c++)v[c]=r[c];return v}function zO(r){if(Array.isArray(r))return r}function $O(r,s){var c=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(c!=null){var v,C,R,y,a=[],d=!0,g=!1;try{if(R=(c=c.call(r)).next,s!==0)for(;!(d=(v=R.call(c)).done)&&(a.push(v.value),a.length!==s);d=!0);}catch(x){g=!0,C=x}finally{try{if(!d&&c.return!=null&&(y=c.return(),Object(y)!==y))return}finally{if(g)throw C}}return a}}function WO(){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 GO(r,s){return zO(r)||$O(r,s)||qO(r,s)||WO()}function qO(r,s){if(r){if(typeof r=="string")return d1(r,s);var c={}.toString.call(r).slice(8,-1);return c==="Object"&&r.constructor&&(c=r.constructor.name),c==="Map"||c==="Set"?Array.from(r):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?d1(r,s):void 0}}const fC=Object.entries,h1=Object.setPrototypeOf,YO=Object.isFrozen,KO=Object.getPrototypeOf,XO=Object.getOwnPropertyDescriptor;let mr=Object.freeze,Zr=Object.seal,zl=Object.create,pC=typeof Reflect<"u"&&Reflect,k_=pC.apply,R_=pC.construct;mr||(mr=function(s){return s});Zr||(Zr=function(s){return s});k_||(k_=function(s,c){for(var v=arguments.length,C=new Array(v>2?v-2:0),R=2;R<v;R++)C[R-2]=arguments[R];return s.apply(c,C)});R_||(R_=function(s){for(var c=arguments.length,v=new Array(c>1?c-1:0),C=1;C<c;C++)v[C-1]=arguments[C];return new s(...v)});const No=hi(Array.prototype.forEach),JO=hi(Array.prototype.lastIndexOf),m1=hi(Array.prototype.pop),Vl=hi(Array.prototype.push),ZO=hi(Array.prototype.splice),hr=Array.isArray,Uu=hi(String.prototype.toLowerCase),qg=hi(String.prototype.toString),f1=hi(String.prototype.match),Il=hi(String.prototype.replace),p1=hi(String.prototype.indexOf),QO=hi(String.prototype.trim),e4=hi(Number.prototype.toString),t4=hi(Boolean.prototype.toString),v1=typeof BigInt>"u"?null:hi(BigInt.prototype.toString),g1=typeof Symbol>"u"?null:hi(Symbol.prototype.toString),ii=hi(Object.prototype.hasOwnProperty),Au=hi(Object.prototype.toString),zi=hi(RegExp.prototype.test),Bl=n4(TypeError);function hi(r){return function(s){s instanceof RegExp&&(s.lastIndex=0);for(var c=arguments.length,v=new Array(c>1?c-1:0),C=1;C<c;C++)v[C-1]=arguments[C];return k_(r,s,v)}}function n4(r){return function(){for(var s=arguments.length,c=new Array(s),v=0;v<s;v++)c[v]=arguments[v];return R_(r,c)}}function sn(r,s){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Uu;if(h1&&h1(r,null),!hr(s))return r;let v=s.length;for(;v--;){let C=s[v];if(typeof C=="string"){const R=c(C);R!==C&&(YO(s)||(s[v]=R),C=R)}r[C]=!0}return r}function i4(r){for(let s=0;s<r.length;s++)ii(r,s)||(r[s]=null);return r}function Qi(r){const s=zl(null);for(const v of fC(r)){var c=GO(v,2);const C=c[0],R=c[1];ii(r,C)&&(hr(R)?s[C]=i4(R):R&&typeof R=="object"&&R.constructor===Object?s[C]=Qi(R):s[C]=R)}return s}function r4(r){switch(typeof r){case"string":return r;case"number":return e4(r);case"boolean":return t4(r);case"bigint":return v1?v1(r):"0";case"symbol":return g1?g1(r):"Symbol()";case"undefined":return Au(r);case"function":case"object":{if(r===null)return Au(r);const s=r,c=Is(s,"toString");if(typeof c=="function"){const v=c(s);return typeof v=="string"?v:Au(v)}return Au(r)}default:return Au(r)}}function Is(r,s){for(;r!==null;){const v=XO(r,s);if(v){if(v.get)return hi(v.get);if(typeof v.value=="function")return hi(v.value)}r=KO(r)}function c(){return null}return c}function s4(r){try{return zi(r,""),!0}catch{return!1}}const _1=mr(["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"]),Yg=mr(["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"]),Kg=mr(["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"]),a4=mr(["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"]),Xg=mr(["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"]),o4=mr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),b1=mr(["#text"]),y1=mr(["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"]),Jg=mr(["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"]),x1=mr(["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"]),dm=mr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),l4=Zr(/{{[\w\W]*|^[\w\W]*}}/g),c4=Zr(/<%[\w\W]*|^[\w\W]*%>/g),u4=Zr(/\${[\w\W]*/g),d4=Zr(/^data-[\-\w.\u00B7-\uFFFF]+$/),h4=Zr(/^aria-[\-\w]+$/),w1=Zr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),m4=Zr(/^(?:\w+script|data):/i),f4=Zr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),p4=Zr(/^html$/i),v4=Zr(/^[a-z][.\w]*(-[.\w]+)+$/i),Vs={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},g4=function(){return typeof window>"u"?null:window},_4=function(s,c){if(typeof s!="object"||typeof s.createPolicy!="function")return null;let v=null;const C="data-tt-policy-suffix";c&&c.hasAttribute(C)&&(v=c.getAttribute(C));const R="dompurify"+(v?"#"+v:"");try{return s.createPolicy(R,{createHTML(y){return y},createScriptURL(y){return y}})}catch{return console.warn("TrustedTypes policy "+R+" could not be created."),null}},N1=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function vC(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:g4();const s=ke=>vC(ke);if(s.version="3.4.8",s.removed=[],!r||!r.document||r.document.nodeType!==Vs.document||!r.Element)return s.isSupported=!1,s;let c=r.document;const v=c,C=v.currentScript;r.DocumentFragment;const R=r.HTMLTemplateElement,y=r.Node,a=r.Element,d=r.NodeFilter,g=r.NamedNodeMap;g===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;const x=r.DOMParser,h=r.trustedTypes,_=a.prototype,N=Is(_,"cloneNode"),E=Is(_,"remove"),b=Is(_,"nextSibling"),l=Is(_,"childNodes"),m=Is(_,"parentNode"),f=Is(_,"shadowRoot"),p=Is(_,"attributes"),S=y&&y.prototype?Is(y.prototype,"nodeType"):null,k=y&&y.prototype?Is(y.prototype,"nodeName"):null;if(typeof R=="function"){const ke=c.createElement("template");ke.content&&ke.content.ownerDocument&&(c=ke.content.ownerDocument)}let j,A="",D=0;const L=function(Q){if(D>0)throw Bl('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 j.createHTML(Q)}finally{D--}},O=c,F=O.implementation,P=O.createNodeIterator,B=O.createDocumentFragment,G=O.getElementsByTagName,ne=v.importNode;let ee=N1();s.isSupported=typeof fC=="function"&&typeof m=="function"&&F&&F.createHTMLDocument!==void 0;const te=l4,se=c4,I=u4,W=d4,X=h4,K=m4,ve=f4,he=v4;let Ae=w1,me=null;const ie=sn({},[..._1,...Yg,...Kg,...Xg,...b1]);let $=null;const _e=sn({},[...y1,...Jg,...x1,...dm]);let ue=Object.seal(zl(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}})),Ie=null,Ue=null;const nt=Object.seal(zl(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let et=!0,st=!0,Dt=!1,J=!0,yt=!1,Kt=!0,Se=!1,Re=!1,We=!1,re=!1,$e=!1,Ke=!1,ge=!0,Ze=!1;const Ce="user-content-";let Ve=!0,be=!1,Me={},He=null;const Ct=sn({},["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 Lt=null;const Ut=sn({},["audio","video","img","source","image","track"]);let Vt=null;const dn=sn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Jt="http://www.w3.org/1998/Math/MathML",Bt="http://www.w3.org/2000/svg",zt="http://www.w3.org/1999/xhtml";let an=zt,jn=!1,it=null;const vn=sn({},[Jt,Bt,zt],qg);let zn=sn({},["mi","mo","mn","ms","mtext"]),$n=sn({},["annotation-xml"]);const tn=sn({},["title","style","font","a","script"]);let kn=null;const Un=["application/xhtml+xml","text/html"],Qn="text/html";let on=null,Nn=null;const On=c.createElement("form"),mi=function(Q){return Q instanceof RegExp||Q instanceof Function},le=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Nn&&Nn===Q)return;(!Q||typeof Q!="object")&&(Q={}),Q=Qi(Q),kn=Un.indexOf(Q.PARSER_MEDIA_TYPE)===-1?Qn:Q.PARSER_MEDIA_TYPE,on=kn==="application/xhtml+xml"?qg:Uu,me=ii(Q,"ALLOWED_TAGS")&&hr(Q.ALLOWED_TAGS)?sn({},Q.ALLOWED_TAGS,on):ie,$=ii(Q,"ALLOWED_ATTR")&&hr(Q.ALLOWED_ATTR)?sn({},Q.ALLOWED_ATTR,on):_e,it=ii(Q,"ALLOWED_NAMESPACES")&&hr(Q.ALLOWED_NAMESPACES)?sn({},Q.ALLOWED_NAMESPACES,qg):vn,Vt=ii(Q,"ADD_URI_SAFE_ATTR")&&hr(Q.ADD_URI_SAFE_ATTR)?sn(Qi(dn),Q.ADD_URI_SAFE_ATTR,on):dn,Lt=ii(Q,"ADD_DATA_URI_TAGS")&&hr(Q.ADD_DATA_URI_TAGS)?sn(Qi(Ut),Q.ADD_DATA_URI_TAGS,on):Ut,He=ii(Q,"FORBID_CONTENTS")&&hr(Q.FORBID_CONTENTS)?sn({},Q.FORBID_CONTENTS,on):Ct,Ie=ii(Q,"FORBID_TAGS")&&hr(Q.FORBID_TAGS)?sn({},Q.FORBID_TAGS,on):Qi({}),Ue=ii(Q,"FORBID_ATTR")&&hr(Q.FORBID_ATTR)?sn({},Q.FORBID_ATTR,on):Qi({}),Me=ii(Q,"USE_PROFILES")?Q.USE_PROFILES&&typeof Q.USE_PROFILES=="object"?Qi(Q.USE_PROFILES):Q.USE_PROFILES:!1,et=Q.ALLOW_ARIA_ATTR!==!1,st=Q.ALLOW_DATA_ATTR!==!1,Dt=Q.ALLOW_UNKNOWN_PROTOCOLS||!1,J=Q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,yt=Q.SAFE_FOR_TEMPLATES||!1,Kt=Q.SAFE_FOR_XML!==!1,Se=Q.WHOLE_DOCUMENT||!1,re=Q.RETURN_DOM||!1,$e=Q.RETURN_DOM_FRAGMENT||!1,Ke=Q.RETURN_TRUSTED_TYPE||!1,We=Q.FORCE_BODY||!1,ge=Q.SANITIZE_DOM!==!1,Ze=Q.SANITIZE_NAMED_PROPS||!1,Ve=Q.KEEP_CONTENT!==!1,be=Q.IN_PLACE||!1,Ae=s4(Q.ALLOWED_URI_REGEXP)?Q.ALLOWED_URI_REGEXP:w1,an=typeof Q.NAMESPACE=="string"?Q.NAMESPACE:zt,zn=ii(Q,"MATHML_TEXT_INTEGRATION_POINTS")&&Q.MATHML_TEXT_INTEGRATION_POINTS&&typeof Q.MATHML_TEXT_INTEGRATION_POINTS=="object"?Qi(Q.MATHML_TEXT_INTEGRATION_POINTS):sn({},["mi","mo","mn","ms","mtext"]),$n=ii(Q,"HTML_INTEGRATION_POINTS")&&Q.HTML_INTEGRATION_POINTS&&typeof Q.HTML_INTEGRATION_POINTS=="object"?Qi(Q.HTML_INTEGRATION_POINTS):sn({},["annotation-xml"]);const Ee=ii(Q,"CUSTOM_ELEMENT_HANDLING")&&Q.CUSTOM_ELEMENT_HANDLING&&typeof Q.CUSTOM_ELEMENT_HANDLING=="object"?Qi(Q.CUSTOM_ELEMENT_HANDLING):zl(null);if(ue=zl(null),ii(Ee,"tagNameCheck")&&mi(Ee.tagNameCheck)&&(ue.tagNameCheck=Ee.tagNameCheck),ii(Ee,"attributeNameCheck")&&mi(Ee.attributeNameCheck)&&(ue.attributeNameCheck=Ee.attributeNameCheck),ii(Ee,"allowCustomizedBuiltInElements")&&typeof Ee.allowCustomizedBuiltInElements=="boolean"&&(ue.allowCustomizedBuiltInElements=Ee.allowCustomizedBuiltInElements),yt&&(st=!1),$e&&(re=!0),Me&&(me=sn({},b1),$=zl(null),Me.html===!0&&(sn(me,_1),sn($,y1)),Me.svg===!0&&(sn(me,Yg),sn($,Jg),sn($,dm)),Me.svgFilters===!0&&(sn(me,Kg),sn($,Jg),sn($,dm)),Me.mathMl===!0&&(sn(me,Xg),sn($,x1),sn($,dm))),nt.tagCheck=null,nt.attributeCheck=null,ii(Q,"ADD_TAGS")&&(typeof Q.ADD_TAGS=="function"?nt.tagCheck=Q.ADD_TAGS:hr(Q.ADD_TAGS)&&(me===ie&&(me=Qi(me)),sn(me,Q.ADD_TAGS,on))),ii(Q,"ADD_ATTR")&&(typeof Q.ADD_ATTR=="function"?nt.attributeCheck=Q.ADD_ATTR:hr(Q.ADD_ATTR)&&($===_e&&($=Qi($)),sn($,Q.ADD_ATTR,on))),ii(Q,"ADD_URI_SAFE_ATTR")&&hr(Q.ADD_URI_SAFE_ATTR)&&sn(Vt,Q.ADD_URI_SAFE_ATTR,on),ii(Q,"FORBID_CONTENTS")&&hr(Q.FORBID_CONTENTS)&&(He===Ct&&(He=Qi(He)),sn(He,Q.FORBID_CONTENTS,on)),ii(Q,"ADD_FORBID_CONTENTS")&&hr(Q.ADD_FORBID_CONTENTS)&&(He===Ct&&(He=Qi(He)),sn(He,Q.ADD_FORBID_CONTENTS,on)),Ve&&(me["#text"]=!0),Se&&sn(me,["html","head","body"]),me.table&&(sn(me,["tbody"]),delete Ie.tbody),Q.TRUSTED_TYPES_POLICY){if(typeof Q.TRUSTED_TYPES_POLICY.createHTML!="function")throw Bl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Bl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Ye=j;j=Q.TRUSTED_TYPES_POLICY;try{A=L("")}catch(Ot){throw j=Ye,Ot}}else j===void 0&&Q.TRUSTED_TYPES_POLICY!==null&&(j=_4(h,C)),j&&typeof A=="string"&&(A=L(""));(ee.uponSanitizeElement.length>0||ee.uponSanitizeAttribute.length>0)&&me===ie&&(me=Qi(me)),ee.uponSanitizeAttribute.length>0&&$===_e&&($=Qi($)),mr&&mr(Q),Nn=Q},ze=sn({},[...Yg,...Kg,...a4]),tt=sn({},[...Xg,...o4]),bt=function(Q){let Ee=m(Q);(!Ee||!Ee.tagName)&&(Ee={namespaceURI:an,tagName:"template"});const Ye=Uu(Q.tagName),Ot=Uu(Ee.tagName);return it[Q.namespaceURI]?Q.namespaceURI===Bt?Ee.namespaceURI===zt?Ye==="svg":Ee.namespaceURI===Jt?Ye==="svg"&&(Ot==="annotation-xml"||zn[Ot]):!!ze[Ye]:Q.namespaceURI===Jt?Ee.namespaceURI===zt?Ye==="math":Ee.namespaceURI===Bt?Ye==="math"&&$n[Ot]:!!tt[Ye]:Q.namespaceURI===zt?Ee.namespaceURI===Bt&&!$n[Ot]||Ee.namespaceURI===Jt&&!zn[Ot]?!1:!tt[Ye]&&(tn[Ye]||!ze[Ye]):!!(kn==="application/xhtml+xml"&&it[Q.namespaceURI]):!1},xt=function(Q){Vl(s.removed,{element:Q});try{m(Q).removeChild(Q)}catch{E(Q)}},mt=function(Q,Ee){try{Vl(s.removed,{attribute:Ee.getAttributeNode(Q),from:Ee})}catch{Vl(s.removed,{attribute:null,from:Ee})}if(Ee.removeAttribute(Q),Q==="is")if(re||$e)try{xt(Ee)}catch{}else try{Ee.setAttribute(Q,"")}catch{}},jt=function(Q){let Ee=null,Ye=null;if(We)Q="<remove></remove>"+Q;else{const pt=f1(Q,/^[\r\n\t ]+/);Ye=pt&&pt[0]}kn==="application/xhtml+xml"&&an===zt&&(Q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Q+"</body></html>");const Ot=j?L(Q):Q;if(an===zt)try{Ee=new x().parseFromString(Ot,kn)}catch{}if(!Ee||!Ee.documentElement){Ee=F.createDocument(an,"template",null);try{Ee.documentElement.innerHTML=jn?A:Ot}catch{}}const lt=Ee.body||Ee.documentElement;return Q&&Ye&<.insertBefore(c.createTextNode(Ye),lt.childNodes[0]||null),an===zt?G.call(Ee,Se?"html":"body")[0]:Se?Ee.documentElement:lt},gt=function(Q){return P.call(Q.ownerDocument||Q,Q,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},_n=function(Q){var Ee,Ye;Q.normalize();const Ot=P.call(Q.ownerDocument||Q,Q,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null);let lt=Ot.nextNode();for(;lt;){let wt=lt.data;No([te,se,I],Tt=>{wt=Il(wt,Tt," ")}),lt.data=wt,lt=Ot.nextNode()}const pt=(Ee=(Ye=Q.querySelectorAll)===null||Ye===void 0?void 0:Ye.call(Q,"template"))!==null&&Ee!==void 0?Ee:[];No(Array.from(pt),wt=>{qt(wt.content)&&_n(wt.content)})},rn=function(Q){const Ee=k?k(Q):null;return typeof Ee!="string"||on(Ee)!=="form"?!1:typeof Q.nodeName!="string"||typeof Q.textContent!="string"||typeof Q.removeChild!="function"||Q.attributes!==p(Q)||typeof Q.removeAttribute!="function"||typeof Q.setAttribute!="function"||typeof Q.namespaceURI!="string"||typeof Q.insertBefore!="function"||typeof Q.hasChildNodes!="function"||Q.nodeType!==S(Q)||Q.childNodes!==l(Q)},qt=function(Q){if(!S||typeof Q!="object"||Q===null)return!1;try{return S(Q)===Vs.documentFragment}catch{return!1}},gn=function(Q){if(!S||typeof Q!="object"||Q===null)return!1;try{return typeof S(Q)=="number"}catch{return!1}};function bn(ke,Q,Ee){No(ke,Ye=>{Ye.call(s,Q,Ee,Nn)})}const li=function(Q){let Ee=null;if(bn(ee.beforeSanitizeElements,Q,null),rn(Q))return xt(Q),!0;const Ye=on(k?k(Q):Q.nodeName);if(bn(ee.uponSanitizeElement,Q,{tagName:Ye,allowedTags:me}),Kt&&Q.hasChildNodes()&&!gn(Q.firstElementChild)&&zi(/<[/\w!]/g,Q.innerHTML)&&zi(/<[/\w!]/g,Q.textContent)||Kt&&Q.namespaceURI===zt&&Ye==="style"&&gn(Q.firstElementChild)||Q.nodeType===Vs.progressingInstruction||Kt&&Q.nodeType===Vs.comment&&zi(/<[/\w]/g,Q.data))return xt(Q),!0;if(Ie[Ye]||!(nt.tagCheck instanceof Function&&nt.tagCheck(Ye))&&!me[Ye]){if(!Ie[Ye]&&ri(Ye)&&(ue.tagNameCheck instanceof RegExp&&zi(ue.tagNameCheck,Ye)||ue.tagNameCheck instanceof Function&&ue.tagNameCheck(Ye)))return!1;if(Ve&&!He[Ye]){const lt=m(Q),pt=l(Q);if(pt&<){const wt=pt.length;for(let Tt=wt-1;Tt>=0;--Tt){const hn=N(pt[Tt],!0);lt.insertBefore(hn,b(Q))}}}return xt(Q),!0}return(S?S(Q):Q.nodeType)===Vs.element&&!bt(Q)||(Ye==="noscript"||Ye==="noembed"||Ye==="noframes")&&zi(/<\/no(script|embed|frames)/i,Q.innerHTML)?(xt(Q),!0):(yt&&Q.nodeType===Vs.text&&(Ee=Q.textContent,No([te,se,I],lt=>{Ee=Il(Ee,lt," ")}),Q.textContent!==Ee&&(Vl(s.removed,{element:Q.cloneNode()}),Q.textContent=Ee)),bn(ee.afterSanitizeElements,Q,null),!1)},Pn=function(Q,Ee,Ye){if(Ue[Ee]||ge&&(Ee==="id"||Ee==="name")&&(Ye in c||Ye in On))return!1;const Ot=$[Ee]||nt.attributeCheck instanceof Function&&nt.attributeCheck(Ee,Q);if(!(st&&!Ue[Ee]&&zi(W,Ee))){if(!(et&&zi(X,Ee))){if(!Ot||Ue[Ee]){if(!(ri(Q)&&(ue.tagNameCheck instanceof RegExp&&zi(ue.tagNameCheck,Q)||ue.tagNameCheck instanceof Function&&ue.tagNameCheck(Q))&&(ue.attributeNameCheck instanceof RegExp&&zi(ue.attributeNameCheck,Ee)||ue.attributeNameCheck instanceof Function&&ue.attributeNameCheck(Ee,Q))||Ee==="is"&&ue.allowCustomizedBuiltInElements&&(ue.tagNameCheck instanceof RegExp&&zi(ue.tagNameCheck,Ye)||ue.tagNameCheck instanceof Function&&ue.tagNameCheck(Ye))))return!1}else if(!Vt[Ee]){if(!zi(Ae,Il(Ye,ve,""))){if(!((Ee==="src"||Ee==="xlink:href"||Ee==="href")&&Q!=="script"&&p1(Ye,"data:")===0&&Lt[Q])){if(!(Dt&&!zi(K,Il(Ye,ve,"")))){if(Ye)return!1}}}}}}return!0},ci=sn({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ri=function(Q){return!ci[Uu(Q)]&&zi(he,Q)},Ft=function(Q){bn(ee.beforeSanitizeAttributes,Q,null);const Ee=Q.attributes;if(!Ee||rn(Q))return;const Ye={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$,forceKeepAttr:void 0};let Ot=Ee.length;for(;Ot--;){const lt=Ee[Ot],pt=lt.name,wt=lt.namespaceURI,Tt=lt.value,hn=on(pt),Dn=Tt;let Xt=pt==="value"?Dn:QO(Dn);if(Ye.attrName=hn,Ye.attrValue=Xt,Ye.keepAttr=!0,Ye.forceKeepAttr=void 0,bn(ee.uponSanitizeAttribute,Q,Ye),Xt=Ye.attrValue,Ze&&(hn==="id"||hn==="name")&&p1(Xt,Ce)!==0&&(mt(pt,Q),Xt=Ce+Xt),Kt&&zi(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Xt)){mt(pt,Q);continue}if(hn==="attributename"&&f1(Xt,"href")){mt(pt,Q);continue}if(Ye.forceKeepAttr)continue;if(!Ye.keepAttr){mt(pt,Q);continue}if(!J&&zi(/\/>/i,Xt)){mt(pt,Q);continue}yt&&No([te,se,I],Xn=>{Xt=Il(Xt,Xn," ")});const Vn=on(Q.nodeName);if(!Pn(Vn,hn,Xt)){mt(pt,Q);continue}if(j&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!wt)switch(h.getAttributeType(Vn,hn)){case"TrustedHTML":{Xt=L(Xt);break}case"TrustedScriptURL":{Xt=j.createScriptURL(Xt);break}}if(Xt!==Dn)try{wt?Q.setAttributeNS(wt,pt,Xt):Q.setAttribute(pt,Xt),rn(Q)?xt(Q):m1(s.removed)}catch{mt(pt,Q)}}bn(ee.afterSanitizeAttributes,Q,null)},oe=function(Q){let Ee=null;const Ye=gt(Q);for(bn(ee.beforeSanitizeShadowDOM,Q,null);Ee=Ye.nextNode();)if(bn(ee.uponSanitizeShadowNode,Ee,null),li(Ee),Ft(Ee),qt(Ee.content)&&oe(Ee.content),(S?S(Ee):Ee.nodeType)===Vs.element){const lt=f?f(Ee):Ee.shadowRoot;qt(lt)&&(qe(lt),oe(lt))}bn(ee.afterSanitizeShadowDOM,Q,null)},qe=function(Q){const Ee=S?S(Q):Q.nodeType;if(Ee===Vs.element){const lt=f?f(Q):Q.shadowRoot;qt(lt)&&(qe(lt),oe(lt))}const Ye=l?l(Q):Q.childNodes;if(!Ye)return;const Ot=[];No(Ye,lt=>{Vl(Ot,lt)});for(const lt of Ot)qe(lt);if(Ee===Vs.element){const lt=k?k(Q):null;if(typeof lt=="string"&&on(lt)==="template"){const pt=Q.content;qt(pt)&&qe(pt)}}};return s.sanitize=function(ke){let Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ee=null,Ye=null,Ot=null,lt=null;if(jn=!ke,jn&&(ke="<!-->"),typeof ke!="string"&&!gn(ke)&&(ke=r4(ke),typeof ke!="string"))throw Bl("dirty is not a string, aborting");if(!s.isSupported)return ke;if(Re||le(Q),s.removed=[],typeof ke=="string"&&(be=!1),be){const Tt=k?k(ke):ke.nodeName;if(typeof Tt=="string"){const hn=on(Tt);if(!me[hn]||Ie[hn])throw Bl("root node is forbidden and cannot be sanitized in-place")}if(rn(ke))throw Bl("root node is clobbered and cannot be sanitized in-place");qe(ke)}else if(gn(ke))Ee=jt("<!---->"),Ye=Ee.ownerDocument.importNode(ke,!0),Ye.nodeType===Vs.element&&Ye.nodeName==="BODY"||Ye.nodeName==="HTML"?Ee=Ye:Ee.appendChild(Ye),qe(Ye);else{if(!re&&!yt&&!Se&&ke.indexOf("<")===-1)return j&&Ke?L(ke):ke;if(Ee=jt(ke),!Ee)return re?null:Ke?A:""}Ee&&We&&xt(Ee.firstChild);const pt=gt(be?ke:Ee);for(;Ot=pt.nextNode();)li(Ot),Ft(Ot),qt(Ot.content)&&oe(Ot.content);if(be)return yt&&_n(ke),ke;if(re){if(yt&&_n(Ee),$e)for(lt=B.call(Ee.ownerDocument);Ee.firstChild;)lt.appendChild(Ee.firstChild);else lt=Ee;return($.shadowroot||$.shadowrootmode)&&(lt=ne.call(v,lt,!0)),lt}let wt=Se?Ee.outerHTML:Ee.innerHTML;return Se&&me["!doctype"]&&Ee.ownerDocument&&Ee.ownerDocument.doctype&&Ee.ownerDocument.doctype.name&&zi(p4,Ee.ownerDocument.doctype.name)&&(wt="<!DOCTYPE "+Ee.ownerDocument.doctype.name+`>
|
|
329
|
+
`+wt),yt&&No([te,se,I],Tt=>{wt=Il(wt,Tt," ")}),j&&Ke?L(wt):wt},s.setConfig=function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};le(ke),Re=!0},s.clearConfig=function(){Nn=null,Re=!1},s.isValidAttribute=function(ke,Q,Ee){Nn||le({});const Ye=on(ke),Ot=on(Q);return Pn(Ye,Ot,Ee)},s.addHook=function(ke,Q){typeof Q=="function"&&Vl(ee[ke],Q)},s.removeHook=function(ke,Q){if(Q!==void 0){const Ee=JO(ee[ke],Q);return Ee===-1?void 0:ZO(ee[ke],Ee,1)[0]}return m1(ee[ke])},s.removeHooks=function(ke){ee[ke]=[]},s.removeAllHooks=function(){ee=N1()},s}var gC=vC();const Eo=500,S1=20;function C1(r,s){const c=new Map(r.map(C=>[C.k,C]));for(const C of s)c.set(C.k,C);const v=Array.from(c.values()).sort((C,R)=>C.k-R.k);return v.length>Eo?v.slice(-Eo):v}function b4(r,s){const[c,v]=M.useState([]),[C,R]=M.useState(!1),[y,a]=M.useState(!1),[d,g]=M.useState(null),[x,h]=M.useState(!1),_=M.useRef(""),N=M.useRef(null),E=M.useRef(!1),b=M.useRef(!1),l=M.useRef(null),m=M.useRef([]);M.useEffect(()=>{_.current="",N.current=null,E.current=!1,b.current=!1,l.current=null,m.current=[],v([]),R(!1),a(!1),g(null),h(!1)},[r]);const f=M.useCallback(()=>wN(r,{since:_.current,limit:S1}),[r]),p=M.useCallback(k=>{if(!k)return;h(!0),_.current=k.hash||"";const j=Array.isArray(k.messages)?k.messages:[];k.session&&l.current&&k.session!==l.current?(m.current=j.slice(-Eo),v(m.current),N.current=k.firstSeq??null,R(!!k.hasMore),E.current=!0):(m.current=C1(m.current,j),v(m.current),!E.current&&!b.current&&(E.current=!0,N.current=k.firstSeq??null,R(!!k.hasMore)),m.current.length>=Eo&&R(!1)),k.session&&(l.current=k.session,g(k.session))},[]);d_({fetch:f,apply:p,intervalMs:1500,enabled:!!r,deps:[r]});const S=M.useCallback(async()=>{if(!(b.current||!C||N.current==null)){if(m.current.length>=Eo){R(!1);return}b.current=!0,a(!0);try{const k=Math.min(S1,Eo-m.current.length),j=await wN(r,{before:N.current,limit:k});if(!j)return;const A=Array.isArray(j.messages)?j.messages:[];m.current=C1(m.current,A),v(m.current),N.current=j.firstSeq??N.current,R(!!j.hasMore&&m.current.length<Eo)}finally{b.current=!1,a(!1)}}},[r,C]);return{messages:c,hasMoreOlder:C,loadOlder:S,loadingOlder:y,session:d,loaded:x}}const y4=1200,x4=450;function w4(r,s){const[c,v]=M.useState(null),C=M.useRef(!0),R=M.useCallback(async()=>{if(!r||!s){v(null);return}try{const a=await RM(r);C.current&&v(a)}catch{}},[r,s]),y=M.useCallback(()=>{setTimeout(()=>{R()},x4)},[R]);return M.useEffect(()=>{if(C.current=!0,!s)return v(null),()=>{C.current=!1};R();const a=setInterval(R,y4);return()=>{C.current=!1,clearInterval(a)}},[r,s,R]),{prompt:c,refetch:y}}function N4(){return{prompt:"需要你确认",options:[{label:"允许",keys:["Enter"]},{label:"拒绝",keys:["Escape"]}]}}function S4({pane:r,prompt:s,onAuthFail:c,onAct:v}){var l;const C=s.cursor??((l=s.options[0])==null?void 0:l.n)??null,[R,y]=M.useState(C),[a,d]=M.useState(null),g=`${s.title}|${s.options.map(m=>`${m.n}:${m.label}`).join(",")}`,x=a===g;M.useEffect(()=>{var m;y(s.cursor??((m=s.options[0])==null?void 0:m.n)??null)},[g]),M.useEffect(()=>{if(!x)return;const m=setTimeout(()=>d(null),2e3);return()=>clearTimeout(m)},[x]);const h=async m=>{try{await m(),v==null||v()}catch(f){f instanceof Si&&(c==null||c())}},_=m=>h(()=>jo(r,String(m),!1)),N=()=>h(()=>Hu(r,["Escape"])),E=(m=N)=>{if(!x){d(g);return}d(null),m()},b=x?"再点一次取消":"取消";if(s.submit){const m=(s.options.find(p=>/submit/i.test(p.label))||s.options[0]).n,f=s.options.find(p=>/cancel/i.test(p.label));return o.jsxDEV("div",{className:"chat-gate",children:[o.jsxDEV("div",{className:"chat-gate-prompt",children:"复核并提交你的回答?"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:52,columnNumber:9},this),o.jsxDEV("div",{className:"chat-gate-actions",children:[o.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:()=>E(()=>f?_(f.n):N()),children:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:54,columnNumber:11},this),o.jsxDEV("button",{type:"button",className:"chat-gate-btn primary",onClick:()=>{d(null),_(m)},children:"提交"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:55,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:53,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:51,columnNumber:7},this)}return o.jsxDEV("div",{className:"chat-gate",children:[s.leadIn&&o.jsxDEV("div",{className:"chat-gate-leadin",children:s.leadIn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:63,columnNumber:25},this),s.multi&&o.jsxDEV("div",{className:"chat-gate-step",children:["第 ",s.step,"/",s.total," 题"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:64,columnNumber:24},this),o.jsxDEV("div",{className:"chat-gate-prompt",children:s.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:65,columnNumber:7},this),o.jsxDEV("div",{className:"chat-gate-options",role:"radiogroup",children:s.options.map(m=>o.jsxDEV("button",{type:"button",role:"radio","aria-checked":R===m.n,className:`chat-gate-opt${R===m.n?" on":""}`,onClick:()=>{d(null),y(m.n)},children:[o.jsxDEV("span",{className:"chat-gate-opt-label",children:m.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:70,columnNumber:13},this),m.description&&o.jsxDEV("span",{className:"chat-gate-opt-desc",children:m.description},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:71,columnNumber:31},this)]},m.n,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:68,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:66,columnNumber:7},this),o.jsxDEV("div",{className:"chat-gate-actions",children:[o.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:()=>E(),children:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:76,columnNumber:9},this),o.jsxDEV("button",{type:"button",className:"chat-gate-btn primary",disabled:R==null,onClick:()=>{d(null),_(R)},children:"确认"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:77,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:75,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:62,columnNumber:5},this)}function C4(r){const s=r.name||"工具",c=r.input||{};return s==="Bash"?`运行 ${c.command||""}`.trim():s==="Edit"||s==="MultiEdit"||s==="Write"?`${s==="Write"?"写入":"编辑"} ${c.file_path||""}`.trim():s==="Read"?`读取 ${c.file_path||c.notebook_path||""}`.trim():s==="NotebookEdit"?`编辑 ${c.notebook_path||""}`.trim():s==="Grep"?`搜索 ${c.pattern||""}`.trim():s==="Glob"?`查找文件 ${c.pattern||""}`.trim():s==="WebSearch"?`联网搜索 ${c.query||""}`.trim():s==="WebFetch"?`读取网页 ${c.url||""}`.trim():s==="TodoWrite"?"更新待办":s==="Skill"?`激活技能 ${c.command||c.skill||""}`.trim():s==="Task"||s==="Agent"?`调用 Agent${c.subagent_type?`(${c.subagent_type})`:""}: ${c.description||""}`.trim():`调用工具 ${s}`}function _C(r){return r==="Bash"?o.jsxDEV(bU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:46,columnNumber:31},this):r==="Edit"||r==="MultiEdit"||r==="Write"||r==="NotebookEdit"?o.jsxDEV(kS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:47,columnNumber:102},this):r==="Read"?o.jsxDEV(NS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:48,columnNumber:31},this):r==="Grep"||r==="Glob"?o.jsxDEV(wU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:49,columnNumber:50},this):r==="WebSearch"||r==="WebFetch"?o.jsxDEV(NU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:50,columnNumber:59},this):r==="TodoWrite"?o.jsxDEV(SU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:51,columnNumber:36},this):r==="Skill"?o.jsxDEV(CU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:52,columnNumber:32},this):r==="Task"||r==="Agent"?o.jsxDEV(EU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:53,columnNumber:51},this):o.jsxDEV(jU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:54,columnNumber:10},this)}function T_(){return o.jsxDEV("span",{className:"chat-typing-dots",children:[o.jsxDEV("span",{className:"chat-typing-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:61,columnNumber:7},this),o.jsxDEV("span",{className:"chat-typing-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:62,columnNumber:7},this),o.jsxDEV("span",{className:"chat-typing-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:63,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:60,columnNumber:5},this)}function bC({diff:r}){return!r||!r.added&&!r.removed?null:o.jsxDEV("span",{className:"chat-tool-stat","aria-label":`增 ${r.added} 行,删 ${r.removed} 行`,children:[r.added>0&&o.jsxDEV("span",{className:"cts-add",children:["+",r.added]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:74,columnNumber:26},this),r.removed>0&&o.jsxDEV("span",{className:"cts-del",children:["−",r.removed]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:75,columnNumber:28},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:73,columnNumber:5},this)}function E4({tool:r}){return r.diff&&r.diff.hunks&&r.diff.hunks.length?o.jsxDEV("div",{className:"chat-diff",children:r.diff.hunks.map((s,c)=>o.jsxDEV("div",{className:"chat-diff-hunk",children:s.lines.map((v,C)=>{const R=v[0]==="+"?"add":v[0]==="-"?"del":"ctx";return o.jsxDEV("div",{className:"chat-diff-line cd-"+R,children:v||" "},C,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:90,columnNumber:22},this)})},c,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:87,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:85,columnNumber:7},this):r.result!=null?o.jsxDEV("pre",{className:"chat-tool-body",children:r.result},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:97,columnNumber:35},this):null}function j4({tool:r}){if(r.isError)return o.jsxDEV("span",{className:"chat-tool-status err","aria-label":"失败",children:o.jsxDEV(ca,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:105,columnNumber:83},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:105,columnNumber:28},this);const s=r.diff&&(r.diff.added||r.diff.removed);return r.result!=null&&!s?o.jsxDEV("span",{className:"chat-tool-status ok","aria-label":"成功",children:o.jsxDEV($_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:107,columnNumber:105},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:107,columnNumber:51},this):null}function D4({tool:r,running:s,onOpen:c}){return o.jsxDEV("div",{className:"chat-tool"+(r.isError?" chat-tool-err":"")+(s?" chat-tool-running":""),children:o.jsxDEV("button",{type:"button",className:"chat-tool-head",onClick:c,children:[o.jsxDEV("span",{className:"chat-tool-ic",children:_C(r.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:117,columnNumber:9},this),o.jsxDEV("span",{className:"chat-tool-head-text",children:C4(r)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:118,columnNumber:9},this),o.jsxDEV(bC,{diff:r.diff},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:119,columnNumber:9},this),s?o.jsxDEV("span",{className:"chat-tool-head-running",children:o.jsxDEV(T_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:121,columnNumber:61},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:121,columnNumber:20},this):o.jsxDEV(j4,{tool:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:121,columnNumber:85},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:116,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:115,columnNumber:5},this)}function yC(r){return{Bash:"运行命令",Edit:"编辑文件",MultiEdit:"编辑文件",Write:"写入文件",Read:"读取文件",NotebookEdit:"编辑笔记本",Grep:"搜索",Glob:"查找文件",WebSearch:"联网搜索",WebFetch:"读取网页",TodoWrite:"更新待办",Skill:"激活技能",Task:"调用 Agent",Agent:"调用 Agent"}[r]||"调用工具"}function k4(r){const s=r.name,c=r.input||{};return s==="Bash"?c.command||"":s==="Read"||s==="Edit"||s==="MultiEdit"||s==="Write"?c.file_path||"":s==="NotebookEdit"?c.notebook_path||"":s==="Grep"||s==="Glob"?c.pattern||"":s==="WebSearch"?c.query||"":s==="WebFetch"?c.url||"":s==="Skill"?c.command||c.skill||"":s==="Task"||s==="Agent"?c.prompt||c.description||"":Object.keys(c).length?JSON.stringify(c,null,2):""}function R4(r){if(!r)return{dir:"",name:""};const s=r.lastIndexOf("/");return s>=0?{dir:r.slice(0,s+1),name:r.slice(s+1)}:{dir:"",name:r}}function T4({hunks:r}){return o.jsxDEV("div",{className:"dv",children:r.map((s,c)=>{let v=s.oldStart||0,C=s.newStart||0;return o.jsxDEV("div",{className:"dv-hunk",children:[c>0&&o.jsxDEV("div",{className:"dv-gap",children:o.jsxDEV("span",{children:"⋯"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:175,columnNumber:48},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:175,columnNumber:24},this),(s.lines||[]).map((R,y)=>{const a=typeof R=="string"?R[0]:" ",d=typeof R=="string"?R.slice(1):"";let g,x;return a==="+"?(g=C++,x="add"):a==="-"?(g=v++,x="del"):(g=C++,v++,x="ctx"),o.jsxDEV("div",{className:"dv-row dv-"+x,children:[o.jsxDEV("span",{className:"dv-ln",children:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:186,columnNumber:19},this),o.jsxDEV("span",{className:"dv-sign",children:a==="+"?"+":a==="-"?"−":""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:187,columnNumber:19},this),o.jsxDEV("span",{className:"dv-code",children:d||" "},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:188,columnNumber:19},this)]},y,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:185,columnNumber:17},this)})]},c,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:174,columnNumber:11},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:169,columnNumber:5},this)}function xC(r,s){return s?{txt:"执行中",cls:"run"}:r.isError?{txt:"失败",cls:"err"}:r.result!=null?{txt:"成功",cls:"ok"}:{txt:"未返回",cls:"idle"}}function L4({tool:r,running:s}){const{dir:c,name:v}=R4(r.input&&r.input.file_path||""),C=xC(r,s),R=r.diff&&r.diff.created,y=r.diff&&r.diff.hunks;return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"tool-sheet-head es-head",children:[o.jsxDEV("span",{className:"tool-sheet-ic",children:o.jsxDEV(kS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:218,columnNumber:41},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:218,columnNumber:9},this),o.jsxDEV("div",{className:"es-file",children:[o.jsxDEV("span",{className:"es-name",children:v||r.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:220,columnNumber:11},this),c&&o.jsxDEV("span",{className:"es-dir",children:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:221,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:219,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:217,columnNumber:7},this),o.jsxDEV("div",{className:"tool-sheet-body es-body",children:[o.jsxDEV("div",{className:"es-meta",children:[o.jsxDEV("span",{className:"tool-sheet-mode-val",children:yC(r.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:226,columnNumber:11},this),o.jsxDEV("span",{className:"tool-sheet-state "+C.cls,children:C.txt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:227,columnNumber:11},this),o.jsxDEV(bC,{diff:r.diff},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:228,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:225,columnNumber:9},this),y&&y.length?o.jsxDEV("div",{className:"es-diff",children:o.jsxDEV(T4,{hunks:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:231,columnNumber:38},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:231,columnNumber:13},this):R?o.jsxDEV("div",{className:"es-note",children:["新建文件",r.diff.added?` · 新增 ${r.diff.added} 行`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:233,columnNumber:15},this):s?o.jsxDEV("div",{className:"tool-sheet-empty",children:"执行中…"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:235,columnNumber:17},this):o.jsxDEV("div",{className:"tool-sheet-empty",children:"没有可显示的改动"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:236,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:224,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:216,columnNumber:5},this)}function A4({tool:r,running:s,onClose:c}){if(M.useEffect(()=>{const a=d=>{d.key==="Escape"&&c()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[c]),!r)return null;const v=!!(r.diff&&(r.diff.hunks&&r.diff.hunks.length||r.diff.created)),C=k4(r),R=r.result!=null,y=xC(r,s);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"tool-sheet-backdrop",onClick:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:258,columnNumber:7},this),o.jsxDEV("div",{className:"tool-sheet"+(v?" tool-sheet-edit":""),role:"dialog","aria-modal":"true",children:[o.jsxDEV("div",{className:"tool-sheet-grip"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:260,columnNumber:9},this),o.jsxDEV("button",{type:"button",className:"cmd-close tool-sheet-x","aria-label":"关闭",onClick:c,children:o.jsxDEV(ca,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:261,columnNumber:100},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:261,columnNumber:9},this),v?o.jsxDEV(L4,{tool:r,running:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:263,columnNumber:11},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"tool-sheet-head",children:[o.jsxDEV("span",{className:"tool-sheet-ic",children:_C(r.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:267,columnNumber:15},this),o.jsxDEV("span",{className:"tool-sheet-title",children:r.name||"工具"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:268,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:266,columnNumber:13},this),o.jsxDEV("div",{className:"tool-sheet-body",children:[o.jsxDEV("section",{className:"tool-sheet-sec",children:[o.jsxDEV("div",{className:"tool-sheet-label",children:"执行模式"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:272,columnNumber:17},this),o.jsxDEV("div",{className:"tool-sheet-mode-row",children:[o.jsxDEV("span",{className:"tool-sheet-mode-val",children:yC(r.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:274,columnNumber:19},this),o.jsxDEV("span",{className:"tool-sheet-state "+y.cls,children:y.txt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:275,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:273,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:271,columnNumber:15},this),C&&o.jsxDEV("section",{className:"tool-sheet-sec",children:[o.jsxDEV("div",{className:"tool-sheet-label",children:"执行的命令"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:280,columnNumber:19},this),o.jsxDEV("pre",{className:"tool-sheet-cmd",children:C},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:281,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:279,columnNumber:17},this),o.jsxDEV("section",{className:"tool-sheet-sec tool-sheet-out",children:[o.jsxDEV("div",{className:"tool-sheet-label",children:o.jsxDEV("span",{children:"输出结果"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:285,columnNumber:51},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:285,columnNumber:17},this),R?o.jsxDEV(E4,{tool:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:287,columnNumber:21},this):o.jsxDEV("div",{className:"tool-sheet-empty",children:s?"执行中…":"无输出"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:288,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:284,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:270,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:265,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:259,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:257,columnNumber:5},this)}function M4({m:r,running:s,onOpenTool:c}){if(r.type==="tool")return o.jsxDEV(D4,{tool:r.tool,running:s,onOpen:()=>c(r)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:299,columnNumber:33},this);if(r.type==="interrupt")return o.jsxDEV("div",{className:"chat-interrupt",children:U("chat.interrupted")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:302,columnNumber:38},this);if(r.type==="compact")return o.jsxDEV("div",{className:"chat-compact-divider",children:U("chat.compacted")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:304,columnNumber:36},this);if(r.type==="slash")return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"chat-slash-cmd",children:[r.name,r.args?" "+r.args:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:312,columnNumber:9},this),r.result&&o.jsxDEV("div",{className:"chat-slash-result",children:r.result},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:313,columnNumber:22},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:311,columnNumber:7},this);if(r.type==="thinking")return null;if(r.role!=="user"){const v=gC.sanitize(An.parse(r.text||""));return o.jsxDEV("div",{className:"chat-bubble chat-them chat-md",dangerouslySetInnerHTML:{__html:v}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:324,columnNumber:12},this)}return o.jsxDEV("div",{className:"chat-bubble chat-me",children:r.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:326,columnNumber:10},this)}const U4=40,O4=80;function P4(r){const s=new Set;let c=-1;return r.forEach((v,C)=>{v.type==="text"&&v.role==="user"?(s.add(C),c>=0&&(s.add(c),c=-1)):v.type==="text"&&(c=C)}),c>=0&&s.add(c),s}function V4(r){if(!r)return null;const s=new Date(r);if(Number.isNaN(s.getTime()))return null;const c=`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`,v=new Date;return s.getFullYear()===v.getFullYear()&&s.getMonth()===v.getMonth()&&s.getDate()===v.getDate()?c:`${s.getMonth()+1}月${s.getDate()}日 ${c}`}function I4(r){var R,y,a,d;const s=(R=r.closest)==null?void 0:R.call(r,".chat-md pre");if(s)return{el:s,text:s.innerText};const c=(y=r.closest)==null?void 0:y.call(r,".chat-tool-body, .chat-diff");if(c)return{el:c,text:c.innerText};const v=(a=r.closest)==null?void 0:a.call(r,".chat-bubble");if(v)return{el:v,text:v.innerText};const C=(d=r.closest)==null?void 0:d.call(r,".chat-tool");return C?{el:C,text:C.innerText}:null}const E1=72;function B4({pane:r,kind:s,msg:c,onAuthFail:v,slashEcho:C,onSlashEchoDone:R}){const{messages:y,hasMoreOlder:a,loadOlder:d,loadingOlder:g,session:x,loaded:h}=b4(r),_=M.useMemo(()=>P4(y),[y]),N=s==="permission",{prompt:E,refetch:b}=w4(r,N),l=M.useRef(!1);M.useEffect(()=>{E&&(l.current=!0)},[E]),M.useEffect(()=>{N||(l.current=!1)},[N]);const m=!E&&N&&!l.current?N4():null,f=y.length?y[y.length-1]:null,p=(f==null?void 0:f.type)==="tool"&&f.tool.result===null&&s==="working",S=p,k=s==="compacting",j=s==="error",A=M.useRef(null);C&&!A.current&&(A.current={k:y.reduce((Se,Re)=>Math.max(Se,Re.k??-1),-1),session:x}),!C&&A.current&&(A.current=null);const D=!!(C&&A.current&&(A.current.session&&x&&A.current.session!==x||y.some(Se=>Se.type==="slash"&&Se.name===C.name&&(Se.k??-1)>A.current.k)));M.useEffect(()=>{D&&(R==null||R())},[D,R]);const L=!p&&!k&&!j&&((f==null?void 0:f.role)==="user"?s!=="permission":s==="working"),O=M.useRef(null),F=M.useRef(null),P=M.useRef(!0),B=M.useRef(null),G=M.useRef(!1),ne=M.useRef(null),[ee,te]=M.useState(!0),[se,I]=M.useState(null),W=M.useRef(null),X=M.useRef({timer:null,x:0,y:0,fired:!1}),[K,ve]=M.useState(null),he=K!=null?y.find(Se=>Se.type==="tool"&&(Se.k??Se.i)===K):null;M.useEffect(()=>{K!=null&&!he&&ve(null)},[K,he]);const Ae=he!=null,me=M.useRef(0);M.useEffect(()=>{if(!Ae)return;window.history.pushState({chatToolSheet:!0},""),me.current=1;const Se=()=>{me.current=0,ve(null)};return window.addEventListener("popstate",Se),()=>{window.removeEventListener("popstate",Se),me.current>0&&(window.history.go(-me.current),me.current=0)}},[Ae]);const ie=()=>{W.current&&(W.current.classList.remove("chat-copy-hl"),W.current=null)},$=()=>{ie(),I(null)},_e=()=>{const Se=X.current;Se.timer&&(clearTimeout(Se.timer),Se.timer=null)},ue=(Se,Re,We)=>{var be;X.current.timer=null;const re=I4(We),$e=F.current;if(!re||!re.text.trim()||!$e)return;X.current.fired=!0,(be=navigator.vibrate)==null||be.call(navigator,12),re.el.classList.add("chat-copy-hl"),W.current=re.el;const Ke=$e.getBoundingClientRect(),ge=re.el.getBoundingClientRect(),Ze=Math.max(8,Math.min(Se-Ke.left-E1/2,Ke.width-E1-8)),Ce=ge.top-Ke.top-44,Ve=Ce<4?Math.min(ge.bottom-Ke.top+8,Ke.height-52):Ce;I({top:Ve,left:Ze,text:re.text})},Ie=Se=>{if($(),X.current.fired=!1,Se.pointerType==="mouse")return;const Re=X.current;Re.x=Se.clientX,Re.y=Se.clientY;const{target:We}=Se;_e(),Re.timer=setTimeout(()=>ue(Re.x,Re.y,We),480)},Ue=Se=>{X.current.fired&&(X.current.fired=!1,Se.stopPropagation(),Se.preventDefault())},nt=Se=>{const Re=X.current;Re.timer&&Math.hypot(Se.clientX-Re.x,Se.clientY-Re.y)>10&&_e()},et=async Se=>{var Re;try{await navigator.clipboard.writeText(Se),(Re=navigator.vibrate)==null||Re.call(navigator,8)}catch{}$()};M.useEffect(()=>_e,[]),M.useEffect(()=>{$(),ve(null)},[r]);const[st,Dt]=M.useState(null),J=!!(E||m);M.useEffect(()=>{var Re;if(!J){Dt(null);return}const Se=()=>{const We=F.current,re=We==null?void 0:We.closest(".app");if(!We||!re)return;const $e=We.getBoundingClientRect(),Ke=re.getBoundingClientRect(),ge=Ke.bottom-$e.top;Dt(ge>0?{top:$e.top-Ke.top,height:ge}:null)};return Se(),window.addEventListener("resize",Se),(Re=window.visualViewport)==null||Re.addEventListener("resize",Se),()=>{var We;window.removeEventListener("resize",Se),(We=window.visualViewport)==null||We.removeEventListener("resize",Se)}},[J]);const yt=()=>{const Se=O.current;if(!Se)return;_e(),se&&$();const Re=Se.scrollHeight-Se.scrollTop-Se.clientHeight<U4;P.current=Re,te(Re),Se.scrollTop<O4&&a&&!g&&(B.current=Se.scrollHeight,G.current=!0,d())},Kt=()=>{const Se=O.current;Se&&(Se.scrollTop=Se.scrollHeight,P.current=!0,te(!0))};return M.useEffect(()=>{const Se=O.current,Re=y.length?y[y.length-1]:null,We=Re?Re.k??Re.i:null,re=Re&&Re.role==="user"&&ne.current!=null&&We!=null&&We>ne.current;if(Se){if(G.current){Se.scrollTop+=Se.scrollHeight-B.current,B.current=null,G.current=!1;return}if(We!=null&&(ne.current=ne.current==null?We:Math.max(ne.current,We)),re){Se.scrollTop=Se.scrollHeight,P.current=!0,te(!0);return}P.current&&(Se.scrollTop=Se.scrollHeight)}},[y,L]),M.useEffect(()=>{const Se=O.current;if(!Se)return;const Re=()=>{g||!a||y.length===0||Se.clientHeight>0&&Se.scrollHeight<=Se.clientHeight&&(B.current=Se.scrollHeight,G.current=!0,d())};if(Re(),typeof ResizeObserver>"u")return;const We=new ResizeObserver(Re);return We.observe(Se),()=>We.disconnect()},[y,a,g,d]),M.useEffect(()=>{const Se=O.current;Se&&(Se.scrollTop=Se.scrollHeight),P.current=!0,te(!0),ne.current=null},[r]),o.jsxDEV("div",{className:"chat-view",ref:F,children:[o.jsxDEV("div",{className:"chat-scroll",ref:O,onScroll:yt,onPointerDown:Ie,onPointerMove:nt,onPointerUp:_e,onPointerCancel:_e,onClickCapture:Ue,children:[y.length===0&&(h?o.jsxDEV("div",{className:"chat-new",children:U("boot.chat_empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:652,columnNumber:13},this):o.jsxDEV(FS,{hint:U("boot.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:653,columnNumber:13},this)),y.map((Se,Re)=>{if(Se.type==="thinking")return null;const We=_.has(Re)?V4(Se.ts):null;return o.jsxDEV(M.Fragment,{children:[o.jsxDEV(M4,{m:Se,running:S&&Re===y.length-1,onOpenTool:re=>ve(re.k??re.i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:659,columnNumber:15},this),We&&o.jsxDEV("div",{className:"chat-ts "+(Se.role==="user"?"ts-me":"ts-them"),children:We},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:661,columnNumber:25},this)]},(Se.k??Se.i)+":"+Re,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:658,columnNumber:13},this)}),C&&!D&&o.jsxDEV("div",{className:"chat-slash-cmd",children:[C.name,C.args?" "+C.args:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:666,columnNumber:11},this),k&&o.jsxDEV("div",{className:"chat-compacting","aria-live":"polite",children:[o.jsxDEV("span",{className:"chat-compacting-label",children:"正在压缩上下文"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:670,columnNumber:13},this),o.jsxDEV(T_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:671,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:669,columnNumber:11},this),j&&o.jsxDEV("div",{className:"chat-turn-error",role:"status",children:["本轮出错",c?`:${c}`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:675,columnNumber:11},this),L&&o.jsxDEV("div",{className:"chat-typing","aria-hidden":"true",children:o.jsxDEV(T_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:681,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:680,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:645,columnNumber:7},this),se&&o.jsxDEV("div",{className:"sel-callout chat-copy-callout",style:{top:se.top,left:se.left},onPointerDown:Se=>Se.preventDefault(),children:o.jsxDEV("button",{type:"button",onClick:()=>et(se.text),children:"拷贝"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:689,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:687,columnNumber:9},this),!ee&&o.jsxDEV("button",{type:"button",className:"new-output","aria-label":"回到最新",onClick:Kt,children:"↓ 回到底部"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:694,columnNumber:9},this),he&&o.jsxDEV(A4,{tool:he.tool,running:S&&he===y[y.length-1],onClose:()=>ve(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:700,columnNumber:9},this),J&&o.jsxDEV("div",{className:"chat-gate-backdrop",style:st?{top:st.top+"px",height:st.height+"px",bottom:"auto"}:void 0},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:711,columnNumber:18},this),E&&o.jsxDEV(S4,{pane:r,prompt:E,onAuthFail:v,onAct:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:713,columnNumber:18},this),m&&o.jsxDEV("div",{className:"chat-gate",children:[o.jsxDEV("div",{className:"chat-gate-prompt",children:m.prompt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:716,columnNumber:11},this),o.jsxDEV("div",{className:"chat-gate-actions",children:m.options.map((Se,Re)=>o.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:()=>Hu(r,Se.keys),children:Se.label},Re,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:719,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:717,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:715,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:644,columnNumber:5},this)}function F4({onSaved:r}){const[s,c]=M.useState(""),v=C=>{C.preventDefault();const R=s.trim();R&&(PA(R),r())};return o.jsxDEV("form",{className:"token-prompt",onSubmit:v,children:[o.jsxDEV("h2",{children:U("token.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:16,columnNumber:7},this),o.jsxDEV("input",{value:s,onChange:C=>c(C.target.value),placeholder:U("token.placeholder")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:17,columnNumber:7},this),o.jsxDEV("button",{type:"submit",children:U("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 Rm({open:r,title:s,actions:c=[],onClose:v}){const[C,R]=M.useState(null);if(M.useEffect(()=>{r||R(null)},[r]),!r)return null;const y=d=>{var g;if(!d.disabled){if(d.confirm&&C!==d.key){R(d.key);return}R(null),(g=d.onClick)==null||g.call(d)}},a=d=>o.jsxDEV("button",{className:`sheet-action ${d.danger?"danger":""} ${C===d.key?"armed":""}`,disabled:d.disabled,onClick:()=>y(d),children:[d.icon&&C!==d.key&&o.jsxDEV("span",{className:"sheet-action-icon","aria-hidden":"true",children:d.icon},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:30,columnNumber:37},this),d.confirm&&C===d.key?d.confirmLabel||U("actionsheet.confirmAgain"):d.label]},d.key,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:24,columnNumber:5},this);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:37,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",role:"dialog","aria-label":s,"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:40,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:v,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:41,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:39,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section sheet-actions",children:[c.map((d,g)=>Array.isArray(d)?o.jsxDEV("div",{className:"sheet-row",children:d.map(a)},`row-${g}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:45,columnNumber:15},this):a(d)),o.jsxDEV("button",{className:"fontbtn sheet-cancel",onClick:v,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:47,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:43,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:38,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:36,columnNumber:5},this)}const H4=/\.(?:md|markdown|html|htm|txt|log|sh)$/i,j1=300;function D1(r){const s=r.lastIndexOf("/");return s<0?{dir:"",frag:r}:{dir:r.slice(0,s+1),frag:r.slice(s+1)}}const z4=r=>r.replace(/\/+$/,"")||"/",Zg=(r,s)=>r===s?"":r.startsWith(`${s}/`)?r.slice(s.length+1):r,hm=(r,s,c)=>{let v=null;for(const C of s||[])(r===C||r!=null&&r.startsWith(`${C}/`))&&(!v||C.length>v.length)&&(v=C);return v||c},$4=r=>r==null?"":r<1024?`${r} B`:r<1024*1024?`${Math.round(r/1024)} KB`:`${(r/1024/1024).toFixed(1)} MB`;function wC({path:r,onNavigate:s,onOpenDoc:c,onJumpToCwd:v,pendingFile:C,onPendingConsumed:R,pickMode:y=!1,allowMkdir:a=!y,onPick:d,refreshKey:g=0}){const[x,h]=M.useState(""),[_,N]=M.useState(null),[E,b]=M.useState(!1),[l,m]=M.useState(""),[f,p]=M.useState(""),[S,k]=M.useState(""),[j,A]=M.useState(null),[D,L]=M.useState(!1),[O,F]=M.useState(!1),[P,B]=M.useState(""),[G,ne]=M.useState(null),ee=M.useRef(null),te=M.useRef(!1),se=M.useRef(g),I=M.useRef(null),W=M.useRef(null),X=M.useRef(null),K=async(ge,{sync:Ze=!1,notify:Ce=!1,fallbackHome:Ve=!1}={})=>{m("");try{const be=await yS(ge??void 0);if(te.current=be.path,N(be),Ze){const Me=Zg(be.path,hm(be.path,be.roots,be.home));h(Me?`${Me}/`:"")}Ce&&(s==null||s(be.path),F(!1),B(""))}catch{if(Ve&&ge!=null){K(null,{sync:!0});return}m(U("filebrowser.openDirFailed"))}};M.useEffect(()=>{const ge=g!==se.current;se.current=g,!(r===te.current&&!ge)&&K(r,{sync:!0,fallbackHome:y})},[r,g]),M.useEffect(()=>()=>{clearTimeout(I.current),clearTimeout(W.current)},[]),M.useEffect(()=>{if(!E)return;const ge=Ze=>{var Ce;(Ce=X.current)!=null&&Ce.contains(Ze.target)||b(!1)};return document.addEventListener("pointerdown",ge,!0),()=>document.removeEventListener("pointerdown",ge,!0)},[E]);const ve=ge=>{p(ge),clearTimeout(W.current),W.current=setTimeout(()=>p(""),2500)},he=ge=>{const Ze=_==null?void 0:_.home;if(!Ze){h(ge);return}const Ce=(_==null?void 0:_.roots)||[Ze];let Ve=ge;(Ve==="~"||Ve.startsWith("~/"))&&(Ve=Ze+Ve.slice(1));let be=hm(_==null?void 0:_.path,Ce,Ze);Ve.startsWith("/")&&(be=hm(Ve,Ce,Ze),Ve=Ve===be?"":Ve.startsWith(`${be}/`)?Ve.slice(be.length+1):Ve.replace(/^\/+/,"")),h(Ve);const Me=z4(`${be}/${D1(Ve).dir}`);Me!==te.current&&(clearTimeout(I.current),I.current=setTimeout(()=>{Me!==te.current&&K(Me,{notify:!0})},250))},Ae=async ge=>{const Ze=Co(_.path,ge);try{await navigator.clipboard.writeText(Ze),ve(U("filebrowser.copiedPath",{abs:Ze}))}catch{ve(Ze)}},me=ge=>c(Co(_.path,ge)),ie=ge=>K(Co(_.path,ge),{sync:!0,notify:!0}),$=()=>(_==null?void 0:_.parent)&&K(_.parent,{sync:!0,notify:!0}),_e=async()=>{const ge=P.trim();if(!(!ge||!_)){m("");try{await zM(_.path,ge),await K(_.path,{}),F(!1),B("")}catch{m(U("filebrowser.mkdirFailed"))}}},ue=async ge=>{m(""),ne({label:U("filebrowser.downloading",{name:ge}),pct:0});try{await eU(Co(_.path,ge),Ze=>ne({label:U("filebrowser.downloading",{name:ge}),pct:Ze})),k(ge)}catch{m(U("filebrowser.downloadFailed"))}finally{ne(null)}},Ie=()=>{const ge=j;A(null),ge&&ue(ge)},Ue=_==null?void 0:_.home,nt=(_==null?void 0:_.roots)||(Ue?[Ue]:[]),et=hm(_==null?void 0:_.path,nt,Ue),st=ge=>ge===Ue?"~":/\/tmp$/.test(ge)?"tmp":ge.includes("/var/folders/")?"TMPDIR":ge.split("/").filter(Boolean).pop()||"/",Dt=ge=>{b(!1),ge!==et&&K(ge,{sync:!0,notify:!0})},J=(ge,Ze)=>!ge||!Ze||ge===Ze?!1:(ge.startsWith(`${Ze}/`)?ge.slice(Ze.length+1):ge).split("/").some(Ve=>Ve.startsWith(".")),yt=!!_&&_.path!==Ue&&!J(_.path,et),Kt=async ge=>{const{allowed:Ze,rejected:Ce}=ZS(ge);if(!Ze.length)return Ce.length&&m(U("filebrowser.uploadRejected",{names:Ce.join("、")})),Ce;L(!0),m("");const Ve=Ze.length,be=[],Me=new AbortController;eC(Me,U("filebrowser.uploading",{name:Ze[0].name,tag:Ve>1?`(1/${Ve})`:""}));try{for(let He=0;He<Ve&&!Me.signal.aborted;He++){const Ct=Ze[He],Lt=Ve>1?`(${He+1}/${Ve})`:"";Em({label:U("filebrowser.uploading",{name:Ct.name,tag:Lt}),phase:"sending",pct:0});try{await wS(_.path,Ct,(Ut,Vt)=>Em({pct:Ut,phase:Vt}),!1,{signal:Me.signal})}catch(Ut){if(Ut instanceof xm)break;be.push({name:Ct.name,reason:(Ut==null?void 0:Ut.message)||U("filebrowser.uploadFailed")})}}}finally{C_()}return await K(_.path,{}),L(!1),be.length?m(be.map(He=>`${He.name}:${He.reason}`).join(";")):Ce.length&&m(U("filebrowser.uploadRejected",{names:Ce.join("、")})),[...be.map(He=>He.name),...Ce]},Se=async()=>{C&&(await Kt(C)).length===0&&(R==null||R())},Re=ge=>{if(y||ge.key!=="Enter")return;const Ze=x.trim();Ze&&H4.test(Ze)&&(_!=null&&_.home)&&c(Co(_.home,Ze))},We=D1(x).frag.toLowerCase(),re=((_==null?void 0:_.entries)||[]).filter(ge=>(!y||ge.type==="dir")&&(!We||ge.name.toLowerCase().includes(We))),$e=re.length>j1?re.slice(0,j1):re,Ke=re.length-$e.length;return o.jsxDEV("div",{className:"browse-view",children:[o.jsxDEV("div",{className:"browse-bar",children:[v&&o.jsxDEV("button",{className:"browse-cwd","aria-label":U("filebrowser.sessionDir"),title:U("filebrowser.jumpToSessionDir"),onClick:v,children:o.jsxDEV(cU,{},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),o.jsxDEV("button",{className:"browse-up","aria-label":U("filebrowser.parentDir"),disabled:!(_!=null&&_.parent),onClick:$,children:o.jsxDEV(H_,{},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),o.jsxDEV("div",{className:"browse-path",children:[nt.length>1?o.jsxDEV("div",{className:"dd browse-root-dd",ref:X,children:[o.jsxDEV("button",{type:"button",className:"browse-root","aria-haspopup":"listbox","aria-expanded":E,"aria-label":U("filebrowser.rootSelect"),onClick:()=>b(ge=>!ge),children:[o.jsxDEV("span",{children:[st(et),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:289,columnNumber:17},this),o.jsxDEV("span",{className:`dd-caret${E?" 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),E&&o.jsxDEV("div",{className:"dd-menu",role:"listbox",children:nt.map(ge=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":ge===et,title:ge,className:`dd-option${ge===et?" is-selected":""}`,onClick:()=>Dt(ge),children:[o.jsxDEV("span",{className:"dd-option-label",children:[st(ge),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:299,columnNumber:23},this),ge===et&&o.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)]},ge,!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):o.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),o.jsxDEV("input",{className:"browse-input",value:x,placeholder:U("filebrowser.pathPlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:ge=>he(ge.target.value),onKeyDown:Re},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),a&&o.jsxDEV("button",{className:"browse-mkdir","aria-label":U("filebrowser.newFolder"),title:U("filebrowser.newFolder"),disabled:!_,onClick:()=>{F(ge=>!ge),B("")},children:o.jsxDEV(oU,{},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),!y&&o.jsxDEV("button",{className:"browse-upload","aria-label":U("filebrowser.uploadFile"),title:U(yt?"filebrowser.uploadToCurrentDir":"filebrowser.enterSubdirToUpload"),disabled:!yt||D,onClick:()=>{var ge;return(ge=ee.current)==null?void 0:ge.click()},children:o.jsxDEV(CS,{},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),!y&&o.jsxDEV("input",{ref:ee,className:"browse-file-input",type:"file",multiple:!0,accept:K_,onChange:ge=>{Kt(Array.from(ge.target.files||[])),ge.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),O&&o.jsxDEV("div",{className:"browse-newfolder",children:[o.jsxDEV("input",{className:"browse-newfolder-input",autoFocus:!0,value:P,placeholder:U("filebrowser.folderNamePlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:ge=>B(ge.target.value),onKeyDown:ge=>{ge.key==="Enter"&&_e()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:350,columnNumber:11},this),o.jsxDEV("button",{className:"browse-newfolder-ok",onClick:_e,children:U("filebrowser.createBtn")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:356,columnNumber:11},this),o.jsxDEV("button",{className:"browse-newfolder-x","aria-label":U("common.cancel"),onClick:()=>{F(!1),B("")},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),!y&&C&&o.jsxDEV("div",{className:"browse-pending",children:[o.jsxDEV("span",{className:"browse-pending-text",children:[U("filebrowser.uploadPendingTo",{name:C.name}),!yt&&o.jsxDEV("em",{className:"browse-pending-hint",children:U("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),o.jsxDEV("button",{className:"browse-pending-btn",disabled:!yt||D,onClick:Se,children:U("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&&o.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&&o.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),!y&&S&&o.jsxDEV("div",{className:"browse-saved",children:[o.jsxDEV("span",{className:"browse-saved-text",children:U("filebrowser.savedToDownloads",{name:S})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:373,columnNumber:11},this),o.jsxDEV("button",{className:"browse-saved-close","aria-label":U("common.close"),onClick:()=>k(""),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),!y&&G&&o.jsxDEV("div",{className:"browse-progress",children:[o.jsxDEV("span",{className:"browse-progress-label",children:[G.label," ",Math.round(G.pct*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:379,columnNumber:11},this),o.jsxDEV("span",{className:"browse-progress-track",children:o.jsxDEV("span",{className:"browse-progress-fill",style:{width:`${Math.round(G.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),o.jsxDEV("div",{className:"browse-list",children:[$e.length===0&&!l&&o.jsxDEV("div",{className:"browse-empty",children:U("filebrowser.noMatches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:386,columnNumber:42},this),$e.map(ge=>o.jsxDEV("div",{className:"browse-entry-row",children:[o.jsxDEV("button",{className:"browse-entry",onClick:()=>ge.type==="dir"?ie(ge.name):ge.type==="doc"||ge.type==="image"?me(ge.name):ve(U("filebrowser.previewUnsupported")),children:[o.jsxDEV("span",{className:"browse-entry-icon",children:ge.type==="dir"?o.jsxDEV(zu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:71},this):ge.type==="image"?o.jsxDEV(lU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:109},this):o.jsxDEV(NS,{},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),o.jsxDEV("span",{className:"browse-entry-name",children:ge.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:398,columnNumber:15},this),ge.type!=="dir"&&o.jsxDEV("span",{className:"browse-entry-size",children:$4(ge.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),ge.type!=="dir"&&o.jsxDEV("button",{className:"browse-copy","aria-label":U("filebrowser.copyAbsPath"),title:U("filebrowser.copyAbsPath"),onClick:()=>Ae(ge.name),children:o.jsxDEV(ES,{},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),ge.type!=="dir"&&o.jsxDEV("button",{className:"browse-dl","aria-label":U("filebrowser.download"),onClick:()=>A(ge.name),children:o.jsxDEV(hU,{},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)]},ge.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:388,columnNumber:11},this)),Ke>0&&o.jsxDEV("div",{className:"browse-overflow",children:U("filebrowser.tooMany",{shown:$e.length,total:re.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),y&&_&&o.jsxDEV("div",{className:"browse-pick-bar",children:o.jsxDEV("button",{className:"browse-pick-confirm",onClick:()=>d==null?void 0:d(_.path),children:U("filebrowser.pickThisDir",{path:Zg(_.path,_.home)?`~/${Zg(_.path,_.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),o.jsxDEV(Rm,{open:!!j,title:j?U("filebrowser.downloadConfirm",{name:j}):"",actions:[{key:"dl",label:U("filebrowser.download"),onClick:Ie}],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 W4=()=>{};function Ju({open:r,seedCwd:s=null,hint:c=null,pane:v=null,allowMkdir:C=!1,onPick:R,onClose:y,inset:a=0}){const[d,g]=M.useState(s),x=M.useRef(!1);r&&!x.current?(x.current=!0,d!==s&&g(s)):!r&&x.current&&(x.current=!1);const h=v?async()=>{try{const{cwd:_}=await Ro(v);_&&g(_)}catch{}}:null;return r?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop dirpick-backdrop",onClick:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:31,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card dirpick-card",style:{transform:`translate(-50%, calc(-50% + ${a/2}px))`,"--kb-inset":`${a}px`},role:"dialog","aria-label":U("dirpicker.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:U("dirpicker.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:38,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:y,"aria-label":U("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),c&&o.jsxDEV("div",{className:"dirpick-hint",children:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:41,columnNumber:18},this),o.jsxDEV(wC,{path:d,onNavigate:g,onOpenDoc:W4,onJumpToCwd:h,pickMode:!0,allowMkdir:C,onPick:R},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 G4({open:r,pushKey:s,notifyOn:c,onClose:v}){const[C,R]=M.useState("");if(!r)return null;const y='handmux push "构建完成" "耗时 3m12s"',a=!!(c&&s),d=y,g=`${y} --session ${U("scriptPush.session_placeholder")}`,x=`${y} --device ${a?s:U("scriptPush.device_placeholder")}`,h=async(E,b)=>{try{await navigator.clipboard.writeText(E),R(b),setTimeout(()=>R(""),1500)}catch{}},_=E=>U(C===E?"scriptPush.copied":"common.copy"),N=(E,b,l,m)=>o.jsxDEV("div",{className:"push-script-block",children:[o.jsxDEV("div",{className:"push-script-label",children:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:25,columnNumber:7},this),o.jsxDEV("pre",{className:"push-script-cmd",children:o.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&&o.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),o.jsxDEV("button",{className:"fontbtn",onClick:()=>h(l,E),children:_(E)},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 o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop push-script-backdrop",onClick:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:34,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card push-script-sheet",role:"dialog","aria-label":U("scriptPush.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:U("scriptPush.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:37,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:v,"aria-label":U("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),o.jsxDEV("p",{className:"push-script-intro",children:U("scriptPush.intro")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:41,columnNumber:9},this),N("all",U("scriptPush.scope_all"),d),N("session",U("scriptPush.scope_session"),g),N("device",U("scriptPush.scope_device"),x,U(a?"scriptPush.device_key_note":"scriptPush.device_need_enable")),o.jsxDEV("div",{className:"push-script-block",children:[o.jsxDEV("div",{className:"push-script-label",children:U("scriptPush.opts_label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:49,columnNumber:11},this),o.jsxDEV("ul",{className:"push-script-fields",children:[o.jsxDEV("li",{children:U("scriptPush.opt_tag")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:51,columnNumber:13},this),o.jsxDEV("li",{children:U("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),o.jsxDEV("div",{className:"push-script-note",children:U("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 q4({open:r,onClose:s,termRef:c,onColAdjust:v,onColRestore:C,onOpenChangelog:R,changelogUnread:y,chatTone:a="ink",onChatTone:d=()=>{},chatLensEnabled:g=!1,onChatLensEnabled:x=()=>{},hooksStatus:h=null,onEnableHooks:_=null,notifUnread:N=!1,onOpenInbox:E,updateInfo:b=null,activePreview:l=null,pane:m=null,lastPreviewDir:f=null,dynamicEnabled:p=!1,getColCount:S=null,onStartPreview:k,onStartDynamicPreview:j,onOpenPreview:A,onRenew:D,onStop:L}){var zt,an,jn;const[O,F]=M.useState(null),[P,B]=M.useState(fS()),[G,ne]=M.useState(null),[ee,te]=M.useState(!1),[se,I]=M.useState(o_()),[W,X]=M.useState(!1),[K,ve]=M.useState(""),he=h==="absent"||h==="no-claude",[Ae,me]=M.useState(!1),[ie,$]=M.useState(!1),_e=async()=>{me(!0),$(!1);try{const it=await(_==null?void 0:_());(!it||it.status!=="installed")&&$(!0)}catch{$(!0)}finally{me(!1)}},[ue,Ie]=M.useState(!1),[Ue,nt]=M.useState(null),[et,st]=M.useState(!1),[Dt,J]=M.useState(null),[yt,Kt]=M.useState("off"),[Se,Re]=M.useState(""),[We,re]=M.useState(!1),[$e,Ke]=M.useState(""),[ge,Ze]=M.useState(!1),Ce=TS(l==null?void 0:l.expiresAt,!!l&&r);M.useEffect(()=>{re(!1),Ke("")},[l==null?void 0:l.name,r]);const Ve=async()=>{const it=Number(Se);if(it){Ke(""),Ze(!0);try{await(j==null?void 0:j(it))}catch(vn){Ke(PS(vn,{port:it}))}finally{Ze(!1)}}},be=async()=>{nt(o_()?await VU():null),Ie(!0)},Me=async()=>{let it=f;if(!it&&m)try{it=(await Ro(m)).cwd||null}catch{}J(it),st(!0)};M.useEffect(()=>{var it,vn;r&&(F(((vn=(it=c.current)==null?void 0:it.getFontSize)==null?void 0:vn.call(it))??null),ne((S==null?void 0:S())??null))},[r,c,S]);const He=async()=>{X(!0),ve("");try{se?(await PU(),I(!1),ve(U("settings.notify_disabled"))):(await OU(),I(!0),ve(U("settings.notify_enabled")))}catch(it){ve(it.message||U("settings.notify_failed"))}finally{X(!1)}};if(!r)return null;const Ct=it=>{var $n,tn,kn,Un;const vn=(tn=($n=c.current)==null?void 0:$n.getFontSize)==null?void 0:tn.call($n),zn=(Un=(kn=c.current)==null?void 0:kn.setFontSize)==null?void 0:Un.call(kn,((vn==null?void 0:vn.size)??14)+it);zn!=null&&F({size:zn,auto:!1})},Lt=()=>{var it,vn;(vn=(it=c.current)==null?void 0:it.autoFont)==null||vn.call(it),F({size:null,auto:!0})},Ut=it=>{var vn,zn;B(it),sM(it),(zn=(vn=c.current)==null?void 0:vn.setDocHighlight)==null||zn.call(vn,it)},Vt=O!=null&&O.auto?U("settings.font_auto"):O!=null&&O.size?`${O.size}px`:"—",dn=G!=null?`${G} 列`:"—",Jt=it=>{v==null||v(it),ne((S==null?void 0:S())??null)},Bt=()=>{C==null||C(),ne(null)};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:117,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",role:"dialog","aria-label":U("settings.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:U("settings.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:120,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:121,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:119,columnNumber:9},this),o.jsxDEV("div",{className:"settings-body",children:[o.jsxDEV("div",{className:"settings-group",children:U("settings.group_global")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:125,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.language")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:128,columnNumber:11},this),o.jsxDEV("div",{className:"lang-drop",children:[ee&&o.jsxDEV("div",{className:"lang-drop-backdrop",onClick:()=>te(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:130,columnNumber:26},this),o.jsxDEV("button",{className:"lang-trigger",onClick:()=>te(it=>!it),children:[o.jsxDEV("span",{children:(zt=uN.find(it=>it.code===So()))==null?void 0:zt.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:132,columnNumber:15},this),o.jsxDEV("span",{className:"lang-chevron",children:ee?"▴":"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:133,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:131,columnNumber:13},this),ee&&o.jsxDEV("div",{className:"lang-menu",children:uN.map(it=>o.jsxDEV("button",{className:`lang-option${it.code===So()?" active":""}`,onClick:()=>AA(it.code),children:it.label},it.code,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:138,columnNumber:19},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:136,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:129,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:127,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.font_size")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:147,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:()=>Ct(-1),"aria-label":U("settings.font_decrease"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:149,columnNumber:13},this),o.jsxDEV("span",{className:"settings-value",children:Vt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:150,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>Ct(1),"aria-label":U("settings.font_increase"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:151,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:Lt,title:U("settings.font_auto_title"),children:U("settings.font_auto")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:152,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:148,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:146,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("label",{className:"settings-toggle",children:[o.jsxDEV("span",{className:"settings-label",children:U("settings.chat_lens")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:162,columnNumber:13},this),o.jsxDEV("span",{className:"cmd-switch",children:[o.jsxDEV("input",{type:"checkbox",checked:g,disabled:he&&!g,onChange:it=>x(it.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:164,columnNumber:15},this),o.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:167,columnNumber:15},this),o.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:168,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:163,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:161,columnNumber:11},this),he?o.jsxDEV("div",{className:"settings-hint",children:[U(h==="no-claude"?"settings.chat_lens_no_claude":"settings.chat_lens_need_hooks"),h==="absent"&&o.jsxDEV("button",{type:"button",className:"fontbtn settings-hint-btn",disabled:Ae,onClick:_e,children:U(Ae?"settings.chat_lens_installing":"settings.chat_lens_install_hooks")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:175,columnNumber:17},this),ie&&o.jsxDEV("div",{className:"settings-hint settings-hint-err",children:U("settings.chat_lens_hooks_err")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:180,columnNumber:32},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:172,columnNumber:13},this):o.jsxDEV("div",{className:"settings-hint",children:U("settings.chat_lens_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:183,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:156,columnNumber:9},this),g&&o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.chat_tone")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:190,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:["dusk","ink","light"].map(it=>o.jsxDEV("button",{className:"fontbtn","aria-pressed":a===it,onClick:()=>d(it),children:U(`settings.chat_tone_${it}`)},it,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:193,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:191,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:U("settings.chat_tone_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:203,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:189,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("label",{className:"settings-toggle",children:[o.jsxDEV("span",{className:"settings-label",children:U("settings.path_highlight")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:209,columnNumber:13},this),o.jsxDEV("span",{className:"cmd-switch",children:[o.jsxDEV("input",{type:"checkbox",checked:P,onChange:it=>Ut(it.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:211,columnNumber:15},this),o.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:212,columnNumber:15},this),o.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:213,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:210,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:208,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:U("settings.path_highlight_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:216,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:207,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.version")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:220,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("span",{className:"settings-value",children:b!=null&&b.current?`v${b.current}`:"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:222,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:R,children:[U("settings.view_changelog"),y&&o.jsxDEV("span",{className:"settings-dot","aria-label":U("settings.has_update")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:224,columnNumber:65},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:223,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:221,columnNumber:11},this),(b==null?void 0:b.updateAvailable)&&o.jsxDEV("div",{className:"settings-update",children:[o.jsxDEV("div",{className:"settings-update-title",children:U("settings.update_available",{v:b.latest})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:233,columnNumber:15},this),((an=b.whatsNew)==null?void 0:an.length)>0&&o.jsxDEV("ul",{className:"settings-update-new",children:b.whatsNew.slice(0,1).map(it=>o.jsxDEV("li",{children:[o.jsxDEV("span",{className:"settings-update-new-ver",children:["v",it.version]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:238,columnNumber:23},this),(So().startsWith("zh")?it.zh:it.en)||it.en]},it.version,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:237,columnNumber:21},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:235,columnNumber:17},this),((jn=b.whatsNew)==null?void 0:jn.length)>1&&o.jsxDEV("details",{className:"settings-update-more",children:[o.jsxDEV("summary",{children:U("settings.update_more",{n:b.whatsNew.length-1})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:246,columnNumber:19},this),o.jsxDEV("ul",{className:"settings-update-new",children:b.whatsNew.slice(1).map(it=>o.jsxDEV("li",{children:[o.jsxDEV("span",{className:"settings-update-new-ver",children:["v",it.version]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:250,columnNumber:25},this),(So().startsWith("zh")?it.zh:it.en)||it.en]},it.version,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:249,columnNumber:23},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:247,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:245,columnNumber:17},this),o.jsxDEV("div",{className:"settings-update-how",children:[U("settings.update_how")," ",o.jsxDEV("code",{children:"handmux update"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:257,columnNumber:79},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:257,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:232,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:219,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.feedback")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:267,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("a",{className:"fontbtn settings-linkbtn",href:"https://github.com/handmux/handmux/issues",target:"_blank",rel:"noreferrer",children:U("settings.feedback_issues")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:269,columnNumber:13},this),So().startsWith("zh")&&o.jsxDEV("a",{className:"fontbtn settings-linkbtn",href:"https://handmux.com/#community",target:"_blank",rel:"noreferrer",children:U("settings.feedback_group")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:271,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:268,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:U("settings.feedback_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:274,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:266,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.push_notifications")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:278,columnNumber:11},this),ql()?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:He,disabled:W,"aria-pressed":se,children:U(se?"settings.notify_on":"settings.notify_enable")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:282,columnNumber:17},this),W&&o.jsxDEV("span",{className:"spinner",role:"status","aria-label":U("settings.processing")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:285,columnNumber:32},this),!W&&K&&o.jsxDEV("span",{className:"settings-note",children:K},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:286,columnNumber:46},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:281,columnNumber:15},this),o.jsxDEV("div",{className:"settings-hint",children:U("settings.push_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:288,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:280,columnNumber:13},this):o.jsxDEV("div",{className:"settings-value",style:{display:"block"},children:U("settings.push_unsupported")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:291,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:277,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.script_push")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:296,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:be,disabled:!ql(),children:U("settings.script_push_open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:298,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn push-inbox-entry",onClick:E,children:[U("pushInbox.title"),N&&o.jsxDEV("span",{className:"push-inbox-entry-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:301,columnNumber:31},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:299,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:297,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:U("settings.script_push_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:304,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:295,columnNumber:9},this),o.jsxDEV("div",{className:"settings-group",children:U("settings.group_session")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:307,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("settings.screen_cols")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:310,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns cols-btns",children:[o.jsxDEV("button",{className:"fontbtn col-step",onClick:()=>Jt(-10),children:"−10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:312,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn col-step col-fine",onClick:()=>Jt(-1),children:"−1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:313,columnNumber:13},this),o.jsxDEV("span",{className:"settings-value",children:dn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:314,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn col-step col-fine",onClick:()=>Jt(1),children:"+1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:315,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn col-step",onClick:()=>Jt(10),children:"+10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:316,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:Bt,children:["↺ ",U("settings.cols_restore")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:317,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:311,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:309,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U(p?"settings.preview_site":"settings.preview_static_site")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:322,columnNumber:11},this),l?o.jsxDEV("div",{className:"preview-active",children:[o.jsxDEV("div",{className:"preview-active-head",children:[o.jsxDEV("span",{className:"preview-running",children:[o.jsxDEV("span",{className:"live-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:326,columnNumber:51},this),l.kind==="dynamic"?U("settings.preview_running_dynamic"):U("settings.preview_running_static")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:326,columnNumber:17},this),o.jsxDEV("span",{className:"preview-remain-s",title:U("settings.preview_remain_title"),children:U("settings.preview_remain",{time:RS(Ce)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:327,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:325,columnNumber:15},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:()=>{A==null||A(),s==null||s()},children:U("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:330,columnNumber:17},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>D==null?void 0:D(),children:U("settings.preview_renew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:331,columnNumber:17},this),We?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("button",{className:"fontbtn preview-confirm-danger",onClick:()=>{re(!1),L==null||L()},children:U("settings.preview_confirm_stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:334,columnNumber:21},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>re(!1),children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:335,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:333,columnNumber:19},this):o.jsxDEV("button",{className:"fontbtn",onClick:()=>re(!0),children:U("settings.preview_stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:338,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:329,columnNumber:15},this),o.jsxDEV("div",{className:"settings-hint",children:[U("settings.preview_name",{name:l.name}),l.kind==="dynamic"?U("settings.preview_port",{port:l.port}):l.dir?`(${l.dir})`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:341,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:324,columnNumber:13},this):o.jsxDEV("div",{className:"preview-start",children:[o.jsxDEV("div",{className:"preview-seg",role:"tablist","aria-label":U("settings.preview_type"),children:[o.jsxDEV("button",{role:"tab",className:yt==="off"?"on":"","aria-selected":yt==="off",onClick:()=>Kt("off"),children:U("settings.preview_off")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:350,columnNumber:17},this),o.jsxDEV("button",{role:"tab",className:yt==="static"?"on":"","aria-selected":yt==="static",onClick:()=>Kt("static"),children:U("settings.preview_static")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:351,columnNumber:17},this),p&&o.jsxDEV("button",{role:"tab",className:yt==="dynamic"?"on":"","aria-selected":yt==="dynamic",onClick:()=>{Ke(""),Kt("dynamic")},children:U("settings.preview_dynamic")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:353,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:349,columnNumber:15},this),yt==="off"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-hint",children:U(p?"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:358,columnNumber:19},this),!p&&o.jsxDEV("div",{className:"settings-hint preview-dynamic-disabled",children:U("settings.preview_dynamic_disabled")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:360,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:357,columnNumber:17},this),yt==="static"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-btns",children:o.jsxDEV("button",{className:"fontbtn",onClick:Me,children:U("settings.preview_pick_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:367,columnNumber:21},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:366,columnNumber:19},this),o.jsxDEV("div",{className:"settings-hint",children:U("settings.preview_static_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:369,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:365,columnNumber:17},this),yt==="dynamic"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("input",{className:"preview-port",type:"number",inputMode:"numeric",min:"1",max:"65535",placeholder:U("settings.preview_port_placeholder"),value:Se,onChange:it=>{Re(it.target.value),Ke("")},"aria-label":U("settings.preview_port_label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:375,columnNumber:21},this),o.jsxDEV("button",{className:"fontbtn",disabled:!Se||ge,onClick:Ve,children:U(ge?"settings.preview_starting":"settings.preview_start")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:377,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:374,columnNumber:19},this),$e?o.jsxDEV("div",{className:"settings-hint settings-err",children:$e},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:380,columnNumber:23},this):o.jsxDEV("div",{className:"settings-hint",children:U("settings.preview_dynamic_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:381,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:373,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:348,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:321,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:124,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:118,columnNumber:7},this),o.jsxDEV(Ju,{open:et,seedCwd:Dt,pane:m,hint:U("settings.dir_picker_hint"),onPick:it=>{st(!1),k==null||k(it),s==null||s()},onClose:()=>st(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:389,columnNumber:7},this),o.jsxDEV(G4,{open:ue,pushKey:Ue,notifyOn:se,onClose:()=>Ie(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:397,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:116,columnNumber:5},this)}function k1(r){return r===300?U("usage.win5h"):r===10080?U("usage.winWeekly"):r===43200?U("usage.winMonthly"):r>0?U("usage.winGeneric",{h:Math.round(r/60)}):""}function Tm(r,s){if(!r)return"";const c=r-Math.floor(s/1e3);if(c<=0)return U("usage.resetSoon");const v=Math.floor(c/86400),C=Math.floor(c%86400/3600),R=Math.floor(c%3600/60),y=v>0?`${v}d ${C}h`:C>0?`${C}h ${R}m`:`${R}m`;return U("usage.resetIn",{t:y})}function NC({at:r,now:s}){if(!r)return null;const c=Math.max(0,Math.floor((s-r)/1e3)),v=c<60?U("usage.updatedNow"):c<3600?U("usage.updatedMin",{n:Math.floor(c/60)}):c<86400?U("usage.updatedHr",{n:Math.floor(c/3600)}):U("usage.updatedDay",{n:Math.floor(c/86400)});return o.jsxDEV("div",{className:"usage-updated",children:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:38,columnNumber:10},this)}function Wl(r,s,c){if(!r||!s)return null;const v=r-Math.floor(c/1e3);return Math.max(0,Math.min(100,(1-v/(s*60))*100))}function Y4({pct:r,timePct:s}){const c=Math.max(0,Math.min(100,r??0)),v=c>=80?"hi":c>=50?"mid":"lo";return o.jsxDEV("div",{className:"usage-bar",children:[o.jsxDEV("div",{className:`usage-bar-fill lvl-${v}`,style:{width:`${c}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:54,columnNumber:7},this),s!=null&&o.jsxDEV("div",{className:"usage-bar-time",style:{left:`${s}%`},title:U("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 Gl({label:r,pct:s,reset:c,sub:v,timePct:C}){return o.jsxDEV("div",{className:"usage-row",children:[o.jsxDEV("div",{className:"usage-row-head",children:[o.jsxDEV("span",{className:"usage-row-label",children:[r,v&&o.jsxDEV("span",{className:"usage-row-sub",children:[" · ",v]},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),o.jsxDEV("span",{className:"usage-row-pct",children:[Math.round(s),"%"]},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),o.jsxDEV(Y4,{pct:s,timePct:C},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:67,columnNumber:7},this),c&&o.jsxDEV("div",{className:"usage-row-reset",children:c},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 K4({claude:r,now:s}){var c,v;return o.jsxDEV("section",{className:"usage-agent",children:[o.jsxDEV("div",{className:"usage-agent-head",children:[o.jsxDEV(To,{agent:"claude"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:41},this),o.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),o.jsxDEV(NC,{at:r==null?void 0:r.updatedAt,now:s},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),r?!((c=r.rateLimits)!=null&&c.fiveHour)&&!((v=r.rateLimits)!=null&&v.sevenDay)?o.jsxDEV("div",{className:"usage-empty",children:U("usage.claudePending")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:83,columnNumber:9},this):o.jsxDEV(o.Fragment,{children:[r.rateLimits.fiveHour&&o.jsxDEV(Gl,{label:U("usage.win5h"),pct:r.rateLimits.fiveHour.usedPercent,reset:Tm(r.rateLimits.fiveHour.resetsAt,s),timePct:Wl(r.rateLimits.fiveHour.resetsAt,300,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:87,columnNumber:13},this),r.rateLimits.sevenDay&&o.jsxDEV(Gl,{label:U("usage.winWeekly"),pct:r.rateLimits.sevenDay.usedPercent,reset:Tm(r.rateLimits.sevenDay.resetsAt,s),timePct:Wl(r.rateLimits.sevenDay.resetsAt,10080,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:92,columnNumber:13},this),r.rateLimits.sevenDayOpus&&o.jsxDEV(Gl,{label:U("usage.winWeekly"),sub:"Opus",pct:r.rateLimits.sevenDayOpus.usedPercent,timePct:Wl(r.rateLimits.sevenDayOpus.resetsAt,10080,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:97,columnNumber:13},this),r.rateLimits.sevenDaySonnet&&o.jsxDEV(Gl,{label:U("usage.winWeekly"),sub:"Sonnet",pct:r.rateLimits.sevenDaySonnet.usedPercent,timePct:Wl(r.rateLimits.sevenDaySonnet.resetsAt,10080,s)},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):o.jsxDEV("div",{className:"usage-empty",children:[o.jsxDEV("div",{children:U("usage.claudeOff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:79,columnNumber:11},this),o.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 X4({codex:r,now:s}){const c=r==null?void 0:r.rateLimits;return o.jsxDEV("section",{className:"usage-agent",children:[o.jsxDEV("div",{className:"usage-agent-head",children:[o.jsxDEV(To,{agent:"codex"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:41},this),o.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),o.jsxDEV(NC,{at:r==null?void 0:r.updatedAt,now:s},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),r?o.jsxDEV(o.Fragment,{children:[(c==null?void 0:c.primary)&&o.jsxDEV(Gl,{label:k1(c.primary.windowMinutes)||U("usage.winPrimary"),pct:c.primary.usedPercent,reset:Tm(c.primary.resetsAt,s),timePct:Wl(c.primary.resetsAt,c.primary.windowMinutes,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:120,columnNumber:13},this),(c==null?void 0:c.secondary)&&o.jsxDEV(Gl,{label:k1(c.secondary.windowMinutes)||U("usage.winSecondary"),pct:c.secondary.usedPercent,reset:Tm(c.secondary.resetsAt,s),timePct:Wl(c.secondary.resetsAt,c.secondary.windowMinutes,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:125,columnNumber:13},this),!(c!=null&&c.primary)&&!(c!=null&&c.secondary)&&o.jsxDEV("div",{className:"usage-empty",children:U("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):o.jsxDEV("div",{className:"usage-empty",children:U("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 J4({open:r,onClose:s,onAuthFail:c}){const[v,C]=M.useState(null),[R,y]=M.useState(""),[a,d]=M.useState(!1),g=Date.now();return M.useEffect(()=>{if(!r)return;let x=!1;return d(!0),y(""),jM().then(h=>{x||(C(h),d(!1))}).catch(h=>{x||(h instanceof Si?c==null||c():y(U("usage.loadFailed")),d(!1))}),()=>{x=!0}},[r]),r?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:161,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card usage-card",role:"dialog","aria-label":U("usage.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:U("usage.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:164,columnNumber:11},this),o.jsxDEV("span",{className:"usage-head-note",children:U("usage.activityNote")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:165,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":U("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),o.jsxDEV("div",{className:"settings-section",children:a&&!v?o.jsxDEV("div",{className:"usage-empty",children:U("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:170,columnNumber:13},this):R?o.jsxDEV("div",{className:"bind-error",children:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:172,columnNumber:13},this):v?o.jsxDEV(o.Fragment,{children:[v.codex&&o.jsxDEV(X4,{codex:v.codex,now:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:175,columnNumber:30},this),o.jsxDEV(K4,{claude:v.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 Z4({rows:r,top:s,open:c,onToggle:v,onClose:C,onSelectRow:R,onMarkAllRead:y,hooksStatus:a,onEnableHooks:d}){const g=[];for(const p of r){const S=g[g.length-1];S&&S.session===p.session?S.items.push(p):g.push({session:p.session,items:[p]})}const x=Date.now(),h=r.some(p=>p.view==="done"),_=LU(r),[N,E]=M.useState(!1),[b,l]=M.useState(!1),m=g.length===0&&a==="absent",f=async()=>{E(!0),l(!1);try{const p=await(d==null?void 0:d());(!p||p.status!=="installed")&&l(!0)}catch{l(!0)}finally{E(!1)}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("button",{className:"topbar-icon inbox-btn",onClick:v,"aria-label":U("inbox.title"),title:U("inbox.title"),children:[o.jsxDEV(dU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:36,columnNumber:9},this),s&&o.jsxDEV("span",{className:`inbox-dot ${s}`,"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),c&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"inbox-backdrop",onClick:C},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:41,columnNumber:11},this),o.jsxDEV("div",{className:"inbox-panel",role:"dialog","aria-label":U("inbox.title"),children:[o.jsxDEV("div",{className:"inbox-head",children:[o.jsxDEV("span",{children:U("inbox.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:44,columnNumber:15},this),o.jsxDEV("div",{className:"inbox-summary",children:[o.jsxDEV("span",{className:"inbox-chip working",children:[U("inbox.working")," ",_.working]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:47,columnNumber:17},this),o.jsxDEV("span",{className:"inbox-chip done",children:[U("inbox.done")," ",_.done]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:48,columnNumber:17},this),o.jsxDEV("span",{className:"inbox-chip needs",children:[U("inbox.needs")," ",_.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),h&&o.jsxDEV("button",{className:"inbox-readall",onClick:y,children:U("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?o.jsxDEV("div",{className:"inbox-empty inbox-enable",children:[o.jsxDEV("div",{className:"inbox-enable-title",children:U("inbox.enableTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:56,columnNumber:19},this),o.jsxDEV("div",{className:"inbox-enable-hint",children:U("inbox.enableHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:57,columnNumber:19},this),o.jsxDEV("button",{className:"inbox-enable-btn",onClick:f,disabled:N,children:U(N?"inbox.enabling":"inbox.enableBtn")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:58,columnNumber:19},this),b&&o.jsxDEV("div",{className:"inbox-enable-err",children:U("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):o.jsxDEV("div",{className:"inbox-empty",children:U("inbox.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:64,columnNumber:17},this):g.map(p=>o.jsxDEV("div",{className:"inbox-group",children:[o.jsxDEV("div",{className:"inbox-group-title",children:p.session},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:68,columnNumber:17},this),p.items.map(S=>o.jsxDEV("button",{className:"inbox-row",onClick:()=>R(S),children:[o.jsxDEV("div",{className:"inbox-row-head",children:[o.jsxDEV("span",{className:`inbox-chip ${S.view}`,children:RU[S.view]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:72,columnNumber:23},this),o.jsxDEV(To,{agent:S.agent},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:73,columnNumber:23},this),o.jsxDEV("span",{className:"inbox-loc",children:S.windowName||S.window},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:74,columnNumber:23},this),o.jsxDEV("span",{className:"inbox-time",children:LS(S.ts,x)},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),S.msg&&o.jsxDEV("div",{className:"inbox-msg",children:S.msg},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:77,columnNumber:31},this)]},S.pane,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:70,columnNumber:19},this))]},p.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 Q4({open:r,orphan:s,onConfirm:c,onClose:v,inset:C=0}){var p;const[R,y]=M.useState([]),[a,d]=M.useState("new"),[g,x]=M.useState(""),[h,_]=M.useState(!0),[N,E]=M.useState(!1),[b,l]=M.useState("");if(M.useEffect(()=>{r&&(d("new"),x((s==null?void 0:s.suggestedName)||""),_(iM()),E(!1),l(""),$l().then(S=>y(Array.isArray(S)?S:[])).catch(()=>y([])))},[r,s]),!r||!s)return null;const m=a==="new"?g.trim()||s.suggestedName||"":((p=R.find(S=>S.id===a))==null?void 0:p.name)||"",f=async()=>{if(N)return;E(!0),l(""),rM(h);const S=a==="new"?{mode:"new"}:{mode:"window",session:a};try{await c({target:S,kill:h,name:a==="new"?g.trim():void 0})}catch{E(!1),l(U("inbox.orphans.failed"))}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:44,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${C/2}px))`},role:"dialog","aria-label":U("inbox.orphans.takeover"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:U("inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:51,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:v,"aria-label":U("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),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:s.cwdLabel||s.cwd},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:56,columnNumber:13},this),s.snippet&&o.jsxDEV("div",{className:"inbox-msg",children:s.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),o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("inbox.orphans.targetLabel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:60,columnNumber:13},this),o.jsxDEV("div",{className:"orphan-targets",children:[o.jsxDEV("button",{className:"fontbtn","aria-pressed":a==="new",onClick:()=>d("new"),children:U("inbox.orphans.targetNew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:62,columnNumber:15},this),R.map(S=>o.jsxDEV("button",{className:"fontbtn","aria-pressed":a===S.id,onClick:()=>d(S.id),children:S.name},S.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),a==="new"&&o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("inbox.orphans.nameLabel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:74,columnNumber:15},this),o.jsxDEV("input",{className:"bind-input",value:g,placeholder:U("bind.invalidName"),onChange:S=>{x(S.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),o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("inbox.orphans.killTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:84,columnNumber:13},this),o.jsxDEV("div",{className:"orphan-targets orphan-kill",children:[o.jsxDEV("button",{className:"fontbtn","aria-pressed":h,onClick:()=>_(!0),children:[U("inbox.orphans.killEnd"),o.jsxDEV("span",{className:"orphan-reco",children:U("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),o.jsxDEV("button",{className:"fontbtn","aria-pressed":!h,onClick:()=>_(!1),children:U("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),o.jsxDEV("div",{className:"orphan-help",children:U("inbox.orphans.killWhy")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:93,columnNumber:13},this),o.jsxDEV("div",{className:"orphan-help",children:[U("inbox.orphans.reopenPre")," ",o.jsxDEV("code",{className:"orphan-cmd",children:["handmux open ",m||U("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),b&&o.jsxDEV("div",{className:"bind-error",children:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:99,columnNumber:21},this),o.jsxDEV("div",{className:"settings-btns bind-actions",children:[o.jsxDEV("button",{className:"fontbtn",onClick:v,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:101,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:f,disabled:N,children:U(N?"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 R1="tw_a2hs_dismissed",qu=()=>typeof navigator<"u"&&navigator.userAgent||"",fm=()=>/iP(hone|ad|od)/.test(qu())||/Macintosh/.test(qu())&&typeof navigator<"u"&&navigator.maxTouchPoints>1,eP=()=>/Android/.test(qu()),tP=()=>fm()&&/Safari/.test(qu())&&!/(CriOS|FxiOS|EdgiOS|OPiOS|mercury|GSA)/.test(qu());function nP(){const[r,s]=M.useState(!1),[c,v]=M.useState(null);if(M.useEffect(()=>{if(MS()||!fm()&&!eP())return;try{if(localStorage.getItem(R1)==="1")return}catch{}const g=x=>{x.preventDefault(),v(x)};return window.addEventListener("beforeinstallprompt",g),s(!0),()=>window.removeEventListener("beforeinstallprompt",g)},[]),!r)return null;const C=()=>{try{localStorage.setItem(R1,"1")}catch{}s(!1)},R=async()=>{if(c){c.prompt();try{await c.userChoice}catch{}C()}};let y,a,d=null;return c?(y="install",a=U("a2hs.lead"),d=o.jsxDEV("button",{className:"a2hs-banner-cta",onClick:R,children:U("a2hs.install")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:54,columnNumber:11},this)):fm()&&!tP()?(y="ios-other",a=U("a2hs.iosOpenSafari")):fm()?(y="ios",a=U("a2hs.iosHint")):(y="android",a=U("a2hs.androidManual")),o.jsxDEV("div",{className:"a2hs-banner",role:"status","aria-label":U("a2hs.title"),"data-mode":y,children:[o.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),o.jsxDEV("div",{className:"a2hs-banner-txt",children:[o.jsxDEV("span",{className:"a2hs-banner-title",children:U("a2hs.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:67,columnNumber:9},this),o.jsxDEV("span",{className:"a2hs-banner-sub",children:a},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),d,o.jsxDEV("button",{className:"a2hs-banner-x",onClick:C,"aria-label":U("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 L_="tw_claude_hooks";function iP(){try{return localStorage.getItem(L_)||null}catch{return null}}function rP(){const[r,s]=M.useState(iP);M.useEffect(()=>{let v=!0;return Promise.resolve().then(xS).then(C=>{if(!v)return;const R=(C==null?void 0:C.claudeHooks)||"installed";s(R);try{localStorage.setItem(L_,R)}catch{}}).catch(()=>{}),()=>{v=!1}},[]);const c=M.useCallback(async()=>{const v=await GM();if(v!=null&&v.status){s(v.status);try{localStorage.setItem(L_,v.status)}catch{}}return v},[]);return{status:r,enable:c}}function sP({value:r,options:s,onChange:c,ariaLabel:v}){const[C,R]=M.useState(!1),y=M.useRef(null),a=s.find(d=>d.value===r)||s[0];return M.useEffect(()=>{if(!C)return;const d=g=>{var x;(x=y.current)!=null&&x.contains(g.target)||R(!1)};return document.addEventListener("pointerdown",d,!0),()=>document.removeEventListener("pointerdown",d,!0)},[C]),o.jsxDEV("div",{className:"dd",ref:y,children:[o.jsxDEV("button",{type:"button",className:"field dd-trigger","aria-haspopup":"listbox","aria-expanded":C,"aria-label":v,onClick:()=>R(d=>!d),children:[o.jsxDEV("span",{className:"dd-value",children:a==null?void 0:a.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:30,columnNumber:9},this),o.jsxDEV("span",{className:`dd-caret${C?" 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),C&&o.jsxDEV("div",{className:"dd-menu",role:"listbox",children:s.map(d=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":d.value===r,className:`dd-option${d.value===r?" is-selected":""}`,onClick:()=>{c==null||c(d.value),R(!1)},children:[o.jsxDEV("span",{className:"dd-option-label",children:d.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:44,columnNumber:15},this),d.value===r&&o.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)]},d.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 SC=[{value:"",label:U("startup.preset_shell")},{value:"claude",label:U("startup.preset_claude")},{value:"claude --continue",label:U("startup.preset_claude_continue")},{value:"codex",label:U("startup.preset_codex")}],pm="__custom__",aP=[...SC,{value:pm,label:U("startup.custom")}];function CC({value:r="",onChange:s}){const c=SC.some(g=>g.value===r),[v,C]=M.useState(c?r:pm),[R,y]=M.useState(c?"":r),a=g=>{C(g),s==null||s(g===pm?R:g)},d=g=>{const x=g.target.value;y(x),s==null||s(x)};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-label",children:U("startup.label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:29,columnNumber:7},this),o.jsxDEV(sP,{value:v,options:aP,onChange:a,ariaLabel:U("startup.aria")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:30,columnNumber:7},this),v===pm&&o.jsxDEV("input",{className:"bind-input startup-custom",value:R,placeholder:U("startup.custom_placeholder"),onChange:d,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 oP=/^[A-Za-z0-9-]{1,16}$/;function lP({open:r,onClose:s,onBound:c,bound:v,onAuthFail:C,inset:R=0}){const[y,a]=M.useState([]),[d,g]=M.useState("new"),[x,h]=M.useState(null),[_,N]=M.useState(""),[E,b]=M.useState(""),[l,m]=M.useState(!1),[f,p]=M.useState(null),[S,k]=M.useState(uS()),[j,A]=M.useState(!1),D=M.useRef(null);if(M.useEffect(()=>{r&&(N(""),b(""),m(!1),p(null),A(!1),g("new"),h("new"),$l().then(P=>{const B=Array.isArray(P)?P:[];a(B),B.some(G=>!v.includes(G.name))&&(g("existing"),h(null))}).catch(P=>{P instanceof Si?C==null||C():b(U("bind.checkFailed"))}))},[r]),M.useEffect(()=>{x==="new"&&setTimeout(()=>{var P;return(P=D.current)==null?void 0:P.focus()},0)},[x]),!r)return null;const L=y.filter(P=>!v.includes(P.name)),O=async()=>{if(l||!x)return;if(x!=="new"){c(x);return}const P=_.trim();if(P){if(v.includes(P)||y.some(B=>B.name===P)){b(U("bind.alreadyExists"));return}if(!oP.test(P)){b(U("bind.invalidName"));return}m(!0),b(""),dS(S);try{await OM(P,f||void 0,S||void 0),c(P)}catch(B){B instanceof Si?C==null||C():b(U("bind.createFailed")),m(!1)}}},F=U(x==="new"?l?"bind.creating":"bind.createAndOpen":l?"bind.checking":"bind.bind");return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:79,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${R/2}px))`},role:"dialog","aria-label":U("bind.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:U("bind.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:89,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:90,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:88,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"opt",children:o.jsxDEV("div",{className:"bind-mode",role:"tablist","aria-label":U("bind.pickSession"),children:[o.jsxDEV("button",{className:"seg",role:"tab","aria-pressed":d==="new",onClick:()=>{g("new"),h("new"),b("")},children:U("bind.modeNew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:97,columnNumber:15},this),o.jsxDEV("button",{className:"seg",role:"tab","aria-pressed":d==="existing",disabled:!L.length,onClick:()=>{g("existing"),h(null),b("")},children:U("bind.modeExisting")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:103,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:96,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:93,columnNumber:11},this),d==="existing"&&o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("bind.pickSession")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:113,columnNumber:15},this),o.jsxDEV("div",{className:"orphan-targets",children:L.map(P=>o.jsxDEV("button",{className:"fontbtn","aria-pressed":x===P.name,onClick:()=>{h(P.name),b("")},children:P.name},P.id||P.name,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:116,columnNumber:19},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:114,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:112,columnNumber:13},this),d==="new"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("bind.sessionName")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:131,columnNumber:17},this),o.jsxDEV("input",{ref:D,className:"bind-input",value:_,placeholder:U("bind.invalidName"),onChange:P=>{N(P.target.value),b("")},onKeyDown:P=>{P.key==="Enter"&&O()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:132,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:130,columnNumber:15},this),o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("bind.startDir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:142,columnNumber:17},this),o.jsxDEV("button",{type:"button",className:"field cwd-field",onClick:()=>A(!0),children:[o.jsxDEV("span",{className:"cwd-path",children:f||U("bind.homeDirDefault")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:144,columnNumber:19},this),o.jsxDEV("span",{className:"cwd-action",children:U("bind.choose")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:145,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:143,columnNumber:17},this),f&&o.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>p(null),children:U("bind.reset")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:147,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:141,columnNumber:15},this),o.jsxDEV("div",{className:"opt",children:o.jsxDEV(CC,{value:S,onChange:k},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:150,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:149,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:129,columnNumber:13},this),E&&o.jsxDEV("div",{className:"bind-error",children:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:154,columnNumber:21},this),o.jsxDEV("div",{className:"settings-hint",children:U("bind.desktopHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:157,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns bind-actions",children:[o.jsxDEV("button",{className:"fontbtn",onClick:s,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:159,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:O,disabled:l||!x,children:F},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:160,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:158,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:92,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:83,columnNumber:7},this),o.jsxDEV(Ju,{open:j,seedCwd:f,allowMkdir:!0,onPick:P=>{p(P),A(!1)},onClose:()=>A(!1),inset:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:166,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:78,columnNumber:5},this)}const cP=/^[A-Za-z0-9-]{1,16}$/;function uP({open:r,onClose:s,onCreate:c,paneId:v,inset:C=0}){const[R,y]=M.useState(""),[a,d]=M.useState(""),[g,x]=M.useState(!1),[h,_]=M.useState(null),[N,E]=M.useState(""),[b,l]=M.useState(uS()),[m,f]=M.useState(!1),p=M.useRef(null);if(M.useEffect(()=>{r&&(y(""),d(""),x(!1),_(null),E(""),f(!1),setTimeout(()=>{var k;return(k=p.current)==null?void 0:k.focus()},0),v&&Ro(v).then(({cwd:k})=>E(k||"")).catch(()=>{}))},[r,v]),!r)return null;const S=async()=>{if(g)return;const k=R.trim();if(k&&!cP.test(k)){d(U("newwindow.name_rule"));return}x(!0),d(""),dS(b);try{await c(k,h||void 0,b||void 0)}catch{x(!1)}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:49,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${C/2}px))`},role:"dialog","aria-label":U("newwindow.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:U("newwindow.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:56,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":U("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),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("newwindow.window_name")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:61,columnNumber:13},this),o.jsxDEV("input",{ref:p,className:"bind-input",value:R,placeholder:U("newwindow.name_placeholder"),onChange:k=>{y(k.target.value),d("")},onKeyDown:k=>{k.key==="Enter"&&S()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:62,columnNumber:13},this),a&&o.jsxDEV("div",{className:"bind-error",children:a},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),o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:U("newwindow.start_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:73,columnNumber:13},this),o.jsxDEV("button",{type:"button",className:"field cwd-field",onClick:()=>f(!0),children:[o.jsxDEV("span",{className:"cwd-path",children:h||(N?U("newwindow.session_dir_named",{dir:N}):U("newwindow.session_dir_default"))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:75,columnNumber:15},this),o.jsxDEV("span",{className:"cwd-action",children:U("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),h&&o.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>_(null),children:U("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),o.jsxDEV("div",{className:"opt",children:o.jsxDEV(CC,{value:b,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),o.jsxDEV("div",{className:"settings-btns bind-actions",children:[o.jsxDEV("button",{className:"fontbtn",onClick:s,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:84,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:S,disabled:g,children:U(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),o.jsxDEV(Ju,{open:m,seedCwd:h||N||null,pane:v,allowMkdir:!0,onPick:k=>{_(k),f(!1)},onClose:()=>f(!1),inset:C},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 dP=/^[A-Za-z0-9-]{1,16}$/;function hP({open:r,title:s,currentName:c="",onClose:v,onSubmit:C,inset:R=0}){const[y,a]=M.useState(c),[d,g]=M.useState(""),[x,h]=M.useState(!1),_=M.useRef(null);if(M.useEffect(()=>{r&&(a(c),g(""),h(!1),setTimeout(()=>{var E;return(E=_.current)==null?void 0:E.focus()},0))},[r,c]),!r)return null;const N=async()=>{if(x)return;const E=y.trim();if(!dP.test(E)){g(U("rename.name_rule"));return}h(!0),g("");try{await C(E)}catch(b){g((b==null?void 0:b.message)||U("rename.failed")),h(!1)}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:36,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${R/2}px))`},role:"dialog","aria-label":s,"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:43,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:v,"aria-label":U("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),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:U("rename.new_name")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:47,columnNumber:11},this),o.jsxDEV("input",{ref:_,className:"bind-input",value:y,placeholder:U("rename.name_rule"),onChange:E=>{a(E.target.value),g("")},onKeyDown:E=>{E.key==="Enter"&&N()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:48,columnNumber:11},this),d&&o.jsxDEV("div",{className:"bind-error",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:56,columnNumber:21},this),o.jsxDEV("div",{className:"settings-btns bind-actions",children:[o.jsxDEV("button",{className:"fontbtn",onClick:v,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:58,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:N,disabled:x,children:U(x?"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 mP({onOpenDoc:r,refreshKey:s=0}){const[c,v]=M.useState(()=>Pu()),C=y=>{cM(y),v(Pu())},R=M.useRef(!0);return M.useEffect(()=>{if(R.current){R.current=!1;return}v(Pu())},[s]),c.length===0?o.jsxDEV("div",{className:"home-view",children:o.jsxDEV("div",{className:"home-empty",children:[U("home.empty"),o.jsxDEV("span",{children:U("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):o.jsxDEV("div",{className:"home-view",children:c.map(y=>o.jsxDEV("div",{className:"home-recent-row",children:[o.jsxDEV("button",{className:"home-recent",onClick:()=>r(y.path),title:y.path,children:[o.jsxDEV("span",{className:"home-name",children:y.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:32,columnNumber:13},this),o.jsxDEV("span",{className:"home-path",children:y.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),o.jsxDEV("button",{className:"home-x","aria-label":U("home.remove"),onClick:()=>C(y.path),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:35,columnNumber:11},this)]},y.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)}const fP=/[^\n]*?(?:[。!?…]+|[.!?]+(?=\s|$)|\n+|$)/gu,pP=/[。!?…]$|[.!?]$/;function vP(r,s){for(let c=r.parentNode;c&&c!==s;c=c.parentNode){const v=c.nodeName;if(v==="PRE"||v==="SCRIPT"||v==="STYLE"||v==="CODE")return!0}return!1}function gP(r){if(!r)return[];if(r.querySelector("span.tts-sent"))return _P(r);const s=document.createTreeWalker(r,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.nodeValue&&a.nodeValue.trim()&&!vP(a,r)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),c=[];for(;s.nextNode();)c.push(s.currentNode);const v=[],C=[];let R=0;for(const a of c){const d=a.ownerDocument.createDocumentFragment();for(const g of a.nodeValue.matchAll(fP)){const x=g[0];if(x==="")continue;const h=a.ownerDocument.createElement("span");h.className="tts-sent",h.textContent=x,d.appendChild(h),(C[R]||(C[R]=[])).push(h),v[R]=(v[R]||"")+x,pP.test(x)&&R++}a.parentNode.replaceChild(d,a)}const y=[];return v.forEach((a,d)=>{const g=(a||"").replace(/\s+/g," ").trim();if(!g)return;const x=y.length;y.push(g);for(const h of C[d]||[])h.dataset.tts=String(x)}),y}function _P(r){const s=[];return r.querySelectorAll("span.tts-sent[data-tts]").forEach(c=>{const v=Number(c.dataset.tts);s[v]=(s[v]||"")+c.textContent}),s.map(c=>(c||"").replace(/\s+/g," ").trim())}const EC="tw_doc_rate",vm=[1,1.25,1.5],T1=()=>{const r=Number(localStorage.getItem(EC));return vm.includes(r)?r:1};function bP(){const r=typeof window<"u"&&window.speechSynthesis||null,[s,c]=M.useState({playing:!1,paused:!1,idx:-1}),[v,C]=M.useState(T1),R=M.useRef({sentences:[],idx:-1,playing:!1,rate:T1()});R.current.rate=v;const y=()=>((r==null?void 0:r.getVoices())||[]).find(N=>/^zh/i.test(N.lang))||null,a=N=>{const E=R.current;if(!r)return;if(N<0||N>=E.sentences.length){d();return}E.idx=N,c({playing:!0,paused:!1,idx:N});const b=new SpeechSynthesisUtterance(E.sentences[N]);b.rate=E.rate;const l=y();l?(b.voice=l,b.lang=l.lang):b.lang="zh-CN";const m=()=>{E.playing&&E.idx===N&&a(N+1)};b.onend=m,b.onerror=m,r.speak(b)},d=()=>{const N=R.current;N.playing=!1,N.idx=-1,r&&r.cancel(),c({playing:!1,paused:!1,idx:-1})},g=N=>{if(!r||!N||!N.length)return;r.cancel();const E=R.current;if(E.sentences=N,E.playing=!0,E.idx=-1,c({playing:!0,paused:!1,idx:-1}),r.getVoices().length){a(0);return}const b=()=>{r.removeEventListener("voiceschanged",b),E.playing&&E.idx===-1&&a(0)};r.addEventListener("voiceschanged",b),setTimeout(b,300)},x=()=>{r&&R.current.playing&&(r.pause(),c(N=>({...N,paused:!0})))},h=()=>{r&&R.current.playing&&(r.resume(),c(N=>({...N,paused:!1})))},_=()=>{const N=vm[(vm.indexOf(v)+1)%vm.length]||1;localStorage.setItem(EC,String(N)),R.current.rate=N,C(N);const E=R.current;r&&E.playing&&E.idx>=0&&(r.cancel(),a(E.idx))};return M.useEffect(()=>()=>{R.current.playing=!1,r&&r.cancel()},[r]),{supported:!!r,playing:s.playing,paused:s.paused,idx:s.idx,rate:v,play:g,pause:x,resume:h,stop:d,cycleRate:_}}const L1=6,yP=500,A1=10,xP=300,M1=(r,s)=>Math.hypot(r.x-s.x,r.y-s.y);function wP({url:r,name:s}){const[c,v]=M.useState({s:1,x:0,y:0}),[C,R]=M.useState(""),[y,a]=M.useState(!1),d=M.useRef(c);d.current=c;const g=M.useRef(null),x=M.useRef(null),h=M.useRef(null),_=M.useRef(new Map),N=M.useRef(null),E=M.useRef(null),b=M.useRef(null),l=M.useRef({moved:!1,lpFired:!1,pinched:!1}),m=M.useRef(0);if(!r)return o.jsxDEV("div",{className:"doc-image-msg",children:U("imageviewer.loadFailed")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:39,columnNumber:20},this);const f=(P,B,G)=>{const ne=x.current,ee=h.current;if(!ne||!ee)return{x:B,y:G};const te=Math.max(0,(ee.offsetWidth*P-ne.clientWidth)/2),se=Math.max(0,(ee.offsetHeight*P-ne.clientHeight)/2);return{x:Math.min(te,Math.max(-te,B)),y:Math.min(se,Math.max(-se,G))}},p=(P,B,G)=>{if(P=Math.min(L1,Math.max(1,P)),P<=1){v({s:1,x:0,y:0});return}const ne=f(P,B,G);v({s:P,x:ne.x,y:ne.y})},S=P=>p(d.current.s*P,d.current.x,d.current.y),k=()=>{b.current&&(clearTimeout(b.current),b.current=null)},j=P=>{R(P),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>R(""),2500)},A=()=>{a(!1);const P=document.createElement("a");P.href=r,P.download=s||"image",document.body.appendChild(P),P.click(),P.remove(),j(U("imageviewer.saved"))},D=async()=>{var P;a(!1);try{const B=await(await fetch(r)).blob(),G=new File([B],s||"image",{type:Um(s)||B.type||"application/octet-stream"});if((P=navigator.canShare)!=null&&P.call(navigator,{files:[G]})){await navigator.share({files:[G]});return}}catch{return}j(U("imageviewer.shareUnsupported"))},L=P=>{var G,ne;(ne=(G=P.currentTarget).setPointerCapture)==null||ne.call(G,P.pointerId),_.current.set(P.pointerId,{x:P.clientX,y:P.clientY});const B=_.current.size;if(B===2){k(),l.current.pinched=!0;const[ee,te]=[..._.current.values()];N.current={dist:M1(ee,te)||1,s:d.current.s}}else B===1&&(l.current.moved=!1,l.current.lpFired=!1,l.current.pinched=!1,E.current={x:P.clientX,y:P.clientY},k(),b.current=setTimeout(()=>{b.current=null,_.current.size===1&&!l.current.moved&&(l.current.lpFired=!0,a(!0))},yP))},O=P=>{if(_.current.has(P.pointerId)){if(_.current.set(P.pointerId,{x:P.clientX,y:P.clientY}),_.current.size>=2&&N.current){const[B,G]=[..._.current.values()];p(N.current.s*(M1(B,G)/N.current.dist),d.current.x,d.current.y);return}if(E.current){const B=P.clientX-E.current.x,G=P.clientY-E.current.y;(Math.abs(B)>A1||Math.abs(G)>A1)&&(l.current.moved=!0,k()),d.current.s>1&&(E.current={x:P.clientX,y:P.clientY},p(d.current.s,d.current.x+B,d.current.y+G))}}},F=P=>{if(k(),_.current.delete(P.pointerId),_.current.size===1){N.current=null;const[B]=[..._.current.values()];E.current={x:B.x,y:B.y}}else if(_.current.size===0){if(!l.current.moved&&!l.current.lpFired&&!l.current.pinched){const G=P.timeStamp||0;G-m.current<xP?(m.current=0,d.current.s>1?p(1,0,0):p(2,0,0)):m.current=G}N.current=null,E.current=null,l.current={moved:!1,lpFired:!1,pinched:!1}}};return o.jsxDEV("div",{ref:x,className:"doc-image-wrap",onPointerDown:L,onPointerMove:O,onPointerUp:F,onPointerCancel:F,onContextMenu:P=>P.preventDefault(),children:[o.jsxDEV("img",{ref:h,className:"doc-image",src:r,alt:s,draggable:!1,style:{transform:`translate(${c.x}px, ${c.y}px) scale(${c.s})`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:159,columnNumber:7},this),o.jsxDEV("div",{className:"doc-image-zoom",onPointerDown:P=>P.stopPropagation(),children:[o.jsxDEV("button",{onClick:()=>S(1/1.5),disabled:c.s<=1,"aria-label":U("imageviewer.zoomOut"),children:"−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:168,columnNumber:9},this),o.jsxDEV("span",{className:"doc-image-zoom-val","aria-hidden":"true",children:[Math.round(c.s*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:169,columnNumber:9},this),o.jsxDEV("button",{onClick:()=>S(1.5),disabled:c.s>=L1,"aria-label":U("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),C&&o.jsxDEV("div",{className:"doc-image-note",role:"status",children:C},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:172,columnNumber:16},this),o.jsxDEV(Rm,{open:y,title:s||U("imageviewer.imageTitle"),actions:[{key:"save",label:U("imageviewer.saveImage"),onClick:A},{key:"share",label:U("imageviewer.shareImage"),onClick:D}],onClose:()=>a(!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 Qg=da.length-1;function NP({type:r,name:s,content:c}){const[v,C]=M.useState(()=>hM()),R=M.useRef(null),y=bP();Im(y.playing&&!y.paused);const a=M.useMemo(()=>r==="markdown"?gC.sanitize(An.parse(c||"")):"",[r,c]);if(M.useEffect(()=>{y.stop()},[a]),M.useEffect(()=>{var N;const h=R.current;if(!h||(h.querySelectorAll(".tts-active").forEach(E=>E.classList.remove("tts-active")),y.idx<0))return;const _=h.querySelectorAll(`.tts-sent[data-tts="${y.idx}"]`);_.forEach(E=>E.classList.add("tts-active")),(N=_[0])==null||N.scrollIntoView({block:"center",behavior:"smooth"})},[y.idx]),r==="image")return o.jsxDEV(wP,{url:c,name:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:50,columnNumber:12},this);if(r==="html")return o.jsxDEV("iframe",{className:"doc-iframe",sandbox:"allow-scripts",srcDoc:c||"",title:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:54,columnNumber:12},this);const d=h=>{const _=Math.min(Qg,Math.max(0,v+h));C(_),mM(_)};if(r==="text")return o.jsxDEV("div",{className:"doc-md-wrap",children:[o.jsxDEV("div",{className:"doc-zoom",children:o.jsxDEV("div",{className:"doc-fonts",children:[o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>d(-1),disabled:v<=0,"aria-label":U("doc.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:65,columnNumber:13},this),o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>d(1),disabled:v>=Qg,"aria-label":U("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),o.jsxDEV("pre",{className:"doc-text",style:{fontSize:`${da[v]}px`},children:c||""},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(y.playing){y.paused?y.resume():y.pause();return}const h=gP(R.current);h.length&&y.play(h)},x=y.playing&&!y.paused;return o.jsxDEV("div",{className:"doc-md-wrap",children:[o.jsxDEV("div",{className:"doc-zoom",children:[y.supported&&o.jsxDEV("div",{className:"doc-tts",children:[o.jsxDEV("button",{className:"doc-zoom-btn doc-zoom-icon",onClick:g,"aria-label":x?U("doc.pauseRead"):y.paused?U("doc.resumeRead"):U("doc.read"),children:x?o.jsxDEV(fU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:88,columnNumber:26},this):o.jsxDEV(mU,{},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),o.jsxDEV("button",{className:"doc-zoom-btn doc-zoom-icon",onClick:y.stop,disabled:!y.playing,"aria-label":U("doc.stopRead"),children:o.jsxDEV(jS,{},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),o.jsxDEV("button",{className:"doc-zoom-btn",onClick:y.cycleRate,"aria-label":U("doc.rate"),children:[y.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),o.jsxDEV("div",{className:"doc-fonts",children:[o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>d(-1),disabled:v<=0,"aria-label":U("doc.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:97,columnNumber:11},this),o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>d(1),disabled:v>=Qg,"aria-label":U("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),o.jsxDEV("div",{ref:R,className:"doc-md",style:{fontSize:`${da[v]}px`},dangerouslySetInnerHTML:{__html:a}},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 SP({open:r,pane:s,windowId:c,tabs:v,active:C,onActivate:R,onCloseTab:y,onMinimize:a,onOpenDoc:d,pendingShare:g,onPendingConsumed:x}){const h=v.find(ee=>ee.key===C)||v[0],[_,N]=M.useState("recent"),[E,b]=M.useState(null),[l,m]=M.useState(0),f=h.type==="home",p=M.useRef(null),S=M.useRef(E);S.current=E;const k=M.useRef(C);k.current=C;const j=M.useRef(c);j.current=c;const A=M.useRef(a);A.current=a;const D=M.useRef(R);D.current=R;const L=M.useRef(C),O=M.useRef(0),F=M.useRef([]),P=()=>{window.history.pushState({fileOverlay:!0},""),O.current+=1},B=ee=>{r&&ee!==S.current&&(F.current.push({type:"nav",prev:S.current}),P()),b(ee),gN(c,ee)},G=M.useRef(r);M.useEffect(()=>{const ee=L.current;L.current=C;const te=G.current;G.current=r,r&&te&&ee==="home"&&C!=="home"&&(F.current.push({type:"doc"}),P())},[C,r]),M.useEffect(()=>{if(!r)return;F.current=[],O.current=0,P();const ee=()=>{var se,I;O.current=Math.max(0,O.current-1);const te=F.current.pop();if((te==null?void 0:te.type)==="doc"){(se=D.current)==null||se.call(D,"home");return}if((te==null?void 0:te.type)==="nav"){b(te.prev),te.prev&&gN(j.current,te.prev);return}(I=A.current)==null||I.call(A)};return window.addEventListener("popstate",ee),()=>{window.removeEventListener("popstate",ee),O.current>0&&(window.history.go(-O.current),O.current=0)}},[r]);const ne=async()=>{try{const{cwd:ee}=await Ro(s);ee&&b(ee)}catch{}};return M.useEffect(()=>{g&&N("browse")},[g]),M.useEffect(()=>{r&&m(ee=>ee+1)},[r]),M.useEffect(()=>{if(!r){p.current=null;return}if(p.current===c)return;p.current=c,F.current=[],N("browse");let ee=!1;return(async()=>{const te=$A(c);let se=null;if(te)try{await yS(te),se=te}catch{}if(!se&&s)try{const{cwd:I}=await Ro(s);se=I}catch{}!ee&&se&&b(se)})(),()=>{ee=!0}},[r,c,s]),Yl.createPortal(o.jsxDEV("div",{className:`file-sheet ${r?"open":""}`,"aria-hidden":!r,children:[o.jsxDEV("div",{className:"file-tabs",children:[o.jsxDEV("div",{className:"file-tabs-scroll",children:v.map(ee=>o.jsxDEV("div",{className:`file-tab ${ee.key===C?"active":""}`,children:[o.jsxDEV("button",{className:"file-tab-label",onClick:()=>R(ee.key),children:ee.key==="home"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV(zu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:146,columnNumber:39},this),U("filemanager.files")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:146,columnNumber:37},this):ee.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:145,columnNumber:15},this),ee.key!=="home"&&o.jsxDEV("button",{className:"file-tab-x","aria-label":U("filemanager.closeTab"),onClick:()=>y(ee.key),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:149,columnNumber:17},this)]},ee.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),o.jsxDEV("button",{className:"file-min","aria-label":U("filemanager.minimize"),title:U("filemanager.minimize"),onClick:a,children:o.jsxDEV(ha,{},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),o.jsxDEV("div",{className:"file-body",children:f?o.jsxDEV("div",{className:"home-pane",children:[o.jsxDEV("div",{className:"file-seg",role:"tablist",children:[o.jsxDEV("button",{className:`file-seg-btn ${_==="recent"?"on":""}`,role:"tab","aria-selected":_==="recent",onClick:()=>N("recent"),children:[o.jsxDEV(SS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:162,columnNumber:17},this),U("filemanager.recent")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:160,columnNumber:15},this),o.jsxDEV("button",{className:`file-seg-btn ${_==="browse"?"on":""}`,role:"tab","aria-selected":_==="browse",onClick:()=>N("browse"),children:[o.jsxDEV(zu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:166,columnNumber:17},this),U("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),_==="recent"?o.jsxDEV(mP,{onOpenDoc:d,refreshKey:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:170,columnNumber:17},this):o.jsxDEV(wC,{path:E,onNavigate:B,onOpenDoc:d,onJumpToCwd:s?ne:null,refreshKey:l,pendingFile:g,onPendingConsumed:x},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):o.jsxDEV(NP,{type:h.type,name:h.name,content:h.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 CP(r){if(!r)return[];const s=[];let c=null,v=null;for(const C of r.split(`
|
|
330
|
+
`)){if(C.startsWith("diff --git")){const y=C.match(/ b\/(.*)$/);c={path:y?y[1]:C.slice(11),hunks:[]},s.push(c),v=null;continue}if(!c)continue;if(C.startsWith("@@")){v={header:C,lines:[]},c.hunks.push(v);continue}if(!v)continue;const R=C[0];R==="+"?v.lines.push({type:"add",text:C.slice(1)}):R==="-"?v.lines.push({type:"del",text:C.slice(1)}):R===" "&&v.lines.push({type:"ctx",text:C.slice(1)})}return s}const EP=r=>String(r||"").replace(/\/+$/,"").split("/").pop()||r;function Lm(r,s){const c=(r&&r!==" "?r:s)||"?";return c==="?"?"?":c}function jP({open:r,pane:s,windowId:c,inset:v=0,onClose:C}){const R=M.useRef(!0);M.useEffect(()=>()=>{R.current=!1},[]);const[y,a]=M.useState([]),[d,g]=M.useState(null),[x,h]=M.useState([]),_=x.length?x[x.length-1]:null,[N,E]=M.useState(!1),[b,l]=M.useState(null),m=M.useRef(c);M.useEffect(()=>{m.current=c},[c]);const[f,p]=M.useState(null),[S,k]=M.useState(null),[j,A]=M.useState(null),[D,L]=M.useState(null),[O,F]=M.useState(20),[P,B]=M.useState(!1),[G,ne]=M.useState({changes:!0,commits:!0}),[ee,te]=M.useState(!1),se=M.useRef(null),[I,W]=M.useState(null),[X,K]=M.useState(null),[ve,he]=M.useState(null),Ae=M.useRef(x);Ae.current=x;const me=M.useRef(N);me.current=N;const ie=M.useRef(C);ie.current=C;const $=M.useRef(0),_e=()=>{window.history.pushState({gitOverlay:!0},""),$.current+=1},ue=Ce=>{_e(),h(Ve=>[...Ve,Ce])},Ie=()=>{_e(),E(!0)};M.useEffect(()=>{if(!r)return;_e();const Ce=()=>{var Ve;if($.current=Math.max(0,$.current-1),me.current){E(!1);return}if(Ae.current.length){h(be=>be.slice(0,-1));return}(Ve=ie.current)==null||Ve.call(ie)};return window.addEventListener("popstate",Ce),()=>{window.removeEventListener("popstate",Ce),$.current>0&&(window.history.go(-$.current),$.current=0)}},[r]),M.useEffect(()=>{if(!r)return;let Ce=!1;h([]),L(null),K(null),he(null);const Ve=F_(c);return Ve.length?(a(Ve),g(be=>be&&Ve.includes(be)?be:Ve[0]),()=>{Ce=!0}):(a([]),g(null),(async()=>{try{if(!s)return;const{cwd:be}=await Ro(s);if(!be)return;const{repos:Me=[]}=await EN(be);if(Ce||!Me.length)return;const He=xN(c,Me.map(Ct=>Ct.path));if(Ce)return;a(He),g(He[0]??null)}catch(be){if(Ce)return;(be==null?void 0:be.message)==="outside home"?he(U("git.outsideRoots")):K(U("git.errReadRepo"))}})(),()=>{Ce=!0})},[r,s,c]),M.useEffect(()=>{if(!r||!s)return;let Ce=!1;return Ro(s).then(({cwd:Ve})=>{!Ce&&Ve&&l(Ve)}).catch(()=>{}),()=>{Ce=!0}},[r,s]),M.useEffect(()=>{if(!r||!d){p(null),k(null);return}let Ce=!1;return p(null),k(null),A(null),L(null),F(20),K(null),he(null),(async()=>{try{const[Ve,be]=await Promise.all([KM(d),JM(d)]);if(Ce)return;p(Ve.changes??[]),k(be.branches??[])}catch{Ce||K(U("git.errLoad"))}})(),()=>{Ce=!0}},[r,d]),M.useEffect(()=>{if(!r||!d){A(null);return}let Ce=!1;return(async()=>{try{const{commits:Ve=[]}=await XM(d,{ref:D||void 0,limit:O});Ce||A(Ve)}catch{Ce||A([])}finally{Ce||B(!1)}})(),()=>{Ce=!0}},[r,d,D,O]);const Ue=!d||!_?"":_.kind==="diff"?`${d}|diff|${_.path}|${_.commit||""}|${_.staged?1:0}`:`${d}|commit|${_.hash}`;M.useEffect(()=>{if(!r||!d||!_){W(null);return}let Ce=!1;return K(null),W(null),(async()=>{try{let Ve;if(_.kind==="diff"){const{diff:be,truncated:Me}=await ZM(d,{path:_.path,commit:_.commit,staged:_.staged});Ve={files:CP(be),truncated:Me}}else Ve=await QM(d,_.hash);Ce||W({key:Ue,payload:Ve})}catch{Ce||K(U("git.errLoad"))}})(),()=>{Ce=!0}},[r,Ue]);const nt=M.useCallback(()=>{window.history.back()},[]),et=Ce=>{g(Ce),h([]),L(null)},st=async Ce=>{window.history.back(),he(null);try{const{repos:Ve=[]}=await EN(Ce);if(!R.current)return;if(!Ve.length){he(U("git.noRepoInDir"));return}const be=Ve.map(Lt=>Lt.path),Me=m.current,He=Me?xN(Me,be):be;a(Lt=>{const Ut=[...Lt];for(const Vt of He)Ut.includes(Vt)||Ut.push(Vt);return Ut});const Ct=be.find(Lt=>!y.includes(Lt))||be[0];et(Ct)}catch(Ve){if(!R.current)return;(Ve==null?void 0:Ve.message)==="outside home"?he(U("git.outsideRoots")):K(U("git.errReadDir"))}},Dt=Ce=>{const Ve=wM(c,Ce);a(Ve),d===Ce&&(g(Ve[0]??null),h([]),L(null))},J=(S||[]).find(Ce=>Ce.current)||null,yt=Ce=>{const Ve=Ce===(J==null?void 0:J.name)?null:Ce;Ve!==D&&(L(Ve),A(null),F(20))},Kt=Ce=>ne(Ve=>({...Ve,[Ce]:!Ve[Ce]})),Se=j!=null&&j.length>=O,Re=Ce=>{if(!Se||P)return;const Ve=Ce.currentTarget;Ve.scrollHeight-Ve.scrollTop-Ve.clientHeight<80&&(B(!0),F(be=>be+20))},We=D||(J==null?void 0:J.name)||null,re=!!D&&D!==(J==null?void 0:J.name),$e=D?(S||[]).find(Ce=>Ce.name===D):J,Ke=I&&I.key===Ue?I.payload:null,ge=!!_,Ze=(_==null?void 0:_.kind)==="commit"?U("git.commitDetail"):(_==null?void 0:_.kind)==="diff"?_.path||U("git.diff"):"";return Yl.createPortal(o.jsxDEV("div",{className:`file-sheet git-sheet ${r?"open":""}`,"aria-hidden":!r,style:{"--kb-inset":`${v}px`},children:[o.jsxDEV("div",{className:"file-tabs git-head",children:[ge?o.jsxDEV("div",{className:"git-drill-head",children:[o.jsxDEV("button",{className:"git-back","aria-label":U("common.back"),title:U("common.back"),onClick:nt,children:"‹"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:291,columnNumber:13},this),o.jsxDEV("span",{className:"git-drill-title",children:[o.jsxDEV(DS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:47},this),o.jsxDEV("span",{className:"git-title-text",children:Ze},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):o.jsxDEV("div",{className:"git-tabs-scroll",children:[o.jsxDEV("button",{className:"git-tab-add","aria-label":U("git.bindRepo"),title:U("git.bindRepo"),onClick:Ie,children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:296,columnNumber:13},this),y.map(Ce=>o.jsxDEV("div",{className:`git-tab ${Ce===d?"active":""}`,children:[o.jsxDEV("button",{className:"git-tab-label",onClick:()=>et(Ce),children:EP(Ce)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:299,columnNumber:17},this),o.jsxDEV("button",{className:"git-tab-x","aria-label":U("common.close"),title:U("common.close"),onClick:()=>Dt(Ce),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:300,columnNumber:17},this)]},Ce,!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),o.jsxDEV("button",{className:"file-min","aria-label":U("git.collapse"),title:U("git.collapse"),onClick:()=>C==null?void 0:C(),children:o.jsxDEV(ha,{},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),!ge&&d&&o.jsxDEV("div",{className:"git-branch-bar",children:[o.jsxDEV("span",{className:"git-branch-bar-name",children:[o.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)," ",We||"—",!re&&We&&o.jsxDEV("span",{className:"git-branch-cur-tag",children:U("git.currentBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:317,columnNumber:46},this),$e&&($e.ahead||$e.behind)?o.jsxDEV("span",{className:"git-branch-bar-track",children:[$e.ahead?o.jsxDEV("span",{className:"git-ahead",children:["↑",$e.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:320,columnNumber:42},this):null,$e.behind?o.jsxDEV("span",{className:"git-behind",children:["↓",$e.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),o.jsxDEV("div",{className:"git-branch-dd",children:[o.jsxDEV("button",{className:`git-branch-trigger ${re?"other":""}`,onClick:()=>te(Ce=>!Ce),"aria-haspopup":"listbox","aria-expanded":ee,title:U("git.switchViewedBranch"),children:[o.jsxDEV("span",{className:"git-branch-trigger-name",children:U("git.switchBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:328,columnNumber:15},this),o.jsxDEV("span",{className:"git-branch-caret",children:o.jsxDEV(ha,{},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),ee&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"git-dd-backdrop",onClick:()=>te(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:333,columnNumber:17},this),o.jsxDEV("div",{className:"git-dd-menu",role:"listbox",children:[(S||[]).length===0&&o.jsxDEV("div",{className:"git-empty",children:U("git.noBranches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:335,columnNumber:53},this),(S||[]).map(Ce=>{const Ve=D?Ce.name===D:Ce.current;return o.jsxDEV("button",{role:"option","aria-selected":Ve,className:`git-dd-item ${Ce.current?"current":""} ${Ve?"viewing":""}`,onClick:()=>{yt(Ce.name),te(!1)},children:[o.jsxDEV("span",{className:"git-branch-dot",children:Ce.current?"●":""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:342,columnNumber:25},this),o.jsxDEV("span",{className:"git-row-path",children:Ce.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:343,columnNumber:25},this),Ce.upstream&&o.jsxDEV("span",{className:"git-branch-up",children:[Ce.upstream,Ce.ahead?o.jsxDEV("span",{className:"git-ahead",children:[" ↑",Ce.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:346,columnNumber:40},this):null,Ce.behind?o.jsxDEV("span",{className:"git-behind",children:[" ↓",Ce.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)]},Ce.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),o.jsxDEV("div",{className:"git-body",children:[X&&o.jsxDEV("div",{className:"git-error",children:X},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:361,columnNumber:19},this),ve&&!X&&!ge&&o.jsxDEV("div",{className:"git-notice",children:ve},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:362,columnNumber:44},this),!d&&!X&&!ve&&o.jsxDEV("div",{className:"git-empty",children:U("git.noRepoBound")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:364,columnNumber:11},this),ge&&d&&!X&&o.jsxDEV("div",{className:"git-scroll",children:Ke?_.kind==="diff"?o.jsxDEV(TP,{data:Ke},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:370,columnNumber:41},this):o.jsxDEV(RP,{data:Ke,onOpenFile:Ce=>ue({kind:"diff",path:Ce,commit:_.hash})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:371,columnNumber:17},this):o.jsxDEV("div",{className:"git-loading",children:U("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),!ge&&d&&!X&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV(U1,{variant:"top",title:U("git.changes"),count:f==null?void 0:f.length,expanded:G.changes,onToggle:()=>Kt("changes"),children:f==null?o.jsxDEV("div",{className:"git-loading",children:U("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:380,columnNumber:34},this):o.jsxDEV(DP,{data:{changes:f},onOpenFile:(Ce,Ve)=>ue({kind:"diff",path:Ce,staged:Ve})},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),o.jsxDEV(U1,{variant:"mid",title:U("git.commits"),subtitle:re?We:null,expanded:G.commits,onToggle:()=>Kt("commits"),bodyRef:se,onScroll:Re,children:j==null?o.jsxDEV("div",{className:"git-loading",children:U("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:385,columnNumber:34},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV(kP,{data:{commits:j},onOpen:Ce=>ue({kind:"commit",hash:Ce})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:388,columnNumber:21},this),Se&&o.jsxDEV("div",{className:"git-more",children:U(P?"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),o.jsxDEV(Ju,{open:N,seedCwd:b,pane:s,inset:v,hint:U("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 U1({variant:r,title:s,subtitle:c,count:v,expanded:C,onToggle:R,onScroll:y,bodyRef:a,children:d}){return o.jsxDEV("div",{className:`git-section git-section--${r} ${C?"open":""}`,children:[o.jsxDEV("button",{className:"git-section-head",onClick:R,"aria-expanded":C,children:[o.jsxDEV("span",{className:"git-section-caret",children:o.jsxDEV(ha,{},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),o.jsxDEV("span",{className:"git-section-title",children:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:419,columnNumber:9},this),c&&o.jsxDEV("span",{className:"git-section-sub",children:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:420,columnNumber:22},this),v!=null&&o.jsxDEV("span",{className:"git-section-count",children:v},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),C&&o.jsxDEV("div",{className:"git-section-body",ref:a,onScroll:y,children:d},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 DP({data:r,onOpenFile:s}){const c=(r==null?void 0:r.changes)??[];return c.length?o.jsxDEV("div",{className:"git-list",children:c.map((v,C)=>{const R=!!(v.x&&v.x!==" "&&v.x!=="?");return o.jsxDEV("button",{className:"git-row",onClick:()=>s(v.path,R),children:[o.jsxDEV("span",{className:`git-badge git-badge-${Lm(v.x,v.y).toLowerCase().replace("?","q")}`,children:Lm(v.x,v.y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:437,columnNumber:13},this),o.jsxDEV("span",{className:"git-row-path",children:v.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:438,columnNumber:13},this)]},`${v.path}-${C}`,!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):o.jsxDEV("div",{className:"git-empty",children:U("git.cleanTree")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:430,columnNumber:31},this)}function kP({data:r,onOpen:s}){const c=(r==null?void 0:r.commits)??[];return c.length?o.jsxDEV("div",{className:"git-list",children:c.map(v=>o.jsxDEV("button",{className:"git-row git-commit-row",onClick:()=>s(v.hash),children:[o.jsxDEV("span",{className:"git-hash",children:v.short},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:453,columnNumber:11},this),o.jsxDEV("span",{className:"git-commit-main",children:[o.jsxDEV("span",{className:"git-row-path",children:v.subject},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:455,columnNumber:13},this),o.jsxDEV("span",{className:"git-commit-meta",children:[v.author," · ",v.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)]},v.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):o.jsxDEV("div",{className:"git-empty",children:U("git.noCommits")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:448,columnNumber:31},this)}function RP({data:r,onOpenFile:s}){if(!r)return null;const c=r.files??[];return o.jsxDEV("div",{className:"git-commit-detail",children:[r.message&&o.jsxDEV("pre",{className:"git-commit-msg",children:r.message},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:469,columnNumber:24},this),o.jsxDEV("div",{className:"git-list",children:c.map((v,C)=>o.jsxDEV("button",{className:"git-row",onClick:()=>s(v.path),children:[o.jsxDEV("span",{className:`git-badge git-badge-${Lm(v.x,v.y).toLowerCase().replace("?","q")}`,children:Lm(v.x,v.y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:473,columnNumber:13},this),o.jsxDEV("span",{className:"git-row-path",children:v.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:474,columnNumber:13},this)]},`${v.path}-${C}`,!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 O1=da.length-1;function TP({data:r}){const[s,c]=M.useState(()=>pM()),v=R=>{const y=Math.min(O1,Math.max(0,s+R));c(y),vM(y)};if(!r)return null;const C=r.files??[];return C.length?o.jsxDEV("div",{className:"git-diff-wrap",style:{fontSize:`${da[s]}px`},children:[o.jsxDEV("div",{className:"git-diff-zoom",children:[o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>v(-1),disabled:s<=0,"aria-label":U("git.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:493,columnNumber:9},this),o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>v(1),disabled:s>=O1,"aria-label":U("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),r.truncated&&o.jsxDEV("div",{className:"git-diff-trunc",children:U("git.diffTruncated")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:496,columnNumber:26},this),C.map((R,y)=>o.jsxDEV("div",{className:"git-diff-file",children:[C.length>1&&o.jsxDEV("div",{className:"git-diff-fname",children:R.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:499,columnNumber:32},this),o.jsxDEV("div",{className:"git-diff",children:R.hunks.map((a,d)=>o.jsxDEV("div",{className:"git-diff-hunk-block",children:[o.jsxDEV("div",{className:"git-diff-line git-diff-hunk",children:a.header},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:503,columnNumber:17},this),a.lines.map((g,x)=>o.jsxDEV("div",{className:`git-diff-line git-diff-${g.type}`,children:[g.type==="add"?"+":g.type==="del"?"-":" ",g.text]},x,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:505,columnNumber:19},this))]},d,!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)]},`${R.path}-${y}`,!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):o.jsxDEV("div",{className:"git-empty",children:U("git.noDiff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:489,columnNumber:29},this)}function LP(){const r=O2();if(!r.active)return null;const s=r.phase==="sending",c=Math.round((r.pct||0)*100);return Yl.createPortal(o.jsxDEV("div",{className:"upload-overlay",role:"alertdialog","aria-modal":"true","aria-label":U("upload.title"),children:o.jsxDEV("div",{className:"upload-card",children:[r.label&&o.jsxDEV("div",{className:"upload-card-label",children:r.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:18,columnNumber:23},this),s?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"upload-bar",children:o.jsxDEV("div",{className:"upload-bar-fill",style:{width:`${c}%`}},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),o.jsxDEV("div",{className:"upload-card-sub",children:[c,"%"]},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):o.jsxDEV(o.Fragment,{children:[o.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),o.jsxDEV("div",{className:"upload-card-sub",children:U("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),o.jsxDEV("button",{type:"button",className:"upload-cancel",onClick:A2,children:U("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 mm=8,P1=12;function V1({path:r,x:s,y:c,onOpen:v,onClose:C,icon:R,name:y,openLabel:a,note:d,disabled:g=!1}){const x=y??(r.split("/").filter(Boolean).pop()||r),h=M.useRef(null),[_,N]=M.useState(null);return M.useLayoutEffect(()=>{const E=h.current;if(!E)return;const b=E.offsetWidth,l=E.offsetHeight,m=window.innerWidth,f=window.innerHeight,p=Math.min(Math.max(s-b/2,mm),m-b-mm);let S=c+P1;S+l>f-mm&&(S=Math.max(mm,c-P1-l)),N({left:p,top:S})},[s,c,r]),o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"doclink-backdrop",onClick:C},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:37,columnNumber:7},this),o.jsxDEV("div",{ref:h,className:"doclink-pop",style:_?{left:_.left,top:_.top}:{left:0,top:0,visibility:"hidden"},role:"dialog","aria-label":U("doclink.title"),children:[o.jsxDEV("div",{className:"doclink-name",children:[R??o.jsxDEV(zu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:44,columnNumber:48},this),x]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:44,columnNumber:9},this),o.jsxDEV("div",{className:"doclink-path",children:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:45,columnNumber:9},this),d&&o.jsxDEV("div",{className:"doclink-note",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:46,columnNumber:18},this),o.jsxDEV("div",{className:"doclink-actions",children:[o.jsxDEV("button",{className:"doclink-cancel",onClick:C,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:48,columnNumber:11},this),!g&&o.jsxDEV("button",{className:"doclink-open",onClick:()=>v(r),children:a??U("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:49,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:38,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:36,columnNumber:5},this)}const AP=()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`;function MP(r){const s=(r??"").trim();return s?{id:AP(),text:s}:null}function UP(r,s,c){const v=[...r];if(s<0||s>=v.length||c<0||c>=v.length||s===c)return v;const[C]=v.splice(s,1);return v.splice(c,0,C),v}function OP({open:r,session:s,window:c,onClose:v,onSend:C,onCountChange:R}){const[y,a]=M.useState([]),[d,g]=M.useState(""),[x,h]=M.useState(null),[_,N]=M.useState(null),E=M.useRef(null),b=M.useRef({head:"",tail:""}),l=M.useRef(null),m=M.useRef(!1),f=M.useRef({active:!1}),p=I=>{yN(s,c,I),a(I),R==null||R(I.length)},S=I=>{I&&(I.style.height="auto",I.style.height=`${I.scrollHeight+2}px`)};M.useEffect(()=>{if(!r)return;const I=bS(s,c);a(I),R==null||R(I.length),g(""),h(null)},[r,s,c]);const j=Z_({onText:I=>{if(m.current){m.current=!1;return}const{head:W,tail:X}=b.current;g(W+I+X),l.current=W.length+I.length}}),A=Q_(),D=j.state==="recording"||j.state==="finalizing";Im(D),M.useEffect(()=>{if(j.state!=="recording"&&j.state!=="finalizing"||m.current)return;const{head:I,tail:W}=b.current;g(I+j.partial+W),l.current=I.length+j.partial.length},[j.partial,j.state]),M.useLayoutEffect(()=>{const I=E.current;if(!I||(S(I),l.current==null))return;const W=l.current;if(l.current=null,document.activeElement===I)try{I.setSelectionRange(W,W)}catch{}},[d]);const L=()=>{if(D){j.stop();return}const I=E.current,W=I?I.selectionStart:d.length;b.current={head:d.slice(0,W),tail:d.slice(W)},j.start()},O=()=>{D&&(m.current=!0,j.stop())},F=()=>{O();const I=d.trim();if(I){if(x)p(y.map(W=>W.id===x?{...W,text:I}:W));else{const W=MP(I);W&&p([...y,W])}g(""),h(null)}},P=I=>{h(I.id),g(I.text),requestAnimationFrame(()=>{var W;return(W=E.current)==null?void 0:W.focus()})},B=()=>{h(null),g("")},G=I=>{p(y.filter(W=>W.id!==I)),I===x&&B()},ne=(I,W)=>{var X,K;I.cancelable&&I.preventDefault(),(K=(X=I.currentTarget).setPointerCapture)==null||K.call(X,I.pointerId),f.current={active:!0,pointerId:I.pointerId,id:W},N(W)},ee=I=>{var he;const W=f.current;if(!W.active||I.pointerId!==W.pointerId)return;const X=(he=I.currentTarget.closest(".idea-list"))==null?void 0:he.querySelectorAll("[data-idea]");if(!X||!X.length)return;const K=I.clientY;let ve=X.length-1;for(let Ae=0;Ae<X.length;Ae++){const me=X[Ae].getBoundingClientRect();if(K<me.top+me.height/2){ve=Ae;break}}a(Ae=>{const me=Ae.findIndex(ie=>ie.id===W.id);return me<0||me===ve?Ae:UP(Ae,me,ve)})},te=I=>{const W=f.current;!W.active||I.pointerId!==W.pointerId||(f.current={active:!1},N(null),a(X=>(yN(s,c,X),X)))};if(!r)return null;const se=x!=null;return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:149,columnNumber:7},this),o.jsxDEV("div",{className:"idea-panel",role:"dialog","aria-label":U("idea.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:[U("idea.title"),c?` · ${c}`:"",y.length>0&&o.jsxDEV("span",{className:"idea-head-count",children:y.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),o.jsxDEV("button",{className:"cmd-close",onClick:v,"aria-label":U("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),o.jsxDEV("div",{className:`idea-compose${D?" recording":""}`,children:[o.jsxDEV("textarea",{ref:E,className:"idea-input",rows:1,placeholder:U(se?"idea.editPlaceholder":"idea.addPlaceholder"),value:d,readOnly:D,onChange:I=>g(I.target.value)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:157,columnNumber:11},this),se&&o.jsxDEV("button",{className:"idea-cancel",onClick:B,children:U("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:166,columnNumber:23},this),A&&o.jsxDEV(Y_,{active:D,disabled:j.state==="requesting",onToggle:L},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:167,columnNumber:28},this),o.jsxDEV("button",{className:"idea-act",onClick:F,disabled:!d.trim(),"aria-label":U(se?"common.save":"idea.add"),children:se?o.jsxDEV($_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:169,columnNumber:24},this):o.jsxDEV(z_,{},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),o.jsxDEV("div",{className:"idea-list",children:y.length===0?o.jsxDEV("div",{className:"cmd-empty",children:U("idea.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:175,columnNumber:13},this):y.map(I=>o.jsxDEV("div",{"data-idea":I.id,className:`idea-row${I.id===_?" dragging":""}${I.id===x?" editing":""}`,children:[o.jsxDEV("button",{type:"button",className:"idea-handle","aria-label":U("idea.dragSort"),onPointerDown:W=>ne(W,I.id),onPointerMove:ee,onPointerUp:te,onPointerCancel:te,children:"≡"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:182,columnNumber:15},this),o.jsxDEV("span",{className:"idea-text",onClick:()=>P(I),children:I.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:191,columnNumber:15},this),o.jsxDEV("button",{className:"idea-send",onClick:()=>C==null?void 0:C(I.text),"aria-label":U("idea.fillInput"),children:U("idea.send")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:192,columnNumber:15},this),o.jsxDEV("button",{className:"idea-del",onClick:()=>G(I.id),"aria-label":U("common.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:193,columnNumber:15},this)]},I.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 PP({open:r,onClose:s}){return r?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:11,columnNumber:7},this),o.jsxDEV("div",{className:"changelog-panel",role:"dialog","aria-label":U("changelog.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:U("changelog.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:14,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:s,"aria-label":U("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:15,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:13,columnNumber:9},this),o.jsxDEV("div",{className:"changelog-list",children:s_.map(c=>{var R,y;const v=c.items[So()]||c.items.en||c.items.zh||[],C=c.version?`v${c.version}`:((R=c.label)==null?void 0:R[So()])||((y=c.label)==null?void 0:y.en);return o.jsxDEV("div",{className:"rel",children:[o.jsxDEV("div",{className:"rel-date",children:[C&&o.jsxDEV("span",{className:"rel-ver",children:C},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:27,columnNumber:29},this),o.jsxDEV("span",{className:"rel-day",children:c.date},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:28,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:26,columnNumber:17},this),o.jsxDEV("ul",{className:"rel-items",children:v.map((a,d)=>o.jsxDEV("li",{children:a},d,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:31,columnNumber:41},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:30,columnNumber:17},this)]},c.version||c.date,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:25,columnNumber:15},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:17,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:12,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:10,columnNumber:5},this):null}function VP(r){let s=!1,c=!1;for(let v=r;v&&v!==document.body&&v!==document.documentElement;v=v.parentElement){const C=getComputedStyle(v);if(!c&&(C.overflowY==="auto"||C.overflowY==="scroll")&&v.scrollHeight>v.clientHeight&&(c=!0),!s&&(C.overflowX==="auto"||C.overflowX==="scroll")&&v.scrollWidth>v.clientWidth&&(s=!0),s&&c)break}return{x:s,y:c}}function IP(){M.useEffect(()=>{let r="block",s=0,c=0;const v=R=>{const y=R.touches[0];if(s=y?y.clientX:0,c=y?y.clientY:0,!(R.target instanceof Element)){r="block";return}const{x:a,y:d}=VP(R.target);r=d?"free":a?"xonly":"block"},C=R=>{if(!(r==="free"||!R.cancelable)){if(r==="xonly"){const y=R.touches[0];if(y&&Math.abs(y.clientX-s)>=Math.abs(y.clientY-c))return}R.preventDefault()}};return document.addEventListener("touchstart",v,{passive:!0,capture:!0}),document.addEventListener("touchmove",C,{passive:!1,capture:!0}),()=>{document.removeEventListener("touchstart",v,{capture:!0}),document.removeEventListener("touchmove",C,{capture:!0})}},[])}function BP(r,s,c=2e3){const v=M.useRef(s);v.current=s,M.useEffect(()=>{if(!r)return;let C=!1,R=null,y=!1;const a=()=>{var h;(h=window.history.state)!=null&&h.exitRoot||window.history.replaceState({...window.history.state,exitRoot:!0},"")},d=()=>{var h;y||(h=window.history.state)!=null&&h.exitGuard||(window.history.pushState({exitGuard:!0},""),y=!0)},g=()=>{var h;R&&(clearTimeout(R),R=null),C&&(C=!1,(h=v.current)==null||h.call(v,!1))};a(),d();const x=()=>{var h,_,N;if((h=window.history.state)!=null&&h.exitGuard){y=!0,g();return}(_=window.history.state)!=null&&_.exitRoot&&(y=!1,!C&&(C=!0,(N=v.current)==null||N.call(v,!0),R=setTimeout(()=>{var E;C=!1,R=null,(E=v.current)==null||E.call(v,!1),d()},c)))};return window.addEventListener("popstate",x),()=>{var h,_;window.removeEventListener("popstate",x),R&&clearTimeout(R),C&&((h=v.current)==null||h.call(v,!1)),y&&((_=window.history.state)!=null&&_.exitGuard)&&window.history.back()}},[r,c])}function I1(r){history.replaceState(history.state,"",`#${encodeURIComponent(r)}`)}const Mu=r=>{try{return decodeURIComponent(r)}catch{return r}};function e_(){const r=location.hash.replace(/^#/,""),s=r.match(/^\/inbox(?:\/(.*))?$/);if(s)return{session:null,window:null,pane:null,inbox:!0,inboxId:s[1]?Mu(s[1]):null};const c=r.match(/^\/s\/([^/]*)\/w\/([^/]*)\/p\/(.*)$/);return c?{session:Mu(c[1]),window:Mu(c[2]),pane:Mu(c[3]),inbox:!1,inboxId:null}:{session:Mu(r)||null,window:null,pane:null,inbox:!1,inboxId:null}}const FP="tmw-share-v1",HP="/__share__/";function zP(r=typeof location<"u"?location.search:""){try{return new URLSearchParams(r).has("share")}catch{return!1}}function $P(){if(typeof location>"u"||typeof history>"u")return;const r=new URL(location.href);r.searchParams.delete("share"),history.replaceState(history.state,"",r.pathname+r.search+r.hash)}async function WP(){if(typeof caches>"u")return null;let r;try{r=await caches.open(FP)}catch{return null}const s=await r.keys();if(!s.length)return null;const c=s[s.length-1],v=await r.match(c);if(await r.delete(c),!v)return null;const C=await v.blob();let R="shared";try{R=decodeURIComponent(new URL(c.url).pathname.slice(HP.length))||"shared"}catch{}return new File([C],R,{type:C.type||v.headers.get("Content-Type")||""})}const B1="①②③④⑤⑥⑦⑧⑨",Fl=(r,s)=>s&&r.some(c=>c.id===s)?s:r[0].id;function GP(){var Vo,Io,Bo,ed,Wa,Zl,Ai,Hr,Jn,zr,Fo,Ga,td,pa,nd,id,Ho,rd,sd,ad,Ql,od;const[r,s]=M.useState(!Ha()),[c,v]=M.useState(!1),[C,R]=M.useState(!1),[y,a]=M.useState(JA),d=ae=>{ZA(ae),a(ae)},[g,x]=M.useState(QA),h=ae=>{eM(ae),x(ae)},[_,N]=M.useState(!1),[E,b]=M.useState(!1),[l,m]=M.useState(!1),[f,p]=M.useState(null),[S,k]=M.useState(null),[j,A]=M.useState(null),[D,L]=M.useState(null),[O,F]=M.useState(!1),[P,B]=M.useState(!1),[G,ne]=M.useState(null),[ee,te]=M.useState(null),[se,I]=M.useState(null),[W,X]=M.useState(null),[K,ve]=M.useState(null),[he,Ae]=M.useState(!1),[me,ie]=M.useState(null),[$,_e]=M.useState(null),ue=QU(),[Ie,Ue]=M.useState(ko),[nt,et]=M.useState(bm),[st,Dt]=M.useState([]),[J,yt]=M.useState(null),[Kt,Se]=M.useState(!0),[Re,We]=M.useState({}),[re,$e]=M.useState("terminal");M.useEffect(()=>{$e(localStorage.getItem("tw_lens_"+(J==null?void 0:J.paneId))||"terminal")},[J==null?void 0:J.paneId]);const[Ke,ge]=M.useState([]),[Ze,Ce]=M.useState(null),[Ve,be]=M.useState(!1),{status:Me,enable:He}=rP(),[Ct,Lt]=M.useState(!1),[Ut,Vt]=M.useState(0),[dn,Jt]=M.useState(!1),[Bt,zt]=M.useState(gM),[an,jn]=M.useState(null),[it,vn]=M.useState(bM),[zn,$n]=M.useState(mN),[tn,kn]=M.useState(BA),[Un,Qn]=M.useState([]),[on,Nn]=M.useState(""),[On,mi]=M.useState(0),[le,ze]=M.useState(null),tt=M.useRef(!1),bt=M.useRef(0),[xt,mt]=M.useState(Ou),[jt,gt]=M.useState(!1),[_n,rn]=M.useState(null),[qt,gn]=M.useState(null),[bn,li]=M.useState(FA),Pn=()=>{let ae=!1;const xe=()=>{ae||(ae=!0,window.removeEventListener("popstate",Fe),clearTimeout(rt),gt(!0))},Fe=()=>xe();window.addEventListener("popstate",Fe);const rt=setTimeout(xe,300);R(!1)},ci=M.useRef(0),ri=M.useRef(null);ri.current=_n;const Ft=()=>{window.history.pushState({overlay:!0},""),ci.current+=1},oe=ae=>{Ft(),rn(ae),vN(ae),mt(Ou())},qe=()=>window.history.back(),ke=()=>{rn(null),gt(!1)},Q=()=>{Un.forEach(ae=>vN(ae.id)),mt(Ou())},Ee=async ae=>{if(tt.current)return!1;tt.current=!0,bt.current+=1,ze(ae),Nn("");try{return await FU(ae),Qn(xe=>xe.filter(Fe=>Fe.id!==ae)),!0}catch(xe){return Tt(xe)||Nn(U("pushInbox.deleteFailed")),!1}finally{bt.current+=1,tt.current=!1,ze(null)}},Ye=M.useRef(null),Ot=M.useRef(null),lt=M.useRef(null),pt=M.useRef(null),wt=M.useCallback(()=>s(!0),[]),Tt=M.useCallback(ae=>n3(ae,wt),[wt]),{previewDomain:hn,dynamicEnabled:Dn,previewSheetOpen:Xt,setPreviewSheetOpen:Vn,activePreview:Xn,shownPreview:Ri,tabs:tr,activeName:Vr,openPreviewSheet:fr,startPreview:Qr,startDynamicPreview:Nr,startUrlPreview:pr,switchTab:vr,closeTab:Hs,stopPreview:Ir,renewPreview:cn}=t3(J,{settingsOpen:C,setSettingsOpen:R}),es=M.useCallback(async ae=>{try{await Nr(ae)}catch(xe){if(!Tt(xe))throw xe}},[Nr,Tt]);M.useEffect(()=>{r||WM().then(jn).catch(()=>{})},[r]);const nr=M.useCallback(()=>{VA(),R(!1),b(!1),v(!1),yt(null),Se(!0),s(!0)},[]);IP();const St=K2();Jr(Xt,()=>Vn(!1)),Jr(c,()=>v(!1)),Jr(Ve,()=>be(!1)),Jr(_,()=>N(!1)),Jr(E,()=>b(!1)),Jr(l,()=>m(!1)),Jr(Ct,()=>Lt(!1)),Jr(!!ee,()=>te(null)),Jr(C||dn,()=>{dn?Jt(!1):R(!1)}),Jr(!!S||!!f,()=>{f?p(null):k(null)}),Jr(!!j,()=>A(null)),M.useEffect(()=>{if(!jt)return;Ft();const ae=()=>{if(ci.current=Math.max(0,ci.current-1),ri.current){rn(null);return}gt(!1)};return window.addEventListener("popstate",ae),()=>{window.removeEventListener("popstate",ae),ci.current>0&&(window.history.go(-ci.current),ci.current=0)}},[jt]),M.useEffect(()=>{jt&&qt&&(oe(qt),gn(null))},[jt,qt]),M.useEffect(()=>{jt&&Un.length&&Un[0].ts>bn&&(HA(Un[0].ts),li(Un[0].ts))},[jt,Un,bn]),BP(!!J,Ae);const Br=M.useCallback(async ae=>{var Fe,rt;const xe=J==null?void 0:J.paneId;if(xe)try{await Hu(xe,[ae]),(rt=(Fe=Ye.current)==null?void 0:Fe.wake)==null||rt.call(Fe)}catch(Qe){Tt(Qe)}},[J,wt]),si=M.useCallback(async ae=>{var Fe,rt;const xe=J==null?void 0:J.paneId;if(xe)try{await jo(xe,ae,!1),(rt=(Fe=Ye.current)==null?void 0:Fe.wake)==null||rt.call(Fe)}catch(Qe){Tt(Qe)}},[J,wt]),Fr=M.useCallback(async ae=>{var Qe,Et,$t,Qt,pi;const xe=(Qe=J==null?void 0:J.window)==null?void 0:Qe.id,Fe=lt.current??(($t=(Et=Ye.current)==null?void 0:Et.getSize())==null?void 0:$t.cols);if(!xe||!Fe)return;const rt=Math.max(20,Math.min(500,Fe+ae));lt.current=rt,(pi=(Qt=Ye.current)==null?void 0:Qt.flash)==null||pi.call(Qt);try{pt.current==null&&(pt.current=await MM(xe).then(Fn=>Fn.layout||"").catch(()=>"")),J.panes&&J.panes.length>1?await AM(J.paneId,rt):await LM(xe,rt)}catch(Fn){Tt(Fn)}},[J,wt]),Sr=M.useCallback(async()=>{var Fe;const ae=(Fe=J==null?void 0:J.window)==null?void 0:Fe.id;if(!ae)return;const xe=pt.current;lt.current=null,pt.current=null;try{await UM(ae,xe)}catch(rt){Tt(rt)}},[J,wt]),Ti=M.useCallback(async(ae,xe=null)=>{var $t;const Fe=await ku(ae.id);if(!Fe.length)return!1;const rt=(xe==null?void 0:xe.window)&&Fe.find(Qt=>Qt.id===xe.window)||Fe.find(Qt=>Qt.id===Fl(Fe,YA(ae.id))),Qe=await Fa(rt.id);if(!Qe.length)return!1;const Et=xe!=null&&xe.pane&&Qe.some(Qt=>Qt.id===xe.pane)?xe.pane:Fl(Qe,sm(rt.id));return yt({session:ae,windows:Fe,window:rt,panes:Qe,paneId:Et}),Pl({sessionId:ae.id,windowId:rt.id,paneId:Et}),I1(ae.name),lt.current=(($t=Qe.find(Qt=>Qt.id===Et))==null?void 0:$t.width)??null,pt.current=null,!0},[]),qn=M.useCallback(async ae=>{var xe;try{const Fe=await Fa(ae.id);if(!Fe.length)return;const rt=Fl(Fe,sm(ae.id));return yt(Qe=>Qe&&{...Qe,window:ae,panes:Fe,paneId:rt}),Pl({sessionId:J.session.id,windowId:ae.id,paneId:rt}),lt.current=((xe=Fe.find(Qe=>Qe.id===rt))==null?void 0:xe.width)??null,pt.current=null,rt}catch(Fe){return Tt(Fe),null}},[J,wt]),Mn=M.useCallback(async(ae,xe,Fe)=>{var Et,$t,Qt,pi;const rt=(Et=J==null?void 0:J.session)==null?void 0:Et.id,Qe=J==null?void 0:J.paneId;if(!(!rt||!Qe))try{const{id:Fn}=await PM(rt,Qe,ae||void 0,xe,Fe),va=await ku(rt),Ss=va.find($s=>$s.id===Fn)||va[va.length-1],zo=await Fa(Ss.id);if(!zo.length)return;const ec=Fl(zo,sm(Ss.id));yt($s=>$s&&{...$s,windows:va,window:Ss,panes:zo,paneId:ec}),Pl({sessionId:rt,windowId:Ss.id,paneId:ec}),lt.current=(($t=zo.find($s=>$s.id===ec))==null?void 0:$t.width)??null,pt.current=null,m(!1),(pi=(Qt=Ye.current)==null?void 0:Qt.wake)==null||pi.call(Qt)}catch(Fn){if(Tt(Fn))return;throw Fn}},[J,wt]),ai=M.useCallback(async ae=>{var rt,Qe;const xe=f;if(!xe)return;const Fe=(rt=J==null?void 0:J.session)==null?void 0:rt.id;if(xe.kind==="session"){try{await VM(xe.id,ae)}catch(Et){throw Tt(Et)?Et:Et.status===409?new Error(xe("app.nameExists")):new Error(xe("app.renameFailed"))}Ue(IA(xe.name,ae)),Tu(),I1(ae),yt(Et=>Et&&Et.session.id===xe.id?{...Et,session:{...Et.session,name:ae}}:Et)}else{try{await IM(xe.id,ae)}catch($t){throw Tt($t)?$t:new Error(xe("app.renameFailed"))}xM((Qe=J==null?void 0:J.session)==null?void 0:Qe.name,xe.name||xe.id,ae);const Et=await ku(Fe);yt($t=>$t&&{...$t,windows:Et,window:Et.find(Qt=>Qt.id===$t.window.id)||$t.window})}p(null)},[f,J,wt]),ei=M.useCallback(async()=>{var Et;const ae=S,xe=J==null?void 0:J.session;if(!ae||!xe)return;const Fe=xe.id,rt=J.windows.length<=1;try{await BM(ae.id)}catch($t){if(Tt($t))return;window.alert(U("app.deleteFailed")),k(null);return}if(k(null),rt){Ue(hN(xe.name)),Tu(),yt(null);return}const Qe=await ku(Fe);if(ae.id===J.window.id&&Qe.length){const $t=Qe.find(Fn=>Fn.active)||Qe[0],Qt=await Fa($t.id);if(!Qt.length)return;const pi=Fl(Qt,sm($t.id));yt(Fn=>Fn&&{...Fn,windows:Qe,window:$t,panes:Qt,paneId:pi}),Pl({sessionId:Fe,windowId:$t.id,paneId:pi}),lt.current=((Et=Qt.find(Fn=>Fn.id===pi))==null?void 0:Et.width)??null,pt.current=null}else yt($t=>$t&&{...$t,windows:Qe})},[S,J,wt]),Wn=M.useCallback(async ae=>{var Qe;const xe=S,Fe=(Qe=J==null?void 0:J.session)==null?void 0:Qe.id;if(!xe||!Fe)return;const rt=Ig(J.windows,xe.id,ae);if(rt)try{await FM(xe.id,rt.id);const Et=await ku(Fe);yt($t=>$t&&{...$t,windows:Et,window:Et.find(Qt=>Qt.id===$t.window.id)||$t.window}),k(Et.find($t=>$t.id===xe.id)||null)}catch(Et){if(Tt(Et)){k(null);return}window.alert(U("app.moveFailed")),k(null)}},[S,J,wt]),Bn=Pm(()=>{J!=null&&J.session&&p({kind:"session",id:J.session.id,name:J.session.name})}),ts=M.useCallback(async ae=>{try{const xe=(await $l()).find(Fe=>Fe.name===ae);if(!xe){window.alert(U("app.sessionGone",{name:ae}));return}await Ti(xe)&&v(!1)}catch(xe){Tt(xe)}},[Ti,wt]),$i=M.useCallback(async ae=>{be(!1),$n(fN(ae.pane,ae.ts));try{const xe=(await $l()).find(Fe=>Fe.name===ae.session);if(!xe){window.alert(U("app.sessionGone",{name:ae.session}));return}v(!1),await Ti(xe,{window:ae.window,pane:ae.pane})}catch(xe){Tt(xe)}},[Ti,wt]),zs=M.useCallback(async({target:ae,kill:xe,name:Fe})=>{const rt=Ze,Qe=await YM({pid:rt.pid,sessionId:rt.sessionId,target:ae,kill:xe,name:Fe});Qe.name&&(Ue(dN(Qe.name)),Tu()),Ce(null),be(!1);try{Qe.name&&(v(!1),await Ti({id:Qe.session,name:Qe.name},{window:Qe.window,pane:Qe.pane}))}catch(Et){Tt(Et)}try{ge(await CN())}catch{}},[Ze,Ti,wt]),ws=M.useCallback(()=>{const ae=AN(Re);pN(ae),kn(ae)},[Re]),ns=M.useCallback(ae=>{Ue(dN(ae)),Tu(),b(!1),ts(ae)},[ts]),ma=M.useCallback(ae=>{Ue(hN(ae)),Tu(),yt(xe=>xe&&xe.session.name===ae?null:xe)},[]),fi=M.useCallback(ae=>{yt(xe=>xe&&(Pl({windowId:xe.window.id,paneId:ae}),{...xe,paneId:ae}))},[]),Wi=M.useCallback((ae,xe)=>{yt(Fe=>{if(!Fe)return Fe;const rt=Fe.windows.map(Qe=>Qe.id===ae?{...Qe,panes:xe.length}:Qe);return Fe.window.id===ae?{...Fe,windows:rt,panes:xe}:{...Fe,windows:rt}})},[]),is=M.useCallback(async(ae,xe)=>{var rt;const Fe=(rt=J==null?void 0:J.window)==null?void 0:rt.id;if(Fe){A(null),k(null);try{const{panes:Qe,selectPaneId:Et}=await DN({paneId:ae,dir:xe,windowId:Fe,api:{splitPane:NN},getPanes:Fa});Wi(Fe,Qe),fi(Et),pt.current=null}catch(Qe){if(Tt(Qe))return;window.alert(U("pane.splitFailed"))}}},[J,Wi,fi,wt]),Cr=M.useCallback(async()=>{var rt;const ae=j,xe=(rt=J==null?void 0:J.window)==null?void 0:rt.id,Fe=J==null?void 0:J.paneId;if(!(!ae||!xe))try{const{panes:Qe,selectPaneId:Et}=await rU({paneId:ae,windowId:xe,viewedPaneId:Fe,api:{closePane:HM},getPanes:Fa,pickId:Fl});A(null),Wi(xe,Qe),Et&&fi(Et),pt.current=null}catch(Qe){if(A(null),Tt(Qe))return;window.alert(U("pane.closeFailed"))}},[j,J,Wi,fi,wt]),ir=M.useCallback(async(ae,xe)=>{var rt,Qe;const Fe=(rt=J==null?void 0:J.session)==null?void 0:rt.id;if(!(!ae||!Fe)){k(null);try{const Et=await Fa(ae.id),$t=Et.find(Fn=>Fn.active)||Et[0];if(!$t)return;const{panes:Qt,selectPaneId:pi}=await DN({paneId:$t.id,dir:xe,windowId:ae.id,api:{splitPane:NN},getPanes:Fa});yt(Fn=>{if(!Fn)return Fn;const va=Fn.windows.map(Ss=>Ss.id===ae.id?{...Ss,panes:Qt.length}:Ss);return{...Fn,windows:va,window:ae,panes:Qt,paneId:pi}}),Pl({sessionId:Fe,windowId:ae.id,paneId:pi}),lt.current=((Qe=Qt.find(Fn=>Fn.id===pi))==null?void 0:Qe.width)??null,pt.current=null}catch(Et){if(Tt(Et))return;window.alert(U("pane.splitFailed"))}}},[J,wt]),rs=M.useCallback(async ae=>{var Fe;if(!ae)return;let xe=J==null?void 0:J.paneId;ae.id!==((Fe=J==null?void 0:J.window)==null?void 0:Fe.id)?(k(null),xe=await qn(ae)):await new Promise(rt=>{const Qe=()=>{clearTimeout(Et),window.removeEventListener("popstate",Qe),rt()},Et=setTimeout(Qe,80);window.addEventListener("popstate",Qe),k(null)}),xe&&(L(ae.id),A(xe))},[J,qn]),rr=(Vo=J==null?void 0:J.session)==null?void 0:Vo.name,Ns=(Io=J==null?void 0:J.window)==null?void 0:Io.id;M.useEffect(()=>{Dt(rr&&Ns?ym(rr,Ns):[])},[rr,Ns]);const ss=(Bo=J==null?void 0:J.session)==null?void 0:Bo.name,as=((ed=J==null?void 0:J.window)==null?void 0:ed.name)||((Wa=J==null?void 0:J.window)==null?void 0:Wa.id);M.useEffect(()=>{Vt(ss&&as?bS(ss,as).length:0)},[ss,as]),M.useEffect(()=>{J!=null&&J.paneId&&IU(J.paneId)},[J==null?void 0:J.paneId]),M.useEffect(()=>{var Fe;const ae=J==null?void 0:J.paneId;if(!ae)return;const xe=(Fe=Re[ae])==null?void 0:Fe.ts;xe!=null&&mN()[ae]!==xe&&$n(fN(ae,xe))},[J==null?void 0:J.paneId,Re]),M.useEffect(()=>{if(!zP())return;$P();let ae=!1;return(async()=>{const xe=await WP();ae||!xe||(ne(xe),ue.activate("home"),F(!0))})(),()=>{ae=!0}},[]),M.useEffect(()=>{if(r||typeof navigator>"u"||!("serviceWorker"in navigator))return;const ae=async({session:rt,window:Qe,pane:Et})=>{if(rt)try{const Qt=(await $l()).find(pi=>pi.name===rt);Qt&&(v(!1),await Ti(Qt,{window:Qe,pane:Et}))}catch($t){Tt($t)}},xe=rt=>{const Qe=rt.data;Qe&&(Qe.type==="navigate"?ae(Qe):Qe.type==="navigate-inbox"&&Qe.id&&(gt(!0),gn(Qe.id)))},Fe=()=>{const rt=e_();rt.session&&(rt.window||rt.pane)&&ae(rt)};return navigator.serviceWorker.addEventListener("message",xe),window.addEventListener("hashchange",Fe),()=>{navigator.serviceWorker.removeEventListener("message",xe),window.removeEventListener("hashchange",Fe)}},[r,Ti,wt]),M.useEffect(()=>{if(r)return;const ae=e_();ae.inbox&&(gt(!0),ae.inboxId&&gn(ae.inboxId),history.replaceState(history.state,"","#"))},[r]),M.useEffect(()=>{if(r)return;let ae=!0;const xe=async()=>{const rt=bt.current;try{const Qe=await BU();if(!ae||rt!==bt.current)return;Qn(Qe),mt(zA(Qe.map(Et=>Et.id))),Nn("")}catch(Qe){ae&&!Tt(Qe)&&Nn(U("pushInbox.loadFailed"))}};xe();const Fe=()=>{document.visibilityState==="visible"&&xe()};return document.addEventListener("visibilitychange",Fe),()=>{ae=!1,document.removeEventListener("visibilitychange",Fe)}},[r,jt,On,Tt]);const Ci=M.useCallback(ae=>{var Qe,Et,$t,Qt;(Et=(Qe=Ye.current)==null?void 0:Qe.wake)==null||Et.call(Qe);const xe=($t=J==null?void 0:J.session)==null?void 0:$t.name,Fe=(Qt=J==null?void 0:J.window)==null?void 0:Qt.id;xe&&Fe&&Dt(aM(xe,Fe,ae));const rt=nO(ae);X(rt&&(J!=null&&J.paneId)?{...rt,paneId:J.paneId}:null)},[J]),z=M.useCallback(ae=>{et(bm().includes(ae)?nM(ae):tM(ae))},[]),ce=M.useCallback(ae=>{var rt,Qe;const xe=(rt=J==null?void 0:J.session)==null?void 0:rt.name,Fe=(Qe=J==null?void 0:J.window)==null?void 0:Qe.id;xe&&Fe&&Dt(oM(xe,Fe,ae))},[J]),Y=((Ai=(Zl=J==null?void 0:J.panes)==null?void 0:Zl.find(ae=>ae.id===J.paneId))==null?void 0:Ai.cwd)||null,de=g&&((Hr=Re[J==null?void 0:J.paneId])==null?void 0:Hr.agent)==="claude",ye=de&&re==="chat",Le=async ae=>{if(CM(ae)){const Fe=ae.split("/").pop()||ae;if(ue.tabs.some(Et=>Et.key===ae)){ue.activate(ae),Xe(ae),F(!0);return}const{url:rt,mtimeMs:Qe}=await jN(ae);ue.openDoc(ae,{type:"image",name:Fe,content:rt,mtime:Qe}),_N({path:ae,name:Fe,type:"image",ts:Date.now()}),F(!0);return}const xe=await SN(ae);ue.openDoc(ae,{type:xe.type,name:xe.name,content:xe.content,mtime:xe.mtimeMs}),_N({path:ae,name:xe.name,type:xe.type,ts:Date.now()}),F(!0)},Te=ae=>{const xe=ue.tabs.find(Fe=>Fe.key===ae);(xe==null?void 0:xe.type)==="image"&&xe.content&&URL.revokeObjectURL(xe.content),ue.closeTab(ae)},Xe=ae=>{const xe=ue.tabs.find(Fe=>Fe.key===ae);if(!(!xe||xe.type==="home")){if(xe.type==="image"){jN(ae,xe.mtime??null).then(Fe=>{if(Fe.notModified)return;const rt=xe.content;ue.refreshDoc(ae,{content:Fe.url,mtime:Fe.mtimeMs}),rt&&URL.revokeObjectURL(rt)}).catch(()=>{});return}SN(ae,xe.mtime??null).then(Fe=>{Fe.notModified||ue.refreshDoc(ae,{type:Fe.type,name:Fe.name,content:Fe.content,mtime:Fe.mtimeMs})}).catch(()=>{})}},at=ae=>{ue.activate(ae),Xe(ae)},_t=()=>{F(!0),Xe(ue.active)},ct=ae=>{const xe=/-> (\d+)/.exec((ae==null?void 0:ae.message)||""),Fe=xe?Number(xe[1]):0;return U(Fe===404?"app.docNotFound":Fe===413?"app.docTooLarge":Fe===400?"app.docUnsupported":"app.docOpenFailed")},Zt=async ae=>{if(US(ae)){try{await Le(ae)}catch(Fe){ve(ct(Fe))}return}const xe=bN(J==null?void 0:J.paneId)??Y;if(xe)try{await Le(Co(xe,ae));return}catch{}te({rawPath:ae})},kt=async ae=>{try{await Le(Co(ae,ee.rawPath))}catch(xe){ve(ct(xe));return}J!=null&&J.paneId&&uM(J.paneId,ae),setTimeout(()=>te(null),0)},Pt=(ae,xe,Fe)=>{(ae==null?void 0:ae.kind)==="url"?_e({protocol:ae.protocol,port:ae.port,path:ae.urlPath,raw:ae.raw,x:xe,y:Fe}):ie({path:(ae==null?void 0:ae.path)??ae,x:xe,y:Fe})},yn=ae=>{ie(null),Zt(ae)},[Li,Er]=M.useState(null),gr=async()=>{const ae=$;if(ae)try{await pr({protocol:ae.protocol,port:ae.port,path:ae.path}),_e(null),Er(null)}catch(xe){if(Tt(xe))return;Er(PS(xe,{port:ae.port}))}},os=()=>{_e(null),Er(null)};if(M.useEffect(()=>{if(!K)return;const ae=setTimeout(()=>ve(null),4e3);return()=>clearTimeout(ae)},[K]),M.useEffect(()=>{if(!se)return;const ae=setTimeout(()=>I(null),3500);return()=>clearTimeout(ae)},[se]),M.useEffect(()=>{if(r)return;const ae=ko();if(!ae.length){Se(!1);return}let xe=!1;return(async()=>{try{const Fe=await $l();if(xe||!Fe.length)return;const rt=Fe.filter(Qt=>ae.includes(Qt.name));if(!rt.length)return;const Qe=e_();let Et=Qe.session?rt.find(Qt=>Qt.name===Qe.session):null;const $t=Et?{window:Qe.window,pane:Qe.pane}:null;if(!Et){const Qt=qA();Qt&&(Et=rt.find(pi=>pi.id===Qt))}Et||(Et=rt[0]),xe||await Ti(Et,$t)}catch(Fe){Tt(Fe)}finally{xe||Se(!1)}})(),()=>{xe=!0}},[r,Ti]),d_({fetch:()=>qM(Ie),apply:ae=>We(ae||{}),intervalMs:5e3,enabled:!r,deps:[Ie]}),M.useEffect(()=>{if(tn!=null)return;const ae=AN(Re);ae>0&&(pN(ae),kn(ae))},[Re,tn]),d_({fetch:CN,apply:ae=>ge(Array.isArray(ae)?ae:[]),intervalMs:15e3,enabled:!r}),r)return o.jsxDEV(F4,{onSaved:()=>{s(!1),Se(!0)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1083,columnNumber:12},this);const Gi=TU(Re,zn,tn??1/0),fa=AU(Gi),$a={};for(const ae of Object.values(Re))ae.window&&ae.agent&&($a[ae.window]=ae.agent);const Po={};for(const[ae,xe]of Object.entries(Re))xe.agent&&(Po[ae]=xe.agent);const Kl=!!am&&Bt!==am,Xl=!!(an!=null&&an.updateAvailable)&&an.latest!==it,Zu=new Set(xt),Qu=Un.filter(ae=>!Zu.has(ae.id)).length,Jl=Un.length>0&&Un[0].ts>bn,Fm=Kl||Xl||Jl,ls=()=>{R(!0),an!=null&&an.latest&&(yM(an.latest),vn(an.latest))},Hm=()=>{R(!1),Jt(!0),_M(am),zt(am)};return o.jsxDEV("div",{className:"app","data-chat-tone":y,style:St?{transform:`translateY(-${St}px)`}:void 0,children:[o.jsxDEV("header",{className:"topbar",children:[o.jsxDEV("button",{className:"hamburger",onClick:()=>v(!0),children:"☰"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1127,columnNumber:9},this),o.jsxDEV("span",{className:"session-name",...Bn,children:((Jn=J==null?void 0:J.session)==null?void 0:Jn.name)??"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1128,columnNumber:9},this),Ri&&o.jsxDEV("button",{className:"topbar-icon preview-live",onClick:()=>Vn(!0),"aria-label":U("app.preview"),title:U("app.openPreview"),children:o.jsxDEV(Nm,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1133,columnNumber:72},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1132,columnNumber:11},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>Lt(!0),"aria-label":U("app.ideas"),title:U("app.ideas"),disabled:!J,children:[o.jsxDEV(uU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1138,columnNumber:11},this),Ut>0&&o.jsxDEV("span",{className:"idea-badge",children:Ut},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1139,columnNumber:29},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1136,columnNumber:9},this),o.jsxDEV(Z4,{rows:Gi,top:fa,open:Ve,onToggle:()=>be(ae=>!ae),onClose:()=>be(!1),onSelectRow:$i,onMarkAllRead:ws,hooksStatus:Me,onEnableHooks:He},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1141,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>N(!0),"aria-label":U("usage.title"),title:U("usage.title"),children:o.jsxDEV(vU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1152,columnNumber:131},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1152,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:_t,"aria-label":U("app.files"),title:U("app.files"),children:o.jsxDEV(zu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1153,columnNumber:114},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1153,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>B(!0),"aria-label":"Git",title:"Git",children:o.jsxDEV(DS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1154,columnNumber:103},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1154,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:ls,"aria-label":U("app.settings"),title:U("app.settings"),children:[o.jsxDEV(wm,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1156,columnNumber:11},this),Fm&&o.jsxDEV("span",{className:"topbar-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1157,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1155,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1126,columnNumber:7},this),o.jsxDEV(J4,{open:_,onClose:()=>N(!1),onAuthFail:wt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1160,columnNumber:7},this),o.jsxDEV(q4,{open:C,onClose:()=>R(!1),chatTone:y,onChatTone:d,chatLensEnabled:g,onChatLensEnabled:h,hooksStatus:Me,onEnableHooks:He,termRef:Ye,getColCount:()=>{var ae,xe;return lt.current??((xe=(ae=Ye.current)==null?void 0:ae.getSize())==null?void 0:xe.cols)},onColAdjust:ae=>Fr(ae),onColRestore:Sr,onOpenChangelog:Hm,changelogUnread:Kl,notifUnread:Jl,onOpenInbox:Pn,updateInfo:an,activePreview:Xn,pane:J==null?void 0:J.paneId,lastPreviewDir:WA((zr=J==null?void 0:J.window)==null?void 0:zr.id),dynamicEnabled:Dn,onStartPreview:Qr,onStartDynamicPreview:es,onOpenPreview:fr,onRenew:cn,onStop:Ir},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1165,columnNumber:7},this),o.jsxDEV(PP,{open:dn,onClose:()=>Jt(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1193,columnNumber:7},this),o.jsxDEV($U,{open:jt,detailId:_n,items:Un,readIds:xt,onOpenDetail:oe,onCloseDetail:qe,onClose:ke,onDelete:Ee,deletingId:le,error:on,onRetry:()=>mi(ae=>ae+1),onMarkAllRead:Q,unreadCount:Qu},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1194,columnNumber:7},this),o.jsxDEV(i3,{open:c,currentSessionName:(Fo=J==null?void 0:J.session)==null?void 0:Fo.name,bound:Ie,onSelectSession:ts,onUnbind:ma,onBind:()=>b(!0),onClose:()=>v(!1),onLogout:nr,orphans:Ke,onTakeoverRequest:Ce},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1209,columnNumber:7},this),o.jsxDEV(lP,{open:E,bound:Ie,onBound:ns,onClose:()=>b(!1),onAuthFail:wt,inset:St},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1221,columnNumber:7},this),o.jsxDEV(uP,{open:l,onClose:()=>m(!1),onCreate:Mn,paneId:J==null?void 0:J.paneId,inset:St},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1229,columnNumber:7},this),o.jsxDEV(hP,{open:!!f,title:(f==null?void 0:f.kind)==="session"?U("app.renameSession"):U("app.renameWindow"),currentName:(f==null?void 0:f.name)||"",onClose:()=>p(null),onSubmit:ai,inset:St},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1236,columnNumber:7},this),o.jsxDEV(Q4,{open:!!Ze,orphan:Ze,onConfirm:zs,onClose:()=>Ce(null),inset:St},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1244,columnNumber:7},this),o.jsxDEV(Rm,{open:!!S,title:S?S.name||S.id:"",onClose:()=>k(null),actions:S?[...S.panes===1?[{key:"split-h",icon:o.jsxDEV(kN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1260,columnNumber:37},this),label:U("pane.splitH"),onClick:()=>ir(S,"h")},{key:"split-v",icon:o.jsxDEV(RN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1261,columnNumber:37},this),label:U("pane.splitV"),onClick:()=>ir(S,"v")}]:[],...S.panes>1?[{key:"manage-split",icon:o.jsxDEV(xU,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1265,columnNumber:42},this),label:U("pane.manage"),onClick:()=>rs(S)}]:[],...J&&J.windows.length>1?[[{key:"move-left",label:U("app.moveLeft"),disabled:!Ig(J.windows,S.id,"left"),onClick:()=>Wn("left")},{key:"move-right",label:U("app.moveRight"),disabled:!Ig(J.windows,S.id,"right"),onClick:()=>Wn("right")}]]:[],{key:"rename",label:U("common.rename"),onClick:()=>{p({kind:"window",id:S.id,name:S.name||""}),k(null)}},{key:"delete",label:U("app.deleteWindow"),danger:!0,confirm:!0,confirmLabel:J&&J.windows.length<=1?U("app.deleteLastWindowConfirm"):U("app.deleteConfirm"),onClick:ei}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1251,columnNumber:7},this),o.jsxDEV(Rm,{open:!!j,title:(()=>{if(!j||!J)return"";const ae=J.panes.findIndex(rt=>rt.id===j),xe=J.panes[ae];return xe?`${ae<B1.length?B1[ae]:String(ae+1)} ${xe.command||xe.id}`:""})(),onClose:()=>A(null),actions:j?[{key:"split-h",icon:o.jsxDEV(kN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1309,columnNumber:35},this),label:U("pane.splitH"),onClick:()=>is(j,"h")},{key:"split-v",icon:o.jsxDEV(RN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1310,columnNumber:35},this),label:U("pane.splitV"),onClick:()=>is(j,"v")},{key:"close",icon:o.jsxDEV(ca,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1312,columnNumber:33},this),label:U("pane.close"),danger:!0,confirm:!0,confirmLabel:U("pane.closeConfirm"),onClick:Cr}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1297,columnNumber:7},this),o.jsxDEV(SP,{open:O,pane:J==null?void 0:J.paneId,windowId:(Ga=J==null?void 0:J.window)==null?void 0:Ga.id,tabs:ue.tabs,active:ue.active,onActivate:at,onCloseTab:Te,onMinimize:()=>F(!1),onOpenDoc:Zt,pendingShare:G,onPendingConsumed:()=>ne(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1317,columnNumber:7},this),o.jsxDEV(jP,{open:P,pane:J==null?void 0:J.paneId,windowId:(td=J==null?void 0:J.window)==null?void 0:td.id,inset:St,onClose:()=>B(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1330,columnNumber:7},this),o.jsxDEV(LP,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1333,columnNumber:7},this),o.jsxDEV(nP,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1335,columnNumber:7},this),o.jsxDEV(DU,{open:Xt&&!!Ri,tabs:tr,activeName:Vr,domain:hn,onSwitchTab:vr,onCloseTab:Hs,onRenew:cn,onStop:Ir,onMinimize:()=>Vn(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1337,columnNumber:7},this),K&&o.jsxDEV("div",{className:"doc-toast",role:"alert",onClick:()=>ve(null),children:K},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1349,columnNumber:9},this),he&&o.jsxDEV("div",{className:"exit-toast",role:"status",children:U("app.backToExit")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1352,columnNumber:9},this),se&&o.jsxDEV("div",{className:"handoff-toast",role:"status",children:U("chat.slash.handedOff",{cmd:se})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1355,columnNumber:9},this),me&&o.jsxDEV(V1,{path:me.path,x:me.x,y:me.y,onOpen:yn,onClose:()=>ie(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1358,columnNumber:9},this),$&&o.jsxDEV(V1,{icon:o.jsxDEV(Nm,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1368,columnNumber:17},this),name:U("localurl.title"),path:$.raw,openLabel:U("localurl.open"),note:Li??(Dn?void 0:U("localurl.disabled")),disabled:!Dn,x:$.x,y:$.y,onOpen:gr,onClose:os},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1367,columnNumber:9},this),o.jsxDEV(OP,{open:Ct,session:(pa=J==null?void 0:J.session)==null?void 0:pa.name,window:((nd=J==null?void 0:J.window)==null?void 0:nd.name)||((id=J==null?void 0:J.window)==null?void 0:id.id),onClose:()=>Lt(!1),onSend:ae=>{var xe;(xe=Ot.current)==null||xe.fill(ae),Lt(!1)},onCountChange:Vt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1380,columnNumber:7},this),o.jsxDEV(Ju,{open:!!ee,seedCwd:bN(J==null?void 0:J.paneId)??Y??null,pane:(J==null?void 0:J.paneId)??null,hint:ee?o.jsxDEV(o.Fragment,{children:[U("app.cannotLocate")," ",o.jsxDEV("code",{children:ee.rawPath},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1392,columnNumber:54},this),U("app.pickItsDir")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1392,columnNumber:28},this):null,onPick:kt,onClose:()=>te(null),inset:St},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1388,columnNumber:7},this),J?o.jsxDEV(o.Fragment,{children:[o.jsxDEV(v3,{windows:J.windows,windowAgents:$a,paneAgents:Po,currentAgent:(Ho=Re[J.paneId])==null?void 0:Ho.agent,currentWindowId:J.window.id,panes:J.panes,currentPaneId:J.paneId,onSelectWindow:qn,onSelectPane:fi,onNewWindow:()=>m(!0),onManageWindow:ae=>k(ae),onManagePane:ae=>A(ae),paneSheetOpen:!!j,openMapFor:D,onMapOpened:()=>L(null),trackWindowId:S==null?void 0:S.id,lens:re,chatLensEnabled:de,onLensChange:ae=>{$e(ae),localStorage.setItem("tw_lens_"+J.paneId,ae)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1399,columnNumber:11},this),J.paneId&&(ye?o.jsxDEV(B4,{pane:J.paneId,kind:(rd=Re[J.paneId])==null?void 0:rd.kind,msg:(sd=Re[J.paneId])==null?void 0:sd.msg,onAuthFail:wt,slashEcho:W&&W.paneId===J.paneId?W:null,onSlashEchoDone:()=>X(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1422,columnNumber:15},this):o.jsxDEV(s2,{ref:Ye,pane:J.paneId,inset:St,onAuthFail:wt,onDocLinkTap:Pt,onTap:()=>{var ae;return(ae=Ot.current)==null?void 0:ae.hideKeyboard()}},J.paneId,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1426,columnNumber:15},this)),ye?o.jsxDEV(oO,{pane:J.paneId,kind:(ad=Re[J.paneId])==null?void 0:ad.kind,cwd:Y,onKey:Br,onAuthFail:wt,onSent:Ci,onInteractiveSlash:ae=>{$e("terminal"),localStorage.setItem("tw_lens_"+J.paneId,"terminal"),I(ae)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1439,columnNumber:13},this):o.jsxDEV(eO,{ref:Ot,pane:J.paneId,onAuthFail:wt,onKey:Br,onText:si,cwd:Y,agent:(Ql=Re[J.paneId])==null?void 0:Ql.agent,windowId:(od=J.window)==null?void 0:od.id,recent:st,favorites:nt,onSent:Ci,onToggleFav:z,onRemoveRecent:ce,inset:St},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1449,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1398,columnNumber:9},this):Kt?o.jsxDEV("div",{className:"loading",children:U("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1468,columnNumber:9},this):Ie.length===0?o.jsxDEV("button",{className:"empty-cta",onClick:()=>b(!0),children:[U("app.noBoundSession"),o.jsxDEV("span",{children:U("app.tapToBind")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1471,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1470,columnNumber:9},this):o.jsxDEV("div",{className:"loading",children:U("app.selectSessionHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1474,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1125,columnNumber:5},this)}G1(document.getElementById("root")).render(o.jsxDEV(GP,{},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 r=[...document.querySelectorAll('link[rel="stylesheet"]')].filter(c=>c.media==="print"),s=r.length?new Promise(c=>{let v=r.length;r.forEach(C=>C.addEventListener("load",()=>{--v||c()},{once:!0}))}):Promise.resolve();requestAnimationFrame(()=>requestAnimationFrame(()=>s.then(()=>window.__hideBootSplash())))}
|