handmux 0.20.3 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +10 -10
  2. package/README.zh-CN.md +10 -10
  3. package/package.json +7 -5
  4. package/public/assets/index-CRAlQZDz.css +32 -0
  5. package/public/assets/index-CzlitgRX.js +335 -0
  6. package/public/index.html +2 -2
  7. package/src/browser/bootstrap.js +68 -0
  8. package/src/browser/cookieProfiles.js +403 -0
  9. package/src/browser/coordinator.js +47 -0
  10. package/src/browser/hammerheadCompat.js +86 -0
  11. package/src/browser/hammerheadRedirectCompat.js +38 -0
  12. package/src/browser/manager.js +530 -0
  13. package/src/browser/originLabel.js +17 -0
  14. package/src/browser/profilePersistence.js +241 -0
  15. package/src/browser/protocol.js +1 -0
  16. package/src/browser/publicProxy.js +153 -0
  17. package/src/browser/routes.js +145 -0
  18. package/src/browser/sessionStore.js +78 -0
  19. package/src/browser/targetPolicy.js +137 -0
  20. package/src/browser/worker.js +32 -0
  21. package/src/browser/workerClient.js +253 -0
  22. package/src/browser/workerServer.js +98 -0
  23. package/src/cli/i18n/en.js +6 -11
  24. package/src/cli/i18n/zh.js +6 -11
  25. package/src/cli/options.js +3 -4
  26. package/src/cli/setupModel.js +3 -3
  27. package/src/cli/setupWizard.js +5 -9
  28. package/src/cli/supervisor.js +8 -3
  29. package/src/httpApi.js +10 -2
  30. package/src/previewServer.js +123 -151
  31. package/src/previews.js +54 -56
  32. package/src/push.js +16 -7
  33. package/src/routes/previews.js +9 -16
  34. package/src/routes/push.js +5 -4
  35. package/src/routes/system.js +7 -2
  36. package/src/routes/terminal.js +12 -0
  37. package/src/server.js +24 -14
  38. package/src/workspace/checkpointer.js +6 -2
  39. package/public/assets/index-C8Bg8Ecf.css +0 -32
  40. package/public/assets/index-CYZJ6vVb.js +0 -335
  41. package/src/internalPreviewGateway.js +0 -487
@@ -0,0 +1,335 @@
1
+ var oU=Object.defineProperty;var VS=n=>{throw TypeError(n)};var lU=(n,i,l)=>i in n?oU(n,i,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[i]=l;var wr=(n,i,l)=>lU(n,typeof i!="symbol"?i+"":i,l),cU=(n,i,l)=>i.has(n)||VS("Cannot "+l);var BS=(n,i,l)=>i.has(n)?VS("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,l);var xf=(n,i,l)=>(cU(n,i,"access private method"),l);(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const x of document.querySelectorAll('link[rel="modulepreload"]'))h(x);new MutationObserver(x=>{for(const D of x)if(D.type==="childList")for(const _ of D.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&h(_)}).observe(document,{childList:!0,subtree:!0});function l(x){const D={};return x.integrity&&(D.integrity=x.integrity),x.referrerPolicy&&(D.referrerPolicy=x.referrerPolicy),x.crossOrigin==="use-credentials"?D.credentials="include":x.crossOrigin==="anonymous"?D.credentials="omit":D.credentials="same-origin",D}function h(x){if(x.ep)return;x.ep=!0;const D=l(x);fetch(x.href,D)}})();var uU=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},zC={exports:{}},U_={},$C={exports:{}},Pf={exports:{}};Pf.exports;(function(n,i){/**
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 l="18.3.1",h=Symbol.for("react.element"),x=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),f=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),c=Symbol.iterator,p="@@iterator";function v(W){if(W===null||typeof W!="object")return null;var he=c&&W[c]||W[p];return typeof he=="function"?he:null}var w={current:null},C={transition:null},T={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},S={current:null},R={},j=null;function A(W){j=W}R.setExtraStackFrame=function(W){j=W},R.getCurrentStack=null,R.getStackAddendum=function(){var W="";j&&(W+=j);var he=R.getCurrentStack;return he&&(W+=he()||""),W};var O=!1,H=!1,V=!1,P=!1,Y=!1,Q={ReactCurrentDispatcher:w,ReactCurrentBatchConfig:C,ReactCurrentOwner:S};Q.ReactDebugCurrentFrame=R,Q.ReactCurrentActQueue=T;function z(W){{for(var he=arguments.length,pe=new Array(he>1?he-1:0),Be=1;Be<he;Be++)pe[Be-1]=arguments[Be];K("warn",W,pe)}}function X(W){{for(var he=arguments.length,pe=new Array(he>1?he-1:0),Be=1;Be<he;Be++)pe[Be-1]=arguments[Be];K("error",W,pe)}}function K(W,he,pe){{var Be=Q.ReactDebugCurrentFrame,dt=Be.getStackAddendum();dt!==""&&(he+="%s",pe=pe.concat([dt]));var qt=pe.map(function(jt){return String(jt)});qt.unshift("Warning: "+he),Function.prototype.apply.call(console[W],console,qt)}}var B={};function F(W,he){{var pe=W.constructor,Be=pe&&(pe.displayName||pe.name)||"ReactClass",dt=Be+"."+he;if(B[dt])return;X("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.",he,Be),B[dt]=!0}}var G={isMounted:function(W){return!1},enqueueForceUpdate:function(W,he,pe){F(W,"forceUpdate")},enqueueReplaceState:function(W,he,pe,Be){F(W,"replaceState")},enqueueSetState:function(W,he,pe,Be){F(W,"setState")}},Z=Object.assign,ae={};Object.freeze(ae);function me(W,he,pe){this.props=W,this.context=he,this.refs=ae,this.updater=pe||G}me.prototype.isReactComponent={},me.prototype.setState=function(W,he){if(typeof W!="object"&&typeof W!="function"&&W!=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,W,he,"setState")},me.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};{var Ue={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)."]},De=function(W,he){Object.defineProperty(me.prototype,W,{get:function(){z("%s(...) is deprecated in plain JavaScript React classes. %s",he[0],he[1])}})};for(var ie in Ue)Ue.hasOwnProperty(ie)&&De(ie,Ue[ie])}function q(){}q.prototype=me.prototype;function fe(W,he,pe){this.props=W,this.context=he,this.refs=ae,this.updater=pe||G}var le=fe.prototype=new q;le.constructor=fe,Z(le,me.prototype),le.isPureReactComponent=!0;function Oe(){var W={current:null};return Object.seal(W),W}var ke=Array.isArray;function nt(W){return ke(W)}function xe(W){{var he=typeof Symbol=="function"&&Symbol.toStringTag,pe=he&&W[Symbol.toStringTag]||W.constructor.name||"Object";return pe}}function $e(W){try{return at(W),!1}catch{return!0}}function at(W){return""+W}function Ge(W){if($e(W))return X("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",xe(W)),at(W)}function Ft(W,he,pe){var Be=W.displayName;if(Be)return Be;var dt=he.displayName||he.name||"";return dt!==""?pe+"("+dt+")":pe}function Rt(W){return W.displayName||"Context"}function oe(W){if(W==null)return null;if(typeof W.tag=="number"&&X("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof W=="function")return W.displayName||W.name||null;if(typeof W=="string")return W;switch(W){case D:return"Fragment";case x:return"Portal";case s:return"Profiler";case _:return"StrictMode";case d:return"Suspense";case y:return"SuspenseList"}if(typeof W=="object")switch(W.$$typeof){case f:var he=W;return Rt(he)+".Consumer";case u:var pe=W;return Rt(pe._context)+".Provider";case g:return Ft(W,W.render,"ForwardRef");case N:var Be=W.displayName||null;return Be!==null?Be:oe(W.type)||"Memo";case k:{var dt=W,qt=dt._payload,jt=dt._init;try{return oe(jt(qt))}catch{return null}}}return null}var Te=Object.prototype.hasOwnProperty,Ie={key:!0,ref:!0,__self:!0,__source:!0},Ve,tt,ot;ot={};function bt(W){if(Te.call(W,"ref")){var he=Object.getOwnPropertyDescriptor(W,"ref").get;if(he&&he.isReactWarning)return!1}return W.ref!==void 0}function ve(W){if(Te.call(W,"key")){var he=Object.getOwnPropertyDescriptor(W,"key").get;if(he&&he.isReactWarning)return!1}return W.key!==void 0}function Ne(W,he){var pe=function(){Ve||(Ve=!0,X("%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)",he))};pe.isReactWarning=!0,Object.defineProperty(W,"key",{get:pe,configurable:!0})}function Qe(W,he){var pe=function(){tt||(tt=!0,X("%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)",he))};pe.isReactWarning=!0,Object.defineProperty(W,"ref",{get:pe,configurable:!0})}function ye(W){if(typeof W.ref=="string"&&S.current&&W.__self&&S.current.stateNode!==W.__self){var he=oe(S.current.type);ot[he]||(X('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',he,W.ref),ot[he]=!0)}}var Fe=function(W,he,pe,Be,dt,qt,jt){var an={$$typeof:h,type:W,key:he,ref:pe,props:jt,_owner:qt};return an._store={},Object.defineProperty(an._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(an,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Be}),Object.defineProperty(an,"_source",{configurable:!1,enumerable:!1,writable:!1,value:dt}),Object.freeze&&(Object.freeze(an.props),Object.freeze(an)),an};function ze(W,he,pe){var Be,dt={},qt=null,jt=null,an=null,wn=null;if(he!=null){bt(he)&&(jt=he.ref,ye(he)),ve(he)&&(Ge(he.key),qt=""+he.key),an=he.__self===void 0?null:he.__self,wn=he.__source===void 0?null:he.__source;for(Be in he)Te.call(he,Be)&&!Ie.hasOwnProperty(Be)&&(dt[Be]=he[Be])}var On=arguments.length-2;if(On===1)dt.children=pe;else if(On>1){for(var Vn=Array(On),Qn=0;Qn<On;Qn++)Vn[Qn]=arguments[Qn+2];Object.freeze&&Object.freeze(Vn),dt.children=Vn}if(W&&W.defaultProps){var gn=W.defaultProps;for(Be in gn)dt[Be]===void 0&&(dt[Be]=gn[Be])}if(qt||jt){var ur=typeof W=="function"?W.displayName||W.name||"Unknown":W;qt&&Ne(dt,ur),jt&&Qe(dt,ur)}return Fe(W,qt,jt,an,wn,S.current,dt)}function Nt(W,he){var pe=Fe(W.type,he,W.ref,W._self,W._source,W._owner,W.props);return pe}function Wt(W,he,pe){if(W==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+W+".");var Be,dt=Z({},W.props),qt=W.key,jt=W.ref,an=W._self,wn=W._source,On=W._owner;if(he!=null){bt(he)&&(jt=he.ref,On=S.current),ve(he)&&(Ge(he.key),qt=""+he.key);var Vn;W.type&&W.type.defaultProps&&(Vn=W.type.defaultProps);for(Be in he)Te.call(he,Be)&&!Ie.hasOwnProperty(Be)&&(he[Be]===void 0&&Vn!==void 0?dt[Be]=Vn[Be]:dt[Be]=he[Be])}var Qn=arguments.length-2;if(Qn===1)dt.children=pe;else if(Qn>1){for(var gn=Array(Qn),ur=0;ur<Qn;ur++)gn[ur]=arguments[ur+2];dt.children=gn}return Fe(W.type,qt,jt,an,wn,On,dt)}function Gt(W){return typeof W=="object"&&W!==null&&W.$$typeof===h}var Qt=".",Rn=":";function we(W){var he=/[=:]/g,pe={"=":"=0",":":"=2"},Be=W.replace(he,function(dt){return pe[dt]});return"$"+Be}var Ye=!1,J=/\/+/g;function lt(W){return W.replace(J,"$&/")}function it(W,he){return typeof W=="object"&&W!==null&&W.key!=null?(Ge(W.key),we(""+W.key)):he.toString(36)}function Pt(W,he,pe,Be,dt){var qt=typeof W;(qt==="undefined"||qt==="boolean")&&(W=null);var jt=!1;if(W===null)jt=!0;else switch(qt){case"string":case"number":jt=!0;break;case"object":switch(W.$$typeof){case h:case x:jt=!0}}if(jt){var an=W,wn=dt(an),On=Be===""?Qt+it(an,0):Be;if(nt(wn)){var Vn="";On!=null&&(Vn=lt(On)+"/"),Pt(wn,he,Vn,"",function(pa){return pa})}else wn!=null&&(Gt(wn)&&(wn.key&&(!an||an.key!==wn.key)&&Ge(wn.key),wn=Nt(wn,pe+(wn.key&&(!an||an.key!==wn.key)?lt(""+wn.key)+"/":"")+On)),he.push(wn));return 1}var Qn,gn,ur=0,xr=Be===""?Qt:Be+Rn;if(nt(W))for(var Ts=0;Ts<W.length;Ts++)Qn=W[Ts],gn=xr+it(Qn,Ts),ur+=Pt(Qn,he,pe,gn,dt);else{var Ys=v(W);if(typeof Ys=="function"){var Lr=W;Ys===Lr.entries&&(Ye||z("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Ye=!0);for(var Hi=Ys.call(Lr),qs,$r=0;!(qs=Hi.next()).done;)Qn=qs.value,gn=xr+it(Qn,$r++),ur+=Pt(Qn,he,pe,gn,dt)}else if(qt==="object"){var zi=String(W);throw new Error("Objects are not valid as a React child (found: "+(zi==="[object Object]"?"object with keys {"+Object.keys(W).join(", ")+"}":zi)+"). If you meant to render a collection of children, use an array instead.")}}return ur}function pt(W,he,pe){if(W==null)return W;var Be=[],dt=0;return Pt(W,Be,"","",function(qt){return he.call(pe,qt,dt++)}),Be}function en(W){var he=0;return pt(W,function(){he++}),he}function It(W,he,pe){pt(W,function(){he.apply(this,arguments)},pe)}function Ht(W){return pt(W,function(he){return he})||[]}function Ut(W){if(!Gt(W))throw new Error("React.Children.only expected to receive a single React element child.");return W}function hn(W){var he={$$typeof:f,_currentValue:W,_currentValue2:W,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};he.Provider={$$typeof:u,_context:he};var pe=!1,Be=!1,dt=!1;{var qt={$$typeof:f,_context:he};Object.defineProperties(qt,{Provider:{get:function(){return Be||(Be=!0,X("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),he.Provider},set:function(jt){he.Provider=jt}},_currentValue:{get:function(){return he._currentValue},set:function(jt){he._currentValue=jt}},_currentValue2:{get:function(){return he._currentValue2},set:function(jt){he._currentValue2=jt}},_threadCount:{get:function(){return he._threadCount},set:function(jt){he._threadCount=jt}},Consumer:{get:function(){return pe||(pe=!0,X("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),he.Consumer}},displayName:{get:function(){return he.displayName},set:function(jt){dt||(z("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",jt),dt=!0)}}}),he.Consumer=qt}return he._currentRenderer=null,he._currentRenderer2=null,he}var _n=-1,Xt=0,jn=1,Nr=2;function Or(W){if(W._status===_n){var he=W._result,pe=he();if(pe.then(function(qt){if(W._status===Xt||W._status===_n){var jt=W;jt._status=jn,jt._result=qt}},function(qt){if(W._status===Xt||W._status===_n){var jt=W;jt._status=Nr,jt._result=qt}}),W._status===_n){var Be=W;Be._status=Xt,Be._result=pe}}if(W._status===jn){var dt=W._result;return dt===void 0&&X(`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?`,dt),"default"in dt||X(`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'))`,dt),dt.default}else throw W._result}function ce(W){var he={_status:_n,_result:W},pe={$$typeof:k,_payload:he,_init:Or};{var Be,dt;Object.defineProperties(pe,{defaultProps:{configurable:!0,get:function(){return Be},set:function(qt){X("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."),Be=qt,Object.defineProperty(pe,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return dt},set:function(qt){X("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."),dt=qt,Object.defineProperty(pe,"propTypes",{enumerable:!0})}}})}return pe}function rt(W){W!=null&&W.$$typeof===N?X("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof W!="function"?X("forwardRef requires a render function but was given %s.",W===null?"null":typeof W):W.length!==0&&W.length!==2&&X("forwardRef render functions accept exactly two parameters: props and ref. %s",W.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),W!=null&&(W.defaultProps!=null||W.propTypes!=null)&&X("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var he={$$typeof:g,render:W};{var pe;Object.defineProperty(he,"displayName",{enumerable:!1,configurable:!0,get:function(){return pe},set:function(Be){pe=Be,!W.name&&!W.displayName&&(W.displayName=Be)}})}return he}var mt;mt=Symbol.for("react.module.reference");function Se(W){return!!(typeof W=="string"||typeof W=="function"||W===D||W===s||Y||W===_||W===d||W===y||P||W===b||O||H||V||typeof W=="object"&&W!==null&&(W.$$typeof===k||W.$$typeof===N||W.$$typeof===u||W.$$typeof===f||W.$$typeof===g||W.$$typeof===mt||W.getModuleId!==void 0))}function ct(W,he){Se(W)||X("memo: The first argument must be a component. Instead received: %s",W===null?"null":typeof W);var pe={$$typeof:N,type:W,compare:he===void 0?null:he};{var Be;Object.defineProperty(pe,"displayName",{enumerable:!1,configurable:!0,get:function(){return Be},set:function(dt){Be=dt,!W.name&&!W.displayName&&(W.displayName=dt)}})}return pe}function ft(){var W=w.current;return W===null&&X(`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.`),W}function Le(W){var he=ft();if(W._context!==void 0){var pe=W._context;pe.Consumer===W?X("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?"):pe.Provider===W&&X("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return he.useContext(W)}function Ct(W){var he=ft();return he.useState(W)}function Bn(W,he,pe){var Be=ft();return Be.useReducer(W,he,pe)}function tn(W){var he=ft();return he.useRef(W)}function nn(W,he){var pe=ft();return pe.useEffect(W,he)}function Xn(W,he){var pe=ft();return pe.useInsertionEffect(W,he)}function Lt(W,he){var pe=ft();return pe.useLayoutEffect(W,he)}function zt(W,he){var pe=ft();return pe.useCallback(W,he)}function Sn(W,he){var pe=ft();return pe.useMemo(W,he)}function hr(W,he,pe){var Be=ft();return Be.useImperativeHandle(W,he,pe)}function $n(W,he){{var pe=ft();return pe.useDebugValue(W,he)}}function Jt(){var W=ft();return W.useTransition()}function yr(W){var he=ft();return he.useDeferredValue(W)}function Wn(){var W=ft();return W.useId()}function gt(W,he,pe){var Be=ft();return Be.useSyncExternalStore(W,he,pe)}var se=0,Ae,vt,on,Yt,ue,Ze,st;function yt(){}yt.__reactDisabledLog=!0;function xn(){{if(se===0){Ae=console.log,vt=console.info,on=console.warn,Yt=console.error,ue=console.group,Ze=console.groupCollapsed,st=console.groupEnd;var W={configurable:!0,enumerable:!0,value:yt,writable:!0};Object.defineProperties(console,{info:W,log:W,warn:W,error:W,group:W,groupCollapsed:W,groupEnd:W})}se++}}function Kt(){{if(se--,se===0){var W={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z({},W,{value:Ae}),info:Z({},W,{value:vt}),warn:Z({},W,{value:on}),error:Z({},W,{value:Yt}),group:Z({},W,{value:ue}),groupCollapsed:Z({},W,{value:Ze}),groupEnd:Z({},W,{value:st})})}se<0&&X("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var fr=Q.ReactCurrentDispatcher,Tn;function pr(W,he,pe){{if(Tn===void 0)try{throw Error()}catch(dt){var Be=dt.stack.trim().match(/\n( *(at )?)/);Tn=Be&&Be[1]||""}return`
22
+ `+Tn+W}}var vr=!1,ki;{var pi=typeof WeakMap=="function"?WeakMap:Map;ki=new pi}function Ir(W,he){if(!W||vr)return"";{var pe=ki.get(W);if(pe!==void 0)return pe}var Be;vr=!0;var dt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var qt;qt=fr.current,fr.current=null,xn();try{if(he){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(xr){Be=xr}Reflect.construct(W,[],jt)}else{try{jt.call()}catch(xr){Be=xr}W.call(jt.prototype)}}else{try{throw Error()}catch(xr){Be=xr}W()}}catch(xr){if(xr&&Be&&typeof xr.stack=="string"){for(var an=xr.stack.split(`
23
+ `),wn=Be.stack.split(`
24
+ `),On=an.length-1,Vn=wn.length-1;On>=1&&Vn>=0&&an[On]!==wn[Vn];)Vn--;for(;On>=1&&Vn>=0;On--,Vn--)if(an[On]!==wn[Vn]){if(On!==1||Vn!==1)do if(On--,Vn--,Vn<0||an[On]!==wn[Vn]){var Qn=`
25
+ `+an[On].replace(" at new "," at ");return W.displayName&&Qn.includes("<anonymous>")&&(Qn=Qn.replace("<anonymous>",W.displayName)),typeof W=="function"&&ki.set(W,Qn),Qn}while(On>=1&&Vn>=0);break}}}finally{vr=!1,fr.current=qt,Kt(),Error.prepareStackTrace=dt}var gn=W?W.displayName||W.name:"",ur=gn?pr(gn):"";return typeof W=="function"&&ki.set(W,ur),ur}function ci(W,he,pe){return Ir(W,!1)}function rr(W){var he=W.prototype;return!!(he&&he.isReactComponent)}function Fr(W,he,pe){if(W==null)return"";if(typeof W=="function")return Ir(W,rr(W));if(typeof W=="string")return pr(W);switch(W){case d:return pr("Suspense");case y:return pr("SuspenseList")}if(typeof W=="object")switch(W.$$typeof){case g:return ci(W.render);case N:return Fr(W.type,he,pe);case k:{var Be=W,dt=Be._payload,qt=Be._init;try{return Fr(qt(dt),he,pe)}catch{}}}return""}var bs={},Qi=Q.ReactDebugCurrentFrame;function Nn(W){if(W){var he=W._owner,pe=Fr(W.type,W._source,he?he.type:null);Qi.setExtraStackFrame(pe)}else Qi.setExtraStackFrame(null)}function es(W,he,pe,Be,dt){{var qt=Function.call.bind(Te);for(var jt in W)if(qt(W,jt)){var an=void 0;try{if(typeof W[jt]!="function"){var wn=Error((Be||"React class")+": "+pe+" type `"+jt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof W[jt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw wn.name="Invariant Violation",wn}an=W[jt](he,jt,Be,pe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(On){an=On}an&&!(an instanceof Error)&&(Nn(dt),X("%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).",Be||"React class",pe,jt,typeof an),Nn(null)),an instanceof Error&&!(an.message in bs)&&(bs[an.message]=!0,Nn(dt),X("Failed %s type: %s",pe,an.message),Nn(null))}}}function Vr(W){if(W){var he=W._owner,pe=Fr(W.type,W._source,he?he.type:null);A(pe)}else A(null)}var ne;ne=!1;function He(){if(S.current){var W=oe(S.current.type);if(W)return`
26
+
27
+ Check the render method of \``+W+"`."}return""}function Je(W){if(W!==void 0){var he=W.fileName.replace(/^.*[\\\/]/,""),pe=W.lineNumber;return`
28
+
29
+ Check your code at `+he+":"+pe+"."}return""}function rn(W){return W!=null?Je(W.__source):""}var zn={};function kr(W){var he=He();if(!he){var pe=typeof W=="string"?W:W.displayName||W.name;pe&&(he=`
30
+
31
+ Check the top-level render call using <`+pe+">.")}return he}function ir(W,he){if(!(!W._store||W._store.validated||W.key!=null)){W._store.validated=!0;var pe=kr(he);if(!zn[pe]){zn[pe]=!0;var Be="";W&&W._owner&&W._owner!==S.current&&(Be=" It was passed a child from "+oe(W._owner.type)+"."),Vr(W),X('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',pe,Be),Vr(null)}}}function un(W,he){if(typeof W=="object"){if(nt(W))for(var pe=0;pe<W.length;pe++){var Be=W[pe];Gt(Be)&&ir(Be,he)}else if(Gt(W))W._store&&(W._store.validated=!0);else if(W){var dt=v(W);if(typeof dt=="function"&&dt!==W.entries)for(var qt=dt.call(W),jt;!(jt=qt.next()).done;)Gt(jt.value)&&ir(jt.value,he)}}}function gr(W){{var he=W.type;if(he==null||typeof he=="string")return;var pe;if(typeof he=="function")pe=he.propTypes;else if(typeof he=="object"&&(he.$$typeof===g||he.$$typeof===N))pe=he.propTypes;else return;if(pe){var Be=oe(he);es(pe,W.props,"prop",Be,W)}else if(he.PropTypes!==void 0&&!ne){ne=!0;var dt=oe(he);X("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",dt||"Unknown")}typeof he.getDefaultProps=="function"&&!he.getDefaultProps.isReactClassApproved&&X("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sr(W){{for(var he=Object.keys(W.props),pe=0;pe<he.length;pe++){var Be=he[pe];if(Be!=="children"&&Be!=="key"){Vr(W),X("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Be),Vr(null);break}}W.ref!==null&&(Vr(W),X("Invalid attribute `ref` supplied to `React.Fragment`."),Vr(null))}}function ln(W,he,pe){var Be=Se(W);if(!Be){var dt="";(W===void 0||typeof W=="object"&&W!==null&&Object.keys(W).length===0)&&(dt+=" 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 qt=rn(he);qt?dt+=qt:dt+=He();var jt;W===null?jt="null":nt(W)?jt="array":W!==void 0&&W.$$typeof===h?(jt="<"+(oe(W.type)||"Unknown")+" />",dt=" Did you accidentally export a JSX literal instead of a component?"):jt=typeof W,X("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",jt,dt)}var an=ze.apply(this,arguments);if(an==null)return an;if(Be)for(var wn=2;wn<arguments.length;wn++)un(arguments[wn],W);return W===D?sr(an):gr(an),an}var Cn=!1;function An(W){var he=ln.bind(null,W);return he.type=W,Cn||(Cn=!0,z("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(he,"type",{enumerable:!1,get:function(){return z("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:W}),W}}),he}function Rr(W,he,pe){for(var Be=Wt.apply(this,arguments),dt=2;dt<arguments.length;dt++)un(arguments[dt],Be.type);return gr(Be),Be}function Kr(W,he){var pe=C.transition;C.transition={};var Be=C.transition;C.transition._updatedFibers=new Set;try{W()}finally{if(C.transition=pe,pe===null&&Be._updatedFibers){var dt=Be._updatedFibers.size;dt>10&&z("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),Be._updatedFibers.clear()}}}var Hr=!1,zr=null;function as(W){if(zr===null)try{var he=("require"+Math.random()).slice(0,7),pe=n&&n[he];zr=pe.call(n,"timers").setImmediate}catch{zr=function(dt){Hr===!1&&(Hr=!0,typeof MessageChannel>"u"&&X("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 qt=new MessageChannel;qt.port1.onmessage=dt,qt.port2.postMessage(void 0)}}return zr(W)}var ui=0,Tr=!1;function Sr(W){{var he=ui;ui++,T.current===null&&(T.current=[]);var pe=T.isBatchingLegacy,Be;try{if(T.isBatchingLegacy=!0,Be=W(),!pe&&T.didScheduleLegacyUpdate){var dt=T.current;dt!==null&&(T.didScheduleLegacyUpdate=!1,Ri(dt))}}catch(gn){throw Xr(he),gn}finally{T.isBatchingLegacy=pe}if(Be!==null&&typeof Be=="object"&&typeof Be.then=="function"){var qt=Be,jt=!1,an={then:function(gn,ur){jt=!0,qt.then(function(xr){Xr(he),ui===0?Cr(xr,gn,ur):gn(xr)},function(xr){Xr(he),ur(xr)})}};return!Tr&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){jt||(Tr=!0,X("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 () => ...);"))}),an}else{var wn=Be;if(Xr(he),ui===0){var On=T.current;On!==null&&(Ri(On),T.current=null);var Vn={then:function(gn,ur){T.current===null?(T.current=[],Cr(wn,gn,ur)):gn(wn)}};return Vn}else{var Qn={then:function(gn,ur){gn(wn)}};return Qn}}}}function Xr(W){W!==ui-1&&X("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),ui=W}function Cr(W,he,pe){{var Be=T.current;if(Be!==null)try{Ri(Be),as(function(){Be.length===0?(T.current=null,he(W)):Cr(W,he,pe)})}catch(dt){pe(dt)}else he(W)}}var Jr=!1;function Ri(W){if(!Jr){Jr=!0;var he=0;try{for(;he<W.length;he++){var pe=W[he];do pe=pe(!0);while(pe!==null)}W.length=0}catch(Be){throw W=W.slice(he+1),Be}finally{Jr=!1}}}var Ti=ln,os=Rr,vi=An,fa={map:pt,forEach:It,count:en,toArray:Ht,only:Ut};i.Children=fa,i.Component=me,i.Fragment=D,i.Profiler=s,i.PureComponent=fe,i.StrictMode=_,i.Suspense=d,i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Q,i.act=Sr,i.cloneElement=os,i.createContext=hn,i.createElement=Ti,i.createFactory=vi,i.createRef=Oe,i.forwardRef=rt,i.isValidElement=Gt,i.lazy=ce,i.memo=ct,i.startTransition=Kr,i.unstable_act=Sr,i.useCallback=zt,i.useContext=Le,i.useDebugValue=$n,i.useDeferredValue=yr,i.useEffect=nn,i.useId=Wn,i.useImperativeHandle=hr,i.useInsertionEffect=Xn,i.useLayoutEffect=Lt,i.useMemo=Sn,i.useReducer=Bn,i.useRef=tn,i.useState=Ct,i.useSyncExternalStore=gt,i.useTransition=Jt,i.version=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(Pf,Pf.exports);var dU=Pf.exports;$C.exports=dU;var L=$C.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 n=L,i=Symbol.for("react.element"),l=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),k=Symbol.iterator,b="@@iterator";function c(ce){if(ce===null||typeof ce!="object")return null;var rt=k&&ce[k]||ce[b];return typeof rt=="function"?rt:null}var p=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(ce){{for(var rt=arguments.length,mt=new Array(rt>1?rt-1:0),Se=1;Se<rt;Se++)mt[Se-1]=arguments[Se];w("error",ce,mt)}}function w(ce,rt,mt){{var Se=p.ReactDebugCurrentFrame,ct=Se.getStackAddendum();ct!==""&&(rt+="%s",mt=mt.concat([ct]));var ft=mt.map(function(Le){return String(Le)});ft.unshift("Warning: "+rt),Function.prototype.apply.call(console[ce],console,ft)}}var C=!1,T=!1,S=!1,R=!1,j=!1,A;A=Symbol.for("react.module.reference");function O(ce){return!!(typeof ce=="string"||typeof ce=="function"||ce===h||ce===D||j||ce===x||ce===f||ce===g||R||ce===N||C||T||S||typeof ce=="object"&&ce!==null&&(ce.$$typeof===y||ce.$$typeof===d||ce.$$typeof===_||ce.$$typeof===s||ce.$$typeof===u||ce.$$typeof===A||ce.getModuleId!==void 0))}function H(ce,rt,mt){var Se=ce.displayName;if(Se)return Se;var ct=rt.displayName||rt.name||"";return ct!==""?mt+"("+ct+")":mt}function V(ce){return ce.displayName||"Context"}function P(ce){if(ce==null)return null;if(typeof ce.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof ce=="function")return ce.displayName||ce.name||null;if(typeof ce=="string")return ce;switch(ce){case h:return"Fragment";case l:return"Portal";case D:return"Profiler";case x:return"StrictMode";case f:return"Suspense";case g:return"SuspenseList"}if(typeof ce=="object")switch(ce.$$typeof){case s:var rt=ce;return V(rt)+".Consumer";case _:var mt=ce;return V(mt._context)+".Provider";case u:return H(ce,ce.render,"ForwardRef");case d:var Se=ce.displayName||null;return Se!==null?Se:P(ce.type)||"Memo";case y:{var ct=ce,ft=ct._payload,Le=ct._init;try{return P(Le(ft))}catch{return null}}}return null}var Y=Object.assign,Q=0,z,X,K,B,F,G,Z;function ae(){}ae.__reactDisabledLog=!0;function me(){{if(Q===0){z=console.log,X=console.info,K=console.warn,B=console.error,F=console.group,G=console.groupCollapsed,Z=console.groupEnd;var ce={configurable:!0,enumerable:!0,value:ae,writable:!0};Object.defineProperties(console,{info:ce,log:ce,warn:ce,error:ce,group:ce,groupCollapsed:ce,groupEnd:ce})}Q++}}function Ue(){{if(Q--,Q===0){var ce={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},ce,{value:z}),info:Y({},ce,{value:X}),warn:Y({},ce,{value:K}),error:Y({},ce,{value:B}),group:Y({},ce,{value:F}),groupCollapsed:Y({},ce,{value:G}),groupEnd:Y({},ce,{value:Z})})}Q<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var De=p.ReactCurrentDispatcher,ie;function q(ce,rt,mt){{if(ie===void 0)try{throw Error()}catch(ct){var Se=ct.stack.trim().match(/\n( *(at )?)/);ie=Se&&Se[1]||""}return`
40
+ `+ie+ce}}var fe=!1,le;{var Oe=typeof WeakMap=="function"?WeakMap:Map;le=new Oe}function ke(ce,rt){if(!ce||fe)return"";{var mt=le.get(ce);if(mt!==void 0)return mt}var Se;fe=!0;var ct=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ft;ft=De.current,De.current=null,me();try{if(rt){var Le=function(){throw Error()};if(Object.defineProperty(Le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Le,[])}catch(Sn){Se=Sn}Reflect.construct(ce,[],Le)}else{try{Le.call()}catch(Sn){Se=Sn}ce.call(Le.prototype)}}else{try{throw Error()}catch(Sn){Se=Sn}ce()}}catch(Sn){if(Sn&&Se&&typeof Sn.stack=="string"){for(var Ct=Sn.stack.split(`
41
+ `),Bn=Se.stack.split(`
42
+ `),tn=Ct.length-1,nn=Bn.length-1;tn>=1&&nn>=0&&Ct[tn]!==Bn[nn];)nn--;for(;tn>=1&&nn>=0;tn--,nn--)if(Ct[tn]!==Bn[nn]){if(tn!==1||nn!==1)do if(tn--,nn--,nn<0||Ct[tn]!==Bn[nn]){var Xn=`
43
+ `+Ct[tn].replace(" at new "," at ");return ce.displayName&&Xn.includes("<anonymous>")&&(Xn=Xn.replace("<anonymous>",ce.displayName)),typeof ce=="function"&&le.set(ce,Xn),Xn}while(tn>=1&&nn>=0);break}}}finally{fe=!1,De.current=ft,Ue(),Error.prepareStackTrace=ct}var Lt=ce?ce.displayName||ce.name:"",zt=Lt?q(Lt):"";return typeof ce=="function"&&le.set(ce,zt),zt}function nt(ce,rt,mt){return ke(ce,!1)}function xe(ce){var rt=ce.prototype;return!!(rt&&rt.isReactComponent)}function $e(ce,rt,mt){if(ce==null)return"";if(typeof ce=="function")return ke(ce,xe(ce));if(typeof ce=="string")return q(ce);switch(ce){case f:return q("Suspense");case g:return q("SuspenseList")}if(typeof ce=="object")switch(ce.$$typeof){case u:return nt(ce.render);case d:return $e(ce.type,rt,mt);case y:{var Se=ce,ct=Se._payload,ft=Se._init;try{return $e(ft(ct),rt,mt)}catch{}}}return""}var at=Object.prototype.hasOwnProperty,Ge={},Ft=p.ReactDebugCurrentFrame;function Rt(ce){if(ce){var rt=ce._owner,mt=$e(ce.type,ce._source,rt?rt.type:null);Ft.setExtraStackFrame(mt)}else Ft.setExtraStackFrame(null)}function oe(ce,rt,mt,Se,ct){{var ft=Function.call.bind(at);for(var Le in ce)if(ft(ce,Le)){var Ct=void 0;try{if(typeof ce[Le]!="function"){var Bn=Error((Se||"React class")+": "+mt+" type `"+Le+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof ce[Le]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Bn.name="Invariant Violation",Bn}Ct=ce[Le](rt,Le,Se,mt,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(tn){Ct=tn}Ct&&!(Ct instanceof Error)&&(Rt(ct),v("%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).",Se||"React class",mt,Le,typeof Ct),Rt(null)),Ct instanceof Error&&!(Ct.message in Ge)&&(Ge[Ct.message]=!0,Rt(ct),v("Failed %s type: %s",mt,Ct.message),Rt(null))}}}var Te=Array.isArray;function Ie(ce){return Te(ce)}function Ve(ce){{var rt=typeof Symbol=="function"&&Symbol.toStringTag,mt=rt&&ce[Symbol.toStringTag]||ce.constructor.name||"Object";return mt}}function tt(ce){try{return ot(ce),!1}catch{return!0}}function ot(ce){return""+ce}function bt(ce){if(tt(ce))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ve(ce)),ot(ce)}var ve=p.ReactCurrentOwner,Ne={key:!0,ref:!0,__self:!0,__source:!0},Qe,ye,Fe;Fe={};function ze(ce){if(at.call(ce,"ref")){var rt=Object.getOwnPropertyDescriptor(ce,"ref").get;if(rt&&rt.isReactWarning)return!1}return ce.ref!==void 0}function Nt(ce){if(at.call(ce,"key")){var rt=Object.getOwnPropertyDescriptor(ce,"key").get;if(rt&&rt.isReactWarning)return!1}return ce.key!==void 0}function Wt(ce,rt){if(typeof ce.ref=="string"&&ve.current&&rt&&ve.current.stateNode!==rt){var mt=P(ve.current.type);Fe[mt]||(v('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',P(ve.current.type),ce.ref),Fe[mt]=!0)}}function Gt(ce,rt){{var mt=function(){Qe||(Qe=!0,v("%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)",rt))};mt.isReactWarning=!0,Object.defineProperty(ce,"key",{get:mt,configurable:!0})}}function Qt(ce,rt){{var mt=function(){ye||(ye=!0,v("%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)",rt))};mt.isReactWarning=!0,Object.defineProperty(ce,"ref",{get:mt,configurable:!0})}}var Rn=function(ce,rt,mt,Se,ct,ft,Le){var Ct={$$typeof:i,type:ce,key:rt,ref:mt,props:Le,_owner:ft};return Ct._store={},Object.defineProperty(Ct._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ct,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Se}),Object.defineProperty(Ct,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ct}),Object.freeze&&(Object.freeze(Ct.props),Object.freeze(Ct)),Ct};function we(ce,rt,mt,Se,ct){{var ft,Le={},Ct=null,Bn=null;mt!==void 0&&(bt(mt),Ct=""+mt),Nt(rt)&&(bt(rt.key),Ct=""+rt.key),ze(rt)&&(Bn=rt.ref,Wt(rt,ct));for(ft in rt)at.call(rt,ft)&&!Ne.hasOwnProperty(ft)&&(Le[ft]=rt[ft]);if(ce&&ce.defaultProps){var tn=ce.defaultProps;for(ft in tn)Le[ft]===void 0&&(Le[ft]=tn[ft])}if(Ct||Bn){var nn=typeof ce=="function"?ce.displayName||ce.name||"Unknown":ce;Ct&&Gt(Le,nn),Bn&&Qt(Le,nn)}return Rn(ce,Ct,Bn,ct,Se,ve.current,Le)}}var Ye=p.ReactCurrentOwner,J=p.ReactDebugCurrentFrame;function lt(ce){if(ce){var rt=ce._owner,mt=$e(ce.type,ce._source,rt?rt.type:null);J.setExtraStackFrame(mt)}else J.setExtraStackFrame(null)}var it;it=!1;function Pt(ce){return typeof ce=="object"&&ce!==null&&ce.$$typeof===i}function pt(){{if(Ye.current){var ce=P(Ye.current.type);if(ce)return`
44
+
45
+ Check the render method of \``+ce+"`."}return""}}function en(ce){{if(ce!==void 0){var rt=ce.fileName.replace(/^.*[\\\/]/,""),mt=ce.lineNumber;return`
46
+
47
+ Check your code at `+rt+":"+mt+"."}return""}}var It={};function Ht(ce){{var rt=pt();if(!rt){var mt=typeof ce=="string"?ce:ce.displayName||ce.name;mt&&(rt=`
48
+
49
+ Check the top-level render call using <`+mt+">.")}return rt}}function Ut(ce,rt){{if(!ce._store||ce._store.validated||ce.key!=null)return;ce._store.validated=!0;var mt=Ht(rt);if(It[mt])return;It[mt]=!0;var Se="";ce&&ce._owner&&ce._owner!==Ye.current&&(Se=" It was passed a child from "+P(ce._owner.type)+"."),lt(ce),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',mt,Se),lt(null)}}function hn(ce,rt){{if(typeof ce!="object")return;if(Ie(ce))for(var mt=0;mt<ce.length;mt++){var Se=ce[mt];Pt(Se)&&Ut(Se,rt)}else if(Pt(ce))ce._store&&(ce._store.validated=!0);else if(ce){var ct=c(ce);if(typeof ct=="function"&&ct!==ce.entries)for(var ft=ct.call(ce),Le;!(Le=ft.next()).done;)Pt(Le.value)&&Ut(Le.value,rt)}}}function _n(ce){{var rt=ce.type;if(rt==null||typeof rt=="string")return;var mt;if(typeof rt=="function")mt=rt.propTypes;else if(typeof rt=="object"&&(rt.$$typeof===u||rt.$$typeof===d))mt=rt.propTypes;else return;if(mt){var Se=P(rt);oe(mt,ce.props,"prop",Se,ce)}else if(rt.PropTypes!==void 0&&!it){it=!0;var ct=P(rt);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ct||"Unknown")}typeof rt.getDefaultProps=="function"&&!rt.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xt(ce){{for(var rt=Object.keys(ce.props),mt=0;mt<rt.length;mt++){var Se=rt[mt];if(Se!=="children"&&Se!=="key"){lt(ce),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Se),lt(null);break}}ce.ref!==null&&(lt(ce),v("Invalid attribute `ref` supplied to `React.Fragment`."),lt(null))}}var jn={};function Nr(ce,rt,mt,Se,ct,ft){{var Le=O(ce);if(!Le){var Ct="";(ce===void 0||typeof ce=="object"&&ce!==null&&Object.keys(ce).length===0)&&(Ct+=" 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 Bn=en(ct);Bn?Ct+=Bn:Ct+=pt();var tn;ce===null?tn="null":Ie(ce)?tn="array":ce!==void 0&&ce.$$typeof===i?(tn="<"+(P(ce.type)||"Unknown")+" />",Ct=" Did you accidentally export a JSX literal instead of a component?"):tn=typeof ce,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",tn,Ct)}var nn=we(ce,rt,mt,ct,ft);if(nn==null)return nn;if(Le){var Xn=rt.children;if(Xn!==void 0)if(Se)if(Ie(Xn)){for(var Lt=0;Lt<Xn.length;Lt++)hn(Xn[Lt],ce);Object.freeze&&Object.freeze(Xn)}else v("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 hn(Xn,ce)}if(at.call(rt,"key")){var zt=P(ce),Sn=Object.keys(rt).filter(function(Jt){return Jt!=="key"}),hr=Sn.length>0?"{key: someKey, "+Sn.join(": ..., ")+": ...}":"{key: someKey}";if(!jn[zt+hr]){var $n=Sn.length>0?"{"+Sn.join(": ..., ")+": ...}":"{}";v(`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} />`,hr,zt,$n,zt),jn[zt+hr]=!0}}return ce===h?Xt(nn):_n(nn),nn}}var Or=Nr;U_.Fragment=h,U_.jsxDEV=Or})();zC.exports=U_;var o=zC.exports,WC={exports:{}},vs={},GC={exports:{}},YC={};(function(n){/**
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 i=!1,l=5;function h(ye,Fe){var ze=ye.length;ye.push(Fe),_(ye,Fe,ze)}function x(ye){return ye.length===0?null:ye[0]}function D(ye){if(ye.length===0)return null;var Fe=ye[0],ze=ye.pop();return ze!==Fe&&(ye[0]=ze,s(ye,ze,0)),Fe}function _(ye,Fe,ze){for(var Nt=ze;Nt>0;){var Wt=Nt-1>>>1,Gt=ye[Wt];if(u(Gt,Fe)>0)ye[Wt]=Fe,ye[Nt]=Gt,Nt=Wt;else return}}function s(ye,Fe,ze){for(var Nt=ze,Wt=ye.length,Gt=Wt>>>1;Nt<Gt;){var Qt=(Nt+1)*2-1,Rn=ye[Qt],we=Qt+1,Ye=ye[we];if(u(Rn,Fe)<0)we<Wt&&u(Ye,Rn)<0?(ye[Nt]=Ye,ye[we]=Fe,Nt=we):(ye[Nt]=Rn,ye[Qt]=Fe,Nt=Qt);else if(we<Wt&&u(Ye,Fe)<0)ye[Nt]=Ye,ye[we]=Fe,Nt=we;else return}}function u(ye,Fe){var ze=ye.sortIndex-Fe.sortIndex;return ze!==0?ze:ye.id-Fe.id}var f=1,g=2,d=3,y=4,N=5;function k(ye,Fe){}var b=typeof performance=="object"&&typeof performance.now=="function";if(b){var c=performance;n.unstable_now=function(){return c.now()}}else{var p=Date,v=p.now();n.unstable_now=function(){return p.now()-v}}var w=1073741823,C=-1,T=250,S=5e3,R=1e4,j=w,A=[],O=[],H=1,V=null,P=d,Y=!1,Q=!1,z=!1,X=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(ye){for(var Fe=x(O);Fe!==null;){if(Fe.callback===null)D(O);else if(Fe.startTime<=ye)D(O),Fe.sortIndex=Fe.expirationTime,h(A,Fe);else return;Fe=x(O)}}function G(ye){if(z=!1,F(ye),!Q)if(x(A)!==null)Q=!0,ot(Z);else{var Fe=x(O);Fe!==null&&bt(G,Fe.startTime-ye)}}function Z(ye,Fe){Q=!1,z&&(z=!1,ve()),Y=!0;var ze=P;try{var Nt;if(!i)return ae(ye,Fe)}finally{V=null,P=ze,Y=!1}}function ae(ye,Fe){var ze=Fe;for(F(ze),V=x(A);V!==null&&!(V.expirationTime>ze&&(!ye||Ft()));){var Nt=V.callback;if(typeof Nt=="function"){V.callback=null,P=V.priorityLevel;var Wt=V.expirationTime<=ze,Gt=Nt(Wt);ze=n.unstable_now(),typeof Gt=="function"?V.callback=Gt:V===x(A)&&D(A),F(ze)}else D(A);V=x(A)}if(V!==null)return!0;var Qt=x(O);return Qt!==null&&bt(G,Qt.startTime-ze),!1}function me(ye,Fe){switch(ye){case f:case g:case d:case y:case N:break;default:ye=d}var ze=P;P=ye;try{return Fe()}finally{P=ze}}function Ue(ye){var Fe;switch(P){case f:case g:case d:Fe=d;break;default:Fe=P;break}var ze=P;P=Fe;try{return ye()}finally{P=ze}}function De(ye){var Fe=P;return function(){var ze=P;P=Fe;try{return ye.apply(this,arguments)}finally{P=ze}}}function ie(ye,Fe,ze){var Nt=n.unstable_now(),Wt;if(typeof ze=="object"&&ze!==null){var Gt=ze.delay;typeof Gt=="number"&&Gt>0?Wt=Nt+Gt:Wt=Nt}else Wt=Nt;var Qt;switch(ye){case f:Qt=C;break;case g:Qt=T;break;case N:Qt=j;break;case y:Qt=R;break;case d:default:Qt=S;break}var Rn=Wt+Qt,we={id:H++,callback:Fe,priorityLevel:ye,startTime:Wt,expirationTime:Rn,sortIndex:-1};return Wt>Nt?(we.sortIndex=Wt,h(O,we),x(A)===null&&we===x(O)&&(z?ve():z=!0,bt(G,Wt-Nt))):(we.sortIndex=Rn,h(A,we),!Q&&!Y&&(Q=!0,ot(Z))),we}function q(){}function fe(){!Q&&!Y&&(Q=!0,ot(Z))}function le(){return x(A)}function Oe(ye){ye.callback=null}function ke(){return P}var nt=!1,xe=null,$e=-1,at=l,Ge=-1;function Ft(){var ye=n.unstable_now()-Ge;return!(ye<at)}function Rt(){}function oe(ye){if(ye<0||ye>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}ye>0?at=Math.floor(1e3/ye):at=l}var Te=function(){if(xe!==null){var ye=n.unstable_now();Ge=ye;var Fe=!0,ze=!0;try{ze=xe(Fe,ye)}finally{ze?Ie():(nt=!1,xe=null)}}else nt=!1},Ie;if(typeof B=="function")Ie=function(){B(Te)};else if(typeof MessageChannel<"u"){var Ve=new MessageChannel,tt=Ve.port2;Ve.port1.onmessage=Te,Ie=function(){tt.postMessage(null)}}else Ie=function(){X(Te,0)};function ot(ye){xe=ye,nt||(nt=!0,Ie())}function bt(ye,Fe){$e=X(function(){ye(n.unstable_now())},Fe)}function ve(){K($e),$e=-1}var Ne=Rt,Qe=null;n.unstable_IdlePriority=N,n.unstable_ImmediatePriority=f,n.unstable_LowPriority=y,n.unstable_NormalPriority=d,n.unstable_Profiling=Qe,n.unstable_UserBlockingPriority=g,n.unstable_cancelCallback=Oe,n.unstable_continueExecution=fe,n.unstable_forceFrameRate=oe,n.unstable_getCurrentPriorityLevel=ke,n.unstable_getFirstCallbackNode=le,n.unstable_next=Ue,n.unstable_pauseExecution=q,n.unstable_requestPaint=Ne,n.unstable_runWithPriority=me,n.unstable_scheduleCallback=ie,n.unstable_shouldYield=Ft,n.unstable_wrapCallback=De,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(YC);GC.exports=YC;var hU=GC.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 n=L,i=hU,l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,h=!1;function x(e){h=e}function D(e){if(!h){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];s("warn",e,r)}}function _(e){if(!h){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];s("error",e,r)}}function s(e,t,r){{var a=l.ReactDebugCurrentFrame,m=a.getStackAddendum();m!==""&&(t+="%s",r=r.concat([m]));var E=r.map(function(U){return String(U)});E.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,E)}}var u=0,f=1,g=2,d=3,y=4,N=5,k=6,b=7,c=8,p=9,v=10,w=11,C=12,T=13,S=14,R=15,j=16,A=17,O=18,H=19,V=21,P=22,Y=23,Q=24,z=25,X=!0,K=!1,B=!1,F=!1,G=!1,Z=!0,ae=!0,me=!0,Ue=!0,De=new Set,ie={},q={};function fe(e,t){le(e,t),le(e+"Capture",t)}function le(e,t){ie[e]&&_("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),ie[e]=t;{var r=e.toLowerCase();q[r]=e,e==="onDoubleClick"&&(q.ondblclick=e)}for(var a=0;a<t.length;a++)De.add(t[a])}var Oe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ke=Object.prototype.hasOwnProperty;function nt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function xe(e){try{return $e(e),!1}catch{return!0}}function $e(e){return""+e}function at(e,t){if(xe(e))return _("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)),$e(e)}function Ge(e){if(xe(e))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",nt(e)),$e(e)}function Ft(e,t){if(xe(e))return _("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)),$e(e)}function Rt(e,t){if(xe(e))return _("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)),$e(e)}function oe(e){if(xe(e))return _("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)),$e(e)}function Te(e){if(xe(e))return _("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)),$e(e)}var Ie=0,Ve=1,tt=2,ot=3,bt=4,ve=5,Ne=6,Qe=":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",ye=Qe+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Fe=new RegExp("^["+Qe+"]["+ye+"]*$"),ze={},Nt={};function Wt(e){return ke.call(Nt,e)?!0:ke.call(ze,e)?!1:Fe.test(e)?(Nt[e]=!0,!0):(ze[e]=!0,_("Invalid attribute name: `%s`",e),!1)}function Gt(e,t,r){return t!==null?t.type===Ie:r?!1:e.length>2&&(e[0]==="o"||e[0]==="O")&&(e[1]==="n"||e[1]==="N")}function Qt(e,t,r,a){if(r!==null&&r.type===Ie)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":{if(a)return!1;if(r!==null)return!r.acceptsBooleans;var m=e.toLowerCase().slice(0,5);return m!=="data-"&&m!=="aria-"}default:return!1}}function Rn(e,t,r,a){if(t===null||typeof t>"u"||Qt(e,t,r,a))return!0;if(a)return!1;if(r!==null)switch(r.type){case ot:return!t;case bt:return t===!1;case ve:return isNaN(t);case Ne:return isNaN(t)||t<1}return!1}function we(e){return J.hasOwnProperty(e)?J[e]:null}function Ye(e,t,r,a,m,E,U){this.acceptsBooleans=t===tt||t===ot||t===bt,this.attributeName=a,this.attributeNamespace=m,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=E,this.removeEmptyString=U}var J={},lt=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];lt.forEach(function(e){J[e]=new Ye(e,Ie,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0],r=e[1];J[t]=new Ye(t,Ve,!1,r,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){J[e]=new Ye(e,tt,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){J[e]=new Ye(e,tt,!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){J[e]=new Ye(e,ot,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){J[e]=new Ye(e,ot,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){J[e]=new Ye(e,bt,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){J[e]=new Ye(e,Ne,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){J[e]=new Ye(e,ve,!1,e.toLowerCase(),null,!1,!1)});var it=/[\-\:]([a-z])/g,Pt=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(it,Pt);J[t]=new Ye(t,Ve,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(it,Pt);J[t]=new Ye(t,Ve,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(it,Pt);J[t]=new Ye(t,Ve,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){J[e]=new Ye(e,Ve,!1,e.toLowerCase(),null,!1,!1)});var pt="xlinkHref";J[pt]=new Ye("xlinkHref",Ve,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){J[e]=new Ye(e,Ve,!1,e.toLowerCase(),null,!0,!0)});var en=/^[\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,It=!1;function Ht(e){!It&&en.test(e)&&(It=!0,_("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 Ut(e,t,r,a){if(a.mustUseProperty){var m=a.propertyName;return e[m]}else{at(r,t),a.sanitizeURL&&Ht(""+r);var E=a.attributeName,U=null;if(a.type===bt){if(e.hasAttribute(E)){var I=e.getAttribute(E);return I===""?!0:Rn(t,r,a,!1)?I:I===""+r?r:I}}else if(e.hasAttribute(E)){if(Rn(t,r,a,!1))return e.getAttribute(E);if(a.type===ot)return r;U=e.getAttribute(E)}return Rn(t,r,a,!1)?U===null?r:U:U===""+r?r:U}}function hn(e,t,r,a){{if(!Wt(t))return;if(!e.hasAttribute(t))return r===void 0?void 0:null;var m=e.getAttribute(t);return at(r,t),m===""+r?r:m}}function _n(e,t,r,a){var m=we(t);if(!Gt(t,m,a)){if(Rn(t,r,m,a)&&(r=null),a||m===null){if(Wt(t)){var E=t;r===null?e.removeAttribute(E):(at(r,t),e.setAttribute(E,""+r))}return}var U=m.mustUseProperty;if(U){var I=m.propertyName;if(r===null){var $=m.type;e[I]=$===ot?!1:""}else e[I]=r;return}var te=m.attributeName,re=m.attributeNamespace;if(r===null)e.removeAttribute(te);else{var be=m.type,ge;be===ot||be===bt&&r===!0?ge="":(at(r,te),ge=""+r,m.sanitizeURL&&Ht(ge.toString())),re?e.setAttributeNS(re,te,ge):e.setAttribute(te,ge)}}}var Xt=Symbol.for("react.element"),jn=Symbol.for("react.portal"),Nr=Symbol.for("react.fragment"),Or=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),rt=Symbol.for("react.provider"),mt=Symbol.for("react.context"),Se=Symbol.for("react.forward_ref"),ct=Symbol.for("react.suspense"),ft=Symbol.for("react.suspense_list"),Le=Symbol.for("react.memo"),Ct=Symbol.for("react.lazy"),Bn=Symbol.for("react.scope"),tn=Symbol.for("react.debug_trace_mode"),nn=Symbol.for("react.offscreen"),Xn=Symbol.for("react.legacy_hidden"),Lt=Symbol.for("react.cache"),zt=Symbol.for("react.tracing_marker"),Sn=Symbol.iterator,hr="@@iterator";function $n(e){if(e===null||typeof e!="object")return null;var t=Sn&&e[Sn]||e[hr];return typeof t=="function"?t:null}var Jt=Object.assign,yr=0,Wn,gt,se,Ae,vt,on,Yt;function ue(){}ue.__reactDisabledLog=!0;function Ze(){{if(yr===0){Wn=console.log,gt=console.info,se=console.warn,Ae=console.error,vt=console.group,on=console.groupCollapsed,Yt=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ue,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}yr++}}function st(){{if(yr--,yr===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Jt({},e,{value:Wn}),info:Jt({},e,{value:gt}),warn:Jt({},e,{value:se}),error:Jt({},e,{value:Ae}),group:Jt({},e,{value:vt}),groupCollapsed:Jt({},e,{value:on}),groupEnd:Jt({},e,{value:Yt})})}yr<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var yt=l.ReactCurrentDispatcher,xn;function Kt(e,t,r){{if(xn===void 0)try{throw Error()}catch(m){var a=m.stack.trim().match(/\n( *(at )?)/);xn=a&&a[1]||""}return`
71
+ `+xn+e}}var fr=!1,Tn;{var pr=typeof WeakMap=="function"?WeakMap:Map;Tn=new pr}function vr(e,t){if(!e||fr)return"";{var r=Tn.get(e);if(r!==void 0)return r}var a;fr=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var E;E=yt.current,yt.current=null,Ze();try{if(t){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(Me){a=Me}Reflect.construct(e,[],U)}else{try{U.call()}catch(Me){a=Me}e.call(U.prototype)}}else{try{throw Error()}catch(Me){a=Me}e()}}catch(Me){if(Me&&a&&typeof Me.stack=="string"){for(var I=Me.stack.split(`
72
+ `),$=a.stack.split(`
73
+ `),te=I.length-1,re=$.length-1;te>=1&&re>=0&&I[te]!==$[re];)re--;for(;te>=1&&re>=0;te--,re--)if(I[te]!==$[re]){if(te!==1||re!==1)do if(te--,re--,re<0||I[te]!==$[re]){var be=`
74
+ `+I[te].replace(" at new "," at ");return e.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",e.displayName)),typeof e=="function"&&Tn.set(e,be),be}while(te>=1&&re>=0);break}}}finally{fr=!1,yt.current=E,st(),Error.prepareStackTrace=m}var ge=e?e.displayName||e.name:"",Re=ge?Kt(ge):"";return typeof e=="function"&&Tn.set(e,Re),Re}function ki(e,t,r){return vr(e,!0)}function pi(e,t,r){return vr(e,!1)}function Ir(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function ci(e,t,r){if(e==null)return"";if(typeof e=="function")return vr(e,Ir(e));if(typeof e=="string")return Kt(e);switch(e){case ct:return Kt("Suspense");case ft:return Kt("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case Se:return pi(e.render);case Le:return ci(e.type,t,r);case Ct:{var a=e,m=a._payload,E=a._init;try{return ci(E(m),t,r)}catch{}}}return""}function rr(e){switch(e._debugOwner&&e._debugOwner.type,e._debugSource,e.tag){case N:return Kt(e.type);case j:return Kt("Lazy");case T:return Kt("Suspense");case H:return Kt("SuspenseList");case u:case g:case R:return pi(e.type);case w:return pi(e.type.render);case f:return ki(e.type);default:return""}}function Fr(e){try{var t="",r=e;do t+=rr(r),r=r.return;while(r);return t}catch(a){return`
75
+ Error generating stack: `+a.message+`
76
+ `+a.stack}}function bs(e,t,r){var a=e.displayName;if(a)return a;var m=t.displayName||t.name||"";return m!==""?r+"("+m+")":r}function Qi(e){return e.displayName||"Context"}function Nn(e){if(e==null)return null;if(typeof e.tag=="number"&&_("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 Nr:return"Fragment";case jn:return"Portal";case ce:return"Profiler";case Or:return"StrictMode";case ct:return"Suspense";case ft:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mt:var t=e;return Qi(t)+".Consumer";case rt:var r=e;return Qi(r._context)+".Provider";case Se:return bs(e,e.render,"ForwardRef");case Le:var a=e.displayName||null;return a!==null?a:Nn(e.type)||"Memo";case Ct:{var m=e,E=m._payload,U=m._init;try{return Nn(U(E))}catch{return null}}}return null}function es(e,t,r){var a=t.displayName||t.name||"";return e.displayName||(a!==""?r+"("+a+")":r)}function Vr(e){return e.displayName||"Context"}function ne(e){var t=e.tag,r=e.type;switch(t){case Q:return"Cache";case p:var a=r;return Vr(a)+".Consumer";case v:var m=r;return Vr(m._context)+".Provider";case O:return"DehydratedFragment";case w:return es(r,r.render,"ForwardRef");case b:return"Fragment";case N:return r;case y:return"Portal";case d:return"Root";case k:return"Text";case j:return Nn(r);case c:return r===Or?"StrictMode":"Mode";case P:return"Offscreen";case C:return"Profiler";case V:return"Scope";case T:return"Suspense";case H:return"SuspenseList";case z:return"TracingMarker";case f:case u:case A:case g:case S:case R:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;break}return null}var He=l.ReactDebugCurrentFrame,Je=null,rn=!1;function zn(){{if(Je===null)return null;var e=Je._debugOwner;if(e!==null&&typeof e<"u")return ne(e)}return null}function kr(){return Je===null?"":Fr(Je)}function ir(){He.getCurrentStack=null,Je=null,rn=!1}function un(e){He.getCurrentStack=e===null?null:kr,Je=e,rn=!1}function gr(){return Je}function sr(e){rn=e}function ln(e){return""+e}function Cn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return Te(e),e;default:return""}}var An={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function Rr(e,t){An[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||_("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||_("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 Kr(e){var t=e.type,r=e.nodeName;return r&&r.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Hr(e){return e._valueTracker}function zr(e){e._valueTracker=null}function as(e){var t="";return e&&(Kr(e)?t=e.checked?"true":"false":t=e.value),t}function ui(e){var t=Kr(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);Te(e[t]);var a=""+e[t];if(!(e.hasOwnProperty(t)||typeof r>"u"||typeof r.get!="function"||typeof r.set!="function")){var m=r.get,E=r.set;Object.defineProperty(e,t,{configurable:!0,get:function(){return m.call(this)},set:function(I){Te(I),a=""+I,E.call(this,I)}}),Object.defineProperty(e,t,{enumerable:r.enumerable});var U={getValue:function(){return a},setValue:function(I){Te(I),a=""+I},stopTracking:function(){zr(e),delete e[t]}};return U}}function Tr(e){Hr(e)||(e._valueTracker=ui(e))}function Sr(e){if(!e)return!1;var t=Hr(e);if(!t)return!0;var r=t.getValue(),a=as(e);return a!==r?(t.setValue(a),!0):!1}function Xr(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 Cr=!1,Jr=!1,Ri=!1,Ti=!1;function os(e){var t=e.type==="checkbox"||e.type==="radio";return t?e.checked!=null:e.value!=null}function vi(e,t){var r=e,a=t.checked,m=Jt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??r._wrapperState.initialChecked});return m}function fa(e,t){Rr("input",t),t.checked!==void 0&&t.defaultChecked!==void 0&&!Jr&&(_("%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",zn()||"A component",t.type),Jr=!0),t.value!==void 0&&t.defaultValue!==void 0&&!Cr&&(_("%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",zn()||"A component",t.type),Cr=!0);var r=e,a=t.defaultValue==null?"":t.defaultValue;r._wrapperState={initialChecked:t.checked!=null?t.checked:t.defaultChecked,initialValue:Cn(t.value!=null?t.value:a),controlled:os(t)}}function W(e,t){var r=e,a=t.checked;a!=null&&_n(r,"checked",a,!1)}function he(e,t){var r=e;{var a=os(t);!r._wrapperState.controlled&&a&&!Ti&&(_("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"),Ti=!0),r._wrapperState.controlled&&!a&&!Ri&&(_("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"),Ri=!0)}W(e,t);var m=Cn(t.value),E=t.type;if(m!=null)E==="number"?(m===0&&r.value===""||r.value!=m)&&(r.value=ln(m)):r.value!==ln(m)&&(r.value=ln(m));else if(E==="submit"||E==="reset"){r.removeAttribute("value");return}t.hasOwnProperty("value")?qt(r,t.type,m):t.hasOwnProperty("defaultValue")&&qt(r,t.type,Cn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(r.defaultChecked=!!t.defaultChecked)}function pe(e,t,r){var a=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var m=t.type,E=m==="submit"||m==="reset";if(E&&(t.value===void 0||t.value===null))return;var U=ln(a._wrapperState.initialValue);r||U!==a.value&&(a.value=U),a.defaultValue=U}var I=a.name;I!==""&&(a.name=""),a.defaultChecked=!a.defaultChecked,a.defaultChecked=!!a._wrapperState.initialChecked,I!==""&&(a.name=I)}function Be(e,t){var r=e;he(r,t),dt(r,t)}function dt(e,t){var r=t.name;if(t.type==="radio"&&r!=null){for(var a=e;a.parentNode;)a=a.parentNode;at(r,"name");for(var m=a.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),E=0;E<m.length;E++){var U=m[E];if(!(U===e||U.form!==e.form)){var I=om(U);if(!I)throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Sr(U),he(U,I)}}}}function qt(e,t,r){(t!=="number"||Xr(e.ownerDocument)!==e)&&(r==null?e.defaultValue=ln(e._wrapperState.initialValue):e.defaultValue!==ln(r)&&(e.defaultValue=ln(r)))}var jt=!1,an=!1,wn=!1;function On(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?n.Children.forEach(t.children,function(r){r!=null&&(typeof r=="string"||typeof r=="number"||an||(an=!0,_("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}):t.dangerouslySetInnerHTML!=null&&(wn||(wn=!0,_("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),t.selected!=null&&!jt&&(_("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),jt=!0)}function Vn(e,t){t.value!=null&&e.setAttribute("value",ln(Cn(t.value)))}var Qn=Array.isArray;function gn(e){return Qn(e)}var ur;ur=!1;function xr(){var e=zn();return e?`
77
+
78
+ Check the render method of \``+e+"`.":""}var Ts=["value","defaultValue"];function Ys(e){{Rr("select",e);for(var t=0;t<Ts.length;t++){var r=Ts[t];if(e[r]!=null){var a=gn(e[r]);e.multiple&&!a?_("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",r,xr()):!e.multiple&&a&&_("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",r,xr())}}}}function Lr(e,t,r,a){var m=e.options;if(t){for(var E=r,U={},I=0;I<E.length;I++)U["$"+E[I]]=!0;for(var $=0;$<m.length;$++){var te=U.hasOwnProperty("$"+m[$].value);m[$].selected!==te&&(m[$].selected=te),te&&a&&(m[$].defaultSelected=!0)}}else{for(var re=ln(Cn(r)),be=null,ge=0;ge<m.length;ge++){if(m[ge].value===re){m[ge].selected=!0,a&&(m[ge].defaultSelected=!0);return}be===null&&!m[ge].disabled&&(be=m[ge])}be!==null&&(be.selected=!0)}}function Hi(e,t){return Jt({},t,{value:void 0})}function qs(e,t){var r=e;Ys(t),r._wrapperState={wasMultiple:!!t.multiple},t.value!==void 0&&t.defaultValue!==void 0&&!ur&&(_("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"),ur=!0)}function $r(e,t){var r=e;r.multiple=!!t.multiple;var a=t.value;a!=null?Lr(r,!!t.multiple,a,!1):t.defaultValue!=null&&Lr(r,!!t.multiple,t.defaultValue,!0)}function zi(e,t){var r=e,a=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!t.multiple;var m=t.value;m!=null?Lr(r,!!t.multiple,m,!1):a!==!!t.multiple&&(t.defaultValue!=null?Lr(r,!!t.multiple,t.defaultValue,!0):Lr(r,!!t.multiple,t.multiple?[]:"",!1))}function pa(e,t){var r=e,a=t.value;a!=null&&Lr(r,!!t.multiple,a,!1)}var Do=!1;function Li(e,t){var r=e;if(t.dangerouslySetInnerHTML!=null)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var a=Jt({},t,{value:void 0,defaultValue:void 0,children:ln(r._wrapperState.initialValue)});return a}function Ha(e,t){var r=e;Rr("textarea",t),t.value!==void 0&&t.defaultValue!==void 0&&!Do&&(_("%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",zn()||"A component"),Do=!0);var a=t.value;if(a==null){var m=t.children,E=t.defaultValue;if(m!=null){_("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(E!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(gn(m)){if(m.length>1)throw new Error("<textarea> can only have at most one child.");m=m[0]}E=m}}E==null&&(E=""),a=E}r._wrapperState={initialValue:Cn(a)}}function ko(e,t){var r=e,a=Cn(t.value),m=Cn(t.defaultValue);if(a!=null){var E=ln(a);E!==r.value&&(r.value=E),t.defaultValue==null&&r.defaultValue!==E&&(r.defaultValue=E)}m!=null&&(r.defaultValue=ln(m))}function za(e,t){var r=e,a=r.textContent;a===r._wrapperState.initialValue&&a!==""&&a!==null&&(r.value=a)}function Lc(e,t){ko(e,t)}var Zr="http://www.w3.org/1999/xhtml",Nl="http://www.w3.org/1998/Math/MathML",Ce="http://www.w3.org/2000/svg";function _t(e){switch(e){case"svg":return Ce;case"math":return Nl;default:return Zr}}function At(e,t){return e==null||e===Zr?_t(t):e===Ce&&t==="foreignObject"?Zr:e}var yn=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,a,m){MSApp.execUnsafeLocalFunction(function(){return e(t,r,a,m)})}:e},Pn,er=yn(function(e,t){if(e.namespaceURI===Ce&&!("innerHTML"in e)){Pn=Pn||document.createElement("div"),Pn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";for(var r=Pn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;r.firstChild;)e.appendChild(r.firstChild);return}e.innerHTML=t}),Mn=1,Bt=3,dn=8,Br=9,gi=11,Ai=function(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===Bt){r.nodeValue=t;return}}e.textContent=t},_s={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"]},Mi={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 va(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var Er=["Webkit","ms","Moz","O"];Object.keys(Mi).forEach(function(e){Er.forEach(function(t){Mi[va(t,e)]=Mi[e]})});function Gn(e,t,r){var a=t==null||typeof t=="boolean"||t==="";return a?"":!r&&typeof t=="number"&&t!==0&&!(Mi.hasOwnProperty(e)&&Mi[e])?t+"px":(Rt(t,e),(""+t).trim())}var ws=/([A-Z])/g,sh=/^ms-/;function fp(e){return e.replace(ws,"-$1").toLowerCase().replace(sh,"-ms-")}var Sl=function(){};{var Ac=/^(?:webkit|moz|o)[A-Z]/,Mc=/^-ms-/,Uc=/-(.)/g,Oc=/;\s*$/,$a={},Vc={},Ro=!1,Bc=!1,ah=function(e){return e.replace(Uc,function(t,r){return r.toUpperCase()})},Pc=function(e){$a.hasOwnProperty(e)&&$a[e]||($a[e]=!0,_("Unsupported style property %s. Did you mean %s?",e,ah(e.replace(Mc,"ms-"))))},pp=function(e){$a.hasOwnProperty(e)&&$a[e]||($a[e]=!0,_("Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))},Ic=function(e,t){Vc.hasOwnProperty(t)&&Vc[t]||(Vc[t]=!0,_(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,e,t.replace(Oc,"")))},vp=function(e,t){Ro||(Ro=!0,_("`NaN` is an invalid value for the `%s` css style property.",e))},gp=function(e,t){Bc||(Bc=!0,_("`Infinity` is an invalid value for the `%s` css style property.",e))};Sl=function(e,t){e.indexOf("-")>-1?Pc(e):Ac.test(e)?pp(e):Oc.test(t)&&Ic(e,t),typeof t=="number"&&(isNaN(t)?vp(e,t):isFinite(t)||gp(e,t))}}var oh=Sl;function lh(e){{var t="",r="";for(var a in e)if(e.hasOwnProperty(a)){var m=e[a];if(m!=null){var E=a.indexOf("--")===0;t+=r+(E?a:fp(a))+":",t+=Gn(a,m,E),r=";"}}return t||null}}function ch(e,t){var r=e.style;for(var a in t)if(t.hasOwnProperty(a)){var m=a.indexOf("--")===0;m||oh(a,t[a]);var E=Gn(a,t[a],m);a==="float"&&(a="cssFloat"),m?r.setProperty(a,E):r[a]=E}}function bp(e){return e==null||typeof e=="boolean"||e===""}function uh(e){var t={};for(var r in e)for(var a=_s[r]||[r],m=0;m<a.length;m++)t[a[m]]=r;return t}function _p(e,t){{if(!t)return;var r=uh(e),a=uh(t),m={};for(var E in r){var U=r[E],I=a[E];if(I&&U!==I){var $=U+","+I;if(m[$])continue;m[$]=!0,_("%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.",bp(e[U])?"Removing":"Updating",U,I)}}}}var Cl={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},wp=Jt({menuitem:!0},Cl),Fc="__html";function Hc(e,t){if(t){if(wp[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"||!(Fc 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&&_("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 Ls(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 Ks={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"},Wa={"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},Ga={},dh=new RegExp("^(aria)-["+ye+"]*$"),hh=new RegExp("^(aria)[A-Z]["+ye+"]*$");function yp(e,t){{if(ke.call(Ga,t)&&Ga[t])return!0;if(hh.test(t)){var r="aria-"+t.slice(4).toLowerCase(),a=Wa.hasOwnProperty(r)?r:null;if(a==null)return _("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Ga[t]=!0,!0;if(t!==a)return _("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,a),Ga[t]=!0,!0}if(dh.test(t)){var m=t.toLowerCase(),E=Wa.hasOwnProperty(m)?m:null;if(E==null)return Ga[t]=!0,!1;if(t!==E)return _("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,E),Ga[t]=!0,!0}}return!0}function mh(e,t){{var r=[];for(var a in t){var m=yp(e,a);m||r.push(a)}var E=r.map(function(U){return"`"+U+"`"}).join(", ");r.length===1?_("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",E,e):r.length>1&&_("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",E,e)}}function fh(e,t){Ls(e,t)||mh(e,t)}var zc=!1;function xp(e,t){{if(e!=="input"&&e!=="textarea"&&e!=="select")return;t!=null&&t.value===null&&!zc&&(zc=!0,e==="select"&&t.multiple?_("`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):_("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e))}}var ph=function(){};{var bi={},$c=/^on./,Np=/^on[^A-Z]/,Sp=new RegExp("^(aria)-["+ye+"]*$"),Cp=new RegExp("^(aria)[A-Z]["+ye+"]*$");ph=function(e,t,r,a){if(ke.call(bi,t)&&bi[t])return!0;var m=t.toLowerCase();if(m==="onfocusin"||m==="onfocusout")return _("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."),bi[t]=!0,!0;if(a!=null){var E=a.registrationNameDependencies,U=a.possibleRegistrationNames;if(E.hasOwnProperty(t))return!0;var I=U.hasOwnProperty(m)?U[m]:null;if(I!=null)return _("Invalid event handler property `%s`. Did you mean `%s`?",t,I),bi[t]=!0,!0;if($c.test(t))return _("Unknown event handler property `%s`. It will be ignored.",t),bi[t]=!0,!0}else if($c.test(t))return Np.test(t)&&_("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),bi[t]=!0,!0;if(Sp.test(t)||Cp.test(t))return!0;if(m==="innerhtml")return _("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),bi[t]=!0,!0;if(m==="aria")return _("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),bi[t]=!0,!0;if(m==="is"&&r!==null&&r!==void 0&&typeof r!="string")return _("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof r),bi[t]=!0,!0;if(typeof r=="number"&&isNaN(r))return _("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),bi[t]=!0,!0;var $=we(t),te=$!==null&&$.type===Ie;if(Ks.hasOwnProperty(m)){var re=Ks[m];if(re!==t)return _("Invalid DOM property `%s`. Did you mean `%s`?",t,re),bi[t]=!0,!0}else if(!te&&t!==m)return _("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,m),bi[t]=!0,!0;return typeof r=="boolean"&&Qt(t,r,$,!1)?(r?_('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',r,t,t,r,t):_('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',r,t,t,r,t,t,t),bi[t]=!0,!0):te?!0:Qt(t,r,$,!1)?(bi[t]=!0,!1):((r==="false"||r==="true")&&$!==null&&$.type===ot&&(_("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",r,t,r==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,r),bi[t]=!0),!0)}}var Ep=function(e,t,r){{var a=[];for(var m in t){var E=ph(e,m,t[m],r);E||a.push(m)}var U=a.map(function(I){return"`"+I+"`"}).join(", ");a.length===1?_("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 ",U,e):a.length>1&&_("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 ",U,e)}};function jp(e,t,r){Ls(e,t)||Ep(e,t,r)}var vh=1,Wc=2,Ya=4,gh=vh|Wc|Ya,qa=null;function bh(e){qa!==null&&_("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),qa=e}function _h(){qa===null&&_("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),qa=null}function wh(e){return e===qa}function El(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===Bt?t.parentNode:t}var jl=null,ga=null,ba=null;function Gc(e){var t=so(e);if(t){if(typeof jl!="function")throw new Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var r=t.stateNode;if(r){var a=om(r);jl(t.stateNode,t.type,a)}}}function yh(e){jl=e}function Yc(e){ga?ba?ba.push(e):ba=[e]:ga=e}function xh(){return ga!==null||ba!==null}function qc(){if(ga){var e=ga,t=ba;if(ga=null,ba=null,Gc(e),t)for(var r=0;r<t.length;r++)Gc(t[r])}}var Kc=function(e,t){return e(t)},Xc=function(){},Dl=!1;function Nh(){var e=xh();e&&(Xc(),qc())}function Jc(e,t,r){if(Dl)return e(t,r);Dl=!0;try{return Kc(e,t,r)}finally{Dl=!1,Nh()}}function Sh(e,t,r){Kc=e,Xc=r}function Ch(e){return e==="button"||e==="input"||e==="select"||e==="textarea"}function Eh(e,t,r){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!!(r.disabled&&Ch(t));default:return!1}}function Ka(e,t){var r=e.stateNode;if(r===null)return null;var a=om(r);if(a===null)return null;var m=a[t];if(Eh(t,e.type,a))return null;if(m&&typeof m!="function")throw new Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof m+"` type.");return m}var kl=!1;if(Oe)try{var Xa={};Object.defineProperty(Xa,"passive",{get:function(){kl=!0}}),window.addEventListener("test",Xa,Xa),window.removeEventListener("test",Xa,Xa)}catch{kl=!1}function Zc(e,t,r,a,m,E,U,I,$){var te=Array.prototype.slice.call(arguments,3);try{t.apply(r,te)}catch(re){this.onError(re)}}var Qc=Zc;if(typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof document<"u"&&typeof document.createEvent=="function"){var Rl=document.createElement("react");Qc=function(t,r,a,m,E,U,I,$,te){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 re=document.createEvent("Event"),be=!1,ge=!0,Re=window.event,Me=Object.getOwnPropertyDescriptor(window,"event");function Ke(){Rl.removeEventListener(Xe,Zt,!1),typeof window.event<"u"&&window.hasOwnProperty("event")&&(window.event=Re)}var St=Array.prototype.slice.call(arguments,3);function Zt(){be=!0,Ke(),r.apply(a,St),ge=!1}var $t,Hn=!1,Un=!1;function Ee(je){if($t=je.error,Hn=!0,$t===null&&je.colno===0&&je.lineno===0&&(Un=!0),je.defaultPrevented&&$t!=null&&typeof $t=="object")try{$t._suppressLogging=!0}catch{}}var Xe="react-"+(t||"invokeguardedcallback");if(window.addEventListener("error",Ee),Rl.addEventListener(Xe,Zt,!1),re.initEvent(Xe,!1,!1),Rl.dispatchEvent(re),Me&&Object.defineProperty(window,"event",Me),be&&ge&&(Hn?Un&&($t=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.")):$t=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($t)),window.removeEventListener("error",Ee),!be)return Ke(),Zc.apply(this,arguments)}}var jh=Qc,ee=!1,de=null,_e=!1,We=null,qe={onError:function(e){ee=!0,de=e}};function Pe(e,t,r,a,m,E,U,I,$){ee=!1,de=null,jh.apply(qe,arguments)}function wt(e,t,r,a,m,E,U,I,$){if(Pe.apply(this,arguments),ee){var te=jr();_e||(_e=!0,We=te)}}function Mt(){if(_e){var e=We;throw _e=!1,We=null,e}}function fn(){return ee}function jr(){if(ee){var e=de;return ee=!1,de=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 Yn(e){return e._reactInternals}function Wr(e){return e._reactInternals!==void 0}function ys(e,t){e._reactInternals=t}var Ot=0,Tl=1,Gr=2,Jn=4,To=16,eu=32,Qw=64,Zn=128,_a=256,Lo=512,Ll=1024,Ja=2048,wa=4096,Ao=8192,Dp=16384,Yj=32767,Dh=32768,$i=65536,kp=131072,ey=1048576,Rp=2097152,Mo=4194304,Tp=8388608,Za=16777216,Lp=33554432,Ap=Jn|Ll|0,Mp=Gr|Jn|To|eu|Lo|wa|Ao,tu=Jn|Qw|Lo|Ao,Al=Ja|To,ya=Mo|Tp|Rp,qj=l.ReactCurrentOwner;function Uo(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{var a=t;do t=a,(t.flags&(Gr|wa))!==Ot&&(r=t.return),a=t.return;while(a)}return t.tag===d?r:null}function ty(e){if(e.tag===T){var t=e.memoizedState;if(t===null){var r=e.alternate;r!==null&&(t=r.memoizedState)}if(t!==null)return t.dehydrated}return null}function ny(e){return e.tag===d?e.stateNode.containerInfo:null}function Kj(e){return Uo(e)===e}function Xj(e){{var t=qj.current;if(t!==null&&t.tag===f){var r=t,a=r.stateNode;a._warnedAboutRefsInRender||_("%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.",ne(r)||"A component"),a._warnedAboutRefsInRender=!0}}var m=Yn(e);return m?Uo(m)===m:!1}function ry(e){if(Uo(e)!==e)throw new Error("Unable to find node on an unmounted component.")}function iy(e){var t=e.alternate;if(!t){var r=Uo(e);if(r===null)throw new Error("Unable to find node on an unmounted component.");return r!==e?null:e}for(var a=e,m=t;;){var E=a.return;if(E===null)break;var U=E.alternate;if(U===null){var I=E.return;if(I!==null){a=m=I;continue}break}if(E.child===U.child){for(var $=E.child;$;){if($===a)return ry(E),e;if($===m)return ry(E),t;$=$.sibling}throw new Error("Unable to find node on an unmounted component.")}if(a.return!==m.return)a=E,m=U;else{for(var te=!1,re=E.child;re;){if(re===a){te=!0,a=E,m=U;break}if(re===m){te=!0,m=E,a=U;break}re=re.sibling}if(!te){for(re=U.child;re;){if(re===a){te=!0,a=U,m=E;break}if(re===m){te=!0,m=U,a=E;break}re=re.sibling}if(!te)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(a.alternate!==m)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(a.tag!==d)throw new Error("Unable to find node on an unmounted component.");return a.stateNode.current===a?e:t}function sy(e){var t=iy(e);return t!==null?ay(t):null}function ay(e){if(e.tag===N||e.tag===k)return e;for(var t=e.child;t!==null;){var r=ay(t);if(r!==null)return r;t=t.sibling}return null}function Jj(e){var t=iy(e);return t!==null?oy(t):null}function oy(e){if(e.tag===N||e.tag===k)return e;for(var t=e.child;t!==null;){if(t.tag!==y){var r=oy(t);if(r!==null)return r}t=t.sibling}return null}var ly=i.unstable_scheduleCallback,Zj=i.unstable_cancelCallback,Qj=i.unstable_shouldYield,eD=i.unstable_requestPaint,di=i.unstable_now,tD=i.unstable_getCurrentPriorityLevel,kh=i.unstable_ImmediatePriority,Up=i.unstable_UserBlockingPriority,Oo=i.unstable_NormalPriority,nD=i.unstable_LowPriority,Op=i.unstable_IdlePriority,rD=i.unstable_yieldValue,iD=i.unstable_setDisableYieldValue,Ml=null,Ui=null,Dt=null,Xs=!1,As=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function sD(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 _("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{ae&&(e=Jt({},e,{getLaneLabelMap:dD,injectProfilingHooks:uD})),Ml=t.inject(e),Ui=t}catch(r){_("React instrumentation encountered an error: %s.",r)}return!!t.checkDCE}function aD(e,t){if(Ui&&typeof Ui.onScheduleFiberRoot=="function")try{Ui.onScheduleFiberRoot(Ml,e,t)}catch(r){Xs||(Xs=!0,_("React instrumentation encountered an error: %s",r))}}function oD(e,t){if(Ui&&typeof Ui.onCommitFiberRoot=="function")try{var r=(e.current.flags&Zn)===Zn;if(me){var a;switch(t){case us:a=kh;break;case Na:a=Up;break;case Sa:a=Oo;break;case Oh:a=Op;break;default:a=Oo;break}Ui.onCommitFiberRoot(Ml,e,a,r)}}catch(m){Xs||(Xs=!0,_("React instrumentation encountered an error: %s",m))}}function lD(e){if(Ui&&typeof Ui.onPostCommitFiberRoot=="function")try{Ui.onPostCommitFiberRoot(Ml,e)}catch(t){Xs||(Xs=!0,_("React instrumentation encountered an error: %s",t))}}function cD(e){if(Ui&&typeof Ui.onCommitFiberUnmount=="function")try{Ui.onCommitFiberUnmount(Ml,e)}catch(t){Xs||(Xs=!0,_("React instrumentation encountered an error: %s",t))}}function hi(e){if(typeof rD=="function"&&(iD(e),x(e)),Ui&&typeof Ui.setStrictMode=="function")try{Ui.setStrictMode(Ml,e)}catch(t){Xs||(Xs=!0,_("React instrumentation encountered an error: %s",t))}}function uD(e){Dt=e}function dD(){{for(var e=new Map,t=1,r=0;r<Bp;r++){var a=TD(t);e.set(t,a),t*=2}return e}}function hD(e){Dt!==null&&typeof Dt.markCommitStarted=="function"&&Dt.markCommitStarted(e)}function cy(){Dt!==null&&typeof Dt.markCommitStopped=="function"&&Dt.markCommitStopped()}function nu(e){Dt!==null&&typeof Dt.markComponentRenderStarted=="function"&&Dt.markComponentRenderStarted(e)}function Ul(){Dt!==null&&typeof Dt.markComponentRenderStopped=="function"&&Dt.markComponentRenderStopped()}function mD(e){Dt!==null&&typeof Dt.markComponentPassiveEffectMountStarted=="function"&&Dt.markComponentPassiveEffectMountStarted(e)}function fD(){Dt!==null&&typeof Dt.markComponentPassiveEffectMountStopped=="function"&&Dt.markComponentPassiveEffectMountStopped()}function pD(e){Dt!==null&&typeof Dt.markComponentPassiveEffectUnmountStarted=="function"&&Dt.markComponentPassiveEffectUnmountStarted(e)}function vD(){Dt!==null&&typeof Dt.markComponentPassiveEffectUnmountStopped=="function"&&Dt.markComponentPassiveEffectUnmountStopped()}function gD(e){Dt!==null&&typeof Dt.markComponentLayoutEffectMountStarted=="function"&&Dt.markComponentLayoutEffectMountStarted(e)}function bD(){Dt!==null&&typeof Dt.markComponentLayoutEffectMountStopped=="function"&&Dt.markComponentLayoutEffectMountStopped()}function uy(e){Dt!==null&&typeof Dt.markComponentLayoutEffectUnmountStarted=="function"&&Dt.markComponentLayoutEffectUnmountStarted(e)}function dy(){Dt!==null&&typeof Dt.markComponentLayoutEffectUnmountStopped=="function"&&Dt.markComponentLayoutEffectUnmountStopped()}function _D(e,t,r){Dt!==null&&typeof Dt.markComponentErrored=="function"&&Dt.markComponentErrored(e,t,r)}function wD(e,t,r){Dt!==null&&typeof Dt.markComponentSuspended=="function"&&Dt.markComponentSuspended(e,t,r)}function yD(e){Dt!==null&&typeof Dt.markLayoutEffectsStarted=="function"&&Dt.markLayoutEffectsStarted(e)}function xD(){Dt!==null&&typeof Dt.markLayoutEffectsStopped=="function"&&Dt.markLayoutEffectsStopped()}function ND(e){Dt!==null&&typeof Dt.markPassiveEffectsStarted=="function"&&Dt.markPassiveEffectsStarted(e)}function SD(){Dt!==null&&typeof Dt.markPassiveEffectsStopped=="function"&&Dt.markPassiveEffectsStopped()}function hy(e){Dt!==null&&typeof Dt.markRenderStarted=="function"&&Dt.markRenderStarted(e)}function CD(){Dt!==null&&typeof Dt.markRenderYielded=="function"&&Dt.markRenderYielded()}function my(){Dt!==null&&typeof Dt.markRenderStopped=="function"&&Dt.markRenderStopped()}function ED(e){Dt!==null&&typeof Dt.markRenderScheduled=="function"&&Dt.markRenderScheduled(e)}function jD(e,t){Dt!==null&&typeof Dt.markForceUpdateScheduled=="function"&&Dt.markForceUpdateScheduled(e,t)}function Vp(e,t){Dt!==null&&typeof Dt.markStateUpdateScheduled=="function"&&Dt.markStateUpdateScheduled(e,t)}var sn=0,In=1,ar=2,Ar=8,Js=16,fy=Math.clz32?Math.clz32:RD,DD=Math.log,kD=Math.LN2;function RD(e){var t=e>>>0;return t===0?32:31-(DD(t)/kD|0)|0}var Bp=31,ut=0,mi=0,pn=1,Ol=2,xa=4,Vo=8,Zs=16,ru=32,Vl=4194240,iu=64,Pp=128,Ip=256,Fp=512,Hp=1024,zp=2048,$p=4096,Wp=8192,Gp=16384,Yp=32768,qp=65536,Kp=131072,Xp=262144,Jp=524288,Zp=1048576,Qp=2097152,Rh=130023424,Bl=4194304,ev=8388608,tv=16777216,nv=33554432,rv=67108864,py=Bl,su=134217728,vy=268435455,au=268435456,Bo=536870912,ls=1073741824;function TD(e){{if(e&pn)return"Sync";if(e&Ol)return"InputContinuousHydration";if(e&xa)return"InputContinuous";if(e&Vo)return"DefaultHydration";if(e&Zs)return"Default";if(e&ru)return"TransitionHydration";if(e&Vl)return"Transition";if(e&Rh)return"Retry";if(e&su)return"SelectiveHydration";if(e&au)return"IdleHydration";if(e&Bo)return"Idle";if(e&ls)return"Offscreen"}}var br=-1,Th=iu,Lh=Bl;function ou(e){switch(Po(e)){case pn:return pn;case Ol:return Ol;case xa:return xa;case Vo:return Vo;case Zs:return Zs;case ru:return ru;case iu:case Pp:case Ip:case Fp:case Hp:case zp:case $p:case Wp:case Gp:case Yp:case qp:case Kp:case Xp:case Jp:case Zp:case Qp:return e&Vl;case Bl:case ev:case tv:case nv:case rv:return e&Rh;case su:return su;case au:return au;case Bo:return Bo;case ls:return ls;default:return _("Should have found matching lanes. This is a bug in React."),e}}function Ah(e,t){var r=e.pendingLanes;if(r===ut)return ut;var a=ut,m=e.suspendedLanes,E=e.pingedLanes,U=r&vy;if(U!==ut){var I=U&~m;if(I!==ut)a=ou(I);else{var $=U&E;$!==ut&&(a=ou($))}}else{var te=r&~m;te!==ut?a=ou(te):E!==ut&&(a=ou(E))}if(a===ut)return ut;if(t!==ut&&t!==a&&(t&m)===ut){var re=Po(a),be=Po(t);if(re>=be||re===Zs&&(be&Vl)!==ut)return t}(a&xa)!==ut&&(a|=r&Zs);var ge=e.entangledLanes;if(ge!==ut)for(var Re=e.entanglements,Me=a&ge;Me>0;){var Ke=Io(Me),St=1<<Ke;a|=Re[Ke],Me&=~St}return a}function LD(e,t){for(var r=e.eventTimes,a=br;t>0;){var m=Io(t),E=1<<m,U=r[m];U>a&&(a=U),t&=~E}return a}function AD(e,t){switch(e){case pn:case Ol:case xa:return t+250;case Vo:case Zs:case ru:case iu:case Pp:case Ip:case Fp:case Hp:case zp:case $p:case Wp:case Gp:case Yp:case qp:case Kp:case Xp:case Jp:case Zp:case Qp:return t+5e3;case Bl:case ev:case tv:case nv:case rv:return br;case su:case au:case Bo:case ls:return br;default:return _("Should have found matching lanes. This is a bug in React."),br}}function MD(e,t){for(var r=e.pendingLanes,a=e.suspendedLanes,m=e.pingedLanes,E=e.expirationTimes,U=r;U>0;){var I=Io(U),$=1<<I,te=E[I];te===br?(($&a)===ut||($&m)!==ut)&&(E[I]=AD($,t)):te<=t&&(e.expiredLanes|=$),U&=~$}}function UD(e){return ou(e.pendingLanes)}function iv(e){var t=e.pendingLanes&~ls;return t!==ut?t:t&ls?ls:ut}function OD(e){return(e&pn)!==ut}function sv(e){return(e&vy)!==ut}function gy(e){return(e&Rh)===e}function VD(e){var t=pn|xa|Zs;return(e&t)===ut}function BD(e){return(e&Vl)===e}function Mh(e,t){var r=Ol|xa|Vo|Zs;return(t&r)!==ut}function PD(e,t){return(t&e.expiredLanes)!==ut}function by(e){return(e&Vl)!==ut}function _y(){var e=Th;return Th<<=1,(Th&Vl)===ut&&(Th=iu),e}function ID(){var e=Lh;return Lh<<=1,(Lh&Rh)===ut&&(Lh=Bl),e}function Po(e){return e&-e}function lu(e){return Po(e)}function Io(e){return 31-fy(e)}function av(e){return Io(e)}function cs(e,t){return(e&t)!==ut}function Pl(e,t){return(e&t)===t}function En(e,t){return e|t}function Uh(e,t){return e&~t}function wy(e,t){return e&t}function F6(e){return e}function FD(e,t){return e!==mi&&e<t?e:t}function ov(e){for(var t=[],r=0;r<Bp;r++)t.push(e);return t}function cu(e,t,r){e.pendingLanes|=t,t!==Bo&&(e.suspendedLanes=ut,e.pingedLanes=ut);var a=e.eventTimes,m=av(t);a[m]=r}function HD(e,t){e.suspendedLanes|=t,e.pingedLanes&=~t;for(var r=e.expirationTimes,a=t;a>0;){var m=Io(a),E=1<<m;r[m]=br,a&=~E}}function yy(e,t,r){e.pingedLanes|=e.suspendedLanes&t}function zD(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=ut,e.pingedLanes=ut,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t;for(var a=e.entanglements,m=e.eventTimes,E=e.expirationTimes,U=r;U>0;){var I=Io(U),$=1<<I;a[I]=ut,m[I]=br,E[I]=br,U&=~$}}function lv(e,t){for(var r=e.entangledLanes|=t,a=e.entanglements,m=r;m;){var E=Io(m),U=1<<E;U&t|a[E]&t&&(a[E]|=t),m&=~U}}function $D(e,t){var r=Po(t),a;switch(r){case xa:a=Ol;break;case Zs:a=Vo;break;case iu:case Pp:case Ip:case Fp:case Hp:case zp:case $p:case Wp:case Gp:case Yp:case qp:case Kp:case Xp:case Jp:case Zp:case Qp:case Bl:case ev:case tv:case nv:case rv:a=ru;break;case Bo:a=au;break;default:a=mi;break}return(a&(e.suspendedLanes|t))!==mi?mi:a}function xy(e,t,r){if(As)for(var a=e.pendingUpdatersLaneMap;r>0;){var m=av(r),E=1<<m,U=a[m];U.add(t),r&=~E}}function Ny(e,t){if(As)for(var r=e.pendingUpdatersLaneMap,a=e.memoizedUpdaters;t>0;){var m=av(t),E=1<<m,U=r[m];U.size>0&&(U.forEach(function(I){var $=I.alternate;($===null||!a.has($))&&a.add(I)}),U.clear()),t&=~E}}function Sy(e,t){return null}var us=pn,Na=xa,Sa=Zs,Oh=Bo,uu=mi;function Ms(){return uu}function fi(e){uu=e}function WD(e,t){var r=uu;try{return uu=e,t()}finally{uu=r}}function GD(e,t){return e!==0&&e<t?e:t}function YD(e,t){return e>t?e:t}function cv(e,t){return e!==0&&e<t}function Cy(e){var t=Po(e);return cv(us,t)?cv(Na,t)?sv(t)?Sa:Oh:Na:us}function Vh(e){var t=e.current.memoizedState;return t.isDehydrated}var Ey;function qD(e){Ey=e}function KD(e){Ey(e)}var uv;function XD(e){uv=e}var jy;function JD(e){jy=e}var Dy;function ZD(e){Dy=e}var ky;function QD(e){ky=e}var dv=!1,Bh=[],Qa=null,eo=null,to=null,du=new Map,hu=new Map,no=[],ek=["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 tk(e){return ek.indexOf(e)>-1}function nk(e,t,r,a,m){return{blockedOn:e,domEventName:t,eventSystemFlags:r,nativeEvent:m,targetContainers:[a]}}function Ry(e,t){switch(e){case"focusin":case"focusout":Qa=null;break;case"dragenter":case"dragleave":eo=null;break;case"mouseover":case"mouseout":to=null;break;case"pointerover":case"pointerout":{var r=t.pointerId;du.delete(r);break}case"gotpointercapture":case"lostpointercapture":{var a=t.pointerId;hu.delete(a);break}}}function mu(e,t,r,a,m,E){if(e===null||e.nativeEvent!==E){var U=nk(t,r,a,m,E);if(t!==null){var I=so(t);I!==null&&uv(I)}return U}e.eventSystemFlags|=a;var $=e.targetContainers;return m!==null&&$.indexOf(m)===-1&&$.push(m),e}function rk(e,t,r,a,m){switch(t){case"focusin":{var E=m;return Qa=mu(Qa,e,t,r,a,E),!0}case"dragenter":{var U=m;return eo=mu(eo,e,t,r,a,U),!0}case"mouseover":{var I=m;return to=mu(to,e,t,r,a,I),!0}case"pointerover":{var $=m,te=$.pointerId;return du.set(te,mu(du.get(te)||null,e,t,r,a,$)),!0}case"gotpointercapture":{var re=m,be=re.pointerId;return hu.set(be,mu(hu.get(be)||null,e,t,r,a,re)),!0}}return!1}function Ty(e){var t=zo(e.target);if(t!==null){var r=Uo(t);if(r!==null){var a=r.tag;if(a===T){var m=ty(r);if(m!==null){e.blockedOn=m,ky(e.priority,function(){jy(r)});return}}else if(a===d){var E=r.stateNode;if(Vh(E)){e.blockedOn=ny(r);return}}}}e.blockedOn=null}function ik(e){for(var t=Dy(),r={blockedOn:null,target:e,priority:t},a=0;a<no.length&&cv(t,no[a].priority);a++);no.splice(a,0,r),a===0&&Ty(r)}function Ph(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;t.length>0;){var r=t[0],a=fv(e.domEventName,e.eventSystemFlags,r,e.nativeEvent);if(a===null){var m=e.nativeEvent,E=new m.constructor(m.type,m);bh(E),m.target.dispatchEvent(E),_h()}else{var U=so(a);return U!==null&&uv(U),e.blockedOn=a,!1}t.shift()}return!0}function Ly(e,t,r){Ph(e)&&r.delete(t)}function sk(){dv=!1,Qa!==null&&Ph(Qa)&&(Qa=null),eo!==null&&Ph(eo)&&(eo=null),to!==null&&Ph(to)&&(to=null),du.forEach(Ly),hu.forEach(Ly)}function fu(e,t){e.blockedOn===t&&(e.blockedOn=null,dv||(dv=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,sk)))}function pu(e){if(Bh.length>0){fu(Bh[0],e);for(var t=1;t<Bh.length;t++){var r=Bh[t];r.blockedOn===e&&(r.blockedOn=null)}}Qa!==null&&fu(Qa,e),eo!==null&&fu(eo,e),to!==null&&fu(to,e);var a=function(I){return fu(I,e)};du.forEach(a),hu.forEach(a);for(var m=0;m<no.length;m++){var E=no[m];E.blockedOn===e&&(E.blockedOn=null)}for(;no.length>0;){var U=no[0];if(U.blockedOn!==null)break;Ty(U),U.blockedOn===null&&no.shift()}}var Il=l.ReactCurrentBatchConfig,hv=!0;function Ay(e){hv=!!e}function ak(){return hv}function ok(e,t,r){var a=My(t),m;switch(a){case us:m=lk;break;case Na:m=ck;break;case Sa:default:m=mv;break}return m.bind(null,t,r,e)}function lk(e,t,r,a){var m=Ms(),E=Il.transition;Il.transition=null;try{fi(us),mv(e,t,r,a)}finally{fi(m),Il.transition=E}}function ck(e,t,r,a){var m=Ms(),E=Il.transition;Il.transition=null;try{fi(Na),mv(e,t,r,a)}finally{fi(m),Il.transition=E}}function mv(e,t,r,a){hv&&uk(e,t,r,a)}function uk(e,t,r,a){var m=fv(e,t,r,a);if(m===null){Dv(e,t,a,Ih,r),Ry(e,a);return}if(rk(m,e,t,r,a)){a.stopPropagation();return}if(Ry(e,a),t&Ya&&tk(e)){for(;m!==null;){var E=so(m);E!==null&&KD(E);var U=fv(e,t,r,a);if(U===null&&Dv(e,t,a,Ih,r),U===m)break;m=U}m!==null&&a.stopPropagation();return}Dv(e,t,a,null,r)}var Ih=null;function fv(e,t,r,a){Ih=null;var m=El(a),E=zo(m);if(E!==null){var U=Uo(E);if(U===null)E=null;else{var I=U.tag;if(I===T){var $=ty(U);if($!==null)return $;E=null}else if(I===d){var te=U.stateNode;if(Vh(te))return ny(U);E=null}else U!==E&&(E=null)}}return Ih=E,null}function My(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 us;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 Na;case"message":{var t=tD();switch(t){case kh:return us;case Up:return Na;case Oo:case nD:return Sa;case Op:return Oh;default:return Sa}}default:return Sa}}function dk(e,t,r){return e.addEventListener(t,r,!1),r}function hk(e,t,r){return e.addEventListener(t,r,!0),r}function mk(e,t,r,a){return e.addEventListener(t,r,{capture:!0,passive:a}),r}function fk(e,t,r,a){return e.addEventListener(t,r,{passive:a}),r}var vu=null,pv=null,gu=null;function pk(e){return vu=e,pv=Oy(),!0}function vk(){vu=null,pv=null,gu=null}function Uy(){if(gu)return gu;var e,t=pv,r=t.length,a,m=Oy(),E=m.length;for(e=0;e<r&&t[e]===m[e];e++);var U=r-e;for(a=1;a<=U&&t[r-a]===m[E-a];a++);var I=a>1?1-a:void 0;return gu=m.slice(e,I),gu}function Oy(){return"value"in vu?vu.value:vu.textContent}function Fh(e){var t,r=e.keyCode;return"charCode"in e?(t=e.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),t>=32||t===13?t:0}function Hh(){return!0}function Vy(){return!1}function ds(e){function t(r,a,m,E,U){this._reactName=r,this._targetInst=m,this.type=a,this.nativeEvent=E,this.target=U,this.currentTarget=null;for(var I in e)if(e.hasOwnProperty(I)){var $=e[I];$?this[I]=$(E):this[I]=E[I]}var te=E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1;return te?this.isDefaultPrevented=Hh:this.isDefaultPrevented=Vy,this.isPropagationStopped=Vy,this}return Jt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Hh)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Hh)},persist:function(){},isPersistent:Hh}),t}var Fl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vv=ds(Fl),bu=Jt({},Fl,{view:0,detail:0}),gk=ds(bu),gv,bv,_u;function bk(e){e!==_u&&(_u&&e.type==="mousemove"?(gv=e.screenX-_u.screenX,bv=e.screenY-_u.screenY):(gv=0,bv=0),_u=e)}var zh=Jt({},bu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wv,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:(bk(e),gv)},movementY:function(e){return"movementY"in e?e.movementY:bv}}),By=ds(zh),_k=Jt({},zh,{dataTransfer:0}),wk=ds(_k),yk=Jt({},bu,{relatedTarget:0}),_v=ds(yk),xk=Jt({},Fl,{animationName:0,elapsedTime:0,pseudoElement:0}),Nk=ds(xk),Sk=Jt({},Fl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ck=ds(Sk),Ek=Jt({},Fl,{data:0}),Py=ds(Ek),jk=Py,Dk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kk={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 Rk(e){if(e.key){var t=Dk[e.key]||e.key;if(t!=="Unidentified")return t}if(e.type==="keypress"){var r=Fh(e);return r===13?"Enter":String.fromCharCode(r)}return e.type==="keydown"||e.type==="keyup"?kk[e.keyCode]||"Unidentified":""}var Tk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lk(e){var t=this,r=t.nativeEvent;if(r.getModifierState)return r.getModifierState(e);var a=Tk[e];return a?!!r[a]:!1}function wv(e){return Lk}var Ak=Jt({},bu,{key:Rk,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wv,charCode:function(e){return e.type==="keypress"?Fh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Fh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Mk=ds(Ak),Uk=Jt({},zh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Iy=ds(Uk),Ok=Jt({},bu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wv}),Vk=ds(Ok),Bk=Jt({},Fl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pk=ds(Bk),Ik=Jt({},zh,{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}),Fk=ds(Ik),Hk=[9,13,27,32],Fy=229,yv=Oe&&"CompositionEvent"in window,wu=null;Oe&&"documentMode"in document&&(wu=document.documentMode);var zk=Oe&&"TextEvent"in window&&!wu,Hy=Oe&&(!yv||wu&&wu>8&&wu<=11),zy=32,$y=String.fromCharCode(zy);function $k(){fe("onBeforeInput",["compositionend","keypress","textInput","paste"]),fe("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),fe("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),fe("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var Wy=!1;function Wk(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function Gk(e){switch(e){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function Yk(e,t){return e==="keydown"&&t.keyCode===Fy}function Gy(e,t){switch(e){case"keyup":return Hk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==Fy;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yy(e){var t=e.detail;return typeof t=="object"&&"data"in t?t.data:null}function qy(e){return e.locale==="ko"}var Hl=!1;function qk(e,t,r,a,m){var E,U;if(yv?E=Gk(t):Hl?Gy(t,a)&&(E="onCompositionEnd"):Yk(t,a)&&(E="onCompositionStart"),!E)return null;Hy&&!qy(a)&&(!Hl&&E==="onCompositionStart"?Hl=pk(m):E==="onCompositionEnd"&&Hl&&(U=Uy()));var I=qh(r,E);if(I.length>0){var $=new Py(E,t,null,a,m);if(e.push({event:$,listeners:I}),U)$.data=U;else{var te=Yy(a);te!==null&&($.data=te)}}}function Kk(e,t){switch(e){case"compositionend":return Yy(t);case"keypress":var r=t.which;return r!==zy?null:(Wy=!0,$y);case"textInput":var a=t.data;return a===$y&&Wy?null:a;default:return null}}function Xk(e,t){if(Hl){if(e==="compositionend"||!yv&&Gy(e,t)){var r=Uy();return vk(),Hl=!1,r}return null}switch(e){case"paste":return null;case"keypress":if(!Wk(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Hy&&!qy(t)?null:t.data;default:return null}}function Jk(e,t,r,a,m){var E;if(zk?E=Kk(t,a):E=Xk(t,a),!E)return null;var U=qh(r,"onBeforeInput");if(U.length>0){var I=new jk("onBeforeInput","beforeinput",null,a,m);e.push({event:I,listeners:U}),I.data=E}}function Zk(e,t,r,a,m,E,U){qk(e,t,r,a,m),Jk(e,t,r,a,m)}var Qk={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 Ky(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Qk[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 eR(e){if(!Oe)return!1;var t="on"+e,r=t in document;if(!r){var a=document.createElement("div");a.setAttribute(t,"return;"),r=typeof a[t]=="function"}return r}function tR(){fe("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function Xy(e,t,r,a){Yc(a);var m=qh(t,"onChange");if(m.length>0){var E=new vv("onChange","change",null,r,a);e.push({event:E,listeners:m})}}var yu=null,xu=null;function nR(e){var t=e.nodeName&&e.nodeName.toLowerCase();return t==="select"||t==="input"&&e.type==="file"}function rR(e){var t=[];Xy(t,xu,e,El(e)),Jc(iR,t)}function iR(e){fx(e,0)}function $h(e){var t=ql(e);if(Sr(t))return e}function sR(e,t){if(e==="change")return t}var Jy=!1;Oe&&(Jy=eR("input")&&(!document.documentMode||document.documentMode>9));function aR(e,t){yu=e,xu=t,yu.attachEvent("onpropertychange",Qy)}function Zy(){yu&&(yu.detachEvent("onpropertychange",Qy),yu=null,xu=null)}function Qy(e){e.propertyName==="value"&&$h(xu)&&rR(e)}function oR(e,t,r){e==="focusin"?(Zy(),aR(t,r)):e==="focusout"&&Zy()}function lR(e,t){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $h(xu)}function cR(e){var t=e.nodeName;return t&&t.toLowerCase()==="input"&&(e.type==="checkbox"||e.type==="radio")}function uR(e,t){if(e==="click")return $h(t)}function dR(e,t){if(e==="input"||e==="change")return $h(t)}function hR(e){var t=e._wrapperState;!t||!t.controlled||e.type!=="number"||qt(e,"number",e.value)}function mR(e,t,r,a,m,E,U){var I=r?ql(r):window,$,te;if(nR(I)?$=sR:Ky(I)?Jy?$=dR:($=lR,te=oR):cR(I)&&($=uR),$){var re=$(t,r);if(re){Xy(e,re,a,m);return}}te&&te(t,I,r),t==="focusout"&&hR(I)}function fR(){le("onMouseEnter",["mouseout","mouseover"]),le("onMouseLeave",["mouseout","mouseover"]),le("onPointerEnter",["pointerout","pointerover"]),le("onPointerLeave",["pointerout","pointerover"])}function pR(e,t,r,a,m,E,U){var I=t==="mouseover"||t==="pointerover",$=t==="mouseout"||t==="pointerout";if(I&&!wh(a)){var te=a.relatedTarget||a.fromElement;if(te&&(zo(te)||Vu(te)))return}if(!(!$&&!I)){var re;if(m.window===m)re=m;else{var be=m.ownerDocument;be?re=be.defaultView||be.parentWindow:re=window}var ge,Re;if($){var Me=a.relatedTarget||a.toElement;if(ge=r,Re=Me?zo(Me):null,Re!==null){var Ke=Uo(Re);(Re!==Ke||Re.tag!==N&&Re.tag!==k)&&(Re=null)}}else ge=null,Re=r;if(ge!==Re){var St=By,Zt="onMouseLeave",$t="onMouseEnter",Hn="mouse";(t==="pointerout"||t==="pointerover")&&(St=Iy,Zt="onPointerLeave",$t="onPointerEnter",Hn="pointer");var Un=ge==null?re:ql(ge),Ee=Re==null?re:ql(Re),Xe=new St(Zt,Hn+"leave",ge,a,m);Xe.target=Un,Xe.relatedTarget=Ee;var je=null,ht=zo(m);if(ht===r){var Tt=new St($t,Hn+"enter",Re,a,m);Tt.target=Ee,Tt.relatedTarget=Un,je=Tt}PR(e,Xe,je,ge,Re)}}}function vR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hs=typeof Object.is=="function"?Object.is:vR;function Nu(e,t){if(hs(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(var m=0;m<r.length;m++){var E=r[m];if(!ke.call(t,E)||!hs(e[E],t[E]))return!1}return!0}function ex(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gR(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function tx(e,t){for(var r=ex(e),a=0,m=0;r;){if(r.nodeType===Bt){if(m=a+r.textContent.length,a<=t&&m>=t)return{node:r,offset:t-a};a=m}r=ex(gR(r))}}function bR(e){var t=e.ownerDocument,r=t&&t.defaultView||window,a=r.getSelection&&r.getSelection();if(!a||a.rangeCount===0)return null;var m=a.anchorNode,E=a.anchorOffset,U=a.focusNode,I=a.focusOffset;try{m.nodeType,U.nodeType}catch{return null}return _R(e,m,E,U,I)}function _R(e,t,r,a,m){var E=0,U=-1,I=-1,$=0,te=0,re=e,be=null;e:for(;;){for(var ge=null;re===t&&(r===0||re.nodeType===Bt)&&(U=E+r),re===a&&(m===0||re.nodeType===Bt)&&(I=E+m),re.nodeType===Bt&&(E+=re.nodeValue.length),(ge=re.firstChild)!==null;)be=re,re=ge;for(;;){if(re===e)break e;if(be===t&&++$===r&&(U=E),be===a&&++te===m&&(I=E),(ge=re.nextSibling)!==null)break;re=be,be=re.parentNode}re=ge}return U===-1||I===-1?null:{start:U,end:I}}function wR(e,t){var r=e.ownerDocument||document,a=r&&r.defaultView||window;if(a.getSelection){var m=a.getSelection(),E=e.textContent.length,U=Math.min(t.start,E),I=t.end===void 0?U:Math.min(t.end,E);if(!m.extend&&U>I){var $=I;I=U,U=$}var te=tx(e,U),re=tx(e,I);if(te&&re){if(m.rangeCount===1&&m.anchorNode===te.node&&m.anchorOffset===te.offset&&m.focusNode===re.node&&m.focusOffset===re.offset)return;var be=r.createRange();be.setStart(te.node,te.offset),m.removeAllRanges(),U>I?(m.addRange(be),m.extend(re.node,re.offset)):(be.setEnd(re.node,re.offset),m.addRange(be))}}}function nx(e){return e&&e.nodeType===Bt}function rx(e,t){return!e||!t?!1:e===t?!0:nx(e)?!1:nx(t)?rx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1}function yR(e){return e&&e.ownerDocument&&rx(e.ownerDocument.documentElement,e)}function xR(e){try{return typeof e.contentWindow.location.href=="string"}catch{return!1}}function ix(){for(var e=window,t=Xr();t instanceof e.HTMLIFrameElement;){if(xR(t))e=t.contentWindow;else return t;t=Xr(e.document)}return t}function xv(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 NR(){var e=ix();return{focusedElem:e,selectionRange:xv(e)?CR(e):null}}function SR(e){var t=ix(),r=e.focusedElem,a=e.selectionRange;if(t!==r&&yR(r)){a!==null&&xv(r)&&ER(r,a);for(var m=[],E=r;E=E.parentNode;)E.nodeType===Mn&&m.push({element:E,left:E.scrollLeft,top:E.scrollTop});typeof r.focus=="function"&&r.focus();for(var U=0;U<m.length;U++){var I=m[U];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}}function CR(e){var t;return"selectionStart"in e?t={start:e.selectionStart,end:e.selectionEnd}:t=bR(e),t||{start:0,end:0}}function ER(e,t){var r=t.start,a=t.end;a===void 0&&(a=r),"selectionStart"in e?(e.selectionStart=r,e.selectionEnd=Math.min(a,e.value.length)):wR(e,t)}var jR=Oe&&"documentMode"in document&&document.documentMode<=11;function DR(){fe("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var zl=null,Nv=null,Su=null,Sv=!1;function kR(e){if("selectionStart"in e&&xv(e))return{start:e.selectionStart,end:e.selectionEnd};var t=e.ownerDocument&&e.ownerDocument.defaultView||window,r=t.getSelection();return{anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}}function RR(e){return e.window===e?e.document:e.nodeType===Br?e:e.ownerDocument}function sx(e,t,r){var a=RR(r);if(!(Sv||zl==null||zl!==Xr(a))){var m=kR(zl);if(!Su||!Nu(Su,m)){Su=m;var E=qh(Nv,"onSelect");if(E.length>0){var U=new vv("onSelect","select",null,t,r);e.push({event:U,listeners:E}),U.target=zl}}}}function TR(e,t,r,a,m,E,U){var I=r?ql(r):window;switch(t){case"focusin":(Ky(I)||I.contentEditable==="true")&&(zl=I,Nv=r,Su=null);break;case"focusout":zl=null,Nv=null,Su=null;break;case"mousedown":Sv=!0;break;case"contextmenu":case"mouseup":case"dragend":Sv=!1,sx(e,a,m);break;case"selectionchange":if(jR)break;case"keydown":case"keyup":sx(e,a,m)}}function Wh(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var $l={animationend:Wh("Animation","AnimationEnd"),animationiteration:Wh("Animation","AnimationIteration"),animationstart:Wh("Animation","AnimationStart"),transitionend:Wh("Transition","TransitionEnd")},Cv={},ax={};Oe&&(ax=document.createElement("div").style,"AnimationEvent"in window||(delete $l.animationend.animation,delete $l.animationiteration.animation,delete $l.animationstart.animation),"TransitionEvent"in window||delete $l.transitionend.transition);function Gh(e){if(Cv[e])return Cv[e];if(!$l[e])return e;var t=$l[e];for(var r in t)if(t.hasOwnProperty(r)&&r in ax)return Cv[e]=t[r];return e}var ox=Gh("animationend"),lx=Gh("animationiteration"),cx=Gh("animationstart"),ux=Gh("transitionend"),dx=new Map,hx=["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 ro(e,t){dx.set(e,t),fe(t,[e])}function LR(){for(var e=0;e<hx.length;e++){var t=hx[e],r=t.toLowerCase(),a=t[0].toUpperCase()+t.slice(1);ro(r,"on"+a)}ro(ox,"onAnimationEnd"),ro(lx,"onAnimationIteration"),ro(cx,"onAnimationStart"),ro("dblclick","onDoubleClick"),ro("focusin","onFocus"),ro("focusout","onBlur"),ro(ux,"onTransitionEnd")}function AR(e,t,r,a,m,E,U){var I=dx.get(t);if(I!==void 0){var $=vv,te=t;switch(t){case"keypress":if(Fh(a)===0)return;case"keydown":case"keyup":$=Mk;break;case"focusin":te="focus",$=_v;break;case"focusout":te="blur",$=_v;break;case"beforeblur":case"afterblur":$=_v;break;case"click":if(a.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$=By;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=wk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=Vk;break;case ox:case lx:case cx:$=Nk;break;case ux:$=Pk;break;case"scroll":$=gk;break;case"wheel":$=Fk;break;case"copy":case"cut":case"paste":$=Ck;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=Iy;break}var re=(E&Ya)!==0;{var be=!re&&t==="scroll",ge=VR(r,I,a.type,re,be);if(ge.length>0){var Re=new $(I,te,null,a,m);e.push({event:Re,listeners:ge})}}}}LR(),fR(),tR(),DR(),$k();function MR(e,t,r,a,m,E,U){AR(e,t,r,a,m,E);var I=(E&gh)===0;I&&(pR(e,t,r,a,m),mR(e,t,r,a,m),TR(e,t,r,a,m),Zk(e,t,r,a,m))}var Cu=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],Ev=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Cu));function mx(e,t,r){var a=e.type||"unknown-event";e.currentTarget=r,wt(a,t,void 0,e),e.currentTarget=null}function UR(e,t,r){var a;if(r)for(var m=t.length-1;m>=0;m--){var E=t[m],U=E.instance,I=E.currentTarget,$=E.listener;if(U!==a&&e.isPropagationStopped())return;mx(e,$,I),a=U}else for(var te=0;te<t.length;te++){var re=t[te],be=re.instance,ge=re.currentTarget,Re=re.listener;if(be!==a&&e.isPropagationStopped())return;mx(e,Re,ge),a=be}}function fx(e,t){for(var r=(t&Ya)!==0,a=0;a<e.length;a++){var m=e[a],E=m.event,U=m.listeners;UR(E,U,r)}Mt()}function OR(e,t,r,a,m){var E=El(r),U=[];MR(U,e,a,r,E,t),fx(U,t)}function _r(e,t){Ev.has(e)||_('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var r=!1,a=h5(t),m=IR(e);a.has(m)||(px(t,e,Wc,r),a.add(m))}function jv(e,t,r){Ev.has(e)&&!t&&_('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var a=0;t&&(a|=Ya),px(r,e,a,t)}var Yh="_reactListening"+Math.random().toString(36).slice(2);function Eu(e){if(!e[Yh]){e[Yh]=!0,De.forEach(function(r){r!=="selectionchange"&&(Ev.has(r)||jv(r,!1,e),jv(r,!0,e))});var t=e.nodeType===Br?e:e.ownerDocument;t!==null&&(t[Yh]||(t[Yh]=!0,jv("selectionchange",!1,t)))}}function px(e,t,r,a,m){var E=ok(e,t,r),U=void 0;kl&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(U=!0),e=e,a?U!==void 0?mk(e,t,E,U):hk(e,t,E):U!==void 0?fk(e,t,E,U):dk(e,t,E)}function vx(e,t){return e===t||e.nodeType===dn&&e.parentNode===t}function Dv(e,t,r,a,m){var E=a;if(!(t&vh)&&!(t&Wc)){var U=m;if(a!==null){var I=a;e:for(;;){if(I===null)return;var $=I.tag;if($===d||$===y){var te=I.stateNode.containerInfo;if(vx(te,U))break;if($===y)for(var re=I.return;re!==null;){var be=re.tag;if(be===d||be===y){var ge=re.stateNode.containerInfo;if(vx(ge,U))return}re=re.return}for(;te!==null;){var Re=zo(te);if(Re===null)return;var Me=Re.tag;if(Me===N||Me===k){I=E=Re;continue e}te=te.parentNode}}I=I.return}}}Jc(function(){return OR(e,t,r,E)})}function ju(e,t,r){return{instance:e,listener:t,currentTarget:r}}function VR(e,t,r,a,m,E){for(var U=t!==null?t+"Capture":null,I=a?U:t,$=[],te=e,re=null;te!==null;){var be=te,ge=be.stateNode,Re=be.tag;if(Re===N&&ge!==null&&(re=ge,I!==null)){var Me=Ka(te,I);Me!=null&&$.push(ju(te,Me,re))}if(m)break;te=te.return}return $}function qh(e,t){for(var r=t+"Capture",a=[],m=e;m!==null;){var E=m,U=E.stateNode,I=E.tag;if(I===N&&U!==null){var $=U,te=Ka(m,r);te!=null&&a.unshift(ju(m,te,$));var re=Ka(m,t);re!=null&&a.push(ju(m,re,$))}m=m.return}return a}function Wl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==N);return e||null}function BR(e,t){for(var r=e,a=t,m=0,E=r;E;E=Wl(E))m++;for(var U=0,I=a;I;I=Wl(I))U++;for(;m-U>0;)r=Wl(r),m--;for(;U-m>0;)a=Wl(a),U--;for(var $=m;$--;){if(r===a||a!==null&&r===a.alternate)return r;r=Wl(r),a=Wl(a)}return null}function gx(e,t,r,a,m){for(var E=t._reactName,U=[],I=r;I!==null&&I!==a;){var $=I,te=$.alternate,re=$.stateNode,be=$.tag;if(te!==null&&te===a)break;if(be===N&&re!==null){var ge=re;if(m){var Re=Ka(I,E);Re!=null&&U.unshift(ju(I,Re,ge))}else if(!m){var Me=Ka(I,E);Me!=null&&U.push(ju(I,Me,ge))}}I=I.return}U.length!==0&&e.push({event:t,listeners:U})}function PR(e,t,r,a,m){var E=a&&m?BR(a,m):null;a!==null&&gx(e,t,a,E,!1),m!==null&&r!==null&&gx(e,r,m,E,!0)}function IR(e,t){return e+"__bubble"}var ts=!1,Du="dangerouslySetInnerHTML",Kh="suppressContentEditableWarning",io="suppressHydrationWarning",bx="autoFocus",Fo="children",Ho="style",Xh="__html",kv,Jh,ku,_x,Zh,wx,yx;kv={dialog:!0,webview:!0},Jh=function(e,t){fh(e,t),xp(e,t),jp(e,t,{registrationNameDependencies:ie,possibleRegistrationNames:q})},wx=Oe&&!document.documentMode,ku=function(e,t,r){if(!ts){var a=Qh(r),m=Qh(t);m!==a&&(ts=!0,_("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(m),JSON.stringify(a)))}},_x=function(e){if(!ts){ts=!0;var t=[];e.forEach(function(r){t.push(r)}),_("Extra attributes from the server: %s",t)}},Zh=function(e,t){t===!1?_("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):_("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},yx=function(e,t){var r=e.namespaceURI===Zr?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return r.innerHTML=t,r.innerHTML};var FR=/\r\n?/g,HR=/\u0000|\uFFFD/g;function Qh(e){oe(e);var t=typeof e=="string"?e:""+e;return t.replace(FR,`
91
+ `).replace(HR,"")}function em(e,t,r,a){var m=Qh(t),E=Qh(e);if(E!==m&&(a&&(ts||(ts=!0,_('Text content did not match. Server: "%s" Client: "%s"',E,m))),r&&X))throw new Error("Text content does not match server-rendered HTML.")}function xx(e){return e.nodeType===Br?e:e.ownerDocument}function zR(){}function tm(e){e.onclick=zR}function $R(e,t,r,a,m){for(var E in a)if(a.hasOwnProperty(E)){var U=a[E];if(E===Ho)U&&Object.freeze(U),ch(t,U);else if(E===Du){var I=U?U[Xh]:void 0;I!=null&&er(t,I)}else if(E===Fo)if(typeof U=="string"){var $=e!=="textarea"||U!=="";$&&Ai(t,U)}else typeof U=="number"&&Ai(t,""+U);else E===Kh||E===io||E===bx||(ie.hasOwnProperty(E)?U!=null&&(typeof U!="function"&&Zh(E,U),E==="onScroll"&&_r("scroll",t)):U!=null&&_n(t,E,U,m))}}function WR(e,t,r,a){for(var m=0;m<t.length;m+=2){var E=t[m],U=t[m+1];E===Ho?ch(e,U):E===Du?er(e,U):E===Fo?Ai(e,U):_n(e,E,U,a)}}function GR(e,t,r,a){var m,E=xx(r),U,I=a;if(I===Zr&&(I=_t(e)),I===Zr){if(m=Ls(e,t),!m&&e!==e.toLowerCase()&&_("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),e==="script"){var $=E.createElement("div");$.innerHTML="<script><\/script>";var te=$.firstChild;U=$.removeChild(te)}else if(typeof t.is=="string")U=E.createElement(e,{is:t.is});else if(U=E.createElement(e),e==="select"){var re=U;t.multiple?re.multiple=!0:t.size&&(re.size=t.size)}}else U=E.createElementNS(I,e);return I===Zr&&!m&&Object.prototype.toString.call(U)==="[object HTMLUnknownElement]"&&!ke.call(kv,e)&&(kv[e]=!0,_("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e)),U}function YR(e,t){return xx(t).createTextNode(e)}function qR(e,t,r,a){var m=Ls(t,r);Jh(t,r);var E;switch(t){case"dialog":_r("cancel",e),_r("close",e),E=r;break;case"iframe":case"object":case"embed":_r("load",e),E=r;break;case"video":case"audio":for(var U=0;U<Cu.length;U++)_r(Cu[U],e);E=r;break;case"source":_r("error",e),E=r;break;case"img":case"image":case"link":_r("error",e),_r("load",e),E=r;break;case"details":_r("toggle",e),E=r;break;case"input":fa(e,r),E=vi(e,r),_r("invalid",e);break;case"option":On(e,r),E=r;break;case"select":qs(e,r),E=Hi(e,r),_r("invalid",e);break;case"textarea":Ha(e,r),E=Li(e,r),_r("invalid",e);break;default:E=r}switch(Hc(t,E),$R(t,e,a,E,m),t){case"input":Tr(e),pe(e,r,!1);break;case"textarea":Tr(e),za(e);break;case"option":Vn(e,r);break;case"select":$r(e,r);break;default:typeof E.onClick=="function"&&tm(e);break}}function KR(e,t,r,a,m){Jh(t,a);var E=null,U,I;switch(t){case"input":U=vi(e,r),I=vi(e,a),E=[];break;case"select":U=Hi(e,r),I=Hi(e,a),E=[];break;case"textarea":U=Li(e,r),I=Li(e,a),E=[];break;default:U=r,I=a,typeof U.onClick!="function"&&typeof I.onClick=="function"&&tm(e);break}Hc(t,I);var $,te,re=null;for($ in U)if(!(I.hasOwnProperty($)||!U.hasOwnProperty($)||U[$]==null))if($===Ho){var be=U[$];for(te in be)be.hasOwnProperty(te)&&(re||(re={}),re[te]="")}else $===Du||$===Fo||$===Kh||$===io||$===bx||(ie.hasOwnProperty($)?E||(E=[]):(E=E||[]).push($,null));for($ in I){var ge=I[$],Re=U!=null?U[$]:void 0;if(!(!I.hasOwnProperty($)||ge===Re||ge==null&&Re==null))if($===Ho)if(ge&&Object.freeze(ge),Re){for(te in Re)Re.hasOwnProperty(te)&&(!ge||!ge.hasOwnProperty(te))&&(re||(re={}),re[te]="");for(te in ge)ge.hasOwnProperty(te)&&Re[te]!==ge[te]&&(re||(re={}),re[te]=ge[te])}else re||(E||(E=[]),E.push($,re)),re=ge;else if($===Du){var Me=ge?ge[Xh]:void 0,Ke=Re?Re[Xh]:void 0;Me!=null&&Ke!==Me&&(E=E||[]).push($,Me)}else $===Fo?(typeof ge=="string"||typeof ge=="number")&&(E=E||[]).push($,""+ge):$===Kh||$===io||(ie.hasOwnProperty($)?(ge!=null&&(typeof ge!="function"&&Zh($,ge),$==="onScroll"&&_r("scroll",e)),!E&&Re!==ge&&(E=[])):(E=E||[]).push($,ge))}return re&&(_p(re,I[Ho]),(E=E||[]).push(Ho,re)),E}function XR(e,t,r,a,m){r==="input"&&m.type==="radio"&&m.name!=null&&W(e,m);var E=Ls(r,a),U=Ls(r,m);switch(WR(e,t,E,U),r){case"input":he(e,m);break;case"textarea":ko(e,m);break;case"select":zi(e,m);break}}function JR(e){{var t=e.toLowerCase();return Ks.hasOwnProperty(t)&&Ks[t]||null}}function ZR(e,t,r,a,m,E,U){var I,$;switch(I=Ls(t,r),Jh(t,r),t){case"dialog":_r("cancel",e),_r("close",e);break;case"iframe":case"object":case"embed":_r("load",e);break;case"video":case"audio":for(var te=0;te<Cu.length;te++)_r(Cu[te],e);break;case"source":_r("error",e);break;case"img":case"image":case"link":_r("error",e),_r("load",e);break;case"details":_r("toggle",e);break;case"input":fa(e,r),_r("invalid",e);break;case"option":On(e,r);break;case"select":qs(e,r),_r("invalid",e);break;case"textarea":Ha(e,r),_r("invalid",e);break}Hc(t,r);{$=new Set;for(var re=e.attributes,be=0;be<re.length;be++){var ge=re[be].name.toLowerCase();switch(ge){case"value":break;case"checked":break;case"selected":break;default:$.add(re[be].name)}}}var Re=null;for(var Me in r)if(r.hasOwnProperty(Me)){var Ke=r[Me];if(Me===Fo)typeof Ke=="string"?e.textContent!==Ke&&(r[io]!==!0&&em(e.textContent,Ke,E,U),Re=[Fo,Ke]):typeof Ke=="number"&&e.textContent!==""+Ke&&(r[io]!==!0&&em(e.textContent,Ke,E,U),Re=[Fo,""+Ke]);else if(ie.hasOwnProperty(Me))Ke!=null&&(typeof Ke!="function"&&Zh(Me,Ke),Me==="onScroll"&&_r("scroll",e));else if(U&&typeof I=="boolean"){var St=void 0,Zt=we(Me);if(r[io]!==!0){if(!(Me===Kh||Me===io||Me==="value"||Me==="checked"||Me==="selected")){if(Me===Du){var $t=e.innerHTML,Hn=Ke?Ke[Xh]:void 0;if(Hn!=null){var Un=yx(e,Hn);Un!==$t&&ku(Me,$t,Un)}}else if(Me===Ho){if($.delete(Me),wx){var Ee=lh(Ke);St=e.getAttribute("style"),Ee!==St&&ku(Me,St,Ee)}}else if(I&&!G)$.delete(Me.toLowerCase()),St=hn(e,Me,Ke),Ke!==St&&ku(Me,St,Ke);else if(!Gt(Me,Zt,I)&&!Rn(Me,Ke,Zt,I)){var Xe=!1;if(Zt!==null)$.delete(Zt.attributeName),St=Ut(e,Me,Ke,Zt);else{var je=a;if(je===Zr&&(je=_t(t)),je===Zr)$.delete(Me.toLowerCase());else{var ht=JR(Me);ht!==null&&ht!==Me&&(Xe=!0,$.delete(ht)),$.delete(Me)}St=hn(e,Me,Ke)}var Tt=G;!Tt&&Ke!==St&&!Xe&&ku(Me,St,Ke)}}}}}switch(U&&$.size>0&&r[io]!==!0&&_x($),t){case"input":Tr(e),pe(e,r,!0);break;case"textarea":Tr(e),za(e);break;case"select":case"option":break;default:typeof r.onClick=="function"&&tm(e);break}return Re}function QR(e,t,r){var a=e.nodeValue!==t;return a}function Rv(e,t){{if(ts)return;ts=!0,_("Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase())}}function Tv(e,t){{if(ts)return;ts=!0,_('Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase())}}function Lv(e,t,r){{if(ts)return;ts=!0,_("Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase())}}function Av(e,t){{if(t===""||ts)return;ts=!0,_('Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())}}function eT(e,t,r){switch(t){case"input":Be(e,r);return;case"textarea":Lc(e,r);return;case"select":pa(e,r);return}}var Ru=function(){},Tu=function(){};{var tT=["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"],Nx=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],nT=Nx.concat(["button"]),rT=["dd","dt","li","option","optgroup","p","rp","rt"],Sx={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};Tu=function(e,t){var r=Jt({},e||Sx),a={tag:t};return Nx.indexOf(t)!==-1&&(r.aTagInScope=null,r.buttonTagInScope=null,r.nobrTagInScope=null),nT.indexOf(t)!==-1&&(r.pTagInButtonScope=null),tT.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(r.listItemTagAutoclosing=null,r.dlItemTagAutoclosing=null),r.current=a,t==="form"&&(r.formTag=a),t==="a"&&(r.aTagInScope=a),t==="button"&&(r.buttonTagInScope=a),t==="nobr"&&(r.nobrTagInScope=a),t==="p"&&(r.pTagInButtonScope=a),t==="li"&&(r.listItemTagAutoclosing=a),(t==="dd"||t==="dt")&&(r.dlItemTagAutoclosing=a),r};var iT=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 rT.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},sT=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},Cx={};Ru=function(e,t,r){r=r||Sx;var a=r.current,m=a&&a.tag;t!=null&&(e!=null&&_("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var E=iT(e,m)?null:a,U=E?null:sT(e,r),I=E||U;if(I){var $=I.tag,te=!!E+"|"+e+"|"+$;if(!Cx[te]){Cx[te]=!0;var re=e,be="";if(e==="#text"?/\S/.test(t)?re="Text nodes":(re="Whitespace text nodes",be=" Make sure you don't have any extra whitespace between tags on each line of your source code."):re="<"+e+">",E){var ge="";$==="table"&&e==="tr"&&(ge+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),_("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",re,$,be,ge)}else _("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",re,$)}}}}var nm="suppressHydrationWarning",rm="$",im="/$",Lu="$?",Au="$!",aT="style",Mv=null,Uv=null;function oT(e){var t,r,a=e.nodeType;switch(a){case Br:case gi:{t=a===Br?"#document":"#fragment";var m=e.documentElement;r=m?m.namespaceURI:At(null,"");break}default:{var E=a===dn?e.parentNode:e,U=E.namespaceURI||null;t=E.tagName,r=At(U,t);break}}{var I=t.toLowerCase(),$=Tu(null,I);return{namespace:r,ancestorInfo:$}}}function lT(e,t,r){{var a=e,m=At(a.namespace,t),E=Tu(a.ancestorInfo,t);return{namespace:m,ancestorInfo:E}}}function H6(e){return e}function cT(e){Mv=ak(),Uv=NR();var t=null;return Ay(!1),t}function uT(e){SR(Uv),Ay(Mv),Mv=null,Uv=null}function dT(e,t,r,a,m){var E;{var U=a;if(Ru(e,null,U.ancestorInfo),typeof t.children=="string"||typeof t.children=="number"){var I=""+t.children,$=Tu(U.ancestorInfo,e);Ru(null,I,$)}E=U.namespace}var te=GR(e,t,r,E);return Ou(m,te),zv(te,t),te}function hT(e,t){e.appendChild(t)}function mT(e,t,r,a,m){switch(qR(e,t,r,a),t){case"button":case"input":case"select":case"textarea":return!!r.autoFocus;case"img":return!0;default:return!1}}function fT(e,t,r,a,m,E){{var U=E;if(typeof a.children!=typeof r.children&&(typeof a.children=="string"||typeof a.children=="number")){var I=""+a.children,$=Tu(U.ancestorInfo,t);Ru(null,I,$)}}return KR(e,t,r,a)}function Ov(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 pT(e,t,r,a){{var m=r;Ru(null,e,m.ancestorInfo)}var E=YR(e,t);return Ou(a,E),E}function vT(){var e=window.event;return e===void 0?Sa:My(e.type)}var Vv=typeof setTimeout=="function"?setTimeout:void 0,gT=typeof clearTimeout=="function"?clearTimeout:void 0,Bv=-1,Ex=typeof Promise=="function"?Promise:void 0,bT=typeof queueMicrotask=="function"?queueMicrotask:typeof Ex<"u"?function(e){return Ex.resolve(null).then(e).catch(_T)}:Vv;function _T(e){setTimeout(function(){throw e})}function wT(e,t,r,a){switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&e.focus();return;case"img":{r.src&&(e.src=r.src);return}}}function yT(e,t,r,a,m,E){XR(e,t,r,a,m),zv(e,m)}function jx(e){Ai(e,"")}function xT(e,t,r){e.nodeValue=r}function NT(e,t){e.appendChild(t)}function ST(e,t){var r;e.nodeType===dn?(r=e.parentNode,r.insertBefore(t,e)):(r=e,r.appendChild(t));var a=e._reactRootContainer;a==null&&r.onclick===null&&tm(r)}function CT(e,t,r){e.insertBefore(t,r)}function ET(e,t,r){e.nodeType===dn?e.parentNode.insertBefore(t,r):e.insertBefore(t,r)}function jT(e,t){e.removeChild(t)}function DT(e,t){e.nodeType===dn?e.parentNode.removeChild(t):e.removeChild(t)}function Pv(e,t){var r=t,a=0;do{var m=r.nextSibling;if(e.removeChild(r),m&&m.nodeType===dn){var E=m.data;if(E===im)if(a===0){e.removeChild(m),pu(t);return}else a--;else(E===rm||E===Lu||E===Au)&&a++}r=m}while(r);pu(t)}function kT(e,t){e.nodeType===dn?Pv(e.parentNode,t):e.nodeType===Mn&&Pv(e,t),pu(e)}function RT(e){e=e;var t=e.style;typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function TT(e){e.nodeValue=""}function LT(e,t){e=e;var r=t[aT],a=r!=null&&r.hasOwnProperty("display")?r.display:null;e.style.display=Gn("display",a)}function AT(e,t){e.nodeValue=t}function MT(e){e.nodeType===Mn?e.textContent="":e.nodeType===Br&&e.documentElement&&e.removeChild(e.documentElement)}function UT(e,t,r){return e.nodeType!==Mn||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}function OT(e,t){return t===""||e.nodeType!==Bt?null:e}function VT(e){return e.nodeType!==dn?null:e}function Dx(e){return e.data===Lu}function Iv(e){return e.data===Au}function BT(e){var t=e.nextSibling&&e.nextSibling.dataset,r,a,m;return t&&(r=t.dgst,a=t.msg,m=t.stck),{message:a,digest:r,stack:m}}function PT(e,t){e._reactRetry=t}function sm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===Mn||t===Bt)break;if(t===dn){var r=e.data;if(r===rm||r===Au||r===Lu)break;if(r===im)return null}}return e}function Mu(e){return sm(e.nextSibling)}function IT(e){return sm(e.firstChild)}function FT(e){return sm(e.firstChild)}function HT(e){return sm(e.nextSibling)}function zT(e,t,r,a,m,E,U){Ou(E,e),zv(e,r);var I;{var $=m;I=$.namespace}var te=(E.mode&In)!==sn;return ZR(e,t,r,I,a,te,U)}function $T(e,t,r,a){return Ou(r,e),r.mode&In,QR(e,t)}function WT(e,t){Ou(t,e)}function GT(e){for(var t=e.nextSibling,r=0;t;){if(t.nodeType===dn){var a=t.data;if(a===im){if(r===0)return Mu(t);r--}else(a===rm||a===Au||a===Lu)&&r++}t=t.nextSibling}return null}function kx(e){for(var t=e.previousSibling,r=0;t;){if(t.nodeType===dn){var a=t.data;if(a===rm||a===Au||a===Lu){if(r===0)return t;r--}else a===im&&r++}t=t.previousSibling}return null}function YT(e){pu(e)}function qT(e){pu(e)}function KT(e){return e!=="head"&&e!=="body"}function XT(e,t,r,a){var m=!0;em(t.nodeValue,r,a,m)}function JT(e,t,r,a,m,E){if(t[nm]!==!0){var U=!0;em(a.nodeValue,m,E,U)}}function ZT(e,t){t.nodeType===Mn?Rv(e,t):t.nodeType===dn||Tv(e,t)}function QT(e,t){{var r=e.parentNode;r!==null&&(t.nodeType===Mn?Rv(r,t):t.nodeType===dn||Tv(r,t))}}function e5(e,t,r,a,m){(m||t[nm]!==!0)&&(a.nodeType===Mn?Rv(r,a):a.nodeType===dn||Tv(r,a))}function t5(e,t,r){Lv(e,t)}function n5(e,t){Av(e,t)}function r5(e,t,r){{var a=e.parentNode;a!==null&&Lv(a,t)}}function i5(e,t){{var r=e.parentNode;r!==null&&Av(r,t)}}function s5(e,t,r,a,m,E){(E||t[nm]!==!0)&&Lv(r,a)}function a5(e,t,r,a,m){(m||t[nm]!==!0)&&Av(r,a)}function o5(e){_("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",e.nodeName.toLowerCase())}function l5(e){Eu(e)}var Gl=Math.random().toString(36).slice(2),Yl="__reactFiber$"+Gl,Fv="__reactProps$"+Gl,Uu="__reactContainer$"+Gl,Hv="__reactEvents$"+Gl,c5="__reactListeners$"+Gl,u5="__reactHandles$"+Gl;function d5(e){delete e[Yl],delete e[Fv],delete e[Hv],delete e[c5],delete e[u5]}function Ou(e,t){t[Yl]=e}function am(e,t){t[Uu]=e}function Rx(e){e[Uu]=null}function Vu(e){return!!e[Uu]}function zo(e){var t=e[Yl];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Uu]||r[Yl],t){var a=t.alternate;if(t.child!==null||a!==null&&a.child!==null)for(var m=kx(e);m!==null;){var E=m[Yl];if(E)return E;m=kx(m)}return t}e=r,r=e.parentNode}return null}function so(e){var t=e[Yl]||e[Uu];return t&&(t.tag===N||t.tag===k||t.tag===T||t.tag===d)?t:null}function ql(e){if(e.tag===N||e.tag===k)return e.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function om(e){return e[Fv]||null}function zv(e,t){e[Fv]=t}function h5(e){var t=e[Hv];return t===void 0&&(t=e[Hv]=new Set),t}var Tx={},Lx=l.ReactDebugCurrentFrame;function lm(e){if(e){var t=e._owner,r=ci(e.type,e._source,t?t.type:null);Lx.setExtraStackFrame(r)}else Lx.setExtraStackFrame(null)}function Us(e,t,r,a,m){{var E=Function.call.bind(ke);for(var U in e)if(E(e,U)){var I=void 0;try{if(typeof e[U]!="function"){var $=Error((a||"React class")+": "+r+" type `"+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[U]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw $.name="Invariant Violation",$}I=e[U](t,U,a,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(te){I=te}I&&!(I instanceof Error)&&(lm(m),_("%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).",a||"React class",r,U,typeof I),lm(null)),I instanceof Error&&!(I.message in Tx)&&(Tx[I.message]=!0,lm(m),_("Failed %s type: %s",r,I.message),lm(null))}}}var $v=[],cm;cm=[];var Ca=-1;function ao(e){return{current:e}}function Oi(e,t){if(Ca<0){_("Unexpected pop.");return}t!==cm[Ca]&&_("Unexpected Fiber popped."),e.current=$v[Ca],$v[Ca]=null,cm[Ca]=null,Ca--}function Vi(e,t,r){Ca++,$v[Ca]=e.current,cm[Ca]=r,e.current=t}var Wv;Wv={};var ms={};Object.freeze(ms);var Ea=ao(ms),Qs=ao(!1),Gv=ms;function Kl(e,t,r){return r&&ea(t)?Gv:Ea.current}function Ax(e,t,r){{var a=e.stateNode;a.__reactInternalMemoizedUnmaskedChildContext=t,a.__reactInternalMemoizedMaskedChildContext=r}}function Xl(e,t){{var r=e.type,a=r.contextTypes;if(!a)return ms;var m=e.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===t)return m.__reactInternalMemoizedMaskedChildContext;var E={};for(var U in a)E[U]=t[U];{var I=ne(e)||"Unknown";Us(a,E,"context",I)}return m&&Ax(e,t,E),E}}function um(){return Qs.current}function ea(e){{var t=e.childContextTypes;return t!=null}}function dm(e){Oi(Qs,e),Oi(Ea,e)}function Yv(e){Oi(Qs,e),Oi(Ea,e)}function Mx(e,t,r){{if(Ea.current!==ms)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Vi(Ea,t,e),Vi(Qs,r,e)}}function Ux(e,t,r){{var a=e.stateNode,m=t.childContextTypes;if(typeof a.getChildContext!="function"){{var E=ne(e)||"Unknown";Wv[E]||(Wv[E]=!0,_("%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.",E,E))}return r}var U=a.getChildContext();for(var I in U)if(!(I in m))throw new Error((ne(e)||"Unknown")+'.getChildContext(): key "'+I+'" is not defined in childContextTypes.');{var $=ne(e)||"Unknown";Us(m,U,"child context",$)}return Jt({},r,U)}}function hm(e){{var t=e.stateNode,r=t&&t.__reactInternalMemoizedMergedChildContext||ms;return Gv=Ea.current,Vi(Ea,r,e),Vi(Qs,Qs.current,e),!0}}function Ox(e,t,r){{var a=e.stateNode;if(!a)throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(r){var m=Ux(e,t,Gv);a.__reactInternalMemoizedMergedChildContext=m,Oi(Qs,e),Oi(Ea,e),Vi(Ea,m,e),Vi(Qs,r,e)}else Oi(Qs,e),Vi(Qs,r,e)}}function m5(e){{if(!Kj(e)||e.tag!==f)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 d:return t.stateNode.context;case f:{var r=t.type;if(ea(r))return t.stateNode.__reactInternalMemoizedMergedChildContext;break}}t=t.return}while(t!==null);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var oo=0,mm=1,ja=null,qv=!1,Kv=!1;function Vx(e){ja===null?ja=[e]:ja.push(e)}function f5(e){qv=!0,Vx(e)}function Bx(){qv&&lo()}function lo(){if(!Kv&&ja!==null){Kv=!0;var e=0,t=Ms();try{var r=!0,a=ja;for(fi(us);e<a.length;e++){var m=a[e];do m=m(r);while(m!==null)}ja=null,qv=!1}catch(E){throw ja!==null&&(ja=ja.slice(e+1)),ly(kh,lo),E}finally{fi(t),Kv=!1}}return null}var Jl=[],Zl=0,fm=null,pm=0,xs=[],Ns=0,$o=null,Da=1,ka="";function p5(e){return Go(),(e.flags&ey)!==Ot}function v5(e){return Go(),pm}function g5(){var e=ka,t=Da,r=t&~b5(t);return r.toString(32)+e}function Wo(e,t){Go(),Jl[Zl++]=pm,Jl[Zl++]=fm,fm=e,pm=t}function Px(e,t,r){Go(),xs[Ns++]=Da,xs[Ns++]=ka,xs[Ns++]=$o,$o=e;var a=Da,m=ka,E=vm(a)-1,U=a&~(1<<E),I=r+1,$=vm(t)+E;if($>30){var te=E-E%5,re=(1<<te)-1,be=(U&re).toString(32),ge=U>>te,Re=E-te,Me=vm(t)+Re,Ke=I<<Re,St=Ke|ge,Zt=be+m;Da=1<<Me|St,ka=Zt}else{var $t=I<<E,Hn=$t|U,Un=m;Da=1<<$|Hn,ka=Un}}function Xv(e){Go();var t=e.return;if(t!==null){var r=1,a=0;Wo(e,r),Px(e,r,a)}}function vm(e){return 32-fy(e)}function b5(e){return 1<<vm(e)-1}function Jv(e){for(;e===fm;)fm=Jl[--Zl],Jl[Zl]=null,pm=Jl[--Zl],Jl[Zl]=null;for(;e===$o;)$o=xs[--Ns],xs[Ns]=null,ka=xs[--Ns],xs[Ns]=null,Da=xs[--Ns],xs[Ns]=null}function _5(){return Go(),$o!==null?{id:Da,overflow:ka}:null}function w5(e,t){Go(),xs[Ns++]=Da,xs[Ns++]=ka,xs[Ns++]=$o,Da=t.id,ka=t.overflow,$o=e}function Go(){wi()||_("Expected to be hydrating. This is a bug in React. Please file an issue.")}var _i=null,Ss=null,Os=!1,Yo=!1,co=null;function y5(){Os&&_("We should not be hydrating here. This is a bug in React. Please file a bug.")}function Ix(){Yo=!0}function x5(){return Yo}function N5(e){var t=e.stateNode.containerInfo;return Ss=FT(t),_i=e,Os=!0,co=null,Yo=!1,!0}function S5(e,t,r){return Ss=HT(t),_i=e,Os=!0,co=null,Yo=!1,r!==null&&w5(e,r),!0}function Fx(e,t){switch(e.tag){case d:{ZT(e.stateNode.containerInfo,t);break}case N:{var r=(e.mode&In)!==sn;e5(e.type,e.memoizedProps,e.stateNode,t,r);break}case T:{var a=e.memoizedState;a.dehydrated!==null&&QT(a.dehydrated,t);break}}}function Hx(e,t){Fx(e,t);var r=DM();r.stateNode=t,r.return=e;var a=e.deletions;a===null?(e.deletions=[r],e.flags|=To):a.push(r)}function Zv(e,t){{if(Yo)return;switch(e.tag){case d:{var r=e.stateNode.containerInfo;switch(t.tag){case N:var a=t.type;t.pendingProps,t5(r,a);break;case k:var m=t.pendingProps;n5(r,m);break}break}case N:{var E=e.type,U=e.memoizedProps,I=e.stateNode;switch(t.tag){case N:{var $=t.type,te=t.pendingProps,re=(e.mode&In)!==sn;s5(E,U,I,$,te,re);break}case k:{var be=t.pendingProps,ge=(e.mode&In)!==sn;a5(E,U,I,be,ge);break}}break}case T:{var Re=e.memoizedState,Me=Re.dehydrated;if(Me!==null)switch(t.tag){case N:var Ke=t.type;t.pendingProps,r5(Me,Ke);break;case k:var St=t.pendingProps;i5(Me,St);break}break}default:return}}}function zx(e,t){t.flags=t.flags&~wa|Gr,Zv(e,t)}function $x(e,t){switch(e.tag){case N:{var r=e.type;e.pendingProps;var a=UT(t,r);return a!==null?(e.stateNode=a,_i=e,Ss=IT(a),!0):!1}case k:{var m=e.pendingProps,E=OT(t,m);return E!==null?(e.stateNode=E,_i=e,Ss=null,!0):!1}case T:{var U=VT(t);if(U!==null){var I={dehydrated:U,treeContext:_5(),retryLane:ls};e.memoizedState=I;var $=kM(U);return $.return=e,e.child=$,_i=e,Ss=null,!0}return!1}default:return!1}}function Qv(e){return(e.mode&In)!==sn&&(e.flags&Zn)===Ot}function eg(e){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function tg(e){if(Os){var t=Ss;if(!t){Qv(e)&&(Zv(_i,e),eg()),zx(_i,e),Os=!1,_i=e;return}var r=t;if(!$x(e,t)){Qv(e)&&(Zv(_i,e),eg()),t=Mu(r);var a=_i;if(!t||!$x(e,t)){zx(_i,e),Os=!1,_i=e;return}Hx(a,r)}}}function C5(e,t,r){var a=e.stateNode,m=!Yo,E=zT(a,e.type,e.memoizedProps,t,r,e,m);return e.updateQueue=E,E!==null}function E5(e){var t=e.stateNode,r=e.memoizedProps,a=$T(t,r,e);if(a){var m=_i;if(m!==null)switch(m.tag){case d:{var E=m.stateNode.containerInfo,U=(m.mode&In)!==sn;XT(E,t,r,U);break}case N:{var I=m.type,$=m.memoizedProps,te=m.stateNode,re=(m.mode&In)!==sn;JT(I,$,te,t,r,re);break}}}return a}function j5(e){var t=e.memoizedState,r=t!==null?t.dehydrated:null;if(!r)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");WT(r,e)}function D5(e){var t=e.memoizedState,r=t!==null?t.dehydrated:null;if(!r)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return GT(r)}function Wx(e){for(var t=e.return;t!==null&&t.tag!==N&&t.tag!==d&&t.tag!==T;)t=t.return;_i=t}function gm(e){if(e!==_i)return!1;if(!Os)return Wx(e),Os=!0,!1;if(e.tag!==d&&(e.tag!==N||KT(e.type)&&!Ov(e.type,e.memoizedProps))){var t=Ss;if(t)if(Qv(e))Gx(e),eg();else for(;t;)Hx(e,t),t=Mu(t)}return Wx(e),e.tag===T?Ss=D5(e):Ss=_i?Mu(e.stateNode):null,!0}function k5(){return Os&&Ss!==null}function Gx(e){for(var t=Ss;t;)Fx(e,t),t=Mu(t)}function Ql(){_i=null,Ss=null,Os=!1,Yo=!1}function Yx(){co!==null&&(IN(co),co=null)}function wi(){return Os}function ng(e){co===null?co=[e]:co.push(e)}var R5=l.ReactCurrentBatchConfig,T5=null;function L5(){return R5.transition}var Vs={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var A5=function(e){for(var t=null,r=e;r!==null;)r.mode&Ar&&(t=r),r=r.return;return t},qo=function(e){var t=[];return e.forEach(function(r){t.push(r)}),t.sort().join(", ")},Bu=[],Pu=[],Iu=[],Fu=[],Hu=[],zu=[],Ko=new Set;Vs.recordUnsafeLifecycleWarnings=function(e,t){Ko.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&Bu.push(e),e.mode&Ar&&typeof t.UNSAFE_componentWillMount=="function"&&Pu.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Iu.push(e),e.mode&Ar&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&Fu.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&Hu.push(e),e.mode&Ar&&typeof t.UNSAFE_componentWillUpdate=="function"&&zu.push(e))},Vs.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;Bu.length>0&&(Bu.forEach(function(ge){e.add(ne(ge)||"Component"),Ko.add(ge.type)}),Bu=[]);var t=new Set;Pu.length>0&&(Pu.forEach(function(ge){t.add(ne(ge)||"Component"),Ko.add(ge.type)}),Pu=[]);var r=new Set;Iu.length>0&&(Iu.forEach(function(ge){r.add(ne(ge)||"Component"),Ko.add(ge.type)}),Iu=[]);var a=new Set;Fu.length>0&&(Fu.forEach(function(ge){a.add(ne(ge)||"Component"),Ko.add(ge.type)}),Fu=[]);var m=new Set;Hu.length>0&&(Hu.forEach(function(ge){m.add(ne(ge)||"Component"),Ko.add(ge.type)}),Hu=[]);var E=new Set;if(zu.length>0&&(zu.forEach(function(ge){E.add(ne(ge)||"Component"),Ko.add(ge.type)}),zu=[]),t.size>0){var U=qo(t);_(`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`,U)}if(a.size>0){var I=qo(a);_(`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`,I)}if(E.size>0){var $=qo(E);_(`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`,$)}if(e.size>0){var te=qo(e);D(`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`,te)}if(r.size>0){var re=qo(r);D(`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`,re)}if(m.size>0){var be=qo(m);D(`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`,be)}};var bm=new Map,qx=new Set;Vs.recordLegacyContextWarning=function(e,t){var r=A5(e);if(r===null){_("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(!qx.has(e.type)){var a=bm.get(r);(e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(a===void 0&&(a=[],bm.set(r,a)),a.push(e))}},Vs.flushLegacyContextWarning=function(){bm.forEach(function(e,t){if(e.length!==0){var r=e[0],a=new Set;e.forEach(function(E){a.add(ne(E)||"Component"),qx.add(E.type)});var m=qo(a);try{un(r),_(`Legacy context API has been detected within a strict-mode tree.
121
+
122
+ The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
123
+
124
+ Please update the following components: %s
125
+
126
+ Learn more about this warning here: https://reactjs.org/link/legacy-context`,m)}finally{ir()}}})},Vs.discardPendingWarnings=function(){Bu=[],Pu=[],Iu=[],Fu=[],Hu=[],zu=[],bm=new Map}}var rg,ig,sg,ag,og,Kx=function(e,t){};rg=!1,ig=!1,sg={},ag={},og={},Kx=function(e,t){if(!(e===null||typeof e!="object")&&!(!e._store||e._store.validated||e.key!=null)){if(typeof e._store!="object")throw new Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");e._store.validated=!0;var r=ne(t)||"Component";ag[r]||(ag[r]=!0,_('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};function M5(e){return e.prototype&&e.prototype.isReactComponent}function $u(e,t,r){var a=r.ref;if(a!==null&&typeof a!="function"&&typeof a!="object"){if((e.mode&Ar||Z)&&!(r._owner&&r._self&&r._owner.stateNode!==r._self)&&!(r._owner&&r._owner.tag!==f)&&!(typeof r.type=="function"&&!M5(r.type))&&r._owner){var m=ne(e)||"Component";sg[m]||(_('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',m,a),sg[m]=!0)}if(r._owner){var E=r._owner,U;if(E){var I=E;if(I.tag!==f)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");U=I.stateNode}if(!U)throw new Error("Missing owner for string ref "+a+". This error is likely caused by a bug in React. Please file an issue.");var $=U;Ft(a,"ref");var te=""+a;if(t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===te)return t.ref;var re=function(be){var ge=$.refs;be===null?delete ge[te]:ge[te]=be};return re._stringRef=te,re}else{if(typeof a!="string")throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!r._owner)throw new Error("Element ref was specified as a string ("+a+`) 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 a}function _m(e,t){var r=Object.prototype.toString.call(t);throw new Error("Objects are not valid as a React child (found: "+(r==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}function wm(e){{var t=ne(e)||"Component";if(og[t])return;og[t]=!0,_("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 Xx(e){var t=e._payload,r=e._init;return r(t)}function Jx(e){function t(Ee,Xe){if(e){var je=Ee.deletions;je===null?(Ee.deletions=[Xe],Ee.flags|=To):je.push(Xe)}}function r(Ee,Xe){if(!e)return null;for(var je=Xe;je!==null;)t(Ee,je),je=je.sibling;return null}function a(Ee,Xe){for(var je=new Map,ht=Xe;ht!==null;)ht.key!==null?je.set(ht.key,ht):je.set(ht.index,ht),ht=ht.sibling;return je}function m(Ee,Xe){var je=il(Ee,Xe);return je.index=0,je.sibling=null,je}function E(Ee,Xe,je){if(Ee.index=je,!e)return Ee.flags|=ey,Xe;var ht=Ee.alternate;if(ht!==null){var Tt=ht.index;return Tt<Xe?(Ee.flags|=Gr,Xe):Tt}else return Ee.flags|=Gr,Xe}function U(Ee){return e&&Ee.alternate===null&&(Ee.flags|=Gr),Ee}function I(Ee,Xe,je,ht){if(Xe===null||Xe.tag!==k){var Tt=n_(je,Ee.mode,ht);return Tt.return=Ee,Tt}else{var Et=m(Xe,je);return Et.return=Ee,Et}}function $(Ee,Xe,je,ht){var Tt=je.type;if(Tt===Nr)return re(Ee,Xe,je.props.children,ht,je.key);if(Xe!==null&&(Xe.elementType===Tt||nS(Xe,je)||typeof Tt=="object"&&Tt!==null&&Tt.$$typeof===Ct&&Xx(Tt)===Xe.type)){var Et=m(Xe,je.props);return Et.ref=$u(Ee,Xe,je),Et.return=Ee,Et._debugSource=je._source,Et._debugOwner=je._owner,Et}var cn=t_(je,Ee.mode,ht);return cn.ref=$u(Ee,Xe,je),cn.return=Ee,cn}function te(Ee,Xe,je,ht){if(Xe===null||Xe.tag!==y||Xe.stateNode.containerInfo!==je.containerInfo||Xe.stateNode.implementation!==je.implementation){var Tt=r_(je,Ee.mode,ht);return Tt.return=Ee,Tt}else{var Et=m(Xe,je.children||[]);return Et.return=Ee,Et}}function re(Ee,Xe,je,ht,Tt){if(Xe===null||Xe.tag!==b){var Et=yo(je,Ee.mode,ht,Tt);return Et.return=Ee,Et}else{var cn=m(Xe,je);return cn.return=Ee,cn}}function be(Ee,Xe,je){if(typeof Xe=="string"&&Xe!==""||typeof Xe=="number"){var ht=n_(""+Xe,Ee.mode,je);return ht.return=Ee,ht}if(typeof Xe=="object"&&Xe!==null){switch(Xe.$$typeof){case Xt:{var Tt=t_(Xe,Ee.mode,je);return Tt.ref=$u(Ee,null,Xe),Tt.return=Ee,Tt}case jn:{var Et=r_(Xe,Ee.mode,je);return Et.return=Ee,Et}case Ct:{var cn=Xe._payload,bn=Xe._init;return be(Ee,bn(cn),je)}}if(gn(Xe)||$n(Xe)){var lr=yo(Xe,Ee.mode,je,null);return lr.return=Ee,lr}_m(Ee,Xe)}return typeof Xe=="function"&&wm(Ee),null}function ge(Ee,Xe,je,ht){var Tt=Xe!==null?Xe.key:null;if(typeof je=="string"&&je!==""||typeof je=="number")return Tt!==null?null:I(Ee,Xe,""+je,ht);if(typeof je=="object"&&je!==null){switch(je.$$typeof){case Xt:return je.key===Tt?$(Ee,Xe,je,ht):null;case jn:return je.key===Tt?te(Ee,Xe,je,ht):null;case Ct:{var Et=je._payload,cn=je._init;return ge(Ee,Xe,cn(Et),ht)}}if(gn(je)||$n(je))return Tt!==null?null:re(Ee,Xe,je,ht,null);_m(Ee,je)}return typeof je=="function"&&wm(Ee),null}function Re(Ee,Xe,je,ht,Tt){if(typeof ht=="string"&&ht!==""||typeof ht=="number"){var Et=Ee.get(je)||null;return I(Xe,Et,""+ht,Tt)}if(typeof ht=="object"&&ht!==null){switch(ht.$$typeof){case Xt:{var cn=Ee.get(ht.key===null?je:ht.key)||null;return $(Xe,cn,ht,Tt)}case jn:{var bn=Ee.get(ht.key===null?je:ht.key)||null;return te(Xe,bn,ht,Tt)}case Ct:var lr=ht._payload,qn=ht._init;return Re(Ee,Xe,je,qn(lr),Tt)}if(gn(ht)||$n(ht)){var Pr=Ee.get(je)||null;return re(Xe,Pr,ht,Tt,null)}_m(Xe,ht)}return typeof ht=="function"&&wm(Xe),null}function Me(Ee,Xe,je){{if(typeof Ee!="object"||Ee===null)return Xe;switch(Ee.$$typeof){case Xt:case jn:Kx(Ee,je);var ht=Ee.key;if(typeof ht!="string")break;if(Xe===null){Xe=new Set,Xe.add(ht);break}if(!Xe.has(ht)){Xe.add(ht);break}_("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.",ht);break;case Ct:var Tt=Ee._payload,Et=Ee._init;Me(Et(Tt),Xe,je);break}}return Xe}function Ke(Ee,Xe,je,ht){for(var Tt=null,Et=0;Et<je.length;Et++){var cn=je[Et];Tt=Me(cn,Tt,Ee)}for(var bn=null,lr=null,qn=Xe,Pr=0,Kn=0,Mr=null;qn!==null&&Kn<je.length;Kn++){qn.index>Kn?(Mr=qn,qn=null):Mr=qn.sibling;var Pi=ge(Ee,qn,je[Kn],ht);if(Pi===null){qn===null&&(qn=Mr);break}e&&qn&&Pi.alternate===null&&t(Ee,qn),Pr=E(Pi,Pr,Kn),lr===null?bn=Pi:lr.sibling=Pi,lr=Pi,qn=Mr}if(Kn===je.length){if(r(Ee,qn),wi()){var ji=Kn;Wo(Ee,ji)}return bn}if(qn===null){for(;Kn<je.length;Kn++){var ps=be(Ee,je[Kn],ht);ps!==null&&(Pr=E(ps,Pr,Kn),lr===null?bn=ps:lr.sibling=ps,lr=ps)}if(wi()){var qi=Kn;Wo(Ee,qi)}return bn}for(var Ki=a(Ee,qn);Kn<je.length;Kn++){var Ii=Re(Ki,Ee,Kn,je[Kn],ht);Ii!==null&&(e&&Ii.alternate!==null&&Ki.delete(Ii.key===null?Kn:Ii.key),Pr=E(Ii,Pr,Kn),lr===null?bn=Ii:lr.sibling=Ii,lr=Ii)}if(e&&Ki.forEach(function(bc){return t(Ee,bc)}),wi()){var Oa=Kn;Wo(Ee,Oa)}return bn}function St(Ee,Xe,je,ht){var Tt=$n(je);if(typeof Tt!="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"&&je[Symbol.toStringTag]==="Generator"&&(ig||_("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."),ig=!0),je.entries===Tt&&(rg||_("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),rg=!0);var Et=Tt.call(je);if(Et)for(var cn=null,bn=Et.next();!bn.done;bn=Et.next()){var lr=bn.value;cn=Me(lr,cn,Ee)}}var qn=Tt.call(je);if(qn==null)throw new Error("An iterable object provided no iterator.");for(var Pr=null,Kn=null,Mr=Xe,Pi=0,ji=0,ps=null,qi=qn.next();Mr!==null&&!qi.done;ji++,qi=qn.next()){Mr.index>ji?(ps=Mr,Mr=null):ps=Mr.sibling;var Ki=ge(Ee,Mr,qi.value,ht);if(Ki===null){Mr===null&&(Mr=ps);break}e&&Mr&&Ki.alternate===null&&t(Ee,Mr),Pi=E(Ki,Pi,ji),Kn===null?Pr=Ki:Kn.sibling=Ki,Kn=Ki,Mr=ps}if(qi.done){if(r(Ee,Mr),wi()){var Ii=ji;Wo(Ee,Ii)}return Pr}if(Mr===null){for(;!qi.done;ji++,qi=qn.next()){var Oa=be(Ee,qi.value,ht);Oa!==null&&(Pi=E(Oa,Pi,ji),Kn===null?Pr=Oa:Kn.sibling=Oa,Kn=Oa)}if(wi()){var bc=ji;Wo(Ee,bc)}return Pr}for(var xd=a(Ee,Mr);!qi.done;ji++,qi=qn.next()){var la=Re(xd,Ee,ji,qi.value,ht);la!==null&&(e&&la.alternate!==null&&xd.delete(la.key===null?ji:la.key),Pi=E(la,Pi,ji),Kn===null?Pr=la:Kn.sibling=la,Kn=la)}if(e&&xd.forEach(function(aU){return t(Ee,aU)}),wi()){var sU=ji;Wo(Ee,sU)}return Pr}function Zt(Ee,Xe,je,ht){if(Xe!==null&&Xe.tag===k){r(Ee,Xe.sibling);var Tt=m(Xe,je);return Tt.return=Ee,Tt}r(Ee,Xe);var Et=n_(je,Ee.mode,ht);return Et.return=Ee,Et}function $t(Ee,Xe,je,ht){for(var Tt=je.key,Et=Xe;Et!==null;){if(Et.key===Tt){var cn=je.type;if(cn===Nr){if(Et.tag===b){r(Ee,Et.sibling);var bn=m(Et,je.props.children);return bn.return=Ee,bn._debugSource=je._source,bn._debugOwner=je._owner,bn}}else if(Et.elementType===cn||nS(Et,je)||typeof cn=="object"&&cn!==null&&cn.$$typeof===Ct&&Xx(cn)===Et.type){r(Ee,Et.sibling);var lr=m(Et,je.props);return lr.ref=$u(Ee,Et,je),lr.return=Ee,lr._debugSource=je._source,lr._debugOwner=je._owner,lr}r(Ee,Et);break}else t(Ee,Et);Et=Et.sibling}if(je.type===Nr){var qn=yo(je.props.children,Ee.mode,ht,je.key);return qn.return=Ee,qn}else{var Pr=t_(je,Ee.mode,ht);return Pr.ref=$u(Ee,Xe,je),Pr.return=Ee,Pr}}function Hn(Ee,Xe,je,ht){for(var Tt=je.key,Et=Xe;Et!==null;){if(Et.key===Tt)if(Et.tag===y&&Et.stateNode.containerInfo===je.containerInfo&&Et.stateNode.implementation===je.implementation){r(Ee,Et.sibling);var cn=m(Et,je.children||[]);return cn.return=Ee,cn}else{r(Ee,Et);break}else t(Ee,Et);Et=Et.sibling}var bn=r_(je,Ee.mode,ht);return bn.return=Ee,bn}function Un(Ee,Xe,je,ht){var Tt=typeof je=="object"&&je!==null&&je.type===Nr&&je.key===null;if(Tt&&(je=je.props.children),typeof je=="object"&&je!==null){switch(je.$$typeof){case Xt:return U($t(Ee,Xe,je,ht));case jn:return U(Hn(Ee,Xe,je,ht));case Ct:var Et=je._payload,cn=je._init;return Un(Ee,Xe,cn(Et),ht)}if(gn(je))return Ke(Ee,Xe,je,ht);if($n(je))return St(Ee,Xe,je,ht);_m(Ee,je)}return typeof je=="string"&&je!==""||typeof je=="number"?U(Zt(Ee,Xe,""+je,ht)):(typeof je=="function"&&wm(Ee),r(Ee,Xe))}return Un}var ec=Jx(!0),Zx=Jx(!1);function U5(e,t){if(e!==null&&t.child!==e.child)throw new Error("Resuming work not yet implemented.");if(t.child!==null){var r=t.child,a=il(r,r.pendingProps);for(t.child=a,a.return=t;r.sibling!==null;)r=r.sibling,a=a.sibling=il(r,r.pendingProps),a.return=t;a.sibling=null}}function O5(e,t){for(var r=e.child;r!==null;)NM(r,t),r=r.sibling}var lg=ao(null),cg;cg={};var ym=null,tc=null,ug=null,xm=!1;function Nm(){ym=null,tc=null,ug=null,xm=!1}function Qx(){xm=!0}function e0(){xm=!1}function t0(e,t,r){Vi(lg,t._currentValue,e),t._currentValue=r,t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==cg&&_("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=cg}function dg(e,t){var r=lg.current;Oi(lg,t),e._currentValue=r}function hg(e,t,r){for(var a=e;a!==null;){var m=a.alternate;if(Pl(a.childLanes,t)?m!==null&&!Pl(m.childLanes,t)&&(m.childLanes=En(m.childLanes,t)):(a.childLanes=En(a.childLanes,t),m!==null&&(m.childLanes=En(m.childLanes,t))),a===r)break;a=a.return}a!==r&&_("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function V5(e,t,r){B5(e,t,r)}function B5(e,t,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var m=void 0,E=a.dependencies;if(E!==null){m=a.child;for(var U=E.firstContext;U!==null;){if(U.context===t){if(a.tag===f){var I=lu(r),$=Ra(br,I);$.tag=Cm;var te=a.updateQueue;if(te!==null){var re=te.shared,be=re.pending;be===null?$.next=$:($.next=be.next,be.next=$),re.pending=$}}a.lanes=En(a.lanes,r);var ge=a.alternate;ge!==null&&(ge.lanes=En(ge.lanes,r)),hg(a.return,r,e),E.lanes=En(E.lanes,r);break}U=U.next}}else if(a.tag===v)m=a.type===e.type?null:a.child;else if(a.tag===O){var Re=a.return;if(Re===null)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");Re.lanes=En(Re.lanes,r);var Me=Re.alternate;Me!==null&&(Me.lanes=En(Me.lanes,r)),hg(Re,r,e),m=a.sibling}else m=a.child;if(m!==null)m.return=a;else for(m=a;m!==null;){if(m===e){m=null;break}var Ke=m.sibling;if(Ke!==null){Ke.return=m.return,m=Ke;break}m=m.return}a=m}}function nc(e,t){ym=e,tc=null,ug=null;var r=e.dependencies;if(r!==null){var a=r.firstContext;a!==null&&(cs(r.lanes,t)&&sd(),r.firstContext=null)}}function Yr(e){xm&&_("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(ug!==e){var r={context:e,memoizedValue:t,next:null};if(tc===null){if(ym===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().");tc=r,ym.dependencies={lanes:ut,firstContext:r}}else tc=tc.next=r}return t}var Xo=null;function mg(e){Xo===null?Xo=[e]:Xo.push(e)}function P5(){if(Xo!==null){for(var e=0;e<Xo.length;e++){var t=Xo[e],r=t.interleaved;if(r!==null){t.interleaved=null;var a=r.next,m=t.pending;if(m!==null){var E=m.next;m.next=a,r.next=E}t.pending=r}}Xo=null}}function n0(e,t,r,a){var m=t.interleaved;return m===null?(r.next=r,mg(t)):(r.next=m.next,m.next=r),t.interleaved=r,Sm(e,a)}function I5(e,t,r,a){var m=t.interleaved;m===null?(r.next=r,mg(t)):(r.next=m.next,m.next=r),t.interleaved=r}function F5(e,t,r,a){var m=t.interleaved;return m===null?(r.next=r,mg(t)):(r.next=m.next,m.next=r),t.interleaved=r,Sm(e,a)}function ns(e,t){return Sm(e,t)}var H5=Sm;function Sm(e,t){e.lanes=En(e.lanes,t);var r=e.alternate;r!==null&&(r.lanes=En(r.lanes,t)),r===null&&(e.flags&(Gr|wa))!==Ot&&ZN(e);for(var a=e,m=e.return;m!==null;)m.childLanes=En(m.childLanes,t),r=m.alternate,r!==null?r.childLanes=En(r.childLanes,t):(m.flags&(Gr|wa))!==Ot&&ZN(e),a=m,m=m.return;if(a.tag===d){var E=a.stateNode;return E}else return null}var r0=0,i0=1,Cm=2,fg=3,Em=!1,pg,jm;pg=!1,jm=null;function vg(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:ut},effects:null};e.updateQueue=t}function s0(e,t){var r=t.updateQueue,a=e.updateQueue;if(r===a){var m={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects};t.updateQueue=m}}function Ra(e,t){var r={eventTime:e,lane:t,tag:r0,payload:null,callback:null,next:null};return r}function uo(e,t,r){var a=e.updateQueue;if(a===null)return null;var m=a.shared;if(jm===m&&!pg&&(_("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."),pg=!0),IA()){var E=m.pending;return E===null?t.next=t:(t.next=E.next,E.next=t),m.pending=t,H5(e,r)}else return F5(e,m,t,r)}function Dm(e,t,r){var a=t.updateQueue;if(a!==null){var m=a.shared;if(by(r)){var E=m.lanes;E=wy(E,e.pendingLanes);var U=En(E,r);m.lanes=U,lv(e,U)}}}function gg(e,t){var r=e.updateQueue,a=e.alternate;if(a!==null){var m=a.updateQueue;if(r===m){var E=null,U=null,I=r.firstBaseUpdate;if(I!==null){var $=I;do{var te={eventTime:$.eventTime,lane:$.lane,tag:$.tag,payload:$.payload,callback:$.callback,next:null};U===null?E=U=te:(U.next=te,U=te),$=$.next}while($!==null);U===null?E=U=t:(U.next=t,U=t)}else E=U=t;r={baseState:m.baseState,firstBaseUpdate:E,lastBaseUpdate:U,shared:m.shared,effects:m.effects},e.updateQueue=r;return}}var re=r.lastBaseUpdate;re===null?r.firstBaseUpdate=t:re.next=t,r.lastBaseUpdate=t}function z5(e,t,r,a,m,E){switch(r.tag){case i0:{var U=r.payload;if(typeof U=="function"){Qx();var I=U.call(E,a,m);{if(e.mode&Ar){hi(!0);try{U.call(E,a,m)}finally{hi(!1)}}e0()}return I}return U}case fg:e.flags=e.flags&~$i|Zn;case r0:{var $=r.payload,te;if(typeof $=="function"){Qx(),te=$.call(E,a,m);{if(e.mode&Ar){hi(!0);try{$.call(E,a,m)}finally{hi(!1)}}e0()}}else te=$;return te==null?a:Jt({},a,te)}case Cm:return Em=!0,a}return a}function km(e,t,r,a){var m=e.updateQueue;Em=!1,jm=m.shared;var E=m.firstBaseUpdate,U=m.lastBaseUpdate,I=m.shared.pending;if(I!==null){m.shared.pending=null;var $=I,te=$.next;$.next=null,U===null?E=te:U.next=te,U=$;var re=e.alternate;if(re!==null){var be=re.updateQueue,ge=be.lastBaseUpdate;ge!==U&&(ge===null?be.firstBaseUpdate=te:ge.next=te,be.lastBaseUpdate=$)}}if(E!==null){var Re=m.baseState,Me=ut,Ke=null,St=null,Zt=null,$t=E;do{var Hn=$t.lane,Un=$t.eventTime;if(Pl(a,Hn)){if(Zt!==null){var Xe={eventTime:Un,lane:mi,tag:$t.tag,payload:$t.payload,callback:$t.callback,next:null};Zt=Zt.next=Xe}Re=z5(e,m,$t,Re,t,r);var je=$t.callback;if(je!==null&&$t.lane!==mi){e.flags|=Qw;var ht=m.effects;ht===null?m.effects=[$t]:ht.push($t)}}else{var Ee={eventTime:Un,lane:Hn,tag:$t.tag,payload:$t.payload,callback:$t.callback,next:null};Zt===null?(St=Zt=Ee,Ke=Re):Zt=Zt.next=Ee,Me=En(Me,Hn)}if($t=$t.next,$t===null){if(I=m.shared.pending,I===null)break;var Tt=I,Et=Tt.next;Tt.next=null,$t=Et,m.lastBaseUpdate=Tt,m.shared.pending=null}}while(!0);Zt===null&&(Ke=Re),m.baseState=Ke,m.firstBaseUpdate=St,m.lastBaseUpdate=Zt;var cn=m.shared.interleaved;if(cn!==null){var bn=cn;do Me=En(Me,bn.lane),bn=bn.next;while(bn!==cn)}else E===null&&(m.shared.lanes=ut);gd(Me),e.lanes=Me,e.memoizedState=Re}jm=null}function $5(e,t){if(typeof e!="function")throw new Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+e));e.call(t)}function a0(){Em=!1}function Rm(){return Em}function o0(e,t,r){var a=t.effects;if(t.effects=null,a!==null)for(var m=0;m<a.length;m++){var E=a[m],U=E.callback;U!==null&&(E.callback=null,$5(U,r))}}var Wu={},ho=ao(Wu),Gu=ao(Wu),Tm=ao(Wu);function Lm(e){if(e===Wu)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 l0(){var e=Lm(Tm.current);return e}function bg(e,t){Vi(Tm,t,e),Vi(Gu,e,e),Vi(ho,Wu,e);var r=oT(t);Oi(ho,e),Vi(ho,r,e)}function rc(e){Oi(ho,e),Oi(Gu,e),Oi(Tm,e)}function _g(){var e=Lm(ho.current);return e}function c0(e){Lm(Tm.current);var t=Lm(ho.current),r=lT(t,e.type);t!==r&&(Vi(Gu,e,e),Vi(ho,r,e))}function wg(e){Gu.current===e&&(Oi(ho,e),Oi(Gu,e))}var W5=0,u0=1,d0=1,Yu=2,Bs=ao(W5);function yg(e,t){return(e&t)!==0}function ic(e){return e&u0}function xg(e,t){return e&u0|t}function G5(e,t){return e|t}function mo(e,t){Vi(Bs,t,e)}function sc(e){Oi(Bs,e)}function Y5(e,t){var r=e.memoizedState;return r!==null?r.dehydrated!==null:(e.memoizedProps,!0)}function Am(e){for(var t=e;t!==null;){if(t.tag===T){var r=t.memoizedState;if(r!==null){var a=r.dehydrated;if(a===null||Dx(a)||Iv(a))return t}}else if(t.tag===H&&t.memoizedProps.revealOrder!==void 0){var m=(t.flags&Zn)!==Ot;if(m)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 rs=0,Qr=1,ta=2,ei=4,yi=8,Ng=[];function Sg(){for(var e=0;e<Ng.length;e++){var t=Ng[e];t._workInProgressVersionPrimary=null}Ng.length=0}function q5(e,t){var r=t._getVersion,a=r(t._source);e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,a]:e.mutableSourceEagerHydrationData.push(t,a)}var kt=l.ReactCurrentDispatcher,qu=l.ReactCurrentBatchConfig,Cg,ac;Cg=new Set;var Jo=ut,or=null,ti=null,ni=null,Mm=!1,Ku=!1,Xu=0,K5=0,X5=25,et=null,Cs=null,fo=-1,Eg=!1;function tr(){{var e=et;Cs===null?Cs=[e]:Cs.push(e)}}function xt(){{var e=et;Cs!==null&&(fo++,Cs[fo]!==e&&J5(e))}}function oc(e){e!=null&&!gn(e)&&_("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",et,typeof e)}function J5(e){{var t=ne(or);if(!Cg.has(t)&&(Cg.add(t),Cs!==null)){for(var r="",a=30,m=0;m<=fo;m++){for(var E=Cs[m],U=m===fo?e:E,I=m+1+". "+E;I.length<a;)I+=" ";I+=U+`
131
+ `,r+=I}_(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks
132
+
133
+ Previous render Next render
134
+ ------------------------------------------------------
135
+ %s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136
+ `,t,r)}}}function Bi(){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 jg(e,t){if(Eg)return!1;if(t===null)return _("%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.",et),!1;e.length!==t.length&&_(`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`,et,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var r=0;r<t.length&&r<e.length;r++)if(!hs(e[r],t[r]))return!1;return!0}function lc(e,t,r,a,m,E){Jo=E,or=t,Cs=e!==null?e._debugHookTypes:null,fo=-1,Eg=e!==null&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=ut,e!==null&&e.memoizedState!==null?kt.current=A0:Cs!==null?kt.current=L0:kt.current=T0;var U=r(a,m);if(Ku){var I=0;do{if(Ku=!1,Xu=0,I>=X5)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");I+=1,Eg=!1,ti=null,ni=null,t.updateQueue=null,fo=-1,kt.current=M0,U=r(a,m)}while(Ku)}kt.current=Ym,t._debugHookTypes=Cs;var $=ti!==null&&ti.next!==null;if(Jo=ut,or=null,ti=null,ni=null,et=null,Cs=null,fo=-1,e!==null&&(e.flags&ya)!==(t.flags&ya)&&(e.mode&In)!==sn&&_("Internal React error: Expected static flag was missing. Please notify the React team."),Mm=!1,$)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return U}function cc(){var e=Xu!==0;return Xu=0,e}function h0(e,t,r){t.updateQueue=e.updateQueue,(t.mode&Js)!==sn?t.flags&=-50333701:t.flags&=-2053,e.lanes=Uh(e.lanes,r)}function m0(){if(kt.current=Ym,Mm){for(var e=or.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Mm=!1}Jo=ut,or=null,ti=null,ni=null,Cs=null,fo=-1,et=null,E0=!1,Ku=!1,Xu=0}function na(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ni===null?or.memoizedState=ni=e:ni=ni.next=e,ni}function Es(){var e;if(ti===null){var t=or.alternate;t!==null?e=t.memoizedState:e=null}else e=ti.next;var r;if(ni===null?r=or.memoizedState:r=ni.next,r!==null)ni=r,r=ni.next,ti=e;else{if(e===null)throw new Error("Rendered more hooks than during the previous render.");ti=e;var a={memoizedState:ti.memoizedState,baseState:ti.baseState,baseQueue:ti.baseQueue,queue:ti.queue,next:null};ni===null?or.memoizedState=ni=a:ni=ni.next=a}return ni}function f0(){return{lastEffect:null,stores:null}}function Dg(e,t){return typeof t=="function"?t(e):t}function kg(e,t,r){var a=na(),m;r!==void 0?m=r(t):m=t,a.memoizedState=a.baseState=m;var E={pending:null,interleaved:null,lanes:ut,dispatch:null,lastRenderedReducer:e,lastRenderedState:m};a.queue=E;var U=E.dispatch=tL.bind(null,or,E);return[a.memoizedState,U]}function Rg(e,t,r){var a=Es(),m=a.queue;if(m===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");m.lastRenderedReducer=e;var E=ti,U=E.baseQueue,I=m.pending;if(I!==null){if(U!==null){var $=U.next,te=I.next;U.next=te,I.next=$}E.baseQueue!==U&&_("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),E.baseQueue=U=I,m.pending=null}if(U!==null){var re=U.next,be=E.baseState,ge=null,Re=null,Me=null,Ke=re;do{var St=Ke.lane;if(Pl(Jo,St)){if(Me!==null){var $t={lane:mi,action:Ke.action,hasEagerState:Ke.hasEagerState,eagerState:Ke.eagerState,next:null};Me=Me.next=$t}if(Ke.hasEagerState)be=Ke.eagerState;else{var Hn=Ke.action;be=e(be,Hn)}}else{var Zt={lane:St,action:Ke.action,hasEagerState:Ke.hasEagerState,eagerState:Ke.eagerState,next:null};Me===null?(Re=Me=Zt,ge=be):Me=Me.next=Zt,or.lanes=En(or.lanes,St),gd(St)}Ke=Ke.next}while(Ke!==null&&Ke!==re);Me===null?ge=be:Me.next=Re,hs(be,a.memoizedState)||sd(),a.memoizedState=be,a.baseState=ge,a.baseQueue=Me,m.lastRenderedState=be}var Un=m.interleaved;if(Un!==null){var Ee=Un;do{var Xe=Ee.lane;or.lanes=En(or.lanes,Xe),gd(Xe),Ee=Ee.next}while(Ee!==Un)}else U===null&&(m.lanes=ut);var je=m.dispatch;return[a.memoizedState,je]}function Tg(e,t,r){var a=Es(),m=a.queue;if(m===null)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");m.lastRenderedReducer=e;var E=m.dispatch,U=m.pending,I=a.memoizedState;if(U!==null){m.pending=null;var $=U.next,te=$;do{var re=te.action;I=e(I,re),te=te.next}while(te!==$);hs(I,a.memoizedState)||sd(),a.memoizedState=I,a.baseQueue===null&&(a.baseState=I),m.lastRenderedState=I}return[I,E]}function z6(e,t,r){}function $6(e,t,r){}function Lg(e,t,r){var a=or,m=na(),E,U=wi();if(U){if(r===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");E=r(),ac||E!==r()&&(_("The result of getServerSnapshot should be cached to avoid an infinite loop"),ac=!0)}else{if(E=t(),!ac){var I=t();hs(E,I)||(_("The result of getSnapshot should be cached to avoid an infinite loop"),ac=!0)}var $=mf();if($===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Mh($,Jo)||p0(a,t,E)}m.memoizedState=E;var te={value:E,getSnapshot:t};return m.queue=te,Pm(g0.bind(null,a,te,e),[e]),a.flags|=Ja,Ju(Qr|yi,v0.bind(null,a,te,E,t),void 0,null),E}function Um(e,t,r){var a=or,m=Es(),E=t();if(!ac){var U=t();hs(E,U)||(_("The result of getSnapshot should be cached to avoid an infinite loop"),ac=!0)}var I=m.memoizedState,$=!hs(I,E);$&&(m.memoizedState=E,sd());var te=m.queue;if(Qu(g0.bind(null,a,te,e),[e]),te.getSnapshot!==t||$||ni!==null&&ni.memoizedState.tag&Qr){a.flags|=Ja,Ju(Qr|yi,v0.bind(null,a,te,E,t),void 0,null);var re=mf();if(re===null)throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Mh(re,Jo)||p0(a,t,E)}return E}function p0(e,t,r){e.flags|=Dp;var a={getSnapshot:t,value:r},m=or.updateQueue;if(m===null)m=f0(),or.updateQueue=m,m.stores=[a];else{var E=m.stores;E===null?m.stores=[a]:E.push(a)}}function v0(e,t,r,a){t.value=r,t.getSnapshot=a,b0(t)&&_0(e)}function g0(e,t,r){var a=function(){b0(t)&&_0(e)};return r(a)}function b0(e){var t=e.getSnapshot,r=e.value;try{var a=t();return!hs(r,a)}catch{return!0}}function _0(e){var t=ns(e,pn);t!==null&&ai(t,e,pn,br)}function Om(e){var t=na();typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e;var r={pending:null,interleaved:null,lanes:ut,dispatch:null,lastRenderedReducer:Dg,lastRenderedState:e};t.queue=r;var a=r.dispatch=nL.bind(null,or,r);return[t.memoizedState,a]}function Ag(e){return Rg(Dg)}function Mg(e){return Tg(Dg)}function Ju(e,t,r,a){var m={tag:e,create:t,destroy:r,deps:a,next:null},E=or.updateQueue;if(E===null)E=f0(),or.updateQueue=E,E.lastEffect=m.next=m;else{var U=E.lastEffect;if(U===null)E.lastEffect=m.next=m;else{var I=U.next;U.next=m,m.next=I,E.lastEffect=m}}return m}function Ug(e){var t=na();{var r={current:e};return t.memoizedState=r,r}}function Vm(e){var t=Es();return t.memoizedState}function Zu(e,t,r,a){var m=na(),E=a===void 0?null:a;or.flags|=e,m.memoizedState=Ju(Qr|t,r,void 0,E)}function Bm(e,t,r,a){var m=Es(),E=a===void 0?null:a,U=void 0;if(ti!==null){var I=ti.memoizedState;if(U=I.destroy,E!==null){var $=I.deps;if(jg(E,$)){m.memoizedState=Ju(t,r,U,E);return}}}or.flags|=e,m.memoizedState=Ju(Qr|t,r,U,E)}function Pm(e,t){return(or.mode&Js)!==sn?Zu(Lp|Ja|Tp,yi,e,t):Zu(Ja|Tp,yi,e,t)}function Qu(e,t){return Bm(Ja,yi,e,t)}function Og(e,t){return Zu(Jn,ta,e,t)}function Im(e,t){return Bm(Jn,ta,e,t)}function Vg(e,t){var r=Jn;return r|=Mo,(or.mode&Js)!==sn&&(r|=Za),Zu(r,ei,e,t)}function Fm(e,t){return Bm(Jn,ei,e,t)}function w0(e,t){if(typeof t=="function"){var r=t,a=e();return r(a),function(){r(null)}}else if(t!=null){var m=t;m.hasOwnProperty("current")||_("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(m).join(", ")+"}");var E=e();return m.current=E,function(){m.current=null}}}function Bg(e,t,r){typeof t!="function"&&_("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var a=r!=null?r.concat([e]):null,m=Jn;return m|=Mo,(or.mode&Js)!==sn&&(m|=Za),Zu(m,ei,w0.bind(null,t,e),a)}function Hm(e,t,r){typeof t!="function"&&_("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null");var a=r!=null?r.concat([e]):null;return Bm(Jn,ei,w0.bind(null,t,e),a)}function Z5(e,t){}var zm=Z5;function Pg(e,t){var r=na(),a=t===void 0?null:t;return r.memoizedState=[e,a],e}function $m(e,t){var r=Es(),a=t===void 0?null:t,m=r.memoizedState;if(m!==null&&a!==null){var E=m[1];if(jg(a,E))return m[0]}return r.memoizedState=[e,a],e}function Ig(e,t){var r=na(),a=t===void 0?null:t,m=e();return r.memoizedState=[m,a],m}function Wm(e,t){var r=Es(),a=t===void 0?null:t,m=r.memoizedState;if(m!==null&&a!==null){var E=m[1];if(jg(a,E))return m[0]}var U=e();return r.memoizedState=[U,a],U}function Fg(e){var t=na();return t.memoizedState=e,e}function y0(e){var t=Es(),r=ti,a=r.memoizedState;return N0(t,a,e)}function x0(e){var t=Es();if(ti===null)return t.memoizedState=e,e;var r=ti.memoizedState;return N0(t,r,e)}function N0(e,t,r){var a=!VD(Jo);if(a){if(!hs(r,t)){var m=_y();or.lanes=En(or.lanes,m),gd(m),e.baseState=!0}return t}else return e.baseState&&(e.baseState=!1,sd()),e.memoizedState=r,r}function Q5(e,t,r){var a=Ms();fi(GD(a,Na)),e(!0);var m=qu.transition;qu.transition={};var E=qu.transition;qu.transition._updatedFibers=new Set;try{e(!1),t()}finally{if(fi(a),qu.transition=m,m===null&&E._updatedFibers){var U=E._updatedFibers.size;U>10&&D("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."),E._updatedFibers.clear()}}}function Hg(){var e=Om(!1),t=e[0],r=e[1],a=Q5.bind(null,r),m=na();return m.memoizedState=a,[t,a]}function S0(){var e=Ag(),t=e[0],r=Es(),a=r.memoizedState;return[t,a]}function C0(){var e=Mg(),t=e[0],r=Es(),a=r.memoizedState;return[t,a]}var E0=!1;function eL(){return E0}function zg(){var e=na(),t=mf(),r=t.identifierPrefix,a;if(wi()){var m=g5();a=":"+r+"R"+m;var E=Xu++;E>0&&(a+="H"+E.toString(32)),a+=":"}else{var U=K5++;a=":"+r+"r"+U.toString(32)+":"}return e.memoizedState=a,a}function Gm(){var e=Es(),t=e.memoizedState;return t}function tL(e,t,r){typeof arguments[3]=="function"&&_("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 a=_o(e),m={lane:a,action:r,hasEagerState:!1,eagerState:null,next:null};if(j0(e))D0(t,m);else{var E=n0(e,t,m,a);if(E!==null){var U=Yi();ai(E,e,a,U),k0(E,t,a)}}R0(e,a)}function nL(e,t,r){typeof arguments[3]=="function"&&_("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 a=_o(e),m={lane:a,action:r,hasEagerState:!1,eagerState:null,next:null};if(j0(e))D0(t,m);else{var E=e.alternate;if(e.lanes===ut&&(E===null||E.lanes===ut)){var U=t.lastRenderedReducer;if(U!==null){var I;I=kt.current,kt.current=Ps;try{var $=t.lastRenderedState,te=U($,r);if(m.hasEagerState=!0,m.eagerState=te,hs(te,$)){I5(e,t,m,a);return}}catch{}finally{kt.current=I}}}var re=n0(e,t,m,a);if(re!==null){var be=Yi();ai(re,e,a,be),k0(re,t,a)}}R0(e,a)}function j0(e){var t=e.alternate;return e===or||t!==null&&t===or}function D0(e,t){Ku=Mm=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function k0(e,t,r){if(by(r)){var a=t.lanes;a=wy(a,e.pendingLanes);var m=En(a,r);t.lanes=m,lv(e,m)}}function R0(e,t,r){Vp(e,t)}var Ym={readContext:Yr,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:K},T0=null,L0=null,A0=null,M0=null,ra=null,Ps=null,qm=null;{var $g=function(){_("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().")},vn=function(){_("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")};T0={readContext:function(e){return Yr(e)},useCallback:function(e,t){return et="useCallback",tr(),oc(t),Pg(e,t)},useContext:function(e){return et="useContext",tr(),Yr(e)},useEffect:function(e,t){return et="useEffect",tr(),oc(t),Pm(e,t)},useImperativeHandle:function(e,t,r){return et="useImperativeHandle",tr(),oc(r),Bg(e,t,r)},useInsertionEffect:function(e,t){return et="useInsertionEffect",tr(),oc(t),Og(e,t)},useLayoutEffect:function(e,t){return et="useLayoutEffect",tr(),oc(t),Vg(e,t)},useMemo:function(e,t){et="useMemo",tr(),oc(t);var r=kt.current;kt.current=ra;try{return Ig(e,t)}finally{kt.current=r}},useReducer:function(e,t,r){et="useReducer",tr();var a=kt.current;kt.current=ra;try{return kg(e,t,r)}finally{kt.current=a}},useRef:function(e){return et="useRef",tr(),Ug(e)},useState:function(e){et="useState",tr();var t=kt.current;kt.current=ra;try{return Om(e)}finally{kt.current=t}},useDebugValue:function(e,t){return et="useDebugValue",tr(),void 0},useDeferredValue:function(e){return et="useDeferredValue",tr(),Fg(e)},useTransition:function(){return et="useTransition",tr(),Hg()},useMutableSource:function(e,t,r){return et="useMutableSource",tr(),void 0},useSyncExternalStore:function(e,t,r){return et="useSyncExternalStore",tr(),Lg(e,t,r)},useId:function(){return et="useId",tr(),zg()},unstable_isNewReconciler:K},L0={readContext:function(e){return Yr(e)},useCallback:function(e,t){return et="useCallback",xt(),Pg(e,t)},useContext:function(e){return et="useContext",xt(),Yr(e)},useEffect:function(e,t){return et="useEffect",xt(),Pm(e,t)},useImperativeHandle:function(e,t,r){return et="useImperativeHandle",xt(),Bg(e,t,r)},useInsertionEffect:function(e,t){return et="useInsertionEffect",xt(),Og(e,t)},useLayoutEffect:function(e,t){return et="useLayoutEffect",xt(),Vg(e,t)},useMemo:function(e,t){et="useMemo",xt();var r=kt.current;kt.current=ra;try{return Ig(e,t)}finally{kt.current=r}},useReducer:function(e,t,r){et="useReducer",xt();var a=kt.current;kt.current=ra;try{return kg(e,t,r)}finally{kt.current=a}},useRef:function(e){return et="useRef",xt(),Ug(e)},useState:function(e){et="useState",xt();var t=kt.current;kt.current=ra;try{return Om(e)}finally{kt.current=t}},useDebugValue:function(e,t){return et="useDebugValue",xt(),void 0},useDeferredValue:function(e){return et="useDeferredValue",xt(),Fg(e)},useTransition:function(){return et="useTransition",xt(),Hg()},useMutableSource:function(e,t,r){return et="useMutableSource",xt(),void 0},useSyncExternalStore:function(e,t,r){return et="useSyncExternalStore",xt(),Lg(e,t,r)},useId:function(){return et="useId",xt(),zg()},unstable_isNewReconciler:K},A0={readContext:function(e){return Yr(e)},useCallback:function(e,t){return et="useCallback",xt(),$m(e,t)},useContext:function(e){return et="useContext",xt(),Yr(e)},useEffect:function(e,t){return et="useEffect",xt(),Qu(e,t)},useImperativeHandle:function(e,t,r){return et="useImperativeHandle",xt(),Hm(e,t,r)},useInsertionEffect:function(e,t){return et="useInsertionEffect",xt(),Im(e,t)},useLayoutEffect:function(e,t){return et="useLayoutEffect",xt(),Fm(e,t)},useMemo:function(e,t){et="useMemo",xt();var r=kt.current;kt.current=Ps;try{return Wm(e,t)}finally{kt.current=r}},useReducer:function(e,t,r){et="useReducer",xt();var a=kt.current;kt.current=Ps;try{return Rg(e,t,r)}finally{kt.current=a}},useRef:function(e){return et="useRef",xt(),Vm()},useState:function(e){et="useState",xt();var t=kt.current;kt.current=Ps;try{return Ag(e)}finally{kt.current=t}},useDebugValue:function(e,t){return et="useDebugValue",xt(),zm()},useDeferredValue:function(e){return et="useDeferredValue",xt(),y0(e)},useTransition:function(){return et="useTransition",xt(),S0()},useMutableSource:function(e,t,r){return et="useMutableSource",xt(),void 0},useSyncExternalStore:function(e,t,r){return et="useSyncExternalStore",xt(),Um(e,t)},useId:function(){return et="useId",xt(),Gm()},unstable_isNewReconciler:K},M0={readContext:function(e){return Yr(e)},useCallback:function(e,t){return et="useCallback",xt(),$m(e,t)},useContext:function(e){return et="useContext",xt(),Yr(e)},useEffect:function(e,t){return et="useEffect",xt(),Qu(e,t)},useImperativeHandle:function(e,t,r){return et="useImperativeHandle",xt(),Hm(e,t,r)},useInsertionEffect:function(e,t){return et="useInsertionEffect",xt(),Im(e,t)},useLayoutEffect:function(e,t){return et="useLayoutEffect",xt(),Fm(e,t)},useMemo:function(e,t){et="useMemo",xt();var r=kt.current;kt.current=qm;try{return Wm(e,t)}finally{kt.current=r}},useReducer:function(e,t,r){et="useReducer",xt();var a=kt.current;kt.current=qm;try{return Tg(e,t,r)}finally{kt.current=a}},useRef:function(e){return et="useRef",xt(),Vm()},useState:function(e){et="useState",xt();var t=kt.current;kt.current=qm;try{return Mg(e)}finally{kt.current=t}},useDebugValue:function(e,t){return et="useDebugValue",xt(),zm()},useDeferredValue:function(e){return et="useDeferredValue",xt(),x0(e)},useTransition:function(){return et="useTransition",xt(),C0()},useMutableSource:function(e,t,r){return et="useMutableSource",xt(),void 0},useSyncExternalStore:function(e,t,r){return et="useSyncExternalStore",xt(),Um(e,t)},useId:function(){return et="useId",xt(),Gm()},unstable_isNewReconciler:K},ra={readContext:function(e){return $g(),Yr(e)},useCallback:function(e,t){return et="useCallback",vn(),tr(),Pg(e,t)},useContext:function(e){return et="useContext",vn(),tr(),Yr(e)},useEffect:function(e,t){return et="useEffect",vn(),tr(),Pm(e,t)},useImperativeHandle:function(e,t,r){return et="useImperativeHandle",vn(),tr(),Bg(e,t,r)},useInsertionEffect:function(e,t){return et="useInsertionEffect",vn(),tr(),Og(e,t)},useLayoutEffect:function(e,t){return et="useLayoutEffect",vn(),tr(),Vg(e,t)},useMemo:function(e,t){et="useMemo",vn(),tr();var r=kt.current;kt.current=ra;try{return Ig(e,t)}finally{kt.current=r}},useReducer:function(e,t,r){et="useReducer",vn(),tr();var a=kt.current;kt.current=ra;try{return kg(e,t,r)}finally{kt.current=a}},useRef:function(e){return et="useRef",vn(),tr(),Ug(e)},useState:function(e){et="useState",vn(),tr();var t=kt.current;kt.current=ra;try{return Om(e)}finally{kt.current=t}},useDebugValue:function(e,t){return et="useDebugValue",vn(),tr(),void 0},useDeferredValue:function(e){return et="useDeferredValue",vn(),tr(),Fg(e)},useTransition:function(){return et="useTransition",vn(),tr(),Hg()},useMutableSource:function(e,t,r){return et="useMutableSource",vn(),tr(),void 0},useSyncExternalStore:function(e,t,r){return et="useSyncExternalStore",vn(),tr(),Lg(e,t,r)},useId:function(){return et="useId",vn(),tr(),zg()},unstable_isNewReconciler:K},Ps={readContext:function(e){return $g(),Yr(e)},useCallback:function(e,t){return et="useCallback",vn(),xt(),$m(e,t)},useContext:function(e){return et="useContext",vn(),xt(),Yr(e)},useEffect:function(e,t){return et="useEffect",vn(),xt(),Qu(e,t)},useImperativeHandle:function(e,t,r){return et="useImperativeHandle",vn(),xt(),Hm(e,t,r)},useInsertionEffect:function(e,t){return et="useInsertionEffect",vn(),xt(),Im(e,t)},useLayoutEffect:function(e,t){return et="useLayoutEffect",vn(),xt(),Fm(e,t)},useMemo:function(e,t){et="useMemo",vn(),xt();var r=kt.current;kt.current=Ps;try{return Wm(e,t)}finally{kt.current=r}},useReducer:function(e,t,r){et="useReducer",vn(),xt();var a=kt.current;kt.current=Ps;try{return Rg(e,t,r)}finally{kt.current=a}},useRef:function(e){return et="useRef",vn(),xt(),Vm()},useState:function(e){et="useState",vn(),xt();var t=kt.current;kt.current=Ps;try{return Ag(e)}finally{kt.current=t}},useDebugValue:function(e,t){return et="useDebugValue",vn(),xt(),zm()},useDeferredValue:function(e){return et="useDeferredValue",vn(),xt(),y0(e)},useTransition:function(){return et="useTransition",vn(),xt(),S0()},useMutableSource:function(e,t,r){return et="useMutableSource",vn(),xt(),void 0},useSyncExternalStore:function(e,t,r){return et="useSyncExternalStore",vn(),xt(),Um(e,t)},useId:function(){return et="useId",vn(),xt(),Gm()},unstable_isNewReconciler:K},qm={readContext:function(e){return $g(),Yr(e)},useCallback:function(e,t){return et="useCallback",vn(),xt(),$m(e,t)},useContext:function(e){return et="useContext",vn(),xt(),Yr(e)},useEffect:function(e,t){return et="useEffect",vn(),xt(),Qu(e,t)},useImperativeHandle:function(e,t,r){return et="useImperativeHandle",vn(),xt(),Hm(e,t,r)},useInsertionEffect:function(e,t){return et="useInsertionEffect",vn(),xt(),Im(e,t)},useLayoutEffect:function(e,t){return et="useLayoutEffect",vn(),xt(),Fm(e,t)},useMemo:function(e,t){et="useMemo",vn(),xt();var r=kt.current;kt.current=Ps;try{return Wm(e,t)}finally{kt.current=r}},useReducer:function(e,t,r){et="useReducer",vn(),xt();var a=kt.current;kt.current=Ps;try{return Tg(e,t,r)}finally{kt.current=a}},useRef:function(e){return et="useRef",vn(),xt(),Vm()},useState:function(e){et="useState",vn(),xt();var t=kt.current;kt.current=Ps;try{return Mg(e)}finally{kt.current=t}},useDebugValue:function(e,t){return et="useDebugValue",vn(),xt(),zm()},useDeferredValue:function(e){return et="useDeferredValue",vn(),xt(),x0(e)},useTransition:function(){return et="useTransition",vn(),xt(),C0()},useMutableSource:function(e,t,r){return et="useMutableSource",vn(),xt(),void 0},useSyncExternalStore:function(e,t,r){return et="useSyncExternalStore",vn(),xt(),Um(e,t)},useId:function(){return et="useId",vn(),xt(),Gm()},unstable_isNewReconciler:K}}var po=i.unstable_now,U0=0,Km=-1,ed=-1,Xm=-1,Wg=!1,Jm=!1;function O0(){return Wg}function rL(){Jm=!0}function iL(){Wg=!1,Jm=!1}function sL(){Wg=Jm,Jm=!1}function V0(){return U0}function B0(){U0=po()}function Gg(e){ed=po(),e.actualStartTime<0&&(e.actualStartTime=po())}function P0(e){ed=-1}function Zm(e,t){if(ed>=0){var r=po()-ed;e.actualDuration+=r,t&&(e.selfBaseDuration=r),ed=-1}}function ia(e){if(Km>=0){var t=po()-Km;Km=-1;for(var r=e.return;r!==null;){switch(r.tag){case d:var a=r.stateNode;a.effectDuration+=t;return;case C:var m=r.stateNode;m.effectDuration+=t;return}r=r.return}}}function Yg(e){if(Xm>=0){var t=po()-Xm;Xm=-1;for(var r=e.return;r!==null;){switch(r.tag){case d:var a=r.stateNode;a!==null&&(a.passiveEffectDuration+=t);return;case C:var m=r.stateNode;m!==null&&(m.passiveEffectDuration+=t);return}r=r.return}}}function sa(){Km=po()}function qg(){Xm=po()}function Kg(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function Is(e,t){if(e&&e.defaultProps){var r=Jt({},t),a=e.defaultProps;for(var m in a)r[m]===void 0&&(r[m]=a[m]);return r}return t}var Xg={},Jg,Zg,Qg,eb,tb,I0,Qm,nb,rb,ib,td;{Jg=new Set,Zg=new Set,Qg=new Set,eb=new Set,nb=new Set,tb=new Set,rb=new Set,ib=new Set,td=new Set;var F0=new Set;Qm=function(e,t){if(!(e===null||typeof e=="function")){var r=t+"_"+e;F0.has(r)||(F0.add(r),_("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},I0=function(e,t){if(t===void 0){var r=Nn(e)||"Component";tb.has(r)||(tb.add(r),_("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",r))}},Object.defineProperty(Xg,"_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(Xg)}function sb(e,t,r,a){var m=e.memoizedState,E=r(a,m);{if(e.mode&Ar){hi(!0);try{E=r(a,m)}finally{hi(!1)}}I0(t,E)}var U=E==null?m:Jt({},m,E);if(e.memoizedState=U,e.lanes===ut){var I=e.updateQueue;I.baseState=U}}var ab={isMounted:Xj,enqueueSetState:function(e,t,r){var a=Yn(e),m=Yi(),E=_o(a),U=Ra(m,E);U.payload=t,r!=null&&(Qm(r,"setState"),U.callback=r);var I=uo(a,U,E);I!==null&&(ai(I,a,E,m),Dm(I,a,E)),Vp(a,E)},enqueueReplaceState:function(e,t,r){var a=Yn(e),m=Yi(),E=_o(a),U=Ra(m,E);U.tag=i0,U.payload=t,r!=null&&(Qm(r,"replaceState"),U.callback=r);var I=uo(a,U,E);I!==null&&(ai(I,a,E,m),Dm(I,a,E)),Vp(a,E)},enqueueForceUpdate:function(e,t){var r=Yn(e),a=Yi(),m=_o(r),E=Ra(a,m);E.tag=Cm,t!=null&&(Qm(t,"forceUpdate"),E.callback=t);var U=uo(r,E,m);U!==null&&(ai(U,r,m,a),Dm(U,r,m)),jD(r,m)}};function H0(e,t,r,a,m,E,U){var I=e.stateNode;if(typeof I.shouldComponentUpdate=="function"){var $=I.shouldComponentUpdate(a,E,U);{if(e.mode&Ar){hi(!0);try{$=I.shouldComponentUpdate(a,E,U)}finally{hi(!1)}}$===void 0&&_("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",Nn(t)||"Component")}return $}return t.prototype&&t.prototype.isPureReactComponent?!Nu(r,a)||!Nu(m,E):!0}function aL(e,t,r){var a=e.stateNode;{var m=Nn(t)||"Component",E=a.render;E||(t.prototype&&typeof t.prototype.render=="function"?_("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",m):_("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",m)),a.getInitialState&&!a.getInitialState.isReactClassApproved&&!a.state&&_("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?",m),a.getDefaultProps&&!a.getDefaultProps.isReactClassApproved&&_("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.",m),a.propTypes&&_("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",m),a.contextType&&_("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",m),t.childContextTypes&&!td.has(t)&&(e.mode&Ar)===sn&&(td.add(t),_(`%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`,m)),t.contextTypes&&!td.has(t)&&(e.mode&Ar)===sn&&(td.add(t),_(`%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`,m)),a.contextTypes&&_("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",m),t.contextType&&t.contextTypes&&!rb.has(t)&&(rb.add(t),_("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",m)),typeof a.componentShouldUpdate=="function"&&_("%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.",m),t.prototype&&t.prototype.isPureReactComponent&&typeof a.shouldComponentUpdate<"u"&&_("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",Nn(t)||"A pure component"),typeof a.componentDidUnmount=="function"&&_("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",m),typeof a.componentDidReceiveProps=="function"&&_("%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().",m),typeof a.componentWillRecieveProps=="function"&&_("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",m),typeof a.UNSAFE_componentWillRecieveProps=="function"&&_("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",m);var U=a.props!==r;a.props!==void 0&&U&&_("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",m,m),a.defaultProps&&_("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",m,m),typeof a.getSnapshotBeforeUpdate=="function"&&typeof a.componentDidUpdate!="function"&&!Qg.has(t)&&(Qg.add(t),_("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Nn(t))),typeof a.getDerivedStateFromProps=="function"&&_("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",m),typeof a.getDerivedStateFromError=="function"&&_("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",m),typeof t.getSnapshotBeforeUpdate=="function"&&_("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",m);var I=a.state;I&&(typeof I!="object"||gn(I))&&_("%s.state: must be set to an object or null",m),typeof a.getChildContext=="function"&&typeof t.childContextTypes!="object"&&_("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",m)}}function z0(e,t){t.updater=ab,e.stateNode=t,ys(t,e),t._reactInternalInstance=Xg}function $0(e,t,r){var a=!1,m=ms,E=ms,U=t.contextType;if("contextType"in t){var I=U===null||U!==void 0&&U.$$typeof===mt&&U._context===void 0;if(!I&&!ib.has(t)){ib.add(t);var $="";U===void 0?$=" 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 U!="object"?$=" However, it is set to a "+typeof U+".":U.$$typeof===rt?$=" Did you accidentally pass the Context.Provider instead?":U._context!==void 0?$=" Did you accidentally pass the Context.Consumer instead?":$=" However, it is set to an object with keys {"+Object.keys(U).join(", ")+"}.",_("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",Nn(t)||"Component",$)}}if(typeof U=="object"&&U!==null)E=Yr(U);else{m=Kl(e,t,!0);var te=t.contextTypes;a=te!=null,E=a?Xl(e,m):ms}var re=new t(r,E);if(e.mode&Ar){hi(!0);try{re=new t(r,E)}finally{hi(!1)}}var be=e.memoizedState=re.state!==null&&re.state!==void 0?re.state:null;z0(e,re);{if(typeof t.getDerivedStateFromProps=="function"&&be===null){var ge=Nn(t)||"Component";Zg.has(ge)||(Zg.add(ge),_("`%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.",ge,re.state===null?"null":"undefined",ge))}if(typeof t.getDerivedStateFromProps=="function"||typeof re.getSnapshotBeforeUpdate=="function"){var Re=null,Me=null,Ke=null;if(typeof re.componentWillMount=="function"&&re.componentWillMount.__suppressDeprecationWarning!==!0?Re="componentWillMount":typeof re.UNSAFE_componentWillMount=="function"&&(Re="UNSAFE_componentWillMount"),typeof re.componentWillReceiveProps=="function"&&re.componentWillReceiveProps.__suppressDeprecationWarning!==!0?Me="componentWillReceiveProps":typeof re.UNSAFE_componentWillReceiveProps=="function"&&(Me="UNSAFE_componentWillReceiveProps"),typeof re.componentWillUpdate=="function"&&re.componentWillUpdate.__suppressDeprecationWarning!==!0?Ke="componentWillUpdate":typeof re.UNSAFE_componentWillUpdate=="function"&&(Ke="UNSAFE_componentWillUpdate"),Re!==null||Me!==null||Ke!==null){var St=Nn(t)||"Component",Zt=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";eb.has(St)||(eb.add(St),_(`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`,St,Zt,Re!==null?`
153
+ `+Re:"",Me!==null?`
154
+ `+Me:"",Ke!==null?`
155
+ `+Ke:""))}}}return a&&Ax(e,m,E),re}function oL(e,t){var r=t.state;typeof t.componentWillMount=="function"&&t.componentWillMount(),typeof t.UNSAFE_componentWillMount=="function"&&t.UNSAFE_componentWillMount(),r!==t.state&&(_("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",ne(e)||"Component"),ab.enqueueReplaceState(t,t.state,null))}function W0(e,t,r,a){var m=t.state;if(typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,a),t.state!==m){{var E=ne(e)||"Component";Jg.has(E)||(Jg.add(E),_("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",E))}ab.enqueueReplaceState(t,t.state,null)}}function ob(e,t,r,a){aL(e,t,r);var m=e.stateNode;m.props=r,m.state=e.memoizedState,m.refs={},vg(e);var E=t.contextType;if(typeof E=="object"&&E!==null)m.context=Yr(E);else{var U=Kl(e,t,!0);m.context=Xl(e,U)}{if(m.state===r){var I=Nn(t)||"Component";nb.has(I)||(nb.add(I),_("%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.",I))}e.mode&Ar&&Vs.recordLegacyContextWarning(e,m),Vs.recordUnsafeLifecycleWarnings(e,m)}m.state=e.memoizedState;var $=t.getDerivedStateFromProps;if(typeof $=="function"&&(sb(e,t,$,r),m.state=e.memoizedState),typeof t.getDerivedStateFromProps!="function"&&typeof m.getSnapshotBeforeUpdate!="function"&&(typeof m.UNSAFE_componentWillMount=="function"||typeof m.componentWillMount=="function")&&(oL(e,m),km(e,r,m,a),m.state=e.memoizedState),typeof m.componentDidMount=="function"){var te=Jn;te|=Mo,(e.mode&Js)!==sn&&(te|=Za),e.flags|=te}}function lL(e,t,r,a){var m=e.stateNode,E=e.memoizedProps;m.props=E;var U=m.context,I=t.contextType,$=ms;if(typeof I=="object"&&I!==null)$=Yr(I);else{var te=Kl(e,t,!0);$=Xl(e,te)}var re=t.getDerivedStateFromProps,be=typeof re=="function"||typeof m.getSnapshotBeforeUpdate=="function";!be&&(typeof m.UNSAFE_componentWillReceiveProps=="function"||typeof m.componentWillReceiveProps=="function")&&(E!==r||U!==$)&&W0(e,m,r,$),a0();var ge=e.memoizedState,Re=m.state=ge;if(km(e,r,m,a),Re=e.memoizedState,E===r&&ge===Re&&!um()&&!Rm()){if(typeof m.componentDidMount=="function"){var Me=Jn;Me|=Mo,(e.mode&Js)!==sn&&(Me|=Za),e.flags|=Me}return!1}typeof re=="function"&&(sb(e,t,re,r),Re=e.memoizedState);var Ke=Rm()||H0(e,t,E,r,ge,Re,$);if(Ke){if(!be&&(typeof m.UNSAFE_componentWillMount=="function"||typeof m.componentWillMount=="function")&&(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"){var St=Jn;St|=Mo,(e.mode&Js)!==sn&&(St|=Za),e.flags|=St}}else{if(typeof m.componentDidMount=="function"){var Zt=Jn;Zt|=Mo,(e.mode&Js)!==sn&&(Zt|=Za),e.flags|=Zt}e.memoizedProps=r,e.memoizedState=Re}return m.props=r,m.state=Re,m.context=$,Ke}function cL(e,t,r,a,m){var E=t.stateNode;s0(e,t);var U=t.memoizedProps,I=t.type===t.elementType?U:Is(t.type,U);E.props=I;var $=t.pendingProps,te=E.context,re=r.contextType,be=ms;if(typeof re=="object"&&re!==null)be=Yr(re);else{var ge=Kl(t,r,!0);be=Xl(t,ge)}var Re=r.getDerivedStateFromProps,Me=typeof Re=="function"||typeof E.getSnapshotBeforeUpdate=="function";!Me&&(typeof E.UNSAFE_componentWillReceiveProps=="function"||typeof E.componentWillReceiveProps=="function")&&(U!==$||te!==be)&&W0(t,E,a,be),a0();var Ke=t.memoizedState,St=E.state=Ke;if(km(t,a,E,m),St=t.memoizedState,U===$&&Ke===St&&!um()&&!Rm()&&!B)return typeof E.componentDidUpdate=="function"&&(U!==e.memoizedProps||Ke!==e.memoizedState)&&(t.flags|=Jn),typeof E.getSnapshotBeforeUpdate=="function"&&(U!==e.memoizedProps||Ke!==e.memoizedState)&&(t.flags|=Ll),!1;typeof Re=="function"&&(sb(t,r,Re,a),St=t.memoizedState);var Zt=Rm()||H0(t,r,I,a,Ke,St,be)||B;return Zt?(!Me&&(typeof E.UNSAFE_componentWillUpdate=="function"||typeof E.componentWillUpdate=="function")&&(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(a,St,be),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(a,St,be)),typeof E.componentDidUpdate=="function"&&(t.flags|=Jn),typeof E.getSnapshotBeforeUpdate=="function"&&(t.flags|=Ll)):(typeof E.componentDidUpdate=="function"&&(U!==e.memoizedProps||Ke!==e.memoizedState)&&(t.flags|=Jn),typeof E.getSnapshotBeforeUpdate=="function"&&(U!==e.memoizedProps||Ke!==e.memoizedState)&&(t.flags|=Ll),t.memoizedProps=a,t.memoizedState=St),E.props=a,E.state=St,E.context=be,Zt}function Zo(e,t){return{value:e,source:t,stack:Fr(t),digest:null}}function lb(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function uL(e,t){return!0}function cb(e,t){try{var r=uL(e,t);if(r===!1)return;var a=t.value,m=t.source,E=t.stack,U=E!==null?E:"";if(a!=null&&a._suppressLogging){if(e.tag===f)return;console.error(a)}var I=m?ne(m):null,$=I?"The above error occurred in the <"+I+"> component:":"The above error occurred in one of your React components:",te;if(e.tag===d)te=`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 re=ne(e)||"Anonymous";te="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+re+".")}var be=$+`
157
+ `+U+`
158
+
159
+ `+(""+te);console.error(be)}catch(ge){setTimeout(function(){throw ge})}}var dL=typeof WeakMap=="function"?WeakMap:Map;function G0(e,t,r){var a=Ra(br,r);a.tag=fg,a.payload={element:null};var m=t.value;return a.callback=function(){rM(m),cb(e,t)},a}function ub(e,t,r){var a=Ra(br,r);a.tag=fg;var m=e.type.getDerivedStateFromError;if(typeof m=="function"){var E=t.value;a.payload=function(){return m(E)},a.callback=function(){rS(e),cb(e,t)}}var U=e.stateNode;return U!==null&&typeof U.componentDidCatch=="function"&&(a.callback=function(){rS(e),cb(e,t),typeof m!="function"&&tM(this);var $=t.value,te=t.stack;this.componentDidCatch($,{componentStack:te!==null?te:""}),typeof m!="function"&&(cs(e.lanes,pn)||_("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",ne(e)||"Unknown"))}),a}function Y0(e,t,r){var a=e.pingCache,m;if(a===null?(a=e.pingCache=new dL,m=new Set,a.set(t,m)):(m=a.get(t),m===void 0&&(m=new Set,a.set(t,m))),!m.has(r)){m.add(r);var E=iM.bind(null,e,t,r);As&&bd(e,r),t.then(E,E)}}function hL(e,t,r,a){var m=e.updateQueue;if(m===null){var E=new Set;E.add(r),e.updateQueue=E}else m.add(r)}function mL(e,t){var r=e.tag;if((e.mode&In)===sn&&(r===u||r===w||r===R)){var a=e.alternate;a?(e.updateQueue=a.updateQueue,e.memoizedState=a.memoizedState,e.lanes=a.lanes):(e.updateQueue=null,e.memoizedState=null)}}function q0(e){var t=e;do{if(t.tag===T&&Y5(t))return t;t=t.return}while(t!==null);return null}function K0(e,t,r,a,m){if((e.mode&In)===sn){if(e===t)e.flags|=$i;else{if(e.flags|=Zn,r.flags|=kp,r.flags&=-52805,r.tag===f){var E=r.alternate;if(E===null)r.tag=A;else{var U=Ra(br,pn);U.tag=Cm,uo(r,U,pn)}}r.lanes=En(r.lanes,pn)}return e}return e.flags|=$i,e.lanes=m,e}function fL(e,t,r,a,m){if(r.flags|=Dh,As&&bd(e,m),a!==null&&typeof a=="object"&&typeof a.then=="function"){var E=a;mL(r),wi()&&r.mode&In&&Ix();var U=q0(t);if(U!==null){U.flags&=~_a,K0(U,t,r,e,m),U.mode&In&&Y0(e,E,m),hL(U,e,E);return}else{if(!OD(m)){Y0(e,E,m),zb();return}var I=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.");a=I}}else if(wi()&&r.mode&In){Ix();var $=q0(t);if($!==null){($.flags&$i)===Ot&&($.flags|=_a),K0($,t,r,e,m),ng(Zo(a,r));return}}a=Zo(a,r),YA(a);var te=t;do{switch(te.tag){case d:{var re=a;te.flags|=$i;var be=lu(m);te.lanes=En(te.lanes,be);var ge=G0(te,re,be);gg(te,ge);return}case f:var Re=a,Me=te.type,Ke=te.stateNode;if((te.flags&Zn)===Ot&&(typeof Me.getDerivedStateFromError=="function"||Ke!==null&&typeof Ke.componentDidCatch=="function"&&!qN(Ke))){te.flags|=$i;var St=lu(m);te.lanes=En(te.lanes,St);var Zt=ub(te,Re,St);gg(te,Zt);return}break}te=te.return}while(te!==null)}function pL(){return null}var nd=l.ReactCurrentOwner,Fs=!1,db,rd,hb,mb,fb,Qo,pb,ef,id;db={},rd={},hb={},mb={},fb={},Qo=!1,pb={},ef={},id={};function Wi(e,t,r,a){e===null?t.child=Zx(t,null,r,a):t.child=ec(t,e.child,r,a)}function vL(e,t,r,a){t.child=ec(t,e.child,null,a),t.child=ec(t,null,r,a)}function X0(e,t,r,a,m){if(t.type!==t.elementType){var E=r.propTypes;E&&Us(E,a,"prop",Nn(r))}var U=r.render,I=t.ref,$,te;nc(t,m),nu(t);{if(nd.current=t,sr(!0),$=lc(e,t,U,a,I,m),te=cc(),t.mode&Ar){hi(!0);try{$=lc(e,t,U,a,I,m),te=cc()}finally{hi(!1)}}sr(!1)}return Ul(),e!==null&&!Fs?(h0(e,t,m),Ta(e,t,m)):(wi()&&te&&Xv(t),t.flags|=Tl,Wi(e,t,$,m),t.child)}function J0(e,t,r,a,m){if(e===null){var E=r.type;if(yM(E)&&r.compare===null&&r.defaultProps===void 0){var U=E;return U=gc(E),t.tag=R,t.type=U,bb(t,E),Z0(e,t,U,a,m)}{var I=E.propTypes;if(I&&Us(I,a,"prop",Nn(E)),r.defaultProps!==void 0){var $=Nn(E)||"Unknown";id[$]||(_("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",$),id[$]=!0)}}var te=e_(r.type,null,a,t,t.mode,m);return te.ref=t.ref,te.return=t,t.child=te,te}{var re=r.type,be=re.propTypes;be&&Us(be,a,"prop",Nn(re))}var ge=e.child,Re=Sb(e,m);if(!Re){var Me=ge.memoizedProps,Ke=r.compare;if(Ke=Ke!==null?Ke:Nu,Ke(Me,a)&&e.ref===t.ref)return Ta(e,t,m)}t.flags|=Tl;var St=il(ge,a);return St.ref=t.ref,St.return=t,t.child=St,St}function Z0(e,t,r,a,m){if(t.type!==t.elementType){var E=t.elementType;if(E.$$typeof===Ct){var U=E,I=U._payload,$=U._init;try{E=$(I)}catch{E=null}var te=E&&E.propTypes;te&&Us(te,a,"prop",Nn(E))}}if(e!==null){var re=e.memoizedProps;if(Nu(re,a)&&e.ref===t.ref&&t.type===e.type)if(Fs=!1,t.pendingProps=a=re,Sb(e,m))(e.flags&kp)!==Ot&&(Fs=!0);else return t.lanes=e.lanes,Ta(e,t,m)}return vb(e,t,r,a,m)}function Q0(e,t,r){var a=t.pendingProps,m=a.children,E=e!==null?e.memoizedState:null;if(a.mode==="hidden"||F)if((t.mode&In)===sn){var U={baseLanes:ut,cachePool:null,transitions:null};t.memoizedState=U,ff(t,r)}else if(cs(r,ls)){var be={baseLanes:ut,cachePool:null,transitions:null};t.memoizedState=be;var ge=E!==null?E.baseLanes:r;ff(t,ge)}else{var I=null,$;if(E!==null){var te=E.baseLanes;$=En(te,r)}else $=r;t.lanes=t.childLanes=ls;var re={baseLanes:$,cachePool:I,transitions:null};return t.memoizedState=re,t.updateQueue=null,ff(t,$),null}else{var Re;E!==null?(Re=En(E.baseLanes,r),t.memoizedState=null):Re=r,ff(t,Re)}return Wi(e,t,m,r),t.child}function gL(e,t,r){var a=t.pendingProps;return Wi(e,t,a,r),t.child}function bL(e,t,r){var a=t.pendingProps.children;return Wi(e,t,a,r),t.child}function _L(e,t,r){{t.flags|=Jn;{var a=t.stateNode;a.effectDuration=0,a.passiveEffectDuration=0}}var m=t.pendingProps,E=m.children;return Wi(e,t,E,r),t.child}function eN(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=Lo,t.flags|=Rp)}function vb(e,t,r,a,m){if(t.type!==t.elementType){var E=r.propTypes;E&&Us(E,a,"prop",Nn(r))}var U;{var I=Kl(t,r,!0);U=Xl(t,I)}var $,te;nc(t,m),nu(t);{if(nd.current=t,sr(!0),$=lc(e,t,r,a,U,m),te=cc(),t.mode&Ar){hi(!0);try{$=lc(e,t,r,a,U,m),te=cc()}finally{hi(!1)}}sr(!1)}return Ul(),e!==null&&!Fs?(h0(e,t,m),Ta(e,t,m)):(wi()&&te&&Xv(t),t.flags|=Tl,Wi(e,t,$,m),t.child)}function tN(e,t,r,a,m){{switch(OM(t)){case!1:{var E=t.stateNode,U=t.type,I=new U(t.memoizedProps,E.context),$=I.state;E.updater.enqueueSetState(E,$,null);break}case!0:{t.flags|=Zn,t.flags|=$i;var te=new Error("Simulated error coming from DevTools"),re=lu(m);t.lanes=En(t.lanes,re);var be=ub(t,Zo(te,t),re);gg(t,be);break}}if(t.type!==t.elementType){var ge=r.propTypes;ge&&Us(ge,a,"prop",Nn(r))}}var Re;ea(r)?(Re=!0,hm(t)):Re=!1,nc(t,m);var Me=t.stateNode,Ke;Me===null?(nf(e,t),$0(t,r,a),ob(t,r,a,m),Ke=!0):e===null?Ke=lL(t,r,a,m):Ke=cL(e,t,r,a,m);var St=gb(e,t,r,Ke,Re,m);{var Zt=t.stateNode;Ke&&Zt.props!==a&&(Qo||_("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",ne(t)||"a component"),Qo=!0)}return St}function gb(e,t,r,a,m,E){eN(e,t);var U=(t.flags&Zn)!==Ot;if(!a&&!U)return m&&Ox(t,r,!1),Ta(e,t,E);var I=t.stateNode;nd.current=t;var $;if(U&&typeof r.getDerivedStateFromError!="function")$=null,P0();else{nu(t);{if(sr(!0),$=I.render(),t.mode&Ar){hi(!0);try{I.render()}finally{hi(!1)}}sr(!1)}Ul()}return t.flags|=Tl,e!==null&&U?vL(e,t,$,E):Wi(e,t,$,E),t.memoizedState=I.state,m&&Ox(t,r,!0),t.child}function nN(e){var t=e.stateNode;t.pendingContext?Mx(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Mx(e,t.context,!1),bg(e,t.containerInfo)}function wL(e,t,r){if(nN(t),e===null)throw new Error("Should have a current fiber. This is a bug in React.");var a=t.pendingProps,m=t.memoizedState,E=m.element;s0(e,t),km(t,a,null,r);var U=t.memoizedState;t.stateNode;var I=U.element;if(m.isDehydrated){var $={element:I,isDehydrated:!1,cache:U.cache,pendingSuspenseBoundaries:U.pendingSuspenseBoundaries,transitions:U.transitions},te=t.updateQueue;if(te.baseState=$,t.memoizedState=$,t.flags&_a){var re=Zo(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 rN(e,t,I,r,re)}else if(I!==E){var be=Zo(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t);return rN(e,t,I,r,be)}else{N5(t);var ge=Zx(t,null,I,r);t.child=ge;for(var Re=ge;Re;)Re.flags=Re.flags&~Gr|wa,Re=Re.sibling}}else{if(Ql(),I===E)return Ta(e,t,r);Wi(e,t,I,r)}return t.child}function rN(e,t,r,a,m){return Ql(),ng(m),t.flags|=_a,Wi(e,t,r,a),t.child}function yL(e,t,r){c0(t),e===null&&tg(t);var a=t.type,m=t.pendingProps,E=e!==null?e.memoizedProps:null,U=m.children,I=Ov(a,m);return I?U=null:E!==null&&Ov(a,E)&&(t.flags|=eu),eN(e,t),Wi(e,t,U,r),t.child}function xL(e,t){return e===null&&tg(t),null}function NL(e,t,r,a){nf(e,t);var m=t.pendingProps,E=r,U=E._payload,I=E._init,$=I(U);t.type=$;var te=t.tag=xM($),re=Is($,m),be;switch(te){case u:return bb(t,$),t.type=$=gc($),be=vb(null,t,$,re,a),be;case f:return t.type=$=qb($),be=tN(null,t,$,re,a),be;case w:return t.type=$=Kb($),be=X0(null,t,$,re,a),be;case S:{if(t.type!==t.elementType){var ge=$.propTypes;ge&&Us(ge,re,"prop",Nn($))}return be=J0(null,t,$,Is($.type,re),a),be}}var Re="";throw $!==null&&typeof $=="object"&&$.$$typeof===Ct&&(Re=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+$+". "+("Lazy element type must resolve to a class or function."+Re))}function SL(e,t,r,a,m){nf(e,t),t.tag=f;var E;return ea(r)?(E=!0,hm(t)):E=!1,nc(t,m),$0(t,r,a),ob(t,r,a,m),gb(null,t,r,!0,E,m)}function CL(e,t,r,a){nf(e,t);var m=t.pendingProps,E;{var U=Kl(t,r,!1);E=Xl(t,U)}nc(t,a);var I,$;nu(t);{if(r.prototype&&typeof r.prototype.render=="function"){var te=Nn(r)||"Unknown";db[te]||(_("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.",te,te),db[te]=!0)}t.mode&Ar&&Vs.recordLegacyContextWarning(t,null),sr(!0),nd.current=t,I=lc(null,t,r,m,E,a),$=cc(),sr(!1)}if(Ul(),t.flags|=Tl,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0){var re=Nn(r)||"Unknown";rd[re]||(_("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.",re,re,re),rd[re]=!0)}if(typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0){{var be=Nn(r)||"Unknown";rd[be]||(_("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.",be,be,be),rd[be]=!0)}t.tag=f,t.memoizedState=null,t.updateQueue=null;var ge=!1;return ea(r)?(ge=!0,hm(t)):ge=!1,t.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,vg(t),z0(t,I),ob(t,r,m,a),gb(null,t,r,!0,ge,a)}else{if(t.tag=u,t.mode&Ar){hi(!0);try{I=lc(null,t,r,m,E,a),$=cc()}finally{hi(!1)}}return wi()&&$&&Xv(t),Wi(null,t,I,a),bb(t,r),t.child}}function bb(e,t){{if(t&&t.childContextTypes&&_("%s(...): childContextTypes cannot be defined on a function component.",t.displayName||t.name||"Component"),e.ref!==null){var r="",a=zn();a&&(r+=`
160
+
161
+ Check the render method of \``+a+"`.");var m=a||"",E=e._debugSource;E&&(m=E.fileName+":"+E.lineNumber),fb[m]||(fb[m]=!0,_("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",r))}if(t.defaultProps!==void 0){var U=Nn(t)||"Unknown";id[U]||(_("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",U),id[U]=!0)}if(typeof t.getDerivedStateFromProps=="function"){var I=Nn(t)||"Unknown";mb[I]||(_("%s: Function components do not support getDerivedStateFromProps.",I),mb[I]=!0)}if(typeof t.contextType=="object"&&t.contextType!==null){var $=Nn(t)||"Unknown";hb[$]||(_("%s: Function components do not support contextType.",$),hb[$]=!0)}}}var _b={dehydrated:null,treeContext:null,retryLane:mi};function wb(e){return{baseLanes:e,cachePool:pL(),transitions:null}}function EL(e,t){var r=null;return{baseLanes:En(e.baseLanes,t),cachePool:r,transitions:e.transitions}}function jL(e,t,r,a){if(t!==null){var m=t.memoizedState;if(m===null)return!1}return yg(e,Yu)}function DL(e,t){return Uh(e.childLanes,t)}function iN(e,t,r){var a=t.pendingProps;VM(t)&&(t.flags|=Zn);var m=Bs.current,E=!1,U=(t.flags&Zn)!==Ot;if(U||jL(m,e)?(E=!0,t.flags&=~Zn):(e===null||e.memoizedState!==null)&&(m=G5(m,d0)),m=ic(m),mo(t,m),e===null){tg(t);var I=t.memoizedState;if(I!==null){var $=I.dehydrated;if($!==null)return AL(t,$)}var te=a.children,re=a.fallback;if(E){var be=kL(t,te,re,r),ge=t.child;return ge.memoizedState=wb(r),t.memoizedState=_b,be}else return yb(t,te)}else{var Re=e.memoizedState;if(Re!==null){var Me=Re.dehydrated;if(Me!==null)return ML(e,t,U,a,Me,Re,r)}if(E){var Ke=a.fallback,St=a.children,Zt=TL(e,t,St,Ke,r),$t=t.child,Hn=e.child.memoizedState;return $t.memoizedState=Hn===null?wb(r):EL(Hn,r),$t.childLanes=DL(e,r),t.memoizedState=_b,Zt}else{var Un=a.children,Ee=RL(e,t,Un,r);return t.memoizedState=null,Ee}}}function yb(e,t,r){var a=e.mode,m={mode:"visible",children:t},E=xb(m,a);return E.return=e,e.child=E,E}function kL(e,t,r,a){var m=e.mode,E=e.child,U={mode:"hidden",children:t},I,$;return(m&In)===sn&&E!==null?(I=E,I.childLanes=ut,I.pendingProps=U,e.mode&ar&&(I.actualDuration=0,I.actualStartTime=-1,I.selfBaseDuration=0,I.treeBaseDuration=0),$=yo(r,m,a,null)):(I=xb(U,m),$=yo(r,m,a,null)),I.return=e,$.return=e,I.sibling=$,e.child=I,$}function xb(e,t,r){return sS(e,t,ut,null)}function sN(e,t){return il(e,t)}function RL(e,t,r,a){var m=e.child,E=m.sibling,U=sN(m,{mode:"visible",children:r});if((t.mode&In)===sn&&(U.lanes=a),U.return=t,U.sibling=null,E!==null){var I=t.deletions;I===null?(t.deletions=[E],t.flags|=To):I.push(E)}return t.child=U,U}function TL(e,t,r,a,m){var E=t.mode,U=e.child,I=U.sibling,$={mode:"hidden",children:r},te;if((E&In)===sn&&t.child!==U){var re=t.child;te=re,te.childLanes=ut,te.pendingProps=$,t.mode&ar&&(te.actualDuration=0,te.actualStartTime=-1,te.selfBaseDuration=U.selfBaseDuration,te.treeBaseDuration=U.treeBaseDuration),t.deletions=null}else te=sN(U,$),te.subtreeFlags=U.subtreeFlags&ya;var be;return I!==null?be=il(I,a):(be=yo(a,E,m,null),be.flags|=Gr),be.return=t,te.return=t,te.sibling=be,t.child=te,be}function tf(e,t,r,a){a!==null&&ng(a),ec(t,e.child,null,r);var m=t.pendingProps,E=m.children,U=yb(t,E);return U.flags|=Gr,t.memoizedState=null,U}function LL(e,t,r,a,m){var E=t.mode,U={mode:"visible",children:r},I=xb(U,E),$=yo(a,E,m,null);return $.flags|=Gr,I.return=t,$.return=t,I.sibling=$,t.child=I,(t.mode&In)!==sn&&ec(t,e.child,null,m),$}function AL(e,t,r){return(e.mode&In)===sn?(_("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=pn):Iv(t)?e.lanes=Vo:e.lanes=ls,null}function ML(e,t,r,a,m,E,U){if(r)if(t.flags&_a){t.flags&=~_a;var Ee=lb(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return tf(e,t,U,Ee)}else{if(t.memoizedState!==null)return t.child=e.child,t.flags|=Zn,null;var Xe=a.children,je=a.fallback,ht=LL(e,t,Xe,je,U),Tt=t.child;return Tt.memoizedState=wb(U),t.memoizedState=_b,ht}else{if(y5(),(t.mode&In)===sn)return tf(e,t,U,null);if(Iv(m)){var I,$,te;{var re=BT(m);I=re.digest,$=re.message,te=re.stack}var be;$?be=new Error($):be=new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var ge=lb(be,I,te);return tf(e,t,U,ge)}var Re=cs(U,e.childLanes);if(Fs||Re){var Me=mf();if(Me!==null){var Ke=$D(Me,U);if(Ke!==mi&&Ke!==E.retryLane){E.retryLane=Ke;var St=br;ns(e,Ke),ai(Me,e,Ke,St)}}zb();var Zt=lb(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 tf(e,t,U,Zt)}else if(Dx(m)){t.flags|=Zn,t.child=e.child;var $t=sM.bind(null,e);return PT(m,$t),null}else{S5(t,m,E.treeContext);var Hn=a.children,Un=yb(t,Hn);return Un.flags|=wa,Un}}}function aN(e,t,r){e.lanes=En(e.lanes,t);var a=e.alternate;a!==null&&(a.lanes=En(a.lanes,t)),hg(e.return,t,r)}function UL(e,t,r){for(var a=t;a!==null;){if(a.tag===T){var m=a.memoizedState;m!==null&&aN(a,r,e)}else if(a.tag===H)aN(a,r,e);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)return;for(;a.sibling===null;){if(a.return===null||a.return===e)return;a=a.return}a.sibling.return=a.return,a=a.sibling}}function OL(e){for(var t=e,r=null;t!==null;){var a=t.alternate;a!==null&&Am(a)===null&&(r=t),t=t.sibling}return r}function VL(e){if(e!==void 0&&e!=="forwards"&&e!=="backwards"&&e!=="together"&&!pb[e])if(pb[e]=!0,typeof e=="string")switch(e.toLowerCase()){case"together":case"forwards":case"backwards":{_('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',e,e.toLowerCase());break}case"forward":case"backward":{_('"%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:_('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e);break}else _('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}function BL(e,t){e!==void 0&&!ef[e]&&(e!=="collapsed"&&e!=="hidden"?(ef[e]=!0,_('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):t!=="forwards"&&t!=="backwards"&&(ef[e]=!0,_('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}function oN(e,t){{var r=gn(e),a=!r&&typeof $n(e)=="function";if(r||a){var m=r?"array":"iterable";return _("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>",m,t,m),!1}}return!0}function PL(e,t){if((t==="forwards"||t==="backwards")&&e!==void 0&&e!==null&&e!==!1)if(gn(e)){for(var r=0;r<e.length;r++)if(!oN(e[r],r))return}else{var a=$n(e);if(typeof a=="function"){var m=a.call(e);if(m)for(var E=m.next(),U=0;!E.done;E=m.next()){if(!oN(E.value,U))return;U++}}else _('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 Nb(e,t,r,a,m){var E=e.memoizedState;E===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:r,tailMode:m}:(E.isBackwards=t,E.rendering=null,E.renderingStartTime=0,E.last=a,E.tail=r,E.tailMode=m)}function lN(e,t,r){var a=t.pendingProps,m=a.revealOrder,E=a.tail,U=a.children;VL(m),BL(E,m),PL(U,m),Wi(e,t,U,r);var I=Bs.current,$=yg(I,Yu);if($)I=xg(I,Yu),t.flags|=Zn;else{var te=e!==null&&(e.flags&Zn)!==Ot;te&&UL(t,t.child,r),I=ic(I)}if(mo(t,I),(t.mode&In)===sn)t.memoizedState=null;else switch(m){case"forwards":{var re=OL(t.child),be;re===null?(be=t.child,t.child=null):(be=re.sibling,re.sibling=null),Nb(t,!1,be,re,E);break}case"backwards":{var ge=null,Re=t.child;for(t.child=null;Re!==null;){var Me=Re.alternate;if(Me!==null&&Am(Me)===null){t.child=Re;break}var Ke=Re.sibling;Re.sibling=ge,ge=Re,Re=Ke}Nb(t,!0,ge,null,E);break}case"together":{Nb(t,!1,null,null,void 0);break}default:t.memoizedState=null}return t.child}function IL(e,t,r){bg(t,t.stateNode.containerInfo);var a=t.pendingProps;return e===null?t.child=ec(t,null,a,r):Wi(e,t,a,r),t.child}var cN=!1;function FL(e,t,r){var a=t.type,m=a._context,E=t.pendingProps,U=t.memoizedProps,I=E.value;{"value"in E||cN||(cN=!0,_("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var $=t.type.propTypes;$&&Us($,E,"prop","Context.Provider")}if(t0(t,m,I),U!==null){var te=U.value;if(hs(te,I)){if(U.children===E.children&&!um())return Ta(e,t,r)}else V5(t,m,r)}var re=E.children;return Wi(e,t,re,r),t.child}var uN=!1;function HL(e,t,r){var a=t.type;a._context===void 0?a!==a.Consumer&&(uN||(uN=!0,_("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):a=a._context;var m=t.pendingProps,E=m.children;typeof E!="function"&&_("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."),nc(t,r);var U=Yr(a);nu(t);var I;return nd.current=t,sr(!0),I=E(U),sr(!1),Ul(),t.flags|=Tl,Wi(e,t,I,r),t.child}function sd(){Fs=!0}function nf(e,t){(t.mode&In)===sn&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=Gr)}function Ta(e,t,r){return e!==null&&(t.dependencies=e.dependencies),P0(),gd(t.lanes),cs(r,t.childLanes)?(U5(e,t),t.child):null}function zL(e,t,r){{var a=t.return;if(a===null)throw new Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,r.index=t.index,r.sibling=t.sibling,r.return=t.return,r.ref=t.ref,t===a.child)a.child=r;else{var m=a.child;if(m===null)throw new Error("Expected parent to have a child.");for(;m.sibling!==t;)if(m=m.sibling,m===null)throw new Error("Expected to find the previous sibling.");m.sibling=r}var E=a.deletions;return E===null?(a.deletions=[e],a.flags|=To):E.push(e),r.flags|=Gr,r}}function Sb(e,t){var r=e.lanes;return!!cs(r,t)}function $L(e,t,r){switch(t.tag){case d:nN(t),t.stateNode,Ql();break;case N:c0(t);break;case f:{var a=t.type;ea(a)&&hm(t);break}case y:bg(t,t.stateNode.containerInfo);break;case v:{var m=t.memoizedProps.value,E=t.type._context;t0(t,E,m);break}case C:{var U=cs(r,t.childLanes);U&&(t.flags|=Jn);{var I=t.stateNode;I.effectDuration=0,I.passiveEffectDuration=0}}break;case T:{var $=t.memoizedState;if($!==null){if($.dehydrated!==null)return mo(t,ic(Bs.current)),t.flags|=Zn,null;var te=t.child,re=te.childLanes;if(cs(r,re))return iN(e,t,r);mo(t,ic(Bs.current));var be=Ta(e,t,r);return be!==null?be.sibling:null}else mo(t,ic(Bs.current));break}case H:{var ge=(e.flags&Zn)!==Ot,Re=cs(r,t.childLanes);if(ge){if(Re)return lN(e,t,r);t.flags|=Zn}var Me=t.memoizedState;if(Me!==null&&(Me.rendering=null,Me.tail=null,Me.lastEffect=null),mo(t,Bs.current),Re)break;return null}case P:case Y:return t.lanes=ut,Q0(e,t,r)}return Ta(e,t,r)}function dN(e,t,r){if(t._debugNeedsRemount&&e!==null)return zL(e,t,e_(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(e!==null){var a=e.memoizedProps,m=t.pendingProps;if(a!==m||um()||t.type!==e.type)Fs=!0;else{var E=Sb(e,r);if(!E&&(t.flags&Zn)===Ot)return Fs=!1,$L(e,t,r);(e.flags&kp)!==Ot?Fs=!0:Fs=!1}}else if(Fs=!1,wi()&&p5(t)){var U=t.index,I=v5();Px(t,I,U)}switch(t.lanes=ut,t.tag){case g:return CL(e,t,t.type,r);case j:{var $=t.elementType;return NL(e,t,$,r)}case u:{var te=t.type,re=t.pendingProps,be=t.elementType===te?re:Is(te,re);return vb(e,t,te,be,r)}case f:{var ge=t.type,Re=t.pendingProps,Me=t.elementType===ge?Re:Is(ge,Re);return tN(e,t,ge,Me,r)}case d:return wL(e,t,r);case N:return yL(e,t,r);case k:return xL(e,t);case T:return iN(e,t,r);case y:return IL(e,t,r);case w:{var Ke=t.type,St=t.pendingProps,Zt=t.elementType===Ke?St:Is(Ke,St);return X0(e,t,Ke,Zt,r)}case b:return gL(e,t,r);case c:return bL(e,t,r);case C:return _L(e,t,r);case v:return FL(e,t,r);case p:return HL(e,t,r);case S:{var $t=t.type,Hn=t.pendingProps,Un=Is($t,Hn);if(t.type!==t.elementType){var Ee=$t.propTypes;Ee&&Us(Ee,Un,"prop",Nn($t))}return Un=Is($t.type,Un),J0(e,t,$t,Un,r)}case R:return Z0(e,t,t.type,t.pendingProps,r);case A:{var Xe=t.type,je=t.pendingProps,ht=t.elementType===Xe?je:Is(Xe,je);return SL(e,t,Xe,ht,r)}case H:return lN(e,t,r);case V:break;case P:return Q0(e,t,r)}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function uc(e){e.flags|=Jn}function hN(e){e.flags|=Lo,e.flags|=Rp}var mN,Cb,fN,pN;mN=function(e,t,r,a){for(var m=t.child;m!==null;){if(m.tag===N||m.tag===k)hT(e,m.stateNode);else if(m.tag!==y){if(m.child!==null){m.child.return=m,m=m.child;continue}}if(m===t)return;for(;m.sibling===null;){if(m.return===null||m.return===t)return;m=m.return}m.sibling.return=m.return,m=m.sibling}},Cb=function(e,t){},fN=function(e,t,r,a,m){var E=e.memoizedProps;if(E!==a){var U=t.stateNode,I=_g(),$=fT(U,r,E,a,m,I);t.updateQueue=$,$&&uc(t)}},pN=function(e,t,r,a){r!==a&&uc(t)};function ad(e,t){if(!wi())switch(e.tailMode){case"hidden":{for(var r=e.tail,a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?e.tail=null:a.sibling=null;break}case"collapsed":{for(var m=e.tail,E=null;m!==null;)m.alternate!==null&&(E=m),m=m.sibling;E===null?!t&&e.tail!==null?e.tail.sibling=null:e.tail=null:E.sibling=null;break}}}function xi(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=ut,a=Ot;if(t){if((e.mode&ar)!==sn){for(var $=e.selfBaseDuration,te=e.child;te!==null;)r=En(r,En(te.lanes,te.childLanes)),a|=te.subtreeFlags&ya,a|=te.flags&ya,$+=te.treeBaseDuration,te=te.sibling;e.treeBaseDuration=$}else for(var re=e.child;re!==null;)r=En(r,En(re.lanes,re.childLanes)),a|=re.subtreeFlags&ya,a|=re.flags&ya,re.return=e,re=re.sibling;e.subtreeFlags|=a}else{if((e.mode&ar)!==sn){for(var m=e.actualDuration,E=e.selfBaseDuration,U=e.child;U!==null;)r=En(r,En(U.lanes,U.childLanes)),a|=U.subtreeFlags,a|=U.flags,m+=U.actualDuration,E+=U.treeBaseDuration,U=U.sibling;e.actualDuration=m,e.treeBaseDuration=E}else for(var I=e.child;I!==null;)r=En(r,En(I.lanes,I.childLanes)),a|=I.subtreeFlags,a|=I.flags,I.return=e,I=I.sibling;e.subtreeFlags|=a}return e.childLanes=r,t}function WL(e,t,r){if(k5()&&(t.mode&In)!==sn&&(t.flags&Zn)===Ot)return Gx(t),Ql(),t.flags|=_a|Dh|$i,!1;var a=gm(t);if(r!==null&&r.dehydrated!==null)if(e===null){if(!a)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(j5(t),xi(t),(t.mode&ar)!==sn){var m=r!==null;if(m){var E=t.child;E!==null&&(t.treeBaseDuration-=E.treeBaseDuration)}}return!1}else{if(Ql(),(t.flags&Zn)===Ot&&(t.memoizedState=null),t.flags|=Jn,xi(t),(t.mode&ar)!==sn){var U=r!==null;if(U){var I=t.child;I!==null&&(t.treeBaseDuration-=I.treeBaseDuration)}}return!1}else return Yx(),!0}function vN(e,t,r){var a=t.pendingProps;switch(Jv(t),t.tag){case g:case j:case R:case u:case w:case b:case c:case C:case p:case S:return xi(t),null;case f:{var m=t.type;return ea(m)&&dm(t),xi(t),null}case d:{var E=t.stateNode;if(rc(t),Yv(t),Sg(),E.pendingContext&&(E.context=E.pendingContext,E.pendingContext=null),e===null||e.child===null){var U=gm(t);if(U)uc(t);else if(e!==null){var I=e.memoizedState;(!I.isDehydrated||(t.flags&_a)!==Ot)&&(t.flags|=Ll,Yx())}}return Cb(e,t),xi(t),null}case N:{wg(t);var $=l0(),te=t.type;if(e!==null&&t.stateNode!=null)fN(e,t,te,a,$),e.ref!==t.ref&&hN(t);else{if(!a){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 xi(t),null}var re=_g(),be=gm(t);if(be)C5(t,$,re)&&uc(t);else{var ge=dT(te,a,$,re,t);mN(ge,t,!1,!1),t.stateNode=ge,mT(ge,te,a,$)&&uc(t)}t.ref!==null&&hN(t)}return xi(t),null}case k:{var Re=a;if(e&&t.stateNode!=null){var Me=e.memoizedProps;pN(e,t,Me,Re)}else{if(typeof Re!="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 Ke=l0(),St=_g(),Zt=gm(t);Zt?E5(t)&&uc(t):t.stateNode=pT(Re,Ke,St,t)}return xi(t),null}case T:{sc(t);var $t=t.memoizedState;if(e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){var Hn=WL(e,t,$t);if(!Hn)return t.flags&$i?t:null}if((t.flags&Zn)!==Ot)return t.lanes=r,(t.mode&ar)!==sn&&Kg(t),t;var Un=$t!==null,Ee=e!==null&&e.memoizedState!==null;if(Un!==Ee&&Un){var Xe=t.child;if(Xe.flags|=Ao,(t.mode&In)!==sn){var je=e===null&&(t.memoizedProps.unstable_avoidThisFallback!==!0||!0);je||yg(Bs.current,d0)?GA():zb()}}var ht=t.updateQueue;if(ht!==null&&(t.flags|=Jn),xi(t),(t.mode&ar)!==sn&&Un){var Tt=t.child;Tt!==null&&(t.treeBaseDuration-=Tt.treeBaseDuration)}return null}case y:return rc(t),Cb(e,t),e===null&&l5(t.stateNode.containerInfo),xi(t),null;case v:var Et=t.type._context;return dg(Et,t),xi(t),null;case A:{var cn=t.type;return ea(cn)&&dm(t),xi(t),null}case H:{sc(t);var bn=t.memoizedState;if(bn===null)return xi(t),null;var lr=(t.flags&Zn)!==Ot,qn=bn.rendering;if(qn===null)if(lr)ad(bn,!1);else{var Pr=qA()&&(e===null||(e.flags&Zn)===Ot);if(!Pr)for(var Kn=t.child;Kn!==null;){var Mr=Am(Kn);if(Mr!==null){lr=!0,t.flags|=Zn,ad(bn,!1);var Pi=Mr.updateQueue;return Pi!==null&&(t.updateQueue=Pi,t.flags|=Jn),t.subtreeFlags=Ot,O5(t,r),mo(t,xg(Bs.current,Yu)),t.child}Kn=Kn.sibling}bn.tail!==null&&di()>VN()&&(t.flags|=Zn,lr=!0,ad(bn,!1),t.lanes=py)}else{if(!lr){var ji=Am(qn);if(ji!==null){t.flags|=Zn,lr=!0;var ps=ji.updateQueue;if(ps!==null&&(t.updateQueue=ps,t.flags|=Jn),ad(bn,!0),bn.tail===null&&bn.tailMode==="hidden"&&!qn.alternate&&!wi())return xi(t),null}else di()*2-bn.renderingStartTime>VN()&&r!==ls&&(t.flags|=Zn,lr=!0,ad(bn,!1),t.lanes=py)}if(bn.isBackwards)qn.sibling=t.child,t.child=qn;else{var qi=bn.last;qi!==null?qi.sibling=qn:t.child=qn,bn.last=qn}}if(bn.tail!==null){var Ki=bn.tail;bn.rendering=Ki,bn.tail=Ki.sibling,bn.renderingStartTime=di(),Ki.sibling=null;var Ii=Bs.current;return lr?Ii=xg(Ii,Yu):Ii=ic(Ii),mo(t,Ii),Ki}return xi(t),null}case V:break;case P:case Y:{Hb(t);var Oa=t.memoizedState,bc=Oa!==null;if(e!==null){var xd=e.memoizedState,la=xd!==null;la!==bc&&!F&&(t.flags|=Ao)}return!bc||(t.mode&In)===sn?xi(t):cs(oa,ls)&&(xi(t),t.subtreeFlags&(Gr|Jn)&&(t.flags|=Ao)),null}case Q:return null;case z:return null}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function GL(e,t,r){switch(Jv(t),t.tag){case f:{var a=t.type;ea(a)&&dm(t);var m=t.flags;return m&$i?(t.flags=m&~$i|Zn,(t.mode&ar)!==sn&&Kg(t),t):null}case d:{t.stateNode,rc(t),Yv(t),Sg();var E=t.flags;return(E&$i)!==Ot&&(E&Zn)===Ot?(t.flags=E&~$i|Zn,t):null}case N:return wg(t),null;case T:{sc(t);var U=t.memoizedState;if(U!==null&&U.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.");Ql()}var I=t.flags;return I&$i?(t.flags=I&~$i|Zn,(t.mode&ar)!==sn&&Kg(t),t):null}case H:return sc(t),null;case y:return rc(t),null;case v:var $=t.type._context;return dg($,t),null;case P:case Y:return Hb(t),null;case Q:return null;default:return null}}function gN(e,t,r){switch(Jv(t),t.tag){case f:{var a=t.type.childContextTypes;a!=null&&dm(t);break}case d:{t.stateNode,rc(t),Yv(t),Sg();break}case N:{wg(t);break}case y:rc(t);break;case T:sc(t);break;case H:sc(t);break;case v:var m=t.type._context;dg(m,t);break;case P:case Y:Hb(t);break}}var bN=null;bN=new Set;var rf=!1,Ni=!1,YL=typeof WeakSet=="function"?WeakSet:Set,Vt=null,dc=null,hc=null;function qL(e){Pe(null,function(){throw e}),jr()}var KL=function(e,t){if(t.props=e.memoizedProps,t.state=e.memoizedState,e.mode&ar)try{sa(),t.componentWillUnmount()}finally{ia(e)}else t.componentWillUnmount()};function _N(e,t){try{vo(ei,e)}catch(r){mr(e,t,r)}}function Eb(e,t,r){try{KL(e,r)}catch(a){mr(e,t,a)}}function XL(e,t,r){try{r.componentDidMount()}catch(a){mr(e,t,a)}}function wN(e,t){try{xN(e)}catch(r){mr(e,t,r)}}function mc(e,t){var r=e.ref;if(r!==null)if(typeof r=="function"){var a;try{if(me&&Ue&&e.mode&ar)try{sa(),a=r(null)}finally{ia(e)}else a=r(null)}catch(m){mr(e,t,m)}typeof a=="function"&&_("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",ne(e))}else r.current=null}function sf(e,t,r){try{r()}catch(a){mr(e,t,a)}}var yN=!1;function JL(e,t){cT(e.containerInfo),Vt=t,ZL();var r=yN;return yN=!1,r}function ZL(){for(;Vt!==null;){var e=Vt,t=e.child;(e.subtreeFlags&Ap)!==Ot&&t!==null?(t.return=e,Vt=t):QL()}}function QL(){for(;Vt!==null;){var e=Vt;un(e);try{eA(e)}catch(r){mr(e,e.return,r)}ir();var t=e.sibling;if(t!==null){t.return=e.return,Vt=t;return}Vt=e.return}}function eA(e){var t=e.alternate,r=e.flags;if((r&Ll)!==Ot){switch(un(e),e.tag){case u:case w:case R:break;case f:{if(t!==null){var a=t.memoizedProps,m=t.memoizedState,E=e.stateNode;e.type===e.elementType&&!Qo&&(E.props!==e.memoizedProps&&_("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.",ne(e)||"instance"),E.state!==e.memoizedState&&_("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.",ne(e)||"instance"));var U=E.getSnapshotBeforeUpdate(e.elementType===e.type?a:Is(e.type,a),m);{var I=bN;U===void 0&&!I.has(e.type)&&(I.add(e.type),_("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",ne(e)))}E.__reactInternalSnapshotBeforeUpdate=U}break}case d:{{var $=e.stateNode;MT($.containerInfo)}break}case N:case k:case y:case A: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.")}ir()}}function Hs(e,t,r){var a=t.updateQueue,m=a!==null?a.lastEffect:null;if(m!==null){var E=m.next,U=E;do{if((U.tag&e)===e){var I=U.destroy;U.destroy=void 0,I!==void 0&&((e&yi)!==rs?pD(t):(e&ei)!==rs&&uy(t),(e&ta)!==rs&&_d(!0),sf(t,r,I),(e&ta)!==rs&&_d(!1),(e&yi)!==rs?vD():(e&ei)!==rs&&dy())}U=U.next}while(U!==E)}}function vo(e,t){var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var m=a.next,E=m;do{if((E.tag&e)===e){(e&yi)!==rs?mD(t):(e&ei)!==rs&&gD(t);var U=E.create;(e&ta)!==rs&&_d(!0),E.destroy=U(),(e&ta)!==rs&&_d(!1),(e&yi)!==rs?fD():(e&ei)!==rs&&bD();{var I=E.destroy;if(I!==void 0&&typeof I!="function"){var $=void 0;(E.tag&ei)!==Ot?$="useLayoutEffect":(E.tag&ta)!==Ot?$="useInsertionEffect":$="useEffect";var te=void 0;I===null?te=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof I.then=="function"?te=`
162
+
163
+ It looks like you wrote `+$+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
164
+
165
+ `+$+`(() => {
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`:te=" You returned: "+I,_("%s must not return anything besides a function, which is used for clean-up.%s",$,te)}}}E=E.next}while(E!==m)}}function tA(e,t){if((t.flags&Jn)!==Ot)switch(t.tag){case C:{var r=t.stateNode.passiveEffectDuration,a=t.memoizedProps,m=a.id,E=a.onPostCommit,U=V0(),I=t.alternate===null?"mount":"update";O0()&&(I="nested-update"),typeof E=="function"&&E(m,I,r,U);var $=t.return;e:for(;$!==null;){switch($.tag){case d:var te=$.stateNode;te.passiveEffectDuration+=r;break e;case C:var re=$.stateNode;re.passiveEffectDuration+=r;break e}$=$.return}break}}}function nA(e,t,r,a){if((r.flags&tu)!==Ot)switch(r.tag){case u:case w:case R:{if(!Ni)if(r.mode&ar)try{sa(),vo(ei|Qr,r)}finally{ia(r)}else vo(ei|Qr,r);break}case f:{var m=r.stateNode;if(r.flags&Jn&&!Ni)if(t===null)if(r.type===r.elementType&&!Qo&&(m.props!==r.memoizedProps&&_("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.",ne(r)||"instance"),m.state!==r.memoizedState&&_("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.",ne(r)||"instance")),r.mode&ar)try{sa(),m.componentDidMount()}finally{ia(r)}else m.componentDidMount();else{var E=r.elementType===r.type?t.memoizedProps:Is(r.type,t.memoizedProps),U=t.memoizedState;if(r.type===r.elementType&&!Qo&&(m.props!==r.memoizedProps&&_("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.",ne(r)||"instance"),m.state!==r.memoizedState&&_("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.",ne(r)||"instance")),r.mode&ar)try{sa(),m.componentDidUpdate(E,U,m.__reactInternalSnapshotBeforeUpdate)}finally{ia(r)}else m.componentDidUpdate(E,U,m.__reactInternalSnapshotBeforeUpdate)}var I=r.updateQueue;I!==null&&(r.type===r.elementType&&!Qo&&(m.props!==r.memoizedProps&&_("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.",ne(r)||"instance"),m.state!==r.memoizedState&&_("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.",ne(r)||"instance")),o0(r,I,m));break}case d:{var $=r.updateQueue;if($!==null){var te=null;if(r.child!==null)switch(r.child.tag){case N:te=r.child.stateNode;break;case f:te=r.child.stateNode;break}o0(r,$,te)}break}case N:{var re=r.stateNode;if(t===null&&r.flags&Jn){var be=r.type,ge=r.memoizedProps;wT(re,be,ge)}break}case k:break;case y:break;case C:{{var Re=r.memoizedProps,Me=Re.onCommit,Ke=Re.onRender,St=r.stateNode.effectDuration,Zt=V0(),$t=t===null?"mount":"update";O0()&&($t="nested-update"),typeof Ke=="function"&&Ke(r.memoizedProps.id,$t,r.actualDuration,r.treeBaseDuration,r.actualStartTime,Zt);{typeof Me=="function"&&Me(r.memoizedProps.id,$t,St,Zt),QA(r);var Hn=r.return;e:for(;Hn!==null;){switch(Hn.tag){case d:var Un=Hn.stateNode;Un.effectDuration+=St;break e;case C:var Ee=Hn.stateNode;Ee.effectDuration+=St;break e}Hn=Hn.return}}}break}case T:{uA(e,r);break}case H:case A:case V:case P:case Y:case z:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}Ni||r.flags&Lo&&xN(r)}function rA(e){switch(e.tag){case u:case w:case R:{if(e.mode&ar)try{sa(),_N(e,e.return)}finally{ia(e)}else _N(e,e.return);break}case f:{var t=e.stateNode;typeof t.componentDidMount=="function"&&XL(e,e.return,t),wN(e,e.return);break}case N:{wN(e,e.return);break}}}function iA(e,t){for(var r=null,a=e;;){if(a.tag===N){if(r===null){r=a;try{var m=a.stateNode;t?RT(m):LT(a.stateNode,a.memoizedProps)}catch(U){mr(e,e.return,U)}}}else if(a.tag===k){if(r===null)try{var E=a.stateNode;t?TT(E):AT(E,a.memoizedProps)}catch(U){mr(e,e.return,U)}}else if(!((a.tag===P||a.tag===Y)&&a.memoizedState!==null&&a!==e)){if(a.child!==null){a.child.return=a,a=a.child;continue}}if(a===e)return;for(;a.sibling===null;){if(a.return===null||a.return===e)return;r===a&&(r=null),a=a.return}r===a&&(r=null),a.sibling.return=a.return,a=a.sibling}}function xN(e){var t=e.ref;if(t!==null){var r=e.stateNode,a;switch(e.tag){case N:a=r;break;default:a=r}if(typeof t=="function"){var m;if(e.mode&ar)try{sa(),m=t(a)}finally{ia(e)}else m=t(a);typeof m=="function"&&_("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",ne(e))}else t.hasOwnProperty("current")||_("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",ne(e)),t.current=a}}function sA(e){var t=e.alternate;t!==null&&(t.return=null),e.return=null}function NN(e){var t=e.alternate;t!==null&&(e.alternate=null,NN(t));{if(e.child=null,e.deletions=null,e.sibling=null,e.tag===N){var r=e.stateNode;r!==null&&d5(r)}e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}}function aA(e){for(var t=e.return;t!==null;){if(SN(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 SN(e){return e.tag===N||e.tag===d||e.tag===y}function CN(e){var t=e;e:for(;;){for(;t.sibling===null;){if(t.return===null||SN(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==N&&t.tag!==k&&t.tag!==O;){if(t.flags&Gr||t.child===null||t.tag===y)continue e;t.child.return=t,t=t.child}if(!(t.flags&Gr))return t.stateNode}}function oA(e){var t=aA(e);switch(t.tag){case N:{var r=t.stateNode;t.flags&eu&&(jx(r),t.flags&=~eu);var a=CN(e);Db(e,a,r);break}case d:case y:{var m=t.stateNode.containerInfo,E=CN(e);jb(e,E,m);break}default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function jb(e,t,r){var a=e.tag,m=a===N||a===k;if(m){var E=e.stateNode;t?ET(r,E,t):ST(r,E)}else if(a!==y){var U=e.child;if(U!==null){jb(U,t,r);for(var I=U.sibling;I!==null;)jb(I,t,r),I=I.sibling}}}function Db(e,t,r){var a=e.tag,m=a===N||a===k;if(m){var E=e.stateNode;t?CT(r,E,t):NT(r,E)}else if(a!==y){var U=e.child;if(U!==null){Db(U,t,r);for(var I=U.sibling;I!==null;)Db(I,t,r),I=I.sibling}}}var Si=null,zs=!1;function lA(e,t,r){{var a=t;e:for(;a!==null;){switch(a.tag){case N:{Si=a.stateNode,zs=!1;break e}case d:{Si=a.stateNode.containerInfo,zs=!0;break e}case y:{Si=a.stateNode.containerInfo,zs=!0;break e}}a=a.return}if(Si===null)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");EN(e,t,r),Si=null,zs=!1}sA(r)}function go(e,t,r){for(var a=r.child;a!==null;)EN(e,t,a),a=a.sibling}function EN(e,t,r){switch(cD(r),r.tag){case N:Ni||mc(r,t);case k:{{var a=Si,m=zs;Si=null,go(e,t,r),Si=a,zs=m,Si!==null&&(zs?DT(Si,r.stateNode):jT(Si,r.stateNode))}return}case O:{Si!==null&&(zs?kT(Si,r.stateNode):Pv(Si,r.stateNode));return}case y:{{var E=Si,U=zs;Si=r.stateNode.containerInfo,zs=!0,go(e,t,r),Si=E,zs=U}return}case u:case w:case S:case R:{if(!Ni){var I=r.updateQueue;if(I!==null){var $=I.lastEffect;if($!==null){var te=$.next,re=te;do{var be=re,ge=be.destroy,Re=be.tag;ge!==void 0&&((Re&ta)!==rs?sf(r,t,ge):(Re&ei)!==rs&&(uy(r),r.mode&ar?(sa(),sf(r,t,ge),ia(r)):sf(r,t,ge),dy())),re=re.next}while(re!==te)}}}go(e,t,r);return}case f:{if(!Ni){mc(r,t);var Me=r.stateNode;typeof Me.componentWillUnmount=="function"&&Eb(r,t,Me)}go(e,t,r);return}case V:{go(e,t,r);return}case P:{if(r.mode&In){var Ke=Ni;Ni=Ke||r.memoizedState!==null,go(e,t,r),Ni=Ke}else go(e,t,r);break}default:{go(e,t,r);return}}}function cA(e){e.memoizedState}function uA(e,t){var r=t.memoizedState;if(r===null){var a=t.alternate;if(a!==null){var m=a.memoizedState;if(m!==null){var E=m.dehydrated;E!==null&&qT(E)}}}}function jN(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new YL),t.forEach(function(a){var m=aM.bind(null,e,a);if(!r.has(a)){if(r.add(a),As)if(dc!==null&&hc!==null)bd(hc,dc);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");a.then(m,m)}})}}function dA(e,t,r){dc=r,hc=e,un(t),DN(t,e),un(t),dc=null,hc=null}function $s(e,t,r){var a=t.deletions;if(a!==null)for(var m=0;m<a.length;m++){var E=a[m];try{lA(e,t,E)}catch($){mr(E,t,$)}}var U=gr();if(t.subtreeFlags&Mp)for(var I=t.child;I!==null;)un(I),DN(I,e),I=I.sibling;un(U)}function DN(e,t,r){var a=e.alternate,m=e.flags;switch(e.tag){case u:case w:case S:case R:{if($s(t,e),aa(e),m&Jn){try{Hs(ta|Qr,e,e.return),vo(ta|Qr,e)}catch(cn){mr(e,e.return,cn)}if(e.mode&ar){try{sa(),Hs(ei|Qr,e,e.return)}catch(cn){mr(e,e.return,cn)}ia(e)}else try{Hs(ei|Qr,e,e.return)}catch(cn){mr(e,e.return,cn)}}return}case f:{$s(t,e),aa(e),m&Lo&&a!==null&&mc(a,a.return);return}case N:{$s(t,e),aa(e),m&Lo&&a!==null&&mc(a,a.return);{if(e.flags&eu){var E=e.stateNode;try{jx(E)}catch(cn){mr(e,e.return,cn)}}if(m&Jn){var U=e.stateNode;if(U!=null){var I=e.memoizedProps,$=a!==null?a.memoizedProps:I,te=e.type,re=e.updateQueue;if(e.updateQueue=null,re!==null)try{yT(U,re,te,$,I,e)}catch(cn){mr(e,e.return,cn)}}}}return}case k:{if($s(t,e),aa(e),m&Jn){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 be=e.stateNode,ge=e.memoizedProps,Re=a!==null?a.memoizedProps:ge;try{xT(be,Re,ge)}catch(cn){mr(e,e.return,cn)}}return}case d:{if($s(t,e),aa(e),m&Jn&&a!==null){var Me=a.memoizedState;if(Me.isDehydrated)try{YT(t.containerInfo)}catch(cn){mr(e,e.return,cn)}}return}case y:{$s(t,e),aa(e);return}case T:{$s(t,e),aa(e);var Ke=e.child;if(Ke.flags&Ao){var St=Ke.stateNode,Zt=Ke.memoizedState,$t=Zt!==null;if(St.isHidden=$t,$t){var Hn=Ke.alternate!==null&&Ke.alternate.memoizedState!==null;Hn||WA()}}if(m&Jn){try{cA(e)}catch(cn){mr(e,e.return,cn)}jN(e)}return}case P:{var Un=a!==null&&a.memoizedState!==null;if(e.mode&In){var Ee=Ni;Ni=Ee||Un,$s(t,e),Ni=Ee}else $s(t,e);if(aa(e),m&Ao){var Xe=e.stateNode,je=e.memoizedState,ht=je!==null,Tt=e;if(Xe.isHidden=ht,ht&&!Un&&(Tt.mode&In)!==sn){Vt=Tt;for(var Et=Tt.child;Et!==null;)Vt=Et,mA(Et),Et=Et.sibling}iA(Tt,ht)}return}case H:{$s(t,e),aa(e),m&Jn&&jN(e);return}case V:return;default:{$s(t,e),aa(e);return}}}function aa(e){var t=e.flags;if(t&Gr){try{oA(e)}catch(r){mr(e,e.return,r)}e.flags&=~Gr}t&wa&&(e.flags&=~wa)}function hA(e,t,r){dc=r,hc=t,Vt=e,kN(e,t,r),dc=null,hc=null}function kN(e,t,r){for(var a=(e.mode&In)!==sn;Vt!==null;){var m=Vt,E=m.child;if(m.tag===P&&a){var U=m.memoizedState!==null,I=U||rf;if(I){kb(e,t,r);continue}else{var $=m.alternate,te=$!==null&&$.memoizedState!==null,re=te||Ni,be=rf,ge=Ni;rf=I,Ni=re,Ni&&!ge&&(Vt=m,fA(m));for(var Re=E;Re!==null;)Vt=Re,kN(Re,t,r),Re=Re.sibling;Vt=m,rf=be,Ni=ge,kb(e,t,r);continue}}(m.subtreeFlags&tu)!==Ot&&E!==null?(E.return=m,Vt=E):kb(e,t,r)}}function kb(e,t,r){for(;Vt!==null;){var a=Vt;if((a.flags&tu)!==Ot){var m=a.alternate;un(a);try{nA(t,m,a,r)}catch(U){mr(a,a.return,U)}ir()}if(a===e){Vt=null;return}var E=a.sibling;if(E!==null){E.return=a.return,Vt=E;return}Vt=a.return}}function mA(e){for(;Vt!==null;){var t=Vt,r=t.child;switch(t.tag){case u:case w:case S:case R:{if(t.mode&ar)try{sa(),Hs(ei,t,t.return)}finally{ia(t)}else Hs(ei,t,t.return);break}case f:{mc(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Eb(t,t.return,a);break}case N:{mc(t,t.return);break}case P:{var m=t.memoizedState!==null;if(m){RN(e);continue}break}}r!==null?(r.return=t,Vt=r):RN(e)}}function RN(e){for(;Vt!==null;){var t=Vt;if(t===e){Vt=null;return}var r=t.sibling;if(r!==null){r.return=t.return,Vt=r;return}Vt=t.return}}function fA(e){for(;Vt!==null;){var t=Vt,r=t.child;if(t.tag===P){var a=t.memoizedState!==null;if(a){TN(e);continue}}r!==null?(r.return=t,Vt=r):TN(e)}}function TN(e){for(;Vt!==null;){var t=Vt;un(t);try{rA(t)}catch(a){mr(t,t.return,a)}if(ir(),t===e){Vt=null;return}var r=t.sibling;if(r!==null){r.return=t.return,Vt=r;return}Vt=t.return}}function pA(e,t,r,a){Vt=t,vA(t,e,r,a)}function vA(e,t,r,a){for(;Vt!==null;){var m=Vt,E=m.child;(m.subtreeFlags&Al)!==Ot&&E!==null?(E.return=m,Vt=E):gA(e,t,r,a)}}function gA(e,t,r,a){for(;Vt!==null;){var m=Vt;if((m.flags&Ja)!==Ot){un(m);try{bA(t,m,r,a)}catch(U){mr(m,m.return,U)}ir()}if(m===e){Vt=null;return}var E=m.sibling;if(E!==null){E.return=m.return,Vt=E;return}Vt=m.return}}function bA(e,t,r,a){switch(t.tag){case u:case w:case R:{if(t.mode&ar){qg();try{vo(yi|Qr,t)}finally{Yg(t)}}else vo(yi|Qr,t);break}}}function _A(e){Vt=e,wA()}function wA(){for(;Vt!==null;){var e=Vt,t=e.child;if((Vt.flags&To)!==Ot){var r=e.deletions;if(r!==null){for(var a=0;a<r.length;a++){var m=r[a];Vt=m,NA(m,e)}{var E=e.alternate;if(E!==null){var U=E.child;if(U!==null){E.child=null;do{var I=U.sibling;U.sibling=null,U=I}while(U!==null)}}}Vt=e}}(e.subtreeFlags&Al)!==Ot&&t!==null?(t.return=e,Vt=t):yA()}}function yA(){for(;Vt!==null;){var e=Vt;(e.flags&Ja)!==Ot&&(un(e),xA(e),ir());var t=e.sibling;if(t!==null){t.return=e.return,Vt=t;return}Vt=e.return}}function xA(e){switch(e.tag){case u:case w:case R:{e.mode&ar?(qg(),Hs(yi|Qr,e,e.return),Yg(e)):Hs(yi|Qr,e,e.return);break}}}function NA(e,t){for(;Vt!==null;){var r=Vt;un(r),CA(r,t),ir();var a=r.child;a!==null?(a.return=r,Vt=a):SA(e)}}function SA(e){for(;Vt!==null;){var t=Vt,r=t.sibling,a=t.return;if(NN(t),t===e){Vt=null;return}if(r!==null){r.return=a,Vt=r;return}Vt=a}}function CA(e,t){switch(e.tag){case u:case w:case R:{e.mode&ar?(qg(),Hs(yi,e,t),Yg(e)):Hs(yi,e,t);break}}}function EA(e){switch(e.tag){case u:case w:case R:{try{vo(ei|Qr,e)}catch(r){mr(e,e.return,r)}break}case f:{var t=e.stateNode;try{t.componentDidMount()}catch(r){mr(e,e.return,r)}break}}}function jA(e){switch(e.tag){case u:case w:case R:{try{vo(yi|Qr,e)}catch(t){mr(e,e.return,t)}break}}}function DA(e){switch(e.tag){case u:case w:case R:{try{Hs(ei|Qr,e,e.return)}catch(r){mr(e,e.return,r)}break}case f:{var t=e.stateNode;typeof t.componentWillUnmount=="function"&&Eb(e,e.return,t);break}}}function kA(e){switch(e.tag){case u:case w:case R:try{Hs(yi|Qr,e,e.return)}catch(t){mr(e,e.return,t)}}}if(typeof Symbol=="function"&&Symbol.for){var od=Symbol.for;od("selector.component"),od("selector.has_pseudo_class"),od("selector.role"),od("selector.test_id"),od("selector.text")}var RA=[];function TA(){RA.forEach(function(e){return e()})}var LA=l.ReactCurrentActQueue;function AA(e){{var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,r=typeof jest<"u";return r&&t!==!1}}function LN(){{var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return!e&&LA.current!==null&&_("The current testing environment is not configured to support act(...)"),e}}var MA=Math.ceil,Rb=l.ReactCurrentDispatcher,Tb=l.ReactCurrentOwner,Ci=l.ReactCurrentBatchConfig,Ws=l.ReactCurrentActQueue,ri=0,AN=1,Ei=2,js=4,La=0,ld=1,el=2,af=3,cd=4,MN=5,Lb=6,Fn=ri,Gi=null,Dr=null,ii=ut,oa=ut,Ab=ao(ut),si=La,ud=null,of=ut,dd=ut,lf=ut,hd=null,is=null,Mb=0,UN=500,ON=1/0,UA=500,Aa=null;function md(){ON=di()+UA}function VN(){return ON}var cf=!1,Ub=null,fc=null,tl=!1,bo=null,fd=ut,Ob=[],Vb=null,OA=50,pd=0,Bb=null,Pb=!1,uf=!1,VA=50,pc=0,df=null,vd=br,hf=ut,BN=!1;function mf(){return Gi}function Yi(){return(Fn&(Ei|js))!==ri?di():(vd!==br||(vd=di()),vd)}function _o(e){var t=e.mode;if((t&In)===sn)return pn;if((Fn&Ei)!==ri&&ii!==ut)return lu(ii);var r=L5()!==T5;if(r){if(Ci.transition!==null){var a=Ci.transition;a._updatedFibers||(a._updatedFibers=new Set),a._updatedFibers.add(e)}return hf===mi&&(hf=_y()),hf}var m=Ms();if(m!==mi)return m;var E=vT();return E}function BA(e){var t=e.mode;return(t&In)===sn?pn:ID()}function ai(e,t,r,a){lM(),BN&&_("useInsertionEffect must not schedule updates."),Pb&&(uf=!0),cu(e,r,a),(Fn&Ei)!==ut&&e===Gi?dM(t):(As&&xy(e,t,r),hM(t),e===Gi&&((Fn&Ei)===ri&&(dd=En(dd,r)),si===cd&&wo(e,ii)),ss(e,a),r===pn&&Fn===ri&&(t.mode&In)===sn&&!Ws.isBatchingLegacy&&(md(),Bx()))}function PA(e,t,r){var a=e.current;a.lanes=t,cu(e,t,r),ss(e,r)}function IA(e){return(Fn&Ei)!==ri}function ss(e,t){var r=e.callbackNode;MD(e,t);var a=Ah(e,e===Gi?ii:ut);if(a===ut){r!==null&&eS(r),e.callbackNode=null,e.callbackPriority=mi;return}var m=Po(a),E=e.callbackPriority;if(E===m&&!(Ws.current!==null&&r!==Gb)){r==null&&E!==pn&&_("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}r!=null&&eS(r);var U;if(m===pn)e.tag===oo?(Ws.isBatchingLegacy!==null&&(Ws.didScheduleLegacyUpdate=!0),f5(FN.bind(null,e))):Vx(FN.bind(null,e)),Ws.current!==null?Ws.current.push(lo):bT(function(){(Fn&(Ei|js))===ri&&lo()}),U=null;else{var I;switch(Cy(a)){case us:I=kh;break;case Na:I=Up;break;case Sa:I=Oo;break;case Oh:I=Op;break;default:I=Oo;break}U=Yb(I,PN.bind(null,e))}e.callbackPriority=m,e.callbackNode=U}function PN(e,t){if(iL(),vd=br,hf=ut,(Fn&(Ei|js))!==ri)throw new Error("Should not already be working.");var r=e.callbackNode,a=Ua();if(a&&e.callbackNode!==r)return null;var m=Ah(e,e===Gi?ii:ut);if(m===ut)return null;var E=!Mh(e,m)&&!PD(e,m)&&!t,U=E?XA(e,m):pf(e,m);if(U!==La){if(U===el){var I=iv(e);I!==ut&&(m=I,U=Ib(e,I))}if(U===ld){var $=ud;throw nl(e,ut),wo(e,m),ss(e,di()),$}if(U===Lb)wo(e,m);else{var te=!Mh(e,m),re=e.current.alternate;if(te&&!HA(re)){if(U=pf(e,m),U===el){var be=iv(e);be!==ut&&(m=be,U=Ib(e,be))}if(U===ld){var ge=ud;throw nl(e,ut),wo(e,m),ss(e,di()),ge}}e.finishedWork=re,e.finishedLanes=m,FA(e,U,m)}}return ss(e,di()),e.callbackNode===r?PN.bind(null,e):null}function Ib(e,t){var r=hd;if(Vh(e)){var a=nl(e,t);a.flags|=_a,o5(e.containerInfo)}var m=pf(e,t);if(m!==el){var E=is;is=r,E!==null&&IN(E)}return m}function IN(e){is===null?is=e:is.push.apply(is,e)}function FA(e,t,r){switch(t){case La:case ld:throw new Error("Root did not complete. This is a bug in React.");case el:{rl(e,is,Aa);break}case af:{if(wo(e,r),gy(r)&&!tS()){var a=Mb+UN-di();if(a>10){var m=Ah(e,ut);if(m!==ut)break;var E=e.suspendedLanes;if(!Pl(E,r)){Yi(),yy(e,E);break}e.timeoutHandle=Vv(rl.bind(null,e,is,Aa),a);break}}rl(e,is,Aa);break}case cd:{if(wo(e,r),BD(r))break;if(!tS()){var U=LD(e,r),I=U,$=di()-I,te=oM($)-$;if(te>10){e.timeoutHandle=Vv(rl.bind(null,e,is,Aa),te);break}}rl(e,is,Aa);break}case MN:{rl(e,is,Aa);break}default:throw new Error("Unknown root exit status.")}}function HA(e){for(var t=e;;){if(t.flags&Dp){var r=t.updateQueue;if(r!==null){var a=r.stores;if(a!==null)for(var m=0;m<a.length;m++){var E=a[m],U=E.getSnapshot,I=E.value;try{if(!hs(U(),I))return!1}catch{return!1}}}}var $=t.child;if(t.subtreeFlags&Dp&&$!==null){$.return=t,t=$;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 wo(e,t){t=Uh(t,lf),t=Uh(t,dd),HD(e,t)}function FN(e){if(sL(),(Fn&(Ei|js))!==ri)throw new Error("Should not already be working.");Ua();var t=Ah(e,ut);if(!cs(t,pn))return ss(e,di()),null;var r=pf(e,t);if(e.tag!==oo&&r===el){var a=iv(e);a!==ut&&(t=a,r=Ib(e,a))}if(r===ld){var m=ud;throw nl(e,ut),wo(e,t),ss(e,di()),m}if(r===Lb)throw new Error("Root did not complete. This is a bug in React.");var E=e.current.alternate;return e.finishedWork=E,e.finishedLanes=t,rl(e,is,Aa),ss(e,di()),null}function zA(e,t){t!==ut&&(lv(e,En(t,pn)),ss(e,di()),(Fn&(Ei|js))===ri&&(md(),lo()))}function Fb(e,t){var r=Fn;Fn|=AN;try{return e(t)}finally{Fn=r,Fn===ri&&!Ws.isBatchingLegacy&&(md(),Bx())}}function $A(e,t,r,a,m){var E=Ms(),U=Ci.transition;try{return Ci.transition=null,fi(us),e(t,r,a,m)}finally{fi(E),Ci.transition=U,Fn===ri&&md()}}function Ma(e){bo!==null&&bo.tag===oo&&(Fn&(Ei|js))===ri&&Ua();var t=Fn;Fn|=AN;var r=Ci.transition,a=Ms();try{return Ci.transition=null,fi(us),e?e():void 0}finally{fi(a),Ci.transition=r,Fn=t,(Fn&(Ei|js))===ri&&lo()}}function HN(){return(Fn&(Ei|js))!==ri}function ff(e,t){Vi(Ab,oa,e),oa=En(oa,t)}function Hb(e){oa=Ab.current,Oi(Ab,e)}function nl(e,t){e.finishedWork=null,e.finishedLanes=ut;var r=e.timeoutHandle;if(r!==Bv&&(e.timeoutHandle=Bv,gT(r)),Dr!==null)for(var a=Dr.return;a!==null;){var m=a.alternate;gN(m,a),a=a.return}Gi=e;var E=il(e.current,null);return Dr=E,ii=oa=t,si=La,ud=null,of=ut,dd=ut,lf=ut,hd=null,is=null,P5(),Vs.discardPendingWarnings(),E}function zN(e,t){do{var r=Dr;try{if(Nm(),m0(),ir(),Tb.current=null,r===null||r.return===null){si=ld,ud=t,Dr=null;return}if(me&&r.mode&ar&&Zm(r,!0),ae)if(Ul(),t!==null&&typeof t=="object"&&typeof t.then=="function"){var a=t;wD(r,a,ii)}else _D(r,t,ii);fL(e,r.return,r,t,ii),YN(r)}catch(m){t=m,Dr===r&&r!==null?(r=r.return,Dr=r):r=Dr;continue}return}while(!0)}function $N(){var e=Rb.current;return Rb.current=Ym,e===null?Ym:e}function WN(e){Rb.current=e}function WA(){Mb=di()}function gd(e){of=En(e,of)}function GA(){si===La&&(si=af)}function zb(){(si===La||si===af||si===el)&&(si=cd),Gi!==null&&(sv(of)||sv(dd))&&wo(Gi,ii)}function YA(e){si!==cd&&(si=el),hd===null?hd=[e]:hd.push(e)}function qA(){return si===La}function pf(e,t){var r=Fn;Fn|=Ei;var a=$N();if(Gi!==e||ii!==t){if(As){var m=e.memoizedUpdaters;m.size>0&&(bd(e,ii),m.clear()),Ny(e,t)}Aa=Sy(),nl(e,t)}hy(t);do try{KA();break}catch(E){zN(e,E)}while(!0);if(Nm(),Fn=r,WN(a),Dr!==null)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return my(),Gi=null,ii=ut,si}function KA(){for(;Dr!==null;)GN(Dr)}function XA(e,t){var r=Fn;Fn|=Ei;var a=$N();if(Gi!==e||ii!==t){if(As){var m=e.memoizedUpdaters;m.size>0&&(bd(e,ii),m.clear()),Ny(e,t)}Aa=Sy(),md(),nl(e,t)}hy(t);do try{JA();break}catch(E){zN(e,E)}while(!0);return Nm(),WN(a),Fn=r,Dr!==null?(CD(),La):(my(),Gi=null,ii=ut,si)}function JA(){for(;Dr!==null&&!Qj();)GN(Dr)}function GN(e){var t=e.alternate;un(e);var r;(e.mode&ar)!==sn?(Gg(e),r=$b(t,e,oa),Zm(e,!0)):r=$b(t,e,oa),ir(),e.memoizedProps=e.pendingProps,r===null?YN(e):Dr=r,Tb.current=null}function YN(e){var t=e;do{var r=t.alternate,a=t.return;if((t.flags&Dh)===Ot){un(t);var m=void 0;if((t.mode&ar)===sn?m=vN(r,t,oa):(Gg(t),m=vN(r,t,oa),Zm(t,!1)),ir(),m!==null){Dr=m;return}}else{var E=GL(r,t);if(E!==null){E.flags&=Yj,Dr=E;return}if((t.mode&ar)!==sn){Zm(t,!1);for(var U=t.actualDuration,I=t.child;I!==null;)U+=I.actualDuration,I=I.sibling;t.actualDuration=U}if(a!==null)a.flags|=Dh,a.subtreeFlags=Ot,a.deletions=null;else{si=Lb,Dr=null;return}}var $=t.sibling;if($!==null){Dr=$;return}t=a,Dr=t}while(t!==null);si===La&&(si=MN)}function rl(e,t,r){var a=Ms(),m=Ci.transition;try{Ci.transition=null,fi(us),ZA(e,t,r,a)}finally{Ci.transition=m,fi(a)}return null}function ZA(e,t,r,a){do Ua();while(bo!==null);if(cM(),(Fn&(Ei|js))!==ri)throw new Error("Should not already be working.");var m=e.finishedWork,E=e.finishedLanes;if(hD(E),m===null)return cy(),null;if(E===ut&&_("root.finishedLanes should not be empty during a commit. This is a bug in React."),e.finishedWork=null,e.finishedLanes=ut,m===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=mi;var U=En(m.lanes,m.childLanes);zD(e,U),e===Gi&&(Gi=null,Dr=null,ii=ut),((m.subtreeFlags&Al)!==Ot||(m.flags&Al)!==Ot)&&(tl||(tl=!0,Vb=r,Yb(Oo,function(){return Ua(),null})));var I=(m.subtreeFlags&(Ap|Mp|tu|Al))!==Ot,$=(m.flags&(Ap|Mp|tu|Al))!==Ot;if(I||$){var te=Ci.transition;Ci.transition=null;var re=Ms();fi(us);var be=Fn;Fn|=js,Tb.current=null,JL(e,m),B0(),dA(e,m,E),uT(e.containerInfo),e.current=m,yD(E),hA(m,e,E),xD(),eD(),Fn=be,fi(re),Ci.transition=te}else e.current=m,B0();var ge=tl;if(tl?(tl=!1,bo=e,fd=E):(pc=0,df=null),U=e.pendingLanes,U===ut&&(fc=null),ge||JN(e.current,!1),oD(m.stateNode,a),As&&e.memoizedUpdaters.clear(),TA(),ss(e,di()),t!==null)for(var Re=e.onRecoverableError,Me=0;Me<t.length;Me++){var Ke=t[Me],St=Ke.stack,Zt=Ke.digest;Re(Ke.value,{componentStack:St,digest:Zt})}if(cf){cf=!1;var $t=Ub;throw Ub=null,$t}return cs(fd,pn)&&e.tag!==oo&&Ua(),U=e.pendingLanes,cs(U,pn)?(rL(),e===Bb?pd++:(pd=0,Bb=e)):pd=0,lo(),cy(),null}function Ua(){if(bo!==null){var e=Cy(fd),t=YD(Sa,e),r=Ci.transition,a=Ms();try{return Ci.transition=null,fi(t),eM()}finally{fi(a),Ci.transition=r}}return!1}function QA(e){Ob.push(e),tl||(tl=!0,Yb(Oo,function(){return Ua(),null}))}function eM(){if(bo===null)return!1;var e=Vb;Vb=null;var t=bo,r=fd;if(bo=null,fd=ut,(Fn&(Ei|js))!==ri)throw new Error("Cannot flush passive effects while already rendering.");Pb=!0,uf=!1,ND(r);var a=Fn;Fn|=js,_A(t.current),pA(t,t.current,r,e);{var m=Ob;Ob=[];for(var E=0;E<m.length;E++){var U=m[E];tA(t,U)}}SD(),JN(t.current,!0),Fn=a,lo(),uf?t===df?pc++:(pc=0,df=t):pc=0,Pb=!1,uf=!1,lD(t);{var I=t.current.stateNode;I.effectDuration=0,I.passiveEffectDuration=0}return!0}function qN(e){return fc!==null&&fc.has(e)}function tM(e){fc===null?fc=new Set([e]):fc.add(e)}function nM(e){cf||(cf=!0,Ub=e)}var rM=nM;function KN(e,t,r){var a=Zo(r,t),m=G0(e,a,pn),E=uo(e,m,pn),U=Yi();E!==null&&(cu(E,pn,U),ss(E,U))}function mr(e,t,r){if(qL(r),_d(!1),e.tag===d){KN(e,e,r);return}var a=null;for(a=t;a!==null;){if(a.tag===d){KN(a,e,r);return}else if(a.tag===f){var m=a.type,E=a.stateNode;if(typeof m.getDerivedStateFromError=="function"||typeof E.componentDidCatch=="function"&&!qN(E)){var U=Zo(r,e),I=ub(a,U,pn),$=uo(a,I,pn),te=Yi();$!==null&&(cu($,pn,te),ss($,te));return}}a=a.return}_(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
175
+
176
+ Error message:
177
+
178
+ %s`,r)}function iM(e,t,r){var a=e.pingCache;a!==null&&a.delete(t);var m=Yi();yy(e,r),mM(e),Gi===e&&Pl(ii,r)&&(si===cd||si===af&&gy(ii)&&di()-Mb<UN?nl(e,ut):lf=En(lf,r)),ss(e,m)}function XN(e,t){t===mi&&(t=BA(e));var r=Yi(),a=ns(e,t);a!==null&&(cu(a,t,r),ss(a,r))}function sM(e){var t=e.memoizedState,r=mi;t!==null&&(r=t.retryLane),XN(e,r)}function aM(e,t){var r=mi,a;switch(e.tag){case T:a=e.stateNode;var m=e.memoizedState;m!==null&&(r=m.retryLane);break;case H:a=e.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}a!==null&&a.delete(t),XN(e,r)}function oM(e){return e<120?120:e<480?480:e<1080?1080:e<1920?1920:e<3e3?3e3:e<4320?4320:MA(e/1960)*1960}function lM(){if(pd>OA)throw pd=0,Bb=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.");pc>VA&&(pc=0,df=null,_("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 cM(){Vs.flushLegacyContextWarning(),Vs.flushPendingUnsafeLifecycleWarnings()}function JN(e,t){un(e),vf(e,Za,DA),t&&vf(e,Lp,kA),vf(e,Za,EA),t&&vf(e,Lp,jA),ir()}function vf(e,t,r){for(var a=e,m=null;a!==null;){var E=a.subtreeFlags&t;a!==m&&a.child!==null&&E!==Ot?a=a.child:((a.flags&t)!==Ot&&r(a),a.sibling!==null?a=a.sibling:a=m=a.return)}}var gf=null;function ZN(e){{if((Fn&Ei)!==ri||!(e.mode&In))return;var t=e.tag;if(t!==g&&t!==d&&t!==f&&t!==u&&t!==w&&t!==S&&t!==R)return;var r=ne(e)||"ReactComponent";if(gf!==null){if(gf.has(r))return;gf.add(r)}else gf=new Set([r]);var a=Je;try{un(e),_("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{a?un(e):ir()}}}var $b;{var uM=null;$b=function(e,t,r){var a=aS(uM,t);try{return dN(e,t,r)}catch(E){if(x5()||E!==null&&typeof E=="object"&&typeof E.then=="function")throw E;if(Nm(),m0(),gN(e,t),aS(t,a),t.mode&ar&&Gg(t),Pe(null,dN,null,e,t,r),fn()){var m=jr();typeof m=="object"&&m!==null&&m._suppressLogging&&typeof E=="object"&&E!==null&&!E._suppressLogging&&(E._suppressLogging=!0)}throw E}}}var QN=!1,Wb;Wb=new Set;function dM(e){if(rn&&!eL())switch(e.tag){case u:case w:case R:{var t=Dr&&ne(Dr)||"Unknown",r=t;if(!Wb.has(r)){Wb.add(r);var a=ne(e)||"Unknown";_("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",a,t,t)}break}case f:{QN||(_("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),QN=!0);break}}}function bd(e,t){if(As){var r=e.memoizedUpdaters;r.forEach(function(a){xy(e,a,t)})}}var Gb={};function Yb(e,t){{var r=Ws.current;return r!==null?(r.push(t),Gb):ly(e,t)}}function eS(e){if(e!==Gb)return Zj(e)}function tS(){return Ws.current!==null}function hM(e){{if(e.mode&In){if(!LN())return}else if(!AA()||Fn!==ri||e.tag!==u&&e.tag!==w&&e.tag!==R)return;if(Ws.current===null){var t=Je;try{un(e),_(`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`,ne(e))}finally{t?un(e):ir()}}}}function mM(e){e.tag!==oo&&LN()&&Ws.current===null&&_(`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 _d(e){BN=e}var Ds=null,vc=null,fM=function(e){Ds=e};function gc(e){{if(Ds===null)return e;var t=Ds(e);return t===void 0?e:t.current}}function qb(e){return gc(e)}function Kb(e){{if(Ds===null)return e;var t=Ds(e);if(t===void 0){if(e!=null&&typeof e.render=="function"){var r=gc(e.render);if(e.render!==r){var a={$$typeof:Se,render:r};return e.displayName!==void 0&&(a.displayName=e.displayName),a}}return e}return t.current}}function nS(e,t){{if(Ds===null)return!1;var r=e.elementType,a=t.type,m=!1,E=typeof a=="object"&&a!==null?a.$$typeof:null;switch(e.tag){case f:{typeof a=="function"&&(m=!0);break}case u:{(typeof a=="function"||E===Ct)&&(m=!0);break}case w:{(E===Se||E===Ct)&&(m=!0);break}case S:case R:{(E===Le||E===Ct)&&(m=!0);break}default:return!1}if(m){var U=Ds(r);if(U!==void 0&&U===Ds(a))return!0}return!1}}function rS(e){{if(Ds===null||typeof WeakSet!="function")return;vc===null&&(vc=new WeakSet),vc.add(e)}}var pM=function(e,t){{if(Ds===null)return;var r=t.staleFamilies,a=t.updatedFamilies;Ua(),Ma(function(){Xb(e.current,a,r)})}},vM=function(e,t){{if(e.context!==ms)return;Ua(),Ma(function(){wd(t,e,null,null)})}};function Xb(e,t,r){{var a=e.alternate,m=e.child,E=e.sibling,U=e.tag,I=e.type,$=null;switch(U){case u:case R:case f:$=I;break;case w:$=I.render;break}if(Ds===null)throw new Error("Expected resolveFamily to be set during hot reload.");var te=!1,re=!1;if($!==null){var be=Ds($);be!==void 0&&(r.has(be)?re=!0:t.has(be)&&(U===f?re=!0:te=!0))}if(vc!==null&&(vc.has(e)||a!==null&&vc.has(a))&&(re=!0),re&&(e._debugNeedsRemount=!0),re||te){var ge=ns(e,pn);ge!==null&&ai(ge,e,pn,br)}m!==null&&!re&&Xb(m,t,r),E!==null&&Xb(E,t,r)}}var gM=function(e,t){{var r=new Set,a=new Set(t.map(function(m){return m.current}));return Jb(e.current,a,r),r}};function Jb(e,t,r){{var a=e.child,m=e.sibling,E=e.tag,U=e.type,I=null;switch(E){case u:case R:case f:I=U;break;case w:I=U.render;break}var $=!1;I!==null&&t.has(I)&&($=!0),$?bM(e,r):a!==null&&Jb(a,t,r),m!==null&&Jb(m,t,r)}}function bM(e,t){{var r=_M(e,t);if(r)return;for(var a=e;;){switch(a.tag){case N:t.add(a.stateNode);return;case y:t.add(a.stateNode.containerInfo);return;case d:t.add(a.stateNode.containerInfo);return}if(a.return===null)throw new Error("Expected to reach root first.");a=a.return}}}function _M(e,t){for(var r=e,a=!1;;){if(r.tag===N)a=!0,t.add(r.stateNode);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)return a;for(;r.sibling===null;){if(r.return===null||r.return===e)return a;r=r.return}r.sibling.return=r.return,r=r.sibling}return!1}var Zb;{Zb=!1;try{var iS=Object.preventExtensions({})}catch{Zb=!0}}function wM(e,t,r,a){this.tag=e,this.key=r,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=a,this.flags=Ot,this.subtreeFlags=Ot,this.deletions=null,this.lanes=ut,this.childLanes=ut,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,!Zb&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var fs=function(e,t,r,a){return new wM(e,t,r,a)};function Qb(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function yM(e){return typeof e=="function"&&!Qb(e)&&e.defaultProps===void 0}function xM(e){if(typeof e=="function")return Qb(e)?f:u;if(e!=null){var t=e.$$typeof;if(t===Se)return w;if(t===Le)return S}return g}function il(e,t){var r=e.alternate;r===null?(r=fs(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r._debugSource=e._debugSource,r._debugOwner=e._debugOwner,r._debugHookTypes=e._debugHookTypes,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=Ot,r.subtreeFlags=Ot,r.deletions=null,r.actualDuration=0,r.actualStartTime=-1),r.flags=e.flags&ya,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue;var a=e.dependencies;switch(r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.selfBaseDuration=e.selfBaseDuration,r.treeBaseDuration=e.treeBaseDuration,r._debugNeedsRemount=e._debugNeedsRemount,r.tag){case g:case u:case R:r.type=gc(e.type);break;case f:r.type=qb(e.type);break;case w:r.type=Kb(e.type);break}return r}function NM(e,t){e.flags&=ya|Gr;var r=e.alternate;if(r===null)e.childLanes=ut,e.lanes=t,e.child=null,e.subtreeFlags=Ot,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0;else{e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=Ot,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type;var a=r.dependencies;e.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},e.selfBaseDuration=r.selfBaseDuration,e.treeBaseDuration=r.treeBaseDuration}return e}function SM(e,t,r){var a;return e===mm?(a=In,t===!0&&(a|=Ar,a|=Js)):a=sn,As&&(a|=ar),fs(d,null,null,a)}function e_(e,t,r,a,m,E){var U=g,I=e;if(typeof e=="function")Qb(e)?(U=f,I=qb(I)):I=gc(I);else if(typeof e=="string")U=N;else e:switch(e){case Nr:return yo(r.children,m,E,t);case Or:U=c,m|=Ar,(m&In)!==sn&&(m|=Js);break;case ce:return CM(r,m,E,t);case ct:return EM(r,m,E,t);case ft:return jM(r,m,E,t);case nn:return sS(r,m,E,t);case Xn:case Bn:case Lt:case zt:case tn:default:{if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rt:U=v;break e;case mt:U=p;break e;case Se:U=w,I=Kb(I);break e;case Le:U=S;break e;case Ct:U=j,I=null;break e}var $="";{(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&($+=" 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 te=a?ne(a):null;te&&($+=`
197
+
198
+ Check the render method of \``+te+"`.")}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)+"."+$))}}var re=fs(U,r,t,m);return re.elementType=e,re.type=I,re.lanes=E,re._debugOwner=a,re}function t_(e,t,r){var a=null;a=e._owner;var m=e.type,E=e.key,U=e.props,I=e_(m,E,U,a,t,r);return I._debugSource=e._source,I._debugOwner=e._owner,I}function yo(e,t,r,a){var m=fs(b,e,a,t);return m.lanes=r,m}function CM(e,t,r,a){typeof e.id!="string"&&_('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id);var m=fs(C,e,a,t|ar);return m.elementType=ce,m.lanes=r,m.stateNode={effectDuration:0,passiveEffectDuration:0},m}function EM(e,t,r,a){var m=fs(T,e,a,t);return m.elementType=ct,m.lanes=r,m}function jM(e,t,r,a){var m=fs(H,e,a,t);return m.elementType=ft,m.lanes=r,m}function sS(e,t,r,a){var m=fs(P,e,a,t);m.elementType=nn,m.lanes=r;var E={isHidden:!1};return m.stateNode=E,m}function n_(e,t,r){var a=fs(k,e,null,t);return a.lanes=r,a}function DM(){var e=fs(N,null,null,sn);return e.elementType="DELETED",e}function kM(e){var t=fs(O,null,null,sn);return t.stateNode=e,t}function r_(e,t,r){var a=e.children!==null?e.children:[],m=fs(y,a,e.key,t);return m.lanes=r,m.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},m}function aS(e,t){return e===null&&(e=fs(g,null,null,sn)),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 RM(e,t,r,a,m){this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=Bv,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=mi,this.eventTimes=ov(ut),this.expirationTimes=ov(br),this.pendingLanes=ut,this.suspendedLanes=ut,this.pingedLanes=ut,this.expiredLanes=ut,this.mutableReadLanes=ut,this.finishedLanes=ut,this.entangledLanes=ut,this.entanglements=ov(ut),this.identifierPrefix=a,this.onRecoverableError=m,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;for(var E=this.pendingUpdatersLaneMap=[],U=0;U<Bp;U++)E.push(new Set)}switch(t){case mm:this._debugRootType=r?"hydrateRoot()":"createRoot()";break;case oo:this._debugRootType=r?"hydrate()":"render()";break}}function oS(e,t,r,a,m,E,U,I,$,te){var re=new RM(e,t,r,I,$),be=SM(t,E);re.current=be,be.stateNode=re;{var ge={element:a,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null};be.memoizedState=ge}return vg(be),re}var i_="18.3.1";function TM(e,t,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return Ge(a),{$$typeof:jn,key:a==null?null:""+a,children:e,containerInfo:t,implementation:r}}var s_,a_;s_=!1,a_={};function lS(e){if(!e)return ms;var t=Yn(e),r=m5(t);if(t.tag===f){var a=t.type;if(ea(a))return Ux(t,a,r)}return r}function LM(e,t){{var r=Yn(e);if(r===void 0){if(typeof e.render=="function")throw new Error("Unable to find node on an unmounted component.");var a=Object.keys(e).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+a)}var m=sy(r);if(m===null)return null;if(m.mode&Ar){var E=ne(r)||"Component";if(!a_[E]){a_[E]=!0;var U=Je;try{un(m),r.mode&Ar?_("%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,E):_("%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,E)}finally{U?un(U):ir()}}}return m.stateNode}}function cS(e,t,r,a,m,E,U,I){var $=!1,te=null;return oS(e,t,$,te,r,a,m,E,U)}function uS(e,t,r,a,m,E,U,I,$,te){var re=!0,be=oS(r,a,re,e,m,E,U,I,$);be.context=lS(null);var ge=be.current,Re=Yi(),Me=_o(ge),Ke=Ra(Re,Me);return Ke.callback=t??null,uo(ge,Ke,Me),PA(be,Me,Re),be}function wd(e,t,r,a){aD(t,e);var m=t.current,E=Yi(),U=_o(m);ED(U);var I=lS(r);t.context===null?t.context=I:t.pendingContext=I,rn&&Je!==null&&!s_&&(s_=!0,_(`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.`,ne(Je)||"Unknown"));var $=Ra(E,U);$.payload={element:e},a=a===void 0?null:a,a!==null&&(typeof a!="function"&&_("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",a),$.callback=a);var te=uo(m,$,U);return te!==null&&(ai(te,m,U,E),Dm(te,m,U)),U}function bf(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 AM(e){switch(e.tag){case d:{var t=e.stateNode;if(Vh(t)){var r=UD(t);zA(t,r)}break}case T:{Ma(function(){var m=ns(e,pn);if(m!==null){var E=Yi();ai(m,e,pn,E)}});var a=pn;o_(e,a);break}}}function dS(e,t){var r=e.memoizedState;r!==null&&r.dehydrated!==null&&(r.retryLane=FD(r.retryLane,t))}function o_(e,t){dS(e,t);var r=e.alternate;r&&dS(r,t)}function MM(e){if(e.tag===T){var t=su,r=ns(e,t);if(r!==null){var a=Yi();ai(r,e,t,a)}o_(e,t)}}function UM(e){if(e.tag===T){var t=_o(e),r=ns(e,t);if(r!==null){var a=Yi();ai(r,e,t,a)}o_(e,t)}}function hS(e){var t=Jj(e);return t===null?null:t.stateNode}var mS=function(e){return null};function OM(e){return mS(e)}var fS=function(e){return!1};function VM(e){return fS(e)}var pS=null,vS=null,gS=null,bS=null,_S=null,wS=null,yS=null,xS=null,NS=null;{var SS=function(e,t,r){var a=t[r],m=gn(e)?e.slice():Jt({},e);return r+1===t.length?(gn(m)?m.splice(a,1):delete m[a],m):(m[a]=SS(e[a],t,r+1),m)},CS=function(e,t){return SS(e,t,0)},ES=function(e,t,r,a){var m=t[a],E=gn(e)?e.slice():Jt({},e);if(a+1===t.length){var U=r[a];E[U]=E[m],gn(E)?E.splice(m,1):delete E[m]}else E[m]=ES(e[m],t,r,a+1);return E},jS=function(e,t,r){if(t.length!==r.length){D("copyWithRename() expects paths of the same length");return}else for(var a=0;a<r.length-1;a++)if(t[a]!==r[a]){D("copyWithRename() expects paths to be the same except for the deepest key");return}return ES(e,t,r,0)},DS=function(e,t,r,a){if(r>=t.length)return a;var m=t[r],E=gn(e)?e.slice():Jt({},e);return E[m]=DS(e[m],t,r+1,a),E},kS=function(e,t,r){return DS(e,t,0,r)},l_=function(e,t){for(var r=e.memoizedState;r!==null&&t>0;)r=r.next,t--;return r};pS=function(e,t,r,a){var m=l_(e,t);if(m!==null){var E=kS(m.memoizedState,r,a);m.memoizedState=E,m.baseState=E,e.memoizedProps=Jt({},e.memoizedProps);var U=ns(e,pn);U!==null&&ai(U,e,pn,br)}},vS=function(e,t,r){var a=l_(e,t);if(a!==null){var m=CS(a.memoizedState,r);a.memoizedState=m,a.baseState=m,e.memoizedProps=Jt({},e.memoizedProps);var E=ns(e,pn);E!==null&&ai(E,e,pn,br)}},gS=function(e,t,r,a){var m=l_(e,t);if(m!==null){var E=jS(m.memoizedState,r,a);m.memoizedState=E,m.baseState=E,e.memoizedProps=Jt({},e.memoizedProps);var U=ns(e,pn);U!==null&&ai(U,e,pn,br)}},bS=function(e,t,r){e.pendingProps=kS(e.memoizedProps,t,r),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var a=ns(e,pn);a!==null&&ai(a,e,pn,br)},_S=function(e,t){e.pendingProps=CS(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var r=ns(e,pn);r!==null&&ai(r,e,pn,br)},wS=function(e,t,r){e.pendingProps=jS(e.memoizedProps,t,r),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var a=ns(e,pn);a!==null&&ai(a,e,pn,br)},yS=function(e){var t=ns(e,pn);t!==null&&ai(t,e,pn,br)},xS=function(e){mS=e},NS=function(e){fS=e}}function BM(e){var t=sy(e);return t===null?null:t.stateNode}function PM(e){return null}function IM(){return Je}function FM(e){var t=e.findFiberByHostInstance,r=l.ReactCurrentDispatcher;return sD({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:pS,overrideHookStateDeletePath:vS,overrideHookStateRenamePath:gS,overrideProps:bS,overridePropsDeletePath:_S,overridePropsRenamePath:wS,setErrorHandler:xS,setSuspenseHandler:NS,scheduleUpdate:yS,currentDispatcherRef:r,findHostInstanceByFiber:BM,findFiberByHostInstance:t||PM,findHostInstancesForRefresh:gM,scheduleRefresh:pM,scheduleRoot:vM,setRefreshHandler:fM,getCurrentFiber:IM,reconcilerVersion:i_})}var RS=typeof reportError=="function"?reportError:function(e){console.error(e)};function c_(e){this._internalRoot=e}_f.prototype.render=c_.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw new Error("Cannot update an unmounted root.");{typeof arguments[1]=="function"?_("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):wf(arguments[1])?_("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"&&_("You passed a second argument to root.render(...) but it only accepts one argument.");var r=t.containerInfo;if(r.nodeType!==dn){var a=hS(t.current);a&&a.parentNode!==r&&_("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}wd(e,t,null,null)},_f.prototype.unmount=c_.prototype.unmount=function(){typeof arguments[0]=="function"&&_("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;HN()&&_("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."),Ma(function(){wd(null,e,null,null)}),Rx(t)}};function HM(e,t){if(!wf(e))throw new Error("createRoot(...): Target container is not a DOM element.");TS(e);var r=!1,a=!1,m="",E=RS;t!=null&&(t.hydrate?D("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===Xt&&_(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
201
+
202
+ let root = createRoot(domContainer);
203
+ root.render(<App />);`),t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(m=t.identifierPrefix),t.onRecoverableError!==void 0&&(E=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var U=cS(e,mm,null,r,a,m,E);am(U.current,e);var I=e.nodeType===dn?e.parentNode:e;return Eu(I),new c_(U)}function _f(e){this._internalRoot=e}function zM(e){e&&ik(e)}_f.prototype.unstable_scheduleHydration=zM;function $M(e,t,r){if(!wf(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");TS(e),t===void 0&&_("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var a=r??null,m=r!=null&&r.hydratedSources||null,E=!1,U=!1,I="",$=RS;r!=null&&(r.unstable_strictMode===!0&&(E=!0),r.identifierPrefix!==void 0&&(I=r.identifierPrefix),r.onRecoverableError!==void 0&&($=r.onRecoverableError));var te=uS(t,null,e,mm,a,E,U,I,$);if(am(te.current,e),Eu(e),m)for(var re=0;re<m.length;re++){var be=m[re];q5(te,be)}return new _f(te)}function wf(e){return!!(e&&(e.nodeType===Mn||e.nodeType===Br||e.nodeType===gi))}function yd(e){return!!(e&&(e.nodeType===Mn||e.nodeType===Br||e.nodeType===gi||e.nodeType===dn&&e.nodeValue===" react-mount-point-unstable "))}function TS(e){e.nodeType===Mn&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&_("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."),Vu(e)&&(e._reactRootContainer?_("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):_("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 WM=l.ReactCurrentOwner,LS;LS=function(e){if(e._reactRootContainer&&e.nodeType!==dn){var t=hS(e._reactRootContainer.current);t&&t.parentNode!==e&&_("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var r=!!e._reactRootContainer,a=u_(e),m=!!(a&&so(a));m&&!r&&_("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===Mn&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&_("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 u_(e){return e?e.nodeType===Br?e.documentElement:e.firstChild:null}function AS(){}function GM(e,t,r,a,m){if(m){if(typeof a=="function"){var E=a;a=function(){var ge=bf(U);E.call(ge)}}var U=uS(t,a,e,oo,null,!1,!1,"",AS);e._reactRootContainer=U,am(U.current,e);var I=e.nodeType===dn?e.parentNode:e;return Eu(I),Ma(),U}else{for(var $;$=e.lastChild;)e.removeChild($);if(typeof a=="function"){var te=a;a=function(){var ge=bf(re);te.call(ge)}}var re=cS(e,oo,null,!1,!1,"",AS);e._reactRootContainer=re,am(re.current,e);var be=e.nodeType===dn?e.parentNode:e;return Eu(be),Ma(function(){wd(t,re,r,a)}),re}}function YM(e,t){e!==null&&typeof e!="function"&&_("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function yf(e,t,r,a,m){LS(r),YM(m===void 0?null:m,"render");var E=r._reactRootContainer,U;if(!E)U=GM(r,t,e,m,a);else{if(U=E,typeof m=="function"){var I=m;m=function(){var $=bf(U);I.call($)}}wd(t,U,e,m)}return bf(U)}var MS=!1;function qM(e){{MS||(MS=!0,_("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=WM.current;if(t!==null&&t.stateNode!==null){var r=t.stateNode._warnedAboutRefsInRender;r||_("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Nn(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===Mn?e:LM(e,"findDOMNode")}function KM(e,t,r){if(_("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"),!yd(t))throw new Error("Target container is not a DOM element.");{var a=Vu(t)&&t._reactRootContainer===void 0;a&&_("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 yf(null,e,t,!0,r)}function XM(e,t,r){if(_("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"),!yd(t))throw new Error("Target container is not a DOM element.");{var a=Vu(t)&&t._reactRootContainer===void 0;a&&_("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 yf(null,e,t,!1,r)}function JM(e,t,r,a){if(_("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"),!yd(r))throw new Error("Target container is not a DOM element.");if(e==null||!Wr(e))throw new Error("parentComponent must be a valid React Component");return yf(e,t,r,!1,a)}var US=!1;function ZM(e){if(US||(US=!0,_("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")),!yd(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=Vu(e)&&e._reactRootContainer===void 0;t&&_("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var r=u_(e),a=r&&!so(r);a&&_("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return Ma(function(){yf(null,null,e,!1,function(){e._reactRootContainer=null,Rx(e)})}),!0}else{{var m=u_(e),E=!!(m&&so(m)),U=e.nodeType===Mn&&yd(e.parentNode)&&!!e.parentNode._reactRootContainer;E&&_("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",U?"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}}qD(AM),XD(MM),JD(UM),ZD(Ms),QD(WD),(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")&&_("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"),yh(eT),Sh(Fb,$A,Ma);function QM(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!wf(t))throw new Error("Target container is not a DOM element.");return TM(e,t,null,r)}function eU(e,t,r,a){return JM(e,t,r,a)}var d_={usingClientEntryPoint:!1,Events:[so,ql,om,Yc,qc,Fb]};function tU(e,t){return d_.usingClientEntryPoint||_('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),HM(e,t)}function nU(e,t,r){return d_.usingClientEntryPoint||_('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),$M(e,t,r)}function rU(e){return HN()&&_("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."),Ma(e)}var iU=FM({findFiberByHostInstance:zo,bundleType:1,version:i_,rendererPackageName:"react-dom"});if(!iU&&Oe&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var OS=window.location.protocol;/^(https?|file):$/.test(OS)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(OS==="file:"?`
204
+ You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}vs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=d_,vs.createPortal=QM,vs.createRoot=tU,vs.findDOMNode=qM,vs.flushSync=rU,vs.hydrate=KM,vs.hydrateRoot=nU,vs.render=XM,vs.unmountComponentAtNode=ZM,vs.unstable_batchedUpdates=Fb,vs.unstable_renderSubtreeIntoContainer=eU,vs.version=i_,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})();WC.exports=vs;var Co=WC.exports,qC,PS=Co;{var IS=PS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;qC=function(n,i){IS.usingClientEntryPoint=!0;try{return PS.createRoot(n,i)}finally{IS.usingClientEntryPoint=!1}}}const KC={"terminal.disconnected":"Connection lost. Reconnecting…","terminal.paneMissing":"This pane has closed. Switch to another pane.","terminal.transport_live":"Live","terminal.transport_snapshot":"Snapshot","terminal.transport_detail_title":"Terminal delivery","terminal.transport_detail_configured":"Configured","terminal.transport_detail_current":"Current","terminal.transport_detail_connection":"Connection","terminal.transport_detail_manual":"Snapshot pulling was selected manually and will not switch automatically.","terminal.transport_detail_live":"The terminal is receiving live pushes normally.","terminal.transport_detail_fallback":"Live pushing became unstable, so Handmux fell back to snapshot pulling.","terminal.transport_detail_unavailable":"The live channel could not connect. Check whether your proxy supports WebSocket upgrades.","terminal.transport_detail_waiting":"Waiting for the connection to become stable before retrying live pushing.","terminal.transport_detail_retry":"About {seconds}s until Handmux attempts to restore live pushing.","terminal.connection_connecting":"Checking","terminal.connection_good":"Good","terminal.connection_degraded":"Fair","terminal.connection_poor":"Poor","common.save":"Save","common.cancel":"Cancel","common.confirm":"Confirm","common.ok":"OK","common.close":"Close","common.delete":"Delete","common.undo":"Undo","common.copy":"Copy","common.rename":"Rename","common.create":"Create","common.back":"Back","common.open":"Open","common.loading":"Loading…","common.done":"Done","app.browser":"Web preview","browser.openTabs":"Open web preview tabs","browser.history":"Recently Visited","browser.closeTab":"Close {title}","browser.newTab":"New tab","browser.minimize":"Minimize","browser.back":"Back","browser.forward":"Forward","browser.address":"Address","browser.addressPlaceholder":"Enter a URL or port","browser.addressOrDirectoryPlaceholder":"Enter a URL, or choose a folder","browser.refresh":"Refresh","browser.stop":"Stop loading","browser.viewMode":"View mode","browser.desktopView":"Desktop view","browser.mobileView":"Mobile view","browser.closeTiming":"Close background tabs","browser.minutes":"{value} minutes","browser.neverClose":"Never close","browser.clearHistory":"Clear","browser.emptyHistory":"No recent visits yet","browser.loadFailed":"This page could not be loaded. Check the address and try again.","browser.retry":"Retry","browser.consentTitle":"Web Preview","browser.consentBody":"Handmux embeds pages in this window. It is not a full browser; use it to preview development servers, localhost, intranet sites, and websites that allow embedding. You can also choose a static folder on the computer from Home.","browser.consentComputer":"Connection: Direct uses your phone network. Computer proxy requests originate from your computer and can reach its intranet and localhost without publishing them.","browser.consentPrivate":"Sign-ins: Direct and proxy use separate Cookies and sign-in state. Proxy sessions are also isolated to this device.","browser.consentLimits":"Compatibility: Direct may be blocked by a site’s iframe or CSP policy, and Handmux may not know why. Computer proxy forwards and rewrites pages but cannot guarantee every site. For full browsing, use Safari, Chrome, or your system browser.","browser.consentIdle":"Background tabs: They close after 10 minutes by default. Direct-site Cookies remain in your phone browser.","browser.about":"About Web Preview","browser.acknowledge":"Got it","browser.directMode":"Direct from phone","browser.proxyMode":"Through computer proxy","browser.directBadge":"Direct","browser.proxyBadge":"Proxy","browser.staticBadge":"Static","browser.chooseDirectory":"Choose directory","browser.staticOpening":"Opening directory…","browser.directoryPickerHint":"Choose the directory containing the web files.","browser.switchMode":"Switch browsing mode","browser.menu":"Web preview menu","browser.connectionMode":"Connection","browser.pageView":"Page view","browser.zoomPage":"Zoom page","browser.resetZoom":"Reset page zoom","browser.proxyLogin":"Proxy sign-in","browser.proxyLoginHelpLabel":"About proxy sign-in","browser.proxyLoginHelp":"Whether to encrypt and store proxy Cookies on the computer running Handmux so sign-ins survive a restart.","browser.siteProxyCookie":"This site’s proxy Cookies","browser.siteCookieHelpLabel":"About this site’s proxy Cookies","browser.siteCookieHelp":"This clears only proxy Cookies on this device that match the site’s real URL. Parent-domain Cookies may sign you out of related internal sites. Direct-site Cookies are unaffected.","browser.openMode":"Choose how to open","browser.historyMore":"More opening options","browser.historyActions":"More actions","browser.proxyLimitHint":"Computer proxy mode forwards and rewrites pages and may not work with every website.","browser.proxyUnavailable":"Run handmux setup on the computer and choose “Web preview” to configure its proxy domain. Until then, only Direct mode is available.","browser.urlInvalid":"Enter a valid HTTP or HTTPS address.","browser.tryProxy":"Try computer proxy","browser.openExternal":"Open in system browser","browser.clearSiteLogin":"Clear this site’s proxy Cookies","browser.clearAllLogin":"Clear all proxy Cookies","browser.clearSiteLoginConfirm":"Clear this site’s proxy login on the current device? Parent-domain Cookies may also affect related internal systems.","browser.clearAllLoginConfirm":"Clear every proxy login on the current device? Direct-site logins are not affected.","browser.deleteHistoryEntry":"Delete this record","browser.profileSaveFailed":"Could not save proxy login settings. Check the server connection and try again.","browser.profileClearFailed":"Cleanup was not fully successful. Check the server connection and storage permissions, then try again.","browser.profileSyncFailed":"Proxy login settings could not be synchronized. Retry or use Direct mode.","browser.profileRecoveryWarning":"Saved proxy login data could not be recovered and was reset on this device.","browser.retention1":"1 day","browser.retention7":"7 days","browser.retention30":"30 days","browser.retentionNotSaved":"Not saved","browser.retentionNever":"Long-term storage","settings.browserPersistLogin":"Persist proxy Cookies on the computer","settings.browserPersistLoginHint":"Stored only for this device. Turning this off keeps current tabs and login state until they are cleared or expire.","settings.browserRetention":"Proxy login retention","settings.browserDisablePersistConfirm":"Stop saving future proxy login changes on the current device? Current tabs and login state stay available.","token.title":"Access token required","token.placeholder":"Paste HANDMUX_TOKEN","settings.language":"Language","settings.browserDefaultMode":"Default web mode","settings.browserDefaultModeHint":"Used for new address-bar tabs and recent visits without a saved mode.","settings.browserEnabled":"Web preview","settings.browserEnabledHint":"Tabs belong to this device. Turning this off closes all tabs but keeps recent visits.","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":"Open website","localurl.open":"Open in Browser","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 open this website. Check the address and try again.","changelog.title":"What's new","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.input.enterDraft":"Press Shift + Enter to enter draft mode","dock.input.exitDraft":"Press Esc to return to terminal mode · Shift + Enter for a new line","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.configPresets":"Config presets","cmd.removeDevice":"Remove from this device","cmd.removedDevice":"Removed from this device","cmd.addPlaceholder":"Add a command…","cmd.tabCmd":"Command","cmd.tabKey":"Key","cmd.addTo":"Add to","cmd.addTitle":"Add","cmd.added":"Added","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":"Codex has not returned quota data 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":"Shared across devices","usage.timeMark":"Time elapsed in this window","app.renameSession":"Rename session","app.renameWindow":"Rename window","app.manageWindow":"Window Management","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.manageTitle":"Split Management","pane.close":"Close pane","pane.closeConfirm":"Close? Tap again","pane.splitFailed":"Split failed","pane.closeFailed":"Close failed","resize.windowWidth":"Window width","resize.paneWidth":"Pane width","resize.columns":"{n} columns","resize.restore":"Restore","resize.restoreAutoWidth":"Restore automatic width","resize.restoreRatio":"Restore split ratio","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.group_general":"General","settings.group_terminal":"Terminal","settings.group_chat":"Chat","settings.group_notifications":"Notifications","settings.group_about":"About","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.keyboard_mode":"Keyboard mode","settings.keyboard_mode_auto":"Auto detect","settings.keyboard_mode_mobile":"Mobile","settings.keyboard_mode_desktop":"Desktop","settings.keyboard_mode_hint":"Applies only to this browser; override it if detection is wrong.","settings.terminal_transport":"Terminal delivery mode","settings.terminal_transport_live":"Live pushing","settings.terminal_transport_snapshot":"Snapshot pulling","settings.terminal_transport_hint":"Live pushing uses WebSocket for lower latency, falls back to snapshot pulling on a poor connection, and retries after 30 stable seconds.","settings.snapshot_interval":"Active refresh rate","settings.snapshot_interval_hint":"The terminal refreshes less often while idle to reduce traffic and resource use.","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.reload_app":"Reload app","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.notify_disable_title":"Turn off push notifications?","settings.notify_disable_hint":"This device will stop receiving “Needs you”, “Done”, and script push notifications. You can turn them back on anytime.","settings.notify_disable_confirm":"Turn Off","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.preview_site":"Preview site","settings.preview_static_site":"Preview static site","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_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_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.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_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.itemConflict":"That shortcut already exists. Change its content or choose another list.","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":"Script Push History","pushInbox.empty":"No notifications yet","pushInbox.delete":"Delete","pushInbox.justNow":"just now","pushInbox.minutesAgo":"{n} min ago","pushInbox.hoursAgo":"{n} h ago","pushInbox.detailTitle":"Script Push","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 script push history. Check the connection and retry.","pushInbox.deleteFailed":"Could not delete the script push. 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","workspace.bootDetected":"Computer restart detected","workspace.tmuxDetected":"tmux restart detected","workspace.summary":"Last workspace · {sessions} sessions · saved {time}","workspace.restoreLast":"Restore last workspace","workspace.partialCard":"{failures} sessions still need attention","workspace.unknownTime":"unknown time","workspace.savedAt":"Saved {time}","workspace.topologySummary":"{sessions} sessions · {windows} windows · {panes} panes","workspace.planSummary":"Restore {restore} sessions; {already} already present","workspace.renameRule":"A -restored suffix is added only when a session with the same name already exists.","workspace.nonDestructive":"Current sessions will not be modified, renamed, or stopped.","workspace.progress":"Restoring {completed} / {total}…","workspace.progressDone":"Restored {completed} / {total}","workspace.complete":"Workspace restored.","workspace.completedSummary":"Restored: {sessions} sessions · {windows} windows · {panes} panes","workspace.rebindHint":"Restored sessions stay hidden until you choose which ones to bind to this phone.","workspace.rebind":"Bind restored sessions","workspace.sessionFailure":"{session}: {reason}","workspace.unknownSession":"Unknown session","workspace.restore":"Restore","workspace.ignore":"Ignore this backup","workspace.protectionTitle":"Workspace is not protected","workspace.protection.live-corrupt":"Workspace state copies are damaged. Check disk health and ~/.handmux permissions, then restart handmux.","workspace.protection.live-unavailable":"Workspace state cannot be read or written. Check free disk space and ~/.handmux permissions, then restart handmux.","workspace.protection.unknown":"Background snapshots are unavailable. Check the handmux log on your computer.","workspace.error.restore-interrupted":"restore was interrupted; retry this backup","workspace.error.checkpoint-not-found":"this backup is no longer available; refresh and choose another backup","workspace.error.storage-full":"workspace storage is full; free disk space and retry","workspace.error.permission-denied":"workspace storage is not writable; check permissions and retry","workspace.error.plan-failed":"the restore plan changed; refresh and retry","workspace.error.agent-unavailable":"the agent could not resume; open the restored shell and retry manually","workspace.error.tmux-unavailable":"tmux is unavailable; make sure tmux is running and retry","workspace.error.restore-failed":"the session was not restored; check the handmux log and retry","workspace.error.operation-not-found":"this restore operation is no longer available; retry the backup","workspace.sessionWarning":"{session}: {reason}","workspace.warning.cwd-fallback":"the working directory was unavailable; restored in the home directory","workspace.warning.layout-fallback":"the pane layout could not be fully restored; the default layout was kept","workspace.warning.agent-warning":"the agent did not resume automatically; the restored shell is still available","workspace.warning.live-reconcile-failed":"live workspace reconciliation failed; check the handmux log","workspace.warning.workspace-unavailable":"workspace storage is temporarily unavailable; check disk space and permissions","workspace.warning.restore-warning":"the restore completed with a warning that may need attention"},mU={"terminal.disconnected":"连接断开,重连中…","terminal.paneMissing":"窗格已关闭,请切换到其他窗格。","terminal.transport_live":"实时","terminal.transport_snapshot":"快照","terminal.transport_detail_title":"终端传输状态","terminal.transport_detail_configured":"设置模式","terminal.transport_detail_current":"当前模式","terminal.transport_detail_connection":"连接状态","terminal.transport_detail_manual":"你已手动选择快照拉取,不会自动切换。","terminal.transport_detail_live":"终端正在正常接收实时推送。","terminal.transport_detail_fallback":"实时推送不稳定,已自动降级为快照拉取。","terminal.transport_detail_unavailable":"实时通道无法建立,请检查反向代理是否支持 WebSocket。","terminal.transport_detail_waiting":"正在等待连接稳定,随后尝试恢复实时推送。","terminal.transport_detail_retry":"预计 {seconds} 秒后尝试恢复实时推送。","terminal.connection_connecting":"检测中","terminal.connection_good":"良好","terminal.connection_degraded":"一般","terminal.connection_poor":"较差","common.save":"保存","common.cancel":"取消","common.confirm":"确认","common.ok":"确定","common.close":"关闭","common.delete":"删除","common.undo":"撤销","common.copy":"复制","common.rename":"重命名","common.create":"新建","common.back":"返回","common.open":"打开","common.loading":"加载中…","common.done":"完成","app.browser":"网页预览器","browser.openTabs":"打开的网页预览器标签页","browser.history":"最近访问","browser.closeTab":"关闭 {title}","browser.newTab":"新建标签页","browser.minimize":"收起","browser.back":"后退","browser.forward":"前进","browser.address":"地址","browser.addressPlaceholder":"输入网址或端口","browser.addressOrDirectoryPlaceholder":"输入网址,或选择目录","browser.refresh":"刷新","browser.stop":"停止加载","browser.viewMode":"浏览视图","browser.desktopView":"电脑视图","browser.mobileView":"手机视图","browser.closeTiming":"后台页签关闭","browser.minutes":"{value} 分钟","browser.neverClose":"永不关闭","browser.clearHistory":"清除","browser.emptyHistory":"还没有最近访问","browser.loadFailed":"无法加载此网页,请检查地址后重试。","browser.retry":"重试","browser.consentTitle":"网页预览器","browser.consentBody":"Handmux 会把网页嵌入当前窗口。它不是真正的浏览器,适合预览开发服务、localhost、内网和允许嵌入的网站;也可从 Home 选择电脑上的静态目录。","browser.consentComputer":"连接方式:手机直连使用手机网络。经电脑代理时,请求由电脑发起,可以访问电脑所在的内网和 localhost,但不会将它们公开。","browser.consentPrivate":"登录状态:直连与代理不共享 Cookie 和登录状态;代理会话也按当前设备隔离。","browser.consentLimits":"兼容限制:直连可能被网站的 iframe 或 CSP 策略阻止,而且 Handmux 未必能判断原因。电脑代理会转发并改写网页,也不保证兼容所有网站。需要完整浏览能力时,请用 Safari、Chrome 或系统浏览器打开。","browser.consentIdle":"后台标签页:默认在 10 分钟后关闭。直连网站的 Cookie 仍保留在手机浏览器中。","browser.about":"关于网页预览器","browser.acknowledge":"好的","browser.directMode":"手机直连","browser.proxyMode":"经电脑代理","browser.directBadge":"直连","browser.proxyBadge":"代理","browser.staticBadge":"静态","browser.chooseDirectory":"选择目录","browser.staticOpening":"正在打开目录…","browser.directoryPickerHint":"选择包含网页文件的目录。","browser.switchMode":"切换浏览模式","browser.menu":"网页预览器菜单","browser.connectionMode":"连接方式","browser.pageView":"页面视图","browser.zoomPage":"缩放网页","browser.resetZoom":"重置网页缩放","browser.proxyLogin":"代理登录","browser.proxyLoginHelpLabel":"代理登录说明","browser.proxyLoginHelp":"是否将代理 Cookie 加密保存在运行 Handmux 的电脑上,以便重启后保持登录状态。","browser.siteProxyCookie":"本站代理 Cookie","browser.siteCookieHelpLabel":"本站代理 Cookie 说明","browser.siteCookieHelp":"这里只清理当前设备中与本站真实网址匹配的代理 Cookie。父域 Cookie 可能让相关内网站点一起退出,手机直连 Cookie 不受影响。","browser.openMode":"选择打开方式","browser.historyMore":"更多打开方式","browser.historyActions":"更多操作","browser.proxyLimitHint":"电脑代理会转发并改写网页,不保证兼容所有网站。","browser.proxyUnavailable":"请在电脑终端运行 handmux setup,选择“网页预览器”配置代理域名;配置前只能使用手机直连。","browser.urlInvalid":"请输入有效的 HTTP 或 HTTPS 地址。","browser.tryProxy":"改用电脑代理","browser.openExternal":"用系统浏览器打开","browser.clearSiteLogin":"清理本站代理 Cookie","browser.clearAllLogin":"清理全部代理 Cookie","browser.clearSiteLoginConfirm":"清理当前设备的本站代理登录状态?父域 Cookie 也可能影响相关内网系统。","browser.clearAllLoginConfirm":"清理当前设备的全部代理登录状态?手机直连的登录状态不受影响。","browser.deleteHistoryEntry":"删除此记录","browser.profileSaveFailed":"无法保存代理登录设置,请检查服务器连接后重试。","browser.profileClearFailed":"清理未完全成功,请检查服务器连接和存储权限后重试。","browser.profileSyncFailed":"无法同步代理登录设置。请重试,或改用手机直连。","browser.profileRecoveryWarning":"无法恢复已保存的代理登录数据,当前设备的代理登录状态已重置。","browser.retention1":"1 天","browser.retention7":"7 天","browser.retention30":"30 天","browser.retentionNotSaved":"不保存","browser.retentionNever":"长期保存","settings.browserPersistLogin":"在电脑上持久化保存代理 Cookie","settings.browserPersistLoginHint":"只保存在当前设备。关闭后,当前标签页和登录状态仍会保留,直到清理或过期。","settings.browserRetention":"代理登录保留","settings.browserDisablePersistConfirm":"停止保存当前设备后续的代理登录变化?当前标签页和登录状态会继续保留。","token.title":"需要访问 token","token.placeholder":"粘贴 HANDMUX_TOKEN","settings.language":"语言 Language","settings.browserDefaultMode":"网页默认打开方式","settings.browserDefaultModeHint":"用于地址栏新页签,以及没有保存打开方式的历史记录。","settings.browserEnabled":"网页预览器","settings.browserEnabledHint":"标签页仅属于当前设备。关闭后会关闭全部标签页,但保留历史记录。","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.notListening":"端口 :{port} 没有服务在监听。","localurl.badProtocol":"该链接不是可代理的 HTTP 或 HTTPS 地址。","localurl.network":"连接 handmux 服务失败,请检查网络后重试。","localurl.failed":"无法打开该网站,请检查地址后重试。","changelog.title":"新功能","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.input.enterDraft":"按 Shift + Enter 进入草稿模式","dock.input.exitDraft":"按 Esc 回到终端模式 · Shift + Enter 换行","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.configPresets":"配置预置","cmd.removeDevice":"从本机移除","cmd.removedDevice":"已从本机移除","cmd.addPlaceholder":"加一条命令…","cmd.tabCmd":"命令","cmd.tabKey":"按键","cmd.addTo":"添加到","cmd.addTitle":"添加","cmd.added":"已添加","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":"Codex 暂未返回额度数据。","usage.loadFailed":"加载用量失败。","usage.updatedNow":"刚刚更新","usage.updatedMin":"{n} 分钟前更新","usage.updatedHr":"{n} 小时前更新","usage.updatedDay":"{n} 天前更新","usage.activityNote":"所有设备共享","usage.timeMark":"本窗口已过去的时间","app.renameSession":"重命名会话","app.renameWindow":"重命名窗口","app.manageWindow":"窗口管理","app.moveLeft":"◀ 左移","app.moveRight":"右移 ▶","app.deleteWindow":"删除窗口","pane.splitH":"左右分屏","pane.splitV":"上下分屏","pane.manage":"管理分屏","pane.manageTitle":"分屏管理","pane.close":"关闭此格","pane.closeConfirm":"确认关闭?再点一次","pane.splitFailed":"分屏失败","pane.closeFailed":"关闭失败","resize.windowWidth":"窗口宽度","resize.paneWidth":"窗格宽度","resize.columns":"{n} 列","resize.restore":"恢复","resize.restoreAutoWidth":"恢复自动宽度","resize.restoreRatio":"恢复分屏比例","app.deleteLastWindowConfirm":"这是最后一个窗口,删除将关闭整个会话!再点一次","app.deleteConfirm":"确认删除?再点一次","app.cannotLocate":"无法定位","app.pickItsDir":",请选它所在的目录:","app.noBoundSession":"还没有绑定会话","app.tapToBind":"点此绑定一个","app.selectSessionHint":"点击左上角 ☰ 选择会话","app.backToExit":"再按一次返回键退出","settings.title":"设置","settings.group_global":"全局设置","settings.group_general":"通用","settings.group_terminal":"终端","settings.group_chat":"对话","settings.group_notifications":"通知","settings.group_about":"关于","settings.font_size":"字体大小","settings.font_decrease":"减小字体","settings.font_increase":"增大字体","settings.font_auto":"自适应","settings.font_auto_title":"按高度自动适配","settings.keyboard_mode":"键盘模式","settings.keyboard_mode_auto":"自动识别","settings.keyboard_mode_mobile":"手机","settings.keyboard_mode_desktop":"电脑","settings.keyboard_mode_hint":"仅应用于当前浏览器;识别不准时可手动指定。","settings.terminal_transport":"终端传输模式","settings.terminal_transport_live":"实时推送","settings.terminal_transport_snapshot":"快照拉取","settings.terminal_transport_hint":"实时推送使用 WebSocket;网络较差时会自动降级为快照拉取,持续稳定 30 秒后尝试恢复实时推送。","settings.snapshot_interval":"活跃时刷新频率","settings.snapshot_interval_hint":"终端空闲后会自动降低频率,减少流量和资源占用。","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.reload_app":"重新加载应用","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.notify_disable_title":"关闭推送通知?","settings.notify_disable_hint":"关闭后,这台设备将不再收到「需要你」「已完成」或脚本发送的推送。你可以随时重新开启。","settings.notify_disable_confirm":"关闭推送","settings.processing":"处理中","settings.push_hint":"监听「需要你」和「已完成」:所关注会话需要你授权/回答,或一个回合刚做完时,推送到此设备。","settings.push_unsupported":"推送需要 Chrome 或 Safari 浏览器","settings.preview_site":"预览站点","settings.preview_static_site":"预览静态站点","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_off_hint":"未开启预览。选择「静态」开始。","settings.preview_off_hint_both":"未开启预览。选择「静态」或「动态」开始。","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.dir_picker_hint":"选择要预览的静态站点目录(含 index.html)","settings.err_port_not_listening":"该端口未在监听,请确认服务已启动","settings.err_bad_port":"端口不合法(1–65535)","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.itemConflict":"该快捷项已存在,请更换内容或选择其他列表。","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":"未知原因","workspace.bootDetected":"检测到电脑已重启","workspace.tmuxDetected":"检测到 tmux 已重新启动","workspace.summary":"上次工作区 · {sessions} 个会话 · 保存于 {time}","workspace.restoreLast":"恢复上次工作区","workspace.partialCard":"仍有 {failures} 个会话需要处理","workspace.unknownTime":"未知时间","workspace.savedAt":"保存于 {time}","workspace.topologySummary":"{sessions} 个会话 · {windows} 个窗口 · {panes} 个窗格","workspace.planSummary":"将恢复 {restore} 个会话;{already} 个已经存在","workspace.renameRule":"仅当当前已有同名会话时,恢复名称才会添加 -restored 后缀。","workspace.nonDestructive":"当前会话不会被修改、重命名或停止。","workspace.progress":"正在恢复 {completed} / {total}…","workspace.progressDone":"已恢复 {completed} / {total}","workspace.complete":"工作区已恢复。","workspace.completedSummary":"本次恢复:{sessions} 个会话 · {windows} 个窗口 · {panes} 个窗格","workspace.rebindHint":"恢复的会话不会自动显示;可重新选择要绑定到这台手机的会话。","workspace.rebind":"重新绑定会话","workspace.sessionFailure":"{session}:{reason}","workspace.unknownSession":"未知会话","workspace.restore":"恢复","workspace.ignore":"忽略此备份","workspace.protectionTitle":"工作区未受保护","workspace.protection.live-corrupt":"工作区状态副本已损坏;请检查磁盘和 ~/.handmux 权限,然后重启 handmux。","workspace.protection.live-unavailable":"无法读写工作区状态;请检查磁盘空间和 ~/.handmux 权限,然后重启 handmux。","workspace.protection.unknown":"后台快照暂时不可用;请检查电脑上的 handmux 日志。","workspace.error.restore-interrupted":"恢复已中断;请重试此备份","workspace.error.checkpoint-not-found":"此备份已不可用;请刷新后选择其它备份","workspace.error.storage-full":"工作区存储空间不足;请释放磁盘空间后重试","workspace.error.permission-denied":"无法写入工作区存储;请检查权限后重试","workspace.error.plan-failed":"恢复计划已变化;请刷新后重试","workspace.error.agent-unavailable":"Agent 无法续接;请打开已恢复的 shell 后手动重试","workspace.error.tmux-unavailable":"tmux 不可用;请确认 tmux 已运行后重试","workspace.error.restore-failed":"会话未恢复;请检查 handmux 日志后重试","workspace.error.operation-not-found":"此恢复任务已不可用;请重新恢复此备份","workspace.sessionWarning":"{session}:{reason}","workspace.warning.cwd-fallback":"工作目录不可用;已在主目录中恢复","workspace.warning.layout-fallback":"窗格布局无法完整恢复;已保留默认布局","workspace.warning.agent-warning":"Agent 未能自动续接;已恢复的 shell 仍可使用","workspace.warning.live-reconcile-failed":"实时工作区状态核对失败;请检查 handmux 日志","workspace.warning.workspace-unavailable":"工作区存储暂时不可用;请检查磁盘空间和权限","workspace.warning.restore-warning":"恢复时出现了可继续处理的提醒;请检查恢复结果"},fU={"terminal.transport_live":"即時","terminal.transport_snapshot":"快照","terminal.transport_detail_title":"終端傳輸狀態","terminal.transport_detail_configured":"設定模式","terminal.transport_detail_current":"目前模式","terminal.transport_detail_connection":"連線狀態","terminal.transport_detail_manual":"你已手動選擇快照拉取,不會自動切換。","terminal.transport_detail_live":"終端正在正常接收即時推送。","terminal.transport_detail_fallback":"即時推送不穩定,已自動降級為快照拉取。","terminal.transport_detail_unavailable":"即時通道無法建立,請檢查反向代理是否支援 WebSocket。","terminal.transport_detail_waiting":"正在等待連線穩定,隨後嘗試恢復即時推送。","terminal.transport_detail_retry":"預計 {seconds} 秒後嘗試恢復即時推送。","terminal.connection_connecting":"偵測中","terminal.connection_good":"良好","terminal.connection_degraded":"一般","terminal.connection_poor":"較差","settings.terminal_transport":"終端傳輸模式","settings.terminal_transport_live":"即時推送","settings.terminal_transport_snapshot":"快照拉取","settings.terminal_transport_hint":"即時推送使用 WebSocket;網路較差時會自動降級為快照拉取,持續穩定 30 秒後嘗試恢復即時推送。","settings.snapshot_interval":"活躍時更新頻率","settings.snapshot_interval_hint":"終端閒置後會自動降低頻率,減少流量和資源使用。","terminal.disconnected":"連線中斷,正在重新連線…","terminal.paneMissing":"窗格已關閉,請切換到其他窗格。","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":"完成","app.browser":"網頁預覽器","browser.openTabs":"開啟的網頁預覽器分頁","browser.history":"最近瀏覽","browser.closeTab":"關閉 {title}","browser.newTab":"新增分頁","browser.minimize":"收起","browser.back":"返回","browser.forward":"前進","browser.address":"網址","browser.addressPlaceholder":"輸入網址或連接埠","browser.addressOrDirectoryPlaceholder":"輸入網址,或選擇目錄","browser.refresh":"重新整理","browser.stop":"停止載入","browser.viewMode":"瀏覽檢視","browser.desktopView":"電腦檢視","browser.mobileView":"手機檢視","browser.closeTiming":"背景分頁自動關閉","browser.minutes":"{value} 分鐘","browser.neverClose":"永不關閉","browser.clearHistory":"清除","browser.emptyHistory":"尚無最近瀏覽","browser.loadFailed":"無法載入此網頁,請檢查網址後再試。","browser.retry":"重試","browser.consentTitle":"網頁預覽器","browser.consentBody":"Handmux 會將網頁嵌入目前視窗。它不是真正的瀏覽器,適合預覽開發服務、localhost、內網及允許嵌入的網站;也可從 Home 選擇電腦上的靜態目錄。","browser.consentComputer":"連線方式:手機直連使用手機網路。電腦代理的請求由電腦發出,可存取電腦所在的內網與 localhost,但不會將它們公開。","browser.consentPrivate":"登入狀態:直連與代理不共用 Cookie 和登入狀態;代理工作階段也依裝置隔離。","browser.consentLimits":"相容限制:手機直連可能被網站的 iframe 或 CSP 政策阻擋,而且 Handmux 未必能判斷原因。電腦代理會轉送並改寫網頁,也不保證與所有網站相容。需要完整瀏覽功能時,請用 Safari、Chrome 或系統瀏覽器開啟。","browser.consentIdle":"背景分頁:預設在 10 分鐘後關閉。直連網站的 Cookie 仍保留在手機瀏覽器中。","browser.about":"關於網頁預覽器","browser.acknowledge":"好的","browser.directMode":"手機直連","browser.proxyMode":"透過電腦代理","browser.directBadge":"直連","browser.proxyBadge":"代理","browser.staticBadge":"靜態","browser.chooseDirectory":"選擇目錄","browser.staticOpening":"正在開啟目錄…","browser.directoryPickerHint":"選擇包含網頁檔案的目錄。","browser.switchMode":"切換瀏覽模式","browser.menu":"網頁預覽器選單","browser.connectionMode":"連線方式","browser.pageView":"頁面檢視","browser.zoomPage":"縮放網頁","browser.resetZoom":"重設網頁縮放","browser.proxyLogin":"代理登入","browser.proxyLoginHelpLabel":"代理登入說明","browser.proxyLoginHelp":"是否將代理 Cookie 加密儲存在執行 Handmux 的電腦上,以便重新啟動後保持登入狀態。","browser.siteProxyCookie":"本站代理 Cookie","browser.siteCookieHelpLabel":"本站代理 Cookie 說明","browser.siteCookieHelp":"這裡只會清理目前裝置中符合本站真實網址的代理 Cookie。父網域 Cookie 可能讓相關內部網站一起登出,手機直接連線 Cookie 不受影響。","browser.openMode":"選擇開啟方式","browser.historyMore":"更多開啟方式","browser.historyActions":"更多操作","browser.proxyLimitHint":"電腦代理會轉送並改寫網頁,不保證與所有網站相容。","browser.proxyUnavailable":"請在電腦終端執行 handmux setup,選擇「網頁預覽器」設定代理網域;設定前只能使用手機直連。","browser.urlInvalid":"請輸入有效的 HTTP 或 HTTPS 位址。","browser.tryProxy":"改用電腦代理","browser.openExternal":"用系統瀏覽器開啟","browser.clearSiteLogin":"清理本站代理 Cookie","browser.clearAllLogin":"清理全部代理 Cookie","browser.clearSiteLoginConfirm":"清理目前裝置的本站代理登入狀態?父網域 Cookie 也可能影響相關內部系統。","browser.clearAllLoginConfirm":"清理目前裝置的全部代理登入狀態?手機直連登入不受影響。","browser.deleteHistoryEntry":"刪除此記錄","browser.profileSaveFailed":"無法儲存代理登入設定,請檢查伺服器連線後重試。","browser.profileClearFailed":"清理未完全成功,請檢查伺服器連線與儲存權限後重試。","browser.profileSyncFailed":"無法同步代理登入設定。請重試,或改用手機直連。","browser.profileRecoveryWarning":"無法復原已儲存的代理登入資料,目前裝置的代理登入狀態已重設。","browser.retention1":"1 天","browser.retention7":"7 天","browser.retention30":"30 天","browser.retentionNotSaved":"不儲存","browser.retentionNever":"長期儲存","settings.browserPersistLogin":"在電腦上持久儲存代理 Cookie","settings.browserPersistLoginHint":"只儲存在目前裝置。關閉後,目前分頁與登入狀態仍會保留,直到清理或到期。","settings.browserRetention":"代理登入保留","settings.browserDisablePersistConfirm":"停止儲存目前裝置後續的代理登入變更?目前分頁與登入狀態仍會保留。","token.title":"需要存取 Token","token.placeholder":"貼上 HANDMUX_TOKEN","settings.language":"語言 Language","settings.browserDefaultMode":"網頁預設開啟方式","settings.browserDefaultModeHint":"用於網址列新分頁,以及未儲存開啟方式的歷史記錄。","settings.browserEnabled":"網頁預覽器","settings.browserEnabledHint":"分頁僅屬於目前裝置。關閉後會關閉全部分頁,但保留歷史記錄。","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.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.input.enterDraft":"按 Shift + Enter 進入草稿模式","dock.input.exitDraft":"按 Esc 回到終端模式 · Shift + Enter 換行","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":"關閉失敗","resize.windowWidth":"視窗寬度","resize.paneWidth":"窗格寬度","resize.columns":"{n} 欄","resize.restore":"恢復","resize.restoreAutoWidth":"恢復自動寬度","resize.restoreRatio":"恢復分割比例","app.deleteLastWindowConfirm":"這是最後一個視窗,刪除將關閉整個工作階段!再點一次","app.deleteConfirm":"確認刪除?再點一次","app.cannotLocate":"無法定位","app.pickItsDir":",請選擇所在目錄:","app.noBoundSession":"尚未綁定工作階段","app.tapToBind":"點此綁定一個","app.selectSessionHint":"點擊左上角 ☰ 選擇工作階段","app.backToExit":"再按一次返回鍵結束","settings.title":"設定","settings.group_global":"全域設定","settings.group_general":"一般","settings.group_terminal":"終端機","settings.group_chat":"對話","settings.group_notifications":"通知","settings.group_about":"關於","settings.font_size":"字型大小","settings.font_decrease":"縮小字型","settings.font_increase":"放大字型","settings.font_auto":"自適應","settings.font_auto_title":"依高度自動調整","settings.keyboard_mode":"鍵盤模式","settings.keyboard_mode_auto":"自動識別","settings.keyboard_mode_mobile":"手機","settings.keyboard_mode_desktop":"電腦","settings.keyboard_mode_hint":"僅套用於目前瀏覽器;識別不準時可手動指定。","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.reload_app":"重新載入應用程式","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.notify_disable_title":"關閉推播通知?","settings.notify_disable_hint":"關閉後,這台裝置將不再收到「需要你」「已完成」或指令碼發送的推播。你可以隨時重新開啟。","settings.notify_disable_confirm":"關閉推播","settings.processing":"處理中","settings.push_hint":"監聽「需要你」和「已完成」:所關注工作階段需要授權/回答,或一輪剛完成時,推播到此裝置。","settings.push_unsupported":"推播需要 Chrome 或 Safari 瀏覽器","settings.preview_site":"預覽站台","settings.preview_static_site":"預覽靜態站台","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_off_hint":"未開啟預覽。選擇「靜態」開始。","settings.preview_off_hint_both":"未開啟預覽。選擇「靜態」或「動態」開始。","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.dir_picker_hint":"選擇要預覽的靜態站台目錄(含 index.html)","settings.err_port_not_listening":"該連接埠未在監聽,請確認服務已啟動","settings.err_bad_port":"連接埠不合法(1–65535)","settings.err_start_failed":"啟動失敗","localurl.title":"開啟網站","localurl.open":"在瀏覽器中開啟","localurl.notListening":"連接埠 :{port} 沒有服務在監聽。","localurl.badProtocol":"此連結不是可代理的 HTTP 或 HTTPS 位址。","localurl.network":"無法連線 handmux 服務,請檢查網路後重試。","localurl.failed":"無法開啟此網站,請檢查網址後再試。","filebrowser.openDirFailed":"無法開啟該目錄","filebrowser.copiedPath":"已複製路徑:{abs}","filebrowser.mkdirFailed":"建立目錄失敗(名稱不合法或已存在)","filebrowser.downloading":"下載 {name}","filebrowser.downloadFailed":"下載失敗","filebrowser.uploading":"上傳 {name}{tag}","filebrowser.uploadFailed":"上傳失敗","filebrowser.uploadPartialFailed":"以下檔案上傳失敗:{names}","filebrowser.sessionDir":"工作階段目錄","filebrowser.jumpToSessionDir":"跳到目前工作階段目錄","filebrowser.parentDir":"上層目錄","filebrowser.rootSelect":"切換根目錄(主目錄 / 暫存目錄)","filebrowser.pathPlaceholder":"輸入路徑(即時篩選/跳轉)","filebrowser.newFolder":"新增資料夾","filebrowser.createBtn":"建立","filebrowser.uploadFile":"上傳檔案","filebrowser.uploadToCurrentDir":"上傳到目前目錄","filebrowser.enterSubdirToUpload":"請進入一個子目錄上傳","filebrowser.folderNamePlaceholder":"資料夾名稱","filebrowser.uploadPendingTo":"將「{name}」上傳到目前目錄","filebrowser.enterSubdirFirst":"(請先進入一個子目錄)","filebrowser.upload":"上傳","filebrowser.savedToDownloads":"已儲存「{name}」到「下載」資料夾,可在系統檔案管理員查看","filebrowser.noMatches":"沒有符合的檔案或目錄","filebrowser.tooMany":"共 {total} 項,僅顯示前 {shown} 項——在路徑框輸入關鍵字可篩選","filebrowser.previewUnsupported":"暫不支援此類型檔案的預覽,點右側按鈕可下載","filebrowser.copyAbsPath":"複製絕對路徑","filebrowser.download":"下載","filebrowser.pickThisDir":"選定此目錄 {path}","filebrowser.downloadConfirm":"下載 {name}?","filemanager.files":"檔案","filemanager.closeTab":"關閉標籤","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"目錄","git.errReadRepo":"無法讀取儲存庫","git.errLoad":"載入失敗","git.noRepoInDir":"這個目錄還不是 git 儲存庫 —— 換一個目錄,或在這裡 git init 一下。","git.outsideRoots":"這個目錄在 handmux 可存取範圍之外 —— 只開放主目錄和 /tmp。把儲存庫放到主目錄下,就能在這裡檢視了。","git.errReadDir":"無法讀取該目錄","git.commitDetail":"提交詳情","git.diff":"差異","git.bindRepo":"綁定儲存庫","git.collapse":"收起","git.currentBranch":"目前分支","git.switchViewedBranch":"切換查看的分支","git.switchBranch":"切換分支","git.noBranches":"目前沒有分支","git.noRepoBound":"未綁定儲存庫,點左上角「+」選擇一個目錄。","git.changes":"變更","git.commits":"提交","git.pullToLoadMore":"下拉載入更多","git.pickerHint":"選擇一個目錄,自動尋找其中的 git 儲存庫","git.cleanTree":"工作區乾淨","git.noCommits":"目前沒有提交","git.noDiff":"無差異","git.fontSmaller":"縮小字型","git.fontLarger":"放大字型","git.diffTruncated":"diff 過大,已截斷","cmd.panel":"命令面板","cmd.title":"命令","cmd.empty":"還沒有命令,傳送一條或儲存常用","cmd.favorites":"常用","cmd.scopeGlobal":"全域 · 所有工作階段","cmd.recent":"最近","cmd.scopeSession":"僅本工作階段","cmd.favorite":"收藏","cmd.unfavorite":"取消收藏","doc.home":"最近","doc.read":"朗讀","doc.pauseRead":"暫停朗讀","doc.resumeRead":"繼續朗讀","doc.stopRead":"停止朗讀","doc.rate":"語速","doc.fontSmaller":"縮小字型","doc.fontLarger":"放大字型","inbox.view.working":"進行中","inbox.view.done":"已完成","inbox.view.needs":"需要你","push.unsupported":"推播通知需要 Chrome 或 Safari 瀏覽器","push.iosAddToHome":"iOS 需先將本站「加入主畫面」,從主畫面圖示開啟後再開啟","a2hs.title":"將 handmux 加入主畫面","a2hs.lead":"像 App 一樣開啟——全螢幕、沒有網址列。在 iPhone 上,pane 需要你時的推播也靠它送達。","a2hs.install":"安裝 handmux","a2hs.ios1":"點 Safari 的分享按鈕(⬆︎ 方框)。","a2hs.ios2":"點「更多」,或向下滑動清單。","a2hs.ios3":"選「加入主畫面」,再點「加入」。","a2hs.iosHint":"Safari 裡:分享 → 更多 → 加入主畫面。","a2hs.iosOpenSafari":"目前不是 Safari。請在 Safari 開啟本頁再加入主畫面——其他 iOS 瀏覽器無法安裝。","a2hs.androidManual":"開啟瀏覽器選單(⋮),選「加入主畫面」或「安裝應用程式」。","a2hs.later":"稍後再說","push.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":"不明原因","workspace.bootDetected":"偵測到電腦已重新啟動","workspace.tmuxDetected":"偵測到 tmux 已重新啟動","workspace.summary":"上次工作區 · {sessions} 個工作階段 · 儲存於 {time}","workspace.restoreLast":"還原上次工作區","workspace.partialCard":"仍有 {failures} 個工作階段需要處理","workspace.unknownTime":"未知時間","workspace.savedAt":"儲存於 {time}","workspace.topologySummary":"{sessions} 個工作階段 · {windows} 個視窗 · {panes} 個窗格","workspace.planSummary":"將還原 {restore} 個工作階段;{already} 個已存在","workspace.renameRule":"僅當目前已有同名工作階段時,還原名稱才會加上 -restored 後綴。","workspace.nonDestructive":"目前的工作階段不會被修改、重新命名或停止。","workspace.progress":"正在還原 {completed} / {total}…","workspace.progressDone":"已還原 {completed} / {total}","workspace.complete":"工作區已還原。","workspace.completedSummary":"本次還原:{sessions} 個工作階段 · {windows} 個視窗 · {panes} 個窗格","workspace.rebindHint":"還原的工作階段不會自動顯示;可重新選擇要綁定到這台手機的工作階段。","workspace.rebind":"重新綁定工作階段","workspace.sessionFailure":"{session}:{reason}","workspace.unknownSession":"未知工作階段","workspace.restore":"還原","workspace.ignore":"忽略此備份","workspace.protectionTitle":"工作區未受保護","workspace.protection.live-corrupt":"工作區狀態副本已損壞;請檢查磁碟與 ~/.handmux 權限,然後重新啟動 handmux。","workspace.protection.live-unavailable":"無法讀寫工作區狀態;請檢查磁碟空間與 ~/.handmux 權限,然後重新啟動 handmux。","workspace.protection.unknown":"背景快照暫時無法使用;請檢查電腦上的 handmux 日誌。","workspace.error.restore-interrupted":"還原已中斷;請重試此備份","workspace.error.checkpoint-not-found":"此備份已無法使用;請重新整理後選擇其他備份","workspace.error.storage-full":"工作區儲存空間不足;請釋放磁碟空間後重試","workspace.error.permission-denied":"無法寫入工作區儲存;請檢查權限後重試","workspace.error.plan-failed":"還原計畫已變更;請重新整理後重試","workspace.error.agent-unavailable":"Agent 無法續接;請開啟已還原的 shell 後手動重試","workspace.error.tmux-unavailable":"tmux 無法使用;請確認 tmux 已執行後重試","workspace.error.restore-failed":"工作階段未還原;請檢查 handmux 日誌後重試","workspace.error.operation-not-found":"此還原任務已無法使用;請重新還原此備份","workspace.sessionWarning":"{session}:{reason}","workspace.warning.cwd-fallback":"工作目錄無法使用;已在主目錄中還原","workspace.warning.layout-fallback":"窗格配置無法完整還原;已保留預設配置","workspace.warning.agent-warning":"Agent 未能自動續接;已還原的 shell 仍可使用","workspace.warning.live-reconcile-failed":"即時工作區狀態核對失敗;請檢查 handmux 日誌","workspace.warning.workspace-unavailable":"工作區儲存暫時無法使用;請檢查磁碟空間和權限","workspace.warning.restore-warning":"還原時出現可繼續處理的提醒;請檢查還原結果"},pU={"terminal.transport_live":"リアル","terminal.transport_snapshot":"スナップ","terminal.transport_detail_title":"ターミナル配信状態","terminal.transport_detail_configured":"設定モード","terminal.transport_detail_current":"現在のモード","terminal.transport_detail_connection":"接続状態","terminal.transport_detail_manual":"スナップショット取得が手動で選択されているため、自動では切り替わりません。","terminal.transport_detail_live":"ターミナルはリアルタイム配信を正常に受信しています。","terminal.transport_detail_fallback":"リアルタイム配信が不安定なため、スナップショット取得へ切り替えました。","terminal.transport_detail_unavailable":"リアルタイム接続を確立できません。リバースプロキシが WebSocket に対応しているか確認してください。","terminal.transport_detail_waiting":"接続が安定してからリアルタイム配信への復帰を試みます。","terminal.transport_detail_retry":"約 {seconds} 秒後にリアルタイム配信への復帰を試みます。","terminal.connection_connecting":"確認中","terminal.connection_good":"良好","terminal.connection_degraded":"普通","terminal.connection_poor":"不良","settings.terminal_transport":"ターミナル配信モード","settings.terminal_transport_live":"リアルタイム配信","settings.terminal_transport_snapshot":"スナップショット取得","settings.terminal_transport_hint":"リアルタイム配信は WebSocket を使用し、回線が不安定な場合はスナップショット取得へ切り替わり、30 秒安定すると復帰を試みます。","settings.snapshot_interval":"操作中の更新間隔","settings.snapshot_interval_hint":"ターミナルがアイドル状態になると更新頻度を下げ、通信量とリソースを節約します。","terminal.disconnected":"接続が切れました。再接続しています…","terminal.paneMissing":"このペインは閉じられました。別のペインに切り替えてください。","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":"完了","app.browser":"ウェブプレビュー","browser.openTabs":"開いているウェブプレビュータブ","browser.history":"最近の閲覧","browser.closeTab":"{title} を閉じる","browser.newTab":"新しいタブ","browser.minimize":"最小化","browser.back":"戻る","browser.forward":"進む","browser.address":"アドレス","browser.addressPlaceholder":"URL またはポートを入力","browser.addressOrDirectoryPlaceholder":"URL を入力、またはフォルダを選択","browser.refresh":"更新","browser.stop":"読み込みを停止","browser.viewMode":"表示モード","browser.desktopView":"PC 表示","browser.mobileView":"モバイル表示","browser.closeTiming":"バックグラウンドタブを閉じる","browser.minutes":"{value} 分","browser.neverClose":"閉じない","browser.clearHistory":"消去","browser.emptyHistory":"最近の閲覧はまだありません","browser.loadFailed":"ページを読み込めません。アドレスを確認して再試行してください。","browser.retry":"再試行","browser.consentTitle":"ウェブプレビュー","browser.consentBody":"Handmux はこのウィンドウ内にページを埋め込みます。完全なブラウザではなく、開発サーバー、localhost、社内ネットワーク、埋め込みを許可するサイトの確認に適しています。Home からパソコン上の静的フォルダも選べます。","browser.consentComputer":"直接接続はスマホの回線を使います。プロキシ接続はパソコンから送信され、公開せずに社内ネットワークや localhost にアクセスできます。","browser.consentPrivate":"直接接続とプロキシでは Cookie とログイン状態が分かれ、プロキシセッションはこのデバイスごとに分離されます。","browser.consentLimits":"直接接続はサイトの iframe または CSP ポリシーでブロックされ、Handmux が原因を判別できない場合があります。PC プロキシはページを転送・書き換えますが、すべてのサイトとの互換性は保証しません。完全な閲覧機能が必要な場合は Safari、Chrome、またはシステムブラウザで開いてください。","browser.consentIdle":"バックグラウンドタブは既定で10分後に閉じます。直接接続したサイトの Cookie はスマホのブラウザに残ります。","browser.about":"ウェブプレビューについて","browser.acknowledge":"了解","browser.directMode":"スマホから直接","browser.proxyMode":"PC プロキシ経由","browser.directBadge":"直接","browser.proxyBadge":"プロキシ","browser.staticBadge":"静的","browser.chooseDirectory":"フォルダを選択","browser.staticOpening":"フォルダを開いています…","browser.directoryPickerHint":"Web ファイルを含むフォルダを選択してください。","browser.switchMode":"閲覧モードを切り替え","browser.menu":"ウェブプレビューメニュー","browser.connectionMode":"接続方法","browser.pageView":"ページ表示","browser.zoomPage":"ページを拡大・縮小","browser.resetZoom":"ページのズームをリセット","browser.proxyLogin":"プロキシログイン","browser.proxyLoginHelpLabel":"プロキシログインについて","browser.proxyLoginHelp":"再起動後もログイン状態を維持できるよう、Handmux を実行しているコンピュータにプロキシ Cookie を暗号化して保存するかどうか。","browser.siteProxyCookie":"このサイトのプロキシ Cookie","browser.siteCookieHelpLabel":"このサイトのプロキシ Cookie について","browser.siteCookieHelp":"この端末でサイトの実 URL に一致するプロキシ Cookie のみを消去します。親ドメイン Cookie により関連する社内サイトからもログアウトする場合があります。直接接続の Cookie には影響しません。","browser.openMode":"開き方を選択","browser.historyMore":"その他の開き方","browser.historyActions":"その他の操作","browser.proxyLimitHint":"PC プロキシはページを転送・書き換えるため、すべてのサイトとの互換性は保証しません。","browser.proxyUnavailable":"パソコンのターミナルで handmux setup を実行し、「ウェブプレビュー」でプロキシドメインを設定してください。設定するまではスマホからの直接接続のみ利用できます。","browser.urlInvalid":"有効な HTTP または HTTPS アドレスを入力してください。","browser.tryProxy":"PC プロキシを試す","browser.openExternal":"システムブラウザで開く","browser.clearSiteLogin":"このサイトのプロキシ Cookie を消去","browser.clearAllLogin":"プロキシ Cookie をすべて消去","browser.clearSiteLoginConfirm":"現在の端末でこのサイトのプロキシログインを消去しますか?親ドメインの Cookie により関連する社内システムにも影響する場合があります。","browser.clearAllLoginConfirm":"現在の端末のプロキシログインをすべて消去しますか?スマホ直接接続のログインには影響しません。","browser.deleteHistoryEntry":"この項目を削除","browser.profileSaveFailed":"プロキシログイン設定を保存できません。サーバー接続を確認して再試行してください。","browser.profileClearFailed":"クリーンアップが完全には成功しませんでした。サーバー接続と保存権限を確認して、もう一度お試しください。","browser.profileSyncFailed":"プロキシログイン設定を同期できません。再試行するか、直接接続を使用してください。","browser.profileRecoveryWarning":"保存済みプロキシログインを復元できず、この端末の状態をリセットしました。","browser.retention1":"1 日","browser.retention7":"7 日","browser.retention30":"30 日","browser.retentionNotSaved":"保存しない","browser.retentionNever":"長期保存","settings.browserPersistLogin":"プロキシ Cookie をコンピュータに永続保存","settings.browserPersistLoginHint":"現在の端末だけに保存します。オフにしても、消去または期限切れまで現在のタブとログイン状態は残ります。","settings.browserRetention":"プロキシログイン保持期間","settings.browserDisablePersistConfirm":"現在の端末で今後のプロキシログイン変更の保存を停止しますか?現在のタブとログイン状態は残ります。","token.title":"アクセストークンが必要です","token.placeholder":"HANDMUX_TOKEN を貼り付け","settings.language":"言語 Language","settings.browserDefaultMode":"ウェブの既定モード","settings.browserDefaultModeHint":"アドレスバーから開く新しいタブと、保存済みモードがない履歴に使用します。","settings.browserEnabled":"ウェブプレビュー","settings.browserEnabledHint":"タブはこの端末専用です。オフにすると全タブを閉じますが、履歴は残ります。","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.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.input.enterDraft":"Shift + Enter で下書きモードへ","dock.input.exitDraft":"Esc でターミナルモードへ戻る · Shift + Enter で改行","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":"閉じる操作に失敗しました","resize.windowWidth":"ウィンドウ幅","resize.paneWidth":"ペイン幅","resize.columns":"{n} 列","resize.restore":"復元","resize.restoreAutoWidth":"自動幅に戻す","resize.restoreRatio":"分割比率を復元","app.deleteLastWindowConfirm":"これは最後のウィンドウです。削除するとセッション全体が閉じます!もう一度タップ","app.deleteConfirm":"削除しますか?もう一度タップ","app.cannotLocate":"場所を特定できません","app.pickItsDir":"。ディレクトリを選択してください:","app.noBoundSession":"セッションが紐付けられていません","app.tapToBind":"タップして紐付け","app.selectSessionHint":"左上の ☰ をタップしてセッションを選択","app.backToExit":"もう一度戻るで終了します","settings.title":"設定","settings.group_global":"グローバル設定","settings.group_general":"一般","settings.group_terminal":"ターミナル","settings.group_chat":"チャット","settings.group_notifications":"通知","settings.group_about":"情報","settings.font_size":"フォントサイズ","settings.font_decrease":"フォントを縮小","settings.font_increase":"フォントを拡大","settings.font_auto":"自動調整","settings.font_auto_title":"高さに合わせて自動調整","settings.keyboard_mode":"キーボードモード","settings.keyboard_mode_auto":"自動判定","settings.keyboard_mode_mobile":"モバイル","settings.keyboard_mode_desktop":"デスクトップ","settings.keyboard_mode_hint":"このブラウザだけに適用されます。判定が違う場合は手動で選択できます。","settings.path_highlight":"ファイルパスをハイライト","settings.path_highlight_hint":"ターミナル内のタップ可能なファイルパスに色を付けます。オフでもパスはタップできます。","settings.whats_new":"新機能","settings.view_changelog":"変更履歴を表示","settings.reload_app":"アプリを再読み込み","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.notify_disable_title":"プッシュ通知をオフにしますか?","settings.notify_disable_hint":"このデバイスには「要対応」「完了」およびスクリプトからのプッシュ通知が届かなくなります。いつでも再度オンにできます。","settings.notify_disable_confirm":"オフにする","settings.processing":"処理中","settings.push_hint":"「要対応」と「完了」を監視:注目しているセッションが承認/回答を必要としているとき、またはラウンドが完了したときにこのデバイスへ通知します。","settings.push_unsupported":"プッシュ通知には Chrome または Safari が必要です","settings.preview_site":"プレビューサイト","settings.preview_static_site":"静的サイトをプレビュー","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_off_hint":"プレビューは無効です。「静的」を選択して開始してください。","settings.preview_off_hint_both":"プレビューは無効です。「静的」または「ダイナミック」を選択して開始してください。","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.dir_picker_hint":"プレビューする静的サイトのディレクトリを選択(index.html を含む)","settings.err_port_not_listening":"そのポートはリッスンしていません。サービスが起動しているか確認してください","settings.err_bad_port":"ポート番号が無効です(1〜65535)","settings.err_start_failed":"起動に失敗しました","localurl.title":"Web サイトを開く","localurl.open":"ブラウザで開く","localurl.notListening":"ポート :{port} で待ち受けているサービスがありません。","localurl.badProtocol":"このリンクはプロキシ可能な HTTP または HTTPS アドレスではありません。","localurl.network":"handmux サービスに接続できません。ネットワークを確認して再試行してください。","localurl.failed":"Web サイトを開けません。アドレスを確認して再試行してください。","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} 分","workspace.bootDetected":"コンピュータの再起動を検出しました","workspace.tmuxDetected":"tmux の再起動を検出しました","workspace.summary":"前回のワークスペース · {sessions} セッション · {time} に保存","workspace.restoreLast":"前回のワークスペースを復元","workspace.partialCard":"残り {failures} セッションの確認が必要です","workspace.unknownTime":"時刻不明","workspace.savedAt":"{time} に保存","workspace.topologySummary":"{sessions} セッション · {windows} ウィンドウ · {panes} ペイン","workspace.planSummary":"{restore} セッションを復元;{already} セッションは既に存在します","workspace.renameRule":"同名のセッションが現在存在する場合にのみ、復元名に -restored が付きます。","workspace.nonDestructive":"現在のセッションは変更、名前変更、停止されません。","workspace.progress":"復元中 {completed} / {total}…","workspace.progressDone":"復元済み {completed} / {total}","workspace.complete":"ワークスペースを復元しました。","workspace.completedSummary":"今回の復元:{sessions} セッション · {windows} ウィンドウ · {panes} ペイン","workspace.rebindHint":"復元したセッションは自動表示されません。この端末にバインドするセッションを選択できます。","workspace.rebind":"セッションを再バインド","workspace.sessionFailure":"{session}:{reason}","workspace.unknownSession":"不明なセッション","workspace.restore":"復元","workspace.ignore":"このバックアップを無視","workspace.protectionTitle":"ワークスペースは保護されていません","workspace.protection.live-corrupt":"ワークスペース状態のコピーが破損しています。ディスクと ~/.handmux の権限を確認し、handmux を再起動してください。","workspace.protection.live-unavailable":"ワークスペース状態を読み書きできません。空き容量と ~/.handmux の権限を確認し、handmux を再起動してください。","workspace.protection.unknown":"バックグラウンドスナップショットを利用できません。コンピュータの handmux ログを確認してください。","workspace.error.restore-interrupted":"復元が中断されました;このバックアップを再試行してください","workspace.error.checkpoint-not-found":"このバックアップは利用できません;更新して別のバックアップを選んでください","workspace.error.storage-full":"ストレージの空きがありません;空き容量を増やして再試行してください","workspace.error.permission-denied":"ワークスペースを書き込めません;権限を確認して再試行してください","workspace.error.plan-failed":"復元計画が変わりました;更新して再試行してください","workspace.error.agent-unavailable":"Agent を再開できません;復元した shell を開いて手動で再試行してください","workspace.error.tmux-unavailable":"tmux を利用できません;tmux が起動中か確認して再試行してください","workspace.error.restore-failed":"セッションを復元できませんでした;handmux ログを確認して再試行してください","workspace.error.operation-not-found":"この復元処理は利用できません。バックアップの復元をやり直してください","workspace.sessionWarning":"{session}:{reason}","workspace.warning.cwd-fallback":"作業ディレクトリを使用できなかったため、ホームディレクトリに復元しました","workspace.warning.layout-fallback":"ペイン配置を完全に復元できなかったため、既定の配置を維持しました","workspace.warning.agent-warning":"Agent を自動再開できませんでした。復元したシェルは利用できます","workspace.warning.live-reconcile-failed":"現在のワークスペース状態を照合できませんでした。handmux ログを確認してください","workspace.warning.workspace-unavailable":"ワークスペースストレージを一時的に利用できません。空き容量と権限を確認してください","workspace.warning.restore-warning":"復元は完了しましたが、確認が必要な警告があります"},vU={"terminal.transport_live":"실시간","terminal.transport_snapshot":"스냅샷","terminal.transport_detail_title":"터미널 전송 상태","terminal.transport_detail_configured":"설정 모드","terminal.transport_detail_current":"현재 모드","terminal.transport_detail_connection":"연결 상태","terminal.transport_detail_manual":"스냅샷 가져오기를 직접 선택했으므로 자동으로 전환되지 않습니다.","terminal.transport_detail_live":"터미널이 실시간 푸시를 정상적으로 받고 있습니다.","terminal.transport_detail_fallback":"실시간 푸시가 불안정하여 스냅샷 가져오기로 전환했습니다.","terminal.transport_detail_unavailable":"실시간 연결을 설정할 수 없습니다. 리버스 프록시가 WebSocket을 지원하는지 확인하세요.","terminal.transport_detail_waiting":"연결이 안정되면 실시간 푸시 복귀를 시도합니다.","terminal.transport_detail_retry":"약 {seconds}초 후 실시간 푸시 복귀를 시도합니다.","terminal.connection_connecting":"확인 중","terminal.connection_good":"양호","terminal.connection_degraded":"보통","terminal.connection_poor":"나쁨","settings.terminal_transport":"터미널 전송 모드","settings.terminal_transport_live":"실시간 푸시","settings.terminal_transport_snapshot":"스냅샷 가져오기","settings.terminal_transport_hint":"실시간 푸시는 WebSocket을 사용하며, 네트워크가 불안정하면 스냅샷 가져오기로 전환되고 30초 동안 안정되면 복귀를 시도합니다.","settings.snapshot_interval":"활성 상태 업데이트 간격","settings.snapshot_interval_hint":"터미널이 유휴 상태가 되면 트래픽과 리소스 사용을 줄이기 위해 업데이트 빈도를 낮춥니다.","terminal.disconnected":"연결이 끊겼습니다. 다시 연결하는 중…","terminal.paneMissing":"이 창이 닫혔습니다. 다른 창으로 전환하세요.","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":"완료","app.browser":"웹 미리보기","browser.openTabs":"열린 웹 미리보기 탭","browser.history":"최근 방문","browser.closeTab":"{title} 닫기","browser.newTab":"새 탭","browser.minimize":"최소화","browser.back":"뒤로","browser.forward":"앞으로","browser.address":"주소","browser.addressPlaceholder":"URL 또는 포트 입력","browser.addressOrDirectoryPlaceholder":"URL을 입력하거나 폴더 선택","browser.refresh":"새로고침","browser.stop":"로딩 중지","browser.viewMode":"보기 모드","browser.desktopView":"데스크톱 보기","browser.mobileView":"모바일 보기","browser.closeTiming":"백그라운드 탭 자동 닫기","browser.minutes":"{value}분","browser.neverClose":"닫지 않음","browser.clearHistory":"지우기","browser.emptyHistory":"최근 방문이 없습니다","browser.loadFailed":"페이지를 불러올 수 없습니다. 주소를 확인하고 다시 시도하세요.","browser.retry":"다시 시도","browser.consentTitle":"웹 미리보기","browser.consentBody":"Handmux는 이 창 안에 페이지를 삽입합니다. 완전한 브라우저가 아니며 개발 서버, localhost, 내부망 및 삽입을 허용하는 사이트를 확인하는 데 적합합니다. Home에서 컴퓨터의 정적 폴더도 선택할 수 있습니다.","browser.consentComputer":"직접 연결은 휴대폰 네트워크를 사용합니다. 프록시 요청은 컴퓨터에서 전송되어 내부망과 localhost를 공개하지 않고 접근할 수 있습니다.","browser.consentPrivate":"직접 연결과 프록시는 Cookie와 로그인 상태를 공유하지 않으며, 프록시 세션은 이 기기별로 분리됩니다.","browser.consentLimits":"휴대폰 직접 연결은 사이트의 iframe 또는 CSP 정책에 의해 차단될 수 있고 Handmux가 원인을 판단하지 못할 수 있습니다. 컴퓨터 프록시는 페이지를 전달하고 다시 작성하지만 모든 사이트와의 호환성을 보장하지 않습니다. 완전한 탐색 기능이 필요하면 Safari, Chrome 또는 시스템 브라우저에서 여세요.","browser.consentIdle":"백그라운드 탭은 기본 10분 후 닫힙니다. 직접 연결한 사이트의 Cookie는 휴대폰 브라우저에 남습니다.","browser.about":"웹 미리보기 정보","browser.acknowledge":"알겠습니다","browser.directMode":"휴대폰에서 직접","browser.proxyMode":"컴퓨터 프록시 경유","browser.directBadge":"직접","browser.proxyBadge":"프록시","browser.staticBadge":"정적","browser.chooseDirectory":"폴더 선택","browser.staticOpening":"폴더 여는 중…","browser.directoryPickerHint":"웹 파일이 들어 있는 폴더를 선택하세요.","browser.switchMode":"탐색 모드 전환","browser.menu":"웹 미리보기 메뉴","browser.connectionMode":"연결 방식","browser.pageView":"페이지 보기","browser.zoomPage":"웹페이지 확대/축소","browser.resetZoom":"웹페이지 확대/축소 재설정","browser.proxyLogin":"프록시 로그인","browser.proxyLoginHelpLabel":"프록시 로그인 정보","browser.proxyLoginHelp":"재시작 후에도 로그인 상태를 유지할 수 있도록 Handmux를 실행하는 컴퓨터에 프록시 Cookie를 암호화해 저장할지 여부입니다.","browser.siteProxyCookie":"이 사이트의 프록시 Cookie","browser.siteCookieHelpLabel":"이 사이트의 프록시 Cookie 정보","browser.siteCookieHelp":"현재 기기에서 사이트의 실제 URL과 일치하는 프록시 Cookie만 정리합니다. 상위 도메인 Cookie로 인해 관련 내부 사이트에서도 로그아웃될 수 있습니다. 직접 연결 Cookie는 영향을 받지 않습니다.","browser.openMode":"열기 방식 선택","browser.historyMore":"더 많은 열기 옵션","browser.historyActions":"추가 작업","browser.proxyLimitHint":"컴퓨터 프록시는 페이지를 전달하고 다시 작성하므로 모든 사이트와의 호환성을 보장하지 않습니다.","browser.proxyUnavailable":"컴퓨터 터미널에서 handmux setup을 실행하고 “웹 미리보기”에서 프록시 도메인을 설정하세요. 설정 전에는 휴대폰 직접 연결만 사용할 수 있습니다.","browser.urlInvalid":"유효한 HTTP 또는 HTTPS 주소를 입력하세요.","browser.tryProxy":"컴퓨터 프록시 사용","browser.openExternal":"시스템 브라우저에서 열기","browser.clearSiteLogin":"이 사이트의 프록시 Cookie 정리","browser.clearAllLogin":"모든 프록시 Cookie 정리","browser.clearSiteLoginConfirm":"현재 기기에서 이 사이트의 프록시 로그인을 정리할까요? 상위 도메인 Cookie로 인해 관련 내부 시스템에도 영향을 줄 수 있습니다.","browser.clearAllLoginConfirm":"현재 기기의 프록시 로그인을 모두 정리할까요? 휴대폰 직접 연결 로그인에는 영향이 없습니다.","browser.deleteHistoryEntry":"이 기록 삭제","browser.profileSaveFailed":"프록시 로그인 설정을 저장하지 못했습니다. 서버 연결을 확인하고 다시 시도하세요.","browser.profileClearFailed":"정리가 완전히 완료되지 않았습니다. 서버 연결과 저장 권한을 확인한 후 다시 시도하세요.","browser.profileSyncFailed":"프록시 로그인 설정을 동기화하지 못했습니다. 다시 시도하거나 직접 연결을 사용하세요.","browser.profileRecoveryWarning":"저장된 프록시 로그인을 복구하지 못해 현재 기기의 상태를 초기화했습니다.","browser.retention1":"1일","browser.retention7":"7일","browser.retention30":"30일","browser.retentionNotSaved":"저장 안 함","browser.retentionNever":"장기 저장","settings.browserPersistLogin":"컴퓨터에 프록시 Cookie 영구 저장","settings.browserPersistLoginHint":"현재 기기에만 저장됩니다. 꺼도 정리하거나 만료될 때까지 현재 탭과 로그인 상태는 유지됩니다.","settings.browserRetention":"프록시 로그인 보관 기간","settings.browserDisablePersistConfirm":"현재 기기에서 이후 프록시 로그인 변경 저장을 중지할까요? 현재 탭과 로그인 상태는 유지됩니다.","token.title":"액세스 토큰이 필요합니다","token.placeholder":"HANDMUX_TOKEN 붙여넣기","settings.language":"언어 Language","settings.browserDefaultMode":"기본 웹 모드","settings.browserDefaultModeHint":"주소 표시줄에서 여는 새 탭과 저장된 모드가 없는 방문 기록에 사용됩니다.","settings.browserEnabled":"웹 미리보기","settings.browserEnabledHint":"탭은 이 기기에만 속합니다. 끄면 모든 탭을 닫지만 방문 기록은 유지합니다.","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.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.input.enterDraft":"Shift + Enter로 초안 모드 열기","dock.input.exitDraft":"Esc로 터미널 모드 돌아가기 · Shift + Enter로 줄바꿈","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":"닫기 실패","resize.windowWidth":"창 너비","resize.paneWidth":"패널 너비","resize.columns":"{n}열","resize.restore":"복원","resize.restoreAutoWidth":"자동 너비 복원","resize.restoreRatio":"분할 비율 복원","app.deleteLastWindowConfirm":"마지막 창입니다. 삭제하면 전체 세션이 닫힙니다!한 번 더 탭하세요","app.deleteConfirm":"삭제하시겠습니까? 한 번 더 탭하세요","app.cannotLocate":"위치를 찾을 수 없습니다","app.pickItsDir":",디렉토리를 선택하세요:","app.noBoundSession":"연결된 세션이 없습니다","app.tapToBind":"탭하여 연결","app.selectSessionHint":"왼쪽 상단의 ☰ 를 탭하여 세션 선택","app.backToExit":"한 번 더 뒤로가기를 누르면 종료됩니다","settings.title":"설정","settings.group_global":"전체 설정","settings.group_general":"일반","settings.group_terminal":"터미널","settings.group_chat":"대화","settings.group_notifications":"알림","settings.group_about":"정보","settings.font_size":"글꼴 크기","settings.font_decrease":"글꼴 축소","settings.font_increase":"글꼴 확대","settings.font_auto":"자동 조정","settings.font_auto_title":"높이에 맞게 자동 조정","settings.keyboard_mode":"키보드 모드","settings.keyboard_mode_auto":"자동 감지","settings.keyboard_mode_mobile":"모바일","settings.keyboard_mode_desktop":"데스크톱","settings.keyboard_mode_hint":"현재 브라우저에만 적용됩니다. 감지가 틀리면 직접 선택하세요.","settings.path_highlight":"파일 경로 강조","settings.path_highlight_hint":"터미널에서 탭 가능한 파일 경로에 색을 입힙니다. 꺼져 있어도 경로는 탭할 수 있습니다.","settings.whats_new":"새 기능","settings.view_changelog":"변경 내역 보기","settings.reload_app":"앱 새로고침","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.notify_disable_title":"푸시 알림을 끌까요?","settings.notify_disable_hint":"이 기기에서 더 이상 「확인 필요」, 「완료」 및 스크립트 푸시 알림을 받지 않습니다. 언제든 다시 켤 수 있습니다.","settings.notify_disable_confirm":"푸시 끄기","settings.processing":"처리 중","settings.push_hint":"「확인 필요」및「완료」를 모니터링:관심 세션에서 승인/응답이 필요하거나 한 라운드가 완료되면 이 기기로 알림을 보냅니다.","settings.push_unsupported":"푸시 알림은 Chrome 또는 Safari가 필요합니다","settings.preview_site":"미리보기 사이트","settings.preview_static_site":"정적 사이트 미리보기","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_off_hint":"미리보기가 비활성화되어 있습니다. 「정적」을 선택하여 시작하세요.","settings.preview_off_hint_both":"미리보기가 비활성화되어 있습니다. 「정적」또는「동적」을 선택하여 시작하세요.","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.dir_picker_hint":"미리볼 정적 사이트 디렉토리 선택(index.html 포함)","settings.err_port_not_listening":"해당 포트가 수신 대기 중이지 않습니다. 서비스가 시작되었는지 확인하세요","settings.err_bad_port":"포트 번호가 유효하지 않습니다(1–65535)","settings.err_start_failed":"시작에 실패했습니다","localurl.title":"웹사이트 열기","localurl.open":"브라우저에서 열기","localurl.notListening":"포트 :{port}에서 수신 중인 서비스가 없습니다.","localurl.badProtocol":"이 링크는 프록시할 수 있는 HTTP 또는 HTTPS 주소가 아닙니다.","localurl.network":"handmux 서비스에 연결할 수 없습니다. 네트워크를 확인한 후 다시 시도하세요.","localurl.failed":"웹사이트를 열 수 없습니다. 주소를 확인하고 다시 시도하세요.","filebrowser.openDirFailed":"디렉토리를 열 수 없습니다","filebrowser.copiedPath":"경로가 복사되었습니다:{abs}","filebrowser.mkdirFailed":"디렉토리 생성에 실패했습니다(이름이 유효하지 않거나 이미 존재합니다)","filebrowser.downloading":"{name} 다운로드 중","filebrowser.downloadFailed":"다운로드에 실패했습니다","filebrowser.uploading":"{name}{tag} 업로드 중","filebrowser.uploadFailed":"업로드에 실패했습니다","filebrowser.uploadPartialFailed":"다음 파일 업로드에 실패했습니다:{names}","filebrowser.sessionDir":"세션 디렉토리","filebrowser.jumpToSessionDir":"현재 세션 디렉토리로 이동","filebrowser.parentDir":"상위 디렉토리","filebrowser.rootSelect":"루트 디렉토리 전환(홈 / 임시)","filebrowser.pathPlaceholder":"경로 입력(실시간 필터 / 이동)","filebrowser.newFolder":"새 폴더","filebrowser.createBtn":"생성","filebrowser.uploadFile":"파일 업로드","filebrowser.uploadToCurrentDir":"현재 디렉토리에 업로드","filebrowser.enterSubdirToUpload":"하위 디렉토리로 이동한 후 업로드하세요","filebrowser.folderNamePlaceholder":"폴더 이름","filebrowser.uploadPendingTo":"「{name}」을 현재 디렉토리에 업로드","filebrowser.enterSubdirFirst":"(먼저 하위 디렉토리로 이동하세요)","filebrowser.upload":"업로드","filebrowser.savedToDownloads":"「{name}」이 「다운로드」 폴더에 저장되었습니다. 파일 관리자에서 확인할 수 있습니다","filebrowser.noMatches":"일치하는 파일 또는 디렉토리가 없습니다","filebrowser.tooMany":"총 {total}개, 처음 {shown}개만 표시——경로 입력창에 키워드를 입력하여 필터할 수 있습니다","filebrowser.previewUnsupported":"이 파일 유형의 미리보기는 지원되지 않습니다. 오른쪽 버튼으로 다운로드할 수 있습니다","filebrowser.copyAbsPath":"절대 경로 복사","filebrowser.download":"다운로드","filebrowser.pickThisDir":"이 디렉토리 선택 {path}","filebrowser.downloadConfirm":"{name}을 다운로드하시겠습니까?","filemanager.files":"파일","filemanager.closeTab":"탭 닫기","filemanager.minimize":"최소화","filemanager.recent":"최근","filemanager.directory":"디렉토리","git.errReadRepo":"저장소를 읽을 수 없습니다","git.errLoad":"불러오기에 실패했습니다","git.noRepoInDir":"아직 git 저장소가 없습니다 — 다른 디렉토리를 선택하거나 여기서 git init 하세요.","git.outsideRoots":"이 폴더는 handmux가 열 수 있는 범위 밖입니다 — 홈 디렉토리와 /tmp만 접근할 수 있습니다. 저장소를 홈 디렉토리 아래로 옮기면 여기서 볼 수 있습니다.","git.errReadDir":"디렉토리를 읽을 수 없습니다","git.commitDetail":"커밋 상세","git.diff":"변경 사항","git.bindRepo":"저장소 연결","git.collapse":"접기","git.currentBranch":"현재 브랜치","git.switchViewedBranch":"표시할 브랜치 전환","git.switchBranch":"브랜치 전환","git.noBranches":"브랜치가 없습니다","git.noRepoBound":"저장소가 연결되지 않았습니다. 왼쪽 상단의 「+」를 탭하여 디렉토리를 선택하세요.","git.changes":"변경사항","git.commits":"커밋","git.pullToLoadMore":"당겨서 더 불러오기","git.pickerHint":"디렉토리를 선택하면 그 안의 git 저장소를 자동으로 찾습니다","git.cleanTree":"작업 트리가 깨끗합니다","git.noCommits":"커밋이 없습니다","git.noDiff":"변경 사항 없음","git.fontSmaller":"글꼴 축소","git.fontLarger":"글꼴 확대","git.diffTruncated":"변경 사항이 너무 커서 잘렸습니다","cmd.panel":"명령 패널","cmd.title":"명령","cmd.empty":"명령이 없습니다. 보내거나 자주 쓰는 것을 저장하세요","cmd.favorites":"즐겨찾기","cmd.scopeGlobal":"전체 · 모든 세션","cmd.recent":"최근","cmd.scopeSession":"현재 세션만","cmd.favorite":"즐겨찾기 추가","cmd.unfavorite":"즐겨찾기 해제","doc.home":"최근","doc.read":"읽어주기","doc.pauseRead":"읽기 일시 정지","doc.resumeRead":"읽기 재개","doc.stopRead":"읽기 중지","doc.rate":"읽기 속도","doc.fontSmaller":"글꼴 축소","doc.fontLarger":"글꼴 확대","inbox.view.working":"진행 중","inbox.view.done":"완료","inbox.view.needs":"확인 필요","push.unsupported":"푸시 알림은 Chrome 또는 Safari가 필요합니다","push.iosAddToHome":"iOS에서는 먼저 이 사이트를 「홈 화면에 추가」한 후 홈 화면 아이콘에서 열어주세요","a2hs.title":"handmux를 홈 화면에 추가","a2hs.lead":"앱처럼 전체 화면으로 열 수 있습니다. iPhone에서는 pane이 당신을 필요로 할 때의 푸시도 이 방식으로 전달됩니다.","a2hs.install":"handmux 설치","a2hs.ios1":"Safari의 공유 버튼(⬆︎ 상자)을 탭하세요.","a2hs.ios2":"「더 보기」를 탭하거나 목록을 아래로 스크롤하세요.","a2hs.ios3":"「홈 화면에 추가」를 선택한 뒤 「추가」를 탭하세요.","a2hs.iosHint":"Safari에서: 공유 → 더 보기 → 홈 화면에 추가.","a2hs.iosOpenSafari":"현재 Safari가 아닙니다. Safari에서 이 페이지를 연 뒤 홈 화면에 추가하세요 — 다른 iOS 브라우저는 설치할 수 없습니다.","a2hs.androidManual":"브라우저 메뉴(⋮)에서 「홈 화면에 추가」 또는 「앱 설치」를 선택하세요.","a2hs.later":"나중에","push.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}분","workspace.bootDetected":"컴퓨터 재시작이 감지되었습니다","workspace.tmuxDetected":"tmux 재시작이 감지되었습니다","workspace.summary":"이전 작업 공간 · 세션 {sessions}개 · {time} 저장","workspace.restoreLast":"이전 작업 공간 복원","workspace.partialCard":"세션 {failures}개를 더 확인해야 합니다","workspace.unknownTime":"알 수 없는 시간","workspace.savedAt":"{time} 저장","workspace.topologySummary":"세션 {sessions}개 · 창 {windows}개 · 패널 {panes}개","workspace.planSummary":"세션 {restore}개 복원;{already}개는 이미 존재","workspace.renameRule":"현재 같은 이름의 세션이 있을 때만 복원 이름에 -restored 접미사가 붙습니다.","workspace.nonDestructive":"현재 세션은 수정하거나 이름을 바꾸거나 중지하지 않습니다.","workspace.progress":"복원 중 {completed} / {total}…","workspace.progressDone":"복원됨 {completed} / {total}","workspace.complete":"작업 공간을 복원했습니다.","workspace.completedSummary":"이번 복원: 세션 {sessions}개 · 창 {windows}개 · 패널 {panes}개","workspace.rebindHint":"복원된 세션은 자동으로 표시되지 않습니다. 이 휴대폰에 연결할 세션을 다시 선택할 수 있습니다.","workspace.rebind":"세션 다시 연결","workspace.sessionFailure":"{session}: {reason}","workspace.unknownSession":"알 수 없는 세션","workspace.restore":"복원","workspace.ignore":"이 백업 무시","workspace.protectionTitle":"작업 공간이 보호되지 않음","workspace.protection.live-corrupt":"작업 공간 상태 사본이 손상되었습니다. 디스크와 ~/.handmux 권한을 확인한 뒤 handmux를 재시작하세요.","workspace.protection.live-unavailable":"작업 공간 상태를 읽거나 쓸 수 없습니다. 디스크 여유 공간과 ~/.handmux 권한을 확인한 뒤 handmux를 재시작하세요.","workspace.protection.unknown":"백그라운드 스냅샷을 사용할 수 없습니다. 컴퓨터의 handmux 로그를 확인하세요.","workspace.error.restore-interrupted":"복원이 중단되었습니다. 이 백업을 다시 시도하세요","workspace.error.checkpoint-not-found":"이 백업을 더 이상 사용할 수 없습니다. 새로 고친 뒤 다른 백업을 선택하세요","workspace.error.storage-full":"작업 공간 저장소가 가득 찼습니다. 디스크 공간을 확보한 뒤 다시 시도하세요","workspace.error.permission-denied":"작업 공간 저장소에 쓸 수 없습니다. 권한을 확인한 뒤 다시 시도하세요","workspace.error.plan-failed":"복원 계획이 변경되었습니다. 새로 고친 뒤 다시 시도하세요","workspace.error.agent-unavailable":"Agent를 재개할 수 없습니다. 복원된 shell을 열고 수동으로 다시 시도하세요","workspace.error.tmux-unavailable":"tmux를 사용할 수 없습니다. tmux 실행 여부를 확인한 뒤 다시 시도하세요","workspace.error.restore-failed":"세션을 복원하지 못했습니다. handmux 로그를 확인한 뒤 다시 시도하세요","workspace.error.operation-not-found":"이 복원 작업을 더 이상 사용할 수 없습니다. 백업 복원을 다시 시작하세요","workspace.sessionWarning":"{session}: {reason}","workspace.warning.cwd-fallback":"작업 디렉터리를 사용할 수 없어 홈 디렉터리에 복원했습니다","workspace.warning.layout-fallback":"창 분할 배치를 완전히 복원하지 못해 기본 배치를 유지했습니다","workspace.warning.agent-warning":"Agent를 자동으로 재개하지 못했습니다. 복원된 셸은 계속 사용할 수 있습니다","workspace.warning.live-reconcile-failed":"현재 작업 공간 상태를 대조하지 못했습니다. handmux 로그를 확인하세요","workspace.warning.workspace-unavailable":"작업 공간 저장소를 일시적으로 사용할 수 없습니다. 디스크 공간과 권한을 확인하세요","workspace.warning.restore-warning":"복원 중 확인이 필요한 경고가 발생했습니다"},vw={zh:mU,"zh-TW":fU,en:KC,ja:pU,ko:vU},FS=[{code:"zh",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"en",label:"English"},{code:"ja",label:"日本語"},{code:"ko",label:"한국어"}],XC="tw_lang";function gU(n,i,l=vw){if(n&&l[n])return n;for(const h of i&&i.length?i:["en"]){const x=String(h).toLowerCase();if(l[x])return x;const D=x.split("-")[0];if(l[D])return D}return"en"}function bU(n,i,l,h){let x=n&&n[l]!=null?n[l]:i&&i[l]!=null?i[l]:l;return h&&(x=x.replace(/\{(\w+)\}/g,(D,_)=>h[_]!=null?h[_]:`{${_}}`)),x}const _U=()=>typeof navigator<"u"?navigator.languages||[navigator.language]:null,wU=()=>{try{return localStorage.getItem(XC)}catch{return null}};let If=gU(wU(),_U());function M(n,i){return bU(vw[If],KC,n,i)}function So(){return If}function yU(n){if(!(!vw[n]||n===If)){try{localStorage.setItem(XC,n)}catch{}If=n,typeof location<"u"&&location.reload()}}const gw="tw_token",HS="hm_browser_device1",O_="hm_browser_access1",bw="tw_font",Xd="tw_bound",Ff="tw_last_session",_w="tw_win",ww="tw_pane",yw="tw_favs",xU="tw_recent",NU=30,Hf="tw_inbox_seen",JC="tw_inbox_read_ts",xw="tw_browse_dir",Nw="tw_preview_dir",ZC="tw_startup_cmd",V_="tw_chat_draft",QC="tw_chat_tone",B_="tw_chat_lens",SU="tw_ideas",eE="tw_changelog_seen",tE="tw_version_seen",rp="tw_git_repos",CU="tw_git_dirs",P_="tw_workspace_prompt",nE="tw_workspace_applied_mappings",EU=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,zS={sessions:/^\$\d+$/,windows:/^@\d+$/,panes:/^%\d+$/},Ud=(n,i)=>Object.prototype.hasOwnProperty.call(n,i),wl=()=>localStorage.getItem(gw),jU=n=>localStorage.setItem(gw,n),DU=()=>localStorage.removeItem(gw);function kU(){const n=localStorage.getItem(HS);if(/^[A-Za-z0-9_-]{32,128}$/.test(n||""))return n;const i=new Uint8Array(24);globalThis.crypto.getRandomValues(i);const l=`device_${[...i].map(h=>h.toString(16).padStart(2,"0")).join("")}`;return localStorage.setItem(HS,l),l}const RU=()=>localStorage.getItem(O_)==="1",h_=n=>{n?localStorage.setItem(O_,"1"):localStorage.removeItem(O_)};function ma(){try{const n=JSON.parse(localStorage.getItem(Xd));return Array.isArray(n)?n.filter(i=>typeof i=="string"):[]}catch{return[]}}function I_(n){const i=ma();return i.includes(n)||i.push(n),localStorage.setItem(Xd,JSON.stringify(i)),i}function $S(n){const i=ma().filter(l=>l!==n);return localStorage.setItem(Xd,JSON.stringify(i)),i}function TU(n){const i=new Set((Array.isArray(n)?n:[]).filter(h=>(h==null?void 0:h.status)==="restored"&&typeof h.targetName=="string"&&h.targetName).map(h=>h.targetName)),l=ma().filter(h=>!i.has(h));return localStorage.setItem(Xd,JSON.stringify(l)),l}function LU(n,i){const l=ma().map(h=>h===n?i:h);return localStorage.setItem(Xd,JSON.stringify(l)),Sw.renameSession(n,i),ip.renameSession(n,i),l}function Ji(n){try{const i=JSON.parse(localStorage.getItem(n));return i&&typeof i=="object"&&!Array.isArray(i)?i:{}}catch{return{}}}function Eo(n,i,l){const h=Ji(n);h[i]=l,localStorage.setItem(n,JSON.stringify(h))}function rE(n,i){if(!n)return{};const l=Ji(P_),h=l[n];return l[n]={...h&&typeof h=="object"&&!Array.isArray(h)?h:{},...i},localStorage.setItem(P_,JSON.stringify(l)),l[n]}const AU=n=>{if(!n)return{};const i=Ji(P_)[n];return i&&typeof i=="object"&&!Array.isArray(i)?i:{}},WS=n=>rE(n,{autoShown:!0}),MU=n=>rE(n,{ignored:!0,autoShown:!0});function UU(){try{const n=JSON.parse(localStorage.getItem(nE));return Array.isArray(n)?n.filter(i=>typeof i=="string"):[]}catch{return[]}}function Td(n){if(!n||typeof n!="object"||Array.isArray(n))return!1;const i=Object.getPrototypeOf(n);return i===Object.prototype||i===null}function OU(n){try{if(!Td(n)||typeof n.id!="string"||!EU.test(n.id)||n.runtime!==void 0&&!Td(n.runtime)||n.names!==void 0&&!Td(n.names))return null;const i=n.runtime||{};if(Object.keys(i).some(D=>!Ud(zS,D)))return null;const l={sessions:{},windows:{},panes:{}};for(const[D,_]of Object.entries(zS)){const s=i[D];if(s!==void 0){if(!Td(s))return null;for(const[u,f]of Object.entries(s)){if(!_.test(u)||typeof f!="string"||!_.test(f))return null;l[D][u]=f}}}const h={};for(const[D,_]of Object.entries(n.names||{})){if(!D||typeof _!="string"||!_)return null;h[D]=_}return Object.keys(h).length>0||Object.values(l).some(D=>Object.keys(D).length>0)?{id:n.id,runtime:l,names:h}:null}catch{return null}}function VU(n){const i=localStorage.getItem(n);if(i===null)return null;try{const l=JSON.parse(i);return Td(l)?{raw:i,value:l}:null}catch{return null}}function Nf(n,i,l={}){const h=VU(n);if(!h)return;const x=h.value,D=Object.keys(i).filter(u=>Ud(x,u));if(D.length===0)return;const _={};for(const[u,f]of Object.entries(x))Ud(i,u)||(_[u]=f);for(const u of D){const f=i[u],g=x[u];_[f]=typeof g=="string"&&Ud(l,g)?l[g]:g}const s=JSON.stringify(_);s!==h.raw&&localStorage.setItem(n,s)}function BU(n){const{sessions:i,windows:l,panes:h}=n;if(Object.keys(i).length>0){const x=localStorage.getItem(Ff);x&&Ud(i,x)&&localStorage.setItem(Ff,i[x]),Nf(_w,i,l)}if(Object.keys(l).length>0){Nf(ww,l,h);for(const x of[rp,CU,xw,Nw])Nf(x,l)}if(Object.keys(h).length>0)for(const x of[jw,Hf])Nf(x,h)}function PU(n){const i=OU(n);if(!i)return!1;const l=UU();if(l.includes(i.id))return!1;if(BU(i.runtime),Object.keys(i.names).length>0){const h=ma();for(const[x,D]of Object.entries(i.names))h.includes(x)&&I_(D)}return localStorage.setItem(nE,JSON.stringify([...l,i.id])),!0}function iE(n){const i=l=>l&&typeof l=="object"&&!Array.isArray(l)?l:{};return{get(l,h){return!l||!h?[]:i(Ji(n)[l])[h]??[]},set(l,h,x){const D=Ji(n),_=i(D[l]);return x&&x.length?_[h]=x:delete _[h],Object.keys(_).length?D[l]=_:delete D[l],localStorage.setItem(n,JSON.stringify(D)),x??[]},renameWindow(l,h,x){if(!l||!h||!x||h===x)return;const D=Ji(n),_=i(D[l]);_[h]!=null&&(_[x]=_[h],delete _[h],D[l]=_,localStorage.setItem(n,JSON.stringify(D)))},renameSession(l,h){const x=Ji(n);x[l]!=null&&(x[h]=x[l],delete x[l],localStorage.setItem(n,JSON.stringify(x)))}}}const Sw=iE(xU),ip=iE(SU),GS=()=>Ji(Hf);function YS(n,i){return Eo(Hf,n,i),Ji(Hf)}const IU=()=>{const n=localStorage.getItem(JC);return n==null?null:Number(n)},qS=n=>localStorage.setItem(JC,String(n)),sE="tw_notif_seen_ts",FU=()=>{const n=localStorage.getItem(sE);return n==null?0:Number(n)},HU=n=>localStorage.setItem(sE,String(n)),Cw="tw_notif_read_ids",Od=()=>{try{const n=JSON.parse(localStorage.getItem(Cw)||"[]");return Array.isArray(n)?n:[]}catch{return[]}},KS=n=>{const i=Od();i.includes(n)||localStorage.setItem(Cw,JSON.stringify([...i,n]))},zU=n=>{const i=Od().filter(l=>n.includes(l));return localStorage.setItem(Cw,JSON.stringify(i)),i},$U=n=>n?Ji(xw)[n]??null:null,XS=(n,i)=>{n&&i&&Eo(xw,n,i)},WU=n=>n?Ji(Nw)[n]??null:null,JS=(n,i)=>{n&&i&&Eo(Nw,n,i)},GU=()=>localStorage.getItem(Ff),YU=n=>Ji(_w)[n]??null,Nd=n=>Ji(ww)[n]??null;function sl({sessionId:n,windowId:i,paneId:l}={}){n&&localStorage.setItem(Ff,n),n&&i&&Eo(_w,n,i),i&&l&&Eo(ww,i,l)}function qU(){const n=Number(localStorage.getItem(bw));return Number.isFinite(n)&&n>0?n:null}const Ld=n=>localStorage.setItem(bw,String(n)),KU=()=>localStorage.removeItem(bw),aE=["dusk","ink","light"],XU=()=>{const n=localStorage.getItem(QC);return aE.includes(n)?n:"dusk"},JU=n=>{aE.includes(n)&&localStorage.setItem(QC,n)},ZU=()=>localStorage.getItem(B_)==="1",QU=n=>{n?localStorage.setItem(B_,"1"):localStorage.removeItem(B_)},oE=()=>localStorage.getItem(V_)||"",lE=n=>{n?localStorage.setItem(V_,n):localStorage.removeItem(V_)};function zf(){try{return JSON.parse(localStorage.getItem(yw))||[]}catch{return[]}}function e3(n){const i=n.trim(),l=zf();return i&&!l.includes(i)&&l.push(i),localStorage.setItem(yw,JSON.stringify(l)),l}function t3(n){const i=zf().filter(l=>l!==n);return localStorage.setItem(yw,JSON.stringify(i)),i}const cE=()=>localStorage.getItem(ZC)||"",uE=n=>localStorage.setItem(ZC,n||""),dE="tw_orphan_kill",n3=()=>localStorage.getItem(dE)!=="0",r3=n=>localStorage.setItem(dE,n?"1":"0"),hE="tw_doc_highlight",mE=()=>localStorage.getItem(hE)==="1",i3=n=>localStorage.setItem(hE,n?"1":"0"),$f=(n,i)=>Sw.get(n,i),fE=(n,i,l)=>Sw.set(n,i,l);function s3(n,i,l){const h=(l||"").trim(),x=$f(n,i);return!h||!n||!i?x:fE(n,i,[h,...x.filter(D=>D!==h)].slice(0,NU))}function a3(n,i,l){return!n||!i?$f(n,i):fE(n,i,$f(n,i).filter(h=>h!==l))}const Ew="tw_recent_docs",jw="tw_pane_base",o3=30;function Vd(){try{return JSON.parse(localStorage.getItem(Ew))||[]}catch{return[]}}function ZS({path:n,name:i,type:l,ts:h=Date.now()}){const x=[{path:n,name:i,type:l,ts:h},...Vd().filter(D=>D.path!==n)].slice(0,o3);return localStorage.setItem(Ew,JSON.stringify(x)),x}function l3(n){const i=Vd().filter(l=>l.path!==n);return localStorage.setItem(Ew,JSON.stringify(i)),i}const QS=n=>Ji(jw)[n]??null,c3=(n,i)=>Eo(jw,n,i),Ia=[10,11,12,13,14,16,18,20,22],u3=4,pE="tw_doc_font";function d3(){const n=localStorage.getItem(pE),i=Number(n);return n!==null&&Number.isInteger(i)&&i>=0&&i<Ia.length?i:u3}const h3=n=>localStorage.setItem(pE,String(Math.min(Ia.length-1,Math.max(0,n)))),m3=2,vE="tw_diff_font";function f3(){const n=localStorage.getItem(vE),i=Number(n);return n!==null&&Number.isInteger(i)&&i>=0&&i<Ia.length?i:m3}const p3=n=>localStorage.setItem(vE,String(Math.min(Ia.length-1,Math.max(0,n)))),gE=(n,i)=>ip.get(n,i);function e1(n,i,l){return!n||!i?[]:ip.set(n,i,l)}const v3=()=>localStorage.getItem(eE),g3=n=>{n&&localStorage.setItem(eE,n)},b3=()=>localStorage.getItem(tE),_3=n=>{n&&localStorage.setItem(tE,n)};function w3(n,i,l){ip.renameWindow(n,i,l)}function Dw(n){if(!n)return[];const i=Ji(rp)[n];return Array.isArray(i)?i:[]}function t1(n,i){if(!n)return[];const l=[...Dw(n)];for(const h of i)h&&!l.includes(h)&&l.push(h);return Eo(rp,n,l),l}function y3(n,i){if(!n)return[];const l=Dw(n).filter(h=>h!==i);return Eo(rp,n,l),l}const F_=[{version:"0.22.0",date:"2026-08-03",highlight:{zh:"全屏设置 · 窗口与分屏管理更清晰",en:"Full-screen Settings · clearer window and pane management"},items:{zh:["设置改为全屏分组页面:常用选项使用统一的二级页,版本、更新日志、反馈和重新加载应用集中在首层。","列宽调整移到对应的窗口管理或窗格管理中;单窗格调整窗口宽度,多窗格只调整所选窗格,并可恢复自动宽度或原分屏比例。","推送通知、脚本推送和脚本推送记录的入口重新整理;关闭通知前会先确认,同一 App 安装重新开启后仍保留原设备 key。","修复了冷启动时实时终端先显示快照,以及重启后从最近访问打开静态目录产生重复标签的问题。"],en:["Settings is now a full-screen grouped page with consistent detail views, while version, changelog, feedback, and Reload app stay on the first level.","Column sizing now lives in Window or Pane Management: resize a single-pane window or the selected pane in a split, then restore automatic width or the original split ratio.","Push notifications, Script push, and Script Push History are arranged more clearly; turning notifications off requires confirmation, and re-enabling keeps the same device key for that app installation.","Fixed live terminals briefly starting in snapshot mode and static directories opening as duplicate tabs from Recently Visited after a restart."]}},{version:"0.21.0",date:"2026-08-03",highlight:{zh:"网页预览:手机直连、电脑代理与静态目录",en:"Web preview: direct, computer proxy, and static folders"},items:{zh:["新增常驻网页预览器:可由手机直连开发服务、localhost、内网和允许嵌入的网站,也可在配置 previewDomain 后经电脑代理访问;静态目录预览也已融合到同一界面。","网址和静态目录现在使用统一的持久标签与最近访问;切换标签会保留页面、滚动和表单状态,支持手机/电脑视图、网页缩放、刷新、停止及用系统浏览器打开。","电脑代理支持按设备隔离的 Cookie Profile,可在相关企业系统间复用 SSO Cookie,并可选择加密持久化、按网站清理或全部清理。"],en:["Added a persistent Web Preview for direct phone access to development services, localhost, intranet pages, and sites that allow embedding, plus computer proxy access after previewDomain is configured; static folders now share the same interface.","URL and static-folder previews now use unified persistent tabs and recent history; switching tabs preserves page, scroll, and form state, with mobile/desktop views, page zoom, refresh, stop, and Open in system browser.","Computer proxy mode supports a device-isolated Cookie Profile that can reuse SSO cookies across related enterprise systems, with optional encrypted persistence and per-site or full cleanup."]}},{version:"0.20.3",date:"2026-08-01",highlight:{zh:"实时终端显示更稳定流畅",en:"More stable, smoother live terminals"},items:{zh:["修复了实时终端持续输出时偶发缺行,以及内容较短、首次打开或展开键盘时画面位置不稳定的问题;长时间使用和多窗口同时打开也更流畅。"],en:["Fixed occasional missing lines during continuous live output and unstable positioning with short content, first open, or keyboard expansion; long sessions and multiple visible windows also stay smoother."]}},{version:"0.20.2",date:"2026-07-27",highlight:{zh:"实时终端长时间运行更流畅",en:"Smoother long-running live terminals"},items:{zh:["实时终端长时间打开、连续输出大量内容或电脑同时显示多个 PWA 时保持流畅;输出积压时会跳过过期画面并同步最新终端状态,tmux 历史仍可继续查看。"],en:["Live terminals stay responsive during long sessions, heavy output, and multiple visible PWAs; stale intermediate frames are skipped when output falls behind, while the latest tmux state and scrollback remain available."]}},{version:"0.20.1",date:"2026-07-26",highlight:{zh:"聊天发送修复 · 电脑键盘不中断",en:"Reliable chat sending · uninterrupted desktop input"},items:{zh:["电脑端焦点落在 Window 工具栏后,物理键盘输入和 Shift+Enter 仍会作用于当前终端;F5、F12 保留给浏览器。","修复了聊天模式选择文件后没有开始上传、快速连按重复发送同一条内容的问题;空内容发送 Enter 的能力保持不变。"],en:["Physical keyboard input and Shift+Enter keep working after focus lands on the Window toolbar; F5 and F12 remain available to the browser.","Fixed chat uploads not starting after file selection and rapid taps sending the same content more than once; sending Enter with an empty composer remains available."]}},{version:"0.20.0",date:"2026-07-26",highlight:{zh:"终端实时推送 · 弱网自动回退",en:"Live terminal pushing · automatic network fallback"},items:{zh:["手机和电脑的终端输出现在通过 WebSocket 实时推送;首次打开即可上滑浏览最近的 tmux 历史,继续上滑会加载更早内容,回到底部后重新同步最新画面。","实时连接不可用或持续较差时会自动回退到快照拉取,稳定 30 秒后尝试恢复;右上角显示当前模式与延迟,设置中也可固定使用快照拉取并选择刷新频率。","设置中新增「重新加载应用」,服务端更新后无需退出主屏应用即可载入新版客户端;设置二级页面和弹窗现在会按层返回。"],en:["Terminal output now uses WebSocket live pushing on phone and desktop; scroll up immediately for recent tmux history, keep scrolling for older content, and return to the bottom to resynchronize the latest screen.","An unavailable or persistently poor live connection automatically falls back to snapshot pulling and retries after 30 stable seconds; the top-right status shows the current mode and latency, while Settings can pin snapshot pulling and choose its refresh rate.","Settings now includes Reload app, so an updated server can load the new client without quitting the home-screen app; nested Settings pages and dialogs also return one layer at a time."]}},{version:"0.19.0",date:"2026-07-25",highlight:{zh:"电脑物理键盘直输 · Window 切换更流畅",en:"Desktop keyboard input · faster window switching"},items:{zh:["电脑浏览器现在可以用物理键盘直接操作终端,并支持常用终端快捷键、输入法和复制粘贴;Shift+Enter 可进入保留快捷用语、上传、历史和语音的草稿模式,设置中也可手动指定手机或电脑键盘模式。","全站滚动条现在更统一;终端内容超宽时会显示独立横向滚动条,网络较慢时切换 Window 也会立即进入目标终端的加载页面。","Agent 用量现在稳定展示所有设备共享的本机最新状态,Codex 主额度与 CLI /status 保持一致。"],en:["Desktop browsers can now drive the terminal directly from a physical keyboard, with common terminal shortcuts, IME, and copy/paste; Shift+Enter opens draft mode with shortcuts, uploads, history, and voice intact, and Settings can force Mobile or Desktop keyboard mode.","Scrollbars are now consistent across the app; wide terminal content gets its own horizontal scrollbar, and switching Windows on a slow network enters the target terminal loading view immediately.","Agent usage now keeps the latest machine state stable and shared across devices, while the main Codex quota matches CLI /status."]}},{version:"0.18.0",date:"2026-07-22",highlight:{zh:"Tmux 工作区恢复 · 快捷栏自由定制",en:"Tmux workspace recovery · customizable shortcuts"},items:{zh:["新增 Tmux 工作区恢复:电脑或 Tmux 重启后,可从手机或 handmux restore 恢复上次的会话、窗口、分屏、目录和布局;Claude Code / Codex 会话还能继续原对话。","新增 handmux shortcuts:可分别配置命令与聊天模式的共享快捷项;每台手机也能自由混排共享与本机项,或只在本机移除共享项。","handmux setup 现在可以配置动态预览域名;预览不再自动续期,需要延长时由你手动续期或重新打开。"],en:["Added Tmux workspace recovery: after the computer or Tmux restarts, restore the previous sessions, windows, panes, working directories, and layouts from the phone or handmux restore; Claude Code and Codex sessions can also continue their original conversations.","Added handmux shortcuts to configure shared command-mode and chat-mode items; each phone can also freely mix shared and local items or remove a shared item only on that device.","handmux setup can now configure the dynamic-preview domain; previews no longer renew automatically and can be extended manually or reopened when needed."]}},{version:"0.17.8",date:"2026-07-20",highlight:{zh:"分屏地图显示尺寸 · iPhone 交互修复",en:"Pane dimensions in the map · iPhone interaction fixes"},items:{zh:["分屏地图现在会在空间足够的窗格里低调显示真实终端尺寸(列×行),较小窗格仍保持简洁。","修复了分屏地图在 iPhone 上无法显示、长按窗格时触发系统文字选择的问题。","设置分屏列宽时现在会读取当前窗格的实际宽度,不同窗格不再互相沿用调整值。"],en:["The pane map now quietly shows each terminal's real columns × rows when space allows, while smaller tiles stay uncluttered.","Fixed the pane map failing to appear on iPhone and long-pressing a pane triggering the system text-selection UI.","Pane-width settings now read the active pane's actual width, so adjustments no longer carry over between panes."]}},{version:"0.17.7",date:"2026-07-20",highlight:{zh:"单实例启动兜底 · WSL 状态命令修复",en:"Single-instance startup guard · WSL status fix"},items:{zh:["修复安装开机自启后升级、重启可能产生两个后台实例,导致端口占用、URL 不出现或 stop 后仍可访问的问题;启停命令现在统一管理同一个服务,发现重复副本会列出 PID 并全部回收。","handmux status 现在显示实际运行版本,升级后可区分已安装版本;修复了 WSL 中内容显示完毕却不返回命令行的问题。"],en:["Fixed upgrades or restarts creating two background instances after autostart was installed, which could occupy the port, hide the URL, or remain reachable after stop; lifecycle commands now manage one service and list/reap every duplicate PID.","handmux status now shows the actual running version and distinguishes a newly installed version; fixed WSL terminals not returning to the prompt after status output completed."]}},{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)."]}}],x3=n=>n.version||n.date,Sf=F_[0]?x3(F_[0]):null,N3={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 sp(n){const i=(n||"").lastIndexOf(".");return i<0?"":N3[n.slice(i+1).toLowerCase()]||""}function S3(n){return sp(n).startsWith("image/")}class li extends Error{}class bE extends Error{constructor(i,l,h){super(i),this.status=l,this.serverError=h??null}}async function mn(n,i={}){const l=wl(),{timeoutMs:h,signal:x,...D}=i,_={Authorization:`Bearer ${l??""}`,...D.headers||{}};D.body&&(_["Content-Type"]="application/json");let s=null,u=null;const f=()=>s==null?void 0:s.abort();(h||x)&&(s=new AbortController,x!=null&&x.aborted?s.abort():x==null||x.addEventListener("abort",f,{once:!0}),h&&(u=setTimeout(()=>s.abort(),h)));try{const g=await fetch(n,{cache:"no-store",...D,headers:_,signal:s==null?void 0:s.signal});if(g.status===401)throw new li;if(!g.ok){let d=null;try{const y=await g.json();y!=null&&y.error&&(d=y.error)}catch{}throw new bE(d||`${n} -> ${g.status}`,g.status,d)}return g.status===204?{unchanged:!0}:await g.json()}catch(g){throw s!=null&&s.signal.aborted&&!(x!=null&&x.aborted)?new Error(`${n} -> timeout`):g}finally{u&&clearTimeout(u),x==null||x.removeEventListener("abort",f)}}const ol=()=>mn("/api/sessions"),C3=()=>mn("/api/usage"),xo=n=>mn(`/api/windows?session=${encodeURIComponent(n)}`),ks=n=>mn(`/api/panes?window=${encodeURIComponent(n)}`,{timeoutMs:8e3}),E3=(n,i=1500,l)=>mn(`/api/history?pane=${encodeURIComponent(n)}&lines=${i}${l?`&since=${l}`:""}`,{timeoutMs:8e3}),n1=(n,{since:i,before:l,limit:h=10}={})=>{let x=`/api/transcript?pane=${encodeURIComponent(n)}&agent=claude&limit=${encodeURIComponent(h)}`;return i&&(x+=`&since=${encodeURIComponent(i)}`),l!=null&&(x+=`&before=${encodeURIComponent(l)}`),mn(x,{timeoutMs:8e3}).then(D=>D.unchanged?null:D)},j3=n=>mn(`/api/context?pane=${encodeURIComponent(n)}&agent=claude`,{timeoutMs:8e3}),D3=n=>mn(`/api/pending-prompt?pane=${encodeURIComponent(n)}&agent=claude`,{timeoutMs:8e3}).then(i=>i.prompt||null),Dc=(n,i,l=!0)=>mn("/api/send",{method:"POST",body:JSON.stringify({pane:n,text:i,enter:l})}),Jd=(n,i)=>mn("/api/keys",{method:"POST",body:JSON.stringify({pane:n,keys:i})}),k3=(n,i)=>mn("/api/input",{method:"POST",body:JSON.stringify({pane:n,hex:i})}),R3=(n,i,l=1)=>mn("/api/scroll",{method:"POST",body:JSON.stringify({pane:n,dir:i,lines:l})}),T3=(n,i,l)=>mn("/api/resize",{method:"POST",body:JSON.stringify({window:n,cols:i,rows:l})}),L3=(n,i)=>mn("/api/resize",{method:"POST",body:JSON.stringify({pane:n,cols:i})}),A3=n=>mn(`/api/layout?window=${encodeURIComponent(n)}`),M3=(n,i)=>mn("/api/layout",{method:"POST",body:JSON.stringify({window:n,layout:i})}),U3=(n,i)=>mn("/api/resize",{method:"POST",body:JSON.stringify({window:n,auto:!0,layout:i})}),O3=(n,i,l)=>mn("/api/sessions",{method:"POST",body:JSON.stringify({name:n,cwd:i,cmd:l})}),V3=(n,i,l,h,x)=>mn("/api/windows",{method:"POST",body:JSON.stringify({session:n,pane:i,name:l,cwd:h,cmd:x})}),B3=(n,i)=>mn("/api/sessions",{method:"PATCH",body:JSON.stringify({id:n,name:i})}),P3=(n,i)=>mn("/api/windows",{method:"PATCH",body:JSON.stringify({id:n,name:i})}),I3=n=>mn(`/api/windows?window=${encodeURIComponent(n)}`,{method:"DELETE"}),F3=(n,i)=>mn("/api/windows/swap",{method:"POST",body:JSON.stringify({a:n,b:i})}),r1=(n,i)=>mn("/api/panes/split",{method:"POST",body:JSON.stringify({pane:n,dir:i})}),H3=n=>mn(`/api/panes?pane=${encodeURIComponent(n)}`,{method:"DELETE"}),z3=(n,i)=>mn("/api/dir",{method:"POST",body:JSON.stringify({dir:n,name:i})}),i1=(n,i=null)=>mn(`/api/file?path=${encodeURIComponent(n)}${i!=null?`&mtime=${encodeURIComponent(i)}`:""}`,{timeoutMs:8e3}),_E=n=>mn(`/api/dir${n?`?path=${encodeURIComponent(n)}`:""}`,{timeoutMs:8e3}),fl=n=>mn(`/api/pane-cwd?pane=${encodeURIComponent(n)}`,{timeoutMs:8e3}),$3=()=>mn("/api/asr/sign",{timeoutMs:8e3}),W3=()=>mn("/api/config",{timeoutMs:8e3}),G3=()=>mn("/api/version",{timeoutMs:8e3}),s1=()=>mn("/api/workspace/status",{timeoutMs:8e3}),a1=(n="latest")=>mn(`/api/workspace/restore-plan?checkpoint=${encodeURIComponent(n)}`,{timeoutMs:8e3}),Y3=(n={checkpointId:"latest"})=>mn("/api/workspace/restore",{method:"POST",body:JSON.stringify(n),timeoutMs:8e3}),q3=n=>mn(`/api/workspace/restore/${encodeURIComponent(n)}`,{timeoutMs:8e3}),K3=()=>mn("/api/hooks/install",{method:"POST",timeoutMs:15e3}),X3=(n=[])=>mn(`/api/states?sessions=${encodeURIComponent(n.join(","))}`,{timeoutMs:4e3}),Tc=(n,i={})=>mn(n,{timeoutMs:15e3,...i,headers:{...i.headers||{},"X-Handmux-Browser-Device":kU()}}),J3=(n,i)=>Tc(`/api/browser-proxy/leases/${encodeURIComponent(n)}`,{method:"PUT",body:JSON.stringify({url:i})}),Z3=(n,i)=>Tc(`/api/browser-proxy/leases/${encodeURIComponent(n)}/navigate`,{method:"POST",body:JSON.stringify({url:i})}),o1=n=>Tc(`/api/browser-proxy/leases/${encodeURIComponent(n)}`,{method:"DELETE"}),l1=()=>Tc("/api/browser-proxy/status"),c1=n=>Tc("/api/browser-proxy/profile",{method:"PUT",body:JSON.stringify(n)}),Q3=(n=null)=>Tc("/api/browser-proxy/profile/clear",{method:"POST",body:JSON.stringify({origin:n})}),u1=()=>mn("/api/orphans",{timeoutMs:8e3}),e2=n=>mn("/api/orphans/takeover",{method:"POST",body:JSON.stringify(n),timeoutMs:15e3}),d1=n=>mn(`/api/git/repos?dir=${encodeURIComponent(n)}`,{timeoutMs:8e3}),t2=n=>mn(`/api/git/status?repo=${encodeURIComponent(n)}`,{timeoutMs:8e3}),n2=(n,{limit:i=50,ref:l}={})=>{let h=`/api/git/log?repo=${encodeURIComponent(n)}&limit=${i}`;return l&&(h+=`&ref=${encodeURIComponent(l)}`),mn(h,{timeoutMs:8e3})},r2=n=>mn(`/api/git/branches?repo=${encodeURIComponent(n)}`,{timeoutMs:8e3}),i2=(n,{path:i,commit:l,staged:h}={})=>{let x=`/api/git/diff?repo=${encodeURIComponent(n)}&path=${encodeURIComponent(i??"")}`;return l&&(x+=`&commit=${encodeURIComponent(l)}`),h&&(x+="&staged=1"),mn(x,{timeoutMs:8e3})},s2=(n,i)=>mn(`/api/git/commit?repo=${encodeURIComponent(n)}&hash=${encodeURIComponent(i)}`,{timeoutMs:8e3});function a2(n,i){return new Promise((l,h)=>{const x=wl(),D=new XMLHttpRequest;D.open("GET",`/api/download?path=${encodeURIComponent(n)}`),D.setRequestHeader("Authorization",`Bearer ${x??""}`),D.responseType="blob",D.onprogress=_=>{i&&_.lengthComputable&&i(_.loaded/_.total)},D.onerror=()=>h(new Error("download failed")),D.onload=()=>{if(D.status===401)return h(new li);if(D.status<200||D.status>=300)return h(new Error(`download -> ${D.status}`));const _=n.split("/").pop()||"download";let s=D.response;const u=sp(_);u&&s&&s.type!==u&&(s=s.slice(0,s.size,u));const f=URL.createObjectURL(s),g=document.createElement("a");g.href=f,g.download=_,document.body.appendChild(g),g.click(),g.remove(),setTimeout(()=>URL.revokeObjectURL(f),1e3),l()},D.send()})}function h1(n,i=null){return new Promise((l,h)=>{const x=wl(),D=new XMLHttpRequest,_=i!=null?`&mtime=${encodeURIComponent(i)}`:"";D.open("GET",`/api/download?path=${encodeURIComponent(n)}${_}`),D.setRequestHeader("Authorization",`Bearer ${x??""}`),D.responseType="blob",D.onerror=()=>h(new Error(M("api.loadFailed"))),D.onload=()=>{if(D.status===304)return l({notModified:!0});if(D.status===401)return h(new li);if(D.status<200||D.status>=300)return h(new Error(`image -> ${D.status}`));let s=D.response;const u=sp(n.split("/").pop()||"");u&&s&&s.type!==u&&(s=s.slice(0,s.size,u));const f=Number(D.getResponseHeader("X-Mtime"));l({url:URL.createObjectURL(s),mtimeMs:Number.isFinite(f)?f:null})},D.send()})}const o2=(n,{dir:i}={})=>mn("/api/previews",{method:"POST",body:JSON.stringify({name:n,dir:i})}),m_=n=>mn(`/api/previews/${encodeURIComponent(n)}`,{method:"DELETE"});class Wf extends Error{constructor(){super("upload aborted"),this.name="UploadAbort"}}function wE(n,i,l,h=!1,{signal:x}={}){return new Promise((D,_)=>{if(x!=null&&x.aborted)return _(new Wf);const s=wl(),u=new FormData;u.append("dir",n),h&&u.append("stash","1"),u.append("file",i,i.name);const f=new XMLHttpRequest;f.open("POST","/api/upload"),f.setRequestHeader("Authorization",`Bearer ${s??""}`),f.upload.onprogress=y=>{l&&y.lengthComputable&&l(y.loaded/y.total,"sending")},f.upload.onload=()=>{l==null||l(1,"processing")};const g=()=>f.abort();x&&x.addEventListener("abort",g,{once:!0});const d=()=>{x&&x.removeEventListener("abort",g)};f.onabort=()=>{d(),_(new Wf)},f.onerror=()=>{d(),_(new Error(M("api.uploadFailed")))},f.onload=()=>{if(d(),f.status===401)return _(new li);if(f.status>=200&&f.status<300)try{return D(JSON.parse(f.responseText))}catch{return D({})}const y={400:M("api.uploadBadDir"),409:M("api.uploadDuplicate"),413:M("api.uploadTooLarge"),415:M("api.uploadBadType")}[f.status]||M("api.uploadFailed");_(new Error(y))},f.send(u)})}async function m1({paneId:n,dir:i,windowId:l,api:h,getPanes:x}){const{id:D}=await h.splitPane(n,i);return{panes:await x(l),selectPaneId:D}}async function l2({paneId:n,windowId:i,viewedPaneId:l,api:h,getPanes:x,pickId:D}){await h.closePane(n);const _=await x(i),s=n===l&&_.length?D(_,null):null;return{panes:_,selectPaneId:s}}const c2=`<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
+ `,u2=`<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
+ `,Ln={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};function kc(){return o.jsxDEV("svg",{...Ln,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 d2(){return o.jsxDEV("svg",{...Ln,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 Gf(){return o.jsxDEV("svg",{...Ln,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 yE(){return o.jsxDEV("svg",{...Ln,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 h2(){return o.jsxDEV("svg",{...Ln,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 kw(){return o.jsxDEV("svg",{...Ln,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 m2(){return o.jsxDEV("svg",{...Ln,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 Fa(){return o.jsxDEV("svg",{...Ln,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 ap(){return o.jsxDEV("svg",{...Ln,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 op(){return o.jsxDEV("svg",{...Ln,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 f2(){return o.jsxDEV("svg",{...Ln,children:[o.jsxDEV("path",{d:"M3 10.5 12 3l9 7.5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:114,columnNumber:7},this),o.jsxDEV("path",{d:"M5 9.5V20a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V9.5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:115,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:113,columnNumber:5},this)}function xE(){return o.jsxDEV("svg",{...Ln,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 p2(){return o.jsxDEV("svg",{...Ln,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 v2(){return o.jsxDEV("svg",{...Ln,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 g2(){return o.jsxDEV("svg",{...Ln,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 NE(){return o.jsxDEV("svg",{...Ln,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 SE(){return o.jsxDEV("svg",{...Ln,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 b2(){return o.jsxDEV("svg",{...Ln,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 _2(){return o.jsxDEV("svg",{...Ln,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 Rw(){return o.jsxDEV("svg",{...Ln,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 w2(){return o.jsxDEV("svg",{...Ln,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 y2(){return o.jsxDEV("svg",{...Ln,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 x2(){return o.jsxDEV("svg",{...Ln,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 N2(){return o.jsxDEV("svg",{...Ln,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 S2(){return o.jsxDEV("svg",{...Ln,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 CE(){return o.jsxDEV("svg",{...Ln,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 Gs(){return o.jsxDEV("svg",{...Ln,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 C2(){return o.jsxDEV("svg",{...Ln,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 E2({down:n=!1}){return o.jsxDEV("svg",{...Ln,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),n?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 f1(){return o.jsxDEV("svg",{...Ln,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 p1(){return o.jsxDEV("svg",{...Ln,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 j2(){return o.jsxDEV("svg",{...Ln,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 EE(){return o.jsxDEV("svg",{...Ln,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 D2(){return o.jsxDEV("svg",{...Ln,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 zd(){return o.jsxDEV("svg",{...Ln,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 k2(){return o.jsxDEV("svg",{...Ln,children:[o.jsxDEV("circle",{cx:"5",cy:"12",r:"1",fill:"currentColor",stroke:"none"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:397,columnNumber:7},this),o.jsxDEV("circle",{cx:"12",cy:"12",r:"1",fill:"currentColor",stroke:"none"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:398,columnNumber:7},this),o.jsxDEV("circle",{cx:"19",cy:"12",r:"1",fill:"currentColor",stroke:"none"},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 R2(){return o.jsxDEV("svg",{...Ln,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:407,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:408,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:409,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:406,columnNumber:5},this)}function T2(){return o.jsxDEV("svg",{...Ln,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:417,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:416,columnNumber:5},this)}function L2(){return o.jsxDEV("svg",{...Ln,children:[o.jsxDEV("path",{d:"M12 8V4H8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:425,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:426,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:427,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:424,columnNumber:5},this)}function A2(){return o.jsxDEV("svg",{...Ln,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:435,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:434,columnNumber:5},this)}const v1={claude:c2,codex:u2};function pl({agent:n}){const i=v1[n]?n:"claude";return o.jsxDEV("span",{className:"agent-mark",role:"img","aria-label":i,dangerouslySetInnerHTML:{__html:v1[i]}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:450,columnNumber:10},this)}const jE=[10,30,60,120],DE=[1,7,30,null],H_="hm_browser_close_after1",z_="hm_browser_profile_persist1",$_="hm_browser_profile_retention1",lp="hm_browser_history1",Tw="hm_browser_tabs1",kE=200,M2=/^(?:access_token|id_token|refresh_token|token|code|authorization|api_?key)$/i;function RE(n){return jE.includes(n)}function Mf(n){const i=String(n??"").trim();if(!i)return null;let l=i;if(/^\d+$/.test(i)){const h=Number(i);if(!Number.isInteger(h)||h<1||h>65535)return null;l=`http://127.0.0.1:${h}/`}else/^[a-z][a-z\d+.-]*:\/\//i.test(i)||(l=`https://${i}`);try{const h=new URL(l);return h.protocol!=="http:"&&h.protocol!=="https:"||!h.hostname?null:h.toString()}catch{return null}}function f_(){const n=localStorage.getItem(H_),i=localStorage.getItem(z_)==="1",l=localStorage.getItem($_),h=l==="never"?null:Number(l),x=DE.includes(h)?h:30,D={persistProxyLogin:i,proxyLoginRetentionDays:x},_=Number(n);return{closeAfter:RE(_)?_:10,...D}}function U2(n){if(!RE(n)){localStorage.removeItem(H_);return}localStorage.setItem(H_,String(n))}function O2(n){n===!0?localStorage.setItem(z_,"1"):localStorage.removeItem(z_)}function V2(n){if(!DE.includes(n)){localStorage.removeItem($_);return}localStorage.setItem($_,n===null?"never":String(n))}function Lw(n){if((n==null?void 0:n.kind)==="static"){const i=String(n.dir||"");return!i.startsWith("/")||i.includes("\0")||i.length>4096?null:{kind:"static",dir:i,title:String(n.title||""),visitedAt:Number.isFinite(Number(n.visitedAt))?Number(n.visitedAt):Date.now()}}try{const i=new URL(String((n==null?void 0:n.url)||""));if(i.protocol!=="http:"&&i.protocol!=="https:")return null;i.username="",i.password="";for(const x of[...i.searchParams.keys()])M2.test(x)&&i.searchParams.delete(x);/(?:^|[&#])(?:access_token|id_token|refresh_token|token|code|authorization|api_?key)=/i.test(i.hash)&&(i.hash="");const l=(n==null?void 0:n.lastMode)==="proxy"?"proxy":(n==null?void 0:n.lastMode)==="direct"?"direct":null,h=/^[A-Za-z0-9_-]{1,128}$/.test(String((n==null?void 0:n.sessionId)||""))?String(n.sessionId):null;return{url:i.toString(),title:String((n==null?void 0:n.title)||""),visitedAt:Number.isFinite(Number(n==null?void 0:n.visitedAt))?Number(n.visitedAt):Date.now(),...l?{lastMode:l}:{},...h?{sessionId:h}:{}}}catch{return null}}function No(){try{const n=JSON.parse(localStorage.getItem(lp)||"[]");return Array.isArray(n)?n.map(Lw).filter(Boolean).slice(0,kE):[]}catch{return[]}}function Cf(n){const i=Lw(n);if(!i)return;const l=No().filter(h=>i.kind==="static"?h.kind!=="static"||h.dir!==i.dir:h.kind==="static"||h.url!==i.url&&(!i.sessionId||h.sessionId!==i.sessionId));localStorage.setItem(lp,JSON.stringify([i,...l].slice(0,kE)))}function B2(n){const i=Lw(n);if(!i)return;const l=No().filter(h=>i.kind==="static"?h.kind!=="static"||h.dir!==i.dir||h.visitedAt!==i.visitedAt:h.kind==="static"||h.url!==i.url||h.visitedAt!==i.visitedAt);localStorage.setItem(lp,JSON.stringify(l))}function P2(){localStorage.removeItem(lp)}function TE(n){const i=Mf(n==null?void 0:n.originalUrl);if(!/^[A-Za-z0-9_-]{1,128}$/.test(String((n==null?void 0:n.id)||""))||!i)return null;const l=Number(n==null?void 0:n.createdAt);return{id:String(n.id),mode:n.mode==="proxy"?"proxy":"direct",originalUrl:i,title:String(n.title||"").slice(0,1024),deadline:Number.isFinite(n.deadline)?n.deadline:null,...Number.isFinite(l)&&l>0?{createdAt:l}:{}}}function I2(){try{const n=JSON.parse(localStorage.getItem(Tw)||"{}"),i=Array.isArray(n.tabs)?n.tabs.map(TE).filter(Boolean):[],l=i.some(x=>x.id===n.activeId)?n.activeId:null,h=l?!!n.historyActive:!0;return{tabs:i,activeId:l,open:!!n.open&&(!!l||n.historyActive===!0),historyActive:h}}catch{return{tabs:[],activeId:null,open:!1,historyActive:!0}}}function F2({tabs:n,activeId:i,open:l,historyActive:h}){const x=(n||[]).map(TE).filter(Boolean),D=x.some(_=>_.id===i)?i:null;localStorage.setItem(Tw,JSON.stringify({tabs:x,activeId:D,open:!!l,historyActive:D?!!h:!0}))}function H2(){localStorage.removeItem(Tw)}function z2(n){return!Array.isArray(n)||n.length===0?null:n.some(i=>(i==null?void 0:i.mode)==="proxy")?"proxy":n.some(i=>(i==null?void 0:i.mode)==="static"||(i==null?void 0:i.kind)==="static")?"static":"direct"}const $2=["button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","a[href]",'[tabindex]:not([tabindex="-1"])'].join(",");function W2({active:n,dialogRef:i,initialFocusRef:l,returnFocusRef:h,onClose:x}){const D=L.useRef(x);D.current=x,L.useEffect(()=>{if(!n)return;const _=h.current,s=requestAnimationFrame(()=>{var f;return(f=l.current)==null?void 0:f.focus()}),u=f=>{if(f.key==="Escape"){f.preventDefault(),D.current();return}if(f.key!=="Tab")return;const g=i.current,d=[...(g==null?void 0:g.querySelectorAll($2))||[]];if(!d.length){f.preventDefault(),g==null||g.focus();return}const y=d[0],N=d[d.length-1],k=document.activeElement;f.shiftKey&&(!g.contains(k)||k===y)?(f.preventDefault(),N.focus()):!f.shiftKey&&(!g.contains(k)||k===N)&&(f.preventDefault(),y.focus())};return window.addEventListener("keydown",u),()=>{cancelAnimationFrame(s),window.removeEventListener("keydown",u),_==null||_.focus()}},[n,i,l,h])}const LE={active:!1,phase:null,pct:0,label:""};let $d=LE,Bd=null;const W_=new Set,Aw=()=>{for(const n of[...W_])n()};function AE(n,i=""){Bd=n,$d={active:!0,phase:"sending",pct:0,label:i},Aw()}function Yf(n){$d={...$d,...n},Aw()}function G_(){Bd=null,$d=LE,Aw()}function g1(){Bd==null||Bd.abort()}const G2=n=>(W_.add(n),()=>W_.delete(n)),Y2=()=>$d;function q2(){return L.useSyncExternalStore(G2,Y2)}const ME=["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"],Mw=ME.map(n=>`.${n}`).join(","),K2=new Set(ME);function X2(n){const i=/\.([A-Za-z0-9]+)$/.exec(n||"");return i?K2.has(i[1].toLowerCase()):!1}function UE(n){const l=(Array.isArray(n)?n:n&&typeof n.length=="number"?Array.from(n):[n]).filter(Boolean),h=[],x=[];for(const D of l)(X2(D.name)?h:x).push(D);return{allowed:h,rejected:x.map(D=>D.name)}}const Y_="\\s'\"`()\\[\\]<>,;,。、;:!?()【】《》「」“”‘’*…:│",J2=["md","markdown","html","htm","txt","log","sh"],Z2=["png","jpg","jpeg","jfif","gif","webp","svg","bmp","ico","avif","apng"],Q2=[...J2,...Z2].join("|"),b1=new RegExp(`[^${Y_}]+\\.(?:${Q2})(?=$|[${Y_}.])`,"gi");function eO(n){const i=[];if(!n)return i;b1.lastIndex=0;let l;for(;(l=b1.exec(n))!==null;){let h=l.index,x=l[0];const D=/^@+/.exec(x);D&&(h+=D[0].length,x=x.slice(D[0].length)),x&&i.push({start:h,end:h+x.length,path:x})}return i}const OE=n=>typeof n=="string"&&n.startsWith("/");function ll(n,i){const l=OE(i)?i:`${n.replace(/\/+$/,"")}/${i}`,h=l.startsWith("/"),x=[];for(const D of l.split("/"))if(!(!D||D===".")){if(D===".."){x.pop();continue}x.push(D)}return(h?"/":"")+x.join("/")}function qf({open:n,title:i,subtitle:l="",actions:h=[],onClose:x,children:D=null}){const[_,s]=L.useState(null);if(L.useEffect(()=>{n||s(null)},[n]),!n)return null;const u=g=>{var d;if(!g.disabled){if(g.confirm&&_!==g.key){s(g.key);return}s(null),(d=g.onClick)==null||d.call(g)}},f=g=>o.jsxDEV("button",{className:`sheet-action ${g.danger?"danger":""} ${_===g.key?"armed":""}`,disabled:g.disabled,onClick:()=>u(g),children:[g.icon&&_!==g.key&&o.jsxDEV("span",{className:"sheet-action-icon","aria-hidden":"true",children:g.icon},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:30,columnNumber:37},this),g.confirm&&_===g.key?g.confirmLabel||M("actionsheet.confirmAgain"):g.label]},g.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:x},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":l?`${i},${l}`:i,"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-heading",children:[o.jsxDEV("span",{className:"settings-title",children:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:41,columnNumber:13},this),l&&o.jsxDEV("span",{className:"settings-subtitle",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:42,columnNumber:26},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:40,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:x,"aria-label":M("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:44,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:[D,h.map((g,d)=>Array.isArray(g)?o.jsxDEV("div",{className:"sheet-row",children:g.map(f)},`row-${d}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:49,columnNumber:15},this):f(g)),o.jsxDEV("button",{className:"fontbtn sheet-cancel",onClick:x,children:M("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:51,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:46,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 cl=[],_1=n=>{var l,h,x;if(n.key!=="Escape"||n.repeat||n.isComposing)return;const i=cl[cl.length-1];i&&(n.preventDefault(),n.stopPropagation(),(l=n.stopImmediatePropagation)==null||l.call(n),(x=(h=i.callback).current)==null||x.call(h))};function Uw(n,i){const l=L.useRef(i),h=L.useRef(null);l.current=i,h.current||(h.current={callback:l}),L.useEffect(()=>{if(!n)return;const x=h.current;return cl.push(x),cl.length===1&&window.addEventListener("keydown",_1,!0),()=>{const D=cl.lastIndexOf(x);D>=0&&cl.splice(D,1),cl.length===0&&window.removeEventListener("keydown",_1,!0)}},[n])}let VE=1;const Ba=[];let w1=!1,Wd=0;const tO=()=>{var i,l;if(Wd>0){Wd-=1;return}const n=Ba[Ba.length-1];n&&((l=(i=n.callback).current)==null||l.call(i))},BE=()=>{w1||(window.addEventListener("popstate",tO,!0),w1=!0)},PE=n=>{const i=Ba.lastIndexOf(n);i>=0&&Ba.splice(i,1),Ba.length===0&&(Wd=0)};function Zd(n,i){const l=L.useRef(i),h=L.useRef(null);l.current=i,h.current||(h.current={id:VE++,callback:l}),Uw(n,()=>window.history.back()),L.useEffect(()=>{if(!n)return;const x=h.current;return BE(),Ba.push(x),()=>PE(x)},[n])}function Qd(n){n<=0||(Ba.length>0&&(Wd+=1),window.history.go(-n))}function nr(n,i){const l=L.useRef(i),h=L.useRef(null);l.current=i,h.current||(h.current={id:VE++,callback:l}),Uw(n,()=>window.history.back()),L.useEffect(()=>{if(!n)return;const x=h.current;return BE(),Ba.push(x),window.history.pushState({overlay:!0,overlayId:x.id},""),()=>{var D;PE(x),((D=window.history.state)==null?void 0:D.overlayId)===x.id&&(Ba.length>0&&(Wd+=1),window.history.back())}},[n])}const nO=/\.(?:md|markdown|html|htm|txt|log|sh)$/i,y1=300;function x1(n){const i=n.lastIndexOf("/");return i<0?{dir:"",frag:n}:{dir:n.slice(0,i+1),frag:n.slice(i+1)}}const rO=n=>n.replace(/\/+$/,"")||"/",p_=(n,i)=>n===i?"":n.startsWith(`${i}/`)?n.slice(i.length+1):n,Ef=(n,i,l)=>{let h=null;for(const x of i||[])(n===x||n!=null&&n.startsWith(`${x}/`))&&(!h||x.length>h.length)&&(h=x);return h||l},iO=n=>n==null?"":n<1024?`${n} B`:n<1024*1024?`${Math.round(n/1024)} KB`:`${(n/1024/1024).toFixed(1)} MB`;function IE({path:n,onNavigate:i,onOpenDoc:l,onJumpToCwd:h,pendingFile:x,onPendingConsumed:D,pickMode:_=!1,allowMkdir:s=!_,onPick:u,refreshKey:f=0,overlayActive:g=!0}){const[d,y]=L.useState(""),[N,k]=L.useState(null),[b,c]=L.useState(!1),[p,v]=L.useState(""),[w,C]=L.useState(""),[T,S]=L.useState(""),[R,j]=L.useState(null),[A,O]=L.useState(!1),[H,V]=L.useState(!1),[P,Y]=L.useState(""),[Q,z]=L.useState(null),X=L.useRef(null),K=L.useRef(!1),B=L.useRef(f),F=L.useRef(null),G=L.useRef(null),Z=L.useRef(null),ae=async(ve,{sync:Ne=!1,notify:Qe=!1,fallbackHome:ye=!1}={})=>{v("");try{const Fe=await _E(ve??void 0);if(K.current=Fe.path,k(Fe),Ne){const ze=p_(Fe.path,Ef(Fe.path,Fe.roots,Fe.home));y(ze?`${ze}/`:"")}Qe&&(i==null||i(Fe.path),V(!1),Y(""))}catch{if(ye&&ve!=null){ae(null,{sync:!0});return}v(M("filebrowser.openDirFailed"))}};L.useEffect(()=>{const ve=f!==B.current;B.current=f,!(n===K.current&&!ve)&&ae(n,{sync:!0,fallbackHome:_})},[n,f]),L.useEffect(()=>()=>{clearTimeout(F.current),clearTimeout(G.current)},[]),L.useEffect(()=>{if(!b)return;const ve=Ne=>{var Qe;(Qe=Z.current)!=null&&Qe.contains(Ne.target)||c(!1)};return document.addEventListener("pointerdown",ve,!0),()=>document.removeEventListener("pointerdown",ve,!0)},[b]),nr(g&&b,()=>c(!1)),nr(g&&!!R,()=>j(null)),nr(g&&H,()=>{V(!1),Y("")});const me=ve=>{C(ve),clearTimeout(G.current),G.current=setTimeout(()=>C(""),2500)},Ue=ve=>{const Ne=N==null?void 0:N.home;if(!Ne){y(ve);return}const Qe=(N==null?void 0:N.roots)||[Ne];let ye=ve;(ye==="~"||ye.startsWith("~/"))&&(ye=Ne+ye.slice(1));let Fe=Ef(N==null?void 0:N.path,Qe,Ne);ye.startsWith("/")&&(Fe=Ef(ye,Qe,Ne),ye=ye===Fe?"":ye.startsWith(`${Fe}/`)?ye.slice(Fe.length+1):ye.replace(/^\/+/,"")),y(ye);const ze=rO(`${Fe}/${x1(ye).dir}`);ze!==K.current&&(clearTimeout(F.current),F.current=setTimeout(()=>{ze!==K.current&&ae(ze,{notify:!0})},250))},De=async ve=>{const Ne=ll(N.path,ve);try{await navigator.clipboard.writeText(Ne),me(M("filebrowser.copiedPath",{abs:Ne}))}catch{me(Ne)}},ie=ve=>l(ll(N.path,ve)),q=ve=>ae(ll(N.path,ve),{sync:!0,notify:!0}),fe=()=>(N==null?void 0:N.parent)&&ae(N.parent,{sync:!0,notify:!0}),le=async()=>{const ve=P.trim();if(!(!ve||!N)){v("");try{await z3(N.path,ve),await ae(N.path,{}),V(!1),Y("")}catch{v(M("filebrowser.mkdirFailed"))}}},Oe=async ve=>{v(""),z({label:M("filebrowser.downloading",{name:ve}),pct:0});try{await a2(ll(N.path,ve),Ne=>z({label:M("filebrowser.downloading",{name:ve}),pct:Ne})),S(ve)}catch{v(M("filebrowser.downloadFailed"))}finally{z(null)}},ke=()=>{const ve=R;j(null),ve&&Oe(ve)},nt=N==null?void 0:N.home,xe=(N==null?void 0:N.roots)||(nt?[nt]:[]),$e=Ef(N==null?void 0:N.path,xe,nt),at=ve=>ve===nt?"~":/\/tmp$/.test(ve)?"tmp":ve.includes("/var/folders/")?"TMPDIR":ve.split("/").filter(Boolean).pop()||"/",Ge=ve=>{c(!1),ve!==$e&&ae(ve,{sync:!0,notify:!0})},Ft=(ve,Ne)=>!ve||!Ne||ve===Ne?!1:(ve.startsWith(`${Ne}/`)?ve.slice(Ne.length+1):ve).split("/").some(ye=>ye.startsWith(".")),Rt=!!N&&N.path!==nt&&!Ft(N.path,$e),oe=async ve=>{const{allowed:Ne,rejected:Qe}=UE(ve);if(!Ne.length)return Qe.length&&v(M("filebrowser.uploadRejected",{names:Qe.join("、")})),Qe;O(!0),v("");const ye=Ne.length,Fe=[],ze=new AbortController;AE(ze,M("filebrowser.uploading",{name:Ne[0].name,tag:ye>1?`(1/${ye})`:""}));try{for(let Nt=0;Nt<ye&&!ze.signal.aborted;Nt++){const Wt=Ne[Nt],Gt=ye>1?`(${Nt+1}/${ye})`:"";Yf({label:M("filebrowser.uploading",{name:Wt.name,tag:Gt}),phase:"sending",pct:0});try{await wE(N.path,Wt,(Qt,Rn)=>Yf({pct:Qt,phase:Rn}),!1,{signal:ze.signal})}catch(Qt){if(Qt instanceof Wf)break;Fe.push({name:Wt.name,reason:(Qt==null?void 0:Qt.message)||M("filebrowser.uploadFailed")})}}}finally{G_()}return await ae(N.path,{}),O(!1),Fe.length?v(Fe.map(Nt=>`${Nt.name}:${Nt.reason}`).join(";")):Qe.length&&v(M("filebrowser.uploadRejected",{names:Qe.join("、")})),[...Fe.map(Nt=>Nt.name),...Qe]},Te=async()=>{x&&(await oe(x)).length===0&&(D==null||D())},Ie=ve=>{if(_||ve.key!=="Enter")return;const Ne=d.trim();Ne&&nO.test(Ne)&&(N!=null&&N.home)&&l(ll(N.home,Ne))},Ve=x1(d).frag.toLowerCase(),tt=((N==null?void 0:N.entries)||[]).filter(ve=>(!_||ve.type==="dir")&&(!Ve||ve.name.toLowerCase().includes(Ve))),ot=tt.length>y1?tt.slice(0,y1):tt,bt=tt.length-ot.length;return o.jsxDEV("div",{className:"browse-view",children:[o.jsxDEV("div",{className:"browse-bar",children:[h&&o.jsxDEV("button",{className:"browse-cwd","aria-label":M("filebrowser.sessionDir"),title:M("filebrowser.jumpToSessionDir"),onClick:h,children:o.jsxDEV(m2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:278,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:277,columnNumber:11},this),o.jsxDEV("button",{className:"browse-up","aria-label":M("filebrowser.parentDir"),disabled:!(N!=null&&N.parent),onClick:fe,children:o.jsxDEV(kw,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:282,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:281,columnNumber:9},this),o.jsxDEV("div",{className:"browse-path",children:[xe.length>1?o.jsxDEV("div",{className:"dd browse-root-dd",ref:Z,children:[o.jsxDEV("button",{type:"button",className:"browse-root","aria-haspopup":"listbox","aria-expanded":b,"aria-label":M("filebrowser.rootSelect"),onClick:()=>c(ve=>!ve),children:[o.jsxDEV("span",{children:[at($e),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:293,columnNumber:17},this),o.jsxDEV("span",{className:`dd-caret${b?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:294,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:289,columnNumber:15},this),b&&o.jsxDEV("div",{className:"dd-menu",role:"listbox",children:xe.map(ve=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":ve===$e,title:ve,className:`dd-option${ve===$e?" is-selected":""}`,onClick:()=>Ge(ve),children:[o.jsxDEV("span",{className:"dd-option-label",children:[at(ve),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:303,columnNumber:23},this),ve===$e&&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:304,columnNumber:41},this)]},ve,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:299,columnNumber:21},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:297,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:288,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:311,columnNumber:13},this),o.jsxDEV("input",{className:"browse-input",value:d,placeholder:M("filebrowser.pathPlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:ve=>Ue(ve.target.value),onKeyDown:Ie},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:313,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:284,columnNumber:9},this),s&&o.jsxDEV("button",{className:"browse-mkdir","aria-label":M("filebrowser.newFolder"),title:M("filebrowser.newFolder"),disabled:!N,onClick:()=>{V(ve=>!ve),Y("")},children:o.jsxDEV(d2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:325,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:320,columnNumber:11},this),!_&&o.jsxDEV("button",{className:"browse-upload","aria-label":M("filebrowser.uploadFile"),title:M(Rt?"filebrowser.uploadToCurrentDir":"filebrowser.enterSubdirToUpload"),disabled:!Rt||A,onClick:()=>{var ve;return(ve=X.current)==null?void 0:ve.click()},children:o.jsxDEV(NE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:336,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:329,columnNumber:11},this),!_&&o.jsxDEV("input",{ref:X,className:"browse-file-input",type:"file",multiple:!0,accept:Mw,onChange:ve=>{oe(Array.from(ve.target.files||[])),ve.target.value=""}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:342,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:275,columnNumber:7},this),H&&o.jsxDEV("div",{className:"browse-newfolder",children:[o.jsxDEV("input",{className:"browse-newfolder-input",autoFocus:!0,value:P,placeholder:M("filebrowser.folderNamePlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:ve=>Y(ve.target.value),onKeyDown:ve=>{ve.key==="Enter"&&le()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:354,columnNumber:11},this),o.jsxDEV("button",{className:"browse-newfolder-ok",onClick:le,children:M("filebrowser.createBtn")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:360,columnNumber:11},this),o.jsxDEV("button",{className:"browse-newfolder-x","aria-label":M("common.cancel"),onClick:()=>{V(!1),Y("")},children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:361,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:353,columnNumber:9},this),!_&&x&&o.jsxDEV("div",{className:"browse-pending",children:[o.jsxDEV("span",{className:"browse-pending-text",children:[M("filebrowser.uploadPendingTo",{name:x.name}),!Rt&&o.jsxDEV("em",{className:"browse-pending-hint",children:M("filebrowser.enterSubdirFirst")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:368,columnNumber:28},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:366,columnNumber:11},this),o.jsxDEV("button",{className:"browse-pending-btn",disabled:!Rt||A,onClick:Te,children:M("filebrowser.upload")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:370,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:365,columnNumber:9},this),p&&o.jsxDEV("div",{className:"bind-error browse-err",children:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:373,columnNumber:15},this),w&&o.jsxDEV("div",{className:"browse-notice",children:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:374,columnNumber:18},this),!_&&T&&o.jsxDEV("div",{className:"browse-saved",children:[o.jsxDEV("span",{className:"browse-saved-text",children:M("filebrowser.savedToDownloads",{name:T})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:377,columnNumber:11},this),o.jsxDEV("button",{className:"browse-saved-close","aria-label":M("common.close"),onClick:()=>S(""),children:"×"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:378,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:376,columnNumber:9},this),!_&&Q&&o.jsxDEV("div",{className:"browse-progress",children:[o.jsxDEV("span",{className:"browse-progress-label",children:[Q.label," ",Math.round(Q.pct*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:383,columnNumber:11},this),o.jsxDEV("span",{className:"browse-progress-track",children:o.jsxDEV("span",{className:"browse-progress-fill",style:{width:`${Math.round(Q.pct*100)}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:385,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:384,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:382,columnNumber:9},this),o.jsxDEV("div",{className:"browse-list",children:[ot.length===0&&!p&&o.jsxDEV("div",{className:"browse-empty",children:M("filebrowser.noMatches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:390,columnNumber:42},this),ot.map(ve=>o.jsxDEV("div",{className:"browse-entry-row",children:[o.jsxDEV("button",{className:"browse-entry",onClick:()=>ve.type==="dir"?q(ve.name):ve.type==="doc"||ve.type==="image"?ie(ve.name):me(M("filebrowser.previewUnsupported")),children:[o.jsxDEV("span",{className:"browse-entry-icon",children:ve.type==="dir"?o.jsxDEV(kc,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:401,columnNumber:71},this):ve.type==="image"?o.jsxDEV(h2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:401,columnNumber:109},this):o.jsxDEV(yE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:401,columnNumber:125},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:401,columnNumber:15},this),o.jsxDEV("span",{className:"browse-entry-name",children:ve.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:402,columnNumber:15},this),ve.type!=="dir"&&o.jsxDEV("span",{className:"browse-entry-size",children:iO(ve.size)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:403,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:393,columnNumber:13},this),ve.type!=="dir"&&o.jsxDEV("button",{className:"browse-copy","aria-label":M("filebrowser.copyAbsPath"),title:M("filebrowser.copyAbsPath"),onClick:()=>De(ve.name),children:o.jsxDEV(SE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:407,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:406,columnNumber:15},this),ve.type!=="dir"&&o.jsxDEV("button",{className:"browse-dl","aria-label":M("filebrowser.download"),onClick:()=>j(ve.name),children:o.jsxDEV(g2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:412,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:411,columnNumber:15},this)]},ve.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:392,columnNumber:11},this)),bt>0&&o.jsxDEV("div",{className:"browse-overflow",children:M("filebrowser.tooMany",{shown:ot.length,total:tt.length})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:418,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:389,columnNumber:7},this),_&&N&&o.jsxDEV("div",{className:"browse-pick-bar",children:o.jsxDEV("button",{className:"browse-pick-confirm",onClick:()=>u==null?void 0:u(N.path),children:M("filebrowser.pickThisDir",{path:p_(N.path,N.home)?`~/${p_(N.path,N.home)}`:"~"})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:423,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:422,columnNumber:9},this),o.jsxDEV(qf,{open:!!R,title:R?M("filebrowser.downloadConfirm",{name:R}):"",actions:[{key:"dl",label:M("filebrowser.download"),onClick:ke}],onClose:()=>j(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:428,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:274,columnNumber:5},this)}const sO=()=>{};function eh({open:n,seedCwd:i=null,hint:l=null,pane:h=null,allowMkdir:x=!1,onPick:D,onClose:_,inset:s=0}){const[u,f]=L.useState(i),g=L.useRef(!1);n&&!g.current?(g.current=!0,u!==i&&f(i)):!n&&g.current&&(g.current=!1);const d=h?async()=>{try{const{cwd:y}=await fl(h);y&&f(y)}catch{}}:null;return n?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop dirpick-backdrop",onClick:_},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% + ${s/2}px))`,"--kb-inset":`${s}px`},role:"dialog","aria-label":M("dirpicker.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:M("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:_,"aria-label":M("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),l&&o.jsxDEV("div",{className:"dirpick-hint",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:41,columnNumber:18},this),o.jsxDEV(IE,{path:u,onNavigate:f,onOpenDoc:sO,onJumpToCwd:d,pickMode:!0,allowMkdir:x,onPick:D,overlayActive:n},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}const aO="allow-scripts allow-forms allow-downloads allow-modals allow-popups allow-same-origin",oO="allow-scripts allow-forms allow-downloads allow-modals allow-popups",Sd=[.75,.8,.9,1,1.1,1.25,1.5,1.75,2];function N1(n){if(n.title)return n.title;try{return new URL(n.originalUrl).hostname}catch{return n.originalUrl}}function S1(n){var i;return((i=n.dir)==null?void 0:i.split("/").filter(Boolean).at(-1))||n.name}function lO(n,i){return[...n.map(h=>({kind:"web",tab:h})),...i.map(h=>({kind:"static",tab:h}))].map((h,x)=>({...h,legacyIndex:x,createdAt:Number(h.tab.createdAt)})).sort((h,x)=>{const D=Number.isFinite(h.createdAt)&&h.createdAt>0,_=Number.isFinite(x.createdAt)&&x.createdAt>0;return D!==_?D?1:-1:D&&h.createdAt!==x.createdAt?h.createdAt-x.createdAt:h.legacyIndex-x.legacyIndex})}function cO({browser:n,staticPreview:i}){var Yt;const{open:l,accessEnabled:h,consentOpen:x,tabs:D,activeId:_,historyActive:s,closeAfter:u,history:f,error:g,persistProxyLogin:d,proxyAvailable:y,openUrl:N,switchTab:k,closeTab:b,setOpen:c,setCloseAfter:p,navigateTab:v,ensureBinding:w,recoverBinding:C,markBindingReady:T,updateTabMeta:S,clearHistory:R,setHistoryMode:j,enableAccess:A,cancelAccess:O,setProxyLoginPolicy:H,recordStaticHistory:V,clearProxyLogin:P,deleteHistory:Y}=n,Q=D.find(ue=>ue.id===_)||null,z=i!=null&&i.selected?i.shownPreview:null,X=!!z,K=s&&!X,B=z||Q,F=(Q==null?void 0:Q.mode)==="proxy"&&!X,[G,Z]=L.useState("direct"),ae=X?"static":K||!Q?G:Q.mode,[me,Ue]=L.useState((Q==null?void 0:Q.originalUrl)||""),[De,ie]=L.useState(!1),[q,fe]=L.useState(!1),[le,Oe]=L.useState("mobile"),[ke,nt]=L.useState({width:0,height:0}),[xe,$e]=L.useState(()=>new Set),[at,Ge]=L.useState(()=>new Set),[Ft,Rt]=L.useState({}),[oe,Te]=L.useState(null),[Ie,Ve]=L.useState(null),[tt,ot]=L.useState(null),[bt,ve]=L.useState(()=>new Set),[Ne,Qe]=L.useState(()=>new Set),[ye,Fe]=L.useState(1),[ze,Nt]=L.useState(!1),[Wt,Gt]=L.useState(null),[Qt,Rn]=L.useState(()=>new Set),[we,Ye]=L.useState(()=>new Set),[J,lt]=L.useState({}),it=L.useRef(new Map),Pt=L.useRef(new Map),pt=L.useRef(new Map),en=L.useRef(new Map),It=L.useRef(_),Ht=L.useRef(l),Ut=L.useRef(null),hn=L.useRef(null),_n=L.useRef(null),Xt=L.useRef(null),jn=L.useRef(null),Nr=L.useRef(null);It.current=_,Ht.current=l,L.useEffect(()=>{Ue(X?(z==null?void 0:z.dir)||"":K?"":(Q==null?void 0:Q.originalUrl)||"")},[K,z==null?void 0:z.dir,X,Q==null?void 0:Q.originalUrl]),L.useEffect(()=>{y||Z("direct")},[y]),L.useEffect(()=>{ie(!1),fe(!1),K||Te(null)},[_,K,l,z==null?void 0:z.name]),L.useEffect(()=>{Fe(1)},[_,le,K,z==null?void 0:z.name]),L.useEffect(()=>{!X||!z||Rn(ue=>new Set(ue).add(z.name))},[z==null?void 0:z.name,X]),L.useEffect(()=>{!X||(z==null?void 0:z.status)!=="ready"||V==null||V({dir:z.dir,title:S1(z)})},[V,z==null?void 0:z.dir,z==null?void 0:z.name,z==null?void 0:z.status,X]),L.useLayoutEffect(()=>{var ue,Ze;!l||K||!_&&!(z!=null&&z.name)||(Ze=(ue=Ut.current)==null?void 0:ue.scrollIntoView)==null||Ze.call(ue,{behavior:"smooth",block:"nearest",inline:"nearest"})},[_,K,l,z==null?void 0:z.name,(Yt=i==null?void 0:i.tabs)==null?void 0:Yt.length,D.length]),L.useEffect(()=>{if(!h){ve(new Set);return}!l||s||X||!Q||(ve(ue=>new Set(ue).add(Q.id)),Q.mode==="proxy"&&Ne.has(Q.id)?(Qe(ue=>{const Ze=new Set(ue);return Ze.delete(Q.id),Ze}),C(Q.id)):Q.mode==="proxy"&&!Q.url&&w(Q.id))},[h,w,s,l,C,X,Ne,Q==null?void 0:Q.id,Q==null?void 0:Q.mode,Q==null?void 0:Q.url]),W2({active:!!Ie,dialogRef:Nr,initialFocusRef:jn,returnFocusRef:Xt,onClose:()=>Ve(null)}),L.useEffect(()=>{const ue=Ze=>{var xn;if(((xn=Ze.data)==null?void 0:xn.source)!=="handmux-browser")return;const st=[...it.current.entries()].find(([,Kt])=>Kt.contentWindow===Ze.source),yt=st&&D.find(Kt=>Kt.id===st[0]);!yt||yt.mode!=="proxy"||yt.channel!==Ze.data.channel||(Ze.data.type==="ready"&&(T(yt.id,Ze.data.channel),Qe(Kt=>{if(!Kt.has(yt.id))return Kt;const fr=new Set(Kt);return fr.delete(yt.id),fr})),Ze.data.type==="navigate"&&Ge(Kt=>new Set(Kt).add(yt.id)),["ready","load","urlchange","title"].includes(Ze.data.type)&&S(yt.id,{url:Ze.data.url,title:Ze.data.title}))};return window.addEventListener("message",ue),()=>window.removeEventListener("message",ue)},[T,D,S]),L.useEffect(()=>{$e(ue=>{const Ze=new Set;for(const st of D)ue.has(st.id)&&Pt.current.get(st.id)===st.url&&Ze.add(st.id);return Pt.current=new Map(D.map(st=>[st.id,st.url])),Ze}),ve(ue=>{const Ze=new Set(D.map(st=>st.id));for(const st of en.current.keys())Ze.has(st)||en.current.delete(st);return new Set([...ue].filter(st=>Ze.has(st)))}),Qe(ue=>{const Ze=new Set(D.map(st=>st.id));return new Set([...ue].filter(st=>Ze.has(st)))})},[D]),L.useEffect(()=>{const ue=(i==null?void 0:i.tabs)||[],Ze=new Set(ue.map(st=>st.name));Ye(st=>{const yt=new Set;for(const xn of ue)st.has(xn.name)&&pt.current.get(xn.name)===xn.url&&yt.add(xn.name);return pt.current=new Map(ue.map(xn=>[xn.name,xn.url])),yt}),Rn(st=>new Set([...st].filter(yt=>Ze.has(yt)))),lt(st=>Object.fromEntries(Object.entries(st).filter(([yt])=>Ze.has(yt))))},[i==null?void 0:i.tabs]),L.useEffect(()=>{if(!l||!_n.current)return;const ue=()=>nt({width:_n.current.clientWidth,height:_n.current.clientHeight});if(ue(),typeof ResizeObserver>"u")return;const Ze=new ResizeObserver(ue);return Ze.observe(_n.current),()=>Ze.disconnect()},[l]);const Or=L.useCallback((ue,Ze)=>{var st,yt;!ue||ue.mode!=="proxy"||(yt=(st=it.current.get(ue.id))==null?void 0:st.contentWindow)==null||yt.postMessage({source:"handmux-browser-parent",channel:ue.channel,command:Ze},"*")},[]),ce=ue=>Or(Q,ue),rt=ue=>{ie(!1),ot(null),i==null||i.deactivate(),k(ue.id)},mt=ue=>{ie(!1),ot(null),k("history"),i==null||i.switchTab(ue.name)},Se=()=>(ie(!1),ot(null),Z("direct"),i==null||i.deactivate(),k("history")),ct=async()=>{if(!B)return;if(X){z.status==="error"?await i.retryPreview(z.name):z.status==="ready"&&(Ye(yt=>{const xn=new Set(yt);return xn.delete(z.name),xn}),lt(yt=>({...yt,[z.name]:(yt[z.name]||0)+1})));return}const ue=Q,Ze=(en.current.get(ue.id)||0)+1;if(en.current.set(ue.id,Ze),Ge(yt=>new Set(yt).add(ue.id)),!F){Rt(yt=>({...yt,[ue.id]:(yt[ue.id]||0)+1}));return}const st=await v(ue.id,ue.originalUrl,ue.mode);if(en.current.get(ue.id)===Ze){if((st==null?void 0:st.id)===ue.id&&st.mode==="proxy"&&st.url){Rt(yt=>({...yt,[ue.id]:(yt[ue.id]||0)+1}));return}Ge(yt=>{const xn=new Set(yt);return xn.delete(ue.id),xn})}},ft=()=>{Q&&(en.current.set(Q.id,(en.current.get(Q.id)||0)+1),ce("stop"),Pt.current.set(Q.id,Q.url),$e(ue=>new Set(ue).add(Q.id)),Ge(ue=>{const Ze=new Set(ue);return Ze.delete(Q.id),Ze}))},Le=ue=>{Pt.current.set(ue.id,ue.url),$e(Ze=>new Set(Ze).add(ue.id)),Ge(Ze=>{const st=new Set(Ze);return st.delete(ue.id),st})},Ct=ue=>{pt.current.set(ue.name,ue.url),Ye(Ze=>new Set(Ze).add(ue.name))},Bn=ue=>{ue.preventDefault(),!X&&(ot(null),i==null||i.deactivate(),K||!Q?N(me,{mode:G}):v(Q.id,me))},tn=ue=>{if(!(X||ue===ae||ue==="proxy"&&!y)){if(ot(null),K||!Q){Z(ue);return}v(Q.id,Q.originalUrl,ue)}},nn=(ue,Ze=ue.lastMode||"direct",st=!1)=>{if(Te(null),ue.kind==="static"){ot(null),i==null||i.startPreview(ue.dir);return}if(Ze==="proxy"&&!y){ot(M("browser.proxyUnavailable"));return}ot(null),st&&j(ue,Ze),N(ue.url,{mode:Ze})},Xn=()=>{let ue;try{ue=new URL(Q.originalUrl).origin}catch{return}Xt.current=document.activeElement,Ve({type:"site",origin:ue})},Lt=()=>{const ue=Ie;Ve(null),(ue==null?void 0:ue.type)==="site"&&P(ue.origin),(ue==null?void 0:ue.type)==="all"&&P(null)},zt=ue=>{Te(null),Y(ue)},Sn=()=>{Se(),Ue(""),requestAnimationFrame(()=>{var ue;return(ue=hn.current)==null?void 0:ue.focus()})},hr=async()=>{var Ze;(Ze=hn.current)==null||Ze.blur();let ue=(i==null?void 0:i.lastPreviewDir)||null;if(!ue&&(i!=null&&i.pane))try{ue=(await fl(i.pane)).cwd||null}catch{}Gt(ue),Nt(!0)},$n=async ue=>{Nt(!1),await(i==null?void 0:i.startPreview(ue))},Jt=ue=>{p(ue),fe(!1)},yr=ue=>Fe(Ze=>ue>0?Sd.find(st=>st>Ze)||Ze:[...Sd].reverse().find(st=>st<Ze)||Ze),Wn=le==="desktop"&&ke.width>0?ke.width/1280:1,gt=ue=>{if(le==="desktop"&&ke.height<=0)return;if(le==="desktop")return{width:`${1280*Wn*ue}px`,height:`${ke.height*ue}px`};const Ze=`${Math.round(ue*100)}%`;return{width:Ze,height:Ze}},se=ue=>{if(!(le==="desktop"&&ke.height<=0))return le==="desktop"?{width:"1280px",height:`${ke.height/Wn}px`,transform:`scale(${Wn*ue})`,transformOrigin:"0 0"}:{width:`${(100/ue).toFixed(4)}%`,height:`${(100/ue).toFixed(4)}%`,transform:ue===1?void 0:`scale(${ue})`,transformOrigin:"0 0"}},Ae=X?z.status==="ensuring"||z.status==="ready"&&(!we.has(z.name)||pt.current.get(z.name)!==z.url):!!Q&&(!xe.has(Q.id)||Pt.current.get(Q.id)!==Q.url||at.has(Q.id)),vt=tt||(K?i==null?void 0:i.error:null)||(X?null:g),on=lO(D,(i==null?void 0:i.tabs)||[]);return x?Co.createPortal(o.jsxDEV("div",{className:"file-sheet browser-sheet open browser-consent",role:"dialog","aria-modal":"true","aria-label":M("browser.consentTitle"),children:o.jsxDEV("div",{className:"browser-consent-card",children:[o.jsxDEV(zd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:476,columnNumber:9},this),o.jsxDEV("h2",{children:M("browser.consentTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:477,columnNumber:9},this),o.jsxDEV("p",{children:M("browser.consentBody")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:478,columnNumber:9},this),o.jsxDEV("ul",{children:[o.jsxDEV("li",{children:M("browser.consentComputer")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:480,columnNumber:11},this),o.jsxDEV("li",{children:M("browser.consentPrivate")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:481,columnNumber:11},this),o.jsxDEV("li",{children:M("browser.consentLimits")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:482,columnNumber:11},this),o.jsxDEV("li",{children:M("browser.consentIdle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:483,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:479,columnNumber:9},this),o.jsxDEV("div",{className:"browser-consent-actions",children:[o.jsxDEV("button",{onClick:O,children:M("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:486,columnNumber:11},this),o.jsxDEV("button",{className:"browser-consent-enable",onClick:A,children:M("browser.acknowledge")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:487,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:485,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:475,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:474,columnNumber:5},this),document.body):Co.createPortal(o.jsxDEV("div",{className:`file-sheet browser-sheet ${l?"open":""}`,"aria-hidden":!l,children:[o.jsxDEV("div",{className:"browser-tabs",role:"tablist","aria-label":M("browser.openTabs"),inert:Ie?"":void 0,children:[o.jsxDEV("button",{className:`browser-tab browser-history-tab ${K?"active":""}`,role:"tab","aria-selected":K,"aria-label":M("browser.history"),title:M("browser.history"),onClick:Se,children:o.jsxDEV(f2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:501,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:498,columnNumber:9},this),o.jsxDEV("div",{className:"browser-tabs-scroll",children:on.map(({kind:ue,tab:Ze})=>{if(ue==="web"){const xn=!X&&!s&&Ze.id===_,Kt=N1(Ze);return o.jsxDEV("span",{ref:xn?Ut:null,className:`browser-tab-wrap ${Ze.mode} ${xn?"active":""}`,children:[o.jsxDEV("button",{className:"browser-tab",role:"tab","aria-selected":xn,title:Ze.originalUrl,onClick:()=>rt(Ze),children:o.jsxDEV("span",{className:"browser-tab-label",children:Kt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:513,columnNumber:21},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:511,columnNumber:19},this),xn&&o.jsxDEV("button",{className:"browser-tab-close","aria-label":M("browser.closeTab",{title:Kt}),onClick:()=>b(Ze.id),children:o.jsxDEV(Gs,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:517,columnNumber:56},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:516,columnNumber:21},this)]},Ze.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:509,columnNumber:17},this)}const st=X&&Ze.name===(z==null?void 0:z.name),yt=S1(Ze);return o.jsxDEV("span",{ref:st?Ut:null,className:`browser-tab-wrap static ${st?"active":""}`,children:[o.jsxDEV("button",{className:"browser-tab",role:"tab","aria-selected":st,title:Ze.dir,onClick:()=>mt(Ze),children:o.jsxDEV("span",{className:"browser-tab-label",children:yt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:529,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:527,columnNumber:17},this),st&&o.jsxDEV("button",{className:"browser-tab-close","aria-label":M("browser.closeTab",{title:yt}),onClick:()=>{i.closeTab(Ze.name)},children:o.jsxDEV(Gs,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:533,columnNumber:80},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:532,columnNumber:19},this)]},`static:${Ze.name}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:525,columnNumber:15},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:503,columnNumber:9},this),o.jsxDEV("button",{className:"browser-head-button","aria-label":M("browser.newTab"),title:M("browser.newTab"),onClick:Sn,children:o.jsxDEV(ap,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:539,columnNumber:127},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:539,columnNumber:9},this),o.jsxDEV("button",{className:"browser-head-button","aria-label":M("browser.minimize"),title:M("browser.minimize"),onClick:()=>{ie(!1),c(!1)},children:o.jsxDEV(Fa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:541,columnNumber:70},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:540,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:496,columnNumber:7},this),o.jsxDEV("div",{className:"browser-nav",inert:Ie?"":void 0,children:[o.jsxDEV("form",{className:"browser-address-form",onSubmit:Bn,children:[o.jsxDEV(zd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:546,columnNumber:11},this),o.jsxDEV("span",{className:`browser-address-mode ${ae}`,children:M(ae==="static"?"browser.staticBadge":ae==="proxy"?"browser.proxyBadge":"browser.directBadge")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:547,columnNumber:11},this),o.jsxDEV("input",{ref:hn,className:"browser-address","aria-label":M("browser.address"),value:me,onChange:ue=>Ue(ue.target.value),readOnly:X,placeholder:M(K?"browser.addressOrDirectoryPlaceholder":"browser.addressPlaceholder"),autoCapitalize:"none",autoCorrect:"off",spellCheck:"false"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:552,columnNumber:11},this),K&&o.jsxDEV("button",{type:"button",className:"browser-address-folder","aria-label":M("browser.chooseDirectory"),title:M("browser.chooseDirectory"),onClick:hr,children:o.jsxDEV(kc,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:560,columnNumber:39},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:558,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:545,columnNumber:9},this),o.jsxDEV("button",{className:`browser-nav-button browser-refresh ${Ae?"loading":""}`,"aria-label":M(Ae&&F?"browser.stop":"browser.refresh"),"aria-busy":Ae,disabled:!B||K||X&&z.status==="ensuring",onClick:Ae&&F?ft:ct,children:Ae&&F?o.jsxDEV(Rw,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:567,columnNumber:39},this):o.jsxDEV(S2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:567,columnNumber:54},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:563,columnNumber:9},this),o.jsxDEV("button",{className:"browser-nav-button browser-options-trigger","aria-label":M("browser.menu"),"aria-expanded":De,onClick:()=>ie(ue=>!ue),children:o.jsxDEV(k2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:570,columnNumber:89},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:569,columnNumber:9},this),De&&l&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"browser-options-backdrop",onClick:()=>ie(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:573,columnNumber:13},this),o.jsxDEV("div",{className:"browser-options-card",role:"dialog","aria-label":M("browser.menu"),children:[!X&&o.jsxDEV("div",{className:"browser-options-section browser-current-mode",children:[o.jsxDEV("strong",{children:M("browser.connectionMode")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:577,columnNumber:19},this),o.jsxDEV("div",{className:"browser-mode-segment",role:"group","aria-label":M("browser.switchMode"),children:[o.jsxDEV("button",{"aria-pressed":ae==="direct",onClick:()=>tn("direct"),children:M("browser.directMode")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:579,columnNumber:21},this),o.jsxDEV("button",{className:"proxy","aria-pressed":ae==="proxy",disabled:!y,"aria-describedby":y?void 0:"browser-options-proxy-unavailable",onClick:()=>tn("proxy"),children:M("browser.proxyMode")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:581,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:578,columnNumber:19},this),y?o.jsxDEV("p",{className:"browser-options-hint browser-proxy-limit",children:M("browser.proxyLimitHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:587,columnNumber:23},this):o.jsxDEV("p",{id:"browser-options-proxy-unavailable",className:"browser-options-hint",children:M("browser.proxyUnavailable")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:588,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:576,columnNumber:17},this),o.jsxDEV("div",{className:"browser-options-row",children:[o.jsxDEV("strong",{children:M("browser.pageView")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:594,columnNumber:17},this),o.jsxDEV("div",{className:"browser-view-segment",role:"group","aria-label":M("browser.viewMode"),children:[o.jsxDEV("button",{"aria-label":M("browser.mobileView"),"aria-pressed":le==="mobile",onClick:()=>Oe("mobile"),children:o.jsxDEV(N2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:597,columnNumber:57},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:596,columnNumber:19},this),o.jsxDEV("button",{"aria-label":M("browser.desktopView"),"aria-pressed":le==="desktop",onClick:()=>Oe("desktop"),children:o.jsxDEV(y2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:599,columnNumber:58},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:598,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:595,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:593,columnNumber:15},this),B&&!K&&o.jsxDEV("div",{className:"browser-options-section",children:o.jsxDEV("div",{className:"browser-options-row browser-zoom-row",children:[o.jsxDEV("strong",{children:M("browser.zoomPage")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:606,columnNumber:21},this),o.jsxDEV("div",{className:"browser-zoom-stepper",role:"group","aria-label":M("browser.zoomPage"),children:[o.jsxDEV("button",{onClick:()=>yr(-1),disabled:ye<=Sd[0],"aria-label":M("preview.zoomOut"),children:"−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:608,columnNumber:23},this),o.jsxDEV("button",{className:"browser-zoom-value",onClick:()=>Fe(1),"aria-label":M("browser.resetZoom"),children:[Math.round(ye*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:610,columnNumber:23},this),o.jsxDEV("button",{onClick:()=>yr(1),disabled:ye>=Sd[Sd.length-1],"aria-label":M("preview.zoomIn"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:612,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:607,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:605,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:604,columnNumber:17},this),Q&&!K&&!X&&o.jsxDEV("div",{className:"browser-options-section",children:o.jsxDEV("a",{className:"browser-options-action browser-open-external",href:Q.originalUrl,target:"_blank",rel:"noopener noreferrer",onClick:()=>ie(!1),children:M("browser.openExternal")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:622,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:621,columnNumber:17},this),!X&&o.jsxDEV("div",{className:"browser-options-section",children:[o.jsxDEV("button",{className:"browser-close-trigger","aria-expanded":q,onClick:()=>fe(ue=>!ue),children:[o.jsxDEV("strong",{children:M("browser.closeTiming")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:632,columnNumber:21},this),o.jsxDEV("span",{children:[M("browser.minutes",{value:u})," ▾"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:633,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:630,columnNumber:19},this),q&&o.jsxDEV("div",{className:"browser-time-options",role:"group","aria-label":M("browser.closeTiming"),children:jE.map(ue=>o.jsxDEV("button",{className:"browser-time-option","aria-pressed":u===ue,onClick:()=>Jt(ue),children:M("browser.minutes",{value:ue})},ue,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:638,columnNumber:25},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:636,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:629,columnNumber:17},this),y&&K&&o.jsxDEV("div",{className:"browser-options-section browser-profile-options",children:[o.jsxDEV("div",{className:"browser-options-row browser-profile-persist",children:[o.jsxDEV("span",{className:"browser-options-title",children:[o.jsxDEV("label",{htmlFor:"browser-profile-persist-toggle",children:o.jsxDEV("strong",{children:M("settings.browserPersistLogin")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:651,columnNumber:25},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:650,columnNumber:23},this),o.jsxDEV("button",{type:"button",className:"settings-close browser-title-help","aria-label":M("browser.proxyLoginHelpLabel"),onClick:ue=>{ue.preventDefault(),Xt.current=ue.currentTarget,Ve({type:"help-profile"})},children:"?"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:653,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:649,columnNumber:21},this),o.jsxDEV("span",{className:"browser-options-control",children:o.jsxDEV("span",{className:"cmd-switch",children:[o.jsxDEV("input",{id:"browser-profile-persist-toggle",type:"checkbox",checked:!!d,onChange:ue=>H({persist:ue.target.checked,retentionDays:null})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:663,columnNumber:25},this),o.jsxDEV("span",{className:"cmd-switch-track","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:668,columnNumber:25},this),o.jsxDEV("span",{className:"cmd-switch-knob","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:669,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:662,columnNumber:23},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:661,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:648,columnNumber:19},this),o.jsxDEV("button",{className:"browser-options-danger",onClick:()=>{Xt.current=document.activeElement,Ve({type:"all"})},children:M("browser.clearAllLogin")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:673,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:647,columnNumber:17},this),y&&(Q==null?void 0:Q.mode)==="proxy"&&!K&&!X&&o.jsxDEV("div",{className:"browser-options-section",children:o.jsxDEV("div",{className:"browser-site-cookie-row",children:[o.jsxDEV("button",{className:"browser-options-danger",onClick:Xn,children:M("browser.clearSiteLogin")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:683,columnNumber:21},this),o.jsxDEV("button",{className:"settings-close browser-title-help","aria-label":M("browser.siteCookieHelpLabel"),onClick:ue=>{Xt.current=ue.currentTarget,Ve({type:"help-site"})},children:"?"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:686,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:682,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:681,columnNumber:17},this),K&&o.jsxDEV("div",{className:"browser-options-section",children:o.jsxDEV("button",{className:"browser-options-action",onClick:()=>{Xt.current=document.activeElement,Ve({type:"help-about"})},children:M("browser.about")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:698,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:697,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:574,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:572,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:544,columnNumber:7},this),o.jsxDEV("div",{ref:_n,className:`browser-content ${le==="desktop"?"desktop":""}`,inert:Ie?"":void 0,children:[o.jsxDEV("section",{className:"browser-history",hidden:!K,children:[o.jsxDEV("div",{className:"browser-history-head",children:[o.jsxDEV("h2",{children:M("browser.history")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:713,columnNumber:13},this),f.length>0&&o.jsxDEV("button",{onClick:R,children:M("browser.clearHistory")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:714,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:712,columnNumber:11},this),f.length===0?o.jsxDEV("p",{className:"browser-empty",children:M("browser.emptyHistory")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:716,columnNumber:35},this):o.jsxDEV("div",{className:"browser-history-list",children:f.map((ue,Ze)=>{const st=ue.kind==="static",yt=`${ue.visitedAt}-${st?ue.dir:ue.url}-${Ze}`;return o.jsxDEV("div",{className:"browser-history-row",children:[o.jsxDEV("button",{className:"browser-history-main",onClick:()=>nn(ue),children:[o.jsxDEV("strong",{children:ue.title||(st?ue.dir:ue.url)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:724,columnNumber:23},this),o.jsxDEV("span",{className:"browser-history-meta",children:[o.jsxDEV("span",{className:`browser-history-mode ${st?"static":ue.lastMode||"direct"}`,children:M(st?"browser.staticBadge":ue.lastMode==="proxy"?"browser.proxyBadge":"browser.directBadge")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:726,columnNumber:25},this),o.jsxDEV("span",{className:"browser-history-url",children:st?ue.dir:ue.url},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:731,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:725,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:723,columnNumber:21},this),o.jsxDEV("button",{className:"browser-history-more","aria-label":M(st?"browser.historyActions":"browser.historyMore"),"aria-expanded":oe===yt,onClick:()=>Te(xn=>xn===yt?null:yt),children:"…"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:734,columnNumber:21},this),oe===yt&&o.jsxDEV("div",{className:"browser-history-mode-menu",role:"dialog","aria-label":M(st?"browser.historyActions":"browser.openMode"),children:[!st&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("button",{className:"browser-history-mode-option",onClick:()=>nn(ue,"direct",!0),children:M("browser.directMode")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:743,columnNumber:29},this),o.jsxDEV("button",{className:"browser-history-mode-option proxy",disabled:!y,"aria-describedby":y?void 0:`browser-history-proxy-unavailable-${Ze}`,onClick:()=>nn(ue,"proxy",!0),children:M("browser.proxyMode")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:744,columnNumber:29},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:742,columnNumber:27},this),o.jsxDEV("button",{className:"browser-history-mode-option danger",onClick:()=>zt(ue),children:M("browser.deleteHistoryEntry")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:749,columnNumber:25},this),!st&&!y&&o.jsxDEV("p",{id:`browser-history-proxy-unavailable-${Ze}`,children:M("browser.proxyUnavailable")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:751,columnNumber:61},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:739,columnNumber:23},this)]},yt,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:722,columnNumber:19},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:717,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:711,columnNumber:9},this),D.filter(ue=>bt.has(ue.id)).map(ue=>{const Ze=!X&&!s&&ue.id===_,st=Ze&&(!xe.has(ue.id)||Pt.current.get(ue.id)!==ue.url||at.has(ue.id));return o.jsxDEV("div",{className:`browser-pane ${ue.mode} ${Ze?"active":""}`,"aria-hidden":!Ze,children:o.jsxDEV("div",{className:"browser-frame-scaler",style:gt(Ze?ye:1),children:[o.jsxDEV("iframe",{ref:yt=>{yt?it.current.set(ue.id,yt):it.current.delete(ue.id)},"data-tab-id":ue.id,className:"browser-frame",title:N1(ue),src:ue.url,sandbox:aO,style:se(Ze?ye:1),onLoad:()=>Le(ue),onError:()=>{ue.mode==="proxy"&&(Ht.current&&It.current===ue.id?C(ue.id):Qe(yt=>new Set(yt).add(ue.id)))}},`${ue.id}-${Ft[ue.id]||0}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:767,columnNumber:15},this),st&&o.jsxDEV("div",{className:"browser-page-loading",role:"status","aria-live":"polite",children:o.jsxDEV("div",{className:"browser-page-progress",role:"progressbar","aria-label":M("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:784,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:783,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:766,columnNumber:13},this)},ue.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:764,columnNumber:11},this)}),((i==null?void 0:i.tabs)||[]).filter(ue=>Qt.has(ue.name)).map(ue=>{var yt;const Ze=X&&ue.name===(z==null?void 0:z.name),st=Ze&&ue.status==="ready"&&(!we.has(ue.name)||pt.current.get(ue.name)!==ue.url);return o.jsxDEV("div",{className:`browser-pane static ${Ze?"active":""}`,"aria-hidden":!Ze,children:ue.status==="ready"?o.jsxDEV("div",{className:"browser-frame-scaler",style:gt(Ze?ye:1),children:[o.jsxDEV("iframe",{className:"browser-frame","data-static-tab-name":ue.name,title:ue.name,src:ue.url,sandbox:oO,style:se(Ze?ye:1),onLoad:()=>Ct(ue)},`${ue.name}-${J[ue.name]||0}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:800,columnNumber:17},this),st&&o.jsxDEV("div",{className:"browser-page-loading",role:"status","aria-live":"polite",children:o.jsxDEV("div",{className:"browser-page-progress static",role:"progressbar","aria-label":M("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:811,columnNumber:21},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:810,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:799,columnNumber:15},this):o.jsxDEV("div",{className:"browser-static-state",role:ue.status==="error"?"alert":"status",children:[o.jsxDEV("strong",{children:ue.status==="error"?((yt=ue.error)==null?void 0:yt.message)||M("browser.loadFailed"):M("browser.staticOpening")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:817,columnNumber:17},this),o.jsxDEV("span",{children:ue.dir},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:820,columnNumber:17},this),ue.status==="error"&&o.jsxDEV("button",{onClick:()=>i.retryPreview(ue.name),children:M("browser.retry")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:822,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:816,columnNumber:15},this)},`static-pane:${ue.name}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:796,columnNumber:11},this)}),vt&&o.jsxDEV("div",{className:"browser-error",role:"alert",children:[o.jsxDEV("span",{children:(vt==null?void 0:vt.message)||vt||M("browser.loadFailed")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:833,columnNumber:13},this),!X&&!tt&&Q&&Q.mode==="direct"&&y?o.jsxDEV("button",{onClick:()=>v(Q.id,Q.originalUrl,"proxy"),children:M("browser.tryProxy")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:835,columnNumber:17},this):!X&&!tt&&Q&&o.jsxDEV("button",{onClick:()=>Q.mode==="proxy"?C(Q.id):v(Q.id,Q.originalUrl,Q.mode),children:M("browser.retry")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:836,columnNumber:66},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:832,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:709,columnNumber:7},this),o.jsxDEV(eh,{open:ze,seedCwd:Wt,pane:i==null?void 0:i.pane,hint:M("browser.directoryPickerHint"),onPick:$n,onClose:()=>Nt(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:844,columnNumber:7},this),Ie&&o.jsxDEV("div",{className:"browser-profile-confirm-backdrop",children:o.jsxDEV("div",{ref:Nr,className:"browser-profile-confirm",role:Ie.type.startsWith("help-")?"dialog":"alertdialog","aria-modal":"true","aria-label":M(Ie.type==="help-about"?"browser.about":Ie.type==="help-profile"?"browser.proxyLogin":Ie.type==="help-site"?"browser.siteProxyCookie":Ie.type==="site"?"browser.clearSiteLogin":Ie.type==="all"?"browser.clearAllLogin":"browser.proxyLogin"),children:[Ie.type==="help-about"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("h2",{children:M("browser.consentTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:869,columnNumber:17},this),o.jsxDEV("p",{children:M("browser.consentBody")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:870,columnNumber:17},this),o.jsxDEV("ul",{children:[o.jsxDEV("li",{children:M("browser.consentComputer")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:872,columnNumber:19},this),o.jsxDEV("li",{children:M("browser.consentPrivate")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:873,columnNumber:19},this),o.jsxDEV("li",{children:M("browser.consentLimits")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:874,columnNumber:19},this),o.jsxDEV("li",{children:M("browser.consentIdle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:875,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:871,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:868,columnNumber:15},this):o.jsxDEV("p",{children:M(Ie.type==="help-profile"?"browser.proxyLoginHelp":Ie.type==="help-site"?"browser.siteCookieHelp":Ie.type==="site"?"browser.clearSiteLoginConfirm":Ie.type==="all"?"browser.clearAllLoginConfirm":"browser.proxyLoginHelp")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:879,columnNumber:15},this),o.jsxDEV("div",{children:Ie.type.startsWith("help-")?o.jsxDEV("button",{ref:jn,onClick:()=>Ve(null),children:M("browser.acknowledge")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:891,columnNumber:17},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("button",{ref:jn,onClick:()=>Ve(null),children:M("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:894,columnNumber:19},this),o.jsxDEV("button",{className:"danger",onClick:Lt,children:M("common.confirm")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:895,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:893,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:889,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:854,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:853,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BrowserSheet.jsx",lineNumber:495,columnNumber:5},this),document.body)}const uO={working:"working",compacting:"working",done:"done",idle:"done",permission:"needs"},q_={needs:3,done:2,working:1},dO={working:M("inbox.view.working"),done:M("inbox.view.done"),needs:M("inbox.view.needs")};function hO(n,i={},l=0){const h=[];for(const[x,D]of Object.entries(n)){const _=uO[D.kind];if(!_)continue;const s=D.ts||0;_==="done"&&!(s>Math.max(l||0,i[x]||0))||h.push({pane:x,session:D.session,window:D.window,windowName:D.windowName,view:_,msg:D.msg||"",ts:s,agent:D.agent||"claude"})}return h.sort((x,D)=>x.session<D.session?-1:x.session>D.session?1:q_[D.view]-q_[x.view]||D.ts-x.ts),h}function mO(n){const i={working:0,done:0,needs:0};for(const l of n)i[l.view]!=null&&(i[l.view]+=1);return i}function fO(n){let i=null,l=0;for(const h of n){const x=q_[h.view]||0;x>l&&(l=x,i=h.view)}return i}function C1(n){let i=0;for(const l of Object.values(n))(l.ts||0)>i&&(i=l.ts);return i}function FE(n,i){if(!n)return"";const l=Math.max(0,Math.round((i-n)/1e3));if(l<60)return M("time.secAgo",{n:l});const h=Math.round(l/60);if(h<60)return M("time.minAgo",{n:h});const x=Math.round(h/60);return x<24?M("time.hourAgo",{n:x}):M("time.dayAgo",{n:Math.round(x/24)})}function v_(n,i,l){const h=n.findIndex(x=>x.id===i);return h<0?null:n[l==="left"?h-1:h+1]??null}const HE="tw_notify",zE="tw_push_device_key",K_=/^[A-Za-z0-9_-]{16,128}$/,Gd=1e4,Ow=2e4,Pd=()=>localStorage.getItem(HE)==="1",X_=n=>localStorage.setItem(HE,n?"1":"0"),pO=()=>{const n=localStorage.getItem(zE);return K_.test(n||"")?n:null},Vw=n=>(K_.test(n||"")&&localStorage.setItem(zE,n),K_.test(n||"")?n:null);function th(){return typeof navigator<"u"&&"serviceWorker"in navigator&&typeof window<"u"&&"PushManager"in window&&"Notification"in window}function $E(){var n;return typeof window<"u"&&(((n=window.matchMedia)==null?void 0:n.call(window,"(display-mode: standalone)").matches)||window.navigator.standalone===!0)||!1}const vO=()=>/iP(hone|ad|od)/.test(navigator.userAgent||"");function vl(n={}){return{Authorization:`Bearer ${wl()??""}`,...n}}function J_(n){const i=new Error(M(n));return i.code=n,i}function g_(n,i){const l=new Error(M(n,i));return l.code=n,l}function hl(n,i,l){let h;return Promise.race([Promise.resolve(n),new Promise((x,D)=>{h=setTimeout(()=>D(J_(l)),i)})]).finally(()=>clearTimeout(h))}async function gl(n,i,l){const h=new AbortController;let x,D=!1;try{return await Promise.race([fetch(n,{...i,signal:h.signal}),new Promise((_,s)=>{x=setTimeout(()=>{D=!0,h.abort(),s(J_(l))},Gd)})])}catch(_){throw D?J_(l):_}finally{clearTimeout(x)}}const nh=()=>hl(navigator.serviceWorker.ready,Gd,"push.swTimeout"),cp=n=>hl(n.pushManager.getSubscription(),Ow,"push.browserTimeout");function gO(n){const i="=".repeat((4-n.length%4)%4),l=(n+i).replace(/-/g,"+").replace(/_/g,"/"),h=atob(l),x=new Uint8Array(h.length);for(let D=0;D<h.length;D+=1)x[D]=h.charCodeAt(D);return x}async function bO(){if(!th())throw new Error(M("push.unsupported"));if(vO()&&!$E())throw new Error(M("push.iosAddToHome"));if(await hl(Notification.requestPermission(),Gd,"push.permissionTimeout")!=="granted")throw new Error(M("push.permissionDenied"));try{await hl(navigator.serviceWorker.register("/sw.js"),Gd,"push.swRegisterTimeout")}catch(f){throw(f==null?void 0:f.code)==="push.swRegisterTimeout"?f:g_("push.swRegisterFailed",{reason:(f==null?void 0:f.message)||M("push.unknownReason")})}const i=await nh(),l=await gl("/api/push/vapid",{headers:vl(),cache:"no-store"},"push.configTimeout");if(!l.ok)throw new Error(M("push.noVapid"));const{key:h}=await l.json();let x=await cp(i);x||(x=await hl(i.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:gO(h)}),Ow,"push.browserTimeout"));const D={subscription:x,boundSessions:ma()},_=pO();_&&(D.pushKey=_);const s=await gl("/api/push/subscribe",{method:"POST",headers:vl({"Content-Type":"application/json"}),body:JSON.stringify(D)},"push.reportTimeout");if(!s.ok){if(s.status===410){try{await x.unsubscribe()}catch{}throw X_(!1),g_("push.subscriptionExpired")}throw s.status===502?g_("push.deliveryRejected"):new Error(M("push.subscribeFailed"))}const u=await s.json();return Vw(u.pushKey),X_(!0),!0}async function _O(){X_(!1),(async()=>{try{const n=await nh(),i=await cp(n);if(!i)return;const[l]=await Promise.allSettled([gl("/api/push/unsubscribe",{method:"POST",headers:vl({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:i.endpoint})},"push.reportTimeout"),hl(Promise.resolve().then(()=>i.unsubscribe()),Ow,"push.browserTimeout")]);if(l.status==="fulfilled"&&l.value.ok){const h=await l.value.json();Vw(h.pushKey)}}catch{}})()}async function _c(){if(!(!Pd()||!th()))try{const n=await nh(),i=await cp(n);if(!i)return;await gl("/api/push/bound",{method:"POST",headers:vl({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:i.endpoint,boundSessions:ma()})},"push.reportTimeout")}catch{}}async function Bw(n){if(!th())return null;try{const i=await nh(),l=await cp(i);if(!l)return null;const h=await gl("/api/push/key",{method:"POST",headers:vl({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:l.endpoint})},"push.configTimeout");if(h.status===401)throw new li;if(!h.ok){if(n){const x=new Error("push key lookup failed");throw x.status=h.status,x}return null}return Vw((await h.json()).pushKey)}catch(i){if(n)throw i;return null}}const wO=()=>Bw(!1);async function yO(n){if(th())try{const i=await nh();(await hl(i.getNotifications({tag:`pane-${n}`}),Gd,"push.swTimeout")).forEach(h=>h.close())}catch{}}async function xO(){if(!Pd())return[];const n=await Bw(!0);if(!n)return[];const i=await gl(`/api/notifications?device=${encodeURIComponent(n)}`,{headers:vl(),cache:"no-store"},"push.configTimeout");if(i.status===401)throw new li;if(!i.ok){const l=new Error("notification inbox load failed");throw l.status=i.status,l}return(await i.json()).items||[]}async function NO(n){const i=await Bw(!0);if(!i)throw new Error("notification device unavailable");const l=await gl(`/api/notifications/${encodeURIComponent(n)}?device=${encodeURIComponent(i)}`,{method:"DELETE",headers:vl()},"push.reportTimeout");if(l.status===401)throw new li;if(!l.ok||(await l.json()).ok!==!0)throw new Error("notification delete failed");return!0}function SO(n){if(typeof n!="string")return null;const i=n.trim();if(!i)return null;try{const l=new URL(i,window.location.origin);return l.protocol!=="http:"&&l.protocol!=="https:"?null:i}catch{return null}}function E1(n){const i=Math.max(0,Date.now()-n),l=Math.floor(i/6e4);if(l<1)return M("pushInbox.justNow");if(l<60)return M("pushInbox.minutesAgo").replace("{n}",l);const h=Math.floor(l/60);return h<24?M("pushInbox.hoursAgo").replace("{n}",h):new Date(n).toLocaleDateString()}const CO={expired:"pushInbox.deliveryReasonExpired",rate_limited:"pushInbox.deliveryReasonRateLimited",service_unavailable:"pushInbox.deliveryReasonUnavailable",rejected:"pushInbox.deliveryReasonRejected",network_error:"pushInbox.deliveryReasonNetwork",not_configured:"pushInbox.deliveryReasonNotConfigured"};function b_(n,i=!1){if((n==null?void 0:n.status)==="pending")return M("pushInbox.deliveryPending");if((n==null?void 0:n.status)==="success")return M("pushInbox.deliverySuccess");if((n==null?void 0:n.status)==="failed"){if(!i)return M("pushInbox.deliveryFailed");const l=M(CO[n.reason]||"pushInbox.deliveryReasonUnknown");return`${M("pushInbox.deliveryFailed")} · ${l}`}return""}function EO({open:n,detailId:i,items:l,readIds:h=[],onOpenDetail:x,onCloseDetail:D,onClose:_,onDelete:s,deletingId:u=null,error:f="",onRetry:g,onMarkAllRead:d,unreadCount:y=0}){const N=new Set(h),k=i!=null,b=k?l.find(w=>w.id===i):null,c=SO(b==null?void 0:b.url),p=b_(b==null?void 0:b.delivery,!0),v=l.some(w=>!N.has(w.id));return Co.createPortal(o.jsxDEV("div",{className:`file-sheet push-inbox-sheet ${n?"open":""}`,"aria-hidden":!n,role:"dialog","aria-label":M("pushInbox.title"),children:[o.jsxDEV("div",{className:"file-tabs push-inbox-head",children:[k?o.jsxDEV("div",{className:"push-inbox-drill-head",children:[o.jsxDEV("button",{className:"push-inbox-back","aria-label":M("pushInbox.back"),title:M("pushInbox.back"),onClick:D,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:M("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:[M("pushInbox.title"),y>0&&o.jsxDEV("span",{className:"push-inbox-unread-count",children:M("pushInbox.unreadCount").replace("{n}",y)},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),!k&&v&&o.jsxDEV("button",{className:"push-inbox-markall",onClick:d,children:M("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":M("common.close"),title:M("common.close"),onClick:_,children:o.jsxDEV(Fa,{},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:[f&&o.jsxDEV("div",{className:"push-inbox-error",role:"alert",children:[o.jsxDEV("span",{children:f},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:g,children:M("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),k?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:E1(b.ts)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:83,columnNumber:15},this),p&&o.jsxDEV("div",{className:`push-inbox-delivery detail ${b.delivery.status}`,children:p},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),c&&o.jsxDEV("a",{className:"fontbtn push-inbox-openurl",href:c,children:M("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:u!=null,onClick:async()=>{await s(b.id)&&D()},children:M("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:M("pushInbox.expired")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:93,columnNumber:13},this):l.length===0&&!f?o.jsxDEV("p",{className:"push-inbox-empty",children:M("pushInbox.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:96,columnNumber:11},this):l.length>0?o.jsxDEV("ul",{className:"push-inbox-list",children:l.map(w=>o.jsxDEV("li",{className:`push-inbox-row${N.has(w.id)?"":" push-inbox-unread"}`,children:[o.jsxDEV("button",{className:"push-inbox-main",onClick:()=>x(w.id),children:[o.jsxDEV("div",{className:"push-inbox-row-top",children:[o.jsxDEV("span",{className:"push-inbox-row-title",children:w.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:103,columnNumber:21},this),b_(w.delivery)&&o.jsxDEV("span",{className:`push-inbox-delivery ${w.delivery.status}`,children:b_(w.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:E1(w.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:w.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:u!=null,onClick:()=>s(w.id),"aria-label":M("pushInbox.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:111,columnNumber:17},this)]},w.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 jO={key:"home",type:"home",name:M("doc.home")},WE=(n,i)=>({...n,type:i.type??n.type,name:i.name??n.name,content:i.content!==void 0?i.content:n.content,mtime:i.mtime!==void 0?i.mtime:n.mtime});function DO(n,i,l){if(n.tabs.some(x=>x.key===i))return{tabs:n.tabs.map(x=>x.key===i?WE(x,l):x),active:i};const h={key:i,type:l.type,name:l.name,content:l.content,mtime:l.mtime,path:i};return{tabs:[...n.tabs,h],active:i}}function kO(n,i,l){return n.tabs.some(h=>h.key===i)?{...n,tabs:n.tabs.map(h=>h.key===i?WE(h,l):h)}:n}function RO(n,i){const l=n.tabs.findIndex(D=>D.key===i);if(l<=0)return n;const h=n.tabs.filter(D=>D.key!==i),x=n.active===i?n.tabs[l-1].key:n.active;return{tabs:h,active:x}}function TO(){const[n,i]=L.useState({tabs:[jO],active:"home"}),l=L.useCallback((_,s)=>i(u=>DO(u,_,s)),[]),h=L.useCallback((_,s)=>i(u=>kO(u,_,s)),[]),x=L.useCallback(_=>i(s=>RO(s,_)),[]),D=L.useCallback(_=>i(s=>({...s,active:_})),[]);return{tabs:n.tabs,active:n.active,openDoc:l,refreshDoc:h,closeTab:x,activate:D}}function j1(n){return String(n||"").replace(/[^A-Za-z0-9._-]+/g,"-").replace(/-{2,}/g,"-").replace(/^[-.]+|-+$/g,"").toLowerCase()}function LO({session:n,windowName:i,windowId:l}){const h=[n,i].map(j1).filter(Boolean);return h.push(j1(l)||"w"),h.join("-")}const GE="hm_static_preview_tabs1";function AO(){try{const n=JSON.parse(localStorage.getItem(GE)||"[]");if(!Array.isArray(n))return{tabs:[],duplicateNames:[]};const i=n.filter(D=>D&&/^[A-Za-z0-9._-]+$/.test(String(D.name||""))&&typeof D.dir=="string"&&D.dir.startsWith("/")).map(D=>{const _=Number(D.createdAt);return{name:String(D.name),dir:D.dir,...Number.isFinite(_)&&_>0?{createdAt:_}:{}}}),l=new Set,h=[],x=[];for(const D of i)l.has(D.dir)?x.push(D.name):(l.add(D.dir),h.push(D));return{tabs:h,duplicateNames:x}}catch{return{tabs:[],duplicateNames:[]}}}function D1(n){try{localStorage.setItem(GE,JSON.stringify(n.map(({name:i,dir:l,createdAt:h})=>({name:i,dir:l,...Number.isFinite(h)&&h>0?{createdAt:h}:{}}))))}catch{}}function MO(n){var P,Y,Q,z,X,K,B;const i=L.useRef(null);i.current||(i.current=AO());const[l,h]=L.useState(i.current.tabs),[x,D]=L.useState({}),[_,s]=L.useState(null),[u,f]=L.useState(!1),[g,d]=L.useState(null),y=L.useRef(l),N=L.useRef(x),k=L.useRef(new Map);y.current=l,N.current=x;const b=L.useCallback(F=>{const G=typeof F=="function"?F(y.current):F;return y.current=G,h(G),D1(G),G},[]),c=L.useCallback((F,G)=>{D(Z=>{const ae={...Z,[F]:G};return N.current=ae,ae})},[]),p=L.useCallback(F=>{D(G=>{if(!(F in G))return G;const Z={...G};return delete Z[F],N.current=Z,Z})},[]),v=L.useCallback((F,G)=>{const ae=(k.current.get(F)||Promise.resolve()).catch(()=>{}).then(G),me=ae.catch(()=>{});return k.current.set(F,me),ae.finally(()=>{k.current.get(F)===me&&k.current.delete(F)})},[]),w=L.useCallback((F,{quiet:G=!1,allowDetached:Z=!1}={})=>v(F.name,async()=>{const ae=N.current[F.name];(!G||(ae==null?void 0:ae.status)!=="ready")&&c(F.name,{...ae,status:"ensuring",error:null});try{const me=await o2(F.name,{dir:F.dir});if(typeof(me==null?void 0:me.url)!="string"||!me.url)throw new Error("preview URL unavailable");return!Z&&!y.current.some(Ue=>Ue.name===F.name)?(await m_(F.name).catch(()=>{}),p(F.name),null):(c(F.name,{status:"ready",url:me.url,error:null}),d(null),me)}catch(me){if(!Z&&!y.current.some(De=>De.name===F.name))return p(F.name),null;if(G&&(ae==null?void 0:ae.status)==="ready")return null;const Ue=me instanceof Error?me:new Error(String(me));return c(F.name,{...ae,status:"error",error:Ue}),d(Ue),null}}),[p,v,c]);L.useEffect(()=>{D1(y.current);const F=i.current.duplicateNames.splice(0);Promise.all(F.map(Z=>m_(Z).catch(()=>{}))),Promise.all(y.current.map(Z=>w(Z)));const G=()=>{document.hidden||Promise.all(y.current.map(Z=>w(Z,{quiet:!0})))};return document.addEventListener("visibilitychange",G),()=>document.removeEventListener("visibilitychange",G)},[w]);const C=n?LO({session:(P=n.session)==null?void 0:P.name,windowName:(Y=n.window)==null?void 0:Y.name,windowId:(Q=n.window)==null?void 0:Q.id}):null,T=l.map(F=>{var G,Z,ae;return{...F,kind:"static",status:((G=x[F.name])==null?void 0:G.status)||"ensuring",url:((Z=x[F.name])==null?void 0:Z.url)||null,error:((ae=x[F.name])==null?void 0:ae.error)||null}}),S=((z=T.find(F=>F.name===_))==null?void 0:z.name)??((X=T[0])==null?void 0:X.name)??null,R=u&&T.find(F=>F.name===S)||null,j=L.useCallback(async F=>{var Ue,De;if(!C)return null;const G=y.current.find(ie=>ie.dir===F);if(G){JS((Ue=n==null?void 0:n.window)==null?void 0:Ue.id,F),s(G.name),f(!0);const ie=N.current[G.name];if((ie==null?void 0:ie.status)==="ready")return{...G,...ie};const q=k.current.get(G.name),fe=q?await q:await w(G);return fe?{...G,...fe}:null}const Z=y.current.find(ie=>ie.name===C),ae={name:C,dir:F,createdAt:(Z==null?void 0:Z.createdAt)||Date.now()},me=await w(ae,{allowDetached:!0});return me?(JS((De=n==null?void 0:n.window)==null?void 0:De.id,F),b(ie=>[...ie.filter(q=>q.name!==ae.name),ae]),s(ae.name),f(!0),{...ae,...me}):null},[b,C,(K=n==null?void 0:n.window)==null?void 0:K.id,w]),A=L.useCallback((F=S)=>{const G=y.current.find(Z=>Z.name===F);return G?w(G):Promise.resolve(null)},[S,w]),O=L.useCallback(F=>{y.current.some(G=>G.name===F)&&(s(F),f(!0))},[]),H=L.useCallback(()=>f(!1),[]),V=L.useCallback(async F=>{var Z;if(!F)return;d(null);const G=b(ae=>ae.filter(me=>me.name!==F));p(F),_===F&&(s(((Z=G[0])==null?void 0:Z.name)||null),G.length||f(!1));try{await v(F,()=>m_(F))}catch(ae){d(ae instanceof Error?ae:new Error(String(ae)))}},[_,p,b,v]);return{error:g,selected:u,deactivate:H,curPreviewName:C,tabs:T,activeName:S,shownPreview:R,startPreview:j,retryPreview:A,switchTab:O,closeTab:V,pane:(n==null?void 0:n.paneId)||null,lastPreviewDir:WU((B=n==null?void 0:n.window)==null?void 0:B.id)}}const k1=n=>({...n,...n.mode==="direct"?{url:n.originalUrl}:{}}),__=[250,500,1e3,2e3,4e3,5e3];function w_(n){return[502,503,504].includes(n==null?void 0:n.status)||/(?:timeout|browser unavailable|failed to fetch|networkerror|load failed)/i.test((n==null?void 0:n.message)||"")}const UO=n=>new Promise(i=>setTimeout(i,n));function R1(){const n=new Error("browser open aborted");return n.name="AbortError",n}function T1(n,i){return i?i.aborted?Promise.reject(R1()):new Promise((l,h)=>{const x=()=>h(R1());i.addEventListener("abort",x,{once:!0}),Promise.resolve(n).then(l,h).finally(()=>{i.removeEventListener("abort",x)})}):n}function OO(){const n=new Uint8Array(18);return crypto.getRandomValues(n),[...n].map(i=>i.toString(16).padStart(2,"0")).join("")}function VO({enabled:n=!0,browserProxy:i=!1}={}){const l=L.useRef(RU()).current,h=L.useRef(null);h.current||(h.current=l?I2():{tabs:[],activeId:null,open:!1,historyActive:!0});const[x,D]=L.useState(l),[_,s]=L.useState(()=>h.current.tabs.map(k1)),[u,f]=L.useState(h.current.activeId),[g,d]=L.useState(h.current.open&&l),[y,N]=L.useState(h.current.historyActive),[k,b]=L.useState(!1),[c,p]=L.useState(null),[v,w]=L.useState(No),[C,T]=L.useState(null),S=f_(),[R,j]=L.useState(S.closeAfter),[A,O]=L.useState(S.persistProxyLogin),[H,V]=L.useState(S.proxyLoginRetentionDays),P=L.useRef(_),Y=L.useRef(u),Q=L.useRef(g),z=L.useRef(y),X=L.useRef(new Map),K=L.useRef(null),B=L.useRef(0),F=L.useRef(new Map),G=L.useRef(new Map),Z=L.useRef(c),ae=L.useRef(null),me=L.useRef(Promise.resolve()),Ue=L.useRef(!1),De=L.useRef({persist:S.persistProxyLogin,retentionDays:S.proxyLoginRetentionDays}),ie=L.useRef(new Map);P.current=_,Y.current=u,Q.current=g,z.current=y;const q=L.useCallback(we=>{const Ye=typeof we=="function"?we(P.current):we;return P.current=Ye,s(Ye),Ye},[]),fe=L.useCallback(we=>{Y.current=we,f(we)},[]),le=L.useCallback(we=>{Q.current=we,d(we)},[]),Oe=L.useCallback(we=>{z.current=we,N(we)},[]);L.useEffect(()=>{F2({tabs:_,activeId:u,open:g,historyActive:y})},[u,y,g,_]);const ke=L.useCallback(we=>{we!=null&&we.originalUrl&&(Cf({url:we.originalUrl,title:we.title,lastMode:we.mode,visitedAt:Date.now(),sessionId:we.id}),w(No()))},[]),nt=L.useCallback(we=>{(we==null?void 0:we.mode)==="proxy"&&o1(we.id).catch(()=>{})},[]),xe=L.useCallback((we,Ye=null)=>{const J=P.current.findIndex(Pt=>Pt.id===we);if(J<0)return;const lt=P.current[J];nt(lt);const it=q(Pt=>Pt.filter(pt=>pt.id!==we));if(Y.current===we){const pt=(Ye!=null&&Ye.activeId?it.find(en=>en.id===Ye.activeId):null)||it[Math.min(J,it.length-1)]||null;pt&&!(Ye!=null&&Ye.historyActive)&&q(en=>en.map(It=>It.id===pt.id?{...It,deadline:null}:It)),fe((pt==null?void 0:pt.id)||null),Oe((Ye==null?void 0:Ye.historyActive)??!pt),Ye&&le(Ye.open)}},[fe,Oe,le,q,nt]),$e=L.useCallback(we=>{const Ye=me.current.catch(()=>{}).then(we);return me.current=Ye.then(()=>{},()=>{}),Ye},[]),at=L.useCallback((we,Ye)=>{Ye.generation!=null&&K.current!==Ye.generation&&(K.current=Ye.generation,q(lt=>lt.map(it=>it.mode==="proxy"&&it.id!==we?{...it,url:void 0,channel:void 0,generation:void 0}:it)));let J=null;return q(lt=>lt.map(it=>it.id!==we||it.mode!=="proxy"?it:(J={...it,url:Ye.url,channel:Ye.channel,generation:Ye.generation},J))),J},[q]),Ge=L.useCallback((we,{force:Ye=!1}={})=>{const J=P.current.find(It=>It.id===we);if(!J||J.mode!=="proxy"||J.url&&!Ye)return Promise.resolve(J||null);if(!i)return T(new Error(M("browser.proxyUnavailable"))),Promise.resolve(null);const lt=J.originalUrl,it=X.current.get(we);if((it==null?void 0:it.url)===lt)return it.promise;let Pt=!1;const pt=()=>{const It=P.current.find(Ht=>Ht.id===we);return(It==null?void 0:It.mode)==="proxy"&&It.originalUrl===lt},en=(async()=>{for(let It=0;It<=__.length;It+=1){if(!pt())return null;let Ht;try{Ht=await l1()}catch(hn){if(!w_(hn))throw hn}if(!pt())return null;let Ut=!(Ht!=null&&Ht.ready);if(Ht!=null&&Ht.ready)try{const hn=await $e(async()=>{if(!pt())return null;let _n;try{const Xt=f_();_n=await c1({persist:Xt.persistProxyLogin,retentionDays:Xt.proxyLoginRetentionDays})}catch(Xt){throw w_(Xt)?Xt:new Error(M("browser.profileSyncFailed"))}return pt()?(Pt=(_n==null?void 0:_n.warning)==="profile-recovery-failed",Pt&&!Ue.current&&(Ue.current=!0,T(new Error(M("browser.profileRecoveryWarning")))),J3(we,lt)):null});return pt()?hn:null}catch(hn){if(!w_(hn))throw hn;Ut=!0}if(!Ut)return null;if(It===__.length)throw new Error(M("browser.loadFailed"));await UO(__[It])}return null})().then(It=>{if(!It)return null;const Ht=P.current.find(hn=>hn.id===we);if(!Ht||Ht.mode!=="proxy"||Ht.originalUrl!==lt)return o1(we).catch(()=>{}),null;const Ut=at(we,It);return Pt||T(null),Ut}).catch(It=>(pt()&&T(It),null)).finally(()=>{var It;((It=X.current.get(we))==null?void 0:It.promise)===en&&X.current.delete(we)});return X.current.set(we,{url:lt,promise:en}),en},[at,i,$e]),Ft=L.useCallback(we=>(q(Ye=>Ye.map(J=>J.id===we&&J.mode==="proxy"?{...J,url:void 0,channel:void 0,generation:void 0}:J)),Ge(we,{force:!0})),[q,Ge]),Rt=L.useCallback(async()=>{if(!(!n||!x||!i))try{const we=await l1();if(we.generation==null)return;const Ye=K.current!=null&&K.current!==we.generation;K.current=we.generation,Ye&&q(J=>J.map(lt=>lt.mode==="proxy"?{...lt,url:void 0,channel:void 0,generation:void 0}:lt))}catch{}},[x,i,q,n]),oe=L.useCallback((we,Ye=R)=>({...we,deadline:Ye==null?null:Date.now()+Ye*6e4}),[R]),Te=L.useCallback(()=>{const we=Date.now(),Ye=P.current.filter(it=>it.deadline!=null&&it.deadline<=we);if(!Ye.length)return;const J=new Set(Ye.map(it=>it.id));Ye.forEach(it=>{ke(it),nt(it)});const lt=q(it=>it.filter(Pt=>!J.has(Pt.id)));if(J.has(Y.current)){const it=lt[0]||null;fe((it==null?void 0:it.id)||null),Oe(!it)}},[fe,Oe,q,ke,nt]);L.useEffect(()=>{Te(),Rt();const we=()=>{document.hidden||(Te(),Rt())};return document.addEventListener("visibilitychange",we),()=>document.removeEventListener("visibilitychange",we)},[Te,Rt]),L.useEffect(()=>{const we=_.filter(J=>J.deadline!=null).map(J=>J.deadline);if(!we.length)return;const Ye=setTimeout(Te,Math.max(0,Math.min(...we)-Date.now()));return()=>clearTimeout(Ye)},[Te,_]);const Ie=L.useCallback(async(we,{mode:Ye="direct",force:J=!1,signal:lt}={})=>{if(lt!=null&&lt.aborted)return null;const it=++B.current,Pt=Mf(we);if(!Pt)return T(new Error(M("browser.urlInvalid"))),null;if(!x&&!J){const Ht={url:Pt,mode:Ye};return Z.current=Ht,p(Ht),b(!0),{pending:!0}}if(Ye==="proxy"&&!i)return T(new Error(M("browser.proxyUnavailable"))),null;const pt=OO(),en={activeId:Y.current,historyActive:z.current,open:Q.current},It=k1({id:pt,mode:Ye,originalUrl:Pt,title:"",deadline:null,createdAt:Date.now()});q(Ht=>[...Ht.map(Ut=>Ut.id===Y.current&&Q.current&&!z.current?oe(Ut):Ut),It]),fe(pt),Oe(!1),le(!0),T(null);try{Ye==="proxy"?await T1(Ge(pt),lt):await T1(Promise.resolve(),lt)}catch(Ht){if(xe(pt,en),(Ht==null?void 0:Ht.name)==="AbortError")return null;throw Ht}return lt!=null&&lt.aborted?(xe(pt,en),null):it!==B.current?(xe(pt),null):P.current.find(Ht=>Ht.id===pt)||It},[x,i,fe,Oe,le,q,xe,Ge,oe]),Ve=L.useCallback(()=>{if(ae.current)return ae.current;const we=Z.current;Z.current=null,p(null);const Ye=(async()=>(h_(!0),D(!0),b(!1),we?Ie(we.url,{mode:we.mode,force:!0}):(le(!0),!0)))().finally(()=>{ae.current===Ye&&(ae.current=null)});return ae.current=Ye,Ye},[le,Ie]),tt=L.useCallback(()=>{Z.current=null,p(null),b(!1)},[]),ot=L.useCallback(()=>{P.current.forEach(nt),q([]),fe(null),Oe(!0),le(!1),H2(),h_(!1),D(!1),b(!1),Z.current=null},[fe,Oe,le,q,nt]),bt=L.useCallback(we=>we?(h_(!0),D(!0),!0):(ot(),!1),[ot]),ve=L.useCallback(async we=>we==="history"?(T(null),Q.current&&Y.current&&!z.current&&q(J=>J.map(lt=>lt.id===Y.current?oe(lt):lt)),Oe(!0),!0):P.current.find(J=>J.id===we)?(T(null),q(J=>J.map(lt=>lt.id===we?{...lt,deadline:null}:lt.id===Y.current&&Q.current&&!z.current?oe(lt):lt)),fe(we),Oe(!1),Q.current&&await Ge(we),!0):!1,[fe,Oe,q,Ge,oe]),Ne=L.useCallback(async we=>we&&!x?(b(!0),!1):(Y.current&&!z.current&&q(Ye=>Ye.map(J=>J.id===Y.current?we?{...J,deadline:null}:oe(J):J)),le(we),we&&Y.current&&!z.current&&await Ge(Y.current),!0),[x,le,q,Ge,oe]),Qe=L.useCallback(we=>{const Ye=P.current.findIndex(it=>it.id===we);if(Ye<0)return;T(null);const J=P.current[Ye];ke(J),nt(J);const lt=q(it=>it.filter(Pt=>Pt.id!==we));if(Y.current===we){const it=lt[Math.min(Ye,lt.length-1)]||null;fe((it==null?void 0:it.id)||null),Oe(!it),it&&Q.current&&(q(Pt=>Pt.map(pt=>pt.id===it.id?{...pt,deadline:null}:pt)),Ge(it.id))}},[fe,Oe,q,Ge,ke,nt]),ye=L.useCallback(async(we,Ye,J)=>{const lt=Mf(Ye),it=P.current.find(en=>en.id===we);if(!it)return null;if(!lt)return T(new Error(M("browser.urlInvalid"))),null;const Pt=J||it.mode;if(Pt==="proxy"&&!i)return T(new Error(M("browser.proxyUnavailable"))),null;T(null);const pt=(F.current.get(we)||0)+1;if(F.current.set(we,pt),ie.current.set(we,pt),it.mode==="proxy"&&Pt==="direct"&&nt(it),q(en=>en.map(It=>It.id===we?{...It,mode:Pt,originalUrl:lt,title:"",...Pt==="direct"?{url:lt,channel:void 0,generation:void 0}:it.mode==="proxy"?{}:{url:void 0,channel:void 0,generation:void 0}}:It)),Pt==="proxy"){const It=(G.current.get(we)||Promise.resolve()).catch(()=>{}).then(()=>it.mode==="proxy"?Z3(we,lt):Ge(we,{force:!0}));G.current.set(we,It);try{const Ht=await It;G.current.get(we)===It&&G.current.delete(we);const Ut=P.current.find(hn=>hn.id===we);F.current.get(we)===pt&&(Ut==null?void 0:Ut.mode)===Pt&&Ut.originalUrl===lt&&(Ht!=null&&Ht.url?(at(we,Ht),T(null)):ie.current.delete(we))}catch(Ht){G.current.get(we)===It&&G.current.delete(we);const Ut=P.current.find(hn=>hn.id===we);F.current.get(we)===pt&&(Ut==null?void 0:Ut.mode)===Pt&&Ut.originalUrl===lt&&(q(hn=>hn.map(_n=>_n.id===we?{..._n,url:void 0,channel:void 0,generation:void 0}:_n)),T(Ht),ie.current.delete(we))}}else F.current.get(we)===pt&&ie.current.delete(we);return P.current.find(en=>en.id===we)||null},[at,i,q,Ge,nt]),Fe=L.useCallback((we,Ye)=>{if(ie.current.has(we))return null;let J;q(lt=>lt.map(it=>it.id!==we?it:(J={...it,originalUrl:Mf(Ye==null?void 0:Ye.url)||it.originalUrl,title:typeof(Ye==null?void 0:Ye.title)=="string"?Ye.title:it.title},J))),J!=null&&J.title&&(Cf({url:J.originalUrl,title:J.title,lastMode:J.mode,visitedAt:Date.now(),sessionId:J.id}),w(No()))},[q]),ze=L.useCallback((we,Ye)=>{const J=P.current.find(lt=>lt.id===we);(J==null?void 0:J.mode)==="proxy"&&J.channel===Ye&&ie.current.delete(we)},[]),Nt=L.useCallback(we=>{U2(we);const Ye=f_().closeAfter;return j(Ye),Ye},[]),Wt=L.useCallback((we,Ye)=>{if((we==null?void 0:we.kind)==="static")return null;Cf({...we,lastMode:Ye});const J=No();return w(J),J.find(lt=>lt.url===(we==null?void 0:we.url))||null},[]),Gt=L.useCallback(we=>{Cf({kind:"static",dir:we==null?void 0:we.dir,title:we==null?void 0:we.title,visitedAt:Date.now()}),w(No())},[]),Qt=L.useCallback(async we=>{const Ye={persist:we.persist??De.current.persist,retentionDays:Object.prototype.hasOwnProperty.call(we,"retentionDays")?we.retentionDays:De.current.retentionDays};De.current=Ye;try{const J=await $e(async()=>{const lt=await c1(Ye);return O2(lt.persist),V2(lt.retentionDays),lt});return O(J.persist),V(J.retentionDays),!0}catch{return T(new Error(M("browser.profileSaveFailed"))),!1}},[$e]),Rn=L.useCallback(async(we=null)=>{try{return await Q3(we),!0}catch{return T(new Error(M("browser.profileClearFailed"))),!1}},[]);return{open:g,accessEnabled:x,consentOpen:k,tabs:_,activeId:u,historyActive:y,closeAfter:R,persistProxyLogin:A,proxyLoginRetentionDays:H,proxyAvailable:i,history:v,error:C,openUrl:Ie,enableAccess:Ve,disableAccess:ot,setEnabled:bt,cancelAccess:tt,switchTab:ve,closeTab:Qe,setOpen:Ne,setCloseAfter:Nt,setPersistProxyLogin:we=>Qt({persist:!!we}),setProxyLoginRetentionDays:we=>Qt({retentionDays:we}),setProxyLoginPolicy:({persist:we,retentionDays:Ye})=>Qt({persist:we,retentionDays:Ye}),clearProxyLogin:Rn,setHistoryMode:Wt,recordStaticHistory:Gt,navigateTab:ye,ensureBinding:Ge,recoverBinding:Ft,markBindingReady:ze,updateTabMeta:Fe,deleteHistory:we=>{B2(we),w(No())},clearHistory:()=>{P2(),w([])}}}function Uf({fetch:n,apply:i,intervalMs:l,enabled:h=!0,deps:x=[]}){const D=L.useRef(n),_=L.useRef(i);D.current=n,_.current=i,L.useEffect(()=>{if(!h)return;let s=!1,u=null;const f=async()=>{if(!document.hidden)try{const y=await D.current();s||_.current(y)}catch{}},g=()=>{f(),u=setTimeout(g,l)};g();const d=()=>{document.hidden||(clearTimeout(u),g())};return document.addEventListener("visibilitychange",d),()=>{s=!0,clearTimeout(u),document.removeEventListener("visibilitychange",d)}},[h,l,...x])}const L1={type:"key",key:"C-c",label:"Ctrl+C"},up={command:[{...L1}],chat:[{...L1},{type:"key",key:"Escape",label:"Esc"},{type:"key",key:"Tab",label:"Tab"},{type:"key",key:"BSpace",label:"⌫"},{type:"text",text:"ok",enter:!0},{type:"text",text:"go on",enter:!0},{type:"text",text:"1",enter:!0},{type:"text",text:"2",enter:!0},{type:"text",text:"3",enter:!0},{type:"text",text:"/compact",enter:!0},{type:"text",text:"/clear",enter:!0},{type:"text",text:"/model",enter:!0}]};function kn(n){return n.type==="key"||n.kind==="key"?`key:${n.key||n.text}`:`text:${n.text}:${n.enter?"enter":"no-enter"}`}function BO(n,i){return n.type==="key"?{kind:"key",text:n.key,label:n.label||n.key,source:"config"}:{kind:i==="chat"&&!n.text.startsWith("/")?"reply":"cmd",text:n.text,enter:!!n.enter,source:"config"}}function ml(n,i,l){const h=(Array.isArray(n)?n:[]).map(_=>BO(_,l)),x=new Set(h.map(kn)),D=(Array.isArray(i)?i:[]).filter(_=>!x.has(kn(_))).map(_=>({..._,source:"local"}));return[...h,...D]}function PO(n){return n&&Array.isArray(n.command)&&Array.isArray(n.chat)}function IO({enabled:n=!0}={}){const[i,l]=L.useState(null),h=L.useRef(!1),x=L.useRef(!1),D=L.useRef(!0),_=L.useRef(n),s=L.useRef(0);L.useLayoutEffect(()=>(D.current=!0,()=>{D.current=!1}),[]),L.useLayoutEffect(()=>{_.current!==n&&(_.current=n,s.current+=1)},[n]);const u=L.useCallback(()=>{if(!D.current||!_.current||x.current)return;x.current=!0;const f=s.current;let g;try{g=W3()}catch{x.current=!1;return}Promise.resolve(g).then(d=>{!D.current||!_.current||s.current!==f||!d||typeof d!="object"||l({...d,shortcuts:PO(d.shortcuts)?d.shortcuts:up})}).catch(()=>{}).finally(()=>{x.current=!1})},[]);return L.useEffect(()=>{!n||h.current||(h.current=!0,u())},[n,u]),L.useEffect(()=>{if(!n)return;const f=()=>{document.hidden||u()};return document.addEventListener("visibilitychange",f),()=>{document.removeEventListener("visibilitychange",f)}},[n,u]),i}function FO(n,i){return n instanceof li?(i==null||i(),!0):!1}function HO(n,{ignored:i=!1,autoShown:l=!1,liveSessionCount:h=0}={}){return!n||!n.promptEligible||i===!0||n.resolved||n.pendingCount<1?"none":h===0&&l!==!0?"auto-dialog":"card"}function YE(n){return(n==null?void 0:n.changeReason)==="boot-changed"?"workspace.bootDetected":"workspace.tmuxDetected"}function qE(n){const i=Date.parse(n);if(!Number.isFinite(i))return M("workspace.unknownTime");try{return new Intl.DateTimeFormat(So(),{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(i))}catch{return new Date(i).toLocaleString()}}function zO({plan:n,operation:i=null,onOpen:l}){var x;if(!n)return null;const h=(i==null?void 0:i.status)==="partial"?(i.results||[]).filter(D=>D.status==="failed").length:0;return o.jsxDEV("button",{type:"button",className:"workspace-recovery-card",onClick:l,children:[o.jsxDEV("strong",{children:M(YE(n))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:23,columnNumber:7},this),o.jsxDEV("span",{children:M("workspace.summary",{sessions:((x=n.summary)==null?void 0:x.sessions)??0,time:qE(n.capturedAt)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:24,columnNumber:7},this),h>0&&o.jsxDEV("span",{className:"workspace-recovery-partial",children:M("workspace.partialCard",{failures:h})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:28,columnNumber:24},this),o.jsxDEV("span",{className:"workspace-recovery-action",children:M("workspace.restoreLast")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:29,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRecoveryCard.jsx",lineNumber:22,columnNumber:5},this)}function $O({open:n,currentSessionName:i,bound:l,onSelectSession:h,onUnbind:x,onBind:D,onClose:_,onLogout:s,orphans:u=[],onTakeoverRequest:f,recoveryPlan:g=null,recoveryOperation:d=null,onOpenRecovery:y}){const[N,k]=L.useState(!1);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:`drawer ${n?"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:21,columnNumber:11},this),l.length===0&&o.jsxDEV("div",{className:"drawer-empty",children:M("drawer.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:22,columnNumber:34},this),l.map(b=>o.jsxDEV("div",{className:`drawer-row drawer-session ${b===i?"active":""}`,children:[o.jsxDEV("span",{className:"drawer-name",onClick:()=>h(b),children:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:28,columnNumber:15},this),o.jsxDEV("button",{className:"drawer-unbind",onClick:c=>{c.stopPropagation(),x(b)},"aria-label":M("drawer.unbind"),title:M("drawer.unbind"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:29,columnNumber:15},this)]},b,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:24,columnNumber:13},this)),o.jsxDEV("button",{className:"drawer-bind",onClick:D,children:["+ ",M("drawer.bind")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:37,columnNumber:11},this),u.length>0&&o.jsxDEV("div",{className:"drawer-orphans",children:[o.jsxDEV("button",{className:"drawer-orphans-head",onClick:()=>k(b=>!b),children:[o.jsxDEV("span",{children:M("drawer.orphans.title",{n:u.length})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:42,columnNumber:17},this),o.jsxDEV("span",{className:"drawer-orphans-caret","aria-hidden":"true",children:N?"▾":"▸"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:43,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:41,columnNumber:15},this),N&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"drawer-orphans-hint",children:M("drawer.orphans.hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:47,columnNumber:19},this),u.map(b=>{const c=!b.sessionId,p=b.state==="busy"||c;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:b.cwd,children:b.cwdLabel||b.cwd},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:54,columnNumber:27},this),o.jsxDEV("button",{className:"drawer-orphan-btn",disabled:p,title:c?M("inbox.orphans.noSession"):void 0,onClick:()=>f==null?void 0:f(b),children:M("inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:55,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:53,columnNumber:25},this),o.jsxDEV("div",{className:"drawer-orphan-meta",children:[b.agentLabel&&o.jsxDEV("span",{className:"drawer-orphan-agent",children:b.agentLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:65,columnNumber:44},this),o.jsxDEV("span",{className:`drawer-orphan-state ${b.state==="busy"?"busy":"idle"}`,children:b.state==="busy"?M("inbox.orphans.busy"):M("inbox.orphans.idle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:66,columnNumber:27},this),o.jsxDEV("span",{className:"drawer-orphan-time",children:FE(b.startedAt||b.lastActivity,Date.now())},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:69,columnNumber:27},this),b.snippet&&o.jsxDEV("span",{className:"drawer-orphan-msg",children:b.snippet},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:70,columnNumber:41},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:64,columnNumber:25},this)]},b.pid,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:52,columnNumber:23},this)})]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:46,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:40,columnNumber:13},this),g&&o.jsxDEV(zO,{plan:g,operation:d,onOpen:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:80,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:20,columnNumber:9},this),o.jsxDEV("button",{className:"drawer-logout",onClick:s,children:M("drawer.logout")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:83,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:19,columnNumber:7},this),n&&o.jsxDEV("div",{className:"drawer-backdrop",onClick:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:85,columnNumber:16},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:18,columnNumber:5},this)}const WO=500,A1=10;function dp(n,{onClick:i}={}){const l=L.useRef(null),h=L.useRef(null),x=L.useRef(!1),D=()=>{l.current&&(clearTimeout(l.current),l.current=null)};return{onPointerDown:_=>{x.current=!1,h.current={x:_.clientX,y:_.clientY},D(),l.current=setTimeout(()=>{l.current=null,x.current=!0,n==null||n()},WO)},onPointerMove:_=>{!l.current||!h.current||(Math.abs(_.clientX-h.current.x)>A1||Math.abs(_.clientY-h.current.y)>A1)&&D()},onPointerUp:D,onPointerLeave:D,onPointerCancel:D,onClick:_=>{var s,u;if(x.current){x.current=!1,(s=_.preventDefault)==null||s.call(_),(u=_.stopPropagation)==null||u.call(_);return}i==null||i(_)}}}const Z_=248,Q_=158,Kf=6,M1=2,GO=52,YO=34,jf=n=>typeof n=="number"&&Number.isFinite(n);function Xf(n){return Array.isArray(n)&&n.length>0&&n.every(i=>jf(i.left)&&jf(i.top)&&jf(i.width)&&jf(i.height))}function U1(n,i){if(!Xf(n)||n.length<2)return!1;const l=n.find(D=>D.id===i);if(!l)return!1;const h=l.left+l.width,x=l.top+l.height;return n.some(D=>{if(D.id===i||!(Math.min(x,D.top+D.height)>Math.max(l.top,D.top)))return!1;const s=D.left+D.width;return Math.abs(D.left-h)<=1||Math.abs(l.left-s)<=1})}const O1=n=>[...new Set(n)].sort((i,l)=>i-l);function V1(n,i,l){const h=[];for(let u=0;u<n.length-1;u+=1){const f=n[u],g=n[u+1],d=i.some(([y,N])=>y===f&&N===g);h.push(g-f<=1&&!d)}const x=h.filter(u=>!u).length,D=x>0?(l-h.filter(Boolean).length*M1)/x:l,_=[{at:0}];let s=0;for(let u=0;u<h.length;u+=1)s+=h[u]?M1:D,_.push({at:s});return _}function qO(n){if(!Xf(n))return null;const i=Math.max(...n.map(g=>g.left+g.width)),l=Math.max(...n.map(g=>g.top+g.height));if(i<=0||l<=0)return null;const h=O1(n.flatMap(g=>[g.left,g.left+g.width])),x=O1(n.flatMap(g=>[g.top,g.top+g.height])),D=n.map(g=>[g.left,g.left+g.width]),_=n.map(g=>[g.top,g.top+g.height]),s=V1(h,D,Z_-Kf*2),u=V1(x,_,Q_-Kf*2),f=n.map((g,d)=>{const y=s[h.indexOf(g.left)].at,N=s[h.indexOf(g.left+g.width)].at,k=u[x.indexOf(g.top)].at,b=u[x.indexOf(g.top+g.height)].at;return{id:g.id,active:!!g.active,command:g.command,seq:d,left:y,top:k,width:N-y,height:b-k,cols:g.width,rows:g.height}});return{w:Z_,h:Q_,cells:f}}function KO(n){const i=n.width<GO,l=n.height<YO;return i&&l?"tiny":i?"narrow":l?"flat":""}const y_={terminal:"终端",chat:"对话"};function XO(){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 JO({value:n,onChange:i}){const l=n==="chat"?"terminal":"chat";return o.jsxDEV("button",{type:"button",className:"lens-toggle",onClick:()=>i(l),"aria-label":`切换到${y_[l]}视图`,title:`切换到${y_[l]}视图`,children:[o.jsxDEV(XO,{},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:y_[n]},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 B1="①②③④⑤⑥⑦⑧⑨",Id=n=>n<B1.length?B1[n]:String(n+1),ZO=(n,i)=>`${Id(i)} ${n.command||n.id}`;function QO({window:n,active:i,agent:l,onSelect:h,onManage:x}){const D=dp(()=>x(n),{onClick:()=>h(n)});return o.jsxDEV("button",{"data-win":n.id,className:`win-tab ${i?"active":""}`,...D,children:[o.jsxDEV("span",{className:"win-title",children:[l&&o.jsxDEV(pl,{agent:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:27,columnNumber:19},this),o.jsxDEV("span",{children:n.name||n.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:28,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:26,columnNumber:7},this),n.panes>1&&o.jsxDEV("span",{className:"win-panes",children:n.panes},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:30,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:25,columnNumber:5},this)}const e4=200,t4=90;function n4({cell:n,cur:i,releasing:l,picking:h,agent:x,onChoose:D,onManage:_}){const s=KO(n),u=n.command||n.id,g=Number.isFinite(n.cols)&&Number.isFinite(n.rows)?`${n.cols}×${n.rows}`:"",d=s===""&&n.width>=t4&&g,y=dp(()=>_(n.id),{onClick:()=>D(n.id)});return o.jsxDEV("button",{type:"button",role:"option","aria-selected":i,"aria-label":g?`${u}, ${g}`:u,className:`pane-map-cell${i?" is-current":""}${l?" is-releasing":""}${s?` is-${s}`:""}${h?" is-picking":""}`,style:{left:`${n.left+Kf}px`,top:`${n.top+Kf}px`,width:`${n.width}px`,height:`${n.height}px`},...y,children:o.jsxDEV("span",{className:"pmc-surf",children:s==="narrow"||s==="tiny"?o.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:Id(n.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:64,columnNumber:11},this):s==="flat"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:Id(n.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:67,columnNumber:13},this),o.jsxDEV("span",{className:"pmc-cmd",children:u},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:66,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:Id(n.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:73,columnNumber:15},this),x&&o.jsxDEV(pl,{agent:x},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:74,columnNumber:25},this),d&&o.jsxDEV("span",{className:"pmc-dims","aria-hidden":"true",children:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:75,columnNumber:34},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:72,columnNumber:13},this),o.jsxDEV("span",{className:"pmc-cmd",children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:77,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:71,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:62,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:53,columnNumber:5},this)}function r4({window:n,panes:i,paneAgents:l={},currentPaneId:h,agent:x,onManage:D,onManagePane:_,onSelectPane:s,onBeforePaneMapOpen:u,paneSheetOpen:f=!1,openMapFor:g=null,onMapOpened:d,onPaneMapOpenChange:y}){const[N,k]=L.useState(!1);nr(N,()=>k(!1));const b=L.useRef(N),c=L.useRef(y);b.current=N,c.current=y,L.useEffect(()=>{y==null||y(N)},[N,y]),L.useEffect(()=>()=>{var z;b.current&&((z=c.current)==null||z.call(c,!1))},[]);const[p,v]=L.useState(null),w=L.useRef(null);L.useEffect(()=>()=>clearTimeout(w.current),[]);const C=z=>{var K;try{(K=navigator.vibrate)==null||K.call(navigator,10)}catch{}if(f&&(_==null||_(z)),typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){s(z);return}v(z),clearTimeout(w.current),w.current=setTimeout(()=>{v(null),s(z)},e4)},[T,S]=L.useState(null),R=L.useRef(null),j=L.useRef(null),A=Xf(i)?qO(i):null,O=A?A.w:Z_,H=A?A.h:Q_,V=()=>{var Z;const z=(Z=R.current)==null?void 0:Z.getBoundingClientRect();if(!z)return;const X=8,K=window.innerWidth,B=window.innerHeight,F=Math.max(X,Math.min(z.left,K-O-X));let G=z.bottom+6;if(G+H+X>B){const ae=z.top-6-H;G=ae>=X?ae:Math.max(X,B-H-X)}S({top:G,left:F})},P=dp(()=>D(n),{onClick:()=>{if(N){k(!1);return}const z=()=>{V(),k(!0)};u?Promise.resolve(u(n.id)).then(z,z):z()}});L.useEffect(()=>{g&&g===n.id&&(V(),k(!0),d==null||d())},[g,n.id]),L.useEffect(()=>{if(!N)return;const z=K=>{var B,F;f||!((B=R.current)!=null&&B.contains(K.target))&&!((F=j.current)!=null&&F.contains(K.target))&&k(!1)},X=()=>V();return document.addEventListener("pointerdown",z,!0),window.addEventListener("scroll",X,!0),window.addEventListener("resize",X),()=>{document.removeEventListener("pointerdown",z,!0),window.removeEventListener("scroll",X,!0),window.removeEventListener("resize",X)}},[N,f]);const Y=Math.max(0,i.findIndex(z=>z.id===h)),Q=i[Y];return o.jsxDEV("div",{className:"wt-dd active","data-win":n.id,ref:R,children:[o.jsxDEV("button",{className:"win-tab active wt-trigger","aria-haspopup":"listbox","aria-expanded":N,...P,children:[o.jsxDEV("span",{className:"win-title",children:[x&&o.jsxDEV(pl,{agent:x},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:204,columnNumber:21},this),o.jsxDEV("span",{className:"wt-name",children:n.name||n.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:205,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:203,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:207,columnNumber:9},this),o.jsxDEV("span",{className:"wt-pane",children:ZO(Q,Y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:208,columnNumber:9},this),o.jsxDEV("span",{className:`wt-caret${N?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:209,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:197,columnNumber:7},this),N&&T&&(Xf(i)?Co.createPortal(o.jsxDEV("div",{ref:j,className:"pane-map",role:"listbox",style:{top:T.top,left:T.left,width:O,height:H},children:A.cells.map(z=>{const X=z.id===h;return o.jsxDEV(n4,{cell:z,cur:X,releasing:X&&!!p&&p!==h,picking:p===z.id,agent:l[z.id],onChoose:C,onManage:_},z.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:218,columnNumber:19},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:214,columnNumber:13},this),document.body):o.jsxDEV("div",{className:"dd-menu wt-menu",role:"listbox",style:{top:T.top,left:T.left},children:i.map((z,X)=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":z.id===h,className:`dd-option${z.id===h?" is-selected":""}`,onClick:()=>{s(z.id),k(!1)},children:[o.jsxDEV("span",{className:"dd-option-label",children:[o.jsxDEV("span",{className:"dd-pane-seq","aria-hidden":"true",children:Id(X)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:245,columnNumber:19},this),l[z.id]&&o.jsxDEV(pl,{agent:l[z.id]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:246,columnNumber:40},this),o.jsxDEV("span",{className:"dd-pane-cmd",children:z.command||z.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:247,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:244,columnNumber:17},this),z.id===h&&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:249,columnNumber:44},this)]},z.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:236,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:234,columnNumber:11},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:196,columnNumber:5},this)}function i4({windows:n,windowAgents:i={},paneAgents:l={},currentAgent:h,currentWindowId:x,panes:D,currentPaneId:_,onSelectWindow:s,onSelectPane:u,onNewWindow:f,onManageWindow:g,onManagePane:d,onBeforePaneMapOpen:y,paneSheetOpen:N=!1,openMapFor:k=null,onMapOpened:b,onPaneMapOpenChange:c,trackWindowId:p,lens:v="terminal",onLensChange:w=()=>{},chatLensEnabled:C=!1}){const T=L.useRef(null);return L.useLayoutEffect(()=>{var S,R;p&&((R=(S=T.current)==null?void 0:S.querySelector(`[data-win="${p}"]`))==null||R.scrollIntoView({block:"nearest",inline:"nearest"}))},[n,p]),o.jsxDEV("div",{className:"windowbar",children:[o.jsxDEV("div",{className:"windowbar-scroll",ref:T,children:[n.map(S=>{const R=S.id===x;return R&&D.length>1?o.jsxDEV(r4,{window:S,panes:D,paneAgents:l,currentPaneId:_,agent:h,onManage:g,onManagePane:d,onSelectPane:u,onBeforePaneMapOpen:y,paneSheetOpen:N,openMapFor:k,onMapOpened:b,onPaneMapOpenChange:c},S.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:281,columnNumber:15},this):o.jsxDEV(QO,{window:S,active:R,agent:i[S.id],onSelect:s,onManage:g},S.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:300,columnNumber:13},this)}),o.jsxDEV("button",{className:"win-tab win-new",onClick:f,"aria-label":M("windowbar.newWindow"),title:M("windowbar.newWindow"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:310,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:276,columnNumber:7},this),h==="claude"&&C&&o.jsxDEV(JO,{value:v,onChange:w},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:313,columnNumber:56},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:275,columnNumber:5},this)}function s4(n){return n.replace(/\r?\n/g,`\r
207
+ `)}function a4(n,i){let l=i,h=!1,x=!1,D=!1;const _=g=>{/\S/.test(g)&&(h=!0,l&&(x=!0)),l&&g.length&&(D=!0)},s=/\x1b\[([0-9;]*)m/g;let u=0,f=s.exec(n);for(;f;){_(n.slice(u,f.index)),u=s.lastIndex;const g=f[1]===""?[0]:f[1].split(";").map(Number);for(let d=0;d<g.length;d+=1){const y=g[d];if(y===0||y===49)l=!1;else if(y>=40&&y<=47||y>=100&&y<=107)l=!0;else if(y===38||y===48){const N=y===48;g[d+1]===5?(d+=2,N&&(l=!0)):g[d+1]===2&&(d+=4,N&&(l=!0))}}f=s.exec(n)}return _(n.slice(u)),{bgEnd:l,hasText:h,hasShadeText:x,hasShadeBlank:D}}function o4(n){const i=[];let l=!1,h=[],x=-1,D=!1;const _=()=>{if(h.length){i.push(`${h[0].line}${h[0].bgEnd?"\x1B[49m":""}`);for(let u=1;u<h.length;u+=1)i.push("")}else x>=0&&D&&(i[x]+="\x1B[49m");h=[],x=-1,D=!1},s=()=>{h.length&&(i.push(...h.map(({line:u})=>u)),h=[])};for(const u of n){const f=a4(u,l);f.hasShadeText?(s(),i.push(u),x=i.length-1,D=f.bgEnd):!f.hasText&&(f.bgEnd||f.hasShadeBlank)?h.push({line:u,bgEnd:f.bgEnd}):(_(),i.push(u)),l=f.bgEnd}return _(),i}function KE(n){const i=s4(n.replace(/\n$/,""));return o4(i.split(`\r
208
+ `)).join(`\r
209
+ `)}function l4(n,i){const l=KE(n).split(`\r
210
+ `),h=Math.max(1,Number(i)||1);for(;l.length<h;)l.push("");return l.join(`\r
211
+ `)}function ew(n,i,l=0,h=!1){if(!n||!n.vis&&!h)return"\x1B[?25l";const x=l?Math.min(i|0,l|0):i|0,D=Math.max(1,x-Math.max(0,n.row|0)),_=Math.max(0,n.col|0)+1;return`\x1B[${D};${_}H\x1B[?25h`}function c4(n,{base:i=1e3,max:l=1e4,factor:h=2,jitter:x=.2,rng:D=Math.random}={}){if(n<=0)return 0;const _=Math.min(l,i*h**(n-1));return Math.round(_*(1+x*(D()*2-1)))}const u4=1e3;function d4(n,i=u4){return n<8e3?i:n<6e4?5e3:1e4}const h4={failCount:0,connected:!0};function wc(n,i,{threshold:l=2}={}){switch(i){case"ok":case"reset":return{failCount:0,connected:!0};case"fail":{const h=n.failCount+1;return{failCount:h,connected:h<l}}default:return n}}const m4="(?:\\[[0-9a-f:]+\\]|[a-z0-9.-]+)",P1=new RegExp(`https?://${m4}(?::(\\d{1,5}))?([/?#][^${Y_}]*)?`,"gi");function XE(n){const i=[];if(!n)return i;P1.lastIndex=0;let l;for(;(l=P1.exec(n))!==null;){const h=/^https:/i.test(l[0]),x=l[1]?Number(l[1]):h?443:80;if(!Number.isInteger(x)||x<1||x>65535)continue;const D=l[2]||"",_=D.replace(/\.+$/,""),s=l.index+l[0].length-(D.length-_.length);i.push({start:l.index,end:s,protocol:h?"https":"http",port:x,path:_||"/",raw:n.slice(l.index,s)})}return i}function JE(n){const i=XE(n),l=i.map(h=>({start:h.start,end:h.end,kind:"url",protocol:h.protocol,port:h.port,urlPath:h.path,raw:h.raw}));for(const h of eO(n))i.some(x=>h.start<x.end&&h.end>x.start)||l.push({start:h.start,end:h.end,kind:"doc"});return l.sort((h,x)=>h.start-x.start),l}function f4(n,i){const l=n.getCell(i-1);if(!l)return!1;if(l.getWidth()===0)return!0;const h=l.getChars();if(h&&h!==" ")return!0;const x=n.getCell(i-2);return!!x&&x.getWidth()===0}function tw(n,i,l){var _;const h=n.getLine(i+1);if(!h)return!1;if(h.isWrapped)return!0;const x=n.getLine(i);if(!x||!f4(x,l))return!1;const D=(_=h.getCell(0))==null?void 0:_.getChars();return!!D&&D!==" "}function ZE(n,i,l){let h=i;for(;h>0&&tw(n,h-1,l);)h--;let x="";const D=[];let _=h;for(;;){const s=n.getLine(_);if(!s)break;const u=_+1<n.length&&tw(n,_,l),f=[],g=[];for(let y=0;y<l;y++){const N=s.getCell(y);if(!N)continue;const k=N.getWidth();k!==0&&(f.push(N.getChars()),g.push({row:_,col:y,w:k}))}let d=f.length;if(u)for(;d>0&&(f[d-1]===""||f[d-1]===" ");)d--;for(let y=0;y<d;y++)x+=f[y]||" ",D.push(g[y]);if(u){_++;continue}break}return{text:x,cells:D}}function p4(n){const i=n.buffer.active,l=n.cols,h=0,x=i.length,D=[];let _=h;for(;_>0&&tw(i,_-1,l);)_--;for(;_<x;){if(!i.getLine(_)){_++;continue}const{text:s,cells:u}=ZE(i,_,l);for(const{start:f,end:g,kind:d}of JE(s)){let y=f;for(;y<g;){const N=u[y].row;let k=y;for(;k<g&&u[k].row===N;)k++;const b=u[y].col,c=u[k-1],p=c.col+c.w;N>=h&&N<x&&D.push({y:N,x:b,width:p-b,kind:d,path:s.slice(f,g)}),y=k}}_=u.length?u[u.length-1].row+1:_+1}return D}function v4(n,i){const l=n.buffer.active,h=n.cols,x=i-1;if(x<0||x>=l.length)return[];const{text:D,cells:_}=ZE(l,x,h),s=[];for(const{start:u,end:f,kind:g,protocol:d,port:y,urlPath:N,raw:k}of JE(D)){const b=_[u],c=_[f-1];x<b.row||x>c.row||s.push({range:{start:{x:b.col+1,y:b.row+1},end:{x:c.col+c.w,y:c.row+1}},kind:g,path:D.slice(u,f),protocol:d,port:y,urlPath:N,raw:k})}return s}const QE=(n,i,l)=>Math.max(i,Math.min(l,n));function g4(n,i){return!i||i<=0?1:Math.max(1,Math.floor(n/i))}function ej(n,i,l){return l<0?n>0?"internal":"forward":n<i?"internal":"forward"}function b4(n,i){return Number.isFinite(i)?i<=1:n===0}function _4(n,i){return QE(n,0,i)}function w4(n,i,l){return QE(n-i+1,0,l)}function I1(n,i){return!n||!n.vis?null:Math.max(0,i-1-Math.max(0,n.row|0))}function F1(n,i){return Math.max(0,i-n)}function x_({cursorLine:n,viewportY:i,visibleRows:l,baseY:h,armed:x}){return x?n<i?_4(n,h):n>=i+l?w4(n,l,h):null:null}function tj(n){const i=n.split(`
212
+ `).map(x=>x.trim());let l=0,h=i.length;for(;l<h&&i[l]==="";)l++;for(;h>l&&i[h-1]==="";)h--;return i.slice(l,h).join(`
213
+ `)}function y4(n){return n?{lines:n.split(`
214
+ `).length,chars:tj(n).replace(/\n/g,"").length}:{lines:0,chars:0}}function x4(n,i){return{start:{col:0,row:n.start.row},end:{col:i-1,row:n.end.row}}}function N4(n,i,l,h,x){let D=n.start.row,_=n.end.row;for(;D>h&&l(D-1).trim()!=="";)D--;for(;_<x&&l(_+1).trim()!=="";)_++;return{start:{col:0,row:D},end:{col:i-1,row:_}}}function H1(n,i,l,h,x){return{x:n*h,y:(i-l)*x}}function S4(n){const[i,l]=L.useState(""),[h,x]=L.useState(!1),D=L.useRef(null),_=L.useRef(null);return L.useEffect(()=>()=>{clearTimeout(D.current),clearInterval(_.current)},[]),{dbg:i,dbgVisible:h,flash:()=>{const u=()=>{const f=n.current;f&&l(`${f.cols}×${f.rows} · ${f.options.fontSize}px`)};u(),x(!0),clearTimeout(D.current),clearInterval(_.current),_.current=setInterval(u,400),D.current=setTimeout(()=>{x(!1),clearInterval(_.current)},3e3)}}}const C4=1e3,E4=3e3,j4=8e3,D4=300,k4=256*1024,R4=1e4,T4=5e3;function L4({pane:n,onSeed:i,onData:l,onReady:h,onStatus:x,onProbe:D,onAuthFail:_,WebSocketCtor:s=window.WebSocket,token:u=wl()??"",reconnectMs:f=C4,connectTimeoutMs:g=E4,readyTimeoutMs:d=j4,maxFrameLagMs:y=D4,maxPendingDataBytes:N=k4,probeIntervalMs:k=R4,probeTimeoutMs:b=T4,now:c=()=>Date.now()}){let p=null,v=null,w=null,C=!1,T=!1,S=Promise.resolve(),R=null,j=0,A=null,O=null,H=0,V=null,P=0,Y=!0,Q=!1,z=null,X=!1,K=0;const B=()=>{A&&clearInterval(A),O&&clearTimeout(O),A=null,O=null,V=null},F=()=>{R&&(clearTimeout(R),R=null)},G=(fe,le)=>{F(),R=setTimeout(()=>{p===fe&&fe.readyState!==3&&fe.close(4e3,"stream timeout")},le)},Z=fe=>{(p==null?void 0:p.readyState)===s.OPEN&&p.send(JSON.stringify(fe))},ae=()=>{if(C||T||!v||V)return;const fe=++H;V={id:fe,sentAt:c()},Z({type:"probe",id:fe}),O=setTimeout(()=>{(V==null?void 0:V.id)===fe&&(V=null,O=null,D==null||D({ok:!1}))},b)},me=()=>{B(),ae(),A=setInterval(ae,k)},Ue=()=>{w&&(clearTimeout(w),w=null)},De=()=>{const fe=p;p=null,v===fe&&(v=null),P=0,Y=!0,Q=!1,z=null,F(),B();try{fe==null||fe.close()}catch{}},ie=()=>{C||T||Y||(j+=1,P=0,Y=!0,Q=!1,z=null,(p==null?void 0:p.readyState)===s.OPEN?(x==null||x("connecting"),G(p,d),B(),v===p?Z({type:"resync"}):(v=p,Z({type:"subscribe",token:u,pane:n}))):q())},q=()=>{if(C||T||p&&(p.readyState===0||p.readyState===s.OPEN))return;Ue(),x==null||x("connecting");const fe=window.location.protocol==="https:"?"wss:":"ws:",le=new s(`${fe}//${window.location.host}/api/terminal-stream`);p=le,P=0,Y=!0,Q=!1,z=null,G(le,g),le.binaryType="arraybuffer",le.onopen=()=>{p!==le||C||T||(v=le,G(le,d),Z({type:"subscribe",token:u,pane:n}))},le.onmessage=Oe=>{if(p!==le)return;let ke=null;if(typeof Oe.data=="string"){try{ke=JSON.parse(Oe.data)}catch{le.close(1003,"bad stream frame");return}if(ke.type==="probe"){if((V==null?void 0:V.id)===ke.id){const at=Math.max(0,c()-V.sentAt);V=null,O&&clearTimeout(O),O=null,D==null||D({ok:!0,rttMs:at})}return}if(z=null,Y&&ke.type!=="seed")return;ke.type==="seed"&&(Y=!1,Q=!1)}else{if(Y)return;if(P+=Oe.data.byteLength,P>N){ie();return}if((z==null?void 0:z.epoch)===j){z.chunks.push(Oe.data),z.byteLength+=Oe.data.byteLength;return}}const nt=j,xe=Date.now(),$e=typeof Oe.data=="string"?null:{epoch:nt,queuedAt:xe,chunks:[Oe.data],byteLength:Oe.data.byteLength};$e&&(z=$e),S=S.then(async()=>{if($e&&z===$e&&(z=null),!(C||T||nt!==j)){if(P=Math.max(0,P-(($e==null?void 0:$e.byteLength)??0)),Q&&$e&&Date.now()-$e.queuedAt>y){ie();return}if($e){if($e.chunks.length===1){await(l==null?void 0:l(new Uint8Array($e.chunks[0])));return}const at=new Uint8Array($e.byteLength);let Ge=0;for(const Ft of $e.chunks){const Rt=new Uint8Array(Ft);at.set(Rt,Ge),Ge+=Rt.byteLength}await(l==null?void 0:l(at));return}ke.type==="seed"?await(i==null?void 0:i(ke)):ke.type==="ready"&&(await(h==null?void 0:h(ke)),Q=!0,X=!0,K=0,F(),x==null||x("live"),me())}}).catch(()=>{x==null||x("error"),p===le&&le.close(1003,"bad stream frame")})},le.onclose=Oe=>{if(p!==le||(p=null,v===le&&(v=null),F(),B(),C))return;if(Oe.code===4001){_==null||_();return}const ke=!X&&K===0;X||(K+=1),x==null||x(ke?"connecting":"reconnecting"),T||(w=setTimeout(q,f))},le.onerror=()=>{p===le&&le.close()}};return q(),{pause(){C||T||(T=!0,j+=1,P=0,Y=!0,Q=!1,z=null,Ue(),F(),B(),Z({type:"pause"}),x==null||x("paused"))},suspend(){return C||(T=!0,j+=1,Ue(),De(),x==null||x("paused")),S},resync(){C||(T=!1,j+=1,P=0,Y=!0,Q=!1,z=null,(p==null?void 0:p.readyState)===s.OPEN?(x==null||x("connecting"),G(p,d),B(),v===p?Z({type:"resync"}):(v=p,Z({type:"subscribe",token:u,pane:n}))):q())},close(){return C=!0,j+=1,P=0,Q=!1,z=null,Ue(),De(),S}}}var nj={exports:{}};(function(n,i){(function(l,h){n.exports=h()})(globalThis,()=>(()=>{var l={4567:function(_,s,u){var f=this&&this.__decorate||function(v,w,C,T){var S,R=arguments.length,j=R<3?w:T===null?T=Object.getOwnPropertyDescriptor(w,C):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,w,C,T);else for(var A=v.length-1;A>=0;A--)(S=v[A])&&(j=(R<3?S(j):R>3?S(w,C,j):S(w,C))||j);return R>3&&j&&Object.defineProperty(w,C,j),j},g=this&&this.__param||function(v,w){return function(C,T){w(C,T,v)}};Object.defineProperty(s,"__esModule",{value:!0}),s.AccessibilityManager=void 0;const d=u(9042),y=u(9924),N=u(844),k=u(4725),b=u(2585),c=u(3656);let p=s.AccessibilityManager=class extends N.Disposable{constructor(v,w,C,T){super(),this._terminal=v,this._coreBrowserService=C,this._renderService=T,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let S=0;S<this._terminal.rows;S++)this._rowElements[S]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[S]);if(this._topBoundaryFocusListener=S=>this._handleBoundaryFocus(S,0),this._bottomBoundaryFocusListener=S=>this._handleBoundaryFocus(S,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new y.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(S=>this._handleResize(S.rows))),this.register(this._terminal.onRender(S=>this._refreshRows(S.start,S.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(S=>this._handleChar(S))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
215
+ `))),this.register(this._terminal.onA11yTab(S=>this._handleTab(S))),this.register(this._terminal.onKey(S=>this._handleKey(S.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,c.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(v){for(let w=0;w<v;w++)this._handleChar(" ")}_handleChar(v){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==v&&(this._charsToAnnounce+=v):this._charsToAnnounce+=v,v===`
216
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(v){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(v)||this._charsToConsume.push(v)}_refreshRows(v,w){this._liveRegionDebouncer.refresh(v,w,this._terminal.rows)}_renderRows(v,w){const C=this._terminal.buffer,T=C.lines.length.toString();for(let S=v;S<=w;S++){const R=C.lines.get(C.ydisp+S),j=[],A=(R==null?void 0:R.translateToString(!0,void 0,void 0,j))||"",O=(C.ydisp+S+1).toString(),H=this._rowElements[S];H&&(A.length===0?(H.innerText=" ",this._rowColumns.set(H,[0,1])):(H.textContent=A,this._rowColumns.set(H,j)),H.setAttribute("aria-posinset",O),H.setAttribute("aria-setsize",T))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(v,w){const C=v.target,T=this._rowElements[w===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(w===0?"1":`${this._terminal.buffer.lines.length}`)||v.relatedTarget!==T)return;let S,R;if(w===0?(S=C,R=this._rowElements.pop(),this._rowContainer.removeChild(R)):(S=this._rowElements.shift(),R=C,this._rowContainer.removeChild(S)),S.removeEventListener("focus",this._topBoundaryFocusListener),R.removeEventListener("focus",this._bottomBoundaryFocusListener),w===0){const j=this._createAccessibilityTreeNode();this._rowElements.unshift(j),this._rowContainer.insertAdjacentElement("afterbegin",j)}else{const j=this._createAccessibilityTreeNode();this._rowElements.push(j),this._rowContainer.appendChild(j)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(w===0?-1:1),this._rowElements[w===0?1:this._rowElements.length-2].focus(),v.preventDefault(),v.stopImmediatePropagation()}_handleSelectionChange(){var A;if(this._rowElements.length===0)return;const v=document.getSelection();if(!v)return;if(v.isCollapsed)return void(this._rowContainer.contains(v.anchorNode)&&this._terminal.clearSelection());if(!v.anchorNode||!v.focusNode)return void console.error("anchorNode and/or focusNode are null");let w={node:v.anchorNode,offset:v.anchorOffset},C={node:v.focusNode,offset:v.focusOffset};if((w.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||w.node===C.node&&w.offset>C.offset)&&([w,C]=[C,w]),w.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(w={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(w.node))return;const T=this._rowElements.slice(-1)[0];if(C.node.compareDocumentPosition(T)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(C={node:T,offset:((A=T.textContent)==null?void 0:A.length)??0}),!this._rowContainer.contains(C.node))return;const S=({node:O,offset:H})=>{const V=O instanceof Text?O.parentNode:O;let P=parseInt(V==null?void 0:V.getAttribute("aria-posinset"),10)-1;if(isNaN(P))return console.warn("row is invalid. Race condition?"),null;const Y=this._rowColumns.get(V);if(!Y)return console.warn("columns is null. Race condition?"),null;let Q=H<Y.length?Y[H]:Y.slice(-1)[0]+1;return Q>=this._terminal.cols&&(++P,Q=0),{row:P,column:Q}},R=S(w),j=S(C);if(R&&j){if(R.row>j.row||R.row===j.row&&R.column>=j.column)throw new Error("invalid range");this._terminal.select(R.column,R.row,(j.row-R.row)*this._terminal.cols-R.column+j.column)}}_handleResize(v){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let w=this._rowContainer.children.length;w<this._terminal.rows;w++)this._rowElements[w]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[w]);for(;this._rowElements.length>v;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const v=this._coreBrowserService.mainDocument.createElement("div");return v.setAttribute("role","listitem"),v.tabIndex=-1,this._refreshRowDimensions(v),v}_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 v=0;v<this._terminal.rows;v++)this._refreshRowDimensions(this._rowElements[v])}}_refreshRowDimensions(v){v.style.height=`${this._renderService.dimensions.css.cell.height}px`}};s.AccessibilityManager=p=f([g(1,b.IInstantiationService),g(2,k.ICoreBrowserService),g(3,k.IRenderService)],p)},3614:(_,s)=>{function u(y){return y.replace(/\r?\n/g,"\r")}function f(y,N){return N?"\x1B[200~"+y+"\x1B[201~":y}function g(y,N,k,b){y=f(y=u(y),k.decPrivateModes.bracketedPasteMode&&b.rawOptions.ignoreBracketedPasteMode!==!0),k.triggerDataEvent(y,!0),N.value=""}function d(y,N,k){const b=k.getBoundingClientRect(),c=y.clientX-b.left-10,p=y.clientY-b.top-10;N.style.width="20px",N.style.height="20px",N.style.left=`${c}px`,N.style.top=`${p}px`,N.style.zIndex="1000",N.focus()}Object.defineProperty(s,"__esModule",{value:!0}),s.rightClickHandler=s.moveTextAreaUnderMouseCursor=s.paste=s.handlePasteEvent=s.copyHandler=s.bracketTextForPaste=s.prepareTextForTerminal=void 0,s.prepareTextForTerminal=u,s.bracketTextForPaste=f,s.copyHandler=function(y,N){y.clipboardData&&y.clipboardData.setData("text/plain",N.selectionText),y.preventDefault()},s.handlePasteEvent=function(y,N,k,b){y.stopPropagation(),y.clipboardData&&g(y.clipboardData.getData("text/plain"),N,k,b)},s.paste=g,s.moveTextAreaUnderMouseCursor=d,s.rightClickHandler=function(y,N,k,b,c){d(y,N,k),c&&b.rightClickSelect(y),N.value=b.selectionText,N.select()}},7239:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ColorContrastCache=void 0;const f=u(1505);s.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(g,d,y){this._css.set(g,d,y)}getCss(g,d){return this._css.get(g,d)}setColor(g,d,y){this._color.set(g,d,y)}getColor(g,d){return this._color.get(g,d)}clear(){this._color.clear(),this._css.clear()}}},3656:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.addDisposableDomListener=void 0,s.addDisposableDomListener=function(u,f,g,d){u.addEventListener(f,g,d);let y=!1;return{dispose:()=>{y||(y=!0,u.removeEventListener(f,g,d))}}}},3551:function(_,s,u){var f=this&&this.__decorate||function(p,v,w,C){var T,S=arguments.length,R=S<3?v:C===null?C=Object.getOwnPropertyDescriptor(v,w):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(p,v,w,C);else for(var j=p.length-1;j>=0;j--)(T=p[j])&&(R=(S<3?T(R):S>3?T(v,w,R):T(v,w))||R);return S>3&&R&&Object.defineProperty(v,w,R),R},g=this&&this.__param||function(p,v){return function(w,C){v(w,C,p)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Linkifier=void 0;const d=u(3656),y=u(8460),N=u(844),k=u(2585),b=u(4725);let c=s.Linkifier=class extends N.Disposable{get currentLink(){return this._currentLink}constructor(p,v,w,C,T){super(),this._element=p,this._mouseService=v,this._renderService=w,this._bufferService=C,this._linkProviderService=T,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new y.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new y.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,N.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,N.toDisposable)(()=>{var S;this._lastMouseEvent=void 0,(S=this._activeProviderReplies)==null||S.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,d.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,d.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(p){this._lastMouseEvent=p;const v=this._positionFromMouseEvent(p,this._element,this._mouseService);if(!v)return;this._isMouseOut=!1;const w=p.composedPath();for(let C=0;C<w.length;C++){const T=w[C];if(T.classList.contains("xterm"))break;if(T.classList.contains("xterm-hover"))return}this._lastBufferCell&&v.x===this._lastBufferCell.x&&v.y===this._lastBufferCell.y||(this._handleHover(v),this._lastBufferCell=v)}_handleHover(p){if(this._activeLine!==p.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(p,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,p)||(this._clearCurrentLink(),this._askForLink(p,!0))}_askForLink(p,v){var C,T;this._activeProviderReplies&&v||((C=this._activeProviderReplies)==null||C.forEach(S=>{S==null||S.forEach(R=>{R.link.dispose&&R.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=p.y);let w=!1;for(const[S,R]of this._linkProviderService.linkProviders.entries())v?(T=this._activeProviderReplies)!=null&&T.get(S)&&(w=this._checkLinkProviderResult(S,p,w)):R.provideLinks(p.y,j=>{var O,H;if(this._isMouseOut)return;const A=j==null?void 0:j.map(V=>({link:V}));(O=this._activeProviderReplies)==null||O.set(S,A),w=this._checkLinkProviderResult(S,p,w),((H=this._activeProviderReplies)==null?void 0:H.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(p.y,this._activeProviderReplies)})}_removeIntersectingLinks(p,v){const w=new Set;for(let C=0;C<v.size;C++){const T=v.get(C);if(T)for(let S=0;S<T.length;S++){const R=T[S],j=R.link.range.start.y<p?0:R.link.range.start.x,A=R.link.range.end.y>p?this._bufferService.cols:R.link.range.end.x;for(let O=j;O<=A;O++){if(w.has(O)){T.splice(S--,1);break}w.add(O)}}}}_checkLinkProviderResult(p,v,w){var S;if(!this._activeProviderReplies)return w;const C=this._activeProviderReplies.get(p);let T=!1;for(let R=0;R<p;R++)this._activeProviderReplies.has(R)&&!this._activeProviderReplies.get(R)||(T=!0);if(!T&&C){const R=C.find(j=>this._linkAtPosition(j.link,v));R&&(w=!0,this._handleNewLink(R))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!w)for(let R=0;R<this._activeProviderReplies.size;R++){const j=(S=this._activeProviderReplies.get(R))==null?void 0:S.find(A=>this._linkAtPosition(A.link,v));if(j){w=!0,this._handleNewLink(j);break}}return w}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(p){if(!this._currentLink)return;const v=this._positionFromMouseEvent(p,this._element,this._mouseService);v&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,v)&&this._currentLink.link.activate(p,this._currentLink.link.text)}_clearCurrentLink(p,v){this._currentLink&&this._lastMouseEvent&&(!p||!v||this._currentLink.link.range.start.y>=p&&this._currentLink.link.range.end.y<=v)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,N.disposeArray)(this._linkCacheDisposables))}_handleNewLink(p){if(!this._lastMouseEvent)return;const v=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);v&&this._linkAtPosition(p.link,v)&&(this._currentLink=p,this._currentLink.state={decorations:{underline:p.link.decorations===void 0||p.link.decorations.underline,pointerCursor:p.link.decorations===void 0||p.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,p.link,this._lastMouseEvent),p.link.decorations={},Object.defineProperties(p.link.decorations,{pointerCursor:{get:()=>{var w,C;return(C=(w=this._currentLink)==null?void 0:w.state)==null?void 0:C.decorations.pointerCursor},set:w=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==w&&(this._currentLink.state.decorations.pointerCursor=w,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",w))}},underline:{get:()=>{var w,C;return(C=(w=this._currentLink)==null?void 0:w.state)==null?void 0:C.decorations.underline},set:w=>{var C,T,S;(C=this._currentLink)!=null&&C.state&&((S=(T=this._currentLink)==null?void 0:T.state)==null?void 0:S.decorations.underline)!==w&&(this._currentLink.state.decorations.underline=w,this._currentLink.state.isHovered&&this._fireUnderlineEvent(p.link,w))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(w=>{if(!this._currentLink)return;const C=w.start===0?0:w.start+1+this._bufferService.buffer.ydisp,T=this._bufferService.buffer.ydisp+1+w.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=T&&(this._clearCurrentLink(C,T),this._lastMouseEvent)){const S=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);S&&this._askForLink(S,!1)}})))}_linkHover(p,v,w){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(v,!0),this._currentLink.state.decorations.pointerCursor&&p.classList.add("xterm-cursor-pointer")),v.hover&&v.hover(w,v.text)}_fireUnderlineEvent(p,v){const w=p.range,C=this._bufferService.buffer.ydisp,T=this._createLinkUnderlineEvent(w.start.x-1,w.start.y-C-1,w.end.x,w.end.y-C-1,void 0);(v?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(T)}_linkLeave(p,v,w){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(v,!1),this._currentLink.state.decorations.pointerCursor&&p.classList.remove("xterm-cursor-pointer")),v.leave&&v.leave(w,v.text)}_linkAtPosition(p,v){const w=p.range.start.y*this._bufferService.cols+p.range.start.x,C=p.range.end.y*this._bufferService.cols+p.range.end.x,T=v.y*this._bufferService.cols+v.x;return w<=T&&T<=C}_positionFromMouseEvent(p,v,w){const C=w.getCoords(p,v,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(p,v,w,C,T){return{x1:p,y1:v,x2:w,y2:C,cols:this._bufferService.cols,fg:T}}};s.Linkifier=c=f([g(1,b.IMouseService),g(2,b.IRenderService),g(3,k.IBufferService),g(4,b.ILinkProviderService)],c)},9042:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.tooMuchOutput=s.promptLabel=void 0,s.promptLabel="Terminal input",s.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(_,s,u){var f=this&&this.__decorate||function(b,c,p,v){var w,C=arguments.length,T=C<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,c,p,v);else for(var S=b.length-1;S>=0;S--)(w=b[S])&&(T=(C<3?w(T):C>3?w(c,p,T):w(c,p))||T);return C>3&&T&&Object.defineProperty(c,p,T),T},g=this&&this.__param||function(b,c){return function(p,v){c(p,v,b)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OscLinkProvider=void 0;const d=u(511),y=u(2585);let N=s.OscLinkProvider=class{constructor(b,c,p){this._bufferService=b,this._optionsService=c,this._oscLinkService=p}provideLinks(b,c){var A;const p=this._bufferService.buffer.lines.get(b-1);if(!p)return void c(void 0);const v=[],w=this._optionsService.rawOptions.linkHandler,C=new d.CellData,T=p.getTrimmedLength();let S=-1,R=-1,j=!1;for(let O=0;O<T;O++)if(R!==-1||p.hasContent(O)){if(p.loadCell(O,C),C.hasExtendedAttrs()&&C.extended.urlId){if(R===-1){R=O,S=C.extended.urlId;continue}j=C.extended.urlId!==S}else R!==-1&&(j=!0);if(j||R!==-1&&O===T-1){const H=(A=this._oscLinkService.getLinkData(S))==null?void 0:A.uri;if(H){const V={start:{x:R+1,y:b},end:{x:O+(j||O!==T-1?0:1),y:b}};let P=!1;if(!(w!=null&&w.allowNonHttpProtocols))try{const Y=new URL(H);["http:","https:"].includes(Y.protocol)||(P=!0)}catch{P=!0}P||v.push({text:H,range:V,activate:(Y,Q)=>w?w.activate(Y,Q,V):k(0,Q),hover:(Y,Q)=>{var z;return(z=w==null?void 0:w.hover)==null?void 0:z.call(w,Y,Q,V)},leave:(Y,Q)=>{var z;return(z=w==null?void 0:w.leave)==null?void 0:z.call(w,Y,Q,V)}})}j=!1,C.hasExtendedAttrs()&&C.extended.urlId?(R=O,S=C.extended.urlId):(R=-1,S=-1)}}c(v)}};function k(b,c){if(confirm(`Do you want to navigate to ${c}?
217
+
218
+ WARNING: This link could potentially be dangerous`)){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=c}else console.warn("Opening link blocked as opener could not be cleared")}}s.OscLinkProvider=N=f([g(0,y.IBufferService),g(1,y.IOptionsService),g(2,y.IOscLinkService)],N)},6193:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.RenderDebouncer=void 0,s.RenderDebouncer=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(u,f,g){this._rowCount=g,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,this._animationFrame||(this._animationFrame=this._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 u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Terminal=void 0;const f=u(3614),g=u(3656),d=u(3551),y=u(9042),N=u(3730),k=u(1680),b=u(3107),c=u(5744),p=u(2950),v=u(1296),w=u(428),C=u(4269),T=u(5114),S=u(8934),R=u(3230),j=u(9312),A=u(4725),O=u(6731),H=u(8055),V=u(8969),P=u(8460),Y=u(844),Q=u(6114),z=u(8437),X=u(2584),K=u(7399),B=u(5941),F=u(9074),G=u(2585),Z=u(5435),ae=u(4567),me=u(779);class Ue extends V.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(ie={}){super(ie),this.browser=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Y.MutableDisposable),this._onCursorMove=this.register(new P.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new P.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new P.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new P.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new P.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new P.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new P.EventEmitter),this._onBlur=this.register(new P.EventEmitter),this._onA11yCharEmitter=this.register(new P.EventEmitter),this._onA11yTabEmitter=this.register(new P.EventEmitter),this._onWillOpen=this.register(new P.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(F.DecorationService),this._instantiationService.setService(G.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(me.LinkProviderService),this._instantiationService.setService(A.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(N.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((q,fe)=>this.refresh(q,fe))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(q=>this._reportWindowsOptions(q))),this.register(this._inputHandler.onColor(q=>this._handleColorEvent(q))),this.register((0,P.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,P.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,P.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,P.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(q=>this._afterResize(q.cols,q.rows))),this.register((0,Y.toDisposable)(()=>{var q,fe;this._customKeyEventHandler=void 0,(fe=(q=this.element)==null?void 0:q.parentNode)==null||fe.removeChild(this.element)}))}_handleColorEvent(ie){if(this._themeService)for(const q of ie){let fe,le="";switch(q.index){case 256:fe="foreground",le="10";break;case 257:fe="background",le="11";break;case 258:fe="cursor",le="12";break;default:fe="ansi",le="4;"+q.index}switch(q.type){case 0:const Oe=H.color.toColorRGB(fe==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[fe]);this.coreService.triggerDataEvent(`${X.C0.ESC}]${le};${(0,B.toRgbString)(Oe)}${X.C1_ESCAPED.ST}`);break;case 1:if(fe==="ansi")this._themeService.modifyColors(ke=>ke.ansi[q.index]=H.channels.toColor(...q.color));else{const ke=fe;this._themeService.modifyColors(nt=>nt[ke]=H.channels.toColor(...q.color))}break;case 2:this._themeService.restoreColor(q.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(ae.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ie){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.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(X.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,q=this.buffer.lines.get(ie);if(!q)return;const fe=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,Oe=q.getWidth(fe),ke=this._renderService.dimensions.css.cell.width*Oe,nt=this.buffer.y*this._renderService.dimensions.css.cell.height,xe=fe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=xe+"px",this.textarea.style.top=nt+"px",this.textarea.style.width=ke+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,g.addDisposableDomListener)(this.element,"copy",q=>{this.hasSelection()&&(0,f.copyHandler)(q,this._selectionService)}));const ie=q=>(0,f.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,g.addDisposableDomListener)(this.textarea,"paste",ie)),this.register((0,g.addDisposableDomListener)(this.element,"paste",ie)),Q.isFirefox?this.register((0,g.addDisposableDomListener)(this.element,"mousedown",q=>{q.button===2&&(0,f.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,g.addDisposableDomListener)(this.element,"contextmenu",q=>{(0,f.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),Q.isLinux&&this.register((0,g.addDisposableDomListener)(this.element,"auxclick",q=>{q.button===1&&(0,f.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,g.addDisposableDomListener)(this.textarea,"keyup",ie=>this._keyUp(ie),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"keydown",ie=>this._keyDown(ie),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"keypress",ie=>this._keyPress(ie),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionupdate",ie=>this._compositionHelper.compositionupdate(ie))),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,g.addDisposableDomListener)(this.textarea,"input",ie=>this._inputEvent(ie),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(ie){var fe;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"),((fe=this.element)==null?void 0:fe.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 q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.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,g.addDisposableDomListener)(this.screenElement,"mousemove",le=>this.updateCursorStyle(le))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",y.promptLabel),Q.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(T.CoreBrowserService,this.textarea,ie.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(A.ICoreBrowserService,this._coreBrowserService),this.register((0,g.addDisposableDomListener)(this.textarea,"focus",le=>this._handleTextAreaFocus(le))),this.register((0,g.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(w.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(A.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(O.ThemeService),this._instantiationService.setService(A.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(C.CharacterJoinerService),this._instantiationService.setService(A.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(R.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(A.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(le=>this._onRender.fire(le))),this.onResize(le=>this._renderService.resize(le.cols,le.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(p.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(S.MouseService),this._instantiationService.setService(A.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(d.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(k.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(le=>this.scrollLines(le.amount,le.suppressScrollEvent,1)),this.register(this._inputHandler.onRequestSyncScrollBar(()=>this.viewport.syncScrollArea())),this.register(this.viewport),this.register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this.register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this.register(this.onBlur(()=>this._renderService.handleBlur())),this.register(this.onFocus(()=>this._renderService.handleFocus())),this.register(this._renderService.onDimensionsChange(()=>this.viewport.syncScrollArea())),this._selectionService=this.register(this._instantiationService.createInstance(j.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(A.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(le=>this.scrollLines(le.amount,le.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,g.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(b.BufferDecorationRenderer,this.screenElement)),this.register((0,g.addDisposableDomListener)(this.element,"mousedown",le=>this._selectionService.handleMouseDown(le))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(ae.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",le=>this._handleScreenReaderModeOptionChange(le))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(c.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(c.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(v.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const ie=this,q=this.element;function fe(ke){const nt=ie._mouseService.getMouseReportCoords(ke,ie.screenElement);if(!nt)return!1;let xe,$e;switch(ke.overrideType||ke.type){case"mousemove":$e=32,ke.buttons===void 0?(xe=3,ke.button!==void 0&&(xe=ke.button<3?ke.button:3)):xe=1&ke.buttons?0:4&ke.buttons?1:2&ke.buttons?2:3;break;case"mouseup":$e=0,xe=ke.button<3?ke.button:3;break;case"mousedown":$e=1,xe=ke.button<3?ke.button:3;break;case"wheel":if(ie._customWheelEventHandler&&ie._customWheelEventHandler(ke)===!1||ie.viewport.getLinesScrolled(ke)===0)return!1;$e=ke.deltaY<0?0:1,xe=4;break;default:return!1}return!($e===void 0||xe===void 0||xe>4)&&ie.coreMouseService.triggerMouseEvent({col:nt.col,row:nt.row,x:nt.x,y:nt.y,button:xe,action:$e,ctrl:ke.ctrlKey,alt:ke.altKey,shift:ke.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Oe={mouseup:ke=>(fe(ke),ke.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(ke)),wheel:ke=>(fe(ke),this.cancel(ke,!0)),mousedrag:ke=>{ke.buttons&&fe(ke)},mousemove:ke=>{ke.buttons||fe(ke)}};this.register(this.coreMouseService.onProtocolChange(ke=>{ke?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ke)),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&ke?le.mousemove||(q.addEventListener("mousemove",Oe.mousemove),le.mousemove=Oe.mousemove):(q.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&ke?le.wheel||(q.addEventListener("wheel",Oe.wheel,{passive:!1}),le.wheel=Oe.wheel):(q.removeEventListener("wheel",le.wheel),le.wheel=null),2&ke?le.mouseup||(le.mouseup=Oe.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&ke?le.mousedrag||(le.mousedrag=Oe.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,g.addDisposableDomListener)(q,"mousedown",ke=>{if(ke.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ke))return fe(ke),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(ke)})),this.register((0,g.addDisposableDomListener)(q,"wheel",ke=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ke)===!1)return!1;if(!this.buffer.hasScrollback){const nt=this.viewport.getLinesScrolled(ke);if(nt===0)return;const xe=X.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ke.deltaY<0?"A":"B");let $e="";for(let at=0;at<Math.abs(nt);at++)$e+=xe;return this.coreService.triggerDataEvent($e,!0),this.cancel(ke,!0)}return this.viewport.handleWheel(ke)?this.cancel(ke):void 0}},{passive:!1})),this.register((0,g.addDisposableDomListener)(q,"touchstart",ke=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ke),this.cancel(ke)},{passive:!0})),this.register((0,g.addDisposableDomListener)(q,"touchmove",ke=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ke)?void 0:this.cancel(ke)},{passive:!1}))}refresh(ie,q){var fe;(fe=this._renderService)==null||fe.refreshRows(ie,q)}updateCursorStyle(ie){var q;(q=this._selectionService)!=null&&q.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,q,fe=0){var le;fe===1?(super.scrollLines(ie,q,fe),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(ie)}paste(ie){(0,f.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 q=this._characterJoinerService.register(ie);return this.refresh(0,this.rows-1),q}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,q,fe){this._selectionService.setSelection(ie,q,fe)}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,q){var fe;(fe=this._selectionService)==null||fe.selectLines(ie,q)}_keyDown(ie){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&ie.altKey;if(!q&&!this._compositionHelper.keydown(ie))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||ie.key!=="Dead"&&ie.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const fe=(0,K.evaluateKeyboardEvent)(ie,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ie),fe.type===3||fe.type===2){const le=this.rows-1;return this.scrollLines(fe.type===2?-le:le),this.cancel(ie,!0)}return fe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ie)||(fe.cancel&&this.cancel(ie,!0),!fe.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):(fe.key!==X.C0.ETX&&fe.key!==X.C0.CR||(this.textarea.value=""),this._onKey.fire({key:fe.key,domEvent:ie}),this._showCursor(),this.coreService.triggerDataEvent(fe.key,!0),!this.optionsService.rawOptions.screenReaderMode||ie.altKey||ie.ctrlKey?this.cancel(ie,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ie,q){const fe=ie.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||ie.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||ie.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?fe:fe&&(!q.keyCode||q.keyCode>47)}_keyUp(ie){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1||(function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18}(ie)||this.focus(),this.updateCursorStyle(ie),this._keyPressHandled=!1)}_keyPress(ie){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1)return!1;if(this.cancel(ie),ie.charCode)q=ie.charCode;else if(ie.which===null||ie.which===void 0)q=ie.keyCode;else{if(ie.which===0||ie.charCode===0)return!1;q=ie.which}return!(!q||(ie.altKey||ie.ctrlKey||ie.metaKey)&&!this._isThirdLevelShift(this.browser,ie)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:ie}),this._showCursor(),this.coreService.triggerDataEvent(q,!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 q=ie.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(ie),!0}return!1}resize(ie,q){ie!==this.cols||q!==this.rows?super.resize(ie,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(ie,q){var fe,le;(fe=this._charSizeService)==null||fe.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var ie;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let q=1;q<this.rows;q++)this.buffer.lines.push(this.buffer.getBlankLine(z.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(ie=this.viewport)==null||ie.reset(),this.refresh(0,this.rows-1)}}reset(){var q,fe;this.options.rows=this.rows,this.options.cols=this.cols;const ie=this._customKeyEventHandler;this._setup(),super.reset(),(q=this._selectionService)==null||q.reset(),this._decorationService.reset(),(fe=this.viewport)==null||fe.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(X.C0.ESC+"[I"):this.coreService.triggerDataEvent(X.C0.ESC+"[O")}_reportWindowsOptions(ie){if(this._renderService)switch(ie){case Z.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const q=this._renderService.dimensions.css.canvas.width.toFixed(0),fe=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${X.C0.ESC}[4;${fe};${q}t`);break;case Z.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const le=this._renderService.dimensions.css.cell.width.toFixed(0),Oe=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${X.C0.ESC}[6;${Oe};${le}t`)}}cancel(ie,q){if(this.options.cancelEvents||q)return ie.preventDefault(),ie.stopPropagation(),!1}}s.Terminal=Ue},9924:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.TimeBasedDebouncer=void 0,s.TimeBasedDebouncer=class{constructor(u,f=1e3){this._renderCallback=u,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,f,g){this._rowCount=g,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f;const d=Date.now();if(d-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=d,this._innerRefresh();else if(!this._additionalRefreshRequested){const y=d-this._lastRefreshMs,N=this._debounceThresholdMS-y;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 u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f)}}},1680:function(_,s,u){var f=this&&this.__decorate||function(p,v,w,C){var T,S=arguments.length,R=S<3?v:C===null?C=Object.getOwnPropertyDescriptor(v,w):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(p,v,w,C);else for(var j=p.length-1;j>=0;j--)(T=p[j])&&(R=(S<3?T(R):S>3?T(v,w,R):T(v,w))||R);return S>3&&R&&Object.defineProperty(v,w,R),R},g=this&&this.__param||function(p,v){return function(w,C){v(w,C,p)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Viewport=void 0;const d=u(3656),y=u(4725),N=u(8460),k=u(844),b=u(2585);let c=s.Viewport=class extends k.Disposable{constructor(p,v,w,C,T,S,R,j){super(),this._viewportElement=p,this._scrollArea=v,this._bufferService=w,this._optionsService=C,this._charSizeService=T,this._renderService=S,this._coreBrowserService=R,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,d.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(A=>this._activeBuffer=A.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(A=>this._renderDimensions=A)),this._handleThemeChange(j.colors),this.register(j.onChangeColors(A=>this._handleThemeChange(A))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(p){this._viewportElement.style.backgroundColor=p.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(p){if(p)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 v=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==v&&(this._lastRecordedBufferHeight=v,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const p=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==p&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=p),this._refreshAnimationFrame=null}syncScrollArea(p=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(p);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(p)}_handleScroll(p){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 v=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:v,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const p=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(p*(this._smoothScrollState.target-this._smoothScrollState.origin)),p<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(p,v){const w=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(v<0&&this._viewportElement.scrollTop!==0||v>0&&w<this._lastRecordedBufferHeight)||(p.cancelable&&p.preventDefault(),!1)}handleWheel(p){const v=this._getPixelsScrolled(p);return v!==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+v:this._smoothScrollState.target+=v,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=v,this._bubbleScroll(p,v))}scrollLines(p){if(p!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const v=p*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+v,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:p,suppressScrollEvent:!1})}_getPixelsScrolled(p){if(p.deltaY===0||p.shiftKey)return 0;let v=this._applyScrollModifier(p.deltaY,p);return p.deltaMode===WheelEvent.DOM_DELTA_LINE?v*=this._currentRowHeight:p.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(v*=this._currentRowHeight*this._bufferService.rows),v}getBufferElements(p,v){var j;let w,C="";const T=[],S=v??this._bufferService.buffer.lines.length,R=this._bufferService.buffer.lines;for(let A=p;A<S;A++){const O=R.get(A);if(!O)continue;const H=(j=R.get(A+1))==null?void 0:j.isWrapped;if(C+=O.translateToString(!H),!H||A===R.length-1){const V=document.createElement("div");V.textContent=C,T.push(V),C.length>0&&(w=V),C=""}}return{bufferElements:T,cursorElement:w}}getLinesScrolled(p){if(p.deltaY===0||p.shiftKey)return 0;let v=this._applyScrollModifier(p.deltaY,p);return p.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(v/=this._currentRowHeight+0,this._wheelPartialScroll+=v,v=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):p.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(v*=this._bufferService.rows),v}_applyScrollModifier(p,v){const w=this._optionsService.rawOptions.fastScrollModifier;return w==="alt"&&v.altKey||w==="ctrl"&&v.ctrlKey||w==="shift"&&v.shiftKey?p*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:p*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(p){this._lastTouchY=p.touches[0].pageY}handleTouchMove(p){const v=this._lastTouchY-p.touches[0].pageY;return this._lastTouchY=p.touches[0].pageY,v!==0&&(this._viewportElement.scrollTop+=v,this._bubbleScroll(p,v))}};s.Viewport=c=f([g(2,b.IBufferService),g(3,b.IOptionsService),g(4,y.ICharSizeService),g(5,y.IRenderService),g(6,y.ICoreBrowserService),g(7,y.IThemeService)],c)},3107:function(_,s,u){var f=this&&this.__decorate||function(b,c,p,v){var w,C=arguments.length,T=C<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,c,p,v);else for(var S=b.length-1;S>=0;S--)(w=b[S])&&(T=(C<3?w(T):C>3?w(c,p,T):w(c,p))||T);return C>3&&T&&Object.defineProperty(c,p,T),T},g=this&&this.__param||function(b,c){return function(p,v){c(p,v,b)}};Object.defineProperty(s,"__esModule",{value:!0}),s.BufferDecorationRenderer=void 0;const d=u(4725),y=u(844),N=u(2585);let k=s.BufferDecorationRenderer=class extends y.Disposable{constructor(b,c,p,v,w){super(),this._screenElement=b,this._bufferService=c,this._coreBrowserService=p,this._decorationService=v,this._renderService=w,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(C=>this._removeDecoration(C))),this.register((0,y.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 v;const c=this._coreBrowserService.mainDocument.createElement("div");c.classList.add("xterm-decoration"),c.classList.toggle("xterm-decoration-top-layer",((v=b==null?void 0:b.options)==null?void 0:v.layer)==="top"),c.style.width=`${Math.round((b.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,c.style.height=(b.options.height||1)*this._renderService.dimensions.css.cell.height+"px",c.style.top=(b.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",c.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const p=b.options.x??0;return p&&p>this._bufferService.cols&&(c.style.display="none"),this._refreshXPosition(b,c),c}_refreshStyle(b){const c=b.marker.line-this._bufferService.buffers.active.ydisp;if(c<0||c>=this._bufferService.rows)b.element&&(b.element.style.display="none",b.onRenderEmitter.fire(b.element));else{let p=this._decorationElements.get(b);p||(p=this._createElement(b),b.element=p,this._decorationElements.set(b,p),this._container.appendChild(p),b.onDispose(()=>{this._decorationElements.delete(b),p.remove()})),p.style.top=c*this._renderService.dimensions.css.cell.height+"px",p.style.display=this._altBufferIsActive?"none":"block",b.onRenderEmitter.fire(p)}}_refreshXPosition(b,c=b.element){if(!c)return;const p=b.options.x??0;(b.options.anchor||"left")==="right"?c.style.right=p?p*this._renderService.dimensions.css.cell.width+"px":"":c.style.left=p?p*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(b){var c;(c=this._decorationElements.get(b))==null||c.remove(),this._decorationElements.delete(b),b.dispose()}};s.BufferDecorationRenderer=k=f([g(1,N.IBufferService),g(2,d.ICoreBrowserService),g(3,N.IDecorationService),g(4,d.IRenderService)],k)},5871:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ColorZoneStore=void 0,s.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(u){if(u.options.overviewRulerOptions){for(const f of this._zones)if(f.color===u.options.overviewRulerOptions.color&&f.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,u.marker.line))return;if(this._lineAdjacentToZone(f,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(f,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,f){return f>=u.startBufferLine&&f<=u.endBufferLine}_lineAdjacentToZone(u,f,g){return f>=u.startBufferLine-this._linePadding[g||"full"]&&f<=u.endBufferLine+this._linePadding[g||"full"]}_addLineToZone(u,f){u.startBufferLine=Math.min(u.startBufferLine,f),u.endBufferLine=Math.max(u.endBufferLine,f)}}},5744:function(_,s,u){var f=this&&this.__decorate||function(w,C,T,S){var R,j=arguments.length,A=j<3?C:S===null?S=Object.getOwnPropertyDescriptor(C,T):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(w,C,T,S);else for(var O=w.length-1;O>=0;O--)(R=w[O])&&(A=(j<3?R(A):j>3?R(C,T,A):R(C,T))||A);return j>3&&A&&Object.defineProperty(C,T,A),A},g=this&&this.__param||function(w,C){return function(T,S){C(T,S,w)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OverviewRulerRenderer=void 0;const d=u(5871),y=u(4725),N=u(844),k=u(2585),b={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0},p={full:0,left:0,center:0,right:0};let v=s.OverviewRulerRenderer=class extends N.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(w,C,T,S,R,j,A){var H;super(),this._viewportElement=w,this._screenElement=C,this._bufferService=T,this._decorationService=S,this._renderService=R,this._optionsService=j,this._coreBrowserService=A,this._colorZoneStore=new d.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(),(H=this._viewportElement.parentElement)==null||H.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 V;(V=this._canvas)==null||V.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 w=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);c.full=this._canvas.width,c.left=w,c.center=C,c.right=w,this._refreshDrawHeightConstants(),p.full=0,p.left=0,p.center=c.left,p.right=c.left+c.center}_refreshDrawHeightConstants(){b.full=Math.round(2*this._coreBrowserService.dpr);const w=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(w,12),6)*this._coreBrowserService.dpr);b.left=C,b.center=C,b.right=C}_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 C of this._decorationService.decorations)this._colorZoneStore.addDecoration(C);this._ctx.lineWidth=1;const w=this._colorZoneStore.zones;for(const C of w)C.position!=="full"&&this._renderColorZone(C);for(const C of w)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(w){this._ctx.fillStyle=w.color,this._ctx.fillRect(p[w.position||"full"],Math.round((this._canvas.height-1)*(w.startBufferLine/this._bufferService.buffers.active.lines.length)-b[w.position||"full"]/2),c[w.position||"full"],Math.round((this._canvas.height-1)*((w.endBufferLine-w.startBufferLine)/this._bufferService.buffers.active.lines.length)+b[w.position||"full"]))}_queueRefresh(w,C){this._shouldUpdateDimensions=w||this._shouldUpdateDimensions,this._shouldUpdateAnchor=C||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};s.OverviewRulerRenderer=v=f([g(2,k.IBufferService),g(3,k.IDecorationService),g(4,y.IRenderService),g(5,k.IOptionsService),g(6,y.ICoreBrowserService)],v)},2950:function(_,s,u){var f=this&&this.__decorate||function(b,c,p,v){var w,C=arguments.length,T=C<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,c,p,v);else for(var S=b.length-1;S>=0;S--)(w=b[S])&&(T=(C<3?w(T):C>3?w(c,p,T):w(c,p))||T);return C>3&&T&&Object.defineProperty(c,p,T),T},g=this&&this.__param||function(b,c){return function(p,v){c(p,v,b)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CompositionHelper=void 0;const d=u(4725),y=u(2585),N=u(2584);let k=s.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(b,c,p,v,w,C){this._textarea=b,this._compositionView=c,this._bufferService=p,this._optionsService=v,this._coreService=w,this._renderService=C,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(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 c={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let p;this._isSendingComposition=!1,c.start+=this._dataAlreadySent.length,p=this._isComposing?this._textarea.value.substring(c.start,c.end):this._textarea.value.substring(c.start),p.length>0&&this._coreService.triggerDataEvent(p,!0)}},0)}else{this._isSendingComposition=!1;const c=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(c,!0)}}_handleAnyTextareaChanges(){const b=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const c=this._textarea.value,p=c.replace(b,"");this._dataAlreadySent=p,c.length>b.length?this._coreService.triggerDataEvent(p,!0):c.length<b.length?this._coreService.triggerDataEvent(`${N.C0.DEL}`,!0):c.length===b.length&&c!==b&&this._coreService.triggerDataEvent(c,!0)}},0)}updateCompositionElements(b){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const c=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),p=this._renderService.dimensions.css.cell.height,v=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,w=c*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=w+"px",this._compositionView.style.top=v+"px",this._compositionView.style.height=p+"px",this._compositionView.style.lineHeight=p+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const C=this._compositionView.getBoundingClientRect();this._textarea.style.left=w+"px",this._textarea.style.top=v+"px",this._textarea.style.width=Math.max(C.width,1)+"px",this._textarea.style.height=Math.max(C.height,1)+"px",this._textarea.style.lineHeight=C.height+"px"}b||setTimeout(()=>this.updateCompositionElements(!0),0)}}};s.CompositionHelper=k=f([g(2,y.IBufferService),g(3,y.IOptionsService),g(4,y.ICoreService),g(5,d.IRenderService)],k)},9806:(_,s)=>{function u(f,g,d){const y=d.getBoundingClientRect(),N=f.getComputedStyle(d),k=parseInt(N.getPropertyValue("padding-left")),b=parseInt(N.getPropertyValue("padding-top"));return[g.clientX-y.left-k,g.clientY-y.top-b]}Object.defineProperty(s,"__esModule",{value:!0}),s.getCoords=s.getCoordsRelativeToElement=void 0,s.getCoordsRelativeToElement=u,s.getCoords=function(f,g,d,y,N,k,b,c,p){if(!k)return;const v=u(f,g,d);return v?(v[0]=Math.ceil((v[0]+(p?b/2:0))/b),v[1]=Math.ceil(v[1]/c),v[0]=Math.min(Math.max(v[0],1),y+(p?1:0)),v[1]=Math.min(Math.max(v[1],1),N),v):void 0}},9504:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.moveToCellSequence=void 0;const f=u(2584);function g(c,p,v,w){const C=c-d(c,v),T=p-d(p,v),S=Math.abs(C-T)-function(R,j,A){let O=0;const H=R-d(R,A),V=j-d(j,A);for(let P=0;P<Math.abs(H-V);P++){const Y=y(R,j)==="A"?-1:1,Q=A.buffer.lines.get(H+Y*P);Q!=null&&Q.isWrapped&&O++}return O}(c,p,v);return b(S,k(y(c,p),w))}function d(c,p){let v=0,w=p.buffer.lines.get(c),C=w==null?void 0:w.isWrapped;for(;C&&c>=0&&c<p.rows;)v++,w=p.buffer.lines.get(--c),C=w==null?void 0:w.isWrapped;return v}function y(c,p){return c>p?"A":"B"}function N(c,p,v,w,C,T){let S=c,R=p,j="";for(;S!==v||R!==w;)S+=C?1:-1,C&&S>T.cols-1?(j+=T.buffer.translateBufferLineToString(R,!1,c,S),S=0,c=0,R++):!C&&S<0&&(j+=T.buffer.translateBufferLineToString(R,!1,0,c+1),S=T.cols-1,c=S,R--);return j+T.buffer.translateBufferLineToString(R,!1,c,S)}function k(c,p){const v=p?"O":"[";return f.C0.ESC+v+c}function b(c,p){c=Math.floor(c);let v="";for(let w=0;w<c;w++)v+=p;return v}s.moveToCellSequence=function(c,p,v,w){const C=v.buffer.x,T=v.buffer.y;if(!v.buffer.hasScrollback)return function(j,A,O,H,V,P){return g(A,H,V,P).length===0?"":b(N(j,A,j,A-d(A,V),!1,V).length,k("D",P))}(C,T,0,p,v,w)+g(T,p,v,w)+function(j,A,O,H,V,P){let Y;Y=g(A,H,V,P).length>0?H-d(H,V):A;const Q=H,z=function(X,K,B,F,G,Z){let ae;return ae=g(B,F,G,Z).length>0?F-d(F,G):K,X<B&&ae<=F||X>=B&&ae<F?"C":"D"}(j,A,O,H,V,P);return b(N(j,Y,O,Q,z==="C",V).length,k(z,P))}(C,T,c,p,v,w);let S;if(T===p)return S=C>c?"D":"C",b(Math.abs(C-c),k(S,w));S=T>p?"D":"C";const R=Math.abs(T-p);return b(function(j,A){return A.cols-j}(T>p?c:C,v)+(R-1)*v.cols+1+((T>p?C:c)-1),k(S,w))}},1296:function(_,s,u){var f=this&&this.__decorate||function(P,Y,Q,z){var X,K=arguments.length,B=K<3?Y:z===null?z=Object.getOwnPropertyDescriptor(Y,Q):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(P,Y,Q,z);else for(var F=P.length-1;F>=0;F--)(X=P[F])&&(B=(K<3?X(B):K>3?X(Y,Q,B):X(Y,Q))||B);return K>3&&B&&Object.defineProperty(Y,Q,B),B},g=this&&this.__param||function(P,Y){return function(Q,z){Y(Q,z,P)}};Object.defineProperty(s,"__esModule",{value:!0}),s.DomRenderer=void 0;const d=u(3787),y=u(2550),N=u(2223),k=u(6171),b=u(6052),c=u(4725),p=u(8055),v=u(8460),w=u(844),C=u(2585),T="xterm-dom-renderer-owner-",S="xterm-rows",R="xterm-fg-",j="xterm-bg-",A="xterm-focus",O="xterm-selection";let H=1,V=s.DomRenderer=class extends w.Disposable{constructor(P,Y,Q,z,X,K,B,F,G,Z,ae,me,Ue){super(),this._terminal=P,this._document=Y,this._element=Q,this._screenElement=z,this._viewportElement=X,this._helperContainer=K,this._linkifier2=B,this._charSizeService=G,this._optionsService=Z,this._bufferService=ae,this._coreBrowserService=me,this._themeService=Ue,this._terminalClass=H++,this._rowElements=[],this._selectionRenderModel=(0,b.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new v.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(S),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(O),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,k.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(De=>this._injectCss(De))),this._injectCss(this._themeService.colors),this._rowFactory=F.createInstance(d.DomRendererRowFactory,document),this._element.classList.add(T+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(De=>this._handleLinkHover(De))),this.register(this._linkifier2.onHideLinkUnderline(De=>this._handleLinkLeave(De))),this.register((0,w.toDisposable)(()=>{this._element.classList.remove(T+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new y.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 P=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*P,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*P),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/P),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/P),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const Q of this._rowElements)Q.style.width=`${this.dimensions.css.canvas.width}px`,Q.style.height=`${this.dimensions.css.cell.height}px`,Q.style.lineHeight=`${this.dimensions.css.cell.height}px`,Q.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const Y=`${this._terminalSelector} .${S} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=Y,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(P){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Y=`${this._terminalSelector} .${S} { color: ${P.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Y+=`${this._terminalSelector} .${S} .xterm-dim { color: ${p.color.multiplyOpacity(P.foreground,.5).css};}`,Y+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const Q=`blink_underline_${this._terminalClass}`,z=`blink_bar_${this._terminalClass}`,X=`blink_block_${this._terminalClass}`;Y+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,Y+=`@keyframes ${z} { 50% { box-shadow: none; }}`,Y+=`@keyframes ${X} { 0% { background-color: ${P.cursor.css}; color: ${P.cursorAccent.css}; } 50% { background-color: inherit; color: ${P.cursor.css}; }}`,Y+=`${this._terminalSelector} .${S}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${S}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${z} 1s step-end infinite;}${this._terminalSelector} .${S}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block { background-color: ${P.cursor.css}; color: ${P.cursorAccent.css};}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${P.cursor.css} !important; color: ${P.cursorAccent.css} !important;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${P.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${P.cursor.css} inset;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${P.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Y+=`${this._terminalSelector} .${O} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${O} div { position: absolute; background-color: ${P.selectionBackgroundOpaque.css};}${this._terminalSelector} .${O} div { position: absolute; background-color: ${P.selectionInactiveBackgroundOpaque.css};}`;for(const[K,B]of P.ansi.entries())Y+=`${this._terminalSelector} .${R}${K} { color: ${B.css}; }${this._terminalSelector} .${R}${K}.xterm-dim { color: ${p.color.multiplyOpacity(B,.5).css}; }${this._terminalSelector} .${j}${K} { background-color: ${B.css}; }`;Y+=`${this._terminalSelector} .${R}${N.INVERTED_DEFAULT_COLOR} { color: ${p.color.opaque(P.background).css}; }${this._terminalSelector} .${R}${N.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${p.color.multiplyOpacity(p.color.opaque(P.background),.5).css}; }${this._terminalSelector} .${j}${N.INVERTED_DEFAULT_COLOR} { background-color: ${P.foreground.css}; }`,this._themeStyleElement.textContent=Y}_setDefaultSpacing(){const P=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${P}px`,this._rowFactory.defaultSpacing=P}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(P,Y){for(let Q=this._rowElements.length;Q<=Y;Q++){const z=this._document.createElement("div");this._rowContainer.appendChild(z),this._rowElements.push(z)}for(;this._rowElements.length>Y;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(P,Y){this._refreshRowElements(P,Y),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(A),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(A),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(P,Y,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(P,Y,Q),this.renderRows(0,this._bufferService.rows-1),!P||!Y)return;this._selectionRenderModel.update(this._terminal,P,Y,Q);const z=this._selectionRenderModel.viewportStartRow,X=this._selectionRenderModel.viewportEndRow,K=this._selectionRenderModel.viewportCappedStartRow,B=this._selectionRenderModel.viewportCappedEndRow;if(K>=this._bufferService.rows||B<0)return;const F=this._document.createDocumentFragment();if(Q){const G=P[0]>Y[0];F.appendChild(this._createSelectionElement(K,G?Y[0]:P[0],G?P[0]:Y[0],B-K+1))}else{const G=z===K?P[0]:0,Z=K===X?Y[0]:this._bufferService.cols;F.appendChild(this._createSelectionElement(K,G,Z));const ae=B-K-1;if(F.appendChild(this._createSelectionElement(K+1,0,this._bufferService.cols,ae)),K!==B){const me=X===B?Y[0]:this._bufferService.cols;F.appendChild(this._createSelectionElement(B,0,me))}}this._selectionContainer.appendChild(F)}_createSelectionElement(P,Y,Q,z=1){const X=this._document.createElement("div"),K=Y*this.dimensions.css.cell.width;let B=this.dimensions.css.cell.width*(Q-Y);return K+B>this.dimensions.css.canvas.width&&(B=this.dimensions.css.canvas.width-K),X.style.height=z*this.dimensions.css.cell.height+"px",X.style.top=P*this.dimensions.css.cell.height+"px",X.style.left=`${K}px`,X.style.width=`${B}px`,X}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 P of this._rowElements)P.replaceChildren()}renderRows(P,Y){const Q=this._bufferService.buffer,z=Q.ybase+Q.y,X=Math.min(Q.x,this._bufferService.cols-1),K=this._optionsService.rawOptions.cursorBlink,B=this._optionsService.rawOptions.cursorStyle,F=this._optionsService.rawOptions.cursorInactiveStyle;for(let G=P;G<=Y;G++){const Z=G+Q.ydisp,ae=this._rowElements[G],me=Q.lines.get(Z);if(!ae||!me)break;ae.replaceChildren(...this._rowFactory.createRow(me,Z,Z===z,B,F,X,K,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${T}${this._terminalClass}`}_handleLinkHover(P){this._setCellUnderline(P.x1,P.x2,P.y1,P.y2,P.cols,!0)}_handleLinkLeave(P){this._setCellUnderline(P.x1,P.x2,P.y1,P.y2,P.cols,!1)}_setCellUnderline(P,Y,Q,z,X,K){Q<0&&(P=0),z<0&&(Y=0);const B=this._bufferService.rows-1;Q=Math.max(Math.min(Q,B),0),z=Math.max(Math.min(z,B),0),X=Math.min(X,this._bufferService.cols);const F=this._bufferService.buffer,G=F.ybase+F.y,Z=Math.min(F.x,X-1),ae=this._optionsService.rawOptions.cursorBlink,me=this._optionsService.rawOptions.cursorStyle,Ue=this._optionsService.rawOptions.cursorInactiveStyle;for(let De=Q;De<=z;++De){const ie=De+F.ydisp,q=this._rowElements[De],fe=F.lines.get(ie);if(!q||!fe)break;q.replaceChildren(...this._rowFactory.createRow(fe,ie,ie===G,me,Ue,Z,ae,this.dimensions.css.cell.width,this._widthCache,K?De===Q?P:0:-1,K?(De===z?Y:X)-1:-1))}}};s.DomRenderer=V=f([g(7,C.IInstantiationService),g(8,c.ICharSizeService),g(9,C.IOptionsService),g(10,C.IBufferService),g(11,c.ICoreBrowserService),g(12,c.IThemeService)],V)},3787:function(_,s,u){var f=this&&this.__decorate||function(S,R,j,A){var O,H=arguments.length,V=H<3?R:A===null?A=Object.getOwnPropertyDescriptor(R,j):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(S,R,j,A);else for(var P=S.length-1;P>=0;P--)(O=S[P])&&(V=(H<3?O(V):H>3?O(R,j,V):O(R,j))||V);return H>3&&V&&Object.defineProperty(R,j,V),V},g=this&&this.__param||function(S,R){return function(j,A){R(j,A,S)}};Object.defineProperty(s,"__esModule",{value:!0}),s.DomRendererRowFactory=void 0;const d=u(2223),y=u(643),N=u(511),k=u(2585),b=u(8055),c=u(4725),p=u(4269),v=u(6171),w=u(3734);let C=s.DomRendererRowFactory=class{constructor(S,R,j,A,O,H,V){this._document=S,this._characterJoinerService=R,this._optionsService=j,this._coreBrowserService=A,this._coreService=O,this._decorationService=H,this._themeService=V,this._workCell=new N.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(S,R,j){this._selectionStart=S,this._selectionEnd=R,this._columnSelectMode=j}createRow(S,R,j,A,O,H,V,P,Y,Q,z){const X=[],K=this._characterJoinerService.getJoinedCharacters(R),B=this._themeService.colors;let F,G=S.getNoBgTrimmedLength();j&&G<H+1&&(G=H+1);let Z=0,ae="",me=0,Ue=0,De=0,ie=!1,q=0,fe=!1,le=0;const Oe=[],ke=Q!==-1&&z!==-1;for(let nt=0;nt<G;nt++){S.loadCell(nt,this._workCell);let xe=this._workCell.getWidth();if(xe===0)continue;let $e=!1,at=nt,Ge=this._workCell;if(K.length>0&&nt===K[0][0]){$e=!0;const ze=K.shift();Ge=new p.JoinedCellData(this._workCell,S.translateToString(!0,ze[0],ze[1]),ze[1]-ze[0]),at=ze[1]-1,xe=Ge.getWidth()}const Ft=this._isCellInSelection(nt,R),Rt=j&&nt===H,oe=ke&&nt>=Q&&nt<=z;let Te=!1;this._decorationService.forEachDecorationAtCell(nt,R,void 0,ze=>{Te=!0});let Ie=Ge.getChars()||y.WHITESPACE_CELL_CHAR;if(Ie===" "&&(Ge.isUnderline()||Ge.isOverline())&&(Ie=" "),le=xe*P-Y.get(Ie,Ge.isBold(),Ge.isItalic()),F){if(Z&&(Ft&&fe||!Ft&&!fe&&Ge.bg===me)&&(Ft&&fe&&B.selectionForeground||Ge.fg===Ue)&&Ge.extended.ext===De&&oe===ie&&le===q&&!Rt&&!$e&&!Te){Ge.isInvisible()?ae+=y.WHITESPACE_CELL_CHAR:ae+=Ie,Z++;continue}Z&&(F.textContent=ae),F=this._document.createElement("span"),Z=0,ae=""}else F=this._document.createElement("span");if(me=Ge.bg,Ue=Ge.fg,De=Ge.extended.ext,ie=oe,q=le,fe=Ft,$e&&H>=nt&&H<=at&&(H=nt),!this._coreService.isCursorHidden&&Rt&&this._coreService.isCursorInitialized){if(Oe.push("xterm-cursor"),this._coreBrowserService.isFocused)V&&Oe.push("xterm-cursor-blink"),Oe.push(A==="bar"?"xterm-cursor-bar":A==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":Oe.push("xterm-cursor-outline");break;case"block":Oe.push("xterm-cursor-block");break;case"bar":Oe.push("xterm-cursor-bar");break;case"underline":Oe.push("xterm-cursor-underline")}}if(Ge.isBold()&&Oe.push("xterm-bold"),Ge.isItalic()&&Oe.push("xterm-italic"),Ge.isDim()&&Oe.push("xterm-dim"),ae=Ge.isInvisible()?y.WHITESPACE_CELL_CHAR:Ge.getChars()||y.WHITESPACE_CELL_CHAR,Ge.isUnderline()&&(Oe.push(`xterm-underline-${Ge.extended.underlineStyle}`),ae===" "&&(ae=" "),!Ge.isUnderlineColorDefault()))if(Ge.isUnderlineColorRGB())F.style.textDecorationColor=`rgb(${w.AttributeData.toColorRGB(Ge.getUnderlineColor()).join(",")})`;else{let ze=Ge.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ge.isBold()&&ze<8&&(ze+=8),F.style.textDecorationColor=B.ansi[ze].css}Ge.isOverline()&&(Oe.push("xterm-overline"),ae===" "&&(ae=" ")),Ge.isStrikethrough()&&Oe.push("xterm-strikethrough"),oe&&(F.style.textDecoration="underline");let Ve=Ge.getFgColor(),tt=Ge.getFgColorMode(),ot=Ge.getBgColor(),bt=Ge.getBgColorMode();const ve=!!Ge.isInverse();if(ve){const ze=Ve;Ve=ot,ot=ze;const Nt=tt;tt=bt,bt=Nt}let Ne,Qe,ye,Fe=!1;switch(this._decorationService.forEachDecorationAtCell(nt,R,void 0,ze=>{ze.options.layer!=="top"&&Fe||(ze.backgroundColorRGB&&(bt=50331648,ot=ze.backgroundColorRGB.rgba>>8&16777215,Ne=ze.backgroundColorRGB),ze.foregroundColorRGB&&(tt=50331648,Ve=ze.foregroundColorRGB.rgba>>8&16777215,Qe=ze.foregroundColorRGB),Fe=ze.options.layer==="top")}),!Fe&&Ft&&(Ne=this._coreBrowserService.isFocused?B.selectionBackgroundOpaque:B.selectionInactiveBackgroundOpaque,ot=Ne.rgba>>8&16777215,bt=50331648,Fe=!0,B.selectionForeground&&(tt=50331648,Ve=B.selectionForeground.rgba>>8&16777215,Qe=B.selectionForeground)),Fe&&Oe.push("xterm-decoration-top"),bt){case 16777216:case 33554432:ye=B.ansi[ot],Oe.push(`xterm-bg-${ot}`);break;case 50331648:ye=b.channels.toColor(ot>>16,ot>>8&255,255&ot),this._addStyle(F,`background-color:#${T((ot>>>0).toString(16),"0",6)}`);break;default:ve?(ye=B.foreground,Oe.push(`xterm-bg-${d.INVERTED_DEFAULT_COLOR}`)):ye=B.background}switch(Ne||Ge.isDim()&&(Ne=b.color.multiplyOpacity(ye,.5)),tt){case 16777216:case 33554432:Ge.isBold()&&Ve<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ve+=8),this._applyMinimumContrast(F,ye,B.ansi[Ve],Ge,Ne,void 0)||Oe.push(`xterm-fg-${Ve}`);break;case 50331648:const ze=b.channels.toColor(Ve>>16&255,Ve>>8&255,255&Ve);this._applyMinimumContrast(F,ye,ze,Ge,Ne,Qe)||this._addStyle(F,`color:#${T(Ve.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(F,ye,B.foreground,Ge,Ne,Qe)||ve&&Oe.push(`xterm-fg-${d.INVERTED_DEFAULT_COLOR}`)}Oe.length&&(F.className=Oe.join(" "),Oe.length=0),Rt||$e||Te?F.textContent=ae:Z++,le!==this.defaultSpacing&&(F.style.letterSpacing=`${le}px`),X.push(F),nt=at}return F&&Z&&(F.textContent=ae),X}_applyMinimumContrast(S,R,j,A,O,H){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,v.treatGlyphAsBackgroundColor)(A.getCode()))return!1;const V=this._getContrastCache(A);let P;if(O||H||(P=V.getColor(R.rgba,j.rgba)),P===void 0){const Y=this._optionsService.rawOptions.minimumContrastRatio/(A.isDim()?2:1);P=b.color.ensureContrastRatio(O||R,H||j,Y),V.setColor((O||R).rgba,(H||j).rgba,P??null)}return!!P&&(this._addStyle(S,`color:${P.css}`),!0)}_getContrastCache(S){return S.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(S,R){S.setAttribute("style",`${S.getAttribute("style")||""}${R};`)}_isCellInSelection(S,R){const j=this._selectionStart,A=this._selectionEnd;return!(!j||!A)&&(this._columnSelectMode?j[0]<=A[0]?S>=j[0]&&R>=j[1]&&S<A[0]&&R<=A[1]:S<j[0]&&R>=j[1]&&S>=A[0]&&R<=A[1]:R>j[1]&&R<A[1]||j[1]===A[1]&&R===j[1]&&S>=j[0]&&S<A[0]||j[1]<A[1]&&R===A[1]&&S<A[0]||j[1]<A[1]&&R===j[1]&&S>=j[0])}};function T(S,R,j){for(;S.length<j;)S=R+S;return S}s.DomRendererRowFactory=C=f([g(1,c.ICharacterJoinerService),g(2,k.IOptionsService),g(3,c.ICoreBrowserService),g(4,k.ICoreService),g(5,k.IDecorationService),g(6,c.IThemeService)],C)},2550:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.WidthCache=void 0,s.WidthCache=class{constructor(u,f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const g=u.createElement("span");g.classList.add("xterm-char-measure-element");const d=u.createElement("span");d.classList.add("xterm-char-measure-element"),d.style.fontWeight="bold";const y=u.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontStyle="italic";const N=u.createElement("span");N.classList.add("xterm-char-measure-element"),N.style.fontWeight="bold",N.style.fontStyle="italic",this._measureElements=[g,d,y,N],this._container.appendChild(g),this._container.appendChild(d),this._container.appendChild(y),this._container.appendChild(N),f.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(u,f,g,d){u===this._font&&f===this._fontSize&&g===this._weight&&d===this._weightBold||(this._font=u,this._fontSize=f,this._weight=g,this._weightBold=d,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${g}`,this._measureElements[1].style.fontWeight=`${d}`,this._measureElements[2].style.fontWeight=`${g}`,this._measureElements[3].style.fontWeight=`${d}`,this.clear())}get(u,f,g){let d=0;if(!f&&!g&&u.length===1&&(d=u.charCodeAt(0))<256){if(this._flat[d]!==-9999)return this._flat[d];const k=this._measure(u,0);return k>0&&(this._flat[d]=k),k}let y=u;f&&(y+="B"),g&&(y+="I");let N=this._holey.get(y);if(N===void 0){let k=0;f&&(k|=1),g&&(k|=2),N=this._measure(u,k),N>0&&this._holey.set(y,N)}return N}_measure(u,f){const g=this._measureElements[f];return g.textContent=u.repeat(32),g.offsetWidth/32}}},2223:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.TEXT_BASELINE=s.DIM_OPACITY=s.INVERTED_DEFAULT_COLOR=void 0;const f=u(6114);s.INVERTED_DEFAULT_COLOR=257,s.DIM_OPACITY=.5,s.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(_,s)=>{function u(g){return 57508<=g&&g<=57558}function f(g){return g>=128512&&g<=128591||g>=127744&&g<=128511||g>=128640&&g<=128767||g>=9728&&g<=9983||g>=9984&&g<=10175||g>=65024&&g<=65039||g>=129280&&g<=129535||g>=127462&&g<=127487}Object.defineProperty(s,"__esModule",{value:!0}),s.computeNextVariantOffset=s.createRenderDimensions=s.treatGlyphAsBackgroundColor=s.allowRescaling=s.isEmoji=s.isRestrictedPowerlineGlyph=s.isPowerlineGlyph=s.throwIfFalsy=void 0,s.throwIfFalsy=function(g){if(!g)throw new Error("value must not be falsy");return g},s.isPowerlineGlyph=u,s.isRestrictedPowerlineGlyph=function(g){return 57520<=g&&g<=57527},s.isEmoji=f,s.allowRescaling=function(g,d,y,N){return d===1&&y>Math.ceil(1.5*N)&&g!==void 0&&g>255&&!f(g)&&!u(g)&&!function(k){return 57344<=k&&k<=63743}(g)},s.treatGlyphAsBackgroundColor=function(g){return u(g)||function(d){return 9472<=d&&d<=9631}(g)},s.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}}}},s.computeNextVariantOffset=function(g,d,y=0){return(g-(2*Math.round(d)-y))%(2*Math.round(d))}},6052:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.createSelectionRenderModel=void 0;class u{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(g,d,y,N=!1){if(this.selectionStart=d,this.selectionEnd=y,!d||!y||d[0]===y[0]&&d[1]===y[1])return void this.clear();const k=g.buffers.active.ydisp,b=d[1]-k,c=y[1]-k,p=Math.max(b,0),v=Math.min(c,g.rows-1);p>=g.rows||v<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=N,this.viewportStartRow=b,this.viewportEndRow=c,this.viewportCappedStartRow=p,this.viewportCappedEndRow=v,this.startCol=d[0],this.endCol=y[0])}isCellSelected(g,d,y){return!!this.hasSelection&&(y-=g.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?d>=this.startCol&&y>=this.viewportCappedStartRow&&d<this.endCol&&y<=this.viewportCappedEndRow:d<this.startCol&&y>=this.viewportCappedStartRow&&d>=this.endCol&&y<=this.viewportCappedEndRow:y>this.viewportStartRow&&y<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&y===this.viewportStartRow&&d>=this.startCol&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&y===this.viewportEndRow&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&y===this.viewportStartRow&&d>=this.startCol)}}s.createSelectionRenderModel=function(){return new u}},456:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.SelectionModel=void 0,s.SelectionModel=class{constructor(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,f=this.selectionEnd;return!(!u||!f)&&(u[1]>f[1]||u[1]===f[1]&&u[0]>f[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(_,s,u){var f=this&&this.__decorate||function(v,w,C,T){var S,R=arguments.length,j=R<3?w:T===null?T=Object.getOwnPropertyDescriptor(w,C):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,w,C,T);else for(var A=v.length-1;A>=0;A--)(S=v[A])&&(j=(R<3?S(j):R>3?S(w,C,j):S(w,C))||j);return R>3&&j&&Object.defineProperty(w,C,j),j},g=this&&this.__param||function(v,w){return function(C,T){w(C,T,v)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CharSizeService=void 0;const d=u(2585),y=u(8460),N=u(844);let k=s.CharSizeService=class extends N.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(v,w,C){super(),this._optionsService=C,this.width=0,this.height=0,this._onCharSizeChange=this.register(new y.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new p(this._optionsService))}catch{this._measureStrategy=this.register(new c(v,w,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const v=this._measureStrategy.measure();v.width===this.width&&v.height===this.height||(this.width=v.width,this.height=v.height,this._onCharSizeChange.fire())}};s.CharSizeService=k=f([g(2,d.IOptionsService)],k);class b extends N.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(w,C){w!==void 0&&w>0&&C!==void 0&&C>0&&(this._result.width=w,this._result.height=C)}}class c extends b{constructor(w,C,T){super(),this._document=w,this._parentElement=C,this._optionsService=T,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class p extends b{constructor(w){super(),this._optionsService=w,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const C=this._ctx.measureText("W");if(!("width"in C&&"fontBoundingBoxAscent"in C&&"fontBoundingBoxDescent"in C))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const w=this._ctx.measureText("W");return this._validateAndSet(w.width,w.fontBoundingBoxAscent+w.fontBoundingBoxDescent),this._result}}},4269:function(_,s,u){var f=this&&this.__decorate||function(p,v,w,C){var T,S=arguments.length,R=S<3?v:C===null?C=Object.getOwnPropertyDescriptor(v,w):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(p,v,w,C);else for(var j=p.length-1;j>=0;j--)(T=p[j])&&(R=(S<3?T(R):S>3?T(v,w,R):T(v,w))||R);return S>3&&R&&Object.defineProperty(v,w,R),R},g=this&&this.__param||function(p,v){return function(w,C){v(w,C,p)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CharacterJoinerService=s.JoinedCellData=void 0;const d=u(3734),y=u(643),N=u(511),k=u(2585);class b extends d.AttributeData{constructor(v,w,C){super(),this.content=0,this.combinedData="",this.fg=v.fg,this.bg=v.bg,this.combinedData=w,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(v){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}s.JoinedCellData=b;let c=s.CharacterJoinerService=class rj{constructor(v){this._bufferService=v,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new N.CellData}register(v){const w={id:this._nextCharacterJoinerId++,handler:v};return this._characterJoiners.push(w),w.id}deregister(v){for(let w=0;w<this._characterJoiners.length;w++)if(this._characterJoiners[w].id===v)return this._characterJoiners.splice(w,1),!0;return!1}getJoinedCharacters(v){if(this._characterJoiners.length===0)return[];const w=this._bufferService.buffer.lines.get(v);if(!w||w.length===0)return[];const C=[],T=w.translateToString(!0);let S=0,R=0,j=0,A=w.getFg(0),O=w.getBg(0);for(let H=0;H<w.getTrimmedLength();H++)if(w.loadCell(H,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==A||this._workCell.bg!==O){if(H-S>1){const V=this._getJoinedRanges(T,j,R,w,S);for(let P=0;P<V.length;P++)C.push(V[P])}S=H,j=R,A=this._workCell.fg,O=this._workCell.bg}R+=this._workCell.getChars().length||y.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-S>1){const H=this._getJoinedRanges(T,j,R,w,S);for(let V=0;V<H.length;V++)C.push(H[V])}return C}_getJoinedRanges(v,w,C,T,S){const R=v.substring(w,C);let j=[];try{j=this._characterJoiners[0].handler(R)}catch(A){console.error(A)}for(let A=1;A<this._characterJoiners.length;A++)try{const O=this._characterJoiners[A].handler(R);for(let H=0;H<O.length;H++)rj._mergeRanges(j,O[H])}catch(O){console.error(O)}return this._stringRangesToCellRanges(j,T,S),j}_stringRangesToCellRanges(v,w,C){let T=0,S=!1,R=0,j=v[T];if(j){for(let A=C;A<this._bufferService.cols;A++){const O=w.getWidth(A),H=w.getString(A).length||y.WHITESPACE_CELL_CHAR.length;if(O!==0){if(!S&&j[0]<=R&&(j[0]=A,S=!0),j[1]<=R){if(j[1]=A,j=v[++T],!j)break;j[0]<=R?(j[0]=A,S=!0):S=!1}R+=H}}j&&(j[1]=this._bufferService.cols)}}static _mergeRanges(v,w){let C=!1;for(let T=0;T<v.length;T++){const S=v[T];if(C){if(w[1]<=S[0])return v[T-1][1]=w[1],v;if(w[1]<=S[1])return v[T-1][1]=Math.max(w[1],S[1]),v.splice(T,1),v;v.splice(T,1),T--}else{if(w[1]<=S[0])return v.splice(T,0,w),v;if(w[1]<=S[1])return S[0]=Math.min(w[0],S[0]),v;w[0]<S[1]&&(S[0]=Math.min(w[0],S[0]),C=!0)}}return C?v[v.length-1][1]=w[1]:v.push(w),v}};s.CharacterJoinerService=c=f([g(0,k.IBufferService)],c)},5114:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CoreBrowserService=void 0;const f=u(844),g=u(8460),d=u(3656);class y extends f.Disposable{constructor(b,c,p){super(),this._textarea=b,this._window=c,this.mainDocument=p,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new N(this._window),this._onDprChange=this.register(new g.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new g.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(v=>this._screenDprMonitor.setWindow(v))),this.register((0,g.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}}s.CoreBrowserService=y;class N extends f.Disposable{constructor(b){super(),this._parentWindow=b,this._windowResizeListener=this.register(new f.MutableDisposable),this._onDprChange=this.register(new g.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,f.toDisposable)(()=>this.clearListener()))}setWindow(b){this._parentWindow=b,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,d.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:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.LinkProviderService=void 0;const f=u(844);class g extends f.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,f.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(y){return this.linkProviders.push(y),{dispose:()=>{const N=this.linkProviders.indexOf(y);N!==-1&&this.linkProviders.splice(N,1)}}}}s.LinkProviderService=g},8934:function(_,s,u){var f=this&&this.__decorate||function(k,b,c,p){var v,w=arguments.length,C=w<3?b:p===null?p=Object.getOwnPropertyDescriptor(b,c):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(k,b,c,p);else for(var T=k.length-1;T>=0;T--)(v=k[T])&&(C=(w<3?v(C):w>3?v(b,c,C):v(b,c))||C);return w>3&&C&&Object.defineProperty(b,c,C),C},g=this&&this.__param||function(k,b){return function(c,p){b(c,p,k)}};Object.defineProperty(s,"__esModule",{value:!0}),s.MouseService=void 0;const d=u(4725),y=u(9806);let N=s.MouseService=class{constructor(k,b){this._renderService=k,this._charSizeService=b}getCoords(k,b,c,p,v){return(0,y.getCoords)(window,k,b,c,p,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,v)}getMouseReportCoords(k,b){const c=(0,y.getCoordsRelativeToElement)(window,k,b);if(this._charSizeService.hasValidSize)return c[0]=Math.min(Math.max(c[0],0),this._renderService.dimensions.css.canvas.width-1),c[1]=Math.min(Math.max(c[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(c[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(c[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(c[0]),y:Math.floor(c[1])}}};s.MouseService=N=f([g(0,d.IRenderService),g(1,d.ICharSizeService)],N)},3230:function(_,s,u){var f=this&&this.__decorate||function(v,w,C,T){var S,R=arguments.length,j=R<3?w:T===null?T=Object.getOwnPropertyDescriptor(w,C):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,w,C,T);else for(var A=v.length-1;A>=0;A--)(S=v[A])&&(j=(R<3?S(j):R>3?S(w,C,j):S(w,C))||j);return R>3&&j&&Object.defineProperty(w,C,j),j},g=this&&this.__param||function(v,w){return function(C,T){w(C,T,v)}};Object.defineProperty(s,"__esModule",{value:!0}),s.RenderService=void 0;const d=u(6193),y=u(4725),N=u(8460),k=u(844),b=u(7226),c=u(2585);let p=s.RenderService=class extends k.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(v,w,C,T,S,R,j,A){super(),this._rowCount=v,this._charSizeService=T,this._renderer=this.register(new k.MutableDisposable),this._pausedResizeTask=new b.DebouncedIdleTask,this._observerDisposable=this.register(new k.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 d.RenderDebouncer((O,H)=>this._renderRows(O,H),j),this.register(this._renderDebouncer),this.register(j.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(R.onResize(()=>this._fullRefresh())),this.register(R.buffers.onBufferActivate(()=>{var O;return(O=this._renderer.value)==null?void 0:O.clear()})),this.register(C.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(S.onDecorationRegistered(()=>this._fullRefresh())),this.register(S.onDecorationRemoved(()=>this._fullRefresh())),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(R.cols,R.rows),this._fullRefresh()})),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(R.buffer.y,R.buffer.y,!0))),this.register(A.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(j.window,w),this.register(j.onWindowChange(O=>this._registerIntersectionObserver(O,w)))}_registerIntersectionObserver(v,w){if("IntersectionObserver"in v){const C=new v.IntersectionObserver(T=>this._handleIntersectionChange(T[T.length-1]),{threshold:0});C.observe(w),this._observerDisposable.value=(0,k.toDisposable)(()=>C.disconnect())}}_handleIntersectionChange(v){this._isPaused=v.isIntersecting===void 0?v.intersectionRatio===0:!v.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(v,w,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(v,w,this._rowCount))}_renderRows(v,w){this._renderer.value&&(v=Math.min(v,this._rowCount-1),w=Math.min(w,this._rowCount-1),this._renderer.value.renderRows(v,w),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:v,end:w}),this._onRender.fire({start:v,end:w}),this._isNextRenderRedrawOnly=!0)}resize(v,w){this._rowCount=w,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(v){this._renderer.value=v,this._renderer.value&&(this._renderer.value.onRequestRedraw(w=>this.refreshRows(w.start,w.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(v){return this._renderDebouncer.addRefreshCallback(v)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var v,w;this._renderer.value&&((w=(v=this._renderer.value).clearTextureAtlas)==null||w.call(v),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(v,w){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(v,w)}):this._renderer.value.handleResize(v,w),this._fullRefresh())}handleCharSizeChanged(){var v;(v=this._renderer.value)==null||v.handleCharSizeChanged()}handleBlur(){var v;(v=this._renderer.value)==null||v.handleBlur()}handleFocus(){var v;(v=this._renderer.value)==null||v.handleFocus()}handleSelectionChanged(v,w,C){var T;this._selectionState.start=v,this._selectionState.end=w,this._selectionState.columnSelectMode=C,(T=this._renderer.value)==null||T.handleSelectionChanged(v,w,C)}handleCursorMove(){var v;(v=this._renderer.value)==null||v.handleCursorMove()}clear(){var v;(v=this._renderer.value)==null||v.clear()}};s.RenderService=p=f([g(2,c.IOptionsService),g(3,y.ICharSizeService),g(4,c.IDecorationService),g(5,c.IBufferService),g(6,y.ICoreBrowserService),g(7,y.IThemeService)],p)},9312:function(_,s,u){var f=this&&this.__decorate||function(j,A,O,H){var V,P=arguments.length,Y=P<3?A:H===null?H=Object.getOwnPropertyDescriptor(A,O):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(j,A,O,H);else for(var Q=j.length-1;Q>=0;Q--)(V=j[Q])&&(Y=(P<3?V(Y):P>3?V(A,O,Y):V(A,O))||Y);return P>3&&Y&&Object.defineProperty(A,O,Y),Y},g=this&&this.__param||function(j,A){return function(O,H){A(O,H,j)}};Object.defineProperty(s,"__esModule",{value:!0}),s.SelectionService=void 0;const d=u(9806),y=u(9504),N=u(456),k=u(4725),b=u(8460),c=u(844),p=u(6114),v=u(4841),w=u(511),C=u(2585),T=" ",S=new RegExp(T,"g");let R=s.SelectionService=class extends c.Disposable{constructor(j,A,O,H,V,P,Y,Q,z){super(),this._element=j,this._screenElement=A,this._linkifier=O,this._bufferService=H,this._coreService=V,this._mouseService=P,this._optionsService=Y,this._renderService=Q,this._coreBrowserService=z,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new w.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=X=>this._handleMouseMove(X),this._mouseUpListener=X=>this._handleMouseUp(X),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(X=>this._handleTrim(X)),this.register(this._bufferService.buffers.onBufferActivate(X=>this._handleBufferActivate(X))),this.enable(),this._model=new N.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,c.toDisposable)(()=>{this._removeMouseDownListeners()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const j=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!(!j||!A||j[0]===A[0]&&j[1]===A[1])}get selectionText(){const j=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;if(!j||!A)return"";const O=this._bufferService.buffer,H=[];if(this._activeSelectionMode===3){if(j[0]===A[0])return"";const V=j[0]<A[0]?j[0]:A[0],P=j[0]<A[0]?A[0]:j[0];for(let Y=j[1];Y<=A[1];Y++){const Q=O.translateBufferLineToString(Y,!0,V,P);H.push(Q)}}else{const V=j[1]===A[1]?A[0]:void 0;H.push(O.translateBufferLineToString(j[1],!0,j[0],V));for(let P=j[1]+1;P<=A[1]-1;P++){const Y=O.lines.get(P),Q=O.translateBufferLineToString(P,!0);Y!=null&&Y.isWrapped?H[H.length-1]+=Q:H.push(Q)}if(j[1]!==A[1]){const P=O.lines.get(A[1]),Y=O.translateBufferLineToString(A[1],!0,0,A[0]);P&&P.isWrapped?H[H.length-1]+=Y:H.push(Y)}}return H.map(V=>V.replace(S," ")).join(p.isWindows?`\r
219
+ `:`
220
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(j){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),p.isLinux&&j&&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(j){const A=this._getMouseBufferCoords(j),O=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!!(O&&H&&A)&&this._areCoordsInSelection(A,O,H)}isCellInSelection(j,A){const O=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!(!O||!H)&&this._areCoordsInSelection([j,A],O,H)}_areCoordsInSelection(j,A,O){return j[1]>A[1]&&j[1]<O[1]||A[1]===O[1]&&j[1]===A[1]&&j[0]>=A[0]&&j[0]<O[0]||A[1]<O[1]&&j[1]===O[1]&&j[0]<O[0]||A[1]<O[1]&&j[1]===A[1]&&j[0]>=A[0]}_selectWordAtCursor(j,A){var V,P;const O=(P=(V=this._linkifier.currentLink)==null?void 0:V.link)==null?void 0:P.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,v.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const H=this._getMouseBufferCoords(j);return!!H&&(this._selectWordAt(H,A),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(j,A){this._model.clearSelection(),j=Math.max(j,0),A=Math.min(A,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,j],this._model.selectionEnd=[this._bufferService.cols,A],this.refresh(),this._onSelectionChange.fire()}_handleTrim(j){this._model.handleTrim(j)&&this.refresh()}_getMouseBufferCoords(j){const A=this._mouseService.getCoords(j,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(A)return A[0]--,A[1]--,A[1]+=this._bufferService.buffer.ydisp,A}_getMouseEventScrollAmount(j){let A=(0,d.getCoordsRelativeToElement)(this._coreBrowserService.window,j,this._screenElement)[1];const O=this._renderService.dimensions.css.canvas.height;return A>=0&&A<=O?0:(A>O&&(A-=O),A=Math.min(Math.max(A,-50),50),A/=50,A/Math.abs(A)+Math.round(14*A))}shouldForceSelection(j){return p.isMac?j.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:j.shiftKey}handleMouseDown(j){if(this._mouseDownTimeStamp=j.timeStamp,(j.button!==2||!this.hasSelection)&&j.button===0){if(!this._enabled){if(!this.shouldForceSelection(j))return;j.stopPropagation()}j.preventDefault(),this._dragScrollAmount=0,this._enabled&&j.shiftKey?this._handleIncrementalClick(j):j.detail===1?this._handleSingleClick(j):j.detail===2?this._handleDoubleClick(j):j.detail===3&&this._handleTripleClick(j),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(j){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(j))}_handleSingleClick(j){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(j)?3:0,this._model.selectionStart=this._getMouseBufferCoords(j),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const A=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);A&&A.length!==this._model.selectionStart[0]&&A.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(j){this._selectWordAtCursor(j,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(j){const A=this._getMouseBufferCoords(j);A&&(this._activeSelectionMode=2,this._selectLineAt(A[1]))}shouldColumnSelect(j){return j.altKey&&!(p.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(j){if(j.stopImmediatePropagation(),!this._model.selectionStart)return;const A=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(j),!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(j),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 H=O.lines.get(this._model.selectionEnd[1]);H&&H.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}A&&A[0]===this._model.selectionEnd[0]&&A[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 j=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(j.ydisp+this._bufferService.rows,j.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=j.ydisp),this.refresh()}}_handleMouseUp(j){const A=j.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&A<500&&j.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const O=this._mouseService.getCoords(j,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const H=(0,y.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(H,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const j=this._model.finalSelectionStart,A=this._model.finalSelectionEnd,O=!(!j||!A||j[0]===A[0]&&j[1]===A[1]);O?j&&A&&(this._oldSelectionStart&&this._oldSelectionEnd&&j[0]===this._oldSelectionStart[0]&&j[1]===this._oldSelectionStart[1]&&A[0]===this._oldSelectionEnd[0]&&A[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(j,A,O)):this._oldHasSelection&&this._fireOnSelectionChange(j,A,O)}_fireOnSelectionChange(j,A,O){this._oldSelectionStart=j,this._oldSelectionEnd=A,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(j){this.clearSelection(),this._trimListener.dispose(),this._trimListener=j.activeBuffer.lines.onTrim(A=>this._handleTrim(A))}_convertViewportColToCharacterIndex(j,A){let O=A;for(let H=0;A>=H;H++){const V=j.loadCell(H,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:V>1&&A!==H&&(O+=V-1)}return O}setSelection(j,A,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[j,A],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(j){this._isClickInSelection(j)||(this._selectWordAtCursor(j,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(j,A,O=!0,H=!0){if(j[0]>=this._bufferService.cols)return;const V=this._bufferService.buffer,P=V.lines.get(j[1]);if(!P)return;const Y=V.translateBufferLineToString(j[1],!1);let Q=this._convertViewportColToCharacterIndex(P,j[0]),z=Q;const X=j[0]-Q;let K=0,B=0,F=0,G=0;if(Y.charAt(Q)===" "){for(;Q>0&&Y.charAt(Q-1)===" ";)Q--;for(;z<Y.length&&Y.charAt(z+1)===" ";)z++}else{let me=j[0],Ue=j[0];P.getWidth(me)===0&&(K++,me--),P.getWidth(Ue)===2&&(B++,Ue++);const De=P.getString(Ue).length;for(De>1&&(G+=De-1,z+=De-1);me>0&&Q>0&&!this._isCharWordSeparator(P.loadCell(me-1,this._workCell));){P.loadCell(me-1,this._workCell);const ie=this._workCell.getChars().length;this._workCell.getWidth()===0?(K++,me--):ie>1&&(F+=ie-1,Q-=ie-1),Q--,me--}for(;Ue<P.length&&z+1<Y.length&&!this._isCharWordSeparator(P.loadCell(Ue+1,this._workCell));){P.loadCell(Ue+1,this._workCell);const ie=this._workCell.getChars().length;this._workCell.getWidth()===2?(B++,Ue++):ie>1&&(G+=ie-1,z+=ie-1),z++,Ue++}}z++;let Z=Q+X-K+F,ae=Math.min(this._bufferService.cols,z-Q+K+B-F-G);if(A||Y.slice(Q,z).trim()!==""){if(O&&Z===0&&P.getCodePoint(0)!==32){const me=V.lines.get(j[1]-1);if(me&&P.isWrapped&&me.getCodePoint(this._bufferService.cols-1)!==32){const Ue=this._getWordAt([this._bufferService.cols-1,j[1]-1],!1,!0,!1);if(Ue){const De=this._bufferService.cols-Ue.start;Z-=De,ae+=De}}}if(H&&Z+ae===this._bufferService.cols&&P.getCodePoint(this._bufferService.cols-1)!==32){const me=V.lines.get(j[1]+1);if(me!=null&&me.isWrapped&&me.getCodePoint(0)!==32){const Ue=this._getWordAt([0,j[1]+1],!1,!1,!0);Ue&&(ae+=Ue.length)}}return{start:Z,length:ae}}}_selectWordAt(j,A){const O=this._getWordAt(j,A);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,j[1]--;this._model.selectionStart=[O.start,j[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(j){const A=this._getWordAt(j,!0);if(A){let O=j[1];for(;A.start<0;)A.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;A.start+A.length>this._bufferService.cols;)A.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?A.start:A.start+A.length,O]}}_isCharWordSeparator(j){return j.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(j.getChars())>=0}_selectLineAt(j){const A=this._bufferService.buffer.getWrappedRangeForLine(j),O={start:{x:0,y:A.first},end:{x:this._bufferService.cols-1,y:A.last}};this._model.selectionStart=[0,A.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,v.getRangeLength)(O,this._bufferService.cols)}};s.SelectionService=R=f([g(3,C.IBufferService),g(4,C.ICoreService),g(5,k.IMouseService),g(6,C.IOptionsService),g(7,k.IRenderService),g(8,k.ICoreBrowserService)],R)},4725:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ILinkProviderService=s.IThemeService=s.ICharacterJoinerService=s.ISelectionService=s.IRenderService=s.IMouseService=s.ICoreBrowserService=s.ICharSizeService=void 0;const f=u(8343);s.ICharSizeService=(0,f.createDecorator)("CharSizeService"),s.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),s.IMouseService=(0,f.createDecorator)("MouseService"),s.IRenderService=(0,f.createDecorator)("RenderService"),s.ISelectionService=(0,f.createDecorator)("SelectionService"),s.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),s.IThemeService=(0,f.createDecorator)("ThemeService"),s.ILinkProviderService=(0,f.createDecorator)("LinkProviderService")},6731:function(_,s,u){var f=this&&this.__decorate||function(R,j,A,O){var H,V=arguments.length,P=V<3?j:O===null?O=Object.getOwnPropertyDescriptor(j,A):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(R,j,A,O);else for(var Y=R.length-1;Y>=0;Y--)(H=R[Y])&&(P=(V<3?H(P):V>3?H(j,A,P):H(j,A))||P);return V>3&&P&&Object.defineProperty(j,A,P),P},g=this&&this.__param||function(R,j){return function(A,O){j(A,O,R)}};Object.defineProperty(s,"__esModule",{value:!0}),s.ThemeService=s.DEFAULT_ANSI_COLORS=void 0;const d=u(7239),y=u(8055),N=u(8460),k=u(844),b=u(2585),c=y.css.toColor("#ffffff"),p=y.css.toColor("#000000"),v=y.css.toColor("#ffffff"),w=y.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};s.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const R=[y.css.toColor("#2e3436"),y.css.toColor("#cc0000"),y.css.toColor("#4e9a06"),y.css.toColor("#c4a000"),y.css.toColor("#3465a4"),y.css.toColor("#75507b"),y.css.toColor("#06989a"),y.css.toColor("#d3d7cf"),y.css.toColor("#555753"),y.css.toColor("#ef2929"),y.css.toColor("#8ae234"),y.css.toColor("#fce94f"),y.css.toColor("#729fcf"),y.css.toColor("#ad7fa8"),y.css.toColor("#34e2e2"),y.css.toColor("#eeeeec")],j=[0,95,135,175,215,255];for(let A=0;A<216;A++){const O=j[A/36%6|0],H=j[A/6%6|0],V=j[A%6];R.push({css:y.channels.toCss(O,H,V),rgba:y.channels.toRgba(O,H,V)})}for(let A=0;A<24;A++){const O=8+10*A;R.push({css:y.channels.toCss(O,O,O),rgba:y.channels.toRgba(O,O,O)})}return R})());let T=s.ThemeService=class extends k.Disposable{get colors(){return this._colors}constructor(R){super(),this._optionsService=R,this._contrastCache=new d.ColorContrastCache,this._halfContrastCache=new d.ColorContrastCache,this._onChangeColors=this.register(new N.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:c,background:p,cursor:v,cursorAccent:w,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:y.color.blend(p,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:y.color.blend(p,C),ansi:s.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(R={}){const j=this._colors;if(j.foreground=S(R.foreground,c),j.background=S(R.background,p),j.cursor=S(R.cursor,v),j.cursorAccent=S(R.cursorAccent,w),j.selectionBackgroundTransparent=S(R.selectionBackground,C),j.selectionBackgroundOpaque=y.color.blend(j.background,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundTransparent=S(R.selectionInactiveBackground,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundOpaque=y.color.blend(j.background,j.selectionInactiveBackgroundTransparent),j.selectionForeground=R.selectionForeground?S(R.selectionForeground,y.NULL_COLOR):void 0,j.selectionForeground===y.NULL_COLOR&&(j.selectionForeground=void 0),y.color.isOpaque(j.selectionBackgroundTransparent)&&(j.selectionBackgroundTransparent=y.color.opacity(j.selectionBackgroundTransparent,.3)),y.color.isOpaque(j.selectionInactiveBackgroundTransparent)&&(j.selectionInactiveBackgroundTransparent=y.color.opacity(j.selectionInactiveBackgroundTransparent,.3)),j.ansi=s.DEFAULT_ANSI_COLORS.slice(),j.ansi[0]=S(R.black,s.DEFAULT_ANSI_COLORS[0]),j.ansi[1]=S(R.red,s.DEFAULT_ANSI_COLORS[1]),j.ansi[2]=S(R.green,s.DEFAULT_ANSI_COLORS[2]),j.ansi[3]=S(R.yellow,s.DEFAULT_ANSI_COLORS[3]),j.ansi[4]=S(R.blue,s.DEFAULT_ANSI_COLORS[4]),j.ansi[5]=S(R.magenta,s.DEFAULT_ANSI_COLORS[5]),j.ansi[6]=S(R.cyan,s.DEFAULT_ANSI_COLORS[6]),j.ansi[7]=S(R.white,s.DEFAULT_ANSI_COLORS[7]),j.ansi[8]=S(R.brightBlack,s.DEFAULT_ANSI_COLORS[8]),j.ansi[9]=S(R.brightRed,s.DEFAULT_ANSI_COLORS[9]),j.ansi[10]=S(R.brightGreen,s.DEFAULT_ANSI_COLORS[10]),j.ansi[11]=S(R.brightYellow,s.DEFAULT_ANSI_COLORS[11]),j.ansi[12]=S(R.brightBlue,s.DEFAULT_ANSI_COLORS[12]),j.ansi[13]=S(R.brightMagenta,s.DEFAULT_ANSI_COLORS[13]),j.ansi[14]=S(R.brightCyan,s.DEFAULT_ANSI_COLORS[14]),j.ansi[15]=S(R.brightWhite,s.DEFAULT_ANSI_COLORS[15]),R.extendedAnsi){const A=Math.min(j.ansi.length-16,R.extendedAnsi.length);for(let O=0;O<A;O++)j.ansi[O+16]=S(R.extendedAnsi[O],s.DEFAULT_ANSI_COLORS[O+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(R){this._restoreColor(R),this._onChangeColors.fire(this.colors)}_restoreColor(R){if(R!==void 0)switch(R){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[R]=this._restoreColors.ansi[R]}else for(let j=0;j<this._restoreColors.ansi.length;++j)this._colors.ansi[j]=this._restoreColors.ansi[j]}modifyColors(R){R(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function S(R,j){if(R!==void 0)try{return y.css.toColor(R)}catch{}return j}s.ThemeService=T=f([g(0,b.IOptionsService)],T)},6349:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CircularList=void 0;const f=u(8460),g=u(844);class d extends g.Disposable{constructor(N){super(),this._maxLength=N,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(N){if(this._maxLength===N)return;const k=new Array(N);for(let b=0;b<Math.min(N,this.length);b++)k[b]=this._array[this._getCyclicIndex(b)];this._array=k,this._maxLength=N,this._startIndex=0}get length(){return this._length}set length(N){if(N>this._length)for(let k=this._length;k<N;k++)this._array[k]=void 0;this._length=N}get(N){return this._array[this._getCyclicIndex(N)]}set(N,k){this._array[this._getCyclicIndex(N)]=k}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,k,...b){if(k){for(let c=N;c<this._length-k;c++)this._array[this._getCyclicIndex(c)]=this._array[this._getCyclicIndex(c+k)];this._length-=k,this.onDeleteEmitter.fire({index:N,amount:k})}for(let c=this._length-1;c>=N;c--)this._array[this._getCyclicIndex(c+b.length)]=this._array[this._getCyclicIndex(c)];for(let c=0;c<b.length;c++)this._array[this._getCyclicIndex(N+c)]=b[c];if(b.length&&this.onInsertEmitter.fire({index:N,amount:b.length}),this._length+b.length>this._maxLength){const c=this._length+b.length-this._maxLength;this._startIndex+=c,this._length=this._maxLength,this.onTrimEmitter.fire(c)}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,k,b){if(!(k<=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 p=k-1;p>=0;p--)this.set(N+p+b,this.get(N+p));const c=N+k+b-this._length;if(c>0)for(this._length+=c;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let c=0;c<k;c++)this.set(N+c+b,this.get(N+c))}}_getCyclicIndex(N){return(this._startIndex+N)%this._maxLength}}s.CircularList=d},1439:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.clone=void 0,s.clone=function u(f,g=5){if(typeof f!="object")return f;const d=Array.isArray(f)?[]:{};for(const y in f)d[y]=g<=1?f[y]:f[y]&&u(f[y],g-1);return d}},8055:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.contrastRatio=s.toPaddedHex=s.rgba=s.rgb=s.css=s.color=s.channels=s.NULL_COLOR=void 0;let u=0,f=0,g=0,d=0;var y,N,k,b,c;function p(w){const C=w.toString(16);return C.length<2?"0"+C:C}function v(w,C){return w<C?(C+.05)/(w+.05):(w+.05)/(C+.05)}s.NULL_COLOR={css:"#00000000",rgba:0},function(w){w.toCss=function(C,T,S,R){return R!==void 0?`#${p(C)}${p(T)}${p(S)}${p(R)}`:`#${p(C)}${p(T)}${p(S)}`},w.toRgba=function(C,T,S,R=255){return(C<<24|T<<16|S<<8|R)>>>0},w.toColor=function(C,T,S,R){return{css:w.toCss(C,T,S,R),rgba:w.toRgba(C,T,S,R)}}}(y||(s.channels=y={})),function(w){function C(T,S){return d=Math.round(255*S),[u,f,g]=c.toChannels(T.rgba),{css:y.toCss(u,f,g,d),rgba:y.toRgba(u,f,g,d)}}w.blend=function(T,S){if(d=(255&S.rgba)/255,d===1)return{css:S.css,rgba:S.rgba};const R=S.rgba>>24&255,j=S.rgba>>16&255,A=S.rgba>>8&255,O=T.rgba>>24&255,H=T.rgba>>16&255,V=T.rgba>>8&255;return u=O+Math.round((R-O)*d),f=H+Math.round((j-H)*d),g=V+Math.round((A-V)*d),{css:y.toCss(u,f,g),rgba:y.toRgba(u,f,g)}},w.isOpaque=function(T){return(255&T.rgba)==255},w.ensureContrastRatio=function(T,S,R){const j=c.ensureContrastRatio(T.rgba,S.rgba,R);if(j)return y.toColor(j>>24&255,j>>16&255,j>>8&255)},w.opaque=function(T){const S=(255|T.rgba)>>>0;return[u,f,g]=c.toChannels(S),{css:y.toCss(u,f,g),rgba:S}},w.opacity=C,w.multiplyOpacity=function(T,S){return d=255&T.rgba,C(T,d*S/255)},w.toColorRGB=function(T){return[T.rgba>>24&255,T.rgba>>16&255,T.rgba>>8&255]}}(N||(s.color=N={})),function(w){let C,T;try{const S=document.createElement("canvas");S.width=1,S.height=1;const R=S.getContext("2d",{willReadFrequently:!0});R&&(C=R,C.globalCompositeOperation="copy",T=C.createLinearGradient(0,0,1,1))}catch{}w.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return u=parseInt(S.slice(1,2).repeat(2),16),f=parseInt(S.slice(2,3).repeat(2),16),g=parseInt(S.slice(3,4).repeat(2),16),y.toColor(u,f,g);case 5:return u=parseInt(S.slice(1,2).repeat(2),16),f=parseInt(S.slice(2,3).repeat(2),16),g=parseInt(S.slice(3,4).repeat(2),16),d=parseInt(S.slice(4,5).repeat(2),16),y.toColor(u,f,g,d);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const R=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(R)return u=parseInt(R[1]),f=parseInt(R[2]),g=parseInt(R[3]),d=Math.round(255*(R[5]===void 0?1:parseFloat(R[5]))),y.toColor(u,f,g,d);if(!C||!T)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=T,C.fillStyle=S,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[u,f,g,d]=C.getImageData(0,0,1,1).data,d!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:y.toRgba(u,f,g,d),css:S}}}(k||(s.css=k={})),function(w){function C(T,S,R){const j=T/255,A=S/255,O=R/255;return .2126*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.7152*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}w.relativeLuminance=function(T){return C(T>>16&255,T>>8&255,255&T)},w.relativeLuminance2=C}(b||(s.rgb=b={})),function(w){function C(S,R,j){const A=S>>24&255,O=S>>16&255,H=S>>8&255;let V=R>>24&255,P=R>>16&255,Y=R>>8&255,Q=v(b.relativeLuminance2(V,P,Y),b.relativeLuminance2(A,O,H));for(;Q<j&&(V>0||P>0||Y>0);)V-=Math.max(0,Math.ceil(.1*V)),P-=Math.max(0,Math.ceil(.1*P)),Y-=Math.max(0,Math.ceil(.1*Y)),Q=v(b.relativeLuminance2(V,P,Y),b.relativeLuminance2(A,O,H));return(V<<24|P<<16|Y<<8|255)>>>0}function T(S,R,j){const A=S>>24&255,O=S>>16&255,H=S>>8&255;let V=R>>24&255,P=R>>16&255,Y=R>>8&255,Q=v(b.relativeLuminance2(V,P,Y),b.relativeLuminance2(A,O,H));for(;Q<j&&(V<255||P<255||Y<255);)V=Math.min(255,V+Math.ceil(.1*(255-V))),P=Math.min(255,P+Math.ceil(.1*(255-P))),Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),Q=v(b.relativeLuminance2(V,P,Y),b.relativeLuminance2(A,O,H));return(V<<24|P<<16|Y<<8|255)>>>0}w.blend=function(S,R){if(d=(255&R)/255,d===1)return R;const j=R>>24&255,A=R>>16&255,O=R>>8&255,H=S>>24&255,V=S>>16&255,P=S>>8&255;return u=H+Math.round((j-H)*d),f=V+Math.round((A-V)*d),g=P+Math.round((O-P)*d),y.toRgba(u,f,g)},w.ensureContrastRatio=function(S,R,j){const A=b.relativeLuminance(S>>8),O=b.relativeLuminance(R>>8);if(v(A,O)<j){if(O<A){const P=C(S,R,j),Y=v(A,b.relativeLuminance(P>>8));if(Y<j){const Q=T(S,R,j);return Y>v(A,b.relativeLuminance(Q>>8))?P:Q}return P}const H=T(S,R,j),V=v(A,b.relativeLuminance(H>>8));if(V<j){const P=C(S,R,j);return V>v(A,b.relativeLuminance(P>>8))?H:P}return H}},w.reduceLuminance=C,w.increaseLuminance=T,w.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}}(c||(s.rgba=c={})),s.toPaddedHex=p,s.contrastRatio=v},8969:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CoreTerminal=void 0;const f=u(844),g=u(2585),d=u(4348),y=u(7866),N=u(744),k=u(7302),b=u(6975),c=u(8460),p=u(1753),v=u(1480),w=u(7994),C=u(9282),T=u(5435),S=u(5981),R=u(2660);let j=!1;class A extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new c.EventEmitter),this._onScroll.event(H=>{var V;(V=this._onScrollApi)==null||V.fire(H.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(H){for(const V in H)this.optionsService.options[V]=H[V]}constructor(H){super(),this._windowsWrappingHeuristics=this.register(new f.MutableDisposable),this._onBinary=this.register(new c.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new c.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new c.EventEmitter),this._instantiationService=new d.InstantiationService,this.optionsService=this.register(new k.OptionsService(H)),this._instantiationService.setService(g.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(N.BufferService)),this._instantiationService.setService(g.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(y.LogService)),this._instantiationService.setService(g.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(b.CoreService)),this._instantiationService.setService(g.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(p.CoreMouseService)),this._instantiationService.setService(g.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(v.UnicodeService)),this._instantiationService.setService(g.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(w.CharsetService),this._instantiationService.setService(g.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(R.OscLinkService),this._instantiationService.setService(g.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new T.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,c.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,c.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,c.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,c.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(V=>{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(V=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new S.WriteBuffer((V,P)=>this._inputHandler.parse(V,P))),this.register((0,c.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(H,V){this._writeBuffer.write(H,V)}writeSync(H,V){this._logService.logLevel<=g.LogLevelEnum.WARN&&!j&&(this._logService.warn("writeSync is unreliable and will be removed soon."),j=!0),this._writeBuffer.writeSync(H,V)}input(H,V=!0){this.coreService.triggerDataEvent(H,V)}resize(H,V){isNaN(H)||isNaN(V)||(H=Math.max(H,N.MINIMUM_COLS),V=Math.max(V,N.MINIMUM_ROWS),this._bufferService.resize(H,V))}scroll(H,V=!1){this._bufferService.scroll(H,V)}scrollLines(H,V,P){this._bufferService.scrollLines(H,V,P)}scrollPages(H){this.scrollLines(H*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(H){const V=H-this._bufferService.buffer.ydisp;V!==0&&this.scrollLines(V)}registerEscHandler(H,V){return this._inputHandler.registerEscHandler(H,V)}registerDcsHandler(H,V){return this._inputHandler.registerDcsHandler(H,V)}registerCsiHandler(H,V){return this._inputHandler.registerCsiHandler(H,V)}registerOscHandler(H,V){return this._inputHandler.registerOscHandler(H,V)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let H=!1;const V=this.optionsService.rawOptions.windowsPty;V&&V.buildNumber!==void 0&&V.buildNumber!==void 0?H=V.backend==="conpty"&&V.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(H=!0),H?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const H=[];H.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),H.push(this.registerCsiHandler({final:"H"},()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)(()=>{for(const V of H)V.dispose()})}}}s.CoreTerminal=A},8460:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.runAndSubscribe=s.forwardEvent=s.EventEmitter=void 0,s.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const g=[];for(let d=0;d<this._listeners.length;d++)g.push(this._listeners[d]);for(let d=0;d<g.length;d++)g[d].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},s.forwardEvent=function(u,f){return u(g=>f.fire(g))},s.runAndSubscribe=function(u,f){return f(void 0),u(g=>f(g))}},5435:function(_,s,u){var f=this&&this.__decorate||function(K,B,F,G){var Z,ae=arguments.length,me=ae<3?B:G===null?G=Object.getOwnPropertyDescriptor(B,F):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")me=Reflect.decorate(K,B,F,G);else for(var Ue=K.length-1;Ue>=0;Ue--)(Z=K[Ue])&&(me=(ae<3?Z(me):ae>3?Z(B,F,me):Z(B,F))||me);return ae>3&&me&&Object.defineProperty(B,F,me),me},g=this&&this.__param||function(K,B){return function(F,G){B(F,G,K)}};Object.defineProperty(s,"__esModule",{value:!0}),s.InputHandler=s.WindowsOptionsReportType=void 0;const d=u(2584),y=u(7116),N=u(2015),k=u(844),b=u(482),c=u(8437),p=u(8460),v=u(643),w=u(511),C=u(3734),T=u(2585),S=u(1480),R=u(6242),j=u(6351),A=u(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},H=131072;function V(K,B){if(K>24)return B.setWinLines||!1;switch(K){case 1:return!!B.restoreWin;case 2:return!!B.minimizeWin;case 3:return!!B.setWinPosition;case 4:return!!B.setWinSizePixels;case 5:return!!B.raiseWin;case 6:return!!B.lowerWin;case 7:return!!B.refreshWin;case 8:return!!B.setWinSizeChars;case 9:return!!B.maximizeWin;case 10:return!!B.fullscreenWin;case 11:return!!B.getWinState;case 13:return!!B.getWinPosition;case 14:return!!B.getWinSizePixels;case 15:return!!B.getScreenSizePixels;case 16:return!!B.getCellSizePixels;case 18:return!!B.getWinSizeChars;case 19:return!!B.getScreenSizeChars;case 20:return!!B.getIconTitle;case 21:return!!B.getWinTitle;case 22:return!!B.pushTitle;case 23:return!!B.popTitle;case 24:return!!B.setWinLines}return!1}var P;(function(K){K[K.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",K[K.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(P||(s.WindowsOptionsReportType=P={}));let Y=0;class Q extends k.Disposable{getAttrData(){return this._curAttrData}constructor(B,F,G,Z,ae,me,Ue,De,ie=new N.EscapeSequenceParser){super(),this._bufferService=B,this._charsetService=F,this._coreService=G,this._logService=Z,this._optionsService=ae,this._oscLinkService=me,this._coreMouseService=Ue,this._unicodeService=De,this._parser=ie,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new b.StringToUtf32,this._utf8Decoder=new b.Utf8ToUtf32,this._workCell=new w.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=c.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new p.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new p.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new p.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new p.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new p.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new p.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new p.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new p.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new p.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new p.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new p.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new p.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new p.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new z(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(q=>this._activeBuffer=q.activeBuffer)),this._parser.setCsiHandlerFallback((q,fe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:fe.toArray()})}),this._parser.setEscHandlerFallback(q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})}),this._parser.setExecuteHandlerFallback(q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})}),this._parser.setOscHandlerFallback((q,fe,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:fe,data:le})}),this._parser.setDcsHandlerFallback((q,fe,le)=>{fe==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:fe,payload:le})}),this._parser.setPrintHandler((q,fe,le)=>this.print(q,fe,le)),this._parser.registerCsiHandler({final:"@"},q=>this.insertChars(q)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},q=>this.scrollLeft(q)),this._parser.registerCsiHandler({final:"A"},q=>this.cursorUp(q)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},q=>this.scrollRight(q)),this._parser.registerCsiHandler({final:"B"},q=>this.cursorDown(q)),this._parser.registerCsiHandler({final:"C"},q=>this.cursorForward(q)),this._parser.registerCsiHandler({final:"D"},q=>this.cursorBackward(q)),this._parser.registerCsiHandler({final:"E"},q=>this.cursorNextLine(q)),this._parser.registerCsiHandler({final:"F"},q=>this.cursorPrecedingLine(q)),this._parser.registerCsiHandler({final:"G"},q=>this.cursorCharAbsolute(q)),this._parser.registerCsiHandler({final:"H"},q=>this.cursorPosition(q)),this._parser.registerCsiHandler({final:"I"},q=>this.cursorForwardTab(q)),this._parser.registerCsiHandler({final:"J"},q=>this.eraseInDisplay(q,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},q=>this.eraseInDisplay(q,!0)),this._parser.registerCsiHandler({final:"K"},q=>this.eraseInLine(q,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},q=>this.eraseInLine(q,!0)),this._parser.registerCsiHandler({final:"L"},q=>this.insertLines(q)),this._parser.registerCsiHandler({final:"M"},q=>this.deleteLines(q)),this._parser.registerCsiHandler({final:"P"},q=>this.deleteChars(q)),this._parser.registerCsiHandler({final:"S"},q=>this.scrollUp(q)),this._parser.registerCsiHandler({final:"T"},q=>this.scrollDown(q)),this._parser.registerCsiHandler({final:"X"},q=>this.eraseChars(q)),this._parser.registerCsiHandler({final:"Z"},q=>this.cursorBackwardTab(q)),this._parser.registerCsiHandler({final:"`"},q=>this.charPosAbsolute(q)),this._parser.registerCsiHandler({final:"a"},q=>this.hPositionRelative(q)),this._parser.registerCsiHandler({final:"b"},q=>this.repeatPrecedingCharacter(q)),this._parser.registerCsiHandler({final:"c"},q=>this.sendDeviceAttributesPrimary(q)),this._parser.registerCsiHandler({prefix:">",final:"c"},q=>this.sendDeviceAttributesSecondary(q)),this._parser.registerCsiHandler({final:"d"},q=>this.linePosAbsolute(q)),this._parser.registerCsiHandler({final:"e"},q=>this.vPositionRelative(q)),this._parser.registerCsiHandler({final:"f"},q=>this.hVPosition(q)),this._parser.registerCsiHandler({final:"g"},q=>this.tabClear(q)),this._parser.registerCsiHandler({final:"h"},q=>this.setMode(q)),this._parser.registerCsiHandler({prefix:"?",final:"h"},q=>this.setModePrivate(q)),this._parser.registerCsiHandler({final:"l"},q=>this.resetMode(q)),this._parser.registerCsiHandler({prefix:"?",final:"l"},q=>this.resetModePrivate(q)),this._parser.registerCsiHandler({final:"m"},q=>this.charAttributes(q)),this._parser.registerCsiHandler({final:"n"},q=>this.deviceStatus(q)),this._parser.registerCsiHandler({prefix:"?",final:"n"},q=>this.deviceStatusPrivate(q)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},q=>this.softReset(q)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},q=>this.setCursorStyle(q)),this._parser.registerCsiHandler({final:"r"},q=>this.setScrollRegion(q)),this._parser.registerCsiHandler({final:"s"},q=>this.saveCursor(q)),this._parser.registerCsiHandler({final:"t"},q=>this.windowOptions(q)),this._parser.registerCsiHandler({final:"u"},q=>this.restoreCursor(q)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},q=>this.insertColumns(q)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},q=>this.deleteColumns(q)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},q=>this.selectProtected(q)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},q=>this.requestMode(q,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},q=>this.requestMode(q,!1)),this._parser.setExecuteHandler(d.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(d.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(d.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(d.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(d.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(d.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(d.C1.IND,()=>this.index()),this._parser.setExecuteHandler(d.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(d.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new R.OscHandler(q=>(this.setTitle(q),this.setIconName(q),!0))),this._parser.registerOscHandler(1,new R.OscHandler(q=>this.setIconName(q))),this._parser.registerOscHandler(2,new R.OscHandler(q=>this.setTitle(q))),this._parser.registerOscHandler(4,new R.OscHandler(q=>this.setOrReportIndexedColor(q))),this._parser.registerOscHandler(8,new R.OscHandler(q=>this.setHyperlink(q))),this._parser.registerOscHandler(10,new R.OscHandler(q=>this.setOrReportFgColor(q))),this._parser.registerOscHandler(11,new R.OscHandler(q=>this.setOrReportBgColor(q))),this._parser.registerOscHandler(12,new R.OscHandler(q=>this.setOrReportCursorColor(q))),this._parser.registerOscHandler(104,new R.OscHandler(q=>this.restoreIndexedColor(q))),this._parser.registerOscHandler(110,new R.OscHandler(q=>this.restoreFgColor(q))),this._parser.registerOscHandler(111,new R.OscHandler(q=>this.restoreBgColor(q))),this._parser.registerOscHandler(112,new R.OscHandler(q=>this.restoreCursorColor(q))),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 q in y.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},()=>this.selectCharset("("+q)),this._parser.registerEscHandler({intermediates:")",final:q},()=>this.selectCharset(")"+q)),this._parser.registerEscHandler({intermediates:"*",final:q},()=>this.selectCharset("*"+q)),this._parser.registerEscHandler({intermediates:"+",final:q},()=>this.selectCharset("+"+q)),this._parser.registerEscHandler({intermediates:"-",final:q},()=>this.selectCharset("-"+q)),this._parser.registerEscHandler({intermediates:".",final:q},()=>this.selectCharset("."+q)),this._parser.registerEscHandler({intermediates:"/",final:q},()=>this.selectCharset("/"+q));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(q=>(this._logService.error("Parsing error: ",q),q)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new j.DcsHandler((q,fe)=>this.requestStatusString(q,fe)))}_preserveStack(B,F,G,Z){this._parseStack.paused=!0,this._parseStack.cursorStartX=B,this._parseStack.cursorStartY=F,this._parseStack.decodedLength=G,this._parseStack.position=Z}_logSlowResolvingAsync(B){this._logService.logLevel<=T.LogLevelEnum.WARN&&Promise.race([B,new Promise((F,G)=>setTimeout(()=>G("#SLOW_TIMEOUT"),5e3))]).catch(F=>{if(F!=="#SLOW_TIMEOUT")throw F;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(B,F){let G,Z=this._activeBuffer.x,ae=this._activeBuffer.y,me=0;const Ue=this._parseStack.paused;if(Ue){if(G=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,F))return this._logSlowResolvingAsync(G),G;Z=this._parseStack.cursorStartX,ae=this._parseStack.cursorStartY,this._parseStack.paused=!1,B.length>H&&(me=this._parseStack.position+H)}if(this._logService.logLevel<=T.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof B=="string"?` "${B}"`:` "${Array.prototype.map.call(B,q=>String.fromCharCode(q)).join("")}"`),typeof B=="string"?B.split("").map(q=>q.charCodeAt(0)):B),this._parseBuffer.length<B.length&&this._parseBuffer.length<H&&(this._parseBuffer=new Uint32Array(Math.min(B.length,H))),Ue||this._dirtyRowTracker.clearRange(),B.length>H)for(let q=me;q<B.length;q+=H){const fe=q+H<B.length?q+H:B.length,le=typeof B=="string"?this._stringDecoder.decode(B.substring(q,fe),this._parseBuffer):this._utf8Decoder.decode(B.subarray(q,fe),this._parseBuffer);if(G=this._parser.parse(this._parseBuffer,le))return this._preserveStack(Z,ae,le,q),this._logSlowResolvingAsync(G),G}else if(!Ue){const q=typeof B=="string"?this._stringDecoder.decode(B,this._parseBuffer):this._utf8Decoder.decode(B,this._parseBuffer);if(G=this._parser.parse(this._parseBuffer,q))return this._preserveStack(Z,ae,q,0),this._logSlowResolvingAsync(G),G}this._activeBuffer.x===Z&&this._activeBuffer.y===ae||this._onCursorMove.fire();const De=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(De,this._bufferService.rows-1))}print(B,F,G){let Z,ae;const me=this._charsetService.charset,Ue=this._optionsService.rawOptions.screenReaderMode,De=this._bufferService.cols,ie=this._coreService.decPrivateModes.wraparound,q=this._coreService.modes.insertMode,fe=this._curAttrData;let le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&G-F>0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,fe);let Oe=this._parser.precedingJoinState;for(let ke=F;ke<G;++ke){if(Z=B[ke],Z<127&&me){const at=me[String.fromCharCode(Z)];at&&(Z=at.charCodeAt(0))}const nt=this._unicodeService.charProperties(Z,Oe);ae=S.UnicodeService.extractWidth(nt);const xe=S.UnicodeService.extractShouldJoin(nt),$e=xe?S.UnicodeService.extractWidth(Oe):0;if(Oe=nt,Ue&&this._onA11yChar.fire((0,b.stringFromCodePoint)(Z)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+ae-$e>De){if(ie){const at=le;let Ge=this._activeBuffer.x-$e;for(this._activeBuffer.x=$e,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),$e>0&&le instanceof c.BufferLine&&le.copyCellsFrom(at,Ge,0,$e,!1);Ge<De;)at.setCellFromCodepoint(Ge++,0,1,fe)}else if(this._activeBuffer.x=De-1,ae===2)continue}if(xe&&this._activeBuffer.x){const at=le.getWidth(this._activeBuffer.x-1)?1:2;le.addCodepointToCell(this._activeBuffer.x-at,Z,ae);for(let Ge=ae-$e;--Ge>=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,fe)}else if(q&&(le.insertCells(this._activeBuffer.x,ae-$e,this._activeBuffer.getNullCell(fe)),le.getWidth(De-1)===2&&le.setCellFromCodepoint(De-1,v.NULL_CELL_CODE,v.NULL_CELL_WIDTH,fe)),le.setCellFromCodepoint(this._activeBuffer.x++,Z,ae,fe),ae>0)for(;--ae;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,fe)}this._parser.precedingJoinState=Oe,this._activeBuffer.x<De&&G-F>0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,fe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(B,F){return B.final!=="t"||B.prefix||B.intermediates?this._parser.registerCsiHandler(B,F):this._parser.registerCsiHandler(B,G=>!V(G.params[0],this._optionsService.rawOptions.windowOptions)||F(G))}registerDcsHandler(B,F){return this._parser.registerDcsHandler(B,new j.DcsHandler(F))}registerEscHandler(B,F){return this._parser.registerEscHandler(B,F)}registerOscHandler(B,F){return this._parser.registerOscHandler(B,new R.OscHandler(F))}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 B;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&&((B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&B.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);F.hasWidth(this._activeBuffer.x)&&!F.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const B=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-B),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(B=this._bufferService.cols-1){this._activeBuffer.x=Math.min(B,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(B,F){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=B,this._activeBuffer.y=this._activeBuffer.scrollTop+F):(this._activeBuffer.x=B,this._activeBuffer.y=F),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(B,F){this._restrictCursor(),this._setCursor(this._activeBuffer.x+B,this._activeBuffer.y+F)}cursorUp(B){const F=this._activeBuffer.y-this._activeBuffer.scrollTop;return F>=0?this._moveCursor(0,-Math.min(F,B.params[0]||1)):this._moveCursor(0,-(B.params[0]||1)),!0}cursorDown(B){const F=this._activeBuffer.scrollBottom-this._activeBuffer.y;return F>=0?this._moveCursor(0,Math.min(F,B.params[0]||1)):this._moveCursor(0,B.params[0]||1),!0}cursorForward(B){return this._moveCursor(B.params[0]||1,0),!0}cursorBackward(B){return this._moveCursor(-(B.params[0]||1),0),!0}cursorNextLine(B){return this.cursorDown(B),this._activeBuffer.x=0,!0}cursorPrecedingLine(B){return this.cursorUp(B),this._activeBuffer.x=0,!0}cursorCharAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(B){return this._setCursor(B.length>=2?(B.params[1]||1)-1:0,(B.params[0]||1)-1),!0}charPosAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(B){return this._moveCursor(B.params[0]||1,0),!0}linePosAbsolute(B){return this._setCursor(this._activeBuffer.x,(B.params[0]||1)-1),!0}vPositionRelative(B){return this._moveCursor(0,B.params[0]||1),!0}hVPosition(B){return this.cursorPosition(B),!0}tabClear(B){const F=B.params[0];return F===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:F===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let F=B.params[0]||1;for(;F--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let F=B.params[0]||1;for(;F--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(B){const F=B.params[0];return F===1&&(this._curAttrData.bg|=536870912),F!==2&&F!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(B,F,G,Z=!1,ae=!1){const me=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);me.replaceCells(F,G,this._activeBuffer.getNullCell(this._eraseAttrData()),ae),Z&&(me.isWrapped=!1)}_resetBufferLine(B,F=!1){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);G&&(G.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),F),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+B),G.isWrapped=!1)}eraseInDisplay(B,F=!1){let G;switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:for(G=this._activeBuffer.y,this._dirtyRowTracker.markDirty(G),this._eraseInBufferLine(G++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,F);G<this._bufferService.rows;G++)this._resetBufferLine(G,F);this._dirtyRowTracker.markDirty(G);break;case 1:for(G=this._activeBuffer.y,this._dirtyRowTracker.markDirty(G),this._eraseInBufferLine(G,0,this._activeBuffer.x+1,!0,F),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(G+1).isWrapped=!1);G--;)this._resetBufferLine(G,F);this._dirtyRowTracker.markDirty(0);break;case 2:for(G=this._bufferService.rows,this._dirtyRowTracker.markDirty(G-1);G--;)this._resetBufferLine(G,F);this._dirtyRowTracker.markDirty(0);break;case 3:const Z=this._activeBuffer.lines.length-this._bufferService.rows;Z>0&&(this._activeBuffer.lines.trimStart(Z),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-Z,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-Z,0),this._onScroll.fire(0))}return!0}eraseInLine(B,F=!1){switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,F);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,F);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,F)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(B){this._restrictCursor();let F=B.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const G=this._activeBuffer.ybase+this._activeBuffer.y,Z=this._bufferService.rows-1-this._activeBuffer.scrollBottom,ae=this._bufferService.rows-1+this._activeBuffer.ybase-Z+1;for(;F--;)this._activeBuffer.lines.splice(ae-1,1),this._activeBuffer.lines.splice(G,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(B){this._restrictCursor();let F=B.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const G=this._activeBuffer.ybase+this._activeBuffer.y;let Z;for(Z=this._bufferService.rows-1-this._activeBuffer.scrollBottom,Z=this._bufferService.rows-1+this._activeBuffer.ybase-Z;F--;)this._activeBuffer.lines.splice(G,1),this._activeBuffer.lines.splice(Z,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(B){this._restrictCursor();const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return F&&(F.insertCells(this._activeBuffer.x,B.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(B){this._restrictCursor();const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return F&&(F.deleteCells(this._activeBuffer.x,B.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(B){let F=B.params[0]||1;for(;F--;)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(B){let F=B.params[0]||1;for(;F--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(c.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const F=B.params[0]||1;for(let G=this._activeBuffer.scrollTop;G<=this._activeBuffer.scrollBottom;++G){const Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+G);Z.deleteCells(0,F,this._activeBuffer.getNullCell(this._eraseAttrData())),Z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const F=B.params[0]||1;for(let G=this._activeBuffer.scrollTop;G<=this._activeBuffer.scrollBottom;++G){const Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+G);Z.insertCells(0,F,this._activeBuffer.getNullCell(this._eraseAttrData())),Z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const F=B.params[0]||1;for(let G=this._activeBuffer.scrollTop;G<=this._activeBuffer.scrollBottom;++G){const Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+G);Z.insertCells(this._activeBuffer.x,F,this._activeBuffer.getNullCell(this._eraseAttrData())),Z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const F=B.params[0]||1;for(let G=this._activeBuffer.scrollTop;G<=this._activeBuffer.scrollBottom;++G){const Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+G);Z.deleteCells(this._activeBuffer.x,F,this._activeBuffer.getNullCell(this._eraseAttrData())),Z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(B){this._restrictCursor();const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return F&&(F.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(B.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(B){const F=this._parser.precedingJoinState;if(!F)return!0;const G=B.params[0]||1,Z=S.UnicodeService.extractWidth(F),ae=this._activeBuffer.x-Z,me=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(ae),Ue=new Uint32Array(me.length*G);let De=0;for(let q=0;q<me.length;){const fe=me.codePointAt(q)||0;Ue[De++]=fe,q+=fe>65535?2:1}let ie=De;for(let q=1;q<G;++q)Ue.copyWithin(ie,0,De),ie+=De;return this.print(Ue,0,ie),!0}sendDeviceAttributesPrimary(B){return B.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(d.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(d.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(B){return B.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(d.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(B.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c")),!0}_is(B){return(this._optionsService.rawOptions.termName+"").indexOf(B)===0}setMode(B){for(let F=0;F<B.length;F++)switch(B.params[F]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(B){for(let F=0;F<B.length;F++)switch(B.params[F]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,y.DEFAULT_CHARSET),this._charsetService.setgCharset(1,y.DEFAULT_CHARSET),this._charsetService.setgCharset(2,y.DEFAULT_CHARSET),this._charsetService.setgCharset(3,y.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(B){for(let F=0;F<B.length;F++)switch(B.params[F]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(B){for(let F=0;F<B.length;F++)switch(B.params[F]){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(),B.params[F]===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(B,F){const G=this._coreService.decPrivateModes,{activeProtocol:Z,activeEncoding:ae}=this._coreMouseService,me=this._coreService,{buffers:Ue,cols:De}=this._bufferService,{active:ie,alt:q}=Ue,fe=this._optionsService.rawOptions,le=xe=>xe?1:2,Oe=B.params[0];return ke=Oe,nt=F?Oe===2?4:Oe===4?le(me.modes.insertMode):Oe===12?3:Oe===20?le(fe.convertEol):0:Oe===1?le(G.applicationCursorKeys):Oe===3?fe.windowOptions.setWinLines?De===80?2:De===132?1:0:0:Oe===6?le(G.origin):Oe===7?le(G.wraparound):Oe===8?3:Oe===9?le(Z==="X10"):Oe===12?le(fe.cursorBlink):Oe===25?le(!me.isCursorHidden):Oe===45?le(G.reverseWraparound):Oe===66?le(G.applicationKeypad):Oe===67?4:Oe===1e3?le(Z==="VT200"):Oe===1002?le(Z==="DRAG"):Oe===1003?le(Z==="ANY"):Oe===1004?le(G.sendFocus):Oe===1005?4:Oe===1006?le(ae==="SGR"):Oe===1015?4:Oe===1016?le(ae==="SGR_PIXELS"):Oe===1048?1:Oe===47||Oe===1047||Oe===1049?le(ie===q):Oe===2004?le(G.bracketedPasteMode):0,me.triggerDataEvent(`${d.C0.ESC}[${F?"":"?"}${ke};${nt}$y`),!0;var ke,nt}_updateAttrColor(B,F,G,Z,ae){return F===2?(B|=50331648,B&=-16777216,B|=C.AttributeData.fromColorRGB([G,Z,ae])):F===5&&(B&=-50331904,B|=33554432|255&G),B}_extractColor(B,F,G){const Z=[0,0,-1,0,0,0];let ae=0,me=0;do{if(Z[me+ae]=B.params[F+me],B.hasSubParams(F+me)){const Ue=B.getSubParams(F+me);let De=0;do Z[1]===5&&(ae=1),Z[me+De+1+ae]=Ue[De];while(++De<Ue.length&&De+me+1+ae<Z.length);break}if(Z[1]===5&&me+ae>=2||Z[1]===2&&me+ae>=5)break;Z[1]&&(ae=1)}while(++me+F<B.length&&me+ae<Z.length);for(let Ue=2;Ue<Z.length;++Ue)Z[Ue]===-1&&(Z[Ue]=0);switch(Z[0]){case 38:G.fg=this._updateAttrColor(G.fg,Z[1],Z[3],Z[4],Z[5]);break;case 48:G.bg=this._updateAttrColor(G.bg,Z[1],Z[3],Z[4],Z[5]);break;case 58:G.extended=G.extended.clone(),G.extended.underlineColor=this._updateAttrColor(G.extended.underlineColor,Z[1],Z[3],Z[4],Z[5])}return me}_processUnderline(B,F){F.extended=F.extended.clone(),(!~B||B>5)&&(B=1),F.extended.underlineStyle=B,F.fg|=268435456,B===0&&(F.fg&=-268435457),F.updateExtended()}_processSGR0(B){B.fg=c.DEFAULT_ATTR_DATA.fg,B.bg=c.DEFAULT_ATTR_DATA.bg,B.extended=B.extended.clone(),B.extended.underlineStyle=0,B.extended.underlineColor&=-67108864,B.updateExtended()}charAttributes(B){if(B.length===1&&B.params[0]===0)return this._processSGR0(this._curAttrData),!0;const F=B.length;let G;const Z=this._curAttrData;for(let ae=0;ae<F;ae++)G=B.params[ae],G>=30&&G<=37?(Z.fg&=-50331904,Z.fg|=16777216|G-30):G>=40&&G<=47?(Z.bg&=-50331904,Z.bg|=16777216|G-40):G>=90&&G<=97?(Z.fg&=-50331904,Z.fg|=16777224|G-90):G>=100&&G<=107?(Z.bg&=-50331904,Z.bg|=16777224|G-100):G===0?this._processSGR0(Z):G===1?Z.fg|=134217728:G===3?Z.bg|=67108864:G===4?(Z.fg|=268435456,this._processUnderline(B.hasSubParams(ae)?B.getSubParams(ae)[0]:1,Z)):G===5?Z.fg|=536870912:G===7?Z.fg|=67108864:G===8?Z.fg|=1073741824:G===9?Z.fg|=2147483648:G===2?Z.bg|=134217728:G===21?this._processUnderline(2,Z):G===22?(Z.fg&=-134217729,Z.bg&=-134217729):G===23?Z.bg&=-67108865:G===24?(Z.fg&=-268435457,this._processUnderline(0,Z)):G===25?Z.fg&=-536870913:G===27?Z.fg&=-67108865:G===28?Z.fg&=-1073741825:G===29?Z.fg&=2147483647:G===39?(Z.fg&=-67108864,Z.fg|=16777215&c.DEFAULT_ATTR_DATA.fg):G===49?(Z.bg&=-67108864,Z.bg|=16777215&c.DEFAULT_ATTR_DATA.bg):G===38||G===48||G===58?ae+=this._extractColor(B,ae,Z):G===53?Z.bg|=1073741824:G===55?Z.bg&=-1073741825:G===59?(Z.extended=Z.extended.clone(),Z.extended.underlineColor=-1,Z.updateExtended()):G===100?(Z.fg&=-67108864,Z.fg|=16777215&c.DEFAULT_ATTR_DATA.fg,Z.bg&=-67108864,Z.bg|=16777215&c.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",G);return!0}deviceStatus(B){switch(B.params[0]){case 5:this._coreService.triggerDataEvent(`${d.C0.ESC}[0n`);break;case 6:const F=this._activeBuffer.y+1,G=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[${F};${G}R`)}return!0}deviceStatusPrivate(B){if(B.params[0]===6){const F=this._activeBuffer.y+1,G=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[?${F};${G}R`)}return!0}softReset(B){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(B){const F=B.params[0]||1;switch(F){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 G=F%2==1;return this._optionsService.options.cursorBlink=G,!0}setScrollRegion(B){const F=B.params[0]||1;let G;return(B.length<2||(G=B.params[1])>this._bufferService.rows||G===0)&&(G=this._bufferService.rows),G>F&&(this._activeBuffer.scrollTop=F-1,this._activeBuffer.scrollBottom=G-1,this._setCursor(0,0)),!0}windowOptions(B){if(!V(B.params[0],this._optionsService.rawOptions.windowOptions))return!0;const F=B.length>1?B.params[1]:0;switch(B.params[0]){case 14:F!==2&&this._onRequestWindowsOptionsReport.fire(P.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(P.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${d.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:F!==0&&F!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),F!==0&&F!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:F!==0&&F!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),F!==0&&F!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(B){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(B){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(B){return this._windowTitle=B,this._onTitleChange.fire(B),!0}setIconName(B){return this._iconName=B,!0}setOrReportIndexedColor(B){const F=[],G=B.split(";");for(;G.length>1;){const Z=G.shift(),ae=G.shift();if(/^\d+$/.exec(Z)){const me=parseInt(Z);if(X(me))if(ae==="?")F.push({type:0,index:me});else{const Ue=(0,A.parseColor)(ae);Ue&&F.push({type:1,index:me,color:Ue})}}}return F.length&&this._onColor.fire(F),!0}setHyperlink(B){const F=B.split(";");return!(F.length<2)&&(F[1]?this._createHyperlink(F[0],F[1]):!F[0]&&this._finishHyperlink())}_createHyperlink(B,F){this._getCurrentLinkId()&&this._finishHyperlink();const G=B.split(":");let Z;const ae=G.findIndex(me=>me.startsWith("id="));return ae!==-1&&(Z=G[ae].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:Z,uri:F}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(B,F){const G=B.split(";");for(let Z=0;Z<G.length&&!(F>=this._specialColors.length);++Z,++F)if(G[Z]==="?")this._onColor.fire([{type:0,index:this._specialColors[F]}]);else{const ae=(0,A.parseColor)(G[Z]);ae&&this._onColor.fire([{type:1,index:this._specialColors[F],color:ae}])}return!0}setOrReportFgColor(B){return this._setOrReportSpecialColor(B,0)}setOrReportBgColor(B){return this._setOrReportSpecialColor(B,1)}setOrReportCursorColor(B){return this._setOrReportSpecialColor(B,2)}restoreIndexedColor(B){if(!B)return this._onColor.fire([{type:2}]),!0;const F=[],G=B.split(";");for(let Z=0;Z<G.length;++Z)if(/^\d+$/.exec(G[Z])){const ae=parseInt(G[Z]);X(ae)&&F.push({type:2,index:ae})}return F.length&&this._onColor.fire(F),!0}restoreFgColor(B){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(B){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(B){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,y.DEFAULT_CHARSET),!0}selectCharset(B){return B.length!==2?(this.selectDefaultCharset(),!0):(B[0]==="/"||this._charsetService.setgCharset(O[B[0]],y.CHARSETS[B[1]]||y.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 B=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,B,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=c.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(B){return this._charsetService.setgLevel(B),!0}screenAlignmentPattern(){const B=new w.CellData;B.content=4194373,B.fg=this._curAttrData.fg,B.bg=this._curAttrData.bg,this._setCursor(0,0);for(let F=0;F<this._bufferService.rows;++F){const G=this._activeBuffer.ybase+this._activeBuffer.y+F,Z=this._activeBuffer.lines.get(G);Z&&(Z.fill(B),Z.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(B,F){const G=this._bufferService.buffer,Z=this._optionsService.rawOptions;return(ae=>(this._coreService.triggerDataEvent(`${d.C0.ESC}${ae}${d.C0.ESC}\\`),!0))(B==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:B==='"p'?'P1$r61;1"p':B==="r"?`P1$r${G.scrollTop+1};${G.scrollBottom+1}r`:B==="m"?"P1$r0m":B===" q"?`P1$r${{block:2,underline:4,bar:6}[Z.cursorStyle]-(Z.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(B,F){this._dirtyRowTracker.markRangeDirty(B,F)}}s.InputHandler=Q;let z=class{constructor(K){this._bufferService=K,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(K){K<this.start?this.start=K:K>this.end&&(this.end=K)}markRangeDirty(K,B){K>B&&(Y=K,K=B,B=Y),K<this.start&&(this.start=K),B>this.end&&(this.end=B)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function X(K){return 0<=K&&K<256}z=f([g(0,T.IBufferService)],z)},844:(_,s)=>{function u(f){for(const g of f)g.dispose();f.length=0}Object.defineProperty(s,"__esModule",{value:!0}),s.getDisposeArrayDisposable=s.disposeArray=s.toDisposable=s.MutableDisposable=s.Disposable=void 0,s.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const g=this._disposables.indexOf(f);g!==-1&&this._disposables.splice(g,1)}},s.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var g;this._isDisposed||f===this._value||((g=this._value)==null||g.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},s.toDisposable=function(f){return{dispose:f}},s.disposeArray=u,s.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},1505:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.FourKeyMap=s.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(g,d,y){this._data[g]||(this._data[g]={}),this._data[g][d]=y}get(g,d){return this._data[g]?this._data[g][d]:void 0}clear(){this._data={}}}s.TwoKeyMap=u,s.FourKeyMap=class{constructor(){this._data=new u}set(f,g,d,y,N){this._data.get(f,g)||this._data.set(f,g,new u),this._data.get(f,g).set(d,y,N)}get(f,g,d,y){var N;return(N=this._data.get(f,g))==null?void 0:N.get(d,y)}clear(){this._data.clear()}}},6114:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.isChromeOS=s.isLinux=s.isWindows=s.isIphone=s.isIpad=s.isMac=s.getSafariVersion=s.isSafari=s.isLegacyEdge=s.isFirefox=s.isNode=void 0,s.isNode=typeof process<"u"&&"title"in process;const u=s.isNode?"node":navigator.userAgent,f=s.isNode?"node":navigator.platform;s.isFirefox=u.includes("Firefox"),s.isLegacyEdge=u.includes("Edge"),s.isSafari=/^((?!chrome|android).)*safari/i.test(u),s.getSafariVersion=function(){if(!s.isSafari)return 0;const g=u.match(/Version\/(\d+)/);return g===null||g.length<2?0:parseInt(g[1])},s.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),s.isIpad=f==="iPad",s.isIphone=f==="iPhone",s.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),s.isLinux=f.indexOf("Linux")>=0,s.isChromeOS=/\bCrOS\b/.test(u)},6106:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.SortedList=void 0;let u=0;s.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(u=this._search(this._getKey(f)),this._array.splice(u,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const g=this._getKey(f);if(g===void 0||(u=this._search(g),u===-1)||this._getKey(this._array[u])!==g)return!1;do if(this._array[u]===f)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===g);return!1}*getKeyIterator(f){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===f)}forEachByKey(f,g){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do g(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===f)}values(){return[...this._array].values()}_search(f){let g=0,d=this._array.length-1;for(;d>=g;){let y=g+d>>1;const N=this._getKey(this._array[y]);if(N>f)d=y-1;else{if(!(N<f)){for(;y>0&&this._getKey(this._array[y-1])===f;)y--;return y}g=y+1}}return g}}},7226:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DebouncedIdleTask=s.IdleTaskQueue=s.PriorityTaskQueue=void 0;const f=u(6114);class g{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 k=0,b=0,c=N.timeRemaining(),p=0;for(;this._i<this._tasks.length;){if(k=Date.now(),this._tasks[this._i]()||this._i++,k=Math.max(1,Date.now()-k),b=Math.max(k,b),p=N.timeRemaining(),1.5*b>p)return c-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(c-k))}ms`),void this._start();c=p}this.clear()}}class d extends g{_requestCallback(N){return setTimeout(()=>N(this._createDeadline(16)))}_cancelCallback(N){clearTimeout(N)}_createDeadline(N){const k=Date.now()+N;return{timeRemaining:()=>Math.max(0,k-Date.now())}}}s.PriorityTaskQueue=d,s.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends g{_requestCallback(y){return requestIdleCallback(y)}_cancelCallback(y){cancelIdleCallback(y)}}:d,s.DebouncedIdleTask=class{constructor(){this._queue=new s.IdleTaskQueue}set(y){this._queue.clear(),this._queue.enqueue(y)}flush(){this._queue.flush()}}},9282:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.updateWindowsModeWrappedState=void 0;const f=u(643);s.updateWindowsModeWrappedState=function(g){const d=g.buffer.lines.get(g.buffer.ybase+g.buffer.y-1),y=d==null?void 0:d.get(g.cols-1),N=g.buffer.lines.get(g.buffer.ybase+g.buffer.y);N&&y&&(N.isWrapped=y[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&y[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ExtendedAttrs=s.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(d){return[d>>>16&255,d>>>8&255,255&d]}static fromColorRGB(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]}clone(){const d=new u;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}s.AttributeData=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(d){this._ext=d}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(d){this._ext&=-469762049,this._ext|=d<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(d){this._ext&=-67108864,this._ext|=67108863&d}get urlId(){return this._urlId}set urlId(d){this._urlId=d}get underlineVariantOffset(){const d=(3758096384&this._ext)>>29;return d<0?4294967288^d:d}set underlineVariantOffset(d){this._ext&=536870911,this._ext|=d<<29&3758096384}constructor(d=0,y=0){this._ext=0,this._urlId=0,this._ext=d,this._urlId=y}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}s.ExtendedAttrs=f},9092:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Buffer=s.MAX_BUFFER_SIZE=void 0;const f=u(6349),g=u(7226),d=u(3734),y=u(8437),N=u(4634),k=u(511),b=u(643),c=u(4863),p=u(7116);s.MAX_BUFFER_SIZE=4294967295,s.Buffer=class{constructor(v,w,C){this._hasScrollback=v,this._optionsService=w,this._bufferService=C,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=y.DEFAULT_ATTR_DATA.clone(),this.savedCharset=p.DEFAULT_CHARSET,this.markers=[],this._nullCell=k.CellData.fromCharData([0,b.NULL_CELL_CHAR,b.NULL_CELL_WIDTH,b.NULL_CELL_CODE]),this._whitespaceCell=k.CellData.fromCharData([0,b.WHITESPACE_CELL_CHAR,b.WHITESPACE_CELL_WIDTH,b.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new g.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(v){return v?(this._nullCell.fg=v.fg,this._nullCell.bg=v.bg,this._nullCell.extended=v.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new d.ExtendedAttrs),this._nullCell}getWhitespaceCell(v){return v?(this._whitespaceCell.fg=v.fg,this._whitespaceCell.bg=v.bg,this._whitespaceCell.extended=v.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new d.ExtendedAttrs),this._whitespaceCell}getBlankLine(v,w){return new y.BufferLine(this._bufferService.cols,this.getNullCell(v),w)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const v=this.ybase+this.y-this.ydisp;return v>=0&&v<this._rows}_getCorrectBufferLength(v){if(!this._hasScrollback)return v;const w=v+this._optionsService.rawOptions.scrollback;return w>s.MAX_BUFFER_SIZE?s.MAX_BUFFER_SIZE:w}fillViewportRows(v){if(this.lines.length===0){v===void 0&&(v=y.DEFAULT_ATTR_DATA);let w=this._rows;for(;w--;)this.lines.push(this.getBlankLine(v))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(v,w){const C=this.getNullCell(y.DEFAULT_ATTR_DATA);let T=0;const S=this._getCorrectBufferLength(w);if(S>this.lines.maxLength&&(this.lines.maxLength=S),this.lines.length>0){if(this._cols<v)for(let j=0;j<this.lines.length;j++)T+=+this.lines.get(j).resize(v,C);let R=0;if(this._rows<w)for(let j=this._rows;j<w;j++)this.lines.length<w+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new y.BufferLine(v,C)):this.ybase>0&&this.lines.length<=this.ybase+this.y+R+1?(this.ybase--,R++,this.ydisp>0&&this.ydisp--):this.lines.push(new y.BufferLine(v,C)));else for(let j=this._rows;j>w;j--)this.lines.length>w+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(S<this.lines.maxLength){const j=this.lines.length-S;j>0&&(this.lines.trimStart(j),this.ybase=Math.max(this.ybase-j,0),this.ydisp=Math.max(this.ydisp-j,0),this.savedY=Math.max(this.savedY-j,0)),this.lines.maxLength=S}this.x=Math.min(this.x,v-1),this.y=Math.min(this.y,w-1),R&&(this.y+=R),this.savedX=Math.min(this.savedX,v-1),this.scrollTop=0}if(this.scrollBottom=w-1,this._isReflowEnabled&&(this._reflow(v,w),this._cols>v))for(let R=0;R<this.lines.length;R++)T+=+this.lines.get(R).resize(v,C);this._cols=v,this._rows=w,this._memoryCleanupQueue.clear(),T>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let v=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,v=!1);let w=0;for(;this._memoryCleanupPosition<this.lines.length;)if(w+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),w>100)return!0;return v}get _isReflowEnabled(){const v=this._optionsService.rawOptions.windowsPty;return v&&v.buildNumber?this._hasScrollback&&v.backend==="conpty"&&v.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(v,w){this._cols!==v&&(v>this._cols?this._reflowLarger(v,w):this._reflowSmaller(v,w))}_reflowLarger(v,w){const C=(0,N.reflowLargerGetLinesToRemove)(this.lines,this._cols,v,this.ybase+this.y,this.getNullCell(y.DEFAULT_ATTR_DATA));if(C.length>0){const T=(0,N.reflowLargerCreateNewLayout)(this.lines,C);(0,N.reflowLargerApplyNewLayout)(this.lines,T.layout),this._reflowLargerAdjustViewport(v,w,T.countRemoved)}}_reflowLargerAdjustViewport(v,w,C){const T=this.getNullCell(y.DEFAULT_ATTR_DATA);let S=C;for(;S-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<w&&this.lines.push(new y.BufferLine(v,T))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-C,0)}_reflowSmaller(v,w){const C=this.getNullCell(y.DEFAULT_ATTR_DATA),T=[];let S=0;for(let R=this.lines.length-1;R>=0;R--){let j=this.lines.get(R);if(!j||!j.isWrapped&&j.getTrimmedLength()<=v)continue;const A=[j];for(;j.isWrapped&&R>0;)j=this.lines.get(--R),A.unshift(j);const O=this.ybase+this.y;if(O>=R&&O<R+A.length)continue;const H=A[A.length-1].getTrimmedLength(),V=(0,N.reflowSmallerGetNewLineLengths)(A,this._cols,v),P=V.length-A.length;let Y;Y=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+P):Math.max(0,this.lines.length-this.lines.maxLength+P);const Q=[];for(let G=0;G<P;G++){const Z=this.getBlankLine(y.DEFAULT_ATTR_DATA,!0);Q.push(Z)}Q.length>0&&(T.push({start:R+A.length+S,newLines:Q}),S+=Q.length),A.push(...Q);let z=V.length-1,X=V[z];X===0&&(z--,X=V[z]);let K=A.length-P-1,B=H;for(;K>=0;){const G=Math.min(B,X);if(A[z]===void 0)break;if(A[z].copyCellsFrom(A[K],B-G,X-G,G,!0),X-=G,X===0&&(z--,X=V[z]),B-=G,B===0){K--;const Z=Math.max(K,0);B=(0,N.getWrappedLineTrimmedLength)(A,Z,this._cols)}}for(let G=0;G<A.length;G++)V[G]<v&&A[G].setCell(V[G],C);let F=P-Y;for(;F-- >0;)this.ybase===0?this.y<w-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+S)-w&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+P,this.ybase+w-1)}if(T.length>0){const R=[],j=[];for(let z=0;z<this.lines.length;z++)j.push(this.lines.get(z));const A=this.lines.length;let O=A-1,H=0,V=T[H];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+S);let P=0;for(let z=Math.min(this.lines.maxLength-1,A+S-1);z>=0;z--)if(V&&V.start>O+P){for(let X=V.newLines.length-1;X>=0;X--)this.lines.set(z--,V.newLines[X]);z++,R.push({index:O+1,amount:V.newLines.length}),P+=V.newLines.length,V=T[++H]}else this.lines.set(z,j[O--]);let Y=0;for(let z=R.length-1;z>=0;z--)R[z].index+=Y,this.lines.onInsertEmitter.fire(R[z]),Y+=R[z].amount;const Q=Math.max(0,A+S-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(v,w,C=0,T){const S=this.lines.get(v);return S?S.translateToString(w,C,T):""}getWrappedRangeForLine(v){let w=v,C=v;for(;w>0&&this.lines.get(w).isWrapped;)w--;for(;C+1<this.lines.length&&this.lines.get(C+1).isWrapped;)C++;return{first:w,last:C}}setupTabStops(v){for(v!=null?this.tabs[v]||(v=this.prevStop(v)):(this.tabs={},v=0);v<this._cols;v+=this._optionsService.rawOptions.tabStopWidth)this.tabs[v]=!0}prevStop(v){for(v==null&&(v=this.x);!this.tabs[--v]&&v>0;);return v>=this._cols?this._cols-1:v<0?0:v}nextStop(v){for(v==null&&(v=this.x);!this.tabs[++v]&&v<this._cols;);return v>=this._cols?this._cols-1:v<0?0:v}clearMarkers(v){this._isClearing=!0;for(let w=0;w<this.markers.length;w++)this.markers[w].line===v&&(this.markers[w].dispose(),this.markers.splice(w--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let v=0;v<this.markers.length;v++)this.markers[v].dispose(),this.markers.splice(v--,1);this._isClearing=!1}addMarker(v){const w=new c.Marker(v);return this.markers.push(w),w.register(this.lines.onTrim(C=>{w.line-=C,w.line<0&&w.dispose()})),w.register(this.lines.onInsert(C=>{w.line>=C.index&&(w.line+=C.amount)})),w.register(this.lines.onDelete(C=>{w.line>=C.index&&w.line<C.index+C.amount&&w.dispose(),w.line>C.index&&(w.line-=C.amount)})),w.register(w.onDispose(()=>this._removeMarker(w))),w}_removeMarker(v){this._isClearing||this.markers.splice(this.markers.indexOf(v),1)}}},8437:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferLine=s.DEFAULT_ATTR_DATA=void 0;const f=u(3734),g=u(511),d=u(643),y=u(482);s.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let N=0;class k{constructor(c,p,v=!1){this.isWrapped=v,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*c);const w=p||g.CellData.fromCharData([0,d.NULL_CELL_CHAR,d.NULL_CELL_WIDTH,d.NULL_CELL_CODE]);for(let C=0;C<c;++C)this.setCell(C,w);this.length=c}get(c){const p=this._data[3*c+0],v=2097151&p;return[this._data[3*c+1],2097152&p?this._combined[c]:v?(0,y.stringFromCodePoint)(v):"",p>>22,2097152&p?this._combined[c].charCodeAt(this._combined[c].length-1):v]}set(c,p){this._data[3*c+1]=p[d.CHAR_DATA_ATTR_INDEX],p[d.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[c]=p[1],this._data[3*c+0]=2097152|c|p[d.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*c+0]=p[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|p[d.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(c){return this._data[3*c+0]>>22}hasWidth(c){return 12582912&this._data[3*c+0]}getFg(c){return this._data[3*c+1]}getBg(c){return this._data[3*c+2]}hasContent(c){return 4194303&this._data[3*c+0]}getCodePoint(c){const p=this._data[3*c+0];return 2097152&p?this._combined[c].charCodeAt(this._combined[c].length-1):2097151&p}isCombined(c){return 2097152&this._data[3*c+0]}getString(c){const p=this._data[3*c+0];return 2097152&p?this._combined[c]:2097151&p?(0,y.stringFromCodePoint)(2097151&p):""}isProtected(c){return 536870912&this._data[3*c+2]}loadCell(c,p){return N=3*c,p.content=this._data[N+0],p.fg=this._data[N+1],p.bg=this._data[N+2],2097152&p.content&&(p.combinedData=this._combined[c]),268435456&p.bg&&(p.extended=this._extendedAttrs[c]),p}setCell(c,p){2097152&p.content&&(this._combined[c]=p.combinedData),268435456&p.bg&&(this._extendedAttrs[c]=p.extended),this._data[3*c+0]=p.content,this._data[3*c+1]=p.fg,this._data[3*c+2]=p.bg}setCellFromCodepoint(c,p,v,w){268435456&w.bg&&(this._extendedAttrs[c]=w.extended),this._data[3*c+0]=p|v<<22,this._data[3*c+1]=w.fg,this._data[3*c+2]=w.bg}addCodepointToCell(c,p,v){let w=this._data[3*c+0];2097152&w?this._combined[c]+=(0,y.stringFromCodePoint)(p):2097151&w?(this._combined[c]=(0,y.stringFromCodePoint)(2097151&w)+(0,y.stringFromCodePoint)(p),w&=-2097152,w|=2097152):w=p|4194304,v&&(w&=-12582913,w|=v<<22),this._data[3*c+0]=w}insertCells(c,p,v){if((c%=this.length)&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c-1,0,1,v),p<this.length-c){const w=new g.CellData;for(let C=this.length-c-p-1;C>=0;--C)this.setCell(c+p+C,this.loadCell(c+C,w));for(let C=0;C<p;++C)this.setCell(c+C,v)}else for(let w=c;w<this.length;++w)this.setCell(w,v);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,v)}deleteCells(c,p,v){if(c%=this.length,p<this.length-c){const w=new g.CellData;for(let C=0;C<this.length-c-p;++C)this.setCell(c+C,this.loadCell(c+p+C,w));for(let C=this.length-p;C<this.length;++C)this.setCell(C,v)}else for(let w=c;w<this.length;++w)this.setCell(w,v);c&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c-1,0,1,v),this.getWidth(c)!==0||this.hasContent(c)||this.setCellFromCodepoint(c,0,1,v)}replaceCells(c,p,v,w=!1){if(w)for(c&&this.getWidth(c-1)===2&&!this.isProtected(c-1)&&this.setCellFromCodepoint(c-1,0,1,v),p<this.length&&this.getWidth(p-1)===2&&!this.isProtected(p)&&this.setCellFromCodepoint(p,0,1,v);c<p&&c<this.length;)this.isProtected(c)||this.setCell(c,v),c++;else for(c&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c-1,0,1,v),p<this.length&&this.getWidth(p-1)===2&&this.setCellFromCodepoint(p,0,1,v);c<p&&c<this.length;)this.setCell(c++,v)}resize(c,p){if(c===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const v=3*c;if(c>this.length){if(this._data.buffer.byteLength>=4*v)this._data=new Uint32Array(this._data.buffer,0,v);else{const w=new Uint32Array(v);w.set(this._data),this._data=w}for(let w=this.length;w<c;++w)this.setCell(w,p)}else{this._data=this._data.subarray(0,v);const w=Object.keys(this._combined);for(let T=0;T<w.length;T++){const S=parseInt(w[T],10);S>=c&&delete this._combined[S]}const C=Object.keys(this._extendedAttrs);for(let T=0;T<C.length;T++){const S=parseInt(C[T],10);S>=c&&delete this._extendedAttrs[S]}}return this.length=c,4*v*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const c=new Uint32Array(this._data.length);return c.set(this._data),this._data=c,1}return 0}fill(c,p=!1){if(p)for(let v=0;v<this.length;++v)this.isProtected(v)||this.setCell(v,c);else{this._combined={},this._extendedAttrs={};for(let v=0;v<this.length;++v)this.setCell(v,c)}}copyFrom(c){this.length!==c.length?this._data=new Uint32Array(c._data):this._data.set(c._data),this.length=c.length,this._combined={};for(const p in c._combined)this._combined[p]=c._combined[p];this._extendedAttrs={};for(const p in c._extendedAttrs)this._extendedAttrs[p]=c._extendedAttrs[p];this.isWrapped=c.isWrapped}clone(){const c=new k(0);c._data=new Uint32Array(this._data),c.length=this.length;for(const p in this._combined)c._combined[p]=this._combined[p];for(const p in this._extendedAttrs)c._extendedAttrs[p]=this._extendedAttrs[p];return c.isWrapped=this.isWrapped,c}getTrimmedLength(){for(let c=this.length-1;c>=0;--c)if(4194303&this._data[3*c+0])return c+(this._data[3*c+0]>>22);return 0}getNoBgTrimmedLength(){for(let c=this.length-1;c>=0;--c)if(4194303&this._data[3*c+0]||50331648&this._data[3*c+2])return c+(this._data[3*c+0]>>22);return 0}copyCellsFrom(c,p,v,w,C){const T=c._data;if(C)for(let R=w-1;R>=0;R--){for(let j=0;j<3;j++)this._data[3*(v+R)+j]=T[3*(p+R)+j];268435456&T[3*(p+R)+2]&&(this._extendedAttrs[v+R]=c._extendedAttrs[p+R])}else for(let R=0;R<w;R++){for(let j=0;j<3;j++)this._data[3*(v+R)+j]=T[3*(p+R)+j];268435456&T[3*(p+R)+2]&&(this._extendedAttrs[v+R]=c._extendedAttrs[p+R])}const S=Object.keys(c._combined);for(let R=0;R<S.length;R++){const j=parseInt(S[R],10);j>=p&&(this._combined[j-p+v]=c._combined[j])}}translateToString(c,p,v,w){p=p??0,v=v??this.length,c&&(v=Math.min(v,this.getTrimmedLength())),w&&(w.length=0);let C="";for(;p<v;){const T=this._data[3*p+0],S=2097151&T,R=2097152&T?this._combined[p]:S?(0,y.stringFromCodePoint)(S):d.WHITESPACE_CELL_CHAR;if(C+=R,w)for(let j=0;j<R.length;++j)w.push(p);p+=T>>22||1}return w&&w.push(p),C}}s.BufferLine=k},4841:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.getRangeLength=void 0,s.getRangeLength=function(u,f){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return f*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(_,s)=>{function u(f,g,d){if(g===f.length-1)return f[g].getTrimmedLength();const y=!f[g].hasContent(d-1)&&f[g].getWidth(d-1)===1,N=f[g+1].getWidth(0)===2;return y&&N?d-1:d}Object.defineProperty(s,"__esModule",{value:!0}),s.getWrappedLineTrimmedLength=s.reflowSmallerGetNewLineLengths=s.reflowLargerApplyNewLayout=s.reflowLargerCreateNewLayout=s.reflowLargerGetLinesToRemove=void 0,s.reflowLargerGetLinesToRemove=function(f,g,d,y,N){const k=[];for(let b=0;b<f.length-1;b++){let c=b,p=f.get(++c);if(!p.isWrapped)continue;const v=[f.get(b)];for(;c<f.length&&p.isWrapped;)v.push(p),p=f.get(++c);if(y>=b&&y<c){b+=v.length-1;continue}let w=0,C=u(v,w,g),T=1,S=0;for(;T<v.length;){const j=u(v,T,g),A=j-S,O=d-C,H=Math.min(A,O);v[w].copyCellsFrom(v[T],S,C,H,!1),C+=H,C===d&&(w++,C=0),S+=H,S===j&&(T++,S=0),C===0&&w!==0&&v[w-1].getWidth(d-1)===2&&(v[w].copyCellsFrom(v[w-1],d-1,C++,1,!1),v[w-1].setCell(d-1,N))}v[w].replaceCells(C,d,N);let R=0;for(let j=v.length-1;j>0&&(j>w||v[j].getTrimmedLength()===0);j--)R++;R>0&&(k.push(b+v.length-R),k.push(R)),b+=v.length-1}return k},s.reflowLargerCreateNewLayout=function(f,g){const d=[];let y=0,N=g[y],k=0;for(let b=0;b<f.length;b++)if(N===b){const c=g[++y];f.onDeleteEmitter.fire({index:b-k,amount:c}),b+=c-1,k+=c,N=g[++y]}else d.push(b);return{layout:d,countRemoved:k}},s.reflowLargerApplyNewLayout=function(f,g){const d=[];for(let y=0;y<g.length;y++)d.push(f.get(g[y]));for(let y=0;y<d.length;y++)f.set(y,d[y]);f.length=g.length},s.reflowSmallerGetNewLineLengths=function(f,g,d){const y=[],N=f.map((p,v)=>u(f,v,g)).reduce((p,v)=>p+v);let k=0,b=0,c=0;for(;c<N;){if(N-c<d){y.push(N-c);break}k+=d;const p=u(f,b,g);k>p&&(k-=p,b++);const v=f[b].getWidth(k-1)===2;v&&k--;const w=v?d-1:d;y.push(w),c+=w}return y},s.getWrappedLineTrimmedLength=u},5295:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferSet=void 0;const f=u(8460),g=u(844),d=u(9092);class y extends g.Disposable{constructor(k,b){super(),this._optionsService=k,this._bufferService=b,this._onBufferActivate=this.register(new f.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new d.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new d.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(k){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(k),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(k,b){this._normal.resize(k,b),this._alt.resize(k,b),this.setupTabStops(k)}setupTabStops(k){this._normal.setupTabStops(k),this._alt.setupTabStops(k)}}s.BufferSet=y},511:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CellData=void 0;const f=u(482),g=u(643),d=u(3734);class y extends d.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new d.ExtendedAttrs,this.combinedData=""}static fromCharData(k){const b=new y;return b.setFromCharData(k),b}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(k){this.fg=k[g.CHAR_DATA_ATTR_INDEX],this.bg=0;let b=!1;if(k[g.CHAR_DATA_CHAR_INDEX].length>2)b=!0;else if(k[g.CHAR_DATA_CHAR_INDEX].length===2){const c=k[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=c&&c<=56319){const p=k[g.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=p&&p<=57343?this.content=1024*(c-55296)+p-56320+65536|k[g.CHAR_DATA_WIDTH_INDEX]<<22:b=!0}else b=!0}else this.content=k[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|k[g.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=k[g.CHAR_DATA_CHAR_INDEX],this.content=2097152|k[g.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}s.CellData=y},643:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.WHITESPACE_CELL_CODE=s.WHITESPACE_CELL_WIDTH=s.WHITESPACE_CELL_CHAR=s.NULL_CELL_CODE=s.NULL_CELL_WIDTH=s.NULL_CELL_CHAR=s.CHAR_DATA_CODE_INDEX=s.CHAR_DATA_WIDTH_INDEX=s.CHAR_DATA_CHAR_INDEX=s.CHAR_DATA_ATTR_INDEX=s.DEFAULT_EXT=s.DEFAULT_ATTR=s.DEFAULT_COLOR=void 0,s.DEFAULT_COLOR=0,s.DEFAULT_ATTR=256|s.DEFAULT_COLOR<<9,s.DEFAULT_EXT=0,s.CHAR_DATA_ATTR_INDEX=0,s.CHAR_DATA_CHAR_INDEX=1,s.CHAR_DATA_WIDTH_INDEX=2,s.CHAR_DATA_CODE_INDEX=3,s.NULL_CELL_CHAR="",s.NULL_CELL_WIDTH=1,s.NULL_CELL_CODE=0,s.WHITESPACE_CELL_CHAR=" ",s.WHITESPACE_CELL_WIDTH=1,s.WHITESPACE_CELL_CODE=32},4863:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Marker=void 0;const f=u(8460),g=u(844);class d{get id(){return this._id}constructor(N){this.line=N,this.isDisposed=!1,this._disposables=[],this._id=d._nextId++,this._onDispose=this.register(new f.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,g.disposeArray)(this._disposables),this._disposables.length=0)}register(N){return this._disposables.push(N),N}}s.Marker=d,d._nextId=1},7116:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DEFAULT_CHARSET=s.CHARSETS=void 0,s.CHARSETS={},s.DEFAULT_CHARSET=s.CHARSETS.B,s.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:"≥","{":"π","|":"≠","}":"£","~":"·"},s.CHARSETS.A={"#":"£"},s.CHARSETS.B=void 0,s.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},s.CHARSETS.C=s.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},s.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},s.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},s.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},s.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},s.CHARSETS.E=s.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},s.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},s.CHARSETS.H=s.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},s.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(_,s)=>{var u,f,g;Object.defineProperty(s,"__esModule",{value:!0}),s.C1_ESCAPED=s.C1=s.C0=void 0,function(d){d.NUL="\0",d.SOH="",d.STX="",d.ETX="",d.EOT="",d.ENQ="",d.ACK="",d.BEL="\x07",d.BS="\b",d.HT=" ",d.LF=`
221
+ `,d.VT="\v",d.FF="\f",d.CR="\r",d.SO="",d.SI="",d.DLE="",d.DC1="",d.DC2="",d.DC3="",d.DC4="",d.NAK="",d.SYN="",d.ETB="",d.CAN="",d.EM="",d.SUB="",d.ESC="\x1B",d.FS="",d.GS="",d.RS="",d.US="",d.SP=" ",d.DEL=""}(u||(s.C0=u={})),function(d){d.PAD="€",d.HOP="",d.BPH="‚",d.NBH="ƒ",d.IND="„",d.NEL="…",d.SSA="†",d.ESA="‡",d.HTS="ˆ",d.HTJ="‰",d.VTS="Š",d.PLD="‹",d.PLU="Œ",d.RI="",d.SS2="Ž",d.SS3="",d.DCS="",d.PU1="‘",d.PU2="’",d.STS="“",d.CCH="”",d.MW="•",d.SPA="–",d.EPA="—",d.SOS="˜",d.SGCI="™",d.SCI="š",d.CSI="›",d.ST="œ",d.OSC="",d.PM="ž",d.APC="Ÿ"}(f||(s.C1=f={})),function(d){d.ST=`${u.ESC}\\`}(g||(s.C1_ESCAPED=g={}))},7399:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.evaluateKeyboardEvent=void 0;const f=u(2584),g={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};s.evaluateKeyboardEvent=function(d,y,N,k){const b={type:0,cancel:!1,key:void 0},c=(d.shiftKey?1:0)|(d.altKey?2:0)|(d.ctrlKey?4:0)|(d.metaKey?8:0);switch(d.keyCode){case 0:d.key==="UIKeyInputUpArrow"?b.key=y?f.C0.ESC+"OA":f.C0.ESC+"[A":d.key==="UIKeyInputLeftArrow"?b.key=y?f.C0.ESC+"OD":f.C0.ESC+"[D":d.key==="UIKeyInputRightArrow"?b.key=y?f.C0.ESC+"OC":f.C0.ESC+"[C":d.key==="UIKeyInputDownArrow"&&(b.key=y?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:b.key=d.ctrlKey?"\b":f.C0.DEL,d.altKey&&(b.key=f.C0.ESC+b.key);break;case 9:if(d.shiftKey){b.key=f.C0.ESC+"[Z";break}b.key=f.C0.HT,b.cancel=!0;break;case 13:b.key=d.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,b.cancel=!0;break;case 27:b.key=f.C0.ESC,d.altKey&&(b.key=f.C0.ESC+f.C0.ESC),b.cancel=!0;break;case 37:if(d.metaKey)break;c?(b.key=f.C0.ESC+"[1;"+(c+1)+"D",b.key===f.C0.ESC+"[1;3D"&&(b.key=f.C0.ESC+(N?"b":"[1;5D"))):b.key=y?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(d.metaKey)break;c?(b.key=f.C0.ESC+"[1;"+(c+1)+"C",b.key===f.C0.ESC+"[1;3C"&&(b.key=f.C0.ESC+(N?"f":"[1;5C"))):b.key=y?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(d.metaKey)break;c?(b.key=f.C0.ESC+"[1;"+(c+1)+"A",N||b.key!==f.C0.ESC+"[1;3A"||(b.key=f.C0.ESC+"[1;5A")):b.key=y?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(d.metaKey)break;c?(b.key=f.C0.ESC+"[1;"+(c+1)+"B",N||b.key!==f.C0.ESC+"[1;3B"||(b.key=f.C0.ESC+"[1;5B")):b.key=y?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:d.shiftKey||d.ctrlKey||(b.key=f.C0.ESC+"[2~");break;case 46:b.key=c?f.C0.ESC+"[3;"+(c+1)+"~":f.C0.ESC+"[3~";break;case 36:b.key=c?f.C0.ESC+"[1;"+(c+1)+"H":y?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:b.key=c?f.C0.ESC+"[1;"+(c+1)+"F":y?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:d.shiftKey?b.type=2:d.ctrlKey?b.key=f.C0.ESC+"[5;"+(c+1)+"~":b.key=f.C0.ESC+"[5~";break;case 34:d.shiftKey?b.type=3:d.ctrlKey?b.key=f.C0.ESC+"[6;"+(c+1)+"~":b.key=f.C0.ESC+"[6~";break;case 112:b.key=c?f.C0.ESC+"[1;"+(c+1)+"P":f.C0.ESC+"OP";break;case 113:b.key=c?f.C0.ESC+"[1;"+(c+1)+"Q":f.C0.ESC+"OQ";break;case 114:b.key=c?f.C0.ESC+"[1;"+(c+1)+"R":f.C0.ESC+"OR";break;case 115:b.key=c?f.C0.ESC+"[1;"+(c+1)+"S":f.C0.ESC+"OS";break;case 116:b.key=c?f.C0.ESC+"[15;"+(c+1)+"~":f.C0.ESC+"[15~";break;case 117:b.key=c?f.C0.ESC+"[17;"+(c+1)+"~":f.C0.ESC+"[17~";break;case 118:b.key=c?f.C0.ESC+"[18;"+(c+1)+"~":f.C0.ESC+"[18~";break;case 119:b.key=c?f.C0.ESC+"[19;"+(c+1)+"~":f.C0.ESC+"[19~";break;case 120:b.key=c?f.C0.ESC+"[20;"+(c+1)+"~":f.C0.ESC+"[20~";break;case 121:b.key=c?f.C0.ESC+"[21;"+(c+1)+"~":f.C0.ESC+"[21~";break;case 122:b.key=c?f.C0.ESC+"[23;"+(c+1)+"~":f.C0.ESC+"[23~";break;case 123:b.key=c?f.C0.ESC+"[24;"+(c+1)+"~":f.C0.ESC+"[24~";break;default:if(!d.ctrlKey||d.shiftKey||d.altKey||d.metaKey)if(N&&!k||!d.altKey||d.metaKey)!N||d.altKey||d.ctrlKey||d.shiftKey||!d.metaKey?d.key&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&d.keyCode>=48&&d.key.length===1?b.key=d.key:d.key&&d.ctrlKey&&(d.key==="_"&&(b.key=f.C0.US),d.key==="@"&&(b.key=f.C0.NUL)):d.keyCode===65&&(b.type=1);else{const p=g[d.keyCode],v=p==null?void 0:p[d.shiftKey?1:0];if(v)b.key=f.C0.ESC+v;else if(d.keyCode>=65&&d.keyCode<=90){const w=d.ctrlKey?d.keyCode-64:d.keyCode+32;let C=String.fromCharCode(w);d.shiftKey&&(C=C.toUpperCase()),b.key=f.C0.ESC+C}else if(d.keyCode===32)b.key=f.C0.ESC+(d.ctrlKey?f.C0.NUL:" ");else if(d.key==="Dead"&&d.code.startsWith("Key")){let w=d.code.slice(3,4);d.shiftKey||(w=w.toLowerCase()),b.key=f.C0.ESC+w,b.cancel=!0}}else d.keyCode>=65&&d.keyCode<=90?b.key=String.fromCharCode(d.keyCode-64):d.keyCode===32?b.key=f.C0.NUL:d.keyCode>=51&&d.keyCode<=55?b.key=String.fromCharCode(d.keyCode-51+27):d.keyCode===56?b.key=f.C0.DEL:d.keyCode===219?b.key=f.C0.ESC:d.keyCode===220?b.key=f.C0.FS:d.keyCode===221&&(b.key=f.C0.GS)}return b}},482:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Utf8ToUtf32=s.StringToUtf32=s.utf32ToString=s.stringFromCodePoint=void 0,s.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},s.utf32ToString=function(u,f=0,g=u.length){let d="";for(let y=f;y<g;++y){let N=u[y];N>65535?(N-=65536,d+=String.fromCharCode(55296+(N>>10))+String.fromCharCode(N%1024+56320)):d+=String.fromCharCode(N)}return d},s.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const g=u.length;if(!g)return 0;let d=0,y=0;if(this._interim){const N=u.charCodeAt(y++);56320<=N&&N<=57343?f[d++]=1024*(this._interim-55296)+N-56320+65536:(f[d++]=this._interim,f[d++]=N),this._interim=0}for(let N=y;N<g;++N){const k=u.charCodeAt(N);if(55296<=k&&k<=56319){if(++N>=g)return this._interim=k,d;const b=u.charCodeAt(N);56320<=b&&b<=57343?f[d++]=1024*(k-55296)+b-56320+65536:(f[d++]=k,f[d++]=b)}else k!==65279&&(f[d++]=k)}return d}},s.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const g=u.length;if(!g)return 0;let d,y,N,k,b=0,c=0,p=0;if(this.interim[0]){let C=!1,T=this.interim[0];T&=(224&T)==192?31:(240&T)==224?15:7;let S,R=0;for(;(S=63&this.interim[++R])&&R<4;)T<<=6,T|=S;const j=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,A=j-R;for(;p<A;){if(p>=g)return 0;if(S=u[p++],(192&S)!=128){p--,C=!0;break}this.interim[R++]=S,T<<=6,T|=63&S}C||(j===2?T<128?p--:f[b++]=T:j===3?T<2048||T>=55296&&T<=57343||T===65279||(f[b++]=T):T<65536||T>1114111||(f[b++]=T)),this.interim.fill(0)}const v=g-4;let w=p;for(;w<g;){for(;!(!(w<v)||128&(d=u[w])||128&(y=u[w+1])||128&(N=u[w+2])||128&(k=u[w+3]));)f[b++]=d,f[b++]=y,f[b++]=N,f[b++]=k,w+=4;if(d=u[w++],d<128)f[b++]=d;else if((224&d)==192){if(w>=g)return this.interim[0]=d,b;if(y=u[w++],(192&y)!=128){w--;continue}if(c=(31&d)<<6|63&y,c<128){w--;continue}f[b++]=c}else if((240&d)==224){if(w>=g)return this.interim[0]=d,b;if(y=u[w++],(192&y)!=128){w--;continue}if(w>=g)return this.interim[0]=d,this.interim[1]=y,b;if(N=u[w++],(192&N)!=128){w--;continue}if(c=(15&d)<<12|(63&y)<<6|63&N,c<2048||c>=55296&&c<=57343||c===65279)continue;f[b++]=c}else if((248&d)==240){if(w>=g)return this.interim[0]=d,b;if(y=u[w++],(192&y)!=128){w--;continue}if(w>=g)return this.interim[0]=d,this.interim[1]=y,b;if(N=u[w++],(192&N)!=128){w--;continue}if(w>=g)return this.interim[0]=d,this.interim[1]=y,this.interim[2]=N,b;if(k=u[w++],(192&k)!=128){w--;continue}if(c=(7&d)<<18|(63&y)<<12|(63&N)<<6|63&k,c<65536||c>1114111)continue;f[b++]=c}}return b}}},225:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.UnicodeV6=void 0;const f=u(1480),g=[[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]],d=[[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 y;s.UnicodeV6=class{constructor(){if(this.version="6",!y){y=new Uint8Array(65536),y.fill(1),y[0]=0,y.fill(0,1,32),y.fill(0,127,160),y.fill(2,4352,4448),y[9001]=2,y[9002]=2,y.fill(2,11904,42192),y[12351]=1,y.fill(2,44032,55204),y.fill(2,63744,64256),y.fill(2,65040,65050),y.fill(2,65072,65136),y.fill(2,65280,65377),y.fill(2,65504,65511);for(let N=0;N<g.length;++N)y.fill(0,g[N][0],g[N][1]+1)}}wcwidth(N){return N<32?0:N<127?1:N<65536?y[N]:function(k,b){let c,p=0,v=b.length-1;if(k<b[0][0]||k>b[v][1])return!1;for(;v>=p;)if(c=p+v>>1,k>b[c][1])p=c+1;else{if(!(k<b[c][0]))return!0;v=c-1}return!1}(N,d)?0:N>=131072&&N<=196605||N>=196608&&N<=262141?2:1}charProperties(N,k){let b=this.wcwidth(N),c=b===0&&k!==0;if(c){const p=f.UnicodeService.extractWidth(k);p===0?c=!1:p>b&&(b=p)}return f.UnicodeService.createPropertyValue(0,b,c)}}},5981:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.WriteBuffer=void 0;const f=u(8460),g=u(844);class d extends g.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 f.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(N,k){if(k!==void 0&&this._syncCalls>k)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 c=this._callbacks.shift();c&&c()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(N,k){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(k),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=N.length,this._writeBuffer.push(N),this._callbacks.push(k)}_innerWrite(N=0,k=!0){const b=N||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const c=this._writeBuffer[this._bufferOffset],p=this._action(c,k);if(p){const w=C=>Date.now()-b>=12?setTimeout(()=>this._innerWrite(0,C)):this._innerWrite(b,C);return void p.catch(C=>(queueMicrotask(()=>{throw C}),Promise.resolve(!1))).then(w)}const v=this._callbacks[this._bufferOffset];if(v&&v(),this._bufferOffset++,this._pendingData-=c.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()}}s.WriteBuffer=d},5941:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.toRgbString=s.parseColor=void 0;const u=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,f=/^[\da-f]+$/;function g(d,y){const N=d.toString(16),k=N.length<2?"0"+N:N;switch(y){case 4:return N[0];case 8:return k;case 12:return(k+k).slice(0,3);default:return k+k}}s.parseColor=function(d){if(!d)return;let y=d.toLowerCase();if(y.indexOf("rgb:")===0){y=y.slice(4);const N=u.exec(y);if(N){const k=N[1]?15:N[4]?255:N[7]?4095:65535;return[Math.round(parseInt(N[1]||N[4]||N[7]||N[10],16)/k*255),Math.round(parseInt(N[2]||N[5]||N[8]||N[11],16)/k*255),Math.round(parseInt(N[3]||N[6]||N[9]||N[12],16)/k*255)]}}else if(y.indexOf("#")===0&&(y=y.slice(1),f.exec(y)&&[3,6,9,12].includes(y.length))){const N=y.length/3,k=[0,0,0];for(let b=0;b<3;++b){const c=parseInt(y.slice(N*b,N*b+N),16);k[b]=N===1?c<<4:N===2?c:N===3?c>>4:c>>8}return k}},s.toRgbString=function(d,y=16){const[N,k,b]=d;return`rgb:${g(N,y)}/${g(k,y)}/${g(b,y)}`}},5770:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.PAYLOAD_LIMIT=void 0,s.PAYLOAD_LIMIT=1e7},6351:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DcsHandler=s.DcsParser=void 0;const f=u(482),g=u(8742),d=u(5770),y=[];s.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=y,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=y}registerHandler(k,b){this._handlers[k]===void 0&&(this._handlers[k]=[]);const c=this._handlers[k];return c.push(b),{dispose:()=>{const p=c.indexOf(b);p!==-1&&c.splice(p,1)}}}clearHandler(k){this._handlers[k]&&delete this._handlers[k]}setHandlerFallback(k){this._handlerFb=k}reset(){if(this._active.length)for(let k=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;k>=0;--k)this._active[k].unhook(!1);this._stack.paused=!1,this._active=y,this._ident=0}hook(k,b){if(this.reset(),this._ident=k,this._active=this._handlers[k]||y,this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].hook(b);else this._handlerFb(this._ident,"HOOK",b)}put(k,b,c){if(this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].put(k,b,c);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(k,b,c))}unhook(k,b=!0){if(this._active.length){let c=!1,p=this._active.length-1,v=!1;if(this._stack.paused&&(p=this._stack.loopPosition-1,c=b,v=this._stack.fallThrough,this._stack.paused=!1),!v&&c===!1){for(;p>=0&&(c=this._active[p].unhook(k),c!==!0);p--)if(c instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!1,c;p--}for(;p>=0;p--)if(c=this._active[p].unhook(!1),c instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!0,c}else this._handlerFb(this._ident,"UNHOOK",k);this._active=y,this._ident=0}};const N=new g.Params;N.addParam(0),s.DcsHandler=class{constructor(k){this._handler=k,this._data="",this._params=N,this._hitLimit=!1}hook(k){this._params=k.length>1||k.params[0]?k.clone():N,this._data="",this._hitLimit=!1}put(k,b,c){this._hitLimit||(this._data+=(0,f.utf32ToString)(k,b,c),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(k){let b=!1;if(this._hitLimit)b=!1;else if(k&&(b=this._handler(this._data,this._params),b instanceof Promise))return b.then(c=>(this._params=N,this._data="",this._hitLimit=!1,c));return this._params=N,this._data="",this._hitLimit=!1,b}}},2015:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.EscapeSequenceParser=s.VT500_TRANSITION_TABLE=s.TransitionTable=void 0;const f=u(844),g=u(8742),d=u(6242),y=u(6351);class N{constructor(p){this.table=new Uint8Array(p)}setDefault(p,v){this.table.fill(p<<4|v)}add(p,v,w,C){this.table[v<<8|p]=w<<4|C}addMany(p,v,w,C){for(let T=0;T<p.length;T++)this.table[v<<8|p[T]]=w<<4|C}}s.TransitionTable=N;const k=160;s.VT500_TRANSITION_TABLE=function(){const c=new N(4095),p=Array.apply(null,Array(256)).map((R,j)=>j),v=(R,j)=>p.slice(R,j),w=v(32,127),C=v(0,24);C.push(25),C.push.apply(C,v(28,32));const T=v(0,14);let S;for(S in c.setDefault(1,0),c.addMany(w,0,2,0),T)c.addMany([24,26,153,154],S,3,0),c.addMany(v(128,144),S,3,0),c.addMany(v(144,152),S,3,0),c.add(156,S,0,0),c.add(27,S,11,1),c.add(157,S,4,8),c.addMany([152,158,159],S,0,7),c.add(155,S,11,3),c.add(144,S,11,9);return c.addMany(C,0,3,0),c.addMany(C,1,3,1),c.add(127,1,0,1),c.addMany(C,8,0,8),c.addMany(C,3,3,3),c.add(127,3,0,3),c.addMany(C,4,3,4),c.add(127,4,0,4),c.addMany(C,6,3,6),c.addMany(C,5,3,5),c.add(127,5,0,5),c.addMany(C,2,3,2),c.add(127,2,0,2),c.add(93,1,4,8),c.addMany(w,8,5,8),c.add(127,8,5,8),c.addMany([156,27,24,26,7],8,6,0),c.addMany(v(28,32),8,0,8),c.addMany([88,94,95],1,0,7),c.addMany(w,7,0,7),c.addMany(C,7,0,7),c.add(156,7,0,0),c.add(127,7,0,7),c.add(91,1,11,3),c.addMany(v(64,127),3,7,0),c.addMany(v(48,60),3,8,4),c.addMany([60,61,62,63],3,9,4),c.addMany(v(48,60),4,8,4),c.addMany(v(64,127),4,7,0),c.addMany([60,61,62,63],4,0,6),c.addMany(v(32,64),6,0,6),c.add(127,6,0,6),c.addMany(v(64,127),6,0,0),c.addMany(v(32,48),3,9,5),c.addMany(v(32,48),5,9,5),c.addMany(v(48,64),5,0,6),c.addMany(v(64,127),5,7,0),c.addMany(v(32,48),4,9,5),c.addMany(v(32,48),1,9,2),c.addMany(v(32,48),2,9,2),c.addMany(v(48,127),2,10,0),c.addMany(v(48,80),1,10,0),c.addMany(v(81,88),1,10,0),c.addMany([89,90,92],1,10,0),c.addMany(v(96,127),1,10,0),c.add(80,1,11,9),c.addMany(C,9,0,9),c.add(127,9,0,9),c.addMany(v(28,32),9,0,9),c.addMany(v(32,48),9,9,12),c.addMany(v(48,60),9,8,10),c.addMany([60,61,62,63],9,9,10),c.addMany(C,11,0,11),c.addMany(v(32,128),11,0,11),c.addMany(v(28,32),11,0,11),c.addMany(C,10,0,10),c.add(127,10,0,10),c.addMany(v(28,32),10,0,10),c.addMany(v(48,60),10,8,10),c.addMany([60,61,62,63],10,0,11),c.addMany(v(32,48),10,9,12),c.addMany(C,12,0,12),c.add(127,12,0,12),c.addMany(v(28,32),12,0,12),c.addMany(v(32,48),12,9,12),c.addMany(v(48,64),12,0,11),c.addMany(v(64,127),12,12,13),c.addMany(v(64,127),10,12,13),c.addMany(v(64,127),9,12,13),c.addMany(C,13,13,13),c.addMany(w,13,13,13),c.add(127,13,0,13),c.addMany([27,156,24,26],13,14,0),c.add(k,0,2,0),c.add(k,8,5,8),c.add(k,6,0,6),c.add(k,11,0,11),c.add(k,13,13,13),c}();class b extends f.Disposable{constructor(p=s.VT500_TRANSITION_TABLE){super(),this._transitions=p,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new g.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(v,w,C)=>{},this._executeHandlerFb=v=>{},this._csiHandlerFb=(v,w)=>{},this._escHandlerFb=v=>{},this._errorHandlerFb=v=>v,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,f.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new d.OscParser),this._dcsParser=this.register(new y.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(p,v=[64,126]){let w=0;if(p.prefix){if(p.prefix.length>1)throw new Error("only one byte as prefix supported");if(w=p.prefix.charCodeAt(0),w&&60>w||w>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(p.intermediates){if(p.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let T=0;T<p.intermediates.length;++T){const S=p.intermediates.charCodeAt(T);if(32>S||S>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");w<<=8,w|=S}}if(p.final.length!==1)throw new Error("final must be a single byte");const C=p.final.charCodeAt(0);if(v[0]>C||C>v[1])throw new Error(`final must be in range ${v[0]} .. ${v[1]}`);return w<<=8,w|=C,w}identToString(p){const v=[];for(;p;)v.push(String.fromCharCode(255&p)),p>>=8;return v.reverse().join("")}setPrintHandler(p){this._printHandler=p}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(p,v){const w=this._identifier(p,[48,126]);this._escHandlers[w]===void 0&&(this._escHandlers[w]=[]);const C=this._escHandlers[w];return C.push(v),{dispose:()=>{const T=C.indexOf(v);T!==-1&&C.splice(T,1)}}}clearEscHandler(p){this._escHandlers[this._identifier(p,[48,126])]&&delete this._escHandlers[this._identifier(p,[48,126])]}setEscHandlerFallback(p){this._escHandlerFb=p}setExecuteHandler(p,v){this._executeHandlers[p.charCodeAt(0)]=v}clearExecuteHandler(p){this._executeHandlers[p.charCodeAt(0)]&&delete this._executeHandlers[p.charCodeAt(0)]}setExecuteHandlerFallback(p){this._executeHandlerFb=p}registerCsiHandler(p,v){const w=this._identifier(p);this._csiHandlers[w]===void 0&&(this._csiHandlers[w]=[]);const C=this._csiHandlers[w];return C.push(v),{dispose:()=>{const T=C.indexOf(v);T!==-1&&C.splice(T,1)}}}clearCsiHandler(p){this._csiHandlers[this._identifier(p)]&&delete this._csiHandlers[this._identifier(p)]}setCsiHandlerFallback(p){this._csiHandlerFb=p}registerDcsHandler(p,v){return this._dcsParser.registerHandler(this._identifier(p),v)}clearDcsHandler(p){this._dcsParser.clearHandler(this._identifier(p))}setDcsHandlerFallback(p){this._dcsParser.setHandlerFallback(p)}registerOscHandler(p,v){return this._oscParser.registerHandler(p,v)}clearOscHandler(p){this._oscParser.clearHandler(p)}setOscHandlerFallback(p){this._oscParser.setHandlerFallback(p)}setErrorHandler(p){this._errorHandler=p}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(p,v,w,C,T){this._parseStack.state=p,this._parseStack.handlers=v,this._parseStack.handlerPos=w,this._parseStack.transition=C,this._parseStack.chunkPos=T}parse(p,v,w){let C,T=0,S=0,R=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,R=this._parseStack.chunkPos+1;else{if(w===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const j=this._parseStack.handlers;let A=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(w===!1&&A>-1){for(;A>=0&&(C=j[A](this._params),C!==!0);A--)if(C instanceof Promise)return this._parseStack.handlerPos=A,C}this._parseStack.handlers=[];break;case 4:if(w===!1&&A>-1){for(;A>=0&&(C=j[A](),C!==!0);A--)if(C instanceof Promise)return this._parseStack.handlerPos=A,C}this._parseStack.handlers=[];break;case 6:if(T=p[this._parseStack.chunkPos],C=this._dcsParser.unhook(T!==24&&T!==26,w),C)return C;T===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(T=p[this._parseStack.chunkPos],C=this._oscParser.end(T!==24&&T!==26,w),C)return C;T===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,R=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let j=R;j<v;++j){switch(T=p[j],S=this._transitions.table[this.currentState<<8|(T<160?T:k)],S>>4){case 2:for(let P=j+1;;++P){if(P>=v||(T=p[P])<32||T>126&&T<k){this._printHandler(p,j,P),j=P-1;break}if(++P>=v||(T=p[P])<32||T>126&&T<k){this._printHandler(p,j,P),j=P-1;break}if(++P>=v||(T=p[P])<32||T>126&&T<k){this._printHandler(p,j,P),j=P-1;break}if(++P>=v||(T=p[P])<32||T>126&&T<k){this._printHandler(p,j,P),j=P-1;break}}break;case 3:this._executeHandlers[T]?this._executeHandlers[T]():this._executeHandlerFb(T),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:j,code:T,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const A=this._csiHandlers[this._collect<<8|T];let O=A?A.length-1:-1;for(;O>=0&&(C=A[O](this._params),C!==!0);O--)if(C instanceof Promise)return this._preserveStack(3,A,O,S,j),C;O<0&&this._csiHandlerFb(this._collect<<8|T,this._params),this.precedingJoinState=0;break;case 8:do switch(T){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(T-48)}while(++j<v&&(T=p[j])>47&&T<60);j--;break;case 9:this._collect<<=8,this._collect|=T;break;case 10:const H=this._escHandlers[this._collect<<8|T];let V=H?H.length-1:-1;for(;V>=0&&(C=H[V](),C!==!0);V--)if(C instanceof Promise)return this._preserveStack(4,H,V,S,j),C;V<0&&this._escHandlerFb(this._collect<<8|T),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|T,this._params);break;case 13:for(let P=j+1;;++P)if(P>=v||(T=p[P])===24||T===26||T===27||T>127&&T<k){this._dcsParser.put(p,j,P),j=P-1;break}break;case 14:if(C=this._dcsParser.unhook(T!==24&&T!==26),C)return this._preserveStack(6,[],0,S,j),C;T===27&&(S|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let P=j+1;;P++)if(P>=v||(T=p[P])<32||T>127&&T<k){this._oscParser.put(p,j,P),j=P-1;break}break;case 6:if(C=this._oscParser.end(T!==24&&T!==26),C)return this._preserveStack(5,[],0,S,j),C;T===27&&(S|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&S}}}s.EscapeSequenceParser=b},6242:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.OscHandler=s.OscParser=void 0;const f=u(5770),g=u(482),d=[];s.OscParser=class{constructor(){this._state=0,this._active=d,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(y,N){this._handlers[y]===void 0&&(this._handlers[y]=[]);const k=this._handlers[y];return k.push(N),{dispose:()=>{const b=k.indexOf(N);b!==-1&&k.splice(b,1)}}}clearHandler(y){this._handlers[y]&&delete this._handlers[y]}setHandlerFallback(y){this._handlerFb=y}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=d}reset(){if(this._state===2)for(let y=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;y>=0;--y)this._active[y].end(!1);this._stack.paused=!1,this._active=d,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||d,this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].start();else this._handlerFb(this._id,"START")}_put(y,N,k){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(y,N,k);else this._handlerFb(this._id,"PUT",(0,g.utf32ToString)(y,N,k))}start(){this.reset(),this._state=1}put(y,N,k){if(this._state!==3){if(this._state===1)for(;N<k;){const b=y[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&&k-N>0&&this._put(y,N,k)}}end(y,N=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let k=!1,b=this._active.length-1,c=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,k=N,c=this._stack.fallThrough,this._stack.paused=!1),!c&&k===!1){for(;b>=0&&(k=this._active[b].end(y),k!==!0);b--)if(k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,k;b--}for(;b>=0;b--)if(k=this._active[b].end(!1),k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,k}else this._handlerFb(this._id,"END",y);this._active=d,this._id=-1,this._state=0}}},s.OscHandler=class{constructor(y){this._handler=y,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(y,N,k){this._hitLimit||(this._data+=(0,g.utf32ToString)(y,N,k),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(y){let N=!1;if(this._hitLimit)N=!1;else if(y&&(N=this._handler(this._data),N instanceof Promise))return N.then(k=>(this._data="",this._hitLimit=!1,k));return this._data="",this._hitLimit=!1,N}}},8742:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Params=void 0;const u=2147483647;class f{static fromArray(d){const y=new f;if(!d.length)return y;for(let N=Array.isArray(d[0])?1:0;N<d.length;++N){const k=d[N];if(Array.isArray(k))for(let b=0;b<k.length;++b)y.addSubParam(k[b]);else y.addParam(k)}return y}constructor(d=32,y=32){if(this.maxLength=d,this.maxSubParamsLength=y,y>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(d),this.length=0,this._subParams=new Int32Array(y),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(d),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const d=new f(this.maxLength,this.maxSubParamsLength);return d.params.set(this.params),d.length=this.length,d._subParams.set(this._subParams),d._subParamsLength=this._subParamsLength,d._subParamsIdx.set(this._subParamsIdx),d._rejectDigits=this._rejectDigits,d._rejectSubDigits=this._rejectSubDigits,d._digitIsSub=this._digitIsSub,d}toArray(){const d=[];for(let y=0;y<this.length;++y){d.push(this.params[y]);const N=this._subParamsIdx[y]>>8,k=255&this._subParamsIdx[y];k-N>0&&d.push(Array.prototype.slice.call(this._subParams,N,k))}return d}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(d){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=d>u?u:d}}addSubParam(d){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=d>u?u:d,this._subParamsIdx[this.length-1]++}}hasSubParams(d){return(255&this._subParamsIdx[d])-(this._subParamsIdx[d]>>8)>0}getSubParams(d){const y=this._subParamsIdx[d]>>8,N=255&this._subParamsIdx[d];return N-y>0?this._subParams.subarray(y,N):null}getSubParamsAll(){const d={};for(let y=0;y<this.length;++y){const N=this._subParamsIdx[y]>>8,k=255&this._subParamsIdx[y];k-N>0&&(d[y]=this._subParams.slice(N,k))}return d}addDigit(d){let y;if(this._rejectDigits||!(y=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const N=this._digitIsSub?this._subParams:this.params,k=N[y-1];N[y-1]=~k?Math.min(10*k+d,u):d}}s.Params=f},5741:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.AddonManager=void 0,s.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,f){const g={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(g),f.dispose=()=>this._wrappedAddonDispose(g),f.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let f=-1;for(let g=0;g<this._addons.length;g++)if(this._addons[g]===u){f=g;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(f,1)}}},8771:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferApiView=void 0;const f=u(3785),g=u(511);s.BufferApiView=class{constructor(d,y){this._buffer=d,this.type=y}init(d){return this._buffer=d,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(d){const y=this._buffer.lines.get(d);if(y)return new f.BufferLineApiView(y)}getNullCell(){return new g.CellData}}},3785:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferLineApiView=void 0;const f=u(511);s.BufferLineApiView=class{constructor(g){this._line=g}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(g,d){if(!(g<0||g>=this._line.length))return d?(this._line.loadCell(g,d),d):this._line.loadCell(g,new f.CellData)}translateToString(g,d,y){return this._line.translateToString(g,d,y)}}},8285:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferNamespaceApi=void 0;const f=u(8771),g=u(8460),d=u(844);class y extends d.Disposable{constructor(k){super(),this._core=k,this._onBufferChange=this.register(new g.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}s.BufferNamespaceApi=y},7975:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ParserApi=void 0,s.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,f){return this._core.registerCsiHandler(u,g=>f(g.toArray()))}addCsiHandler(u,f){return this.registerCsiHandler(u,f)}registerDcsHandler(u,f){return this._core.registerDcsHandler(u,(g,d)=>f(g,d.toArray()))}addDcsHandler(u,f){return this.registerDcsHandler(u,f)}registerEscHandler(u,f){return this._core.registerEscHandler(u,f)}addEscHandler(u,f){return this.registerEscHandler(u,f)}registerOscHandler(u,f){return this._core.registerOscHandler(u,f)}addOscHandler(u,f){return this.registerOscHandler(u,f)}}},7090:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.UnicodeApi=void 0,s.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(_,s,u){var f=this&&this.__decorate||function(c,p,v,w){var C,T=arguments.length,S=T<3?p:w===null?w=Object.getOwnPropertyDescriptor(p,v):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(c,p,v,w);else for(var R=c.length-1;R>=0;R--)(C=c[R])&&(S=(T<3?C(S):T>3?C(p,v,S):C(p,v))||S);return T>3&&S&&Object.defineProperty(p,v,S),S},g=this&&this.__param||function(c,p){return function(v,w){p(v,w,c)}};Object.defineProperty(s,"__esModule",{value:!0}),s.BufferService=s.MINIMUM_ROWS=s.MINIMUM_COLS=void 0;const d=u(8460),y=u(844),N=u(5295),k=u(2585);s.MINIMUM_COLS=2,s.MINIMUM_ROWS=1;let b=s.BufferService=class extends y.Disposable{get buffer(){return this.buffers.active}constructor(c){super(),this.isUserScrolling=!1,this._onResize=this.register(new d.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new d.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(c.rawOptions.cols||0,s.MINIMUM_COLS),this.rows=Math.max(c.rawOptions.rows||0,s.MINIMUM_ROWS),this.buffers=this.register(new N.BufferSet(c,this))}resize(c,p){this.cols=c,this.rows=p,this.buffers.resize(c,p),this._onResize.fire({cols:c,rows:p})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(c,p=!1){const v=this.buffer;let w;w=this._cachedBlankLine,w&&w.length===this.cols&&w.getFg(0)===c.fg&&w.getBg(0)===c.bg||(w=v.getBlankLine(c,p),this._cachedBlankLine=w),w.isWrapped=p;const C=v.ybase+v.scrollTop,T=v.ybase+v.scrollBottom;if(v.scrollTop===0){const S=v.lines.isFull;T===v.lines.length-1?S?v.lines.recycle().copyFrom(w):v.lines.push(w.clone()):v.lines.splice(T+1,0,w.clone()),S?this.isUserScrolling&&(v.ydisp=Math.max(v.ydisp-1,0)):(v.ybase++,this.isUserScrolling||v.ydisp++)}else{const S=T-C+1;v.lines.shiftElements(C+1,S-1,-1),v.lines.set(T,w.clone())}this.isUserScrolling||(v.ydisp=v.ybase),this._onScroll.fire(v.ydisp)}scrollLines(c,p,v){const w=this.buffer;if(c<0){if(w.ydisp===0)return;this.isUserScrolling=!0}else c+w.ydisp>=w.ybase&&(this.isUserScrolling=!1);const C=w.ydisp;w.ydisp=Math.max(Math.min(w.ydisp+c,w.ybase),0),C!==w.ydisp&&(p||this._onScroll.fire(w.ydisp))}};s.BufferService=b=f([g(0,k.IOptionsService)],b)},7994:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CharsetService=void 0,s.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,f){this._charsets[u]=f,this.glevel===u&&(this.charset=f)}}},1753:function(_,s,u){var f=this&&this.__decorate||function(w,C,T,S){var R,j=arguments.length,A=j<3?C:S===null?S=Object.getOwnPropertyDescriptor(C,T):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(w,C,T,S);else for(var O=w.length-1;O>=0;O--)(R=w[O])&&(A=(j<3?R(A):j>3?R(C,T,A):R(C,T))||A);return j>3&&A&&Object.defineProperty(C,T,A),A},g=this&&this.__param||function(w,C){return function(T,S){C(T,S,w)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CoreMouseService=void 0;const d=u(2585),y=u(8460),N=u(844),k={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:w=>w.button!==4&&w.action===1&&(w.ctrl=!1,w.alt=!1,w.shift=!1,!0)},VT200:{events:19,restrict:w=>w.action!==32},DRAG:{events:23,restrict:w=>w.action!==32||w.button!==3},ANY:{events:31,restrict:w=>!0}};function b(w,C){let T=(w.ctrl?16:0)|(w.shift?4:0)|(w.alt?8:0);return w.button===4?(T|=64,T|=w.action):(T|=3&w.button,4&w.button&&(T|=64),8&w.button&&(T|=128),w.action===32?T|=32:w.action!==0||C||(T|=3)),T}const c=String.fromCharCode,p={DEFAULT:w=>{const C=[b(w,!1)+32,w.col+32,w.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${c(C[0])}${c(C[1])}${c(C[2])}`},SGR:w=>{const C=w.action===0&&w.button!==4?"m":"M";return`\x1B[<${b(w,!0)};${w.col};${w.row}${C}`},SGR_PIXELS:w=>{const C=w.action===0&&w.button!==4?"m":"M";return`\x1B[<${b(w,!0)};${w.x};${w.y}${C}`}};let v=s.CoreMouseService=class extends N.Disposable{constructor(w,C){super(),this._bufferService=w,this._coreService=C,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new y.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const T of Object.keys(k))this.addProtocol(T,k[T]);for(const T of Object.keys(p))this.addEncoding(T,p[T]);this.reset()}addProtocol(w,C){this._protocols[w]=C}addEncoding(w,C){this._encodings[w]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(w){if(!this._protocols[w])throw new Error(`unknown protocol "${w}"`);this._activeProtocol=w,this._onProtocolChange.fire(this._protocols[w].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(w){if(!this._encodings[w])throw new Error(`unknown encoding "${w}"`);this._activeEncoding=w}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(w){if(w.col<0||w.col>=this._bufferService.cols||w.row<0||w.row>=this._bufferService.rows||w.button===4&&w.action===32||w.button===3&&w.action!==32||w.button!==4&&(w.action===2||w.action===3)||(w.col++,w.row++,w.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,w,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(w))return!1;const C=this._encodings[this._activeEncoding](w);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=w,!0}explainEvents(w){return{down:!!(1&w),up:!!(2&w),drag:!!(4&w),move:!!(8&w),wheel:!!(16&w)}}_equalEvents(w,C,T){if(T){if(w.x!==C.x||w.y!==C.y)return!1}else if(w.col!==C.col||w.row!==C.row)return!1;return w.button===C.button&&w.action===C.action&&w.ctrl===C.ctrl&&w.alt===C.alt&&w.shift===C.shift}};s.CoreMouseService=v=f([g(0,d.IBufferService),g(1,d.ICoreService)],v)},6975:function(_,s,u){var f=this&&this.__decorate||function(v,w,C,T){var S,R=arguments.length,j=R<3?w:T===null?T=Object.getOwnPropertyDescriptor(w,C):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,w,C,T);else for(var A=v.length-1;A>=0;A--)(S=v[A])&&(j=(R<3?S(j):R>3?S(w,C,j):S(w,C))||j);return R>3&&j&&Object.defineProperty(w,C,j),j},g=this&&this.__param||function(v,w){return function(C,T){w(C,T,v)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CoreService=void 0;const d=u(1439),y=u(8460),N=u(844),k=u(2585),b=Object.freeze({insertMode:!1}),c=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let p=s.CoreService=class extends N.Disposable{constructor(v,w,C){super(),this._bufferService=v,this._logService=w,this._optionsService=C,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new y.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new y.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new y.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new y.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,d.clone)(b),this.decPrivateModes=(0,d.clone)(c)}reset(){this.modes=(0,d.clone)(b),this.decPrivateModes=(0,d.clone)(c)}triggerDataEvent(v,w=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;w&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),w&&this._onUserInput.fire(),this._logService.debug(`sending data "${v}"`,()=>v.split("").map(T=>T.charCodeAt(0))),this._onData.fire(v)}triggerBinaryEvent(v){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${v}"`,()=>v.split("").map(w=>w.charCodeAt(0))),this._onBinary.fire(v))}};s.CoreService=p=f([g(0,k.IBufferService),g(1,k.ILogService),g(2,k.IOptionsService)],p)},9074:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DecorationService=void 0;const f=u(8055),g=u(8460),d=u(844),y=u(6106);let N=0,k=0;class b extends d.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new y.SortedList(v=>v==null?void 0:v.marker.line),this._onDecorationRegistered=this.register(new g.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new g.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,d.toDisposable)(()=>this.reset()))}registerDecoration(v){if(v.marker.isDisposed)return;const w=new c(v);if(w){const C=w.marker.onDispose(()=>w.dispose());w.onDispose(()=>{w&&(this._decorations.delete(w)&&this._onDecorationRemoved.fire(w),C.dispose())}),this._decorations.insert(w),this._onDecorationRegistered.fire(w)}return w}reset(){for(const v of this._decorations.values())v.dispose();this._decorations.clear()}*getDecorationsAtCell(v,w,C){let T=0,S=0;for(const R of this._decorations.getKeyIterator(w))T=R.options.x??0,S=T+(R.options.width??1),v>=T&&v<S&&(!C||(R.options.layer??"bottom")===C)&&(yield R)}forEachDecorationAtCell(v,w,C,T){this._decorations.forEachByKey(w,S=>{N=S.options.x??0,k=N+(S.options.width??1),v>=N&&v<k&&(!C||(S.options.layer??"bottom")===C)&&T(S)})}}s.DecorationService=b;class c extends d.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(v){super(),this.options=v,this.onRenderEmitter=this.register(new g.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new g.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=v.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.InstantiationService=s.ServiceCollection=void 0;const f=u(2585),g=u(8343);class d{constructor(...N){this._entries=new Map;for(const[k,b]of N)this.set(k,b)}set(N,k){const b=this._entries.get(N);return this._entries.set(N,k),b}forEach(N){for(const[k,b]of this._entries.entries())N(k,b)}has(N){return this._entries.has(N)}get(N){return this._entries.get(N)}}s.ServiceCollection=d,s.InstantiationService=class{constructor(){this._services=new d,this._services.set(f.IInstantiationService,this)}setService(y,N){this._services.set(y,N)}getService(y){return this._services.get(y)}createInstance(y,...N){const k=(0,g.getServiceDependencies)(y).sort((p,v)=>p.index-v.index),b=[];for(const p of k){const v=this._services.get(p.id);if(!v)throw new Error(`[createInstance] ${y.name} depends on UNKNOWN service ${p.id}.`);b.push(v)}const c=k.length>0?k[0].index:N.length;if(N.length!==c)throw new Error(`[createInstance] First service dependency of ${y.name} at position ${c+1} conflicts with ${N.length} static arguments`);return new y(...N,...b)}}},7866:function(_,s,u){var f=this&&this.__decorate||function(c,p,v,w){var C,T=arguments.length,S=T<3?p:w===null?w=Object.getOwnPropertyDescriptor(p,v):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(c,p,v,w);else for(var R=c.length-1;R>=0;R--)(C=c[R])&&(S=(T<3?C(S):T>3?C(p,v,S):C(p,v))||S);return T>3&&S&&Object.defineProperty(p,v,S),S},g=this&&this.__param||function(c,p){return function(v,w){p(v,w,c)}};Object.defineProperty(s,"__esModule",{value:!0}),s.traceCall=s.setTraceLogger=s.LogService=void 0;const d=u(844),y=u(2585),N={trace:y.LogLevelEnum.TRACE,debug:y.LogLevelEnum.DEBUG,info:y.LogLevelEnum.INFO,warn:y.LogLevelEnum.WARN,error:y.LogLevelEnum.ERROR,off:y.LogLevelEnum.OFF};let k,b=s.LogService=class extends d.Disposable{get logLevel(){return this._logLevel}constructor(c){super(),this._optionsService=c,this._logLevel=y.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),k=this}_updateLogLevel(){this._logLevel=N[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(c){for(let p=0;p<c.length;p++)typeof c[p]=="function"&&(c[p]=c[p]())}_log(c,p,v){this._evalLazyOptionalParams(v),c.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+p,...v)}trace(c,...p){var v;this._logLevel<=y.LogLevelEnum.TRACE&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.trace.bind(this._optionsService.options.logger))??console.log,c,p)}debug(c,...p){var v;this._logLevel<=y.LogLevelEnum.DEBUG&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.debug.bind(this._optionsService.options.logger))??console.log,c,p)}info(c,...p){var v;this._logLevel<=y.LogLevelEnum.INFO&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.info.bind(this._optionsService.options.logger))??console.info,c,p)}warn(c,...p){var v;this._logLevel<=y.LogLevelEnum.WARN&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.warn.bind(this._optionsService.options.logger))??console.warn,c,p)}error(c,...p){var v;this._logLevel<=y.LogLevelEnum.ERROR&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.error.bind(this._optionsService.options.logger))??console.error,c,p)}};s.LogService=b=f([g(0,y.IOptionsService)],b),s.setTraceLogger=function(c){k=c},s.traceCall=function(c,p,v){if(typeof v.value!="function")throw new Error("not supported");const w=v.value;v.value=function(...C){if(k.logLevel!==y.LogLevelEnum.TRACE)return w.apply(this,C);k.trace(`GlyphRenderer#${w.name}(${C.map(S=>JSON.stringify(S)).join(", ")})`);const T=w.apply(this,C);return k.trace(`GlyphRenderer#${w.name} return`,T),T}}},7302:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.OptionsService=s.DEFAULT_OPTIONS=void 0;const f=u(8460),g=u(844),d=u(6114);s.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:d.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const y=["normal","bold","100","200","300","400","500","600","700","800","900"];class N extends g.Disposable{constructor(b){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const c={...s.DEFAULT_OPTIONS};for(const p in b)if(p in c)try{const v=b[p];c[p]=this._sanitizeAndValidateOption(p,v)}catch(v){console.error(v)}this.rawOptions=c,this.options={...c},this._setupOptions(),this.register((0,g.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(b,c){return this.onOptionChange(p=>{p===b&&c(this.rawOptions[b])})}onMultipleOptionChange(b,c){return this.onOptionChange(p=>{b.indexOf(p)!==-1&&c()})}_setupOptions(){const b=p=>{if(!(p in s.DEFAULT_OPTIONS))throw new Error(`No option with key "${p}"`);return this.rawOptions[p]},c=(p,v)=>{if(!(p in s.DEFAULT_OPTIONS))throw new Error(`No option with key "${p}"`);v=this._sanitizeAndValidateOption(p,v),this.rawOptions[p]!==v&&(this.rawOptions[p]=v,this._onOptionChange.fire(p))};for(const p in this.rawOptions){const v={get:b.bind(this,p),set:c.bind(this,p)};Object.defineProperty(this.options,p,v)}}_sanitizeAndValidateOption(b,c){switch(b){case"cursorStyle":if(c||(c=s.DEFAULT_OPTIONS[b]),!function(p){return p==="block"||p==="underline"||p==="bar"}(c))throw new Error(`"${c}" is not a valid value for ${b}`);break;case"wordSeparator":c||(c=s.DEFAULT_OPTIONS[b]);break;case"fontWeight":case"fontWeightBold":if(typeof c=="number"&&1<=c&&c<=1e3)break;c=y.includes(c)?c:s.DEFAULT_OPTIONS[b];break;case"cursorWidth":c=Math.floor(c);case"lineHeight":case"tabStopWidth":if(c<1)throw new Error(`${b} cannot be less than 1, value: ${c}`);break;case"minimumContrastRatio":c=Math.max(1,Math.min(21,Math.round(10*c)/10));break;case"scrollback":if((c=Math.min(c,4294967295))<0)throw new Error(`${b} cannot be less than 0, value: ${c}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(c<=0)throw new Error(`${b} cannot be less than or equal to 0, value: ${c}`);break;case"rows":case"cols":if(!c&&c!==0)throw new Error(`${b} must be numeric, value: ${c}`);break;case"windowsPty":c=c??{}}return c}}s.OptionsService=N},2660:function(_,s,u){var f=this&&this.__decorate||function(N,k,b,c){var p,v=arguments.length,w=v<3?k:c===null?c=Object.getOwnPropertyDescriptor(k,b):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(N,k,b,c);else for(var C=N.length-1;C>=0;C--)(p=N[C])&&(w=(v<3?p(w):v>3?p(k,b,w):p(k,b))||w);return v>3&&w&&Object.defineProperty(k,b,w),w},g=this&&this.__param||function(N,k){return function(b,c){k(b,c,N)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OscLinkService=void 0;const d=u(2585);let y=s.OscLinkService=class{constructor(N){this._bufferService=N,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(N){const k=this._bufferService.buffer;if(N.id===void 0){const C=k.addMarker(k.ybase+k.y),T={data:N,id:this._nextId++,lines:[C]};return C.onDispose(()=>this._removeMarkerFromLink(T,C)),this._dataByLinkId.set(T.id,T),T.id}const b=N,c=this._getEntryIdKey(b),p=this._entriesWithId.get(c);if(p)return this.addLineToLink(p.id,k.ybase+k.y),p.id;const v=k.addMarker(k.ybase+k.y),w={id:this._nextId++,key:this._getEntryIdKey(b),data:b,lines:[v]};return v.onDispose(()=>this._removeMarkerFromLink(w,v)),this._entriesWithId.set(w.key,w),this._dataByLinkId.set(w.id,w),w.id}addLineToLink(N,k){const b=this._dataByLinkId.get(N);if(b&&b.lines.every(c=>c.line!==k)){const c=this._bufferService.buffer.addMarker(k);b.lines.push(c),c.onDispose(()=>this._removeMarkerFromLink(b,c))}}getLinkData(N){var k;return(k=this._dataByLinkId.get(N))==null?void 0:k.data}_getEntryIdKey(N){return`${N.id};;${N.uri}`}_removeMarkerFromLink(N,k){const b=N.lines.indexOf(k);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)))}};s.OscLinkService=y=f([g(0,d.IBufferService)],y)},8343:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.createDecorator=s.getServiceDependencies=s.serviceRegistry=void 0;const u="di$target",f="di$dependencies";s.serviceRegistry=new Map,s.getServiceDependencies=function(g){return g[f]||[]},s.createDecorator=function(g){if(s.serviceRegistry.has(g))return s.serviceRegistry.get(g);const d=function(y,N,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(b,c,p){c[u]===c?c[f].push({id:b,index:p}):(c[f]=[{id:b,index:p}],c[u]=c)})(d,y,k)};return d.toString=()=>g,s.serviceRegistry.set(g,d),d}},2585:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.IDecorationService=s.IUnicodeService=s.IOscLinkService=s.IOptionsService=s.ILogService=s.LogLevelEnum=s.IInstantiationService=s.ICharsetService=s.ICoreService=s.ICoreMouseService=s.IBufferService=void 0;const f=u(8343);var g;s.IBufferService=(0,f.createDecorator)("BufferService"),s.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),s.ICoreService=(0,f.createDecorator)("CoreService"),s.ICharsetService=(0,f.createDecorator)("CharsetService"),s.IInstantiationService=(0,f.createDecorator)("InstantiationService"),function(d){d[d.TRACE=0]="TRACE",d[d.DEBUG=1]="DEBUG",d[d.INFO=2]="INFO",d[d.WARN=3]="WARN",d[d.ERROR=4]="ERROR",d[d.OFF=5]="OFF"}(g||(s.LogLevelEnum=g={})),s.ILogService=(0,f.createDecorator)("LogService"),s.IOptionsService=(0,f.createDecorator)("OptionsService"),s.IOscLinkService=(0,f.createDecorator)("OscLinkService"),s.IUnicodeService=(0,f.createDecorator)("UnicodeService"),s.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.UnicodeService=void 0;const f=u(8460),g=u(225);class d{static extractShouldJoin(N){return(1&N)!=0}static extractWidth(N){return N>>1&3}static extractCharKind(N){return N>>3}static createPropertyValue(N,k,b=!1){return(16777215&N)<<3|(3&k)<<1|(b?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter,this.onChange=this._onChange.event;const N=new g.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 k=0,b=0;const c=N.length;for(let p=0;p<c;++p){let v=N.charCodeAt(p);if(55296<=v&&v<=56319){if(++p>=c)return k+this.wcwidth(v);const T=N.charCodeAt(p);56320<=T&&T<=57343?v=1024*(v-55296)+T-56320+65536:k+=this.wcwidth(T)}const w=this.charProperties(v,b);let C=d.extractWidth(w);d.extractShouldJoin(w)&&(C-=d.extractWidth(b)),k+=C,b=w}return k}charProperties(N,k){return this._activeProvider.charProperties(N,k)}}s.UnicodeService=d}},h={};function x(_){var s=h[_];if(s!==void 0)return s.exports;var u=h[_]={exports:{}};return l[_].call(u.exports,u,u.exports,x),u.exports}var D={};return(()=>{var _=D;Object.defineProperty(_,"__esModule",{value:!0}),_.Terminal=void 0;const s=x(9042),u=x(3236),f=x(844),g=x(5741),d=x(8285),y=x(7975),N=x(7090),k=["cols","rows"];class b extends f.Disposable{constructor(p){super(),this._core=this.register(new u.Terminal(p)),this._addonManager=this.register(new g.AddonManager),this._publicOptions={...this._core.options};const v=C=>this._core.options[C],w=(C,T)=>{this._checkReadonlyOptions(C),this._core.options[C]=T};for(const C in this._core.options){const T={get:v.bind(this,C),set:w.bind(this,C)};Object.defineProperty(this._publicOptions,C,T)}}_checkReadonlyOptions(p){if(k.includes(p))throw new Error(`Option "${p}" 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 y.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 d.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const p=this._core.coreService.decPrivateModes;let v="none";switch(this._core.coreMouseService.activeProtocol){case"X10":v="x10";break;case"VT200":v="vt200";break;case"DRAG":v="drag";break;case"ANY":v="any"}return{applicationCursorKeysMode:p.applicationCursorKeys,applicationKeypadMode:p.applicationKeypad,bracketedPasteMode:p.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:v,originMode:p.origin,reverseWraparoundMode:p.reverseWraparound,sendFocusMode:p.sendFocus,wraparoundMode:p.wraparound}}get options(){return this._publicOptions}set options(p){for(const v in p)this._publicOptions[v]=p[v]}blur(){this._core.blur()}focus(){this._core.focus()}input(p,v=!0){this._core.input(p,v)}resize(p,v){this._verifyIntegers(p,v),this._core.resize(p,v)}open(p){this._core.open(p)}attachCustomKeyEventHandler(p){this._core.attachCustomKeyEventHandler(p)}attachCustomWheelEventHandler(p){this._core.attachCustomWheelEventHandler(p)}registerLinkProvider(p){return this._core.registerLinkProvider(p)}registerCharacterJoiner(p){return this._checkProposedApi(),this._core.registerCharacterJoiner(p)}deregisterCharacterJoiner(p){this._checkProposedApi(),this._core.deregisterCharacterJoiner(p)}registerMarker(p=0){return this._verifyIntegers(p),this._core.registerMarker(p)}registerDecoration(p){return this._checkProposedApi(),this._verifyPositiveIntegers(p.x??0,p.width??0,p.height??0),this._core.registerDecoration(p)}hasSelection(){return this._core.hasSelection()}select(p,v,w){this._verifyIntegers(p,v,w),this._core.select(p,v,w)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(p,v){this._verifyIntegers(p,v),this._core.selectLines(p,v)}dispose(){super.dispose()}scrollLines(p){this._verifyIntegers(p),this._core.scrollLines(p)}scrollPages(p){this._verifyIntegers(p),this._core.scrollPages(p)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(p){this._verifyIntegers(p),this._core.scrollToLine(p)}clear(){this._core.clear()}write(p,v){this._core.write(p,v)}writeln(p,v){this._core.write(p),this._core.write(`\r
222
+ `,v)}paste(p){this._core.paste(p)}refresh(p,v){this._verifyIntegers(p,v),this._core.refresh(p,v)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(p){this._addonManager.loadAddon(this,p)}static get strings(){return s}_verifyIntegers(...p){for(const v of p)if(v===1/0||isNaN(v)||v%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...p){for(const v of p)if(v&&(v===1/0||isNaN(v)||v%1!=0||v<0))throw new Error("This API only accepts positive integers")}}_.Terminal=b})(),D})())})(nj);var ij=nj.exports,sj={exports:{}};(function(n,i){(function(l,h){n.exports=h()})(uU,()=>(()=>{var l={930:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ColorContrastCache=void 0;const f=u(485);s.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(g,d,y){this._css.set(g,d,y)}getCss(g,d){return this._css.get(g,d)}setColor(g,d,y){this._color.set(g,d,y)}getColor(g,d){return this._color.get(g,d)}clear(){this._color.clear(),this._css.clear()}}},997:function(_,s,u){var f=this&&this.__decorate||function(R,j,A,O){var H,V=arguments.length,P=V<3?j:O===null?O=Object.getOwnPropertyDescriptor(j,A):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(R,j,A,O);else for(var Y=R.length-1;Y>=0;Y--)(H=R[Y])&&(P=(V<3?H(P):V>3?H(j,A,P):H(j,A))||P);return V>3&&P&&Object.defineProperty(j,A,P),P},g=this&&this.__param||function(R,j){return function(A,O){j(A,O,R)}};Object.defineProperty(s,"__esModule",{value:!0}),s.ThemeService=s.DEFAULT_ANSI_COLORS=void 0;const d=u(930),y=u(160),N=u(345),k=u(859),b=u(97),c=y.css.toColor("#ffffff"),p=y.css.toColor("#000000"),v=y.css.toColor("#ffffff"),w=y.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};s.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const R=[y.css.toColor("#2e3436"),y.css.toColor("#cc0000"),y.css.toColor("#4e9a06"),y.css.toColor("#c4a000"),y.css.toColor("#3465a4"),y.css.toColor("#75507b"),y.css.toColor("#06989a"),y.css.toColor("#d3d7cf"),y.css.toColor("#555753"),y.css.toColor("#ef2929"),y.css.toColor("#8ae234"),y.css.toColor("#fce94f"),y.css.toColor("#729fcf"),y.css.toColor("#ad7fa8"),y.css.toColor("#34e2e2"),y.css.toColor("#eeeeec")],j=[0,95,135,175,215,255];for(let A=0;A<216;A++){const O=j[A/36%6|0],H=j[A/6%6|0],V=j[A%6];R.push({css:y.channels.toCss(O,H,V),rgba:y.channels.toRgba(O,H,V)})}for(let A=0;A<24;A++){const O=8+10*A;R.push({css:y.channels.toCss(O,O,O),rgba:y.channels.toRgba(O,O,O)})}return R})());let T=s.ThemeService=class extends k.Disposable{get colors(){return this._colors}constructor(R){super(),this._optionsService=R,this._contrastCache=new d.ColorContrastCache,this._halfContrastCache=new d.ColorContrastCache,this._onChangeColors=this.register(new N.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:c,background:p,cursor:v,cursorAccent:w,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:y.color.blend(p,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:y.color.blend(p,C),ansi:s.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(R={}){const j=this._colors;if(j.foreground=S(R.foreground,c),j.background=S(R.background,p),j.cursor=S(R.cursor,v),j.cursorAccent=S(R.cursorAccent,w),j.selectionBackgroundTransparent=S(R.selectionBackground,C),j.selectionBackgroundOpaque=y.color.blend(j.background,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundTransparent=S(R.selectionInactiveBackground,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundOpaque=y.color.blend(j.background,j.selectionInactiveBackgroundTransparent),j.selectionForeground=R.selectionForeground?S(R.selectionForeground,y.NULL_COLOR):void 0,j.selectionForeground===y.NULL_COLOR&&(j.selectionForeground=void 0),y.color.isOpaque(j.selectionBackgroundTransparent)&&(j.selectionBackgroundTransparent=y.color.opacity(j.selectionBackgroundTransparent,.3)),y.color.isOpaque(j.selectionInactiveBackgroundTransparent)&&(j.selectionInactiveBackgroundTransparent=y.color.opacity(j.selectionInactiveBackgroundTransparent,.3)),j.ansi=s.DEFAULT_ANSI_COLORS.slice(),j.ansi[0]=S(R.black,s.DEFAULT_ANSI_COLORS[0]),j.ansi[1]=S(R.red,s.DEFAULT_ANSI_COLORS[1]),j.ansi[2]=S(R.green,s.DEFAULT_ANSI_COLORS[2]),j.ansi[3]=S(R.yellow,s.DEFAULT_ANSI_COLORS[3]),j.ansi[4]=S(R.blue,s.DEFAULT_ANSI_COLORS[4]),j.ansi[5]=S(R.magenta,s.DEFAULT_ANSI_COLORS[5]),j.ansi[6]=S(R.cyan,s.DEFAULT_ANSI_COLORS[6]),j.ansi[7]=S(R.white,s.DEFAULT_ANSI_COLORS[7]),j.ansi[8]=S(R.brightBlack,s.DEFAULT_ANSI_COLORS[8]),j.ansi[9]=S(R.brightRed,s.DEFAULT_ANSI_COLORS[9]),j.ansi[10]=S(R.brightGreen,s.DEFAULT_ANSI_COLORS[10]),j.ansi[11]=S(R.brightYellow,s.DEFAULT_ANSI_COLORS[11]),j.ansi[12]=S(R.brightBlue,s.DEFAULT_ANSI_COLORS[12]),j.ansi[13]=S(R.brightMagenta,s.DEFAULT_ANSI_COLORS[13]),j.ansi[14]=S(R.brightCyan,s.DEFAULT_ANSI_COLORS[14]),j.ansi[15]=S(R.brightWhite,s.DEFAULT_ANSI_COLORS[15]),R.extendedAnsi){const A=Math.min(j.ansi.length-16,R.extendedAnsi.length);for(let O=0;O<A;O++)j.ansi[O+16]=S(R.extendedAnsi[O],s.DEFAULT_ANSI_COLORS[O+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(R){this._restoreColor(R),this._onChangeColors.fire(this.colors)}_restoreColor(R){if(R!==void 0)switch(R){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[R]=this._restoreColors.ansi[R]}else for(let j=0;j<this._restoreColors.ansi.length;++j)this._colors.ansi[j]=this._restoreColors.ansi[j]}modifyColors(R){R(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function S(R,j){if(R!==void 0)try{return y.css.toColor(R)}catch{}return j}s.ThemeService=T=f([g(0,b.IOptionsService)],T)},160:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.contrastRatio=s.toPaddedHex=s.rgba=s.rgb=s.css=s.color=s.channels=s.NULL_COLOR=void 0;let u=0,f=0,g=0,d=0;var y,N,k,b,c;function p(w){const C=w.toString(16);return C.length<2?"0"+C:C}function v(w,C){return w<C?(C+.05)/(w+.05):(w+.05)/(C+.05)}s.NULL_COLOR={css:"#00000000",rgba:0},function(w){w.toCss=function(C,T,S,R){return R!==void 0?`#${p(C)}${p(T)}${p(S)}${p(R)}`:`#${p(C)}${p(T)}${p(S)}`},w.toRgba=function(C,T,S,R=255){return(C<<24|T<<16|S<<8|R)>>>0},w.toColor=function(C,T,S,R){return{css:w.toCss(C,T,S,R),rgba:w.toRgba(C,T,S,R)}}}(y||(s.channels=y={})),function(w){function C(T,S){return d=Math.round(255*S),[u,f,g]=c.toChannels(T.rgba),{css:y.toCss(u,f,g,d),rgba:y.toRgba(u,f,g,d)}}w.blend=function(T,S){if(d=(255&S.rgba)/255,d===1)return{css:S.css,rgba:S.rgba};const R=S.rgba>>24&255,j=S.rgba>>16&255,A=S.rgba>>8&255,O=T.rgba>>24&255,H=T.rgba>>16&255,V=T.rgba>>8&255;return u=O+Math.round((R-O)*d),f=H+Math.round((j-H)*d),g=V+Math.round((A-V)*d),{css:y.toCss(u,f,g),rgba:y.toRgba(u,f,g)}},w.isOpaque=function(T){return(255&T.rgba)==255},w.ensureContrastRatio=function(T,S,R){const j=c.ensureContrastRatio(T.rgba,S.rgba,R);if(j)return y.toColor(j>>24&255,j>>16&255,j>>8&255)},w.opaque=function(T){const S=(255|T.rgba)>>>0;return[u,f,g]=c.toChannels(S),{css:y.toCss(u,f,g),rgba:S}},w.opacity=C,w.multiplyOpacity=function(T,S){return d=255&T.rgba,C(T,d*S/255)},w.toColorRGB=function(T){return[T.rgba>>24&255,T.rgba>>16&255,T.rgba>>8&255]}}(N||(s.color=N={})),function(w){let C,T;try{const S=document.createElement("canvas");S.width=1,S.height=1;const R=S.getContext("2d",{willReadFrequently:!0});R&&(C=R,C.globalCompositeOperation="copy",T=C.createLinearGradient(0,0,1,1))}catch{}w.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return u=parseInt(S.slice(1,2).repeat(2),16),f=parseInt(S.slice(2,3).repeat(2),16),g=parseInt(S.slice(3,4).repeat(2),16),y.toColor(u,f,g);case 5:return u=parseInt(S.slice(1,2).repeat(2),16),f=parseInt(S.slice(2,3).repeat(2),16),g=parseInt(S.slice(3,4).repeat(2),16),d=parseInt(S.slice(4,5).repeat(2),16),y.toColor(u,f,g,d);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const R=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(R)return u=parseInt(R[1]),f=parseInt(R[2]),g=parseInt(R[3]),d=Math.round(255*(R[5]===void 0?1:parseFloat(R[5]))),y.toColor(u,f,g,d);if(!C||!T)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=T,C.fillStyle=S,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[u,f,g,d]=C.getImageData(0,0,1,1).data,d!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:y.toRgba(u,f,g,d),css:S}}}(k||(s.css=k={})),function(w){function C(T,S,R){const j=T/255,A=S/255,O=R/255;return .2126*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.7152*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}w.relativeLuminance=function(T){return C(T>>16&255,T>>8&255,255&T)},w.relativeLuminance2=C}(b||(s.rgb=b={})),function(w){function C(S,R,j){const A=S>>24&255,O=S>>16&255,H=S>>8&255;let V=R>>24&255,P=R>>16&255,Y=R>>8&255,Q=v(b.relativeLuminance2(V,P,Y),b.relativeLuminance2(A,O,H));for(;Q<j&&(V>0||P>0||Y>0);)V-=Math.max(0,Math.ceil(.1*V)),P-=Math.max(0,Math.ceil(.1*P)),Y-=Math.max(0,Math.ceil(.1*Y)),Q=v(b.relativeLuminance2(V,P,Y),b.relativeLuminance2(A,O,H));return(V<<24|P<<16|Y<<8|255)>>>0}function T(S,R,j){const A=S>>24&255,O=S>>16&255,H=S>>8&255;let V=R>>24&255,P=R>>16&255,Y=R>>8&255,Q=v(b.relativeLuminance2(V,P,Y),b.relativeLuminance2(A,O,H));for(;Q<j&&(V<255||P<255||Y<255);)V=Math.min(255,V+Math.ceil(.1*(255-V))),P=Math.min(255,P+Math.ceil(.1*(255-P))),Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),Q=v(b.relativeLuminance2(V,P,Y),b.relativeLuminance2(A,O,H));return(V<<24|P<<16|Y<<8|255)>>>0}w.blend=function(S,R){if(d=(255&R)/255,d===1)return R;const j=R>>24&255,A=R>>16&255,O=R>>8&255,H=S>>24&255,V=S>>16&255,P=S>>8&255;return u=H+Math.round((j-H)*d),f=V+Math.round((A-V)*d),g=P+Math.round((O-P)*d),y.toRgba(u,f,g)},w.ensureContrastRatio=function(S,R,j){const A=b.relativeLuminance(S>>8),O=b.relativeLuminance(R>>8);if(v(A,O)<j){if(O<A){const P=C(S,R,j),Y=v(A,b.relativeLuminance(P>>8));if(Y<j){const Q=T(S,R,j);return Y>v(A,b.relativeLuminance(Q>>8))?P:Q}return P}const H=T(S,R,j),V=v(A,b.relativeLuminance(H>>8));if(V<j){const P=C(S,R,j);return V>v(A,b.relativeLuminance(P>>8))?H:P}return H}},w.reduceLuminance=C,w.increaseLuminance=T,w.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}}(c||(s.rgba=c={})),s.toPaddedHex=p,s.contrastRatio=v},345:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.runAndSubscribe=s.forwardEvent=s.EventEmitter=void 0,s.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const g=[];for(let d=0;d<this._listeners.length;d++)g.push(this._listeners[d]);for(let d=0;d<g.length;d++)g[d].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},s.forwardEvent=function(u,f){return u(g=>f.fire(g))},s.runAndSubscribe=function(u,f){return f(void 0),u(g=>f(g))}},859:(_,s)=>{function u(f){for(const g of f)g.dispose();f.length=0}Object.defineProperty(s,"__esModule",{value:!0}),s.getDisposeArrayDisposable=s.disposeArray=s.toDisposable=s.MutableDisposable=s.Disposable=void 0,s.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const g=this._disposables.indexOf(f);g!==-1&&this._disposables.splice(g,1)}},s.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var g;this._isDisposed||f===this._value||((g=this._value)==null||g.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},s.toDisposable=function(f){return{dispose:f}},s.disposeArray=u,s.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},485:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.FourKeyMap=s.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(g,d,y){this._data[g]||(this._data[g]={}),this._data[g][d]=y}get(g,d){return this._data[g]?this._data[g][d]:void 0}clear(){this._data={}}}s.TwoKeyMap=u,s.FourKeyMap=class{constructor(){this._data=new u}set(f,g,d,y,N){this._data.get(f,g)||this._data.set(f,g,new u),this._data.get(f,g).set(d,y,N)}get(f,g,d,y){var N;return(N=this._data.get(f,g))==null?void 0:N.get(d,y)}clear(){this._data.clear()}}},726:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.createDecorator=s.getServiceDependencies=s.serviceRegistry=void 0;const u="di$target",f="di$dependencies";s.serviceRegistry=new Map,s.getServiceDependencies=function(g){return g[f]||[]},s.createDecorator=function(g){if(s.serviceRegistry.has(g))return s.serviceRegistry.get(g);const d=function(y,N,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(b,c,p){c[u]===c?c[f].push({id:b,index:p}):(c[f]=[{id:b,index:p}],c[u]=c)})(d,y,k)};return d.toString=()=>g,s.serviceRegistry.set(g,d),d}},97:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.IDecorationService=s.IUnicodeService=s.IOscLinkService=s.IOptionsService=s.ILogService=s.LogLevelEnum=s.IInstantiationService=s.ICharsetService=s.ICoreService=s.ICoreMouseService=s.IBufferService=void 0;const f=u(726);var g;s.IBufferService=(0,f.createDecorator)("BufferService"),s.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),s.ICoreService=(0,f.createDecorator)("CoreService"),s.ICharsetService=(0,f.createDecorator)("CharsetService"),s.IInstantiationService=(0,f.createDecorator)("InstantiationService"),function(d){d[d.TRACE=0]="TRACE",d[d.DEBUG=1]="DEBUG",d[d.INFO=2]="INFO",d[d.WARN=3]="WARN",d[d.ERROR=4]="ERROR",d[d.OFF=5]="OFF"}(g||(s.LogLevelEnum=g={})),s.ILogService=(0,f.createDecorator)("LogService"),s.IOptionsService=(0,f.createDecorator)("OptionsService"),s.IOscLinkService=(0,f.createDecorator)("OscLinkService"),s.IUnicodeService=(0,f.createDecorator)("UnicodeService"),s.IDecorationService=(0,f.createDecorator)("DecorationService")}},h={};function x(_){var s=h[_];if(s!==void 0)return s.exports;var u=h[_]={exports:{}};return l[_].call(u.exports,u,u.exports,x),u.exports}var D={};return(()=>{var _=D;Object.defineProperty(_,"__esModule",{value:!0}),_.HTMLSerializeHandler=_.SerializeAddon=void 0;const s=x(997);function u(b,c,p){return Math.max(c,Math.min(b,p))}class f{constructor(c){this._buffer=c}serialize(c,p){const v=this._buffer.getNullCell(),w=this._buffer.getNullCell();let C=v;const T=c.start.y,S=c.end.y,R=c.start.x,j=c.end.x;this._beforeSerialize(S-T,T,S);for(let A=T;A<=S;A++){const O=this._buffer.getLine(A);if(O){const H=A===c.start.y?R:0,V=A===c.end.y?j:O.length;for(let P=H;P<V;P++){const Y=O.getCell(P,C===v?w:v);Y?(this._nextCell(Y,C,A,P),C=Y):console.warn(`Can't get cell at row=${A}, col=${P}`)}}this._rowEnd(A,A===S)}return this._afterSerialize(),this._serializeString(p)}_nextCell(c,p,v,w){}_rowEnd(c,p){}_beforeSerialize(c,p,v){}_afterSerialize(){}_serializeString(c){return""}}function g(b,c){return b.getFgColorMode()===c.getFgColorMode()&&b.getFgColor()===c.getFgColor()}function d(b,c){return b.getBgColorMode()===c.getBgColorMode()&&b.getBgColor()===c.getBgColor()}function y(b,c){return b.isInverse()===c.isInverse()&&b.isBold()===c.isBold()&&b.isUnderline()===c.isUnderline()&&b.isOverline()===c.isOverline()&&b.isBlink()===c.isBlink()&&b.isInvisible()===c.isInvisible()&&b.isItalic()===c.isItalic()&&b.isDim()===c.isDim()&&b.isStrikethrough()===c.isStrikethrough()}class N extends f{constructor(c,p){super(c),this._terminal=p,this._rowIndex=0,this._allRows=new Array,this._allRowSeparators=new Array,this._currentRow="",this._nullCellCount=0,this._cursorStyle=this._buffer.getNullCell(),this._cursorStyleRow=0,this._cursorStyleCol=0,this._backgroundCell=this._buffer.getNullCell(),this._firstRow=0,this._lastCursorRow=0,this._lastCursorCol=0,this._lastContentCursorRow=0,this._lastContentCursorCol=0,this._thisRowLastChar=this._buffer.getNullCell(),this._thisRowLastSecondChar=this._buffer.getNullCell(),this._nextRowFirstChar=this._buffer.getNullCell()}_beforeSerialize(c,p,v){this._allRows=new Array(c),this._lastContentCursorRow=p,this._lastCursorRow=p,this._firstRow=p}_rowEnd(c,p){var w;this._nullCellCount>0&&!d(this._cursorStyle,this._backgroundCell)&&(this._currentRow+=`\x1B[${this._nullCellCount}X`);let v="";if(!p){c-this._firstRow>=this._terminal.rows&&((w=this._buffer.getLine(this._cursorStyleRow))==null||w.getCell(this._cursorStyleCol,this._backgroundCell));const C=this._buffer.getLine(c),T=this._buffer.getLine(c+1);if(T.isWrapped){v="";const S=C.getCell(C.length-1,this._thisRowLastChar),R=C.getCell(C.length-2,this._thisRowLastSecondChar),j=T.getCell(0,this._nextRowFirstChar),A=j.getWidth()>1;let O=!1;(j.getChars()&&A?this._nullCellCount<=1:this._nullCellCount<=0)&&((S.getChars()||S.getWidth()===0)&&d(S,j)&&(O=!0),A&&(R.getChars()||R.getWidth()===0)&&d(S,j)&&d(R,j)&&(O=!0)),O||(v="-".repeat(this._nullCellCount+1),v+="\x1B[1D\x1B[1X",this._nullCellCount>0&&(v+="\x1B[A",v+=`\x1B[${C.length-this._nullCellCount}C`,v+=`\x1B[${this._nullCellCount}X`,v+=`\x1B[${C.length-this._nullCellCount}D`,v+="\x1B[B"),this._lastContentCursorRow=c+1,this._lastContentCursorCol=0,this._lastCursorRow=c+1,this._lastCursorCol=0)}else v=`\r
223
+ `,this._lastCursorRow=c+1,this._lastCursorCol=0}this._allRows[this._rowIndex]=this._currentRow,this._allRowSeparators[this._rowIndex++]=v,this._currentRow="",this._nullCellCount=0}_diffStyle(c,p){const v=[],w=!g(c,p),C=!d(c,p),T=!y(c,p);if(w||C||T)if(c.isAttributeDefault())p.isAttributeDefault()||v.push(0);else{if(w){const S=c.getFgColor();c.isFgRGB()?v.push(38,2,S>>>16&255,S>>>8&255,255&S):c.isFgPalette()?S>=16?v.push(38,5,S):v.push(8&S?90+(7&S):30+(7&S)):v.push(39)}if(C){const S=c.getBgColor();c.isBgRGB()?v.push(48,2,S>>>16&255,S>>>8&255,255&S):c.isBgPalette()?S>=16?v.push(48,5,S):v.push(8&S?100+(7&S):40+(7&S)):v.push(49)}T&&(c.isInverse()!==p.isInverse()&&v.push(c.isInverse()?7:27),c.isBold()!==p.isBold()&&v.push(c.isBold()?1:22),c.isUnderline()!==p.isUnderline()&&v.push(c.isUnderline()?4:24),c.isOverline()!==p.isOverline()&&v.push(c.isOverline()?53:55),c.isBlink()!==p.isBlink()&&v.push(c.isBlink()?5:25),c.isInvisible()!==p.isInvisible()&&v.push(c.isInvisible()?8:28),c.isItalic()!==p.isItalic()&&v.push(c.isItalic()?3:23),c.isDim()!==p.isDim()&&v.push(c.isDim()?2:22),c.isStrikethrough()!==p.isStrikethrough()&&v.push(c.isStrikethrough()?9:29))}return v}_nextCell(c,p,v,w){if(c.getWidth()===0)return;const C=c.getChars()==="",T=this._diffStyle(c,this._cursorStyle);if(C?!d(this._cursorStyle,c):T.length>0){this._nullCellCount>0&&(d(this._cursorStyle,this._backgroundCell)||(this._currentRow+=`\x1B[${this._nullCellCount}X`),this._currentRow+=`\x1B[${this._nullCellCount}C`,this._nullCellCount=0),this._lastContentCursorRow=this._lastCursorRow=v,this._lastContentCursorCol=this._lastCursorCol=w,this._currentRow+=`\x1B[${T.join(";")}m`;const S=this._buffer.getLine(v);S!==void 0&&(S.getCell(w,this._cursorStyle),this._cursorStyleRow=v,this._cursorStyleCol=w)}C?this._nullCellCount+=c.getWidth():(this._nullCellCount>0&&(d(this._cursorStyle,this._backgroundCell)||(this._currentRow+=`\x1B[${this._nullCellCount}X`),this._currentRow+=`\x1B[${this._nullCellCount}C`,this._nullCellCount=0),this._currentRow+=c.getChars(),this._lastContentCursorRow=this._lastCursorRow=v,this._lastContentCursorCol=this._lastCursorCol=w+c.getWidth())}_serializeString(c){let p=this._allRows.length;this._buffer.length-this._firstRow<=this._terminal.rows&&(p=this._lastContentCursorRow+1-this._firstRow,this._lastCursorCol=this._lastContentCursorCol,this._lastCursorRow=this._lastContentCursorRow);let v="";for(let S=0;S<p;S++)v+=this._allRows[S],S+1<p&&(v+=this._allRowSeparators[S]);if(!c){const S=this._buffer.baseY+this._buffer.cursorY,R=this._buffer.cursorX,j=A=>{A>0?v+=`\x1B[${A}C`:A<0&&(v+=`\x1B[${-A}D`)};(S!==this._lastCursorRow||R!==this._lastCursorCol)&&((w=S-this._lastCursorRow)>0?v+=`\x1B[${w}B`:w<0&&(v+=`\x1B[${-w}A`),j(R-this._lastCursorCol))}var w;const C=this._terminal._core._inputHandler._curAttrData,T=this._diffStyle(C,this._cursorStyle);return T.length>0&&(v+=`\x1B[${T.join(";")}m`),v}}_.SerializeAddon=class{activate(b){this._terminal=b}_serializeBufferByScrollback(b,c,p){const v=c.length,w=p===void 0?v:u(p+b.rows,0,v);return this._serializeBufferByRange(b,c,{start:v-w,end:v-1},!1)}_serializeBufferByRange(b,c,p,v){return new N(c,b).serialize({start:{x:0,y:typeof p.start=="number"?p.start:p.start.line},end:{x:b.cols,y:typeof p.end=="number"?p.end:p.end.line}},v)}_serializeBufferAsHTML(b,c){var C;const p=b.buffer.active,v=new k(p,b,c);if(!c.onlySelection){const T=p.length,S=c.scrollback,R=S===void 0?T:u(S+b.rows,0,T);return v.serialize({start:{x:0,y:T-R},end:{x:b.cols,y:T-1}})}const w=(C=this._terminal)==null?void 0:C.getSelectionPosition();return w!==void 0?v.serialize({start:{x:w.start.x,y:w.start.y},end:{x:w.end.x,y:w.end.y}}):""}_serializeModes(b){let c="";const p=b.modes;if(p.applicationCursorKeysMode&&(c+="\x1B[?1h"),p.applicationKeypadMode&&(c+="\x1B[?66h"),p.bracketedPasteMode&&(c+="\x1B[?2004h"),p.insertMode&&(c+="\x1B[4h"),p.originMode&&(c+="\x1B[?6h"),p.reverseWraparoundMode&&(c+="\x1B[?45h"),p.sendFocusMode&&(c+="\x1B[?1004h"),p.wraparoundMode===!1&&(c+="\x1B[?7l"),p.mouseTrackingMode!=="none")switch(p.mouseTrackingMode){case"x10":c+="\x1B[?9h";break;case"vt200":c+="\x1B[?1000h";break;case"drag":c+="\x1B[?1002h";break;case"any":c+="\x1B[?1003h"}return c}serialize(b){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");let c=b!=null&&b.range?this._serializeBufferByRange(this._terminal,this._terminal.buffer.normal,b.range,!0):this._serializeBufferByScrollback(this._terminal,this._terminal.buffer.normal,b==null?void 0:b.scrollback);return b!=null&&b.excludeAltBuffer||this._terminal.buffer.active.type!=="alternate"||(c+=`\x1B[?1049h\x1B[H${this._serializeBufferByScrollback(this._terminal,this._terminal.buffer.alternate,void 0)}`),b!=null&&b.excludeModes||(c+=this._serializeModes(this._terminal)),c}serializeAsHTML(b){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");return this._serializeBufferAsHTML(this._terminal,b||{})}dispose(){}};class k extends f{constructor(c,p,v){super(c),this._terminal=p,this._options=v,this._currentRow="",this._htmlContent="",p._core._themeService?this._ansiColors=p._core._themeService.colors.ansi:this._ansiColors=s.DEFAULT_ANSI_COLORS}_padStart(c,p,v){return p>>=0,v=v??" ",c.length>p?c:((p-=c.length)>v.length&&(v+=v.repeat(p/v.length)),v.slice(0,p)+c)}_beforeSerialize(c,p,v){var S,R;this._htmlContent+="<html><body><!--StartFragment--><pre>";let w="#000000",C="#ffffff";this._options.includeGlobalBackground&&(w=((S=this._terminal.options.theme)==null?void 0:S.foreground)??"#ffffff",C=((R=this._terminal.options.theme)==null?void 0:R.background)??"#000000");const T=[];T.push("color: "+w+";"),T.push("background-color: "+C+";"),T.push("font-family: "+this._terminal.options.fontFamily+";"),T.push("font-size: "+this._terminal.options.fontSize+"px;"),this._htmlContent+="<div style='"+T.join(" ")+"'>"}_afterSerialize(){this._htmlContent+="</div>",this._htmlContent+="</pre><!--EndFragment--></body></html>"}_rowEnd(c,p){this._htmlContent+="<div><span>"+this._currentRow+"</span></div>",this._currentRow=""}_getHexColor(c,p){const v=p?c.getFgColor():c.getBgColor();return(p?c.isFgRGB():c.isBgRGB())?"#"+[v>>16&255,v>>8&255,255&v].map(w=>this._padStart(w.toString(16),2,"0")).join(""):(p?c.isFgPalette():c.isBgPalette())?this._ansiColors[v].css:void 0}_diffStyle(c,p){const v=[],w=!g(c,p),C=!d(c,p),T=!y(c,p);if(w||C||T){const S=this._getHexColor(c,!0);S&&v.push("color: "+S+";");const R=this._getHexColor(c,!1);return R&&v.push("background-color: "+R+";"),c.isInverse()&&v.push("color: #000000; background-color: #BFBFBF;"),c.isBold()&&v.push("font-weight: bold;"),c.isUnderline()&&c.isOverline()?v.push("text-decoration: overline underline;"):c.isUnderline()?v.push("text-decoration: underline;"):c.isOverline()&&v.push("text-decoration: overline;"),c.isBlink()&&v.push("text-decoration: blink;"),c.isInvisible()&&v.push("visibility: hidden;"),c.isItalic()&&v.push("font-style: italic;"),c.isDim()&&v.push("opacity: 0.5;"),c.isStrikethrough()&&v.push("text-decoration: line-through;"),v}}_nextCell(c,p,v,w){if(c.getWidth()===0)return;const C=c.getChars()==="",T=this._diffStyle(c,p);T&&(this._currentRow+=T.length===0?"</span><span>":"</span><span style='"+T.join(" ")+"'>"),this._currentRow+=C?" ":c.getChars()}_serializeString(){return this._htmlContent}}_.HTMLSerializeHandler=k})(),D})())})(sj);var A4=sj.exports;const M4=100,z1=3,N_=(n,i)=>new Promise(l=>n.write(i,l));function U4(n,i){let l=i.tail;for(const x of n)l+=x<128?String.fromCharCode(x):" ";let h=i.visible;for(const x of l.matchAll(/\x1b\[\?25([hl])/g))h=x[1]==="h";return{visible:h,tail:l.slice(-8)}}function O4(n,i){let l=i.tail;for(const x of n)l+=x<128?String.fromCharCode(x):" ";let h=i.active;for(const x of l.matchAll(/\x1b\[\?(9|1000|1002|1003)([hl])/g))h=x[2]==="h";return{active:h,tail:l.slice(-12)}}function V4(n,i){if(!n)return!0;for(let l=0;l<i;l+=1){const h=n.getCell(l);if(!h)continue;const x=h.getChars();if(x&&/[^ \t]/.test(x)||!h.isAttributeDefault())return!1}return!0}function B4(n,i,l,h){const x=n.buffer.normal,D=Math.min(x.length,n.rows+l),_=x.length-D,s=x.baseY+x.cursorY;let u=s;for(let d=x.length-1;d>=x.baseY;d-=1)if(!V4(x.getLine(d),n.cols)){u=Math.max(u,d);break}if(x.length-1-u<=z1)return{ansi:i.serialize({excludeModes:!0,scrollback:l}),bufferRows:D,start:_,cur:null};const g=u+z1;return{ansi:i.serialize({excludeModes:!0,range:{start:_,end:g}}),bufferRows:g-_+1,start:_,cur:{row:g-s,col:x.cursorX,vis:h}}}function P4({scrollback:n,renderScrollback:i=M4,TerminalCtor:l=ij.Terminal,SerializeAddonCtor:h=A4.SerializeAddon}={}){let x=null,D=null,_=!1,s=!1,u=!1,f=0,g=0,d={visible:!1,tail:""},y={active:!1,tail:""};const N=()=>{if(_)throw new Error("terminal stream mirror disposed")};return{async seed(k){N();const b=new l({allowProposedApi:!0,scrollback:n,convertEol:!1}),c=new h;b.loadAddon(c),(b.cols!==k.width||b.rows!==k.height)&&b.resize(k.width,k.height);const p=l4(k.ansi,k.height),v=k.alt?"\x1B[?1049h":"\x1B[?1049l";try{await N_(b,`${v}\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H${p}`),N()}catch(C){throw b.dispose(),C}const w=x;x=b,D=c,w==null||w.dispose(),u=!1,d={visible:!1,tail:""},y={active:!!k.mouseAware,tail:""},f=p?p.split(`\r
224
+ `).length:0,s=!0,g+=1},async data(k){N(),d=U4(k,d),y=O4(k,y),await N_(x,k),N(),g+=1},async ready(k){N(),d.visible=!!(k!=null&&k.vis),await N_(x,ew(k,x.rows,f)),N(),u=!0,g+=1},snapshot(){var p;if(N(),!s||!u)return null;const k=x.buffer.active,b=k.type==="alternate"?{ansi:D.serialize({excludeModes:!0,scrollback:i}),bufferRows:k.length,start:0,cur:null}:B4(x,D,i,d.visible),c=(p=x.modes)==null?void 0:p.mouseTrackingMode;return{revision:g,ansi:b.ansi,cur:b.cur,cursorVisible:d.visible,alt:k.type==="alternate",mouseAware:y.active||!!c&&c!=="none",boundaryLine:k.type==="alternate"?null:Math.max(0,x.buffer.normal.baseY-b.start),bufferRows:b.bufferRows,paneRows:x.rows,paneCols:x.cols}},get revision(){return g},dispose(){_||(_=!0,x==null||x.dispose())}}}function I4(n,i,l=24){return Math.abs(i)<=Math.abs(n)?null:i<=-l?"show":i>=l?"hide":null}function F4(n,i){if(!n)return!1;const l=n.scrollHeight-n.clientHeight;return l<=1?!1:i<0?n.scrollTop<l-1:i>0?n.scrollTop>1:!1}function H4(n,i=44,l=.5){return n*i*l/(i+l*Math.abs(n))}function aj(n){if(!n)return!1;const i=n.tagName;return!(i!=="INPUT"&&i!=="TEXTAREA"||n.closest&&n.closest(".xterm"))}function oj({hint:n}){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),n&&o.jsxDEV("div",{className:"lens-boot-hint",children:n},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)}const z4=200;function $4({ready:n,connectionInfo:i,configuredTransport:l,transportFallback:h,transportOpen:x,transportNow:D,onTransportToggle:_,connected:s,inputFailure:u,dbgVisible:f,dbg:g,scrollInfo:d,selInfo:y,onResume:N,altScreen:k,onPageScroll:b,onFitScreen:c,locateOn:p,onToggleLocate:v,selUI:w,onCopy:C,selActionsRef:T,termRef:S}){const R=i!=null&&i.recoveryAt?Math.max(0,Math.ceil((i.recoveryAt-D)/1e3)):null,j=l==="snapshot"?M("terminal.transport_detail_manual"):(i==null?void 0:i.mode)==="live"?M("terminal.transport_detail_live"):M(h==="unavailable"?"terminal.transport_detail_unavailable":"terminal.transport_detail_fallback");return o.jsxDEV(o.Fragment,{children:[!n&&o.jsxDEV(oj,{hint:M("boot.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:45,columnNumber:18},this),n&&s&&!d&&!y&&i&&o.jsxDEV("div",{className:`terminal-connection is-${i.quality}`,children:o.jsxDEV("button",{type:"button",className:`terminal-connection__tag terminal-connection__summary is-${i.mode}`,"aria-expanded":x,"aria-haspopup":"dialog",onClick:_,children:[o.jsxDEV("span",{className:`terminal-connection__mode is-${i.mode}`,children:M(`terminal.transport_${i.mode}`)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:53,columnNumber:13},this),o.jsxDEV("span",{className:"terminal-connection__separator","aria-hidden":"true",children:"·"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:56,columnNumber:13},this),o.jsxDEV("span",{className:"terminal-connection__latency",children:i.rttMs==null?"-- ms":`${i.rttMs} ms`},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:57,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:48,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:47,columnNumber:9},this),x&&i&&o.jsxDEV("div",{className:"terminal-transport-popover",role:"dialog","aria-label":M("terminal.transport_detail_title"),children:[o.jsxDEV("div",{className:"terminal-transport-popover__title",children:M("terminal.transport_detail_title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:66,columnNumber:11},this),o.jsxDEV("div",{className:"terminal-transport-popover__row",children:[o.jsxDEV("span",{children:M("terminal.transport_detail_configured")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:68,columnNumber:13},this),o.jsxDEV("b",{className:`terminal-transport-popover__value is-${l}`,children:M(`settings.terminal_transport_${l}`)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:69,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:67,columnNumber:11},this),o.jsxDEV("div",{className:"terminal-transport-popover__row",children:[o.jsxDEV("span",{children:M("terminal.transport_detail_current")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:74,columnNumber:13},this),o.jsxDEV("b",{className:`terminal-transport-popover__value is-${i.mode}`,children:M(`settings.terminal_transport_${i.mode}`)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:75,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:73,columnNumber:11},this),o.jsxDEV("div",{className:"terminal-transport-popover__row",children:[o.jsxDEV("span",{children:M("terminal.transport_detail_connection")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:80,columnNumber:13},this),o.jsxDEV("b",{className:`terminal-transport-popover__connection is-${i.quality}`,children:[M(`terminal.connection_${i.quality}`)," · ",i.rttMs==null?"-- ms":`${i.rttMs} ms`]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:81,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:79,columnNumber:11},this),o.jsxDEV("p",{children:j},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:87,columnNumber:11},this),l==="live"&&i.mode==="snapshot"&&o.jsxDEV("p",{className:"terminal-transport-popover__recovery",children:R==null?M("terminal.transport_detail_waiting"):M("terminal.transport_detail_retry",{seconds:R})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:89,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:64,columnNumber:9},this),!s&&o.jsxDEV("div",{className:"term-banner term-banner--err",children:["⚠ ",M(u==="pane-missing"?"terminal.paneMissing":"terminal.disconnected")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:98,columnNumber:9},this),f&&o.jsxDEV("div",{className:"dbg",children:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:102,columnNumber:22},this),s&&d&&!y&&o.jsxDEV("div",{className:"term-banner term-banner--hist",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:103,columnNumber:47},this),y&&o.jsxDEV("div",{className:"term-banner term-banner--sel",children:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:104,columnNumber:19},this),d&&o.jsxDEV("button",{className:"new-output",onClick:N,children:"↓ 回到底部"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:105,columnNumber:22},this),k&&o.jsxDEV("div",{className:"term-pager",role:"group","aria-label":"翻页",onPointerDown:A=>{aj(document.activeElement)&&A.cancelable&&A.preventDefault()},children:[o.jsxDEV("div",{className:"term-pager-grp",children:[o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"上翻页",onClick:()=>b("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/TerminalOverlays.jsx",lineNumber:118,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:117,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:116,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/TerminalOverlays.jsx",lineNumber:121,columnNumber:13},this),o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"下翻页",onClick:()=>b("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/TerminalOverlays.jsx",lineNumber:124,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:123,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:122,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:115,columnNumber:11},this),o.jsxDEV("div",{className:"term-pager-grp",children:[o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"适配高度",title:"适配高度",onClick:c,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/TerminalOverlays.jsx",lineNumber:131,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/TerminalOverlays.jsx",lineNumber:132,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:130,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:129,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/TerminalOverlays.jsx",lineNumber:135,columnNumber:13},this),o.jsxDEV("button",{type:"button",className:"term-pager-btn","aria-label":"定位光标行",title:"定位光标行","aria-pressed":p,onClick:v,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/TerminalOverlays.jsx",lineNumber:138,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/TerminalOverlays.jsx",lineNumber:139,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:137,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:136,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:128,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:107,columnNumber:9},this),w&&(()=>{const A=Math.min(w.start.x,w.end.x),O=Math.min(w.start.y,w.end.y),H=Math.max(w.start.y,w.end.y),V=Math.max(8,Math.min(A,(w.wrapW??0)-z4-8)),P=O-44,Y=H+(w.start.ch||0)+8,Q=P<4?Y:P;return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"sel-handle sel-handle--start",style:{left:w.start.x,top:w.start.y,"--h":`${w.start.ch}px`},"data-end":"start"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:155,columnNumber:13},this),o.jsxDEV("div",{className:"sel-handle sel-handle--end",style:{left:w.end.x,top:w.end.y,"--h":`${w.end.ch}px`},"data-end":"end"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:158,columnNumber:13},this),o.jsxDEV("div",{className:"sel-callout",style:{left:V,top:Q},children:[o.jsxDEV("button",{type:"button",onClick:C,children:"拷贝"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:162,columnNumber:15},this),o.jsxDEV("button",{type:"button",onClick:()=>{const z=T.current,X=S.current;z&&X&&z.selectRange(x4(z.currentRange(),X.cols))},children:"整行"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:163,columnNumber:15},this),o.jsxDEV("button",{type:"button",onClick:()=>{const z=T.current,X=S.current;if(!z||!X)return;const K=X.buffer.active;z.selectRange(N4(z.currentRange(),X.cols,z.paraLineText,0,K.length-1))},children:"整段"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:168,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:161,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:154,columnNumber:11},this)})()]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TerminalOverlays.jsx",lineNumber:44,columnNumber:5},this)}var lj={exports:{}};(function(n,i){(function(l,h){n.exports=h()})(self,()=>(()=>{var l={965:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.GlyphRenderer=void 0;const f=u(374),g=u(509),d=u(855),y=u(859),N=u(381),k=11,b=k*Float32Array.BYTES_PER_ELEMENT;let c,p=0,v=0,w=0;class C extends y.Disposable{constructor(S,R,j,A){super(),this._terminal=S,this._gl=R,this._dimensions=j,this._optionsService=A,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const O=this._gl;g.TextureAtlas.maxAtlasPages===void 0&&(g.TextureAtlas.maxAtlasPages=Math.min(32,(0,f.throwIfFalsy)(O.getParameter(O.MAX_TEXTURE_IMAGE_UNITS))),g.TextureAtlas.maxTextureSize=(0,f.throwIfFalsy)(O.getParameter(O.MAX_TEXTURE_SIZE))),this._program=(0,f.throwIfFalsy)((0,N.createProgram)(O,`#version 300 es
225
+ layout (location = 0) in vec2 a_unitquad;
226
+ layout (location = 1) in vec2 a_cellpos;
227
+ layout (location = 2) in vec2 a_offset;
228
+ layout (location = 3) in vec2 a_size;
229
+ layout (location = 4) in float a_texpage;
230
+ layout (location = 5) in vec2 a_texcoord;
231
+ layout (location = 6) in vec2 a_texsize;
232
+
233
+ uniform mat4 u_projection;
234
+ uniform vec2 u_resolution;
235
+
236
+ out vec2 v_texcoord;
237
+ flat out int v_texpage;
238
+
239
+ void main() {
240
+ vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
241
+ gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
242
+ v_texpage = int(a_texpage);
243
+ v_texcoord = a_texcoord + a_unitquad * a_texsize;
244
+ }`,function(z){let X="";for(let K=1;K<z;K++)X+=` else if (v_texpage == ${K}) { outColor = texture(u_texture[${K}], v_texcoord); }`;return`#version 300 es
245
+ precision lowp float;
246
+
247
+ in vec2 v_texcoord;
248
+ flat in int v_texpage;
249
+
250
+ uniform sampler2D u_texture[${z}];
251
+
252
+ out vec4 outColor;
253
+
254
+ void main() {
255
+ if (v_texpage == 0) {
256
+ outColor = texture(u_texture[0], v_texcoord);
257
+ } ${X}
258
+ }`}(g.TextureAtlas.maxAtlasPages))),this.register((0,y.toDisposable)(()=>O.deleteProgram(this._program))),this._projectionLocation=(0,f.throwIfFalsy)(O.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,f.throwIfFalsy)(O.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,f.throwIfFalsy)(O.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=O.createVertexArray(),O.bindVertexArray(this._vertexArrayObject);const H=new Float32Array([0,0,1,0,0,1,1,1]),V=O.createBuffer();this.register((0,y.toDisposable)(()=>O.deleteBuffer(V))),O.bindBuffer(O.ARRAY_BUFFER,V),O.bufferData(O.ARRAY_BUFFER,H,O.STATIC_DRAW),O.enableVertexAttribArray(0),O.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const P=new Uint8Array([0,1,2,3]),Y=O.createBuffer();this.register((0,y.toDisposable)(()=>O.deleteBuffer(Y))),O.bindBuffer(O.ELEMENT_ARRAY_BUFFER,Y),O.bufferData(O.ELEMENT_ARRAY_BUFFER,P,O.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(O.createBuffer()),this.register((0,y.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 Q=new Int32Array(g.TextureAtlas.maxAtlasPages);for(let z=0;z<g.TextureAtlas.maxAtlasPages;z++)Q[z]=z;O.uniform1iv(this._textureLocation,Q),O.uniformMatrix4fv(this._projectionLocation,!1,N.PROJECTION_MATRIX),this._atlasTextures=[];for(let z=0;z<g.TextureAtlas.maxAtlasPages;z++){const X=new N.GLTexture((0,f.throwIfFalsy)(O.createTexture()));this.register((0,y.toDisposable)(()=>O.deleteTexture(X.texture))),O.activeTexture(O.TEXTURE0+z),O.bindTexture(O.TEXTURE_2D,X.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[z]=X}O.enable(O.BLEND),O.blendFunc(O.SRC_ALPHA,O.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(S,R,j,A,O,H,V,P,Y){this._updateCell(this._vertices.attributes,S,R,j,A,O,H,V,P,Y)}_updateCell(S,R,j,A,O,H,V,P,Y,Q){p=(j*this._terminal.cols+R)*k,A!==d.NULL_CELL_CODE&&A!==void 0?this._atlas&&(c=P&&P.length>1?this._atlas.getRasterizedGlyphCombinedChar(P,O,H,V,!1):this._atlas.getRasterizedGlyph(A,O,H,V,!1),v=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),O!==Q&&c.offset.x>v?(w=c.offset.x-v,S[p]=-(c.offset.x-w)+this._dimensions.device.char.left,S[p+1]=-c.offset.y+this._dimensions.device.char.top,S[p+2]=(c.size.x-w)/this._dimensions.device.canvas.width,S[p+3]=c.size.y/this._dimensions.device.canvas.height,S[p+4]=c.texturePage,S[p+5]=c.texturePositionClipSpace.x+w/this._atlas.pages[c.texturePage].canvas.width,S[p+6]=c.texturePositionClipSpace.y,S[p+7]=c.sizeClipSpace.x-w/this._atlas.pages[c.texturePage].canvas.width,S[p+8]=c.sizeClipSpace.y):(S[p]=-c.offset.x+this._dimensions.device.char.left,S[p+1]=-c.offset.y+this._dimensions.device.char.top,S[p+2]=c.size.x/this._dimensions.device.canvas.width,S[p+3]=c.size.y/this._dimensions.device.canvas.height,S[p+4]=c.texturePage,S[p+5]=c.texturePositionClipSpace.x,S[p+6]=c.texturePositionClipSpace.y,S[p+7]=c.sizeClipSpace.x,S[p+8]=c.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,f.allowRescaling)(A,Y,c.size.x,this._dimensions.device.cell.width)&&(S[p+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):S.fill(0,p,p+k-1-2)}clear(){const S=this._terminal,R=S.cols*S.rows*k;this._vertices.count!==R?this._vertices.attributes=new Float32Array(R):this._vertices.attributes.fill(0);let j=0;for(;j<this._vertices.attributesBuffers.length;j++)this._vertices.count!==R?this._vertices.attributesBuffers[j]=new Float32Array(R):this._vertices.attributesBuffers[j].fill(0);this._vertices.count=R,j=0;for(let A=0;A<S.rows;A++)for(let O=0;O<S.cols;O++)this._vertices.attributes[j+9]=O/S.cols,this._vertices.attributes[j+10]=A/S.rows,j+=k}handleResize(){const S=this._gl;S.useProgram(this._program),S.viewport(0,0,S.canvas.width,S.canvas.height),S.uniform2f(this._resolutionLocation,S.canvas.width,S.canvas.height),this.clear()}render(S){if(!this._atlas)return;const R=this._gl;R.useProgram(this._program),R.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const j=this._vertices.attributesBuffers[this._activeBuffer];let A=0;for(let O=0;O<S.lineLengths.length;O++){const H=O*this._terminal.cols*k,V=this._vertices.attributes.subarray(H,H+S.lineLengths[O]*k);j.set(V,A),A+=V.length}R.bindBuffer(R.ARRAY_BUFFER,this._attributesBuffer),R.bufferData(R.ARRAY_BUFFER,j.subarray(0,A),R.STREAM_DRAW);for(let O=0;O<this._atlas.pages.length;O++)this._atlas.pages[O].version!==this._atlasTextures[O].version&&this._bindAtlasPageTexture(R,this._atlas,O);R.drawElementsInstanced(R.TRIANGLE_STRIP,4,R.UNSIGNED_BYTE,0,A/k)}setAtlas(S){this._atlas=S;for(const R of this._atlasTextures)R.version=-1}_bindAtlasPageTexture(S,R,j){S.activeTexture(S.TEXTURE0+j),S.bindTexture(S.TEXTURE_2D,this._atlasTextures[j].texture),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,S.CLAMP_TO_EDGE),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,S.CLAMP_TO_EDGE),S.texImage2D(S.TEXTURE_2D,0,S.RGBA,S.RGBA,S.UNSIGNED_BYTE,R.pages[j].canvas),S.generateMipmap(S.TEXTURE_2D),this._atlasTextures[j].version=R.pages[j].version}setDimensions(S){this._dimensions=S}}s.GlyphRenderer=C},742:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.RectangleRenderer=void 0;const f=u(374),g=u(859),d=u(310),y=u(381),N=8*Float32Array.BYTES_PER_ELEMENT;class k{constructor(){this.attributes=new Float32Array(160),this.count=0}}let b=0,c=0,p=0,v=0,w=0,C=0,T=0;class S extends g.Disposable{constructor(j,A,O,H){super(),this._terminal=j,this._gl=A,this._dimensions=O,this._themeService=H,this._vertices=new k,this._verticesCursor=new k;const V=this._gl;this._program=(0,f.throwIfFalsy)((0,y.createProgram)(V,`#version 300 es
259
+ layout (location = 0) in vec2 a_position;
260
+ layout (location = 1) in vec2 a_size;
261
+ layout (location = 2) in vec4 a_color;
262
+ layout (location = 3) in vec2 a_unitquad;
263
+
264
+ uniform mat4 u_projection;
265
+
266
+ out vec4 v_color;
267
+
268
+ void main() {
269
+ vec2 zeroToOne = a_position + (a_unitquad * a_size);
270
+ gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
271
+ v_color = a_color;
272
+ }`,`#version 300 es
273
+ precision lowp float;
274
+
275
+ in vec4 v_color;
276
+
277
+ out vec4 outColor;
278
+
279
+ void main() {
280
+ outColor = v_color;
281
+ }`)),this.register((0,g.toDisposable)(()=>V.deleteProgram(this._program))),this._projectionLocation=(0,f.throwIfFalsy)(V.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=V.createVertexArray(),V.bindVertexArray(this._vertexArrayObject);const P=new Float32Array([0,0,1,0,0,1,1,1]),Y=V.createBuffer();this.register((0,g.toDisposable)(()=>V.deleteBuffer(Y))),V.bindBuffer(V.ARRAY_BUFFER,Y),V.bufferData(V.ARRAY_BUFFER,P,V.STATIC_DRAW),V.enableVertexAttribArray(3),V.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const Q=new Uint8Array([0,1,2,3]),z=V.createBuffer();this.register((0,g.toDisposable)(()=>V.deleteBuffer(z))),V.bindBuffer(V.ELEMENT_ARRAY_BUFFER,z),V.bufferData(V.ELEMENT_ARRAY_BUFFER,Q,V.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(V.createBuffer()),this.register((0,g.toDisposable)(()=>V.deleteBuffer(this._attributesBuffer))),V.bindBuffer(V.ARRAY_BUFFER,this._attributesBuffer),V.enableVertexAttribArray(0),V.vertexAttribPointer(0,2,V.FLOAT,!1,N,0),V.vertexAttribDivisor(0,1),V.enableVertexAttribArray(1),V.vertexAttribPointer(1,2,V.FLOAT,!1,N,2*Float32Array.BYTES_PER_ELEMENT),V.vertexAttribDivisor(1,1),V.enableVertexAttribArray(2),V.vertexAttribPointer(2,4,V.FLOAT,!1,N,4*Float32Array.BYTES_PER_ELEMENT),V.vertexAttribDivisor(2,1),this._updateCachedColors(H.colors),this.register(this._themeService.onChangeColors(X=>{this._updateCachedColors(X),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(j){const A=this._gl;A.useProgram(this._program),A.bindVertexArray(this._vertexArrayObject),A.uniformMatrix4fv(this._projectionLocation,!1,y.PROJECTION_MATRIX),A.bindBuffer(A.ARRAY_BUFFER,this._attributesBuffer),A.bufferData(A.ARRAY_BUFFER,j.attributes,A.DYNAMIC_DRAW),A.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,A.UNSIGNED_BYTE,0,j.count)}handleResize(){this._updateViewportRectangle()}setDimensions(j){this._dimensions=j}_updateCachedColors(j){this._bgFloat=this._colorToFloat32Array(j.background),this._cursorFloat=this._colorToFloat32Array(j.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(j){const A=this._terminal,O=this._vertices;let H,V,P,Y,Q,z,X,K,B,F,G,Z=1;for(H=0;H<A.rows;H++){for(P=-1,Y=0,Q=0,z=!1,V=0;V<A.cols;V++)X=(H*A.cols+V)*d.RENDER_MODEL_INDICIES_PER_CELL,K=j.cells[X+d.RENDER_MODEL_BG_OFFSET],B=j.cells[X+d.RENDER_MODEL_FG_OFFSET],F=!!(67108864&B),(K!==Y||B!==Q&&(z||F))&&((Y!==0||z&&Q!==0)&&(G=8*Z++,this._updateRectangle(O,G,Q,Y,P,V,H)),P=V,Y=K,Q=B,z=F);(Y!==0||z&&Q!==0)&&(G=8*Z++,this._updateRectangle(O,G,Q,Y,P,A.cols,H))}O.count=Z}updateCursor(j){const A=this._verticesCursor,O=j.cursor;if(!O||O.style==="block")return void(A.count=0);let H,V=0;O.style!=="bar"&&O.style!=="outline"||(H=8*V++,this._addRectangleFloat(A.attributes,H,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"||(H=8*V++,this._addRectangleFloat(A.attributes,H,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"&&(H=8*V++,this._addRectangleFloat(A.attributes,H,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),H=8*V++,this._addRectangleFloat(A.attributes,H,(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)),A.count=V}_updateRectangle(j,A,O,H,V,P,Y){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&H){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&H].rgba;break;case 50331648:b=(16777215&H)<<8;break;default:b=this._themeService.colors.background.rgba}j.attributes.length<A+4&&(j.attributes=(0,y.expandFloat32Array)(j.attributes,this._terminal.rows*this._terminal.cols*8)),c=V*this._dimensions.device.cell.width,p=Y*this._dimensions.device.cell.height,v=(b>>24&255)/255,w=(b>>16&255)/255,C=(b>>8&255)/255,T=1,this._addRectangle(j.attributes,A,c,p,(P-V)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,v,w,C,T)}_addRectangle(j,A,O,H,V,P,Y,Q,z,X){j[A]=O/this._dimensions.device.canvas.width,j[A+1]=H/this._dimensions.device.canvas.height,j[A+2]=V/this._dimensions.device.canvas.width,j[A+3]=P/this._dimensions.device.canvas.height,j[A+4]=Y,j[A+5]=Q,j[A+6]=z,j[A+7]=X}_addRectangleFloat(j,A,O,H,V,P,Y){j[A]=O/this._dimensions.device.canvas.width,j[A+1]=H/this._dimensions.device.canvas.height,j[A+2]=V/this._dimensions.device.canvas.width,j[A+3]=P/this._dimensions.device.canvas.height,j[A+4]=Y[0],j[A+5]=Y[1],j[A+6]=Y[2],j[A+7]=Y[3]}_colorToFloat32Array(j){return new Float32Array([(j.rgba>>24&255)/255,(j.rgba>>16&255)/255,(j.rgba>>8&255)/255,(255&j.rgba)/255])}}s.RectangleRenderer=S},310:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.RenderModel=s.COMBINED_CHAR_BIT_MASK=s.RENDER_MODEL_EXT_OFFSET=s.RENDER_MODEL_FG_OFFSET=s.RENDER_MODEL_BG_OFFSET=s.RENDER_MODEL_INDICIES_PER_CELL=void 0;const f=u(296);s.RENDER_MODEL_INDICIES_PER_CELL=4,s.RENDER_MODEL_BG_OFFSET=1,s.RENDER_MODEL_FG_OFFSET=2,s.RENDER_MODEL_EXT_OFFSET=3,s.COMBINED_CHAR_BIT_MASK=2147483648,s.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,f.createSelectionRenderModel)()}resize(g,d){const y=g*d*s.RENDER_MODEL_INDICIES_PER_CELL;y!==this.cells.length&&(this.cells=new Uint32Array(y),this.lineLengths=new Uint32Array(d))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.JoinedCellData=s.WebglRenderer=void 0;const f=u(820),g=u(274),d=u(627),y=u(457),N=u(56),k=u(374),b=u(345),c=u(859),p=u(147),v=u(782),w=u(855),C=u(965),T=u(742),S=u(310),R=u(733);class j extends c.Disposable{constructor(V,P,Y,Q,z,X,K,B,F){super(),this._terminal=V,this._characterJoinerService=P,this._charSizeService=Y,this._coreBrowserService=Q,this._coreService=z,this._decorationService=X,this._optionsService=K,this._themeService=B,this._cursorBlinkStateManager=new c.MutableDisposable,this._charAtlasDisposable=this.register(new c.MutableDisposable),this._observerDisposable=this.register(new c.MutableDisposable),this._model=new S.RenderModel,this._workCell=new v.CellData,this._workCell2=new v.CellData,this._rectangleRenderer=this.register(new c.MutableDisposable),this._glyphRenderer=this.register(new c.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 g.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new R.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,K,this._themeService)],this.dimensions=(0,k.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(K.onOptionChange(()=>this._handleOptionsChanged())),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const G={antialias:!1,depth:!1,preserveDrawingBuffer:F};if(this._gl=this._canvas.getContext("webgl2",G),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextlost",Z=>{console.log("webglcontextlost event received"),Z.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(Z)},3e3)})),this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextrestored",Z=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,d.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=(0,N.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(Z,ae)=>this._setCanvasDevicePixelDimensions(Z,ae)),this.register(this._coreBrowserService.onWindowChange(Z=>{this._observerDisposable.value=(0,N.observeDevicePixelDimensions)(this._canvas,Z,(ae,me)=>this._setCanvasDevicePixelDimensions(ae,me))})),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,c.toDisposable)(()=>{var Z;for(const ae of this._renderLayers)ae.dispose();(Z=this._canvas.parentElement)==null||Z.removeChild(this._canvas),(0,d.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){var V;return(V=this._charAtlas)==null?void 0:V.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(V,P){var Y,Q,z,X;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const K of this._renderLayers)K.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(Y=this._rectangleRenderer.value)==null||Y.setDimensions(this.dimensions),(Q=this._rectangleRenderer.value)==null||Q.handleResize(),(z=this._glyphRenderer.value)==null||z.setDimensions(this.dimensions),(X=this._glyphRenderer.value)==null||X.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var V;for(const P of this._renderLayers)P.handleBlur(this._terminal);(V=this._cursorBlinkStateManager.value)==null||V.pause(),this._requestRedrawViewport()}handleFocus(){var V;for(const P of this._renderLayers)P.handleFocus(this._terminal);(V=this._cursorBlinkStateManager.value)==null||V.resume(),this._requestRedrawViewport()}handleSelectionChanged(V,P,Y){for(const Q of this._renderLayers)Q.handleSelectionChanged(this._terminal,V,P,Y);this._model.selection.update(this._core,V,P,Y),this._requestRedrawViewport()}handleCursorMove(){var V;for(const P of this._renderLayers)P.handleCursorMove(this._terminal);(V=this._cursorBlinkStateManager.value)==null||V.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new T.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new C.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var P;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const V=(0,d.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!==V&&(this._onChangeTextureAtlas.fire(V.pages[0].canvas),this._charAtlasDisposable.value=(0,c.getDisposeArrayDisposable)([(0,b.forwardEvent)(V.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,b.forwardEvent)(V.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=V,this._charAtlas.warmUp(),(P=this._glyphRenderer.value)==null||P.setAtlas(this._charAtlas)}_clearModel(V){var P;this._model.clear(),V&&((P=this._glyphRenderer.value)==null||P.clear())}clearTextureAtlas(){var V;(V=this._charAtlas)==null||V.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var V;this._clearModel(!0);for(const P of this._renderLayers)P.reset(this._terminal);(V=this._cursorBlinkStateManager.value)==null||V.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(V){return-1}deregisterCharacterJoiner(V){return!1}renderRows(V,P){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const Y of this._renderLayers)Y.handleGridChanged(this._terminal,V,P);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(V,P),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 y.CursorBlinkStateManager(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(V,P){const Y=this._core;let Q,z,X,K,B,F,G,Z,ae,me,Ue,De,ie,q,fe=this._workCell;V=O(V,Y.rows-1,0),P=O(P,Y.rows-1,0);const le=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,Oe=le-Y.buffer.ydisp,ke=Math.min(this._terminal.buffer.active.cursorX,Y.cols-1);let nt=-1;const xe=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let $e=!1;for(z=V;z<=P;z++)for(X=z+Y.buffer.ydisp,K=Y.buffer.lines.get(X),this._model.lineLengths[z]=0,B=this._characterJoinerService.getJoinedCharacters(X),ie=0;ie<Y.cols;ie++)if(Q=this._cellColorResolver.result.bg,K.loadCell(ie,fe),ie===0&&(Q=this._cellColorResolver.result.bg),F=!1,G=ie,B.length>0&&ie===B[0][0]&&(F=!0,Z=B.shift(),fe=new A(fe,K.translateToString(!0,Z[0],Z[1]),Z[1]-Z[0]),G=Z[1]-1),ae=fe.getChars(),me=fe.getCode(),De=(z*Y.cols+ie)*S.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(fe,ie,X,this.dimensions.device.cell.width),xe&&X===le&&(ie===ke&&(this._model.cursor={x:ke,y:Oe,width:fe.getWidth(),style:this._coreBrowserService.isFocused?Y.options.cursorStyle||"block":Y.options.cursorInactiveStyle,cursorWidth:Y.options.cursorWidth,dpr:this._devicePixelRatio},nt=ke+fe.getWidth()-1),ie>=ke&&ie<=nt&&(this._coreBrowserService.isFocused&&(Y.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&Y.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),me!==w.NULL_CELL_CODE&&(this._model.lineLengths[z]=ie+1),(this._model.cells[De]!==me||this._model.cells[De+S.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[De+S.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[De+S.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&($e=!0,ae.length>1&&(me|=S.COMBINED_CHAR_BIT_MASK),this._model.cells[De]=me,this._model.cells[De+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[De+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[De+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,Ue=fe.getWidth(),this._glyphRenderer.value.updateCell(ie,z,me,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,ae,Ue,Q),F))for(fe=this._workCell,ie++;ie<G;ie++)q=(z*Y.cols+ie)*S.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(ie,z,w.NULL_CELL_CODE,0,0,0,w.NULL_CELL_CHAR,0,0),this._model.cells[q]=w.NULL_CELL_CODE,this._model.cells[q+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[q+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[q+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;$e&&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(V,P){this._canvas.width===V&&this._canvas.height===P||(this._canvas.width=V,this._canvas.height=P,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const V=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:V,end:V})}}s.WebglRenderer=j;class A extends p.AttributeData{constructor(V,P,Y){super(),this.content=0,this.combinedData="",this.fg=V.fg,this.bg=V.bg,this.combinedData=P,this._width=Y}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(V){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function O(H,V,P=0){return Math.max(Math.min(H,V),P)}s.JoinedCellData=A},381:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.GLTexture=s.expandFloat32Array=s.createShader=s.createProgram=s.PROJECTION_MATRIX=void 0;const f=u(374);function g(d,y,N){const k=(0,f.throwIfFalsy)(d.createShader(y));if(d.shaderSource(k,N),d.compileShader(k),d.getShaderParameter(k,d.COMPILE_STATUS))return k;console.error(d.getShaderInfoLog(k)),d.deleteShader(k)}s.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),s.createProgram=function(d,y,N){const k=(0,f.throwIfFalsy)(d.createProgram());if(d.attachShader(k,(0,f.throwIfFalsy)(g(d,d.VERTEX_SHADER,y))),d.attachShader(k,(0,f.throwIfFalsy)(g(d,d.FRAGMENT_SHADER,N))),d.linkProgram(k),d.getProgramParameter(k,d.LINK_STATUS))return k;console.error(d.getProgramInfoLog(k)),d.deleteProgram(k)},s.createShader=g,s.expandFloat32Array=function(d,y){const N=Math.min(2*d.length,y),k=new Float32Array(N);for(let b=0;b<d.length;b++)k[b]=d[b];return k},s.GLTexture=class{constructor(d){this.texture=d,this.version=-1}}},592:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BaseRenderLayer=void 0;const f=u(627),g=u(237),d=u(374),y=u(859);class N extends y.Disposable{constructor(b,c,p,v,w,C,T,S){super(),this._container=c,this._alpha=w,this._coreBrowserService=C,this._optionsService=T,this._themeService=S,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${p}-layer`),this._canvas.style.zIndex=v.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors(R=>{this._refreshCharAtlas(b,R),this.reset(b)})),this.register((0,y.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,d.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(b){}handleFocus(b){}handleCursorMove(b){}handleGridChanged(b,c,p){}handleSelectionChanged(b,c,p,v=!1){}_setTransparency(b,c){if(c===this._alpha)return;const p=this._canvas;this._alpha=c,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,p),this._refreshCharAtlas(b,this._themeService.colors),this.handleGridChanged(b,0,b.rows-1)}_refreshCharAtlas(b,c){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,f.acquireTextureAtlas)(b,this._optionsService.rawOptions,c,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(b,c){this._deviceCellWidth=c.device.cell.width,this._deviceCellHeight=c.device.cell.height,this._deviceCharWidth=c.device.char.width,this._deviceCharHeight=c.device.char.height,this._deviceCharLeft=c.device.char.left,this._deviceCharTop=c.device.char.top,this._canvas.width=c.device.canvas.width,this._canvas.height=c.device.canvas.height,this._canvas.style.width=`${c.css.canvas.width}px`,this._canvas.style.height=`${c.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(b,this._themeService.colors)}_fillBottomLineAtCells(b,c,p=1){this._ctx.fillRect(b*this._deviceCellWidth,(c+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,p*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,c,p,v){this._alpha?this._ctx.clearRect(b*this._deviceCellWidth,c*this._deviceCellHeight,p*this._deviceCellWidth,v*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(b*this._deviceCellWidth,c*this._deviceCellHeight,p*this._deviceCellWidth,v*this._deviceCellHeight))}_fillCharTrueColor(b,c,p,v){this._ctx.font=this._getFont(b,!1,!1),this._ctx.textBaseline=g.TEXT_BASELINE,this._clipCell(p,v,c.getWidth()),this._ctx.fillText(c.getChars(),p*this._deviceCellWidth+this._deviceCharLeft,v*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(b,c,p){this._ctx.beginPath(),this._ctx.rect(b*this._deviceCellWidth,c*this._deviceCellHeight,p*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(b,c,p){return`${p?"italic":""} ${c?b.options.fontWeightBold:b.options.fontWeight} ${b.options.fontSize*this._coreBrowserService.dpr}px ${b.options.fontFamily}`}}s.BaseRenderLayer=N},733:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.LinkRenderLayer=void 0;const f=u(197),g=u(237),d=u(592);class y extends d.BaseRenderLayer{constructor(k,b,c,p,v,w,C){super(c,k,"link",b,!0,v,w,C),this.register(p.onShowLinkUnderline(T=>this._handleShowLinkUnderline(T))),this.register(p.onHideLinkUnderline(T=>this._handleHideLinkUnderline(T)))}resize(k,b){super.resize(k,b),this._state=void 0}reset(k){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const k=this._state.y2-this._state.y1-1;k>0&&this._clearCells(0,this._state.y1+1,this._state.cols,k),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(k){if(k.fg===g.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:k.fg!==void 0&&(0,f.is256Color)(k.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[k.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,k.y1===k.y2)this._fillBottomLineAtCells(k.x1,k.y1,k.x2-k.x1);else{this._fillBottomLineAtCells(k.x1,k.y1,k.cols-k.x1);for(let b=k.y1+1;b<k.y2;b++)this._fillBottomLineAtCells(0,b,k.cols);this._fillBottomLineAtCells(0,k.y2,k.x2)}this._state=k}_handleHideLinkUnderline(k){this._clearCurrentLink()}}s.LinkRenderLayer=y},820:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.addDisposableDomListener=void 0,s.addDisposableDomListener=function(u,f,g,d){u.addEventListener(f,g,d);let y=!1;return{dispose:()=>{y||(y=!0,u.removeEventListener(f,g,d))}}}},274:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CellColorResolver=void 0;const f=u(855),g=u(160),d=u(374);let y,N=0,k=0,b=!1,c=!1,p=!1,v=0;s.CellColorResolver=class{constructor(w,C,T,S,R,j){this._terminal=w,this._optionService=C,this._selectionRenderModel=T,this._decorationService=S,this._coreBrowserService=R,this._themeService=j,this.result={fg:0,bg:0,ext:0}}resolve(w,C,T,S){if(this.result.bg=w.bg,this.result.fg=w.fg,this.result.ext=268435456&w.bg?w.extended.ext:0,k=0,N=0,c=!1,b=!1,p=!1,y=this._themeService.colors,v=0,w.getCode()!==f.NULL_CELL_CODE&&w.extended.underlineStyle===4){const R=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));v=C*S%(2*Math.round(R))}if(this._decorationService.forEachDecorationAtCell(C,T,"bottom",R=>{R.backgroundColorRGB&&(k=R.backgroundColorRGB.rgba>>8&16777215,c=!0),R.foregroundColorRGB&&(N=R.foregroundColorRGB.rgba>>8&16777215,b=!0)}),p=this._selectionRenderModel.isCellSelected(this._terminal,C,T),p){if(67108864&this.result.fg||50331648&this.result.bg){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:k=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:k=(16777215&this.result.fg)<<8|255;break;default:k=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:k=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:k=(16777215&this.result.bg)<<8|255}k=g.rgba.blend(k,4294967040&(this._coreBrowserService.isFocused?y.selectionBackgroundOpaque:y.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else k=(this._coreBrowserService.isFocused?y.selectionBackgroundOpaque:y.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(c=!0,y.selectionForeground&&(N=y.selectionForeground.rgba>>8&16777215,b=!0),(0,d.treatGlyphAsBackgroundColor)(w.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))N=(this._coreBrowserService.isFocused?y.selectionBackgroundOpaque:y.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=g.rgba.blend(N,4294967040&(this._coreBrowserService.isFocused?y.selectionBackgroundOpaque:y.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}b=!0}}this._decorationService.forEachDecorationAtCell(C,T,"top",R=>{R.backgroundColorRGB&&(k=R.backgroundColorRGB.rgba>>8&16777215,c=!0),R.foregroundColorRGB&&(N=R.foregroundColorRGB.rgba>>8&16777215,b=!0)}),c&&(k=p?-16777216&w.bg&-134217729|k|50331648:-16777216&w.bg|k|50331648),b&&(N=-16777216&w.fg&-67108865|N|50331648),67108864&this.result.fg&&(c&&!b&&(N=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&y.background.rgba>>8|50331648,b=!0),!c&&b&&(k=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&y.foreground.rgba>>8|50331648,c=!0)),y=void 0,this.result.bg=c?k:this.result.bg,this.result.fg=b?N:this.result.fg,this.result.ext&=536870911,this.result.ext|=v<<29&3758096384}}},627:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.removeTerminalFromCache=s.acquireTextureAtlas=void 0;const f=u(509),g=u(197),d=[];s.acquireTextureAtlas=function(y,N,k,b,c,p,v,w){const C=(0,g.generateConfig)(b,c,p,v,N,k,w);for(let R=0;R<d.length;R++){const j=d[R],A=j.ownedBy.indexOf(y);if(A>=0){if((0,g.configEquals)(j.config,C))return j.atlas;j.ownedBy.length===1?(j.atlas.dispose(),d.splice(R,1)):j.ownedBy.splice(A,1);break}}for(let R=0;R<d.length;R++){const j=d[R];if((0,g.configEquals)(j.config,C))return j.ownedBy.push(y),j.atlas}const T=y._core,S={atlas:new f.TextureAtlas(document,C,T.unicodeService),config:C,ownedBy:[y]};return d.push(S),S.atlas},s.removeTerminalFromCache=function(y){for(let N=0;N<d.length;N++){const k=d[N].ownedBy.indexOf(y);if(k!==-1){d[N].ownedBy.length===1?(d[N].atlas.dispose(),d.splice(N,1)):d[N].ownedBy.splice(k,1);break}}}},197:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.is256Color=s.configEquals=s.generateConfig=void 0;const f=u(160);s.generateConfig=function(g,d,y,N,k,b,c){const p={foreground:b.foreground,background:b.background,cursor:f.NULL_COLOR,cursorAccent:f.NULL_COLOR,selectionForeground:f.NULL_COLOR,selectionBackgroundTransparent:f.NULL_COLOR,selectionBackgroundOpaque:f.NULL_COLOR,selectionInactiveBackgroundTransparent:f.NULL_COLOR,selectionInactiveBackgroundOpaque:f.NULL_COLOR,ansi:b.ansi.slice(),contrastCache:b.contrastCache,halfContrastCache:b.halfContrastCache};return{customGlyphs:k.customGlyphs,devicePixelRatio:c,letterSpacing:k.letterSpacing,lineHeight:k.lineHeight,deviceCellWidth:g,deviceCellHeight:d,deviceCharWidth:y,deviceCharHeight:N,fontFamily:k.fontFamily,fontSize:k.fontSize,fontWeight:k.fontWeight,fontWeightBold:k.fontWeightBold,allowTransparency:k.allowTransparency,drawBoldTextInBrightColors:k.drawBoldTextInBrightColors,minimumContrastRatio:k.minimumContrastRatio,colors:p}},s.configEquals=function(g,d){for(let y=0;y<g.colors.ansi.length;y++)if(g.colors.ansi[y].rgba!==d.colors.ansi[y].rgba)return!1;return g.devicePixelRatio===d.devicePixelRatio&&g.customGlyphs===d.customGlyphs&&g.lineHeight===d.lineHeight&&g.letterSpacing===d.letterSpacing&&g.fontFamily===d.fontFamily&&g.fontSize===d.fontSize&&g.fontWeight===d.fontWeight&&g.fontWeightBold===d.fontWeightBold&&g.allowTransparency===d.allowTransparency&&g.deviceCharWidth===d.deviceCharWidth&&g.deviceCharHeight===d.deviceCharHeight&&g.drawBoldTextInBrightColors===d.drawBoldTextInBrightColors&&g.minimumContrastRatio===d.minimumContrastRatio&&g.colors.foreground.rgba===d.colors.foreground.rgba&&g.colors.background.rgba===d.colors.background.rgba},s.is256Color=function(g){return(50331648&g)==16777216||(50331648&g)==33554432}},237:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.TEXT_BASELINE=s.DIM_OPACITY=s.INVERTED_DEFAULT_COLOR=void 0;const f=u(399);s.INVERTED_DEFAULT_COLOR=257,s.DIM_OPACITY=.5,s.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},457:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CursorBlinkStateManager=void 0,s.CursorBlinkStateManager=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,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(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,f>0)return void this._restartInterval(f)}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 f=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(f)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},u)}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:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.tryDrawCustomChar=s.powerlineDefinitions=s.boxDrawingDefinitions=s.blockElementDefinitions=void 0;const f=u(374);s.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 g={"░":[[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]]};s.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,c)=>`M0,${.5-c} L1,${.5-c} M0,${.5+c} L1,${.5+c}`},"║":{1:(b,c)=>`M${.5-b},0 L${.5-b},1 M${.5+b},0 L${.5+b},1`},"╒":{1:(b,c)=>`M.5,1 L.5,${.5-c} L1,${.5-c} M.5,${.5+c} L1,${.5+c}`},"╓":{1:(b,c)=>`M${.5-b},1 L${.5-b},.5 L1,.5 M${.5+b},.5 L${.5+b},1`},"╔":{1:(b,c)=>`M1,${.5-c} L${.5-b},${.5-c} L${.5-b},1 M1,${.5+c} L${.5+b},${.5+c} L${.5+b},1`},"╕":{1:(b,c)=>`M0,${.5-c} L.5,${.5-c} L.5,1 M0,${.5+c} L.5,${.5+c}`},"╖":{1:(b,c)=>`M${.5+b},1 L${.5+b},.5 L0,.5 M${.5-b},.5 L${.5-b},1`},"╗":{1:(b,c)=>`M0,${.5+c} L${.5-b},${.5+c} L${.5-b},1 M0,${.5-c} L${.5+b},${.5-c} L${.5+b},1`},"╘":{1:(b,c)=>`M.5,0 L.5,${.5+c} L1,${.5+c} M.5,${.5-c} L1,${.5-c}`},"╙":{1:(b,c)=>`M1,.5 L${.5-b},.5 L${.5-b},0 M${.5+b},.5 L${.5+b},0`},"╚":{1:(b,c)=>`M1,${.5-c} L${.5+b},${.5-c} L${.5+b},0 M1,${.5+c} L${.5-b},${.5+c} L${.5-b},0`},"╛":{1:(b,c)=>`M0,${.5+c} L.5,${.5+c} L.5,0 M0,${.5-c} L.5,${.5-c}`},"╜":{1:(b,c)=>`M0,.5 L${.5+b},.5 L${.5+b},0 M${.5-b},.5 L${.5-b},0`},"╝":{1:(b,c)=>`M0,${.5-c} L${.5-b},${.5-c} L${.5-b},0 M0,${.5+c} L${.5+b},${.5+c} L${.5+b},0`},"╞":{1:(b,c)=>`M.5,0 L.5,1 M.5,${.5-c} L1,${.5-c} M.5,${.5+c} L1,${.5+c}`},"╟":{1:(b,c)=>`M${.5-b},0 L${.5-b},1 M${.5+b},0 L${.5+b},1 M${.5+b},.5 L1,.5`},"╠":{1:(b,c)=>`M${.5-b},0 L${.5-b},1 M1,${.5+c} L${.5+b},${.5+c} L${.5+b},1 M1,${.5-c} L${.5+b},${.5-c} L${.5+b},0`},"╡":{1:(b,c)=>`M.5,0 L.5,1 M0,${.5-c} L.5,${.5-c} M0,${.5+c} L.5,${.5+c}`},"╢":{1:(b,c)=>`M0,.5 L${.5-b},.5 M${.5-b},0 L${.5-b},1 M${.5+b},0 L${.5+b},1`},"╣":{1:(b,c)=>`M${.5+b},0 L${.5+b},1 M0,${.5+c} L${.5-b},${.5+c} L${.5-b},1 M0,${.5-c} L${.5-b},${.5-c} L${.5-b},0`},"╤":{1:(b,c)=>`M0,${.5-c} L1,${.5-c} M0,${.5+c} L1,${.5+c} M.5,${.5+c} L.5,1`},"╥":{1:(b,c)=>`M0,.5 L1,.5 M${.5-b},.5 L${.5-b},1 M${.5+b},.5 L${.5+b},1`},"╦":{1:(b,c)=>`M0,${.5-c} L1,${.5-c} M0,${.5+c} L${.5-b},${.5+c} L${.5-b},1 M1,${.5+c} L${.5+b},${.5+c} L${.5+b},1`},"╧":{1:(b,c)=>`M.5,0 L.5,${.5-c} M0,${.5-c} L1,${.5-c} M0,${.5+c} L1,${.5+c}`},"╨":{1:(b,c)=>`M0,.5 L1,.5 M${.5-b},.5 L${.5-b},0 M${.5+b},.5 L${.5+b},0`},"╩":{1:(b,c)=>`M0,${.5+c} L1,${.5+c} M0,${.5-c} L${.5-b},${.5-c} L${.5-b},0 M1,${.5-c} L${.5+b},${.5-c} L${.5+b},0`},"╪":{1:(b,c)=>`M.5,0 L.5,1 M0,${.5-c} L1,${.5-c} M0,${.5+c} L1,${.5+c}`},"╫":{1:(b,c)=>`M0,.5 L1,.5 M${.5-b},0 L${.5-b},1 M${.5+b},0 L${.5+b},1`},"╬":{1:(b,c)=>`M0,${.5+c} L${.5-b},${.5+c} L${.5-b},1 M1,${.5+c} L${.5+b},${.5+c} L${.5+b},1 M0,${.5-c} L${.5-b},${.5-c} L${.5-b},0 M1,${.5-c} L${.5+b},${.5-c} 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,c)=>`M.5,1 L.5,${.5+c/.15*.5} C.5,${.5+c/.15*.5},.5,.5,1,.5`},"╮":{1:(b,c)=>`M.5,1 L.5,${.5+c/.15*.5} C.5,${.5+c/.15*.5},.5,.5,0,.5`},"╯":{1:(b,c)=>`M.5,0 L.5,${.5-c/.15*.5} C.5,${.5-c/.15*.5},.5,.5,0,.5`},"╰":{1:(b,c)=>`M.5,0 L.5,${.5-c/.15*.5} C.5,${.5-c/.15*.5},.5,.5,1,.5`}},s.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}},s.powerlineDefinitions[""]=s.powerlineDefinitions[""],s.powerlineDefinitions[""]=s.powerlineDefinitions[""],s.tryDrawCustomChar=function(b,c,p,v,w,C,T,S){const R=s.blockElementDefinitions[c];if(R)return function(H,V,P,Y,Q,z){for(let X=0;X<V.length;X++){const K=V[X],B=Q/8,F=z/8;H.fillRect(P+K.x*B,Y+K.y*F,K.w*B,K.h*F)}}(b,R,p,v,w,C),!0;const j=g[c];if(j)return function(H,V,P,Y,Q,z){let X=d.get(V);X||(X=new Map,d.set(V,X));const K=H.fillStyle;if(typeof K!="string")throw new Error(`Unexpected fillStyle type "${K}"`);let B=X.get(K);if(!B){const F=V[0].length,G=V.length,Z=H.canvas.ownerDocument.createElement("canvas");Z.width=F,Z.height=G;const ae=(0,f.throwIfFalsy)(Z.getContext("2d")),me=new ImageData(F,G);let Ue,De,ie,q;if(K.startsWith("#"))Ue=parseInt(K.slice(1,3),16),De=parseInt(K.slice(3,5),16),ie=parseInt(K.slice(5,7),16),q=K.length>7&&parseInt(K.slice(7,9),16)||1;else{if(!K.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${K}" when drawing pattern glyph`);[Ue,De,ie,q]=K.substring(5,K.length-1).split(",").map(fe=>parseFloat(fe))}for(let fe=0;fe<G;fe++)for(let le=0;le<F;le++)me.data[4*(fe*F+le)]=Ue,me.data[4*(fe*F+le)+1]=De,me.data[4*(fe*F+le)+2]=ie,me.data[4*(fe*F+le)+3]=V[fe][le]*(255*q);ae.putImageData(me,0,0),B=(0,f.throwIfFalsy)(H.createPattern(Z,null)),X.set(K,B)}H.fillStyle=B,H.fillRect(P,Y,Q,z)}(b,j,p,v,w,C),!0;const A=s.boxDrawingDefinitions[c];if(A)return function(H,V,P,Y,Q,z,X){H.strokeStyle=H.fillStyle;for(const[K,B]of Object.entries(V)){let F;H.beginPath(),H.lineWidth=X*Number.parseInt(K),F=typeof B=="function"?B(.15,.15/z*Q):B;for(const G of F.split(" ")){const Z=G[0],ae=N[Z];if(!ae){console.error(`Could not find drawing instructions for "${Z}"`);continue}const me=G.substring(1).split(",");me[0]&&me[1]&&ae(H,k(me,Q,z,P,Y,!0,X))}H.stroke(),H.closePath()}}(b,A,p,v,w,C,S),!0;const O=s.powerlineDefinitions[c];return!!O&&(function(H,V,P,Y,Q,z,X,K){const B=new Path2D;B.rect(P,Y,Q,z),H.clip(B),H.beginPath();const F=X/12;H.lineWidth=K*F;for(const G of V.d.split(" ")){const Z=G[0],ae=N[Z];if(!ae){console.error(`Could not find drawing instructions for "${Z}"`);continue}const me=G.substring(1).split(",");me[0]&&me[1]&&ae(H,k(me,Q,z,P,Y,!1,K,(V.leftPadding??0)*(F/2),(V.rightPadding??0)*(F/2)))}V.type===1?(H.strokeStyle=H.fillStyle,H.stroke()):H.fill(),H.closePath()}(b,O,p,v,w,C,T,S),!0)};const d=new Map;function y(b,c,p=0){return Math.max(Math.min(b,c),p)}const N={C:(b,c)=>b.bezierCurveTo(c[0],c[1],c[2],c[3],c[4],c[5]),L:(b,c)=>b.lineTo(c[0],c[1]),M:(b,c)=>b.moveTo(c[0],c[1])};function k(b,c,p,v,w,C,T,S=0,R=0){const j=b.map(A=>parseFloat(A)||parseInt(A));if(j.length<2)throw new Error("Too few arguments for instruction");for(let A=0;A<j.length;A+=2)j[A]*=c-S*T-R*T,C&&j[A]!==0&&(j[A]=y(Math.round(j[A]+.5)-.5,c,0)),j[A]+=v+S*T;for(let A=1;A<j.length;A+=2)j[A]*=p,C&&j[A]!==0&&(j[A]=y(Math.round(j[A]+.5)-.5,p,0)),j[A]+=w;return j}},56:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.observeDevicePixelDimensions=void 0;const f=u(859);s.observeDevicePixelDimensions=function(g,d,y){let N=new d.ResizeObserver(k=>{const b=k.find(v=>v.target===g);if(!b)return;if(!("devicePixelContentBoxSize"in b))return N==null||N.disconnect(),void(N=void 0);const c=b.devicePixelContentBoxSize[0].inlineSize,p=b.devicePixelContentBoxSize[0].blockSize;c>0&&p>0&&y(c,p)});try{N.observe(g,{box:["device-pixel-content-box"]})}catch{N.disconnect(),N=void 0}return(0,f.toDisposable)(()=>N==null?void 0:N.disconnect())}},374:(_,s)=>{function u(g){return 57508<=g&&g<=57558}function f(g){return g>=128512&&g<=128591||g>=127744&&g<=128511||g>=128640&&g<=128767||g>=9728&&g<=9983||g>=9984&&g<=10175||g>=65024&&g<=65039||g>=129280&&g<=129535||g>=127462&&g<=127487}Object.defineProperty(s,"__esModule",{value:!0}),s.computeNextVariantOffset=s.createRenderDimensions=s.treatGlyphAsBackgroundColor=s.allowRescaling=s.isEmoji=s.isRestrictedPowerlineGlyph=s.isPowerlineGlyph=s.throwIfFalsy=void 0,s.throwIfFalsy=function(g){if(!g)throw new Error("value must not be falsy");return g},s.isPowerlineGlyph=u,s.isRestrictedPowerlineGlyph=function(g){return 57520<=g&&g<=57527},s.isEmoji=f,s.allowRescaling=function(g,d,y,N){return d===1&&y>Math.ceil(1.5*N)&&g!==void 0&&g>255&&!f(g)&&!u(g)&&!function(k){return 57344<=k&&k<=63743}(g)},s.treatGlyphAsBackgroundColor=function(g){return u(g)||function(d){return 9472<=d&&d<=9631}(g)},s.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}}}},s.computeNextVariantOffset=function(g,d,y=0){return(g-(2*Math.round(d)-y))%(2*Math.round(d))}},296:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.createSelectionRenderModel=void 0;class u{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(g,d,y,N=!1){if(this.selectionStart=d,this.selectionEnd=y,!d||!y||d[0]===y[0]&&d[1]===y[1])return void this.clear();const k=g.buffers.active.ydisp,b=d[1]-k,c=y[1]-k,p=Math.max(b,0),v=Math.min(c,g.rows-1);p>=g.rows||v<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=N,this.viewportStartRow=b,this.viewportEndRow=c,this.viewportCappedStartRow=p,this.viewportCappedEndRow=v,this.startCol=d[0],this.endCol=y[0])}isCellSelected(g,d,y){return!!this.hasSelection&&(y-=g.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?d>=this.startCol&&y>=this.viewportCappedStartRow&&d<this.endCol&&y<=this.viewportCappedEndRow:d<this.startCol&&y>=this.viewportCappedStartRow&&d>=this.endCol&&y<=this.viewportCappedEndRow:y>this.viewportStartRow&&y<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&y===this.viewportStartRow&&d>=this.startCol&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&y===this.viewportEndRow&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&y===this.viewportStartRow&&d>=this.startCol)}}s.createSelectionRenderModel=function(){return new u}},509:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.TextureAtlas=void 0;const f=u(237),g=u(860),d=u(374),y=u(160),N=u(345),k=u(485),b=u(385),c=u(147),p=u(855),v={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 w;class C{get pages(){return this._pages}constructor(A,O,H){this._document=A,this._config=O,this._unicodeService=H,this._didWarmUp=!1,this._cacheMap=new k.FourKeyMap,this._cacheMapCombined=new k.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new c.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=R(A,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,d.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const A of this.pages)A.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const A=new b.IdleTaskQueue;for(let O=33;O<126;O++)A.enqueue(()=>{if(!this._cacheMap.get(O,p.DEFAULT_COLOR,p.DEFAULT_COLOR,p.DEFAULT_EXT)){const H=this._drawToCache(O,p.DEFAULT_COLOR,p.DEFAULT_COLOR,p.DEFAULT_EXT);this._cacheMap.set(O,p.DEFAULT_COLOR,p.DEFAULT_COLOR,p.DEFAULT_EXT,H)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const A of this._pages)A.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(C.maxAtlasPages&&this._pages.length>=Math.max(4,C.maxAtlasPages)){const O=this._pages.filter(X=>2*X.canvas.width<=(C.maxTextureSize||4096)).sort((X,K)=>K.canvas.width!==X.canvas.width?K.canvas.width-X.canvas.width:K.percentageUsed-X.percentageUsed);let H=-1,V=0;for(let X=0;X<O.length;X++)if(O[X].canvas.width!==V)H=X,V=O[X].canvas.width;else if(X-H==3)break;const P=O.slice(H,H+4),Y=P.map(X=>X.glyphs[0].texturePage).sort((X,K)=>X>K?1:-1),Q=this.pages.length-P.length,z=this._mergePages(P,Q);z.version++;for(let X=Y.length-1;X>=0;X--)this._deletePage(Y[X]);this.pages.push(z),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(z.canvas)}const A=new T(this._document,this._textureSize);return this._pages.push(A),this._activePages.push(A),this._onAddTextureAtlasCanvas.fire(A.canvas),A}_mergePages(A,O){const H=2*A[0].canvas.width,V=new T(this._document,H,A);for(const[P,Y]of A.entries()){const Q=P*Y.canvas.width%H,z=Math.floor(P/2)*Y.canvas.height;V.ctx.drawImage(Y.canvas,Q,z);for(const K of Y.glyphs)K.texturePage=O,K.sizeClipSpace.x=K.size.x/H,K.sizeClipSpace.y=K.size.y/H,K.texturePosition.x+=Q,K.texturePosition.y+=z,K.texturePositionClipSpace.x=K.texturePosition.x/H,K.texturePositionClipSpace.y=K.texturePosition.y/H;this._onRemoveTextureAtlasCanvas.fire(Y.canvas);const X=this._activePages.indexOf(Y);X!==-1&&this._activePages.splice(X,1)}return V}_deletePage(A){this._pages.splice(A,1);for(let O=A;O<this._pages.length;O++){const H=this._pages[O];for(const V of H.glyphs)V.texturePage--;H.version++}}getRasterizedGlyphCombinedChar(A,O,H,V,P){return this._getFromCacheMap(this._cacheMapCombined,A,O,H,V,P)}getRasterizedGlyph(A,O,H,V,P){return this._getFromCacheMap(this._cacheMap,A,O,H,V,P)}_getFromCacheMap(A,O,H,V,P,Y=!1){return w=A.get(O,H,V,P),w||(w=this._drawToCache(O,H,V,P,Y),A.set(O,H,V,P,w)),w}_getColorFromAnsiIndex(A){if(A>=this._config.colors.ansi.length)throw new Error("No color found for idx "+A);return this._config.colors.ansi[A]}_getBackgroundColor(A,O,H,V){if(this._config.allowTransparency)return y.NULL_COLOR;let P;switch(A){case 16777216:case 33554432:P=this._getColorFromAnsiIndex(O);break;case 50331648:const Y=c.AttributeData.toColorRGB(O);P=y.channels.toColor(Y[0],Y[1],Y[2]);break;default:P=H?y.color.opaque(this._config.colors.foreground):this._config.colors.background}return P}_getForegroundColor(A,O,H,V,P,Y,Q,z,X,K){const B=this._getMinimumContrastColor(A,O,H,V,P,Y,Q,X,z,K);if(B)return B;let F;switch(P){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&X&&Y<8&&(Y+=8),F=this._getColorFromAnsiIndex(Y);break;case 50331648:const G=c.AttributeData.toColorRGB(Y);F=y.channels.toColor(G[0],G[1],G[2]);break;default:F=Q?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(F=y.color.opaque(F)),z&&(F=y.color.multiplyOpacity(F,f.DIM_OPACITY)),F}_resolveBackgroundRgba(A,O,H){switch(A){case 16777216:case 33554432:return this._getColorFromAnsiIndex(O).rgba;case 50331648:return O<<8;default:return H?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(A,O,H,V){switch(A){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&V&&O<8&&(O+=8),this._getColorFromAnsiIndex(O).rgba;case 50331648:return O<<8;default:return H?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(A,O,H,V,P,Y,Q,z,X,K){if(this._config.minimumContrastRatio===1||K)return;const B=this._getContrastCache(X),F=B.getColor(A,V);if(F!==void 0)return F||void 0;const G=this._resolveBackgroundRgba(O,H,Q),Z=this._resolveForegroundRgba(P,Y,Q,z),ae=y.rgba.ensureContrastRatio(G,Z,this._config.minimumContrastRatio/(X?2:1));if(!ae)return void B.setColor(A,V,null);const me=y.channels.toColor(ae>>24&255,ae>>16&255,ae>>8&255);return B.setColor(A,V,me),me}_getContrastCache(A){return A?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(A,O,H,V,P=!1){const Y=typeof A=="number"?String.fromCharCode(A):A,Q=Math.min(this._config.deviceCellWidth*Math.max(Y.length,2)+4,this._textureSize);this._tmpCanvas.width<Q&&(this._tmpCanvas.width=Q);const z=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<z&&(this._tmpCanvas.height=z),this._tmpCtx.save(),this._workAttributeData.fg=H,this._workAttributeData.bg=O,this._workAttributeData.extended.ext=V,this._workAttributeData.isInvisible())return v;const X=!!this._workAttributeData.isBold(),K=!!this._workAttributeData.isInverse(),B=!!this._workAttributeData.isDim(),F=!!this._workAttributeData.isItalic(),G=!!this._workAttributeData.isUnderline(),Z=!!this._workAttributeData.isStrikethrough(),ae=!!this._workAttributeData.isOverline();let me=this._workAttributeData.getFgColor(),Ue=this._workAttributeData.getFgColorMode(),De=this._workAttributeData.getBgColor(),ie=this._workAttributeData.getBgColorMode();if(K){const Ve=me;me=De,De=Ve;const tt=Ue;Ue=ie,ie=tt}const q=this._getBackgroundColor(ie,De,K,B);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=q.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const fe=X?this._config.fontWeightBold:this._config.fontWeight,le=F?"italic":"";this._tmpCtx.font=`${le} ${fe} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const Oe=Y.length===1&&(0,d.isPowerlineGlyph)(Y.charCodeAt(0)),ke=Y.length===1&&(0,d.isRestrictedPowerlineGlyph)(Y.charCodeAt(0)),nt=this._getForegroundColor(O,ie,De,H,Ue,me,K,B,X,(0,d.treatGlyphAsBackgroundColor)(Y.charCodeAt(0)));this._tmpCtx.fillStyle=nt.css;const xe=ke?0:4;let $e=!1;this._config.customGlyphs!==!1&&($e=(0,g.tryDrawCustomChar)(this._tmpCtx,Y,xe,xe,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let at,Ge=!Oe;if(at=typeof A=="number"?this._unicodeService.wcwidth(A):this._unicodeService.getStringCellWidth(A),G){this._tmpCtx.save();const Ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),tt=Ve%2==1?.5:0;if(this._tmpCtx.lineWidth=Ve,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Ge=!1,this._tmpCtx.strokeStyle=`rgb(${c.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Ge=!1;let ye=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&ye<8&&(ye+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(ye).css}this._tmpCtx.beginPath();const ot=xe,bt=Math.ceil(xe+this._config.deviceCharHeight)-tt-(P?2*Ve:0),ve=bt+Ve,Ne=bt+2*Ve;let Qe=this._workAttributeData.getUnderlineVariantOffset();for(let ye=0;ye<at;ye++){this._tmpCtx.save();const Fe=ot+ye*this._config.deviceCellWidth,ze=ot+(ye+1)*this._config.deviceCellWidth,Nt=Fe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Fe,bt),this._tmpCtx.lineTo(ze,bt),this._tmpCtx.moveTo(Fe,Ne),this._tmpCtx.lineTo(ze,Ne);break;case 3:const Wt=Ve<=1?Ne:Math.ceil(xe+this._config.deviceCharHeight-Ve/2)-tt,Gt=Ve<=1?bt:Math.ceil(xe+this._config.deviceCharHeight+Ve/2)-tt,Qt=new Path2D;Qt.rect(Fe,bt,this._config.deviceCellWidth,Ne-bt),this._tmpCtx.clip(Qt),this._tmpCtx.moveTo(Fe-this._config.deviceCellWidth/2,ve),this._tmpCtx.bezierCurveTo(Fe-this._config.deviceCellWidth/2,Gt,Fe,Gt,Fe,ve),this._tmpCtx.bezierCurveTo(Fe,Wt,Nt,Wt,Nt,ve),this._tmpCtx.bezierCurveTo(Nt,Gt,ze,Gt,ze,ve),this._tmpCtx.bezierCurveTo(ze,Wt,ze+this._config.deviceCellWidth/2,Wt,ze+this._config.deviceCellWidth/2,ve);break;case 4:const Rn=Qe===0?0:Qe>=Ve?2*Ve-Qe:Ve-Qe;Qe>=Ve||Rn===0?(this._tmpCtx.setLineDash([Math.round(Ve),Math.round(Ve)]),this._tmpCtx.moveTo(Fe+Rn,bt),this._tmpCtx.lineTo(ze,bt)):(this._tmpCtx.setLineDash([Math.round(Ve),Math.round(Ve)]),this._tmpCtx.moveTo(Fe,bt),this._tmpCtx.lineTo(Fe+Rn,bt),this._tmpCtx.moveTo(Fe+Rn+Ve,bt),this._tmpCtx.lineTo(ze,bt)),Qe=(0,d.computeNextVariantOffset)(ze-Fe,Ve,Qe);break;case 5:const we=.6,Ye=.3,J=ze-Fe,lt=Math.floor(we*J),it=Math.floor(Ye*J),Pt=J-lt-it;this._tmpCtx.setLineDash([lt,it,Pt]),this._tmpCtx.moveTo(Fe,bt),this._tmpCtx.lineTo(ze,bt);break;default:this._tmpCtx.moveTo(Fe,bt),this._tmpCtx.lineTo(ze,bt)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!$e&&this._config.fontSize>=12&&!this._config.allowTransparency&&Y!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const ye=this._tmpCtx.measureText(Y);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in ye&&ye.actualBoundingBoxDescent>0){this._tmpCtx.save();const Fe=new Path2D;Fe.rect(ot,bt-Math.ceil(Ve/2),this._config.deviceCellWidth*at,Ne-bt+Math.ceil(Ve/2)),this._tmpCtx.clip(Fe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=q.css,this._tmpCtx.strokeText(Y,xe,xe+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(ae){const Ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),tt=Ve%2==1?.5:0;this._tmpCtx.lineWidth=Ve,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(xe,xe+tt),this._tmpCtx.lineTo(xe+this._config.deviceCharWidth*at,xe+tt),this._tmpCtx.stroke()}if($e||this._tmpCtx.fillText(Y,xe,xe+this._config.deviceCharHeight),Y==="_"&&!this._config.allowTransparency){let Ve=S(this._tmpCtx.getImageData(xe,xe,this._config.deviceCellWidth,this._config.deviceCellHeight),q,nt,Ge);if(Ve)for(let tt=1;tt<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=q.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(Y,xe,xe+this._config.deviceCharHeight-tt),Ve=S(this._tmpCtx.getImageData(xe,xe,this._config.deviceCellWidth,this._config.deviceCellHeight),q,nt,Ge),Ve);tt++);}if(Z){const Ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),tt=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=Ve,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(xe,xe+Math.floor(this._config.deviceCharHeight/2)-tt),this._tmpCtx.lineTo(xe+this._config.deviceCharWidth*at,xe+Math.floor(this._config.deviceCharHeight/2)-tt),this._tmpCtx.stroke()}this._tmpCtx.restore();const Ft=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Rt;if(Rt=this._config.allowTransparency?function(Ve){for(let tt=0;tt<Ve.data.length;tt+=4)if(Ve.data[tt+3]>0)return!1;return!0}(Ft):S(Ft,q,nt,Ge),Rt)return v;const oe=this._findGlyphBoundingBox(Ft,this._workBoundingBox,Q,ke,$e,xe);let Te,Ie;for(;;){if(this._activePages.length===0){const Ve=this._createNewPage();Te=Ve,Ie=Ve.currentRow,Ie.height=oe.size.y;break}Te=this._activePages[this._activePages.length-1],Ie=Te.currentRow;for(const Ve of this._activePages)oe.size.y<=Ve.currentRow.height&&(Te=Ve,Ie=Ve.currentRow);for(let Ve=this._activePages.length-1;Ve>=0;Ve--)for(const tt of this._activePages[Ve].fixedRows)tt.height<=Ie.height&&oe.size.y<=tt.height&&(Te=this._activePages[Ve],Ie=tt);if(Ie.y+oe.size.y>=Te.canvas.height||Ie.height>oe.size.y+2){let Ve=!1;if(Te.currentRow.y+Te.currentRow.height+oe.size.y>=Te.canvas.height){let tt;for(const ot of this._activePages)if(ot.currentRow.y+ot.currentRow.height+oe.size.y<ot.canvas.height){tt=ot;break}if(tt)Te=tt;else if(C.maxAtlasPages&&this._pages.length>=C.maxAtlasPages&&Ie.y+oe.size.y<=Te.canvas.height&&Ie.height>=oe.size.y&&Ie.x+oe.size.x<=Te.canvas.width)Ve=!0;else{const ot=this._createNewPage();Te=ot,Ie=ot.currentRow,Ie.height=oe.size.y,Ve=!0}}Ve||(Te.currentRow.height>0&&Te.fixedRows.push(Te.currentRow),Ie={x:0,y:Te.currentRow.y+Te.currentRow.height,height:oe.size.y},Te.fixedRows.push(Ie),Te.currentRow={x:0,y:Ie.y+Ie.height,height:0})}if(Ie.x+oe.size.x<=Te.canvas.width)break;Ie===Te.currentRow?(Ie.x=0,Ie.y+=Ie.height,Ie.height=0):Te.fixedRows.splice(Te.fixedRows.indexOf(Ie),1)}return oe.texturePage=this._pages.indexOf(Te),oe.texturePosition.x=Ie.x,oe.texturePosition.y=Ie.y,oe.texturePositionClipSpace.x=Ie.x/Te.canvas.width,oe.texturePositionClipSpace.y=Ie.y/Te.canvas.height,oe.sizeClipSpace.x/=Te.canvas.width,oe.sizeClipSpace.y/=Te.canvas.height,Ie.height=Math.max(Ie.height,oe.size.y),Ie.x+=oe.size.x,Te.ctx.putImageData(Ft,oe.texturePosition.x-this._workBoundingBox.left,oe.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,oe.size.x,oe.size.y),Te.addGlyph(oe),Te.version++,oe}_findGlyphBoundingBox(A,O,H,V,P,Y){O.top=0;const Q=V?this._config.deviceCellHeight:this._tmpCanvas.height,z=V?this._config.deviceCellWidth:H;let X=!1;for(let K=0;K<Q;K++){for(let B=0;B<z;B++){const F=K*this._tmpCanvas.width*4+4*B+3;if(A.data[F]!==0){O.top=K,X=!0;break}}if(X)break}O.left=0,X=!1;for(let K=0;K<Y+z;K++){for(let B=0;B<Q;B++){const F=B*this._tmpCanvas.width*4+4*K+3;if(A.data[F]!==0){O.left=K,X=!0;break}}if(X)break}O.right=z,X=!1;for(let K=Y+z-1;K>=Y;K--){for(let B=0;B<Q;B++){const F=B*this._tmpCanvas.width*4+4*K+3;if(A.data[F]!==0){O.right=K,X=!0;break}}if(X)break}O.bottom=Q,X=!1;for(let K=Q-1;K>=0;K--){for(let B=0;B<z;B++){const F=K*this._tmpCanvas.width*4+4*B+3;if(A.data[F]!==0){O.bottom=K,X=!0;break}}if(X)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+Y+(V||P?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-O.top+Y+(V||P?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}s.TextureAtlas=C;class T{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(A){this._glyphs.push(A),this._usedPixels+=A.size.x*A.size.y}constructor(A,O,H){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],H)for(const V of H)this._glyphs.push(...V.glyphs),this._usedPixels+=V._usedPixels;this.canvas=R(A,O,O),this.ctx=(0,d.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function S(j,A,O,H){const V=A.rgba>>>24,P=A.rgba>>>16&255,Y=A.rgba>>>8&255,Q=O.rgba>>>24,z=O.rgba>>>16&255,X=O.rgba>>>8&255,K=Math.floor((Math.abs(V-Q)+Math.abs(P-z)+Math.abs(Y-X))/12);let B=!0;for(let F=0;F<j.data.length;F+=4)j.data[F]===V&&j.data[F+1]===P&&j.data[F+2]===Y||H&&Math.abs(j.data[F]-V)+Math.abs(j.data[F+1]-P)+Math.abs(j.data[F+2]-Y)<K?j.data[F+3]=0:B=!1;return B}function R(j,A,O){const H=j.createElement("canvas");return H.width=A,H.height=O,H}},160:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.contrastRatio=s.toPaddedHex=s.rgba=s.rgb=s.css=s.color=s.channels=s.NULL_COLOR=void 0;let u=0,f=0,g=0,d=0;var y,N,k,b,c;function p(w){const C=w.toString(16);return C.length<2?"0"+C:C}function v(w,C){return w<C?(C+.05)/(w+.05):(w+.05)/(C+.05)}s.NULL_COLOR={css:"#00000000",rgba:0},function(w){w.toCss=function(C,T,S,R){return R!==void 0?`#${p(C)}${p(T)}${p(S)}${p(R)}`:`#${p(C)}${p(T)}${p(S)}`},w.toRgba=function(C,T,S,R=255){return(C<<24|T<<16|S<<8|R)>>>0},w.toColor=function(C,T,S,R){return{css:w.toCss(C,T,S,R),rgba:w.toRgba(C,T,S,R)}}}(y||(s.channels=y={})),function(w){function C(T,S){return d=Math.round(255*S),[u,f,g]=c.toChannels(T.rgba),{css:y.toCss(u,f,g,d),rgba:y.toRgba(u,f,g,d)}}w.blend=function(T,S){if(d=(255&S.rgba)/255,d===1)return{css:S.css,rgba:S.rgba};const R=S.rgba>>24&255,j=S.rgba>>16&255,A=S.rgba>>8&255,O=T.rgba>>24&255,H=T.rgba>>16&255,V=T.rgba>>8&255;return u=O+Math.round((R-O)*d),f=H+Math.round((j-H)*d),g=V+Math.round((A-V)*d),{css:y.toCss(u,f,g),rgba:y.toRgba(u,f,g)}},w.isOpaque=function(T){return(255&T.rgba)==255},w.ensureContrastRatio=function(T,S,R){const j=c.ensureContrastRatio(T.rgba,S.rgba,R);if(j)return y.toColor(j>>24&255,j>>16&255,j>>8&255)},w.opaque=function(T){const S=(255|T.rgba)>>>0;return[u,f,g]=c.toChannels(S),{css:y.toCss(u,f,g),rgba:S}},w.opacity=C,w.multiplyOpacity=function(T,S){return d=255&T.rgba,C(T,d*S/255)},w.toColorRGB=function(T){return[T.rgba>>24&255,T.rgba>>16&255,T.rgba>>8&255]}}(N||(s.color=N={})),function(w){let C,T;try{const S=document.createElement("canvas");S.width=1,S.height=1;const R=S.getContext("2d",{willReadFrequently:!0});R&&(C=R,C.globalCompositeOperation="copy",T=C.createLinearGradient(0,0,1,1))}catch{}w.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return u=parseInt(S.slice(1,2).repeat(2),16),f=parseInt(S.slice(2,3).repeat(2),16),g=parseInt(S.slice(3,4).repeat(2),16),y.toColor(u,f,g);case 5:return u=parseInt(S.slice(1,2).repeat(2),16),f=parseInt(S.slice(2,3).repeat(2),16),g=parseInt(S.slice(3,4).repeat(2),16),d=parseInt(S.slice(4,5).repeat(2),16),y.toColor(u,f,g,d);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const R=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(R)return u=parseInt(R[1]),f=parseInt(R[2]),g=parseInt(R[3]),d=Math.round(255*(R[5]===void 0?1:parseFloat(R[5]))),y.toColor(u,f,g,d);if(!C||!T)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=T,C.fillStyle=S,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[u,f,g,d]=C.getImageData(0,0,1,1).data,d!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:y.toRgba(u,f,g,d),css:S}}}(k||(s.css=k={})),function(w){function C(T,S,R){const j=T/255,A=S/255,O=R/255;return .2126*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.7152*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}w.relativeLuminance=function(T){return C(T>>16&255,T>>8&255,255&T)},w.relativeLuminance2=C}(b||(s.rgb=b={})),function(w){function C(S,R,j){const A=S>>24&255,O=S>>16&255,H=S>>8&255;let V=R>>24&255,P=R>>16&255,Y=R>>8&255,Q=v(b.relativeLuminance2(V,P,Y),b.relativeLuminance2(A,O,H));for(;Q<j&&(V>0||P>0||Y>0);)V-=Math.max(0,Math.ceil(.1*V)),P-=Math.max(0,Math.ceil(.1*P)),Y-=Math.max(0,Math.ceil(.1*Y)),Q=v(b.relativeLuminance2(V,P,Y),b.relativeLuminance2(A,O,H));return(V<<24|P<<16|Y<<8|255)>>>0}function T(S,R,j){const A=S>>24&255,O=S>>16&255,H=S>>8&255;let V=R>>24&255,P=R>>16&255,Y=R>>8&255,Q=v(b.relativeLuminance2(V,P,Y),b.relativeLuminance2(A,O,H));for(;Q<j&&(V<255||P<255||Y<255);)V=Math.min(255,V+Math.ceil(.1*(255-V))),P=Math.min(255,P+Math.ceil(.1*(255-P))),Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),Q=v(b.relativeLuminance2(V,P,Y),b.relativeLuminance2(A,O,H));return(V<<24|P<<16|Y<<8|255)>>>0}w.blend=function(S,R){if(d=(255&R)/255,d===1)return R;const j=R>>24&255,A=R>>16&255,O=R>>8&255,H=S>>24&255,V=S>>16&255,P=S>>8&255;return u=H+Math.round((j-H)*d),f=V+Math.round((A-V)*d),g=P+Math.round((O-P)*d),y.toRgba(u,f,g)},w.ensureContrastRatio=function(S,R,j){const A=b.relativeLuminance(S>>8),O=b.relativeLuminance(R>>8);if(v(A,O)<j){if(O<A){const P=C(S,R,j),Y=v(A,b.relativeLuminance(P>>8));if(Y<j){const Q=T(S,R,j);return Y>v(A,b.relativeLuminance(Q>>8))?P:Q}return P}const H=T(S,R,j),V=v(A,b.relativeLuminance(H>>8));if(V<j){const P=C(S,R,j);return V>v(A,b.relativeLuminance(P>>8))?H:P}return H}},w.reduceLuminance=C,w.increaseLuminance=T,w.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}}(c||(s.rgba=c={})),s.toPaddedHex=p,s.contrastRatio=v},345:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.runAndSubscribe=s.forwardEvent=s.EventEmitter=void 0,s.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const g=[];for(let d=0;d<this._listeners.length;d++)g.push(this._listeners[d]);for(let d=0;d<g.length;d++)g[d].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},s.forwardEvent=function(u,f){return u(g=>f.fire(g))},s.runAndSubscribe=function(u,f){return f(void 0),u(g=>f(g))}},859:(_,s)=>{function u(f){for(const g of f)g.dispose();f.length=0}Object.defineProperty(s,"__esModule",{value:!0}),s.getDisposeArrayDisposable=s.disposeArray=s.toDisposable=s.MutableDisposable=s.Disposable=void 0,s.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const g=this._disposables.indexOf(f);g!==-1&&this._disposables.splice(g,1)}},s.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var g;this._isDisposed||f===this._value||((g=this._value)==null||g.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},s.toDisposable=function(f){return{dispose:f}},s.disposeArray=u,s.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},485:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.FourKeyMap=s.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(g,d,y){this._data[g]||(this._data[g]={}),this._data[g][d]=y}get(g,d){return this._data[g]?this._data[g][d]:void 0}clear(){this._data={}}}s.TwoKeyMap=u,s.FourKeyMap=class{constructor(){this._data=new u}set(f,g,d,y,N){this._data.get(f,g)||this._data.set(f,g,new u),this._data.get(f,g).set(d,y,N)}get(f,g,d,y){var N;return(N=this._data.get(f,g))==null?void 0:N.get(d,y)}clear(){this._data.clear()}}},399:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.isChromeOS=s.isLinux=s.isWindows=s.isIphone=s.isIpad=s.isMac=s.getSafariVersion=s.isSafari=s.isLegacyEdge=s.isFirefox=s.isNode=void 0,s.isNode=typeof process<"u"&&"title"in process;const u=s.isNode?"node":navigator.userAgent,f=s.isNode?"node":navigator.platform;s.isFirefox=u.includes("Firefox"),s.isLegacyEdge=u.includes("Edge"),s.isSafari=/^((?!chrome|android).)*safari/i.test(u),s.getSafariVersion=function(){if(!s.isSafari)return 0;const g=u.match(/Version\/(\d+)/);return g===null||g.length<2?0:parseInt(g[1])},s.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),s.isIpad=f==="iPad",s.isIphone=f==="iPhone",s.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),s.isLinux=f.indexOf("Linux")>=0,s.isChromeOS=/\bCrOS\b/.test(u)},385:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DebouncedIdleTask=s.IdleTaskQueue=s.PriorityTaskQueue=void 0;const f=u(399);class g{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 k=0,b=0,c=N.timeRemaining(),p=0;for(;this._i<this._tasks.length;){if(k=Date.now(),this._tasks[this._i]()||this._i++,k=Math.max(1,Date.now()-k),b=Math.max(k,b),p=N.timeRemaining(),1.5*b>p)return c-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(c-k))}ms`),void this._start();c=p}this.clear()}}class d extends g{_requestCallback(N){return setTimeout(()=>N(this._createDeadline(16)))}_cancelCallback(N){clearTimeout(N)}_createDeadline(N){const k=Date.now()+N;return{timeRemaining:()=>Math.max(0,k-Date.now())}}}s.PriorityTaskQueue=d,s.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends g{_requestCallback(y){return requestIdleCallback(y)}_cancelCallback(y){cancelIdleCallback(y)}}:d,s.DebouncedIdleTask=class{constructor(){this._queue=new s.IdleTaskQueue}set(y){this._queue.clear(),this._queue.enqueue(y)}flush(){this._queue.flush()}}},147:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ExtendedAttrs=s.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(d){return[d>>>16&255,d>>>8&255,255&d]}static fromColorRGB(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]}clone(){const d=new u;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}s.AttributeData=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(d){this._ext=d}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(d){this._ext&=-469762049,this._ext|=d<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(d){this._ext&=-67108864,this._ext|=67108863&d}get urlId(){return this._urlId}set urlId(d){this._urlId=d}get underlineVariantOffset(){const d=(3758096384&this._ext)>>29;return d<0?4294967288^d:d}set underlineVariantOffset(d){this._ext&=536870911,this._ext|=d<<29&3758096384}constructor(d=0,y=0){this._ext=0,this._urlId=0,this._ext=d,this._urlId=y}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}s.ExtendedAttrs=f},782:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CellData=void 0;const f=u(133),g=u(855),d=u(147);class y extends d.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new d.ExtendedAttrs,this.combinedData=""}static fromCharData(k){const b=new y;return b.setFromCharData(k),b}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(k){this.fg=k[g.CHAR_DATA_ATTR_INDEX],this.bg=0;let b=!1;if(k[g.CHAR_DATA_CHAR_INDEX].length>2)b=!0;else if(k[g.CHAR_DATA_CHAR_INDEX].length===2){const c=k[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=c&&c<=56319){const p=k[g.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=p&&p<=57343?this.content=1024*(c-55296)+p-56320+65536|k[g.CHAR_DATA_WIDTH_INDEX]<<22:b=!0}else b=!0}else this.content=k[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|k[g.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=k[g.CHAR_DATA_CHAR_INDEX],this.content=2097152|k[g.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}s.CellData=y},855:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.WHITESPACE_CELL_CODE=s.WHITESPACE_CELL_WIDTH=s.WHITESPACE_CELL_CHAR=s.NULL_CELL_CODE=s.NULL_CELL_WIDTH=s.NULL_CELL_CHAR=s.CHAR_DATA_CODE_INDEX=s.CHAR_DATA_WIDTH_INDEX=s.CHAR_DATA_CHAR_INDEX=s.CHAR_DATA_ATTR_INDEX=s.DEFAULT_EXT=s.DEFAULT_ATTR=s.DEFAULT_COLOR=void 0,s.DEFAULT_COLOR=0,s.DEFAULT_ATTR=256|s.DEFAULT_COLOR<<9,s.DEFAULT_EXT=0,s.CHAR_DATA_ATTR_INDEX=0,s.CHAR_DATA_CHAR_INDEX=1,s.CHAR_DATA_WIDTH_INDEX=2,s.CHAR_DATA_CODE_INDEX=3,s.NULL_CELL_CHAR="",s.NULL_CELL_WIDTH=1,s.NULL_CELL_CODE=0,s.WHITESPACE_CELL_CHAR=" ",s.WHITESPACE_CELL_WIDTH=1,s.WHITESPACE_CELL_CODE=32},133:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Utf8ToUtf32=s.StringToUtf32=s.utf32ToString=s.stringFromCodePoint=void 0,s.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},s.utf32ToString=function(u,f=0,g=u.length){let d="";for(let y=f;y<g;++y){let N=u[y];N>65535?(N-=65536,d+=String.fromCharCode(55296+(N>>10))+String.fromCharCode(N%1024+56320)):d+=String.fromCharCode(N)}return d},s.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const g=u.length;if(!g)return 0;let d=0,y=0;if(this._interim){const N=u.charCodeAt(y++);56320<=N&&N<=57343?f[d++]=1024*(this._interim-55296)+N-56320+65536:(f[d++]=this._interim,f[d++]=N),this._interim=0}for(let N=y;N<g;++N){const k=u.charCodeAt(N);if(55296<=k&&k<=56319){if(++N>=g)return this._interim=k,d;const b=u.charCodeAt(N);56320<=b&&b<=57343?f[d++]=1024*(k-55296)+b-56320+65536:(f[d++]=k,f[d++]=b)}else k!==65279&&(f[d++]=k)}return d}},s.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const g=u.length;if(!g)return 0;let d,y,N,k,b=0,c=0,p=0;if(this.interim[0]){let C=!1,T=this.interim[0];T&=(224&T)==192?31:(240&T)==224?15:7;let S,R=0;for(;(S=63&this.interim[++R])&&R<4;)T<<=6,T|=S;const j=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,A=j-R;for(;p<A;){if(p>=g)return 0;if(S=u[p++],(192&S)!=128){p--,C=!0;break}this.interim[R++]=S,T<<=6,T|=63&S}C||(j===2?T<128?p--:f[b++]=T:j===3?T<2048||T>=55296&&T<=57343||T===65279||(f[b++]=T):T<65536||T>1114111||(f[b++]=T)),this.interim.fill(0)}const v=g-4;let w=p;for(;w<g;){for(;!(!(w<v)||128&(d=u[w])||128&(y=u[w+1])||128&(N=u[w+2])||128&(k=u[w+3]));)f[b++]=d,f[b++]=y,f[b++]=N,f[b++]=k,w+=4;if(d=u[w++],d<128)f[b++]=d;else if((224&d)==192){if(w>=g)return this.interim[0]=d,b;if(y=u[w++],(192&y)!=128){w--;continue}if(c=(31&d)<<6|63&y,c<128){w--;continue}f[b++]=c}else if((240&d)==224){if(w>=g)return this.interim[0]=d,b;if(y=u[w++],(192&y)!=128){w--;continue}if(w>=g)return this.interim[0]=d,this.interim[1]=y,b;if(N=u[w++],(192&N)!=128){w--;continue}if(c=(15&d)<<12|(63&y)<<6|63&N,c<2048||c>=55296&&c<=57343||c===65279)continue;f[b++]=c}else if((248&d)==240){if(w>=g)return this.interim[0]=d,b;if(y=u[w++],(192&y)!=128){w--;continue}if(w>=g)return this.interim[0]=d,this.interim[1]=y,b;if(N=u[w++],(192&N)!=128){w--;continue}if(w>=g)return this.interim[0]=d,this.interim[1]=y,this.interim[2]=N,b;if(k=u[w++],(192&k)!=128){w--;continue}if(c=(7&d)<<18|(63&y)<<12|(63&N)<<6|63&k,c<65536||c>1114111)continue;f[b++]=c}}return b}}},776:function(_,s,u){var f=this&&this.__decorate||function(c,p,v,w){var C,T=arguments.length,S=T<3?p:w===null?w=Object.getOwnPropertyDescriptor(p,v):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(c,p,v,w);else for(var R=c.length-1;R>=0;R--)(C=c[R])&&(S=(T<3?C(S):T>3?C(p,v,S):C(p,v))||S);return T>3&&S&&Object.defineProperty(p,v,S),S},g=this&&this.__param||function(c,p){return function(v,w){p(v,w,c)}};Object.defineProperty(s,"__esModule",{value:!0}),s.traceCall=s.setTraceLogger=s.LogService=void 0;const d=u(859),y=u(97),N={trace:y.LogLevelEnum.TRACE,debug:y.LogLevelEnum.DEBUG,info:y.LogLevelEnum.INFO,warn:y.LogLevelEnum.WARN,error:y.LogLevelEnum.ERROR,off:y.LogLevelEnum.OFF};let k,b=s.LogService=class extends d.Disposable{get logLevel(){return this._logLevel}constructor(c){super(),this._optionsService=c,this._logLevel=y.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),k=this}_updateLogLevel(){this._logLevel=N[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(c){for(let p=0;p<c.length;p++)typeof c[p]=="function"&&(c[p]=c[p]())}_log(c,p,v){this._evalLazyOptionalParams(v),c.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+p,...v)}trace(c,...p){var v;this._logLevel<=y.LogLevelEnum.TRACE&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.trace.bind(this._optionsService.options.logger))??console.log,c,p)}debug(c,...p){var v;this._logLevel<=y.LogLevelEnum.DEBUG&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.debug.bind(this._optionsService.options.logger))??console.log,c,p)}info(c,...p){var v;this._logLevel<=y.LogLevelEnum.INFO&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.info.bind(this._optionsService.options.logger))??console.info,c,p)}warn(c,...p){var v;this._logLevel<=y.LogLevelEnum.WARN&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.warn.bind(this._optionsService.options.logger))??console.warn,c,p)}error(c,...p){var v;this._logLevel<=y.LogLevelEnum.ERROR&&this._log(((v=this._optionsService.options.logger)==null?void 0:v.error.bind(this._optionsService.options.logger))??console.error,c,p)}};s.LogService=b=f([g(0,y.IOptionsService)],b),s.setTraceLogger=function(c){k=c},s.traceCall=function(c,p,v){if(typeof v.value!="function")throw new Error("not supported");const w=v.value;v.value=function(...C){if(k.logLevel!==y.LogLevelEnum.TRACE)return w.apply(this,C);k.trace(`GlyphRenderer#${w.name}(${C.map(S=>JSON.stringify(S)).join(", ")})`);const T=w.apply(this,C);return k.trace(`GlyphRenderer#${w.name} return`,T),T}}},726:(_,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.createDecorator=s.getServiceDependencies=s.serviceRegistry=void 0;const u="di$target",f="di$dependencies";s.serviceRegistry=new Map,s.getServiceDependencies=function(g){return g[f]||[]},s.createDecorator=function(g){if(s.serviceRegistry.has(g))return s.serviceRegistry.get(g);const d=function(y,N,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(b,c,p){c[u]===c?c[f].push({id:b,index:p}):(c[f]=[{id:b,index:p}],c[u]=c)})(d,y,k)};return d.toString=()=>g,s.serviceRegistry.set(g,d),d}},97:(_,s,u)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.IDecorationService=s.IUnicodeService=s.IOscLinkService=s.IOptionsService=s.ILogService=s.LogLevelEnum=s.IInstantiationService=s.ICharsetService=s.ICoreService=s.ICoreMouseService=s.IBufferService=void 0;const f=u(726);var g;s.IBufferService=(0,f.createDecorator)("BufferService"),s.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),s.ICoreService=(0,f.createDecorator)("CoreService"),s.ICharsetService=(0,f.createDecorator)("CharsetService"),s.IInstantiationService=(0,f.createDecorator)("InstantiationService"),function(d){d[d.TRACE=0]="TRACE",d[d.DEBUG=1]="DEBUG",d[d.INFO=2]="INFO",d[d.WARN=3]="WARN",d[d.ERROR=4]="ERROR",d[d.OFF=5]="OFF"}(g||(s.LogLevelEnum=g={})),s.ILogService=(0,f.createDecorator)("LogService"),s.IOptionsService=(0,f.createDecorator)("OptionsService"),s.IOscLinkService=(0,f.createDecorator)("OscLinkService"),s.IUnicodeService=(0,f.createDecorator)("UnicodeService"),s.IDecorationService=(0,f.createDecorator)("DecorationService")}},h={};function x(_){var s=h[_];if(s!==void 0)return s.exports;var u=h[_]={exports:{}};return l[_].call(u.exports,u,u.exports,x),u.exports}var D={};return(()=>{var _=D;Object.defineProperty(_,"__esModule",{value:!0}),_.WebglAddon=void 0;const s=x(345),u=x(859),f=x(399),g=x(666),d=x(776);class y extends u.Disposable{constructor(k){if(f.isSafari&&(0,f.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=k,this._onChangeTextureAtlas=this.register(new s.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new s.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new s.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new s.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(k){const b=k._core;if(!k.element)return void this.register(b.onWillOpen(()=>this.activate(k)));this._terminal=k;const c=b.coreService,p=b.optionsService,v=b,w=v._renderService,C=v._characterJoinerService,T=v._charSizeService,S=v._coreBrowserService,R=v._decorationService,j=v._logService,A=v._themeService;(0,d.setTraceLogger)(j),this._renderer=this.register(new g.WebglRenderer(k,C,T,S,c,R,p,A,this._preserveDrawingBuffer)),this.register((0,s.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,s.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,s.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,s.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),w.setRenderer(this._renderer),this.register((0,u.toDisposable)(()=>{const O=this._terminal._core._renderService;O.setRenderer(this._terminal._core._createRenderer()),O.handleResize(k.cols,k.rows)}))}get textureAtlas(){var k;return(k=this._renderer)==null?void 0:k.textureAtlas}clearTextureAtlas(){var k;(k=this._renderer)==null||k.clearTextureAtlas()}}_.WebglAddon=y})(),D})())})(lj);var W4=lj.exports;const G4=[{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"}],Y4=4,q4=1500,K4=n=>{for(const i of document.fonts)if(i.family.replace(/["']/g,"")===n)return i;return null},X4=async({family:n,url:i,probe:l,unicodeRange:h},x)=>{var D;for(let _=0;_<Y4;_++){try{await document.fonts.load(`${x}px "${n}"`,l)}catch{}if(((D=K4(n))==null?void 0:D.status)==="loaded")return!0;try{const s=new FontFace(n,`url(${i}) format('woff2')`,h?{unicodeRange:h}:{});return await s.load(),document.fonts.add(s),!0}catch{}await new Promise(s=>setTimeout(s,q4*2**_))}return!1};let S_=null;function J4(n=14){var i;return S_||(S_=typeof document<"u"&&((i=document.fonts)!=null&&i.load)?Promise.all(G4.map(l=>X4(l,n))):Promise.resolve([!1,!1])),S_}const Z4=["input","textarea","select",'[role="textbox"]','[contenteditable]:not([contenteditable="false"])'].join(",");function Pw(n){return n.key==="F5"||n.key==="F12"}function Q4(n){return n.key==="Enter"&&n.shiftKey&&!n.ctrlKey&&!n.altKey&&!n.metaKey&&!n.isComposing}function eV(n){if(n.defaultPrevented||n.isComposing||Pw(n))return!1;const i=n.target;return i instanceof Element?i.closest(".xterm-helper-textarea")?!1:!i.closest(Z4):!0}const tV="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",nV={selectionBackground:"rgba(10,132,255,0.9)",selectionForeground:"#ffffff"};function rV(n,i){const l=i==null?void 0:i.querySelector(".xterm-helper-textarea");l&&(l.readOnly=!0,l.tabIndex=-1,l.setAttribute("inputmode","none"),l.setAttribute("aria-hidden","true"));const h=document.activeElement;n.focus(),n.blur(),h&&h!==document.body&&typeof h.focus=="function"&&h.focus()}function iV(n,i,l,h){const x=i==null?void 0:i.querySelector(".xterm-helper-textarea");if(!l){rV(n,i);return}x&&(x.readOnly=!1,x.tabIndex=0,x.removeAttribute("inputmode"),x.removeAttribute("aria-hidden")),h&&n.focus()}function sV(){var i;const n=((i=navigator.userAgentData)==null?void 0:i.platform)||navigator.platform||"";return/mac|iphone|ipad|ipod/i.test(n)}function aV(n,i="keydown"){var x,D,_,s;const l=((x=n.view)==null?void 0:x.KeyboardEvent)||((s=(_=(D=n.target)==null?void 0:D.ownerDocument)==null?void 0:_.defaultView)==null?void 0:s.KeyboardEvent)||window.KeyboardEvent,h=new l(i,{key:n.key,code:n.code,location:n.location,ctrlKey:n.ctrlKey,shiftKey:n.shiftKey,altKey:n.altKey,metaKey:n.metaKey,repeat:n.repeat,bubbles:!0,cancelable:!0,composed:!0});for(const u of["keyCode","which","charCode"])if(n[u]!=null)try{Object.defineProperty(h,u,{value:n[u]})}catch{}return h}function oV(n,i,l){if(!i||Pw(l))return!1;n.focus();const h=aV(l);return i.dispatchEvent(h)?!l.ctrlKey&&!l.metaKey&&l.key&&Array.from(l.key).length===1?(n.input(l.key,!0),!0):!1:!0}function lV({host:n,desktop:i,autoFocusInput:l,fontSize:h,scrollback:x,pane:D,onInputData:_,onInputFocusChange:s,onRequestDraft:u,onDesktopSelection:f,getDocLinkHandler:g}){var S;const d=new ij.Terminal({disableStdin:!i,allowProposedApi:!0,scrollback:x,convertEol:!1,fontSize:h,fontFamily:tV,theme:nV,cursorInactiveStyle:"block",linkHandler:{activate:(R,j)=>{const A=XE(j)[0],O=g==null?void 0:g();if(A&&O){O({kind:"url",protocol:A.protocol,port:A.port,urlPath:A.path,raw:A.raw,path:A.raw},(R==null?void 0:R.clientX)??0,(R==null?void 0:R.clientY)??0);return}try{window.open(j,"_blank","noopener,noreferrer")}catch{}}}});d.open(n),d.attachCustomKeyEventHandler(R=>{var P,Y,Q,z,X,K,B;if(Pw(R)||i&&((P=R.key)==null?void 0:P.toLowerCase())==="v"&&!R.altKey&&(sV()?R.metaKey&&!R.ctrlKey:R.ctrlKey&&!R.metaKey))return!1;const O=i&&((Y=R.key)==null?void 0:Y.toLowerCase())==="c"&&((Q=d.hasSelection)==null?void 0:Q.call(d)),H=O&&R.metaKey&&!R.ctrlKey&&!R.altKey,V=O&&R.ctrlKey&&R.shiftKey&&!R.metaKey&&!R.altKey;if(H||V){if(V){(z=R.preventDefault)==null||z.call(R);const F=d.getSelection(),G=()=>{try{document.execCommand("copy")}catch{}};try{const Z=(K=(X=navigator.clipboard)==null?void 0:X.writeText)==null?void 0:K.call(X,F);Z?Promise.resolve(Z).catch(G):G()}catch{G()}}return!1}return i&&R.key==="Enter"&&R.shiftKey&&!R.ctrlKey&&!R.altKey&&!R.metaKey&&!R.isComposing?((B=R.preventDefault)==null||B.call(R),u==null||u(),!1):!(R.metaKey&&["w","t","l","r"].includes(R.key.toLowerCase()))});const y=i?d.onData(R=>_==null?void 0:_(D,R)):null,N=i?(S=d.onBinary)==null?void 0:S.call(d,R=>{const j=Uint8Array.from(R,A=>A.charCodeAt(0)&255);_==null||_(D,j)}):null,k=i?d.onSelectionChange(()=>f==null?void 0:f(d.hasSelection())):null,b=i?n.querySelector(".xterm-helper-textarea"):null,c=()=>s==null?void 0:s(!0),p=()=>s==null?void 0:s(!1);b==null||b.addEventListener("focus",c),b==null||b.addEventListener("blur",p),iV(d,n,i,l);const v=d.registerLinkProvider({provideLinks(R,j){const A=g==null?void 0:g();if(!A){j(void 0);return}const O=v4(d,R).map(H=>({range:H.range,text:H.raw??H.path,decorations:{pointerCursor:!0,underline:!1},activate:V=>A(H,(V==null?void 0:V.clientX)??0,(V==null?void 0:V.clientY)??0)}));j(O.length?O:void 0)}});let w=!1,C=null;const T=()=>{try{const R=new W4.WebglAddon;R.onContextLoss(()=>R.dispose()),d.loadAddon(R),C=R}catch{C=null}};return T(),J4(h).then(()=>{if(!(w||!C)){try{C.dispose()}catch{}T(),d.refresh(0,d.rows-1)}}),{term:d,forwardPageKey:R=>oV(d,b,R),dispose(){w=!0,y==null||y.dispose(),N==null||N.dispose(),k==null||k.dispose(),b==null||b.removeEventListener("focus",c),b==null||b.removeEventListener("blur",p),v.dispose();try{C==null||C.dispose()}catch{}d.dispose()}}}function cV({term:n,host:i,screenHost:l=i,desktop:h,activeRef:x,actionsRef:D,setUI:_,setInfo:s}){const u=()=>n.buffer.active,f=i.parentElement,g=l.querySelector(".xterm-viewport");let d=null,y=null,N=null,k=null,b=null,c=0,p=0;const v=(K,B)=>{const F=l.querySelector(".xterm-screen");if(!F||!n.cols||!n.rows)return null;const G=F.getBoundingClientRect(),Z=G.width/n.cols,ae=G.height/n.rows;return!Z||!ae?null:{col:Math.max(0,Math.min(n.cols-1,Math.floor((K-G.left)/Z))),row:u().viewportY+Math.max(0,Math.min(n.rows-1,Math.floor((B-G.top)/ae)))}},w=()=>{var G;const K=(G=n.getSelectionPosition)==null?void 0:G.call(n);if(!K)return null;let B=K.end.x-1,F=K.end.y;return B<0&&(F-=1,B=n.cols-1),{start:{col:K.start.x,row:K.start.y},end:{col:B,row:F}}},C=()=>{const K=w(),B=l.querySelector(".xterm-screen");if(!K||!B){_(null),s("");return}const F=B.getBoundingClientRect(),G=f.getBoundingClientRect(),Z=F.width/n.cols,ae=F.height/n.rows,me=u().viewportY,Ue={x:F.left-G.left,y:F.top-G.top},De=H1(K.start.col,K.start.row,me,Z,ae),ie=H1(K.end.col+1,K.end.row,me,Z,ae);_({start:{x:De.x+Ue.x,y:De.y+Ue.y,ch:ae},end:{x:ie.x+Ue.x,y:ie.y+Ue.y,ch:ae},wrapW:G.width});const q=n.getSelection();if(!q){s("");return}const{lines:fe,chars:le}=y4(q);s(`复制模式 · ${fe} 行 · ${le} 字`)},T=K=>{var B;return((B=u().getLine(K))==null?void 0:B.translateToString(!0))??""},S=K=>{if(!K)return;const B=K.end.row*n.cols+K.end.col-(K.start.row*n.cols+K.start.col)+1;n.select(K.start.col,K.start.row,B),C()};D.current={currentRange:w,paraLineText:T,selectRange:S};const R=(K,B)=>{var me,Ue;const F=v(K,B);if(!F)return;const G=((me=u().getLine(F.row))==null?void 0:me.translateToString(!1))??"";let Z=F.col,ae=F.col;if(/\S/.test(G[F.col]||"")){for(;Z>0&&/\S/.test(G[Z-1]);)Z-=1;for(;ae<n.cols-1&&/\S/.test(G[ae+1]);)ae+=1}d={col:Z,row:F.row},x.current=!0,_(null),n.select(Z,F.row,ae-Z+1),C(),(Ue=navigator.vibrate)==null||Ue.call(navigator,12)},j=(K,B)=>{var F,G;return((G=(F=u().getLine(Math.floor(K/B)))==null?void 0:F.getCell(K%B))==null?void 0:G.getWidth())??1},A=(K,B)=>K>0&&j(K,B)===0?K-1:K,O=(K,B)=>j(K,B)===2?K+1:K,H=(K,B)=>{const F=v(K,B);if(!F||!d)return;const G=d.row*n.cols+d.col,Z=F.row*n.cols+F.col,ae=A(Math.min(G,Z),n.cols),me=O(Math.max(G,Z),n.cols);n.select(ae%n.cols,Math.floor(ae/n.cols),me-ae+1),C()},V=()=>{d=null,x.current=!1,_(null),s(""),n.clearSelection()},P=(K,B)=>{const F=v(K,B);if(!F||N==null)return;const G=F.row*n.cols+F.col,Z=y==="start"?G:G+1;let ae=Math.min(N,Z),me=Math.max(N,Z);me<=ae&&(me=ae+1),ae=A(ae,n.cols),me=O(me-1,n.cols)+1,n.select(ae%n.cols,Math.floor(ae/n.cols),me-ae),C()},Y=K=>{var G,Z,ae;const B=(Z=(G=K.target).closest)==null?void 0:Z.call(G,".sel-handle");if(!B)return;y=B.dataset.end;const F=w();if(F){const me=F.start.row*n.cols+F.start.col,Ue=F.end.row*n.cols+F.end.col;N=y==="start"?Ue+1:me}else N=null;K.preventDefault(),K.stopPropagation(),(ae=f.setPointerCapture)==null||ae.call(f,K.pointerId)},Q=K=>{if(!y||N==null||!g)return;P(K.clientX,K.clientY);const B=28;b={x:K.clientX,y:K.clientY};const F=g.getBoundingClientRect();let G=0;if(K.clientY<F.top+B?(c=-1,G=F.top+B-K.clientY):K.clientY>F.bottom-B?(c=1,G=K.clientY-(F.bottom-B)):c=0,p=Math.min(14,2+G*.28),c!==0&&k==null){const Z=()=>{if(!y||c===0){k=null;return}const ae=g.scrollTop;if(g.scrollTop=ae+c*p,P(b.x,b.y),g.scrollTop===ae){k=null;return}k=requestAnimationFrame(Z)};k=requestAnimationFrame(Z)}else c===0&&k!=null&&(cancelAnimationFrame(k),k=null);K.preventDefault()},z=K=>{var B;y&&(y=null,N=null,c=0,k!=null&&(cancelAnimationFrame(k),k=null),(B=f.releasePointerCapture)==null||B.call(f,K.pointerId))},X=()=>{!h&&x.current&&C()};return f.addEventListener("pointerdown",Y,{capture:!0}),f.addEventListener("pointermove",Q,{capture:!0}),f.addEventListener("pointerup",z,{capture:!0}),f.addEventListener("pointercancel",z,{capture:!0}),g==null||g.addEventListener("scroll",X,{passive:!0}),{start:R,extend:H,clear:V,refresh:C,dispose(){k!=null&&cancelAnimationFrame(k),f.removeEventListener("pointerdown",Y,{capture:!0}),f.removeEventListener("pointermove",Q,{capture:!0}),f.removeEventListener("pointerup",z,{capture:!0}),f.removeEventListener("pointercancel",z,{capture:!0}),g==null||g.removeEventListener("scroll",X),D.current=null}}}function $1(n,i){let l=0,h=n;for(;Math.abs(h)>=i;)h>0?(l+=1,h-=i):(l-=1,h+=i);return{notches:l,rem:h}}const uV=n=>n>0?"up":"down",dV=.95,hV=.015,mV=.1,fV=50;function pV(n,i,l=dV,h=hV){const x=n*i,D=n*l**(i/16);return{delta:x,v:D,done:Math.abs(D)<h}}function vV(n,i,l=mV,h=fV){return i<=h&&Math.abs(n)>=l}const Df=22,gV=12;function bV({term:n,host:i,desktop:l,pane:h,fontRef:x,selection:D,selectionActiveRef:_,stopFlingRef:s,getStreamExact:u,getAltScreen:f,getMouseAware:g,onActivity:d,onUserScroll:y,showScrollPosition:N,maybePullMore:k,enterStreamHistory:b,scheduleFit:c,wake:p,onTap:v,onKeepKeyboard:w}){const C=()=>n.buffer.active;let T=0,S=0,R=0,j=0,A=!1,O=0,H=0,V=!1,P=!1,Y=null,Q=0,z=0,X=0,K=0,B=0,F=!1,G=!1,Z=null,ae=0,me=0,Ue=0,De=!1,ie=!1,q=null;const fe=()=>i.querySelector(".terminal__live .xterm-viewport")||i.querySelector(".xterm-viewport"),le=()=>{Y&&(clearTimeout(Y),Y=null)},Oe=oe=>Math.hypot(oe[0].clientX-oe[1].clientX,oe[0].clientY-oe[1].clientY),ke=()=>{Z!=null&&(cancelAnimationFrame(Z),Z=null)};s.current=ke;const nt=(oe,Te,Ie)=>{if(!oe)return;let Ve=Ie,tt=null;const ot=bt=>{if(tt==null){tt=bt,Z=requestAnimationFrame(ot);return}const ve=pV(Ve,bt-tt);tt=bt,Ve=ve.v;const Ne=oe[Te];oe[Te]=Ne+ve.delta;const Qe=Math.abs(ve.delta)>=1&&oe[Te]===Ne;if(Te==="scrollTop"&&(N(),k()),ve.done||Qe||Z==null){Z=null;return}Z=requestAnimationFrame(ot)};Z=requestAnimationFrame(ot)},xe=async()=>{if(De||Ue===0)return;De=!0;const oe=uV(Ue),Te=Math.min(Math.abs(Ue),40);Ue=0;try{g()?await R3(h,oe,Te):await Jd(h,Array(Te).fill(oe==="up"?"Up":"Down")),p()}catch{}finally{De=!1,Ue!==0&&xe()}},$e=oe=>{if(d(),le(),ke(),F=oe.touches.length>0,G=!1,P=_.current,V=!1,oe.touches.length===2){A=!0,j=-1,O=Oe(oe.touches),H=n.options.fontSize||14;return}if(A=!1,oe.touches.length!==1){j=-1;return}const Te=i.querySelector(".terminal__live");u()&&!f()&&Te&&oe.touches[0].clientY<Te.getBoundingClientRect().top&&(b==null||b(0)),T=oe.touches[0].clientX,S=oe.touches[0].clientY,R=i.scrollLeft,j=0,Q=T,z=S,X=oe.timeStamp,K=0,B=0,me=S,ae=0,Y=setTimeout(()=>{Y=null,V=!0,j=-1,D.start(T,S)},500)},at=oe=>{if(A&&oe.touches.length===2){if(O>0){const bt=Math.max(8,Math.min(40,Math.round(H*(Oe(oe.touches)/O))));bt!==(n.options.fontSize||14)&&(n.options.fontSize=bt,x.current=bt)}oe.preventDefault(),oe.stopPropagation();return}if(V&&oe.touches.length===1){D.extend(oe.touches[0].clientX,oe.touches[0].clientY),oe.preventDefault(),oe.stopPropagation();return}if(oe.touches.length!==1)return;const Te=oe.touches[0].clientX-T,Ie=oe.touches[0].clientY-S;if((Math.abs(Te)>6||Math.abs(Ie)>6)&&le(),j===0){if(Math.abs(Te)<6&&Math.abs(Ie)<6)return;j=Math.abs(Te)>Math.abs(Ie)?1:-1}if(j===1){i.scrollLeft=R-Te;const bt=oe.touches[0].clientX,ve=oe.timeStamp-X;ve>0&&(K=(Q-bt)/ve),Q=bt,X=oe.timeStamp,oe.preventDefault(),oe.stopPropagation();return}if(G){oe.preventDefault(),oe.stopPropagation();return}if(N(),k(),G){B=0,oe.preventDefault(),oe.stopPropagation();return}const Ve=oe.touches[0].clientY,tt=Ve-me;if(me=Ve,u()){oe.preventDefault(),oe.stopPropagation();const bt=i.scrollTop;if(i.scrollTop-=tt,i.scrollTop!==bt){y();return}if(!f()){tt>0&&(b==null||b(tt));return}}if(f()){oe.preventDefault(),oe.stopPropagation();const bt=fe(),ve=tt>0?-1:1;if(bt&&ej(C().viewportY,C().baseY,ve)==="internal"){bt.scrollTop-=tt,y();return}const Ne=$1(ae+tt,gV);ae=Ne.rem,Ne.notches&&(Ue+=Ne.notches,xe());return}const ot=oe.timeStamp-X;ot>0&&(B=(z-Ve)/ot),z=Ve,X=oe.timeStamp},Ge=oe=>{le();const Te=oe.touches.length===0;if(Te&&(F=!1),V&&oe.touches.length===0){V=!1;const Ie=n.getSelection();Ie&&Ie.trim()?D.refresh():D.clear(),G=!1;return}if(A&&oe.touches.length<2){A=!1,Ld(n.options.fontSize||14),c(),Te&&(G=!1);return}Te&&!G&&vV(j===1?K:B,oe.timeStamp-X)&&(j===1?nt(i,"scrollLeft",K):j===-1&&nt(u()?i:fe(),"scrollTop",B)),oe.touches.length===0&&!V&&!A&&j===0&&(P?D.clear():v()),Te&&(G=!1)},Ft=oe=>{if(Math.abs(oe.deltaX)>Math.abs(oe.deltaY)&&i.scrollWidth>i.clientWidth){const Te=oe.deltaMode===1?oe.deltaX*Df:oe.deltaMode===2?oe.deltaX*i.clientWidth:oe.deltaX;i.scrollLeft+=Te,oe.preventDefault(),oe.stopPropagation();return}if(oe.deltaY){if(u()){const Te=i.scrollTop;if(i.scrollTop+=oe.deltaY,i.scrollTop!==Te){oe.preventDefault(),oe.stopPropagation(),y();return}if(!f()&&oe.deltaY<0&&(b!=null&&b(-oe.deltaY))){oe.preventDefault(),oe.stopPropagation();return}if(!f()){oe.preventDefault(),oe.stopPropagation();return}}if(f()){oe.preventDefault(),oe.stopPropagation();const Te=oe.deltaMode===1?oe.deltaY*Df:oe.deltaMode===2?oe.deltaY*n.rows*Df:oe.deltaY,Ie=$1(ae-Te,Df);ae=Ie.rem,Ie.notches&&(Ue+=Ie.notches,xe());return}if(ie){oe.preventDefault(),oe.stopPropagation();return}N(),k()}},Rt=oe=>{if(l){const Ie=i.querySelector(".terminal__live");u()&&!f()&&Ie&&oe.clientY<Ie.getBoundingClientRect().top&&(b==null||b(0)),v();return}(aj(document.activeElement)||(w==null?void 0:w()))&&oe.cancelable&&oe.preventDefault()};return i.addEventListener("pointerdown",Rt,{capture:!0}),i.addEventListener("wheel",Ft,{capture:!0,passive:!1}),i.addEventListener("touchstart",$e,{capture:!0,passive:!0}),i.addEventListener("touchmove",at,{capture:!0,passive:!1}),i.addEventListener("touchend",Ge,{capture:!0,passive:!0}),{freezeHistoryGesture(){F&&j===-1&&(G=!0,B=0),ke()},settleHistoryAnchor(oe){ie=!0,q!=null&&cancelAnimationFrame(q),n.scrollToLine(oe),q=requestAnimationFrame(()=>{n.scrollToLine(oe),q=requestAnimationFrame(()=>{q=null,ie=!1})})},dispose(){le(),ke(),q!=null&&cancelAnimationFrame(q),i.removeEventListener("pointerdown",Rt,{capture:!0}),i.removeEventListener("wheel",Ft,{capture:!0}),i.removeEventListener("touchstart",$e,{capture:!0}),i.removeEventListener("touchmove",at,{capture:!0}),i.removeEventListener("touchend",Ge,{capture:!0})}}}const _V=15e3,wV=3e4,W1={connecting:-1,good:0,degraded:1,poor:2};function yV({ok:n,rttMs:i}){return n?Number.isFinite(i)?i>1e3?"poor":i>=300?"degraded":"good":"connecting":"poor"}function xV({mode:n,onChange:i,now:l=()=>Date.now()}){let h=!1,x=null,D=0,_={mode:n,quality:"connecting",stableQuality:"connecting",rttMs:null,recoveryAt:null};const s=()=>{h||i==null||i({..._})},u=(f,g=!1)=>{if(f==="connecting"){_.stableQuality==="connecting"&&s();return}if(f===_.stableQuality){x=null,D=0,_={..._,recoveryAt:null},s();return}if(_.stableQuality==="connecting"&&f==="poor"&&!g){x="poor",D=l(),_={..._,stableQuality:"degraded",recoveryAt:null},s();return}if(_.stableQuality==="connecting"||g){x=null,D=0,_={..._,stableQuality:f,recoveryAt:null},s();return}const d=W1[f]>W1[_.stableQuality]?_V:wV;if(x!==f){x=f,D=l(),_={..._,recoveryAt:f==="good"?D+d:null},s();return}l()-D>=d&&(x=null,D=0,_={..._,stableQuality:f,recoveryAt:null}),s()};return s(),{sample({ok:f,rttMs:g}){if(h)return;const d=yV({ok:f,rttMs:g});_={..._,quality:d,rttMs:Number.isFinite(g)?Math.max(0,Math.round(g)):null},u(d)},status(f){h||(f==="reconnecting"||f==="error"?u("degraded",!0):f==="connecting"&&_.rttMs==null&&(_={..._,quality:"connecting"},s()))},setMode(f,{fallback:g=!1}={}){h||_.mode===f||(_={..._,mode:f},g&&(_={..._,stableQuality:"degraded",recoveryAt:null}),s())},getSnapshot(){return{..._}},peek(){return{..._}},destroy(){h=!0}}}const NV=33;function SV({now:n,lastPaintAt:i,immediate:l=!1,intervalMs:h=NV}){return l||!Number.isFinite(i)?0:Math.max(0,h-Math.max(0,n-i))}const CV=20,C_=100,Cd=5e3,EV=15,G1=1e4,jV=1e4,DV=L.forwardRef(function({pane:i,stream:l=!1,snapshotIntervalMs:h=1e3,inset:x=0,desktop:D=!1,autoFocusInput:_=!0,onAuthFail:s,onDocLinkTap:u,onTap:f,onKeepKeyboard:g,onRequestDraft:d,onInputFocusChange:y,onInputData:N},k){const b=L.useRef(null),c=L.useRef(null),p=L.useRef(null),v=L.useRef(0),w=L.useRef(!1),C=L.useRef(!1),T=L.useRef(""),S=L.useRef(f);S.current=f;const R=L.useRef(g);R.current=g;const j=L.useRef(d);j.current=d;const A=L.useRef(s);A.current=s;const O=L.useRef(y);O.current=y;const H=L.useRef(N);H.current=N;const V=L.useRef(h);V.current=h;const P=L.useRef([]),Y=L.useRef(null),Q=L.useRef(null),z=L.useRef(!1),X=L.useRef(null),K=L.useRef(u);K.current=u;const B=L.useRef(mE()),F=L.useRef(null),G=L.useRef(qU()),Z=L.useRef(null),[ae,me]=L.useState(!1),[Ue,De]=L.useState(!0),[ie,q]=L.useState(l?"connecting":"off"),[fe,le]=L.useState({mode:l?"live":"snapshot",quality:"connecting",stableQuality:"connecting",rttMs:null,recoveryAt:null}),[Oe,ke]=L.useState(null),[nt,xe]=L.useState(!1),[$e,at]=L.useState(()=>Date.now()),[Ge,Ft]=L.useState(null),Rt=L.useRef(!1),[oe,Te]=L.useState(""),[Ie,Ve]=L.useState(null),tt=L.useRef(!1),ot=L.useRef(!1),[bt,ve]=L.useState(!1),[Ne,Qe]=L.useState(!1),{dbg:ye,dbgVisible:Fe,flash:ze}=S4(c),[Nt,Wt]=L.useState(""),[Gt,Qt]=L.useState(!1),[Rn,we]=L.useState(!1),[Ye,J]=L.useState(null),lt=Ye!=null,it=L.useRef(null),Pt=L.useRef(null),pt=L.useRef(!1),en=L.useRef(!1),It=L.useRef(!1),Ht=L.useRef(0),Ut=L.useRef(null),hn=L.useRef(null),_n=L.useRef(!1),Xt=L.useRef(null);L.useImperativeHandle(k,()=>({getSize:()=>{const Se=c.current;return Se?{cols:Se.cols,rows:Se.rows}:null},flash:ze,getFontSize:()=>{const Se=c.current;return Se?{size:Se.options.fontSize,auto:G.current==null}:null},setFontSize:Se=>{var Le;const ct=c.current;if(!ct)return null;const ft=Math.max(8,Math.min(40,Math.round(Se)));return ct.options.fontSize=ft,G.current=ft,Ld(ft),(Le=it.current)==null||Le.call(it),ft},autoFont:()=>{var ct;const Se=c.current;Se&&(Se.options.fontSize=14,G.current=null,KU(),(ct=it.current)==null||ct.call(it))},wake:()=>{var Se;return(Se=Ut.current)==null?void 0:Se.call(Ut)},inputFailed:Se=>{Ft((Se==null?void 0:Se.serverError)==="pane not found"?"pane-missing":"disconnected"),De(!1)},focusInput:()=>{var Se;return(Se=c.current)==null?void 0:Se.focus()},blurInput:()=>{var Se;return(Se=c.current)==null?void 0:Se.blur()},forwardPageKey:Se=>{var ct;return((ct=p.current)==null?void 0:ct.call(p,Se))??!1},setDocHighlight:Se=>{var ct;B.current=!!Se,(ct=F.current)==null||ct.call(F)}}),[]),L.useEffect(()=>{var ct,ft,Le;const Se=v.current;v.current=x,x>0&&Se===0&&(C.current=!0),x===0&&Se>0?(It.current=!0,(ct=Pt.current??it.current)==null||ct()):l?(ft=Pt.current??it.current)==null||ft():(Le=it.current)==null||Le.call(it),x===0&&(C.current=!1)},[x]),L.useEffect(()=>{var Se;(Se=l?Pt.current:it.current)==null||Se()},[l,Rn,lt]),L.useEffect(()=>{var Nl;let Se=!1,ct=!1;const ft=document.createElement("div");ft.className="terminal__live",b.current.replaceChildren(ft);const{term:Le,forwardPageKey:Ct,dispose:Bn}=lV({host:ft,desktop:D,autoFocusInput:_,fontSize:G.current??14,scrollback:Cd+100,pane:i,onInputData:(Ce,_t)=>{var At;return(At=H.current)==null?void 0:At.call(H,Ce,_t)},onInputFocusChange:Ce=>{var _t;Se||(_t=O.current)==null||_t.call(O,Ce)},onRequestDraft:()=>{var Ce;return(Ce=j.current)==null?void 0:Ce.call(j)},onDesktopSelection:Ce=>{var _t;Se||(Ce?(ct=!0,Rt.current=!0,Ve(null),Te("")):ct&&(ct=!1,Rt.current=!1,(_t=Ut.current)==null||_t.call(Ut)))},getDocLinkHandler:()=>K.current});c.current=Le,p.current=Ct;let tn=null,nn=!1,Xn=!1,Lt=null,zt=l,Sn=null,hr=null,$n=null,Jt=!1,yr=null,Wn=null,gt=!1,se=null,Ae=null,vt=null,on=!1,Yt=!1,ue=!zt,Ze=!0,st=0,yt=null,xn=0,Kt=null,fr=()=>{},Tn=!1,pr=!1,vr=!1,ki=!1,pi=()=>{};const Ir=xV({mode:l?"live":"snapshot",onChange:Ce=>{le(Ce),zt&&Ce.stableQuality==="poor"?zi():!zt&&Ce.mode==="snapshot"&&Ce.stableQuality==="good"&&pi()}});tt.current=!1,ot.current=!1,ve(!1),Rt.current=!1,Ve(null),Te(""),J(null);const ci=()=>Math.min(Cd,Math.max(24,Le.rows+CV));let rr=ci(),Fr=0,bs=()=>{},Qi=Ce=>Le.scrollToLine(Ce),Nn=null,es="",Vr=null,ne=0,He=!1,Je=!1,rn=null,zn=null,kr=null,ir=null,un=Date.now();me(!1),q(l?"connecting":"off"),ke(null),xe(!1),Qt(!1);let gr=!1;const sr=()=>{Se||gr||(gr=!0,requestAnimationFrame(()=>{Se||Qt(!0)}))};let ln=h4;const Cn=Ce=>{ln=Ce,Ce.connected&&Ft(null),De(Ce.connected)},An=()=>Le.buffer.active,Rr=()=>{rn&&(rn.deco.dispose(),rn.marker.dispose(),rn=null)},Kr=()=>{if(Rr(),tt.current||!Number.isFinite(zn)||zn<1)return;const Ce=An(),_t=Ce.baseY+Ce.cursorY,At=Le.registerMarker(zn-_t);if(!At)return;const yn=Le.registerDecoration({marker:At,x:0,width:Le.cols});if(!yn){At.dispose();return}yn.onRender(Pn=>Pn.classList.add("terminal-history-boundary")),rn={marker:At,deco:yn}},Hr=()=>{var Bt;const Ce=(Bt=b.current)==null?void 0:Bt.querySelector(".xterm-viewport"),_t=An(),At=(Ce==null?void 0:Ce.clientHeight)||0,yn=_t.baseY||0;if(!At||yn<=0){J(dn=>dn==null?dn:null);return}const Pn=Math.max(_t.length||0,yn+Le.rows),er=Math.min(At,Math.max(18,Math.round(At*Le.rows/Pn))),Mn=Math.round((At-er)*Math.max(0,Math.min(yn,_t.viewportY))/yn);J(dn=>(dn==null?void 0:dn.top)===Mn&&(dn==null?void 0:dn.height)===er?dn:{top:Mn,height:er})},zr=(Ce="")=>{const _t=An(),At=!ui();Wt(pr&&At&&!tt.current?`历史模式 · 距底 ${_t.baseY-_t.viewportY}/${_t.baseY} 行${nn?" · 拉取中":""}${Ce}`:"")},as=()=>An().viewportY>=An().baseY,ui=()=>An().baseY-An().viewportY<=EV,Tr=()=>{var Ce;return b4(An().viewportY,(Ce=ft.querySelector(".xterm-viewport"))==null?void 0:Ce.scrollTop)},Sr=()=>{!zt||Tn||(Tn=!0,He=!1,Lt==null||Lt.pause(),$n&&clearTimeout($n),$n=setTimeout(()=>{$n=null,!Se&&zt&&Tn&&(Lt==null||Lt.suspend())},jV),q("paused"))},Xr=()=>{var yn;if(!pr||nn||Date.now()<Fr||rr>=Cd||!Tr()||zt&&!Tn)return;Sr(),bs(),(yn=Z.current)==null||yn.call(Z);const Ce=rr,_t=Math.min(Math.floor(rr/C_)*C_+C_,Cd),At=Ys(_t,!0,!0);zr(),At.then(Pn=>{Pn&&!Se&&rr===Ce?rr=_t:!Pn&&!Se&&(Fr=Date.now()+500)})};let Cr=0;const Jr=()=>{Y.current&&(Y.current.deco.dispose(),Y.current.marker.dispose(),Y.current=null)},Ri=()=>{const Ce=Le.buffer.active;if(zt&&He)return{cur:{row:Math.max(0,Le.rows-1-Ce.cursorY),col:Ce.cursorX,vis:Je},line:Ce.baseY+Ce.cursorY,liveOwned:!0};const _t=Vr;return{cur:_t,line:_t?ne-1-(_t.row|0):null,liveOwned:!1}},Ti=()=>{if(Se)return;const{cur:Ce,line:_t,liveOwned:At}=Ri(),yn=Le.buffer.active;if(!(Ce&&(Ce.vis||_n.current)&&tt.current&&yn.viewportY<yn.baseY)){Jr(),At||Le.write(ew(Ce,Le.rows,ne,_n.current)),vi();return}At||Le.write("\x1B[?25l"),Jr();const er=Le.registerMarker(_t-(yn.baseY+yn.cursorY));if(!er){vi();return}const Mn=Le.registerDecoration({marker:er,x:Math.max(0,Ce.col|0),width:1});if(!Mn){er.dispose(),vi();return}Mn.onRender(Bt=>{Bt.classList.add("cursor-deco")}),Y.current={deco:Mn,marker:er},vi()},os=()=>{Q.current&&(Q.current.deco.dispose(),Q.current.marker.dispose(),Q.current=null)},vi=()=>{os();const{cur:Ce,line:_t}=Ri();if(Se||!z.current||!tt.current||!Ce)return;const At=Le.buffer.active,yn=Le.registerMarker(_t-(At.baseY+At.cursorY));if(!yn)return;const Pn=Le.registerDecoration({marker:yn,x:0,width:Le.cols});if(!Pn){yn.dispose();return}Pn.onRender(er=>{er.classList.add("locate-deco")}),Q.current={deco:Pn,marker:yn}};X.current=vi;const fa=()=>{if(Se||!kr||kr.alt)return Promise.resolve();const{seed:Ce,contentRows:_t}=kr,At=_t<Le.rows?F1(_t,Le.rows):0;if(_t+At===ne)return Promise.resolve();const yn=At?`
282
+ `.repeat(At)+Ce:Ce;return ne=yn.split(`
283
+ `).length,new Promise(Pn=>Le.write("\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H"+yn,()=>{if(!Se){Le.scrollToBottom();try{On(Le)}catch{}}Pn()}))},W=(Ce=st)=>Ce!==st?Promise.resolve():zt?(ue=!0,gt&&fr({immediate:!gr}),Promise.resolve()):fa(),he=(Ce=0,_t=st)=>{if(Se||_t!==st||!b.current||!Le.rows)return;const At=b.current.parentElement,yn=At==null?void 0:At.getBoundingClientRect();if(At&&yn){const Er=Math.ceil(Math.max(0,-yn.top))+1;At.style.setProperty("--terminal-overlay-top",`${Er}px`)}const er=(ft.querySelector(".xterm")||b.current).getBoundingClientRect(),Mn=Math.min(er.bottom,window.innerHeight-(v.current||0)),Bt=Math.max(er.top,0),dn=Math.max(0,Mn-Bt),Br=ft.querySelector(".xterm-screen"),gi=Br==null?void 0:Br.getBoundingClientRect(),Ai=(gi==null?void 0:gi.height)||0,_s=b.current.scrollWidth>b.current.clientWidth+1||!!gi&&gi.width>b.current.clientWidth+1;if(we(Er=>Er===_s?Er:_s),Hr(),!dn||!Ai){zt&&W(_t);return}At==null||At.style.setProperty("--vis-h",`${dn}px`),v.current===0&&(Ht.current=dn);const Mi=Ai/Le.rows;if(pt.current&&Cr){pt.current=!1;const Er=Le.options.fontSize||14,Gn=Math.max(8,Math.min(40,Math.round(Er*(Ht.current||dn)/(Cr*Mi))));if(en.current=!0,G.current=Gn,Ld(Gn),Gn!==Er){Le.options.fontSize=Gn,requestAnimationFrame(()=>he(Ce,_t));return}}if(en.current&&Cr){const Er=Math.floor((Ht.current||dn)/Mi),Gn=Le.options.fontSize||14;if(Er<Cr&&Gn>8){G.current=Gn-1,Ld(Gn-1),Le.options.fontSize=Gn-1,requestAnimationFrame(()=>he(Ce,_t));return}en.current=!1,G.current=Gn,Ld(Gn)}if(v.current===0&&G.current==null&&Cr&&Ce<4){const Er=Cr*Mi;if(Er>dn+4){const Gn=Le.options.fontSize||14,ws=Math.max(6,Math.round(Gn*(dn/Er)));if(ws<Gn){Le.options.fontSize=ws,requestAnimationFrame(()=>he(Ce+1,_t));return}}}const va=g4(dn,Mi);if(va!==Le.rows){Le.write(`\x1B[?25l\x1B[${Le.rows};1H`,()=>{if(!(Se||_t!==st)){if(Le.resize(Le.cols,va),Hr(),tt.current){const Er=I1(Vr,ne),Gn=()=>{const ws=Er==null?null:x_({cursorLine:Er,viewportY:An().viewportY,visibleRows:Le.rows,baseY:An().baseY,armed:!0});ws!=null&&Le.scrollToLine(ws)};v.current>0?(Le.scrollToTop(),Gn()):It.current?(It.current=!1,Gn()):Le.scrollToTop()}else Tn||Le.scrollToBottom();Ce<4?requestAnimationFrame(()=>he(Ce+1,_t)):W(_t).then(()=>{!Se&&_t===st&&(Ti(),zt||sr())})}});return}W(_t).then(()=>{!Se&&_t===st&&(Ti(),zt||sr())})},pe=()=>{const Ce=++st;zt&&(ue=!1),yt!=null&&cancelAnimationFrame(yt),yt=requestAnimationFrame(()=>{yt=null,he(0,Ce)})};it.current=pe;const Be=()=>{const Ce=++xn;st+=1,yt!=null&&(cancelAnimationFrame(yt),yt=null),zt&&(ue=!1),Kt!=null&&cancelAnimationFrame(Kt);let _t="",At=0;const yn=()=>{if(Se||Ce!==xn)return;const Pn=window.visualViewport,er=[Math.round(v.current),Math.round((Pn==null?void 0:Pn.height)??window.innerHeight),Math.round((Pn==null?void 0:Pn.offsetTop)??0)].join(":");if(At=er===_t?At+1:0,_t=er,At>=2){Kt=null,pe();return}Kt=requestAnimationFrame(yn)};Kt=requestAnimationFrame(yn)};Pt.current=Be;const dt=()=>{zt?Be():pe()};window.addEventListener("resize",dt),window.addEventListener("orientationchange",dt);let qt=((Nl=b.current)==null?void 0:Nl.clientHeight)||0;const jt=typeof ResizeObserver<"u"?new ResizeObserver(()=>{var At;const Ce=((At=b.current)==null?void 0:At.clientHeight)||0;if(!Ce)return;const _t=Ce>qt;qt=Ce,_t&&dt()}):null;jt&&b.current&&jt.observe(b.current);const an=cV({term:Le,host:b.current,screenHost:ft,desktop:D,activeRef:Rt,actionsRef:Xt,setUI:Ve,setInfo:Te}),wn=bV({term:Le,host:b.current,desktop:D,pane:i,fontRef:G,selection:an,selectionActiveRef:Rt,stopFlingRef:Z,getStreamExact:()=>!1,getAltScreen:()=>tt.current,getMouseAware:()=>ot.current,onActivity:()=>{un=Date.now()},onUserScroll:()=>{w.current=!0},showScrollPosition:zr,maybePullMore:Xr,scheduleFit:pe,wake:()=>{var Ce;return(Ce=Ut.current)==null?void 0:Ce.call(Ut)},onTap:()=>{var Ce;return(Ce=S.current)==null?void 0:Ce.call(S)},onKeepKeyboard:()=>{var Ce;return((Ce=R.current)==null?void 0:Ce.call(R))??!1}});bs=wn.freezeHistoryGesture,Qi=wn.settleHistoryAnchor;const On=Ce=>{for(const{deco:yn,marker:Pn}of P.current)yn.dispose(),Pn.dispose();if(P.current=[],!K.current||!B.current)return;const _t=Ce.buffer.active,At=_t.baseY+_t.cursorY;for(const{y:yn,x:Pn,width:er}of p4(Ce)){const Mn=Ce.registerMarker(yn-At);if(!Mn)continue;const Bt=Ce.registerDecoration({marker:Mn,x:Pn,width:er});if(!Bt){Mn.dispose();continue}Bt.onRender(dn=>{dn.classList.add("doc-deco")}),P.current.push({deco:Bt,marker:Mn})}};F.current=()=>{!Se&&pr&&On(Le)};const Vn=Ce=>{const _t=tt.current,At=!!Ce.alt;return tt.current=At,ot.current=!!Ce.mouseAware,ve(yn=>yn===At?yn:At),_t!==At&&pe(),_t&&!At},Qn=()=>{if(!zt||v.current<=0||!tt.current)return;const Ce=An(),_t=x_({cursorLine:Ce.baseY+Ce.cursorY,viewportY:Ce.viewportY,visibleRows:Le.rows,baseY:Ce.baseY,armed:C.current});_t!=null&&Le.scrollToLine(_t)},gn=()=>{if(se=null,Se||!zt||!gt||!ue||Tn||!Wn||Rt.current)return;if(on){Yt=!0;return}const Ce=Wn.snapshot();if(!Ce)return;const _t=st;on=!0,Yt=!1,vt=Date.now();const At=!pr,yn=!At&&!as(),Pn=yn?An().length-An().viewportY:0;Ce.paneCols&&Ce.paneCols!==Le.cols&&Le.resize(Ce.paneCols,Le.rows);const er=Ce.alt?0:Math.max(0,Le.rows-Ce.bufferRows),Mn=er?`\r
284
+ `.repeat(er):"",Bt=Ce.cursorVisible||_n.current,dn=Ce.cur?ew(Ce.cur,Le.rows,Ce.bufferRows+er,_n.current):Bt?"\x1B[?25h":"\x1B[?25l";Le.write(`\x1B[?1049l\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H${Mn}${Ce.ansi}${dn}`,()=>{if(Se||!zt){on=!1;return}if(!ue||_t!==st){on=!1;return}const Br=Vn(Ce);Cr=Ce.paneRows,ne=Ce.bufferRows+er,Vr=null,Je=Ce.cursorVisible,He=!0,zn=Number.isFinite(Ce.boundaryLine)&&Ce.boundaryLine>0?Ce.boundaryLine+er:null,Ce.cursorVisible&&(_n.current=!1),yn?Le.scrollToLine(Math.max(0,An().length-Pn)):Ce.alt&&At?Le.scrollToTop():Le.scrollToBottom(),pr=!0,me(!1),Cn(wc(ln,"ok"));try{On(Le)}catch{}Kr(),Ti(),Qn(),sr(),on=!1,Br&&(Lt==null||Lt.resync()),(Yt||Wn.revision>Ce.revision)&&fr()})};fr=({immediate:Ce=!1}={})=>{if(Se||Tn||!ue||(Ce&&Ae!=null&&(clearTimeout(Ae),Ae=null),se!=null||Ae!=null))return;const _t=SV({now:Date.now(),lastPaintAt:vt,immediate:Ce});if(_t>0){Ae=setTimeout(()=>{Ae=null,fr()},_t);return}se=requestAnimationFrame(gn)};const ur=async Ce=>{if(Se||!Wn)return;const _t=vr&&!zt;Sn&&(clearTimeout(Sn),Sn=null),gt=!1,He=!1,Je=!1,Tn=!1,ir=null,rr=Math.max(ci(),Number(Ce.historyLines)||0),_t||(Ze=!gr||Ce.width!==Le.cols||Ce.height!==Cr||!!Ce.alt!==tt.current,Cr=Ce.height,tt.current=!!Ce.alt,ot.current=!!Ce.mouseAware,ve(At=>At===!!Ce.alt?At:!!Ce.alt)),await Wn.seed(Ce),!Se&&(_t||(Nn=Ce.ansi,es="",Vr=null,me(!1)))},xr=async Ce=>{Se||!Wn||(await Wn.data(Ce),!Se&&gt&&!Tn&&fr())},Ts=async({cur:Ce})=>{if(Se||!Wn)return;const _t=vr&&!zt;_t||(Je=!!(Ce!=null&&Ce.vis),es=Ce?`${Ce.row},${Ce.col},${Ce.vis?1:0}`:""),await Wn.ready(Ce),!Se&&(gt=!0,_t||(Ze?pe():fr({immediate:!0}),setTimeout(()=>{!Se&&gt&&!gr&&(ue=!0,fr({immediate:!0}))},400)))},Ys=async(Ce,_t,At=!1)=>{var Mn;if(nn||Se)return!1;nn=!0;const yn=zt,Pn=Date.now();let er=_t?An().length-An().viewportY:0;try{const Bt=await E3(i,Ce,ir);if(Se||!yn&&zt||(Ir.sample({ok:!0,rttMs:Date.now()-Pn}),Cn(wc(ln,"ok")),Rt.current))return!1;if(Bt.unchanged)return me(_t),!0;_t&&At&&(er=An().length-An().viewportY),ir=Bt.hash,tt.current=!!Bt.alt,ot.current=!!Bt.mouseAware,ve(Gn=>Gn===!!Bt.alt?Gn:!!Bt.alt),un=Date.now();let dn=!1;Bt.width&&Bt.width!==Le.cols&&(Le.resize(Bt.width,Le.rows),dn=!0);const Br=Cr;Bt.height&&(Cr=Bt.height);const gi=!pr,Ai=Bt.cur?`${Bt.cur.row},${Bt.cur.col},${Bt.cur.vis?1:0}`:"";if(!dn&&!gi&&Bt.ansi===Nn&&Ai===es)return me(_t),!0;const _s=KE(Bt.ansi),Mi=_s?_s.split(`
285
+ `).length:0;kr={seed:_s,contentRows:Mi,alt:Bt.alt};const va=!Bt.alt&&Mi<Le.rows?F1(Mi,Le.rows):0,Er=va?`
286
+ `.repeat(va)+_s:_s;if(ne=Er?Er.split(`
287
+ `).length:0,await new Promise(Gn=>Le.write("\x1B[?25l\x1B[0m\x1B[2J\x1B[3J\x1B[H"+Er,Gn)),Se)return!1;if(Tn&&Number.isFinite(Bt.historyLines)&&(zn=Bt.historyLines,Kr()),Nn=Bt.ansi,es=Ai,Vr=Bt.cur,Bt.cur&&Bt.cur.vis&&(_n.current=!1),_t){const Gn=Math.max(0,An().length-er);At?Qi(Gn):Le.scrollToLine(Gn)}else tt.current&&gi?Le.scrollToTop():Le.scrollToBottom();if(tt.current&&v.current>0){Ai!==T.current&&(gi||(C.current=!0),T.current=Ai);const Gn=I1(Bt.cur,ne);if(Gn!=null){const ws=x_({cursorLine:Gn,viewportY:An().viewportY,visibleRows:Le.rows,baseY:An().baseY,armed:C.current});ws!=null&&Le.scrollToLine(ws)}}Hr(),pr=!0;try{On(Le)}catch{}return me(_t),Ti(),(dn||gi||Cr!==Br)&&pe(),gi&&setTimeout(sr,400),!0}catch(Bt){return Ir.sample({ok:!1,rttMs:Date.now()-Pn}),Bt instanceof li?(Mn=A.current)==null||Mn.call(A):Se||Cn(wc(ln,"fail")),!1}finally{nn=!1,!Se&&pr&&zr(),Xn&&!Se&&(Xn=!1,$r())}},Lr=async()=>{if(!(nn||Se)&&!Rt.current){if(pr&&!ui()&&!tt.current){me(!0);return}rr=ci(),await Ys(rr,!as())}};let Hi=0;async function qs(Ce){if(!Se&&Ce===Hi&&await Lr(),Se||document.hidden||Ce!==Hi)return;const _t=ln.failCount>0?c4(ln.failCount):d4(Date.now()-un,V.current);tn=setTimeout(()=>qs(Ce),_t)}const $r=()=>{Hi+=1,tn&&(clearTimeout(tn),tn=null),qs(Hi)},zi=async(Ce="network")=>{var At;if(Se||!zt)return;zt=!1,vr=!1,Tn=!1,$n&&(clearTimeout($n),$n=null),gt=!1,Yt=!1,se!=null&&(cancelAnimationFrame(se),se=null),Ae!=null&&(clearTimeout(Ae),Ae=null);const _t=(At=Lt==null?void 0:Lt.suspend)==null?void 0:At.call(Lt);q("off"),ke(Ce),Ir.setMode("snapshot",{fallback:!0}),Cn(wc(ln,"reset"));try{await _t}catch{}Se||(pe(),$r())},pa=Ce=>{if(!Se){if(q(Ce),Ir.status(Ce),Ce==="live"){if(ki=!0,Sn&&(clearTimeout(Sn),Sn=null),vr&&!zt){if(document.hidden||Rt.current||pr&&!ui()){vr=!1,gt=!1,Lt==null||Lt.suspend(),q("off");return}vr=!1,zt=!0,Tn=!1,Hi+=1,tn&&(clearTimeout(tn),tn=null),Ir.setMode("live"),ke(null),Cn(wc(ln,"reset")),pe()}return}if(!(Ce!=="reconnecting"&&Ce!=="error")){if(vr&&!zt){vr=!1,Lt==null||Lt.suspend(),q("off");return}zt&&!Sn&&(Sn=setTimeout(()=>zi(ki?"network":"unavailable"),1200))}}},Do=async()=>{if(Wn||(Wn=P4({scrollback:Cd+100})),Lt){Lt.resync();return}Lt=L4({pane:i,onSeed:ur,onData:xr,onReady:Ts,onStatus:pa,onProbe:Ce=>Ir.sample(Ce),onAuthFail:()=>{var Ce;return(Ce=A.current)==null?void 0:Ce.call(A)}})};pi=()=>{const Ce=Ir.peek();Se||zt||vr||!l||document.hidden||Ce.mode!=="snapshot"||Ce.stableQuality!=="good"||Rt.current||pr&&!ui()||(vr=!0,Do().catch(()=>{Se||(vr=!1,Ir.status("error"),q("off"))}))},zt?Do().catch(()=>zi("unavailable")):$r();const Li=()=>{!zt||Se||(Tn=!1,$n&&(clearTimeout($n),$n=null),gt=!1,He=!1,zn=null,Rr(),me(!1),Wt(""),q("connecting"),Lt==null||Lt.resync())};hn.current=Li;const Ha=()=>{if(un=Date.now(),_n.current=!0,Ti(),zt){Tn?Li():fr();return}if(nn){Xn=!0;return}$r()};Ut.current=Ha;const ko=()=>{if(zt){if(document.hidden)yr=Date.now(),Jt=!1,Lt==null||Lt.pause(),hr&&clearTimeout(hr),hr=setTimeout(()=>{hr=null,!Se&&document.hidden&&zt&&(Jt=!0,Lt==null||Lt.suspend())},G1);else{const Ce=yr===null?0:Date.now()-yr;yr=null,hr&&(clearTimeout(hr),hr=null),Ce>=G1&&!Jt&&(Lt==null||Lt.suspend()),Jt=!1,Tn||Li()}return}document.hidden?(Hi+=1,tn&&(clearTimeout(tn),tn=null)):(Cn(wc(ln,"reset")),rr=ci(),un=Date.now(),$r())};document.addEventListener("visibilitychange",ko);const za=()=>{if(!Se&&(Hr(),!on)){if(as()){me(!1),Wt(""),Tn?Li():pi();return}if(zt&&Tn&&ui()){Li();return}zt&&!ui()&&!tt.current&&Sr(),me(zt?Tn:!ui()),zr(),Xr()}},Lc=Le.onScroll(za),Zr=ft.querySelector(".xterm-viewport");return Zr==null||Zr.addEventListener("scroll",za),()=>{Se=!0,it.current=null,Pt.current=null,Ut.current=null,hn.current=null,F.current=null,wn.dispose(),Z.current=null,an.dispose(),tn&&clearTimeout(tn),st+=1,xn+=1,yt!=null&&cancelAnimationFrame(yt),Kt!=null&&cancelAnimationFrame(Kt),Sn&&clearTimeout(Sn),hr&&clearTimeout(hr),$n&&clearTimeout($n),Lt==null||Lt.close(),Wn==null||Wn.dispose(),Wn=null,document.removeEventListener("visibilitychange",ko),window.removeEventListener("resize",dt),window.removeEventListener("orientationchange",dt),jt==null||jt.disconnect(),Lc.dispose(),Zr==null||Zr.removeEventListener("scroll",za),se!=null&&cancelAnimationFrame(se),Ae!=null&&clearTimeout(Ae),Ir.destroy();for(const{deco:Ce,marker:_t}of P.current)Ce.dispose(),_t.dispose();P.current=[],Jr(),os(),Rr(),X.current=null,Bn(),c.current=null,p.current=null}},[i,D,l]);const jn=()=>{var ct,ft,Le,Ct,Bn;(ct=Z.current)==null||ct.call(Z);const Se=(ft=b.current)==null?void 0:ft.querySelector(".terminal__live .xterm-viewport");Se&&(Se.scrollTop=Se.scrollHeight),(Le=c.current)==null||Le.scrollToBottom(),me(!1),Wt(""),(Ct=hn.current)==null||Ct.call(hn),(Bn=Ut.current)==null||Bn.call(Ut)},Nr=async Se=>{var Ct;const ct=c.current,ft=ct==null?void 0:ct.buffer.active,Le=Se==="up"?-1:1;if(ct&&ft&&ej(ft.viewportY,ft.baseY,Le)==="internal"){ct.scrollLines(Le*Math.max(1,ct.rows-1)),w.current=!0;return}try{await Jd(i,[Se==="up"?"PageUp":"PageDown"]),(Ct=Ut.current)==null||Ct.call(Ut)}catch{}},Or=()=>{var ct;const Se=!Ne;Qe(Se),z.current=Se,(ct=X.current)==null||ct.call(X)},ce=()=>{var Se;pt.current=!0,(Se=it.current)==null||Se.call(it)},rt=()=>{var Se;(Se=c.current)==null||Se.clearSelection(),Rt.current=!1,Ve(null),Te("")};nr(!!Ie,rt),nr(nt,()=>xe(!1)),L.useEffect(()=>{if(!nt)return;at(Date.now());const Se=setInterval(()=>at(Date.now()),1e3);return()=>clearInterval(Se)},[nt]);const mt=async()=>{const Se=c.current,ct=tj((Se==null?void 0:Se.getSelection())??"");if(ct){let ft=!1;if(navigator.clipboard&&window.isSecureContext)try{await navigator.clipboard.writeText(ct),ft=!0}catch{}if(!ft){const Le=document.createElement("textarea");Le.value=ct,Le.style.cssText="position:fixed;top:0;left:0;opacity:0",document.body.appendChild(Le),Le.focus(),Le.select();try{document.execCommand("copy")}catch{}document.body.removeChild(Le)}}rt()};return o.jsxDEV("div",{className:"terminal-wrap",children:[o.jsxDEV("div",{ref:b,className:`terminal${Gt?"":" terminal--loading"}${D?" desktop-input":""}${Rn?" terminal--x-overflow":""}${lt?" terminal--y-overflow":""}${fe.mode==="live"?" terminal--stream":""}`,onClick:()=>xe(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1565,columnNumber:7},this),Ye&&o.jsxDEV("div",{className:`terminal-y-scrollbar${Rn?" has-x":""}`,"aria-hidden":"true",children:o.jsxDEV("span",{style:{top:`${Ye.top}px`,height:`${Ye.height}px`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1572,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1571,columnNumber:9},this),o.jsxDEV($4,{ready:Gt,connectionInfo:fe,configuredTransport:l?"live":"snapshot",transportFallback:Oe,transportOpen:nt,transportNow:$e,onTransportToggle:()=>{at(Date.now()),xe(Se=>!Se)},connected:Ue,inputFailure:Ge,dbgVisible:Fe,dbg:ye,scrollInfo:Nt,selInfo:oe,onResume:jn,altScreen:bt,onPageScroll:Nr,onFitScreen:ce,locateOn:Ne,onToggleLocate:Or,selUI:Ie,onCopy:mt,selActionsRef:Xt,termRef:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1575,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Terminal.jsx",lineNumber:1564,columnNumber:5},this)}),kV=[["esc","tab","tilde","slash","up","at","del"],["ctrl","shift","alt","left","down","right","enter"]],Yd=["ctrl","shift","alt"],nw={kbd:"⌨",esc:"Esc",up:"▲",tab:"Tab",ctrl:"Ctrl",shift:"Shift",del:"⌫",left:"◀",down:"▼",right:"▶",alt:"Alt",slash:"/",tilde:"~",at:"@",enter:"Enter"},RV=new Set(["up","down","left","right","del"]),Y1={esc:"Escape",tab:"Tab",del:"BSpace",enter:"Enter",up:"Up",down:"Down",left:"Left",right:"Right"},q1={slash:"/",tilde:"~",at:"@"};function TV(n){return n in Y1?{kind:"key",name:Y1[n]}:n in q1?{kind:"text",ch:q1[n]}:null}const rw="off",Iw="armed",iw="locked",Pa=n=>n===Iw||n===iw,LV=n=>Yd.some(i=>Pa(n[i]));function sw(n){const i={};for(const l of Yd)i[l]=n[l]===Iw?rw:n[l]??rw;return i}function cj(n,i){if(!n||!LV(i))return n;const l=Pa(i.ctrl),h=Pa(i.shift),x=Pa(i.alt);if(h&&n.kind==="key"){if(n.name==="Tab")return{kind:"key",name:"BTab"};if(["Up","Down","Left","Right"].includes(n.name))return{kind:"key",name:`S-${n.name}`}}return(l||x)&&n.kind==="text"&&/^[a-z0-9]$/i.test(n.ch)?{kind:"key",name:`${l?"C":"M"}-${n.ch.toLowerCase()}`}:n}const AV={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"},MV={Escape:"Esc",BSpace:"⌫",Space:"Space",PageUp:"PgUp",PageDown:"PgDn"};function UV(n,i){const l=!!n.ctrl,h=!!n.shift,x=!!n.alt,D=(i||"").trim();if(!D)return null;const _=[];l&&_.push("Ctrl"),h&&_.push("Shift"),x&&_.push("Alt");const s=f=>[..._,f].join("+"),u=AV[D.toLowerCase()];return u?{name:u==="Tab"&&h&&!l&&!x?"BTab":(l?"C-":"")+(x?"M-":"")+(h?"S-":"")+u,label:s(MV[u]||u)}:D.length!==1||!l&&!x&&!h?null:l||x?{name:(l?"C-":"")+(x?"M-":"")+D.toLowerCase(),label:s(D.toUpperCase())}:{name:D.toUpperCase(),label:s(D.toUpperCase())}}function OV(n,{delay:i=400,interval:l=120}={}){let h=null,x=null;const D=()=>{h&&clearTimeout(h),x&&clearInterval(x),h=null,x=null};return{start:()=>{D(),n(),h=setTimeout(()=>{x=setInterval(n,l)},i)},stop:D}}const K1={up:"Up",down:"Down",left:"Left",right:"Right",tilde:"Tilde",slash:"Slash",at:"At",del:"Backspace"},uj=n=>{n.cancelable&&n.preventDefault()},VV=500;function BV({onKey:n,onText:i,mods:l,setMods:h,keyHeldRef:x}){const D=L.useRef(l);D.current=l;const _=u=>{const f=TV(u);if(!f)return;const g=Yd.some(y=>Pa(D.current[y])),d=g?cj(f,D.current):f;d.kind==="key"?n(d.name):i(d.ch),g&&h(sw)},s=u=>Yd.includes(u)?o.jsxDEV(IV,{id:u,state:l[u],setMods:h},u,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:43,columnNumber:40},this):o.jsxDEV(FV,{id:u,dispatch:_,keyHeldRef:x},u,!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:kV.flat().map(s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:49,columnNumber:10},this)}const PV=300;function IV({id:n,state:i,setMods:l}){const h=L.useRef(-1/0),x=_=>{const s=_.timeStamp||0;if(s-h.current<PV){h.current=-1/0,l(u=>({...u,[n]:iw}));return}h.current=s,l(u=>({...u,[n]:Pa(u[n])?rw:Iw}))},D=i===iw?" locked":Pa(i)?" armed":"";return o.jsxDEV("button",{type:"button",className:`keybar-key keybar-mod${D}`,"data-key":n,"data-state":i,"aria-pressed":Pa(i),"aria-label":nw[n],onPointerDown:uj,onClick:x,children:nw[n]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:75,columnNumber:5},this)}function FV({id:n,dispatch:i,keyHeldRef:l}){const h=L.useRef(null),x=L.useRef(i);x.current=i;const D=L.useRef(null),_=N=>{l&&(l.current=N)},s=nw[n];if(!RV.has(n))return o.jsxDEV("button",{type:"button",className:"keybar-key","data-key":n,"aria-label":K1[n]||s,onPointerDown:uj,onClick:()=>i(n),children:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:94,columnNumber:12},this);const u=()=>{const N=D.current;N!=null&&N.guard&&(clearTimeout(N.guard),N.guard=null)},f=N=>{N.cancelable&&N.preventDefault(),h.current||(h.current=OV(()=>x.current(n)));const k={x:N.clientX,y:N.clientY,held:!1,moved:!1,guard:null};k.guard=setTimeout(()=>{k.held=!0,k.guard=null,h.current.start()},VV),D.current=k,_(!0)},g=N=>{const k=D.current;!k||k.held||(Math.abs(N.clientX-k.x)>8||Math.abs(N.clientY-k.y)>8)&&(k.moved=!0,u(),_(!1))},d=()=>{const N=D.current;_(!1),N&&(u(),N.held?h.current.stop():N.moved||x.current(n),D.current=null)},y=()=>{var N;_(!1),u(),(N=D.current)!=null&&N.held&&h.current.stop(),D.current=null};return o.jsxDEV("button",{type:"button",className:"keybar-key","data-key":n,"aria-label":K1[n]||s,onPointerDown:f,onPointerMove:g,onPointerUp:d,onPointerCancel:y,onPointerLeave:y,children:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/KeyBar.jsx",lineNumber:130,columnNumber:5},this)}const dj=n=>`hm_favs7_${n}`,HV=n=>`hm_favs6_${n}`,hj="command",aw=n=>n?`command@${n}`:hj,zV={command:[],agent:[]},X1={ESC:{kind:"key",text:"Escape",label:"Esc"},Esc:{kind:"key",text:"Escape",label:"Esc"},Tab:{kind:"key",text:"Tab",label:"Tab"},"⌫":{kind:"key",text:"BSpace",label:"⌫"}};function $V(n,i){return i.map(l=>l.kind!=="key"&&X1[l.text]?{...X1[l.text]}:l.kind==="key"?{kind:"key",text:l.text,label:l.label||l.text}:{kind:l.kind,text:l.text,enter:n==="agent"?!0:!!l.enter})}function oi(n){try{const i=localStorage.getItem(dj(n));if(i)return JSON.parse(i);const l=localStorage.getItem(HV(n));if(l){const h=$V(n,JSON.parse(l));return jo(n,h),h}}catch{}return(zV[n]||[]).map(i=>({...i}))}function jo(n,i){try{localStorage.setItem(dj(n),JSON.stringify(i))}catch{}return i}function Fw(n){return n.kind==="key"?{kind:"key",text:n.text,label:n.label}:{kind:n.kind,text:n.text,enter:!!n.enter}}function mj(n,i){const l=oi(n),h=kn(i);return l.some(D=>kn(D)===h)?{ok:!1,reason:"conflict",items:l}:{ok:!0,items:jo(n,[...l,Fw(i)])}}function WV(n,i){return mj(n,i).items}function GV(n,i){return jo(n,oi(n).filter(l=>l.text!==i))}function YV(n,i){return jo(n,oi(n).filter(l=>kn(l)!==i))}function fj(n,i,l){const h=oi(n),x=h.findIndex(s=>kn(s)===i);if(x<0)return{ok:!1,reason:"missing",items:h};const D=kn(l);if(h.some((s,u)=>u!==x&&kn(s)===D))return{ok:!1,reason:"conflict",items:h};const _=h.slice();return _[x]=Fw(l),{ok:!0,items:jo(n,_)}}function qV(n,i,l,h){if(n===l)return fj(n,i,h);const x=oi(n),D=oi(l);if(!x.some(f=>kn(f)===i))return{ok:!1,reason:"missing",source:x,target:D};const _=kn(h);if(D.some(f=>kn(f)===_))return{ok:!1,reason:"conflict",source:x,target:D};const s=jo(n,x.filter(f=>kn(f)!==i)),u=jo(l,[...D,Fw(h)]);return{ok:!0,source:s,target:u}}function KV(n,i,l){const h=oi(n),x=h.findIndex(s=>kn(s)===i),D=h.findIndex(s=>kn(s)===l);if(x<0||D<0||x===D)return h;const _=h.slice();return[_[x],_[D]]=[_[D],_[x]],jo(n,_)}const XV=n=>{var i;try{(i=navigator.clipboard)==null||i.writeText(n)}catch{}};function JV({open:n,mode:i,recent:l=[],onSend:h,onFill:x,onClose:D,onDelete:_,historyOnly:s=!1}){const[u,f]=L.useState(()=>oi(i)),g=L.useRef(null),[d,y]=L.useState(i);if(d!==i&&(y(i),f(oi(i))),!n)return null;const N=s?[]:u.filter(p=>p.kind==="reply"),k=s?[]:u.filter(p=>p.kind==="cmd"),b=()=>{var w;const p=(((w=g.current)==null?void 0:w.value)||"").trim();if(!p)return;const v=i==="agent"&&!p.startsWith("/")?"reply":"cmd";f(WV(i,{kind:v,text:p})),g.current&&(g.current.value="")},c=p=>f(GV(i,p));return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:D},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${s?" history":""}`,role:"dialog","aria-label":M("fav.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:M(s?"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:D,"aria-label":M("common.close"),children:o.jsxDEV(Gs,{},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:[s&&o.jsxDEV("div",{className:"cmd-hint",children:M("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(p=>o.jsxDEV("span",{className:"fav-chip",onClick:()=>h(p.text),onContextMenu:v=>{v.preventDefault(),c(p.text)},children:p.text},p.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),k.map(p=>o.jsxDEV("div",{className:"cmd-row",children:[o.jsxDEV("span",{className:"cmd-text",onClick:()=>h(p.text),onDoubleClick:()=>x(p.text),children:p.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:()=>c(p.text),"aria-label":M("common.delete"),children:o.jsxDEV(Gs,{},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)]},p.text,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:52,columnNumber:13},this)),l.map(p=>o.jsxDEV("div",{className:"cmd-row",children:[o.jsxDEV("span",{className:"cmd-text",onClick:()=>h(p),onDoubleClick:()=>x(p),children:p},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:()=>XV(p),"aria-label":M("common.copy"),children:o.jsxDEV(SE,{},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),_&&o.jsxDEV("button",{className:"cmd-del",onClick:()=>_(p),"aria-label":M("common.delete"),children:o.jsxDEV(Gs,{},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:${p}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:58,columnNumber:13},this)),s&&l.length===0&&o.jsxDEV("div",{className:"cmd-empty",children:M("history.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FavDrawer.jsx",lineNumber:66,columnNumber:50},this),!s&&o.jsxDEV("div",{className:"fav-add",children:[o.jsxDEV("input",{ref:g,className:"fav-add-input",placeholder:M("fav.addPlaceholder"),onKeyDown:p=>{p.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:M("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 pj=n=>`hm_shortcut_layout1_${n}`,J1=()=>({hidden:[],order:[]}),qd=n=>[...new Set(Array.isArray(n)?n.filter(i=>typeof i=="string"&&i):[])],yl=n=>({hidden:qd(n==null?void 0:n.hidden),order:qd(n==null?void 0:n.order)});function dl(n){try{const i=localStorage.getItem(pj(n));return i?yl(JSON.parse(i)):J1()}catch{return J1()}}function ZV(n,i){const l=yl(i);try{localStorage.setItem(pj(n),JSON.stringify(l))}catch{}return l}function Rc(n,i){const l=yl(i),h=new Set(l.hidden),x=new Map((Array.isArray(n)?n:[]).map(_=>[kn(_),_])),D=[];for(const _ of l.order)h.has(_)||!x.has(_)||(D.push(x.get(_)),x.delete(_));for(const[_,s]of x)h.has(_)||D.push(s);return D}function QV(n,i,l,h){const x=yl(n),D=Rc(i,n).map(kn),_=D.indexOf(l),s=_+(h<0?-1:1);if(_<0||s<0||s>=D.length)return x;[D[_],D[s]]=[D[s],D[_]];const u=new Set(x.hidden),f=new Set(D);let g=0;const d=[];for(const y of x.order)u.has(y)?d.push(y):f.has(y)&&d.push(D[g++]);return d.push(...D.slice(g)),{...x,order:qd(d)}}function eB(n,i,l){const h=yl(n),x=Rc(i,h).map(kn);return{hidden:qd([...h.hidden,l]),order:x}}function Ad(n,i){const l=yl(n);return{...l,hidden:l.hidden.filter(h=>h!==i)}}function Z1(n,i){const l=yl(n);return{hidden:l.hidden.filter(h=>h!==i),order:l.order.filter(h=>h!==i)}}function tB(n,i,l){const h=Ad(n,l);return{hidden:h.hidden.filter(x=>x!==i),order:qd(h.order.map(x=>x===i?l:x))}}const Jf=[{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}}],nB=n=>Jf.find(i=>i.key===n)||Jf[0],rB=[["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"]],iB=[...rB.map(([n,i])=>({value:n,label:i})),..."abcdefghijklmnopqrstuvwxyz".split("").map(n=>({value:n,label:n.toUpperCase()})),..."0123456789".split("").map(n=>({value:n,label:n}))];function sB(n){let i=n.text||"";if(i==="BTab")return{sticky:"shift",base:"Tab"};let l=!1,h=!1,x=!1;i.startsWith("C-")&&(l=!0,i=i.slice(2)),i.startsWith("M-")&&(h=!0,i=i.slice(2)),i.startsWith("S-")&&(x=!0,i=i.slice(2)),!l&&!h&&!x&&i.length===1&&i>="A"&&i<="Z"&&(x=!0);const D=Jf.find(_=>!!_.mods.ctrl===l&&!!_.mods.shift===x&&!!_.mods.alt===h);return{sticky:D?D.key:"none",base:i.length===1?i.toLowerCase():i}}function Q1({value:n,options:i,onChange:l,placeholder:h}){const[x,D]=L.useState(!1),_=i.find(s=>s.value===n);return nr(x,()=>D(!1)),o.jsxDEV("div",{className:"cmd-dd",children:[o.jsxDEV("button",{type:"button",className:`cmd-dd-btn${x?" open":""}`,onClick:()=>D(s=>!s),"aria-haspopup":"listbox","aria-expanded":x,children:[o.jsxDEV("span",{className:_?void 0:"cmd-dd-ph",children:_?_.label:h},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:72,columnNumber:9},this),o.jsxDEV(Fa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:72,columnNumber:95},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:70,columnNumber:7},this),x&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-dd-scrim",onClick:()=>D(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:76,columnNumber:11},this),o.jsxDEV("div",{className:"cmd-dd-menu",role:"listbox",children:i.map(s=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":s.value===n,className:`cmd-dd-opt${s.value===n?" on":""}`,onClick:()=>{l(s.value),D(!1)},children:[o.jsxDEV("span",{children:s.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:82,columnNumber:17},this),s.value===n&&o.jsxDEV(op,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:83,columnNumber:39},this)]},s.value,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:79,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:77,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:75,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:69,columnNumber:5},this)}function aB({title:n,accent:i,items:l,showTitle:h=!0,onMove:x,onDel:D,onEdit:_}){return o.jsxDEV("div",{className:`cmd-esection ${i}`,children:[h&&o.jsxDEV("div",{className:`cmd-section ${i}`,children:o.jsxDEV("span",{className:"cmd-section-name",children:n},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:98,columnNumber:62},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:98,columnNumber:21},this),l.length===0&&o.jsxDEV("div",{className:"cmd-empty",children:M("cmd.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:99,columnNumber:30},this),l.map((s,u)=>o.jsxDEV("div",{className:"cmd-row",children:[s.source==="config"?o.jsxDEV("span",{className:"cmd-text cmd-fav-text",children:[s.kind==="key"&&s.label||s.text,s.kind!=="key"&&s.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:105,columnNumber:47},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:103,columnNumber:15},this):o.jsxDEV("button",{type:"button",className:"cmd-text cmd-fav-text",onClick:()=>_(s),children:[s.kind==="key"&&s.label||s.text,s.kind!=="key"&&s.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:109,columnNumber:47},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:107,columnNumber:15},this),o.jsxDEV("button",{className:"cmd-move up",disabled:u===0,onClick:()=>x(s,-1),"aria-label":M("cmd.moveUp"),children:o.jsxDEV(Fa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:112,columnNumber:42},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:111,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-move",disabled:u===l.length-1,onClick:()=>x(s,1),"aria-label":M("cmd.moveDown"),children:o.jsxDEV(Fa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:114,columnNumber:44},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:113,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-del",onClick:()=>D(s),"aria-label":M(s.source==="config"?"cmd.removeDevice":"common.delete"),children:o.jsxDEV(Gs,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:116,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:115,columnNumber:11},this)]},kn(s),!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:101,columnNumber:9},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:97,columnNumber:5},this)}function oB({scopes:n,cfg:i,edit:l,inset:h,onAdd:x,onUpdate:D,onClose:_}){const s=l&&l.fav.kind==="key"?sB(l.fav):null,[u,f]=L.useState(l&&l.fav.kind==="key"?"key":"msg"),[g,d]=L.useState(l?l.scope:n[0].key),[y,N]=L.useState(l?s?s.base:l.fav.text:""),[k,b]=L.useState(l&&l.fav.kind!=="key"?!!l.fav.enter:!!i.defaultEnter),[c,p]=L.useState(s?s.sticky:"none"),[v,w]=L.useState(null),C=O=>{O!==u&&(f(O),N(""),w(null))},T=Jf.map(O=>({value:O.key,label:O.label??M("cmd.stickyNone")})),S=u==="key"?UV(nB(c).mods,y):null,R=n.some(O=>O.key===g)?g:n[0].key,j=u==="key"?!!S:!!y.trim(),A=()=>{if(!j)return;const O=u==="key"?{kind:"key",text:S.name,label:S.label}:{kind:i.msgKind(y.trim()),text:y.trim(),enter:k},H=l?D(l.scope,l.fav,R,O):x(R,O);if(!(H!=null&&H.ok)){w(M("cmd.itemConflict"));return}w(null)};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop cmd-add-backdrop",onClick:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:160,columnNumber:7},this),o.jsxDEV("div",{className:"cmd-addcard",role:"dialog","aria-label":M(l?"cmd.editItem":"cmd.addTitle"),style:{transform:`translate(-50%, calc(-50% + ${h/2}px))`},children:[o.jsxDEV("div",{className:"cmd-addcard-head",children:[o.jsxDEV("span",{className:"cmd-title",children:M(l?"cmd.editItem":"cmd.addTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:164,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:_,"aria-label":M("common.close"),children:o.jsxDEV(Gs,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:165,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:165,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:163,columnNumber:9},this),o.jsxDEV("div",{className:"cmd-modetabs",role:"tablist",children:[o.jsxDEV("button",{type:"button",role:"tab","aria-selected":u==="msg",className:`cmd-modetab${u==="msg"?" on":""}`,onClick:()=>C("msg"),children:i.msgLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:171,columnNumber:11},this),o.jsxDEV("button",{type:"button",role:"tab","aria-selected":u==="key",className:`cmd-modetab${u==="key"?" on":""}`,onClick:()=>C("key"),children:M("cmd.tabKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:173,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:170,columnNumber:9},this),n.length>1&&o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:M("cmd.addTo")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:180,columnNumber:13},this),o.jsxDEV("div",{className:"cmd-seg",role:"group",children:n.map(O=>o.jsxDEV("button",{type:"button","aria-pressed":R===O.key,className:`cmd-seg-btn${O.accent==="win"?" win":""}${R===O.key?" on":""}`,onClick:()=>{d(O.key),w(null)},children:O.title},O.key,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:183,columnNumber:17},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:181,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:179,columnNumber:11},this),u==="key"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:M("cmd.sticky")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:195,columnNumber:15},this),o.jsxDEV(Q1,{value:c,options:T,onChange:p},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:196,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:194,columnNumber:13},this),o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:M("cmd.baseKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:199,columnNumber:15},this),o.jsxDEV(Q1,{value:y,options:iB,onChange:N,placeholder:M("cmd.pickKey")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:200,columnNumber:15},this),S&&o.jsxDEV("span",{className:"cmd-chord-preview",children:S.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:201,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:198,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:192,columnNumber:11},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-field",children:[o.jsxDEV("label",{className:"cmd-field-label",children:i.msgLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:207,columnNumber:15},this),o.jsxDEV("input",{className:"cmd-add-input",value:y,placeholder:i.placeholder,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:O=>{N(O.target.value),w(null)},onKeyDown:O=>{O.key==="Enter"&&A()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:208,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:206,columnNumber:13},this),i.hasEnter&&o.jsxDEV("label",{className:"cmd-toggle-row",children:[o.jsxDEV("span",{children:M("cmd.withEnter")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:216,columnNumber:17},this),o.jsxDEV("span",{className:"cmd-switch",children:[o.jsxDEV("input",{type:"checkbox",checked:k,onChange:O=>b(O.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:218,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:219,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:220,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:217,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:215,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:205,columnNumber:11},this),v&&o.jsxDEV("div",{className:"cmd-add-error",role:"status",children:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:227,columnNumber:19},this),o.jsxDEV("button",{type:"button",className:"cmd-submit",disabled:!j,onClick:A,children:M(l?"common.save":"fav.add")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:229,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:161,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:159,columnNumber:5},this)}function lB(n,i){if(n==="chat")return{title:M("chat.editTitle"),scopes:[{key:"agent",title:M("chat.favs"),accent:"global"}],card:{msgLabel:M("chat.tabMsg"),placeholder:M("chat.addPlaceholder"),hasEnter:!0,defaultEnter:!0,msgKind:h=>h.startsWith("/")?"cmd":"reply"}};const l=i?aw(i):null;return{title:M("cmd.editTitle"),scopes:[{key:hj,title:M("cmd.global"),accent:"global"},...l?[{key:l,title:M("cmd.window"),accent:"win"}]:[]],card:{msgLabel:M("cmd.tabCmd"),placeholder:M("cmd.addPlaceholder"),hasEnter:!0,defaultEnter:!1,msgKind:()=>"cmd"}}}function ow({windowId:n,inset:i=0,variant:l="command",presets:h=[],onChange:x,onClose:D}){const{title:_,scopes:s,card:u}=lB(l,n),[f,g]=L.useState(()=>Object.fromEntries(s.map(z=>[z.key,oi(z.key)]))),[d,y]=L.useState(null),N=l==="chat"?"chat":"command",k=s[0].key,[b,c]=L.useState(()=>dl(N)),[p,v]=L.useState(null),[w,C]=L.useState(0),T=Rc(ml(h,f[k]||[],N),b),S=new Set(T.map(kn)),R=(z,X=null,K=null)=>T.some(B=>kn(B)===z&&!(X===k&&B.source==="local"&&kn(B)===kn(K))),j=()=>g(Object.fromEntries(s.map(z=>[z.key,oi(z.key)]))),A=z=>{const X=ZV(N,z);return c(X),x==null||x(),X};L.useEffect(()=>{if(!p)return;const z=setTimeout(()=>v(null),4e3);return()=>clearTimeout(z)},[p]),L.useEffect(()=>{if(!w)return;const z=setTimeout(()=>C(0),2e3);return()=>clearTimeout(z)},[w]),nr(!!d,()=>y(null));const O=()=>{j(),v(null),y(null),C(z=>z+1)},H=(z,X,K,B)=>{if(z===k)A(QV(b,T,kn(X),K));else{const F=B.findIndex(Z=>kn(Z)===kn(X)),G=B[F+(K<0?-1:1)];if(!G)return;KV(z,kn(X),kn(G)),j(),x==null||x()}},V=(z,X)=>{C(0);const K=kn(X);if(X.source==="config"){A(eB(b,T,K)),v({identity:K});return}YV(z,K),z===k?A(Z1(b,K)):x==null||x(),j()},P=()=>{p&&(A(Ad(b,p.identity)),v(null))},Y=(z,X)=>{const K=kn(X);if(R(K))return{ok:!1,reason:"conflict"};const B=ml(h,[],N).some(Z=>kn(Z)===K),F=(f[z]||[]).some(Z=>kn(Z)===K);if(z===k&&b.hidden.includes(K)&&(B||F))return A(Ad(b,K)),O(),{ok:!0};const G=mj(z,X);return G.ok?(z===k?A(Ad(b,kn(X))):x==null||x(),O(),{ok:!0}):G},Q=(z,X,K,B)=>{const F=kn(X),G=kn(B);if(R(G,z,X))return{ok:!1,reason:"conflict"};const Z=z===K?fj(z,F,B):qV(z,F,K,B);return Z.ok&&(z===k&&K===k?A(tB(b,F,G)):z===k?A(Z1(b,F)):K===k?A(Ad(b,G)):x==null||x(),j(),y(null)),Z};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:D},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:391,columnNumber:7},this),o.jsxDEV("div",{className:"cmd-panel cmd-editor",role:"dialog","aria-label":_,children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:394,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-add-open",onClick:()=>{C(0),y({edit:null})},"aria-label":M("cmd.addTitle"),children:o.jsxDEV(ap,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:395,columnNumber:139},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:395,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:D,"aria-label":M("common.close"),children:o.jsxDEV(Gs,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:396,columnNumber:90},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:396,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:393,columnNumber:9},this),o.jsxDEV("div",{className:"cmd-list",children:s.map(z=>{const X=z.key===k?T:ml([],f[z.key]||[],"command").filter(K=>!S.has(kn(K)));return o.jsxDEV(aB,{title:z.title,accent:z.accent,items:X,showTitle:s.length>1,onMove:(K,B)=>H(z.key,K,B,X),onDel:K=>V(z.key,K),onEdit:K=>{C(0),y({edit:{fav:K,scope:z.key}})}},z.key,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:404,columnNumber:20},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:398,columnNumber:9},this),p&&o.jsxDEV("div",{className:"cmd-undo-toast",role:"status",children:[o.jsxDEV("span",{children:M("cmd.removedDevice")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:412,columnNumber:11},this),o.jsxDEV("button",{type:"button",className:"cmd-undo",onClick:P,children:M("common.undo")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:413,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:411,columnNumber:18},this),!!w&&o.jsxDEV("div",{className:"cmd-undo-toast cmd-added-toast",role:"status",children:M("cmd.added")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:415,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:392,columnNumber:7},this),d&&o.jsxDEV(oB,{scopes:s,cfg:u,edit:d.edit,inset:i,onAdd:Y,onUpdate:Q,onClose:()=>y(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:419,columnNumber:16},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/CmdFavEditor.jsx",lineNumber:390,columnNumber:5},this)}function Hw({active:n,disabled:i,onToggle:l}){const h=L.useRef({x:0,y:0,moved:!1}),x=s=>{h.current={x:s.clientX,y:s.clientY,moved:!1}},D=s=>{const u=h.current;!u.moved&&Math.hypot(s.clientX-u.x,s.clientY-u.y)>10&&(u.moved=!0)},_=()=>{h.current.moved||l()};return o.jsxDEV("button",{type:"button",className:`input-mic${n?" on":""}`,"aria-label":M(n?"mic.stop":"mic.start"),"aria-pressed":n,disabled:i,onPointerDown:x,onPointerMove:D,onPointerUp:_,children:o.jsxDEV(w2,{},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)}function vj({cwd:n,onAuthFail:i,onPaths:l}){const[h,x]=L.useState(null),D=L.useRef(null);return L.useEffect(()=>()=>clearTimeout(D.current),[]),{upload:h,uploadFiles:async s=>{const{allowed:u,rejected:f}=UE(s);if(!u.length){f.length&&(clearTimeout(D.current),x({label:M("dock.upload.rejected",{names:f.join("、")}),error:!0}),D.current=setTimeout(()=>x(null),3500));return}clearTimeout(D.current),x(null);const g=u.length,d=[],y=[],N=new AbortController;AE(N,M("dock.upload.progress",{name:u[0].name,tag:g>1?`(1/${g})`:""}));try{for(let k=0;k<g&&!N.signal.aborted;k++){const b=u[k],c=g>1?`(${k+1}/${g})`:"";Yf({label:M("dock.upload.progress",{name:b.name,tag:c}),phase:"sending",pct:0});try{const p=await wE(n||"",b,(v,w)=>Yf({pct:v,phase:w}),!0,{signal:N.signal});p!=null&&p.path&&d.push(p.path)}catch(p){if(p instanceof Wf)break;if(p instanceof li){i==null||i(),G_(),x(null);return}y.push({name:b.name,reason:(p==null?void 0:p.message)||M("api.uploadFailed")})}}}finally{G_()}if(d.length&&l(d),y.length||f.length){const k=y.map(b=>`${b.name}:${b.reason}`);f.length&&k.push(M("dock.upload.rejected",{names:f.join("、")})),x({label:k.join(";"),error:!0}),D.current=setTimeout(()=>x(null),5e3)}else x(null)}}}function cB(n,i){const l=i/16e3,h=Math.floor(n.length/l),x=new Int16Array(h);for(let D=0;D<h;D++){let _=n[Math.floor(D*l)];_>1?_=1:_<-1&&(_=-1),x[D]=_<0?_*32768:_*32767}return new Uint8Array(x.buffer)}function uB(n=1280){let i=new Uint8Array(0);return{push(l){const h=new Uint8Array(i.length+l.length);h.set(i),h.set(l,i.length);const x=[];let D=0;for(;h.length-D>=n;)x.push(h.slice(D,D+n)),D+=n;return i=h.slice(D),x},flush(){if(i.length===0)return null;const l=i;return i=new Uint8Array(0),l}}}function eC(n){let i="";for(let l=0;l<n.length;l++)i+=String.fromCharCode(n[l]);return btoa(i)}const dB="data:text/javascript;base64,Ly8gd2ViL3NyYy92b2ljZS9wY20td29ya2xldC5qcwovLyBNaW5pbWFsIEF1ZGlvV29ya2xldDogZm9yd2FyZCBlYWNoIHJlbmRlciBxdWFudHVtJ3MgbW9ubyBzYW1wbGVzIHRvIHRoZSBtYWluIHRocmVhZCwgd2hpY2ggZG9lcyB0aGUKLy8gKHVuaXQtdGVzdGVkKSBkb3duc2FtcGxlL2ZyYW1lL2VuY29kZS4gS2VwdCB0cml2aWFsIG9uIHB1cnBvc2Ug4oCUIHdvcmtsZXQgY29kZSBjYW4ndCBiZSB1bml0LXRlc3RlZC4KY2xhc3MgUGNtRm9yd2FyZGVyIGV4dGVuZHMgQXVkaW9Xb3JrbGV0UHJvY2Vzc29yIHsKICBwcm9jZXNzKGlucHV0cykgewogICAgY29uc3QgY2ggPSBpbnB1dHNbMF0gJiYgaW5wdXRzWzBdWzBdOwogICAgaWYgKGNoICYmIGNoLmxlbmd0aCkgdGhpcy5wb3J0LnBvc3RNZXNzYWdlKGNoLnNsaWNlKDApKTsgLy8gY29weTogdGhlIGJ1ZmZlciBpcyByZXVzZWQgYWZ0ZXIgcHJvY2VzcygpCiAgICByZXR1cm4gdHJ1ZTsKICB9Cn0KcmVnaXN0ZXJQcm9jZXNzb3IoJ3BjbS1mb3J3YXJkZXInLCBQY21Gb3J3YXJkZXIpOwo=";function hB({getUserMedia:n=l=>navigator.mediaDevices.getUserMedia(l),AudioCtor:i=window.AudioContext||window.webkitAudioContext}={}){let l=null,h=null,x=null,D=null;const _=uB(1280);async function s(f){h=await n({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0}}),l=new i,await l.resume(),await l.audioWorklet.addModule(dB),D=l.createMediaStreamSource(h),x=new AudioWorkletNode(l,"pcm-forwarder"),x.port.onmessage=g=>{const d=cB(g.data,l.sampleRate);for(const y of _.push(d))f(eC(y))},D.connect(x),x.connect(l.destination)}async function u(){try{x&&(x.port.onmessage=null)}catch{}try{D&&D.disconnect(),x&&x.disconnect()}catch{}try{h&&h.getTracks().forEach(g=>g.stop())}catch{}try{l&&await l.close()}catch{}const f=_.flush();return l=h=x=D=null,f?eC(f):null}return{start:s,stop:u}}const mB={language:"zh_cn",domain:"iat",accent:"mandarin",vad_eos:1e4,dwa:"wpgs",ptt:1,nunum:1},zw="audio/L16;rate=16000";function fB(n,i){return{common:{app_id:n},business:{...mB},data:{status:0,format:zw,encoding:"raw",audio:i}}}function pB(n){return{data:{status:1,format:zw,encoding:"raw",audio:n}}}function vB(){return{data:{status:2,format:zw,encoding:"raw",audio:""}}}function tC(){return{sentences:new Map}}function gB(n,i){var D;const l=(D=i==null?void 0:i.data)==null?void 0:D.result;if(!l||!Array.isArray(l.ws))return n;const h=l.ws.map(_=>(_.cw||[]).map(s=>s.w).join("")).join(""),x=new Map(n.sentences);if(l.pgs==="rpl"&&Array.isArray(l.rg))for(let _=l.rg[0];_<=l.rg[1];_++)x.delete(_);return x.set(l.sn,h),{sentences:x}}function nC(n){return[...n.sentences.keys()].sort((i,l)=>i-l).map(i=>n.sentences.get(i)).join("")}const bB=55e3,_B=4e3;function $w({onText:n,deps:i={}}){const l=i.signAsr||$3,h=i.WebSocketCtor||window.WebSocket,x=i.makeRecorder||(()=>hB()),[D,_]=L.useState("idle"),[s,u]=L.useState(""),f=L.useRef("idle"),g=L.useCallback(A=>{f.current=A,_(A)},[]),d=L.useRef(null),y=L.useRef(null),N=L.useRef(tC()),k=L.useRef(""),b=L.useRef(!1),c=L.useRef(null),p=L.useRef(null),v=L.useRef(null),w=L.useRef(n);w.current=n;const C=L.useCallback(()=>{clearTimeout(c.current),clearTimeout(p.current);try{d.current&&d.current.close()}catch{}d.current=null,y.current=null,b.current=!1},[]),T=L.useCallback(()=>{var A;f.current!=="idle"&&((A=w.current)==null||A.call(w,nC(N.current)),u(""),g("idle"),C())},[C,g]),S=L.useCallback(A=>{const O=d.current;!O||O.readyState!==1||(O.send(JSON.stringify(b.current?pB(A):fB(k.current,A))),b.current=!0)},[]),R=L.useCallback(async()=>{if(f.current==="recording"){g("finalizing"),clearTimeout(c.current);try{const A=y.current?await y.current.stop():null;A&&S(A);const O=d.current;O&&O.readyState===1?(O.send(JSON.stringify(vB())),p.current=setTimeout(()=>T(),_B)):T()}catch{g("error"),C()}}},[S,C,g,T]);v.current=R;const j=L.useCallback(async()=>{if(!(f.current!=="idle"&&f.current!=="error")){g("requesting"),u(""),N.current=tC(),b.current=!1;try{const{url:A,appId:O}=await l();k.current=O;const H=new h(A);d.current=H,H.onmessage=P=>{var Q;const Y=JSON.parse(P.data);N.current=gB(N.current,Y),u(nC(N.current)),((Q=Y==null?void 0:Y.data)==null?void 0:Q.status)===2&&T()},H.onerror=()=>{g("error"),C()},H.onclose=()=>{(f.current==="recording"||f.current==="finalizing")&&T()};const V=x();y.current=V,await V.start(S),g("recording"),c.current=setTimeout(()=>{var P;(P=v.current)==null||P.call(v)},bB)}catch{g("error"),C()}}},[l,h,x,S,C,g,T]);return L.useEffect(()=>C,[C]),{state:D,partial:s,start:j,stop:R}}function hp(n){L.useEffect(()=>{if(!n||!("wakeLock"in navigator))return;let i=null,l=!1;const h=async()=>{try{const D=await navigator.wakeLock.request("screen");if(l){try{D.release()}catch{}return}i=D}catch{}},x=()=>{document.visibilityState==="visible"&&!l&&h()};return h(),document.addEventListener("visibilitychange",x),()=>{l=!0,document.removeEventListener("visibilitychange",x);try{i&&i.release()}catch{}i=null}},[n])}function wB(n=window.innerHeight){const i=window.visualViewport;return i?Math.max(n,window.innerHeight)-i.height>120:!1}function yB(){const[n,i]=L.useState(0),l=L.useRef(null);return L.useEffect(()=>{const h=window.visualViewport;if(!h)return;l.current={width:h.width,fullHeight:Math.max(window.innerHeight,h.height)};const x=()=>{const D=l.current;Math.abs(h.width-D.width)>40?(D.width=h.width,D.fullHeight=Math.max(window.innerHeight,h.height)):D.fullHeight=Math.max(D.fullHeight,window.innerHeight,h.height);const _=D.fullHeight-h.height;i(_>120?Math.round(_):0)};return x(),h.addEventListener("resize",x),h.addEventListener("scroll",x),()=>{h.removeEventListener("resize",x),h.removeEventListener("scroll",x),l.current=null}},[]),n}const rC=n=>{n.cancelable&&n.preventDefault()},xB=n=>{var i,l;(l=(i=n.target).closest)!=null&&l.call(i,"input, textarea, [contenteditable]")||n.cancelable&&n.preventDefault()},iC=80,NB=n=>n.startsWith("/")?"cmd":"reply",SB=450;function E_({className:n,onTap:i,onHold:l,children:h,...x}){const D=L.useRef({timer:null,long:!1,moved:!1,x:0,y:0}),_=g=>{g.cancelable&&g.preventDefault();const d=D.current;d.long=!1,d.moved=!1,d.x=g.clientX,d.y=g.clientY,l&&(d.timer=setTimeout(()=>{var y;d.long=!0,(y=navigator.vibrate)==null||y.call(navigator,12),l()},SB))},s=g=>{const d=D.current;d.moved||(Math.abs(g.clientX-d.x)>8||Math.abs(g.clientY-d.y)>8)&&(d.moved=!0,clearTimeout(d.timer))},u=()=>{const g=D.current;if(clearTimeout(g.timer),g.timer=null,g.moved){g.moved=!1;return}if(g.long){g.long=!1;return}i()},f=()=>{const g=D.current;clearTimeout(g.timer),g.timer=null,g.long=!1,g.moved=!1};return o.jsxDEV("button",{type:"button",className:n,...x,onPointerDown:_,onPointerMove:s,onPointerUp:u,onPointerCancel:f,onPointerLeave:f,children:h},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:84,columnNumber:5},this)}function CB({pane:n,onAuthFail:i,onKey:l,onText:h,cwd:x=null,agent:D=null,windowId:_=null,recent:s=[],onSent:u,onRemoveRecent:f,inset:g=0,shortcuts:d=null,micAvailable:y=!1,desktopUnified:N=!1,terminalFocused:k=!1,onReturnToTerminal:b,onLeaveTerminal:c},p){const[v,w]=L.useState(()=>oE()),[C,T]=L.useState(!1),S=L.useRef(!1);L.useEffect(()=>{lE(v)},[v]);const[R,j]=L.useState(!1),[A,O]=L.useState(!1),[H,V]=L.useState(!1),P=d||up,[Y,Q]=L.useState(()=>oi("agent")),[z,X]=L.useState(()=>dl("chat")),[K,B]=L.useState(!1),F=()=>{Q(oi("agent")),X(dl("chat"))};L.useEffect(()=>{!H&&!K&&F()},[H,K]);const[G,Z]=L.useState(()=>oi("command")),[ae,me]=L.useState(()=>_?oi(aw(_)):[]),[Ue,De]=L.useState(()=>dl("command")),[ie,q]=L.useState(!1),fe=()=>{Z(oi("command")),me(_?oi(aw(_)):[]),De(dl("command"))};L.useEffect(()=>{ie||fe()},[ie,_]);const le=Rc(ml(P.chat,Y,"chat"),z),Oe=Rc(ml(P.command,G,"command"),Ue),ke=new Set(Oe.map(kn)),nt=ml([],ae,"command").filter(ne=>!ke.has(kn(ne))),[xe,$e]=L.useState({}),at=N?"agent":xe[n]||(D?"agent":"command"),Ge=window.visualViewport,Ft=L.useRef({width:(Ge==null?void 0:Ge.width)??window.innerWidth,fullHeight:Math.max(window.innerHeight,(Ge==null?void 0:Ge.height)??0)}),Rt=()=>{const ne=window.visualViewport;if(!ne)return!1;const He=Ft.current;return Math.abs(ne.width-He.width)>40?(He.width=ne.width,He.fullHeight=Math.max(window.innerHeight,ne.height)):He.fullHeight=Math.max(He.fullHeight,window.innerHeight,ne.height),wB(He.fullHeight)},oe=ne=>{var Je;const He=Rt()||document.activeElement===en.current||document.activeElement===pt.current;$e(rn=>({...rn,[n]:ne})),He&&((Je=ne==="command"?en.current:pt.current)==null||Je.focus({preventScroll:!0}))},[Te,Ie]=L.useState({ctrl:"off",shift:"off",alt:"off"}),[Ve,tt]=L.useState(!1),ot=L.useRef(null),bt=L.useRef(null),ve=L.useRef(null),Ne=at==="command"?0:1,Qe=L.useRef(Ne);Qe.current=Ne;const ye=L.useRef(oe);ye.current=oe;const Fe=L.useRef(!1),ze=L.useRef(!1),Nt=()=>{var ne;return((ne=ot.current)==null?void 0:ne.clientWidth)||0},Wt=ne=>{const He=bt.current;He&&(He.style.transition="none",He.style.transform=`translate3d(${ne}px, 0, 0)`)},Gt=()=>{const ne=bt.current;!ne||!ne.style.transform||(ne.style.transition="",ne.style.transform="")},Qt=L.useRef(null),Rn=50,we=12,Ye=38,J=ne=>{const He=Qt.current;He&&(He.classList.add("dragging"),He.style.setProperty("--drag",`${H4(ne)}px`),He.style.setProperty("--morph",`${Math.min(1,Math.max(0,(Math.abs(ne)-we)/Ye))}`),He.classList.toggle("armed",Math.abs(ne)>=Rn))},lt=()=>{const ne=Qt.current;ne&&(ne.classList.remove("dragging","armed"),ne.style.removeProperty("--drag"),ne.style.removeProperty("--morph"))};L.useLayoutEffect(()=>{Fe.current||Gt()});const it=()=>{const ne=ot.current;if(!ne)return;const He=ne.querySelector(at==="command"?".dock-page.command":".dock-page.chat");He&&(ne.style.height=`${He.offsetHeight}px`)};L.useLayoutEffect(()=>{at==="agent"&&nn(pt.current),it()});const Pt=L.useRef(it);Pt.current=it,L.useEffect(()=>{const ne=ot.current;if(!ne||typeof ResizeObserver>"u")return;const He=new ResizeObserver(()=>{Fe.current||Pt.current()});return ne.querySelectorAll(".dock-page").forEach(Je=>He.observe(Je)),()=>He.disconnect()},[]),L.useEffect(()=>{if(at!=="agent")return;const ne=requestAnimationFrame(()=>{nn(pt.current),it()});return()=>cancelAnimationFrame(ne)},[at]),L.useEffect(()=>{var He;if(at==="agent")return;document.activeElement===pt.current&&((He=pt.current)==null||He.blur());const ne=ot.current;ne&&(ne.scrollLeft=0,ne.scrollTop=0)},[at]),L.useEffect(()=>{if(N)return;const ne=ve.current,He=ot.current;if(!ne||!He)return;let Je=null;const rn=un=>{var Cn,An,Rr,Kr;Gt(),ne.classList.remove("dock-swiping");const gr=((An=(Cn=un.target)==null?void 0:Cn.closest)==null?void 0:An.call(Cn,".quick-scroll"))||null,sr=((Kr=(Rr=un.target)==null?void 0:Rr.closest)==null?void 0:Kr.call(Rr,".input-text"))||null,ln=Rt()||document.activeElement===en.current||document.activeElement===pt.current;Je=un.touches.length===1?{x:un.touches[0].clientX,y:un.touches[0].clientY,dx:0,dy:0,decided:!1,horiz:!1,vert:!1,strip:gr,cmp:sr,kbUp:ln}:null},zn=un=>{if(!Je||un.touches.length!==1||ze.current&&!Je.horiz)return;const gr=un.touches[0].clientX-Je.x,sr=un.touches[0].clientY-Je.y;if(!Je.decided){if(Math.abs(gr)<16&&Math.abs(sr)<16)return;if(Je.decided=!0,Je.horiz=Math.abs(gr)>Math.abs(sr)*1.4,!Je.kbUp&&(document.activeElement===en.current||document.activeElement===pt.current)&&document.activeElement.blur(),Je.horiz&&!Je.kbUp&&ne.classList.add("dock-swiping"),Je.horiz&&Je.strip){const An=Je.strip,Rr=Qe.current,Kr=An.scrollLeft<=0,Hr=An.scrollLeft>=An.scrollWidth-An.clientWidth-1,zr=gr>0&&Kr&&Rr===1,as=gr<0&&Hr&&Rr===0;zr||as||(Je.horiz=!1)}!Je.horiz&&Math.abs(sr)>Math.abs(gr)*1.4&&!F4(Je.cmp,sr)&&(Je.vert=!0)}if(Je.vert){Je.dx=gr,Je.dy=sr,J(sr),un.cancelable&&un.preventDefault();return}if(!Je.horiz)return;un.preventDefault(),Fe.current=!0,Je.dx=gr;const ln=Nt()||1;let Cn=gr;Qe.current===0?Cn=Math.min(0,Math.max(-ln,Cn)):Cn=Math.max(0,Math.min(ln,Cn)),Wt(-Qe.current*ln+Cn)},kr=()=>{var Cn,An,Rr,Kr;if(Fe.current=!1,ne.classList.remove("dock-swiping"),Je&&Je.vert){const Hr=I4(Je.dx,Je.dy,Rn),zr=Qe.current;Je=null,Gt(),lt(),Hr==="show"?(Cn=Ae(zr))==null||Cn.focus({preventScroll:!0}):Hr==="hide"&&((An=Ae(zr))==null||An.blur());return}if(!Je||!Je.horiz){Je=null,Gt();return}const un=Qe.current,gr=Je.dx,sr=Je.kbUp;Je=null;let ln=un;un===0&&gr<-iC?ln=1:un===1&&gr>iC&&(ln=0),sr||((Rr=en.current)==null||Rr.blur(),(Kr=pt.current)==null||Kr.blur()),Gt(),ln!==un&&ye.current(ln===1?"agent":"command")},ir=()=>{(He.scrollLeft||He.scrollTop)&&(He.scrollLeft=0,He.scrollTop=0)};return He.addEventListener("scroll",ir,{passive:!0}),ne.addEventListener("touchstart",rn,{passive:!0}),ne.addEventListener("touchmove",zn,{passive:!1}),ne.addEventListener("touchend",kr,{passive:!0}),ne.addEventListener("touchcancel",kr,{passive:!0}),()=>{He.removeEventListener("scroll",ir),ne.removeEventListener("touchstart",rn),ne.removeEventListener("touchmove",zn),ne.removeEventListener("touchend",kr),ne.removeEventListener("touchcancel",kr)}},[N]);const pt=L.useRef(null),en=L.useRef(null),It=L.useRef(null),Ht=L.useRef(null),Ut=L.useRef(!1),hn=L.useRef(null),_n=()=>{var ne;N&&(Ht.current=k?"terminal":document.activeElement===pt.current?"composer":null,c==null||c(),document.activeElement===pt.current&&((ne=pt.current)==null||ne.blur()))},Xt=ne=>{_n(),ne(!0)},jn=(ne,He=!0)=>{ne(!1);const Je=Ht.current;Ht.current=null,N&&He&&Je&&queueMicrotask(()=>{var rn;Je==="terminal"?b==null||b():(rn=pt.current)==null||rn.focus({preventScroll:!0})})},Nr=(ne=!1)=>{const He=hn.current;He&&(Ut.current=!1,ne&&(hn.current=null),!(!N||!He.owner||He.focusRestored)&&(He.focusRestored=!0,queueMicrotask(()=>{var Je;He.owner==="terminal"?b==null||b():(Je=pt.current)==null||Je.focus({preventScroll:!0})})))};L.useEffect(()=>{if(!N)return;const ne=It.current;let He=!1,Je=null;const rn=()=>Nr(!0),zn=()=>{Ut.current&&(He=!0)},kr=()=>{!Ut.current||!He||(clearTimeout(Je),Je=setTimeout(Nr,0))};return ne==null||ne.addEventListener("cancel",rn),window.addEventListener("blur",zn),window.addEventListener("focus",kr),()=>{clearTimeout(Je),ne==null||ne.removeEventListener("cancel",rn),window.removeEventListener("blur",zn),window.removeEventListener("focus",kr)}},[N,b]),nr(H,()=>jn(V)),nr(ie||K,()=>{jn(ie?q:B)});const Or=L.useRef(!1);L.useEffect(()=>{const ne=window.visualViewport;if(!ne)return;const He=()=>{if(Rt()){Or.current=!0;return}if(!Or.current)return;Or.current=!1;const Je=document.activeElement;(Je===en.current||Je===pt.current)&&Je.blur(),tt(!1)};return He(),ne.addEventListener("resize",He),()=>ne.removeEventListener("resize",He)},[]);const ce=L.useRef({head:"",tail:""}),rt=L.useRef(null),mt=L.useRef(!1),ct=$w({onText:ne=>{if(mt.current){mt.current=!1;return}const{head:He,tail:Je}=ce.current;w(He+ne+Je),rt.current=He.length+ne.length}}),ft=ct.state==="recording"||ct.state==="finalizing";hp(ft),L.useEffect(()=>{if(ct.state!=="recording"&&ct.state!=="finalizing"||mt.current)return;const{head:ne,tail:He}=ce.current;w(ne+ct.partial+He),rt.current=ne.length+ct.partial.length},[ct.partial,ct.state]),L.useLayoutEffect(()=>{const ne=pt.current;if(!ne)return;let He=!1;if(rt.current!=null){const Je=rt.current;if(rt.current=null,document.activeElement===ne)try{ne.setSelectionRange(Je,Je)}catch{}He=Je>=v.length}nn(ne),He&&(ne.scrollTop=ne.scrollHeight)},[v]);const Le=()=>{if(ft){ct.stop();return}const ne=pt.current,He=ne?ne.selectionStart:v.length;ce.current={head:v.slice(0,He),tail:v.slice(He)},ct.start()},Ct=40,Bn=L.useRef(null),tn=(ne,He)=>{const Je=Bn.current;if(!Je)return null;Je.style.width=`${He}px`,Je.textContent=ne;const rn=document.createElement("span");return Je.appendChild(rn),{h:Je.offsetHeight,endX:rn.offsetLeft}},nn=ne=>{if(!ne)return;ne.style.height="auto";const He=y?76:38,Je=y?86:48,rn=ne.parentElement.clientWidth-11,zn=ne.value?tn(ne.value,rn-He):null,kr=zn?zn.h>Ct:!1;j(kr);const ir=kr?tn(ne.value,rn):null;O(!!ir&&rn-ir.endX<Je),ne.style.height=`${ne.scrollHeight+2}px`},Xn=()=>{ft&&(mt.current=!0,ct.stop())},Lt=async ne=>{if(!n||!ne&&!v||S.current)return;const He=v;S.current=!0,T(!0),Xn();try{await Dc(n,He,ne),u==null||u(He),w(""),requestAnimationFrame(()=>{var Je;nn(pt.current),ne&&N&&((Je=pt.current)==null||Je.focus({preventScroll:!0}))})}catch(Je){Je instanceof li&&(i==null||i())}finally{S.current=!1,T(!1)}},zt=()=>Lt(!0),Sn=L.useRef(!1),hr=ne=>{const He=ne.value;if(ne.value="",!He)return;const Je=Yd.some(rn=>Pa(Te[rn]));if(Je&&He.length===1){const rn=cj({kind:"text",ch:He},Te);if(rn.kind==="key"){l(rn.name),Ie(sw);return}}h(He),Je&&Ie(sw)},$n=ne=>{var He;(He=ne.nativeEvent)!=null&&He.isComposing||Sn.current||hr(ne.target)},Jt=()=>{at==="command"&&(Sn.current=!0)},yr=ne=>{at==="command"&&(Sn.current=!1,hr(ne.target))},Wn=ne=>{var He;if(!(at!=="command"||(He=ne.nativeEvent)!=null&&He.isComposing)){if(ne.key==="Enter"&&!ne.shiftKey){ne.preventDefault(),l("Enter");return}ne.key==="Backspace"&&(ne.preventDefault(),l("BSpace"))}},gt=ne=>{var He,Je;if(!(!N||(He=ne.nativeEvent)!=null&&He.isComposing)){if(ne.key==="Escape"){ne.preventDefault(),(Je=pt.current)==null||Je.blur(),b==null||b();return}ne.key==="Enter"&&!ne.shiftKey&&(ne.preventDefault(),zt())}},se=()=>{const ne=en.current;ne&&(document.activeElement===ne?ne.blur():ne.focus({preventScroll:!0}))},Ae=ne=>ne===0?en.current:pt.current,vt=ne=>{Ht.current=null,w(ne),V(!1),requestAnimationFrame(()=>{var He;(He=pt.current)==null||He.focus(),nn(pt.current)})},on=async ne=>{if(n)try{await Dc(n,ne,!0),u==null||u(ne)}catch(He){He instanceof li&&(i==null||i())}},Yt=ne=>vt(ne),ue=ne=>{if(ne.kind==="key"){l(ne.text);return}if(ne.enter){on(ne.text);return}h(ne.text)},Ze=ne=>ne.kind==="key"&&ne.label||ne.text,st=ne=>ne.kind==="key"||!ne.enter?void 0:()=>h(ne.text);L.useImperativeHandle(p,()=>({fill:vt,keepKeyboardForGesture:()=>{const ne=document.activeElement;if(!(Rt()||ne===en.current||ne===pt.current))return!1;const Je=Ae(Qe.current);return Je==null||Je.focus({preventScroll:!0}),!!Je},hideKeyboard:()=>{const ne=document.activeElement;(ne===en.current||ne===pt.current)&&ne.blur()},composerFocused:()=>document.activeElement===pt.current,focusComposer:()=>{var ne;return(ne=pt.current)==null?void 0:ne.focus({preventScroll:!0})}}),[]);const yt=(ne,{focusComposer:He=!0}={})=>{if(!ne.length)return;let Je;if(ne.length===1)Je=ne[0];else{const rn=ne[0].slice(0,ne[0].lastIndexOf("/")+1);Je=ne.every(zn=>zn.startsWith(rn))?`${rn}{${ne.map(zn=>zn.slice(rn.length)).join(",")}}`:ne.join(" ")}w(rn=>rn&&!/\s$/.test(rn)?`${rn} ${Je}`:rn+Je),requestAnimationFrame(()=>{var rn;He&&((rn=pt.current)==null||rn.focus()),nn(pt.current)})},{upload:xn,uploadFiles:Kt}=vj({cwd:x,onAuthFail:i,onPaths:ne=>{var He;return yt(ne,{focusComposer:!N||((He=hn.current)==null?void 0:He.owner)==="composer"})}}),fr=()=>Lt(!1),Tn=L.useRef(null),pr=L.useRef(!1),vr=L.useRef({x:0,y:0,moved:!1}),ki=ne=>{ne.cancelable&&ne.preventDefault(),pr.current=!1,vr.current={x:ne.clientX,y:ne.clientY,moved:!1},!(!v||S.current)&&(Tn.current=setTimeout(()=>{var He;pr.current=!0,(He=navigator.vibrate)==null||He.call(navigator,12),fr()},450))},pi=ne=>{const He=vr.current;He.moved||Math.hypot(ne.clientX-He.x,ne.clientY-He.y)<=10||(He.moved=!0,clearTimeout(Tn.current),Tn.current=null)},Ir=()=>{if(clearTimeout(Tn.current),Tn.current=null,pr.current){pr.current=!1;return}vr.current.moved||zt()},ci=()=>{clearTimeout(Tn.current),Tn.current=null,pr.current=!1},rr=L.useRef(null),Fr=L.useRef({x:0,y:0,moved:!1}),bs=ne=>{if(!R)return null;for(const[He,Je]of[["send",".input-send"],["mic",".input-mic"]]){const rn=ne.currentTarget.querySelector(Je);if(!rn)continue;const zn=rn.getBoundingClientRect();if(ne.clientX>=zn.left&&ne.clientX<=zn.right&&ne.clientY>=zn.top&&ne.clientY<=zn.bottom)return He}return null},Qi=ne=>{const He=bs(ne);He&&(ne.stopPropagation(),ne.cancelable&&ne.preventDefault(),rr.current=He,He==="send"?ki(ne):Fr.current={x:ne.clientX,y:ne.clientY,moved:!1})},Nn=ne=>{const He=rr.current;if(!He)return;if(He==="send"){pi(ne);return}const Je=Fr.current;!Je.moved&&Math.hypot(ne.clientX-Je.x,ne.clientY-Je.y)>10&&(Je.moved=!0)},es=()=>{const ne=rr.current;if(rr.current=null,!!ne){if(ne==="send"){Ir();return}!Fr.current.moved&&ct.state!=="requesting"&&Le()}},Vr=()=>{const ne=rr.current;rr.current=null,ne==="send"&&ci()};return o.jsxDEV("div",{className:`bottom-dock${N?" desktop-unified":""}`,children:[o.jsxDEV("div",{className:"dock-left",ref:ve,onPointerDown:xB,children:[!N&&o.jsxDEV("button",{type:"button",className:"dock-handle",ref:Qt,"aria-label":M("dock.mode.toggle"),onClick:()=>oe(at==="command"?"agent":"command"),children:[o.jsxDEV("span",{className:"dock-mode-label",children:M(at==="command"?"dock.mode.command":"dock.mode.chat")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:944,columnNumber:13},this),o.jsxDEV("span",{className:"dock-dots",children:[o.jsxDEV("i",{className:`dock-dot${at==="command"?" on":""}`,"data-page":"command","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:946,columnNumber:15},this),o.jsxDEV("i",{className:`dock-dot${at==="agent"?" on":""}`,"data-page":"agent","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:947,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:945,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:942,columnNumber:11},this),o.jsxDEV("div",{className:"dock-pager",ref:ot,children:o.jsxDEV("div",{className:`dock-track${Ne===1?" at-chat":""}`,ref:bt,children:[!N&&o.jsxDEV("div",{className:`dock-page command${at==="command"?" on":""}`,children:[o.jsxDEV("input",{ref:en,className:"cmd-capture",type:"text",onInput:$n,onKeyDown:Wn,onCompositionStart:Jt,onCompositionEnd:yr,onFocus:()=>tt(!0),onBlur:()=>tt(!1),enterKeyHint:"send","aria-label":M("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:957,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":Ve,"aria-label":M(Ve?"dock.kbdHide":"dock.kbdShow"),onPointerDown:rC,onClick:se,children:[o.jsxDEV(E2,{down:Ve},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:981,columnNumber:21},this),o.jsxDEV("span",{children:M(Ve?"dock.kbdHide":"dock.kbdShow")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:981,columnNumber:55},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:978,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:977,columnNumber:17},this),o.jsxDEV("div",{className:"quick-scroll",children:[Oe.map((ne,He)=>o.jsxDEV(E_,{className:"quick-cmd quick-cmd-plain",onTap:()=>ue(ne),onHold:st(ne),children:[Ze(ne),ne.kind!=="key"&&ne.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:990,columnNumber:68},this)]},`g:${kn(ne)}:${He}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:988,columnNumber:21},this)),nt.map((ne,He)=>o.jsxDEV(E_,{className:"quick-cmd quick-cmd-win",onTap:()=>ue(ne),onHold:st(ne),children:[Ze(ne),ne.kind!=="key"&&ne.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:995,columnNumber:68},this)]},`w:${kn(ne)}:${He}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:993,columnNumber:21},this)),o.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":M("cmd.editTitle"),onPointerDown:rC,onClick:()=>Xt(q),children:o.jsxDEV(Gf,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:998,columnNumber:91},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:997,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:983,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:976,columnNumber:15},this),o.jsxDEV(BV,{onKey:l,onText:h,mods:Te,setMods:Ie,keyHeldRef:ze},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1001,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:953,columnNumber:33},this),o.jsxDEV("div",{className:`dock-page chat${at==="agent"?" on":""}`,children:[xn&&o.jsxDEV("div",{className:"dock-upload error",children:o.jsxDEV("span",{className:"dock-upload-label",children:xn.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1008,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1007,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":M("dock.attach"),disabled:!!xn&&!xn.error,onClick:()=>{var ne;_n(),Ut.current=N,hn.current=N?{owner:Ht.current,focusRestored:!1,phase:"open"}:null,Ht.current=null,(ne=It.current)==null||ne.click()},children:[o.jsxDEV(NE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1026,columnNumber:21},this),o.jsxDEV("span",{children:M("dock.attach")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1026,columnNumber:35},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1015,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1014,columnNumber:17},this),o.jsxDEV("div",{className:"quick-scroll",children:[le.map((ne,He)=>o.jsxDEV(E_,{className:`quick-cmd qc-${ne.kind==="key"?"esc":NB(ne.text)}`,onTap:()=>ue(ne),onHold:st(ne),children:Ze(ne)},`${kn(ne)}:${He}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1034,columnNumber:21},this)),o.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":M("chat.editTitle"),onClick:()=>Xt(B),children:o.jsxDEV(Gf,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1040,columnNumber:66},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1039,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1028,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1013,columnNumber:15},this),o.jsxDEV("input",{ref:It,className:"browse-file-input",type:"file",multiple:!0,accept:Mw,onChange:async ne=>{const He=hn.current,Je=Array.from(ne.target.files||[]);ne.target.value="",Ut.current=!1,Ht.current=null,(He==null?void 0:He.phase)==="open"&&(He.phase="uploading",He.focusRestored&&(c==null||c(),document.activeElement===pt.current&&pt.current.blur(),He.focusRestored=!1)),await Kt(Je),hn.current===He&&Nr(!0)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1044,columnNumber:15},this),o.jsxDEV("div",{className:`input-wrap${ft?" recording":""}${R?" multi":""}${A?" crowd":""}`,onPointerDownCapture:Qi,onPointerMoveCapture:Nn,onPointerUpCapture:es,onPointerCancelCapture:Vr,children:[o.jsxDEV("textarea",{ref:pt,className:"input-text",rows:1,value:v,onPointerDown:ne=>{ft&&(Xn(),ne.currentTarget.focus())},"aria-readonly":C,onBeforeInput:ne=>{S.current&&ne.preventDefault()},onChange:ne=>{if(S.current){ne.target.value=v;return}w(ne.target.value),nn(ne.target)},onKeyDown:gt,onFocus:()=>tt(!0),onBlur:()=>tt(!1),placeholder:M(N?Ve?"dock.input.exitDraft":"dock.input.enterDraft":"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:1074,columnNumber:17},this),o.jsxDEV("div",{ref:Bn,className:"input-mirror","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1111,columnNumber:17},this),!v&&o.jsxDEV("button",{type:"button",className:"input-history","aria-label":M("dock.history"),title:M("dock.history"),onClick:()=>H?jn(V):Xt(V),children:o.jsxDEV(xE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1117,columnNumber:53},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1114,columnNumber:19},this),y&&o.jsxDEV(Hw,{active:ft,disabled:ct.state==="requesting",onToggle:Le},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1119,columnNumber:34},this),o.jsxDEV("button",{type:"button",className:`input-send${v?"":" is-empty"}`,"aria-label":M("dock.send"),title:M("dock.send.hint"),disabled:C,onPointerDown:ki,onPointerMove:pi,onPointerUp:Ir,onPointerCancel:ci,onPointerLeave:ci,children:o.jsxDEV(kw,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1124,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1121,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1071,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1003,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:952,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:951,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:935,columnNumber:7},this),o.jsxDEV(JV,{open:H,mode:at,recent:s,historyOnly:!0,onDelete:f,onSend:ne=>{jn(V),on(ne)},onFill:ne=>{V(!1),Yt(ne)},onClose:()=>jn(V)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1131,columnNumber:7},this),ie&&o.jsxDEV(ow,{windowId:_,inset:g,presets:P.command,onChange:fe,onClose:()=>jn(q)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1138,columnNumber:23},this),K&&o.jsxDEV(ow,{variant:"chat",inset:g,presets:P.chat,onChange:F,onClose:()=>jn(B)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:1142,columnNumber:24},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BottomDock.jsx",lineNumber:934,columnNumber:5},this)}const EB=L.forwardRef(CB),jB=new Set(["clear","compact","cost","status","usage","context","help","init","exit","quit","vim","terminal-setup","release-notes"]);function lw(n){const i=/^\s*\/([a-z][\w-]*)\s*(.*)$/i.exec(typeof n=="string"?n:"");return!i||i[2].trim()?!1:!jB.has(i[1].toLowerCase())}function DB(n){const i=/^\s*\/([a-z][\w-]*)\s*(.*)$/i.exec(typeof n=="string"?n:"");if(!i||lw(n))return null;const l={name:"/"+i[1]},h=i[2].trim();return h&&(l.args=h),l}const kB=15e3;function RB(n){const[i,l]=L.useState({model:null,usedPercent:null}),h=L.useRef(n);return h.current=n,L.useEffect(()=>{if(!n){l({model:null,usedPercent:null});return}let x=!0,D=null;const _=async()=>{try{const s=await j3(n);x&&h.current===n&&s&&l({model:s.model??null,usedPercent:typeof s.usedPercent=="number"?s.usedPercent:null})}catch{}x&&(D=setTimeout(_,kB))};return _(),()=>{x=!1,D&&clearTimeout(D)}},[n]),i}const TB=n=>{var i,l;(l=(i=n.target).closest)!=null&&l.call(i,"input, textarea, [contenteditable]")||n.cancelable&&n.preventDefault()},LB=n=>n.startsWith("/")?"cmd":"reply";function AB({pane:n,kind:i,cwd:l=null,onKey:h=()=>{},onAuthFail:x,onSent:D,onInteractiveSlash:_,shortcuts:s=null,micAvailable:u=!1,desktop:f=!1}){const[g,d]=L.useState(()=>oE()),[y,N]=L.useState(!1),k=L.useRef(!1);L.useEffect(()=>{lE(g)},[g]);const b=L.useRef(null),c=L.useRef(null),p=L.useRef({x:0,y:0,moved:!1});L.useEffect(()=>{var xe;f&&((xe=b.current)==null||xe.focus({preventScroll:!0}))},[f,n]);const v=s||up,[w,C]=L.useState(()=>oi("agent")),[T,S]=L.useState(()=>dl("chat")),[R,j]=L.useState(!1),A=()=>{C(oi("agent")),S(dl("chat"))};L.useEffect(()=>{R||A()},[R]),nr(R,()=>j(!1));const O=Rc(ml(v.chat,w,"chat"),T),H=i==="working",V=RB(n),P=V.model?V.model.replace(/\s*\(.*\)\s*$/,"").trim():null,Y=V.usedPercent,Q=typeof Y=="number",z=Q&&Y>=80,X=xe=>{xe&&(xe.style.height="auto",xe.style.height=`${xe.scrollHeight+2}px`)};L.useLayoutEffect(()=>{X(b.current)},[g]);const K=L.useRef({head:"",tail:""}),B=L.useRef(!1),G=$w({onText:xe=>{if(B.current){B.current=!1;return}const{head:$e,tail:at}=K.current;d($e+xe+at)}}),Z=G.state==="recording"||G.state==="finalizing";hp(Z),L.useEffect(()=>{if(G.state!=="recording"&&G.state!=="finalizing"||B.current)return;const{head:xe,tail:$e}=K.current;d(xe+G.partial+$e)},[G.partial,G.state]);const ae=()=>{if(Z){G.stop();return}const xe=b.current,$e=xe?xe.selectionStart:g.length;K.current={head:g.slice(0,$e),tail:g.slice($e)},G.start()},me=()=>{Z&&(B.current=!0,G.stop())},Ue=async()=>{if(!n||!g.trim()||k.current)return;const xe=g;k.current=!0,N(!0),me();try{await Dc(n,xe,!0),D==null||D(xe),lw(xe)&&(_==null||_(xe.trim())),d(""),requestAnimationFrame(()=>X(b.current))}catch($e){$e instanceof li&&(x==null||x())}finally{k.current=!1,N(!1)}},De=()=>h("Escape"),ie=xe=>{var $e;if(!(!f||($e=xe.nativeEvent)!=null&&$e.isComposing)){if(xe.key==="Escape"&&H){xe.preventDefault(),De();return}xe.key==="Enter"&&!xe.shiftKey&&(xe.preventDefault(),!H&&g.trim()&&Ue())}},q=xe=>{p.current={x:xe.clientX,y:xe.clientY,moved:!1}},fe=xe=>{const $e=p.current;!$e.moved&&Math.hypot(xe.clientX-$e.x,xe.clientY-$e.y)>10&&($e.moved=!0)},le=xe=>{var at,Ge,Ft;const $e=p.current;$e.moved||Math.hypot(xe.clientX-$e.x,xe.clientY-$e.y)>10||(Ge=(at=xe.target).closest)!=null&&Ge.call(at,"button, a, input, textarea, [contenteditable]")||(Ft=b.current)==null||Ft.focus()},Oe=async xe=>{if(xe.kind==="key"){h(xe.text);return}if(n)try{if(await Dc(n,xe.text,!!xe.enter),!xe.enter)return;D==null||D(xe.text),lw(xe.text)&&(_==null||_(xe.text.trim()))}catch($e){$e instanceof li&&(x==null||x())}},ke=xe=>{if(!xe.length)return;let $e;if(xe.length===1)$e=xe[0];else{const at=xe[0].slice(0,xe[0].lastIndexOf("/")+1);$e=xe.every(Ge=>Ge.startsWith(at))?`${at}{${xe.map(Ge=>Ge.slice(at.length)).join(",")}}`:xe.join(" ")}d(at=>at&&!/\s$/.test(at)?`${at} ${$e}`:at+$e),requestAnimationFrame(()=>{var at;(at=b.current)==null||at.focus(),X(b.current)})},{uploadFiles:nt}=vj({cwd:l,onAuthFail:x,onPaths:ke});return o.jsxDEV("div",{className:"chat-composer",onPointerDown:TB,children:[o.jsxDEV("div",{className:"cc-quick quick-scroll",children:[O.map((xe,$e)=>o.jsxDEV("button",{type:"button",className:`quick-cmd qc-${xe.kind==="key"?"esc":LB(xe.text)}`,onClick:()=>Oe(xe),children:xe.kind==="key"&&xe.label||xe.text},`${kn(xe)}:${$e}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:215,columnNumber:11},this)),o.jsxDEV("button",{type:"button",className:"quick-cmd quick-cmd-add","aria-label":M("chat.editTitle"),onClick:()=>j(!0),children:o.jsxDEV(Gf,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:221,columnNumber:45},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:220,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:213,columnNumber:7},this),o.jsxDEV("input",{ref:c,className:"browse-file-input",type:"file",multiple:!0,accept:Mw,onChange:xe=>{const $e=Array.from(xe.target.files||[]);xe.target.value="",nt($e)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:224,columnNumber:7},this),o.jsxDEV("div",{className:`cc-card${Z?" recording":""}`,onPointerDown:q,onPointerMove:fe,onPointerUp:le,children:[o.jsxDEV("textarea",{ref:b,className:"cc-text",rows:1,value:g,"aria-readonly":y,onBeforeInput:xe=>{k.current&&xe.preventDefault()},onChange:xe=>{if(k.current){xe.target.value=g;return}d(xe.target.value),X(xe.target)},onKeyDown:ie,placeholder:M("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:232,columnNumber:9},this),o.jsxDEV("div",{className:"cc-actions",children:[o.jsxDEV("button",{type:"button",className:"cc-attach","aria-label":M("dock.attach"),onClick:()=>{var xe;return(xe=c.current)==null?void 0:xe.click()},children:o.jsxDEV(ap,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:257,columnNumber:56},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:256,columnNumber:11},this),o.jsxDEV("div",{className:"cc-actions-right",children:[Q&&o.jsxDEV("div",{className:`cc-ctx${z?" 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:264,columnNumber:30},this),o.jsxDEV("span",{className:"cc-ctx-pct",children:[Math.round(Y),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:265,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:263,columnNumber:15},this),u&&o.jsxDEV(Hw,{active:Z,disabled:G.state==="requesting",onToggle:ae},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:268,columnNumber:30},this),H?o.jsxDEV("button",{type:"button",className:"cc-send cc-stop","aria-label":M("chat.stop"),onClick:De,children:o.jsxDEV(Rw,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:271,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:270,columnNumber:15},this):o.jsxDEV("button",{type:"button",className:"cc-send","aria-label":M("dock.send"),disabled:y||!g.trim(),onClick:Ue,children:o.jsxDEV(kw,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:275,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:273,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:258,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:255,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:230,columnNumber:7},this),R&&o.jsxDEV(ow,{variant:"chat",presets:v.chat,onChange:A,onClose:()=>j(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:280,columnNumber:20},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatComposer.jsx",lineNumber:211,columnNumber:5},this)}function Ww(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let xl=Ww();function gj(n){xl=n}const bj=/[&<>"']/,MB=new RegExp(bj.source,"g"),_j=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,UB=new RegExp(_j.source,"g"),OB={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},sC=n=>OB[n];function gs(n,i){if(i){if(bj.test(n))return n.replace(MB,sC)}else if(_j.test(n))return n.replace(UB,sC);return n}const VB=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function BB(n){return n.replace(VB,(i,l)=>(l=l.toLowerCase(),l==="colon"?":":l.charAt(0)==="#"?l.charAt(1)==="x"?String.fromCharCode(parseInt(l.substring(2),16)):String.fromCharCode(+l.substring(1)):""))}const PB=/(^|[^\[])\^/g;function dr(n,i){let l=typeof n=="string"?n:n.source;i=i||"";const h={replace:(x,D)=>{let _=typeof D=="string"?D:D.source;return _=_.replace(PB,"$1"),l=l.replace(x,_),h},getRegex:()=>new RegExp(l,i)};return h}function aC(n){try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Fd={exec:()=>null};function oC(n,i){const l=n.replace(/\|/g,(D,_,s)=>{let u=!1,f=_;for(;--f>=0&&s[f]==="\\";)u=!u;return u?"|":" |"}),h=l.split(/ \|/);let x=0;if(h[0].trim()||h.shift(),h.length>0&&!h[h.length-1].trim()&&h.pop(),i)if(h.length>i)h.splice(i);else for(;h.length<i;)h.push("");for(;x<h.length;x++)h[x]=h[x].trim().replace(/\\\|/g,"|");return h}function kf(n,i,l){const h=n.length;if(h===0)return"";let x=0;for(;x<h&&n.charAt(h-x-1)===i;)x++;return n.slice(0,h-x)}function IB(n,i){if(n.indexOf(i[1])===-1)return-1;let l=0;for(let h=0;h<n.length;h++)if(n[h]==="\\")h++;else if(n[h]===i[0])l++;else if(n[h]===i[1]&&(l--,l<0))return h;return-1}function lC(n,i,l,h){const x=i.href,D=i.title?gs(i.title):null,_=n[1].replace(/\\([\[\]])/g,"$1");if(n[0].charAt(0)!=="!"){h.state.inLink=!0;const s={type:"link",raw:l,href:x,title:D,text:_,tokens:h.inlineTokens(_)};return h.state.inLink=!1,s}return{type:"image",raw:l,href:x,title:D,text:gs(_)}}function FB(n,i){const l=n.match(/^(\s+)(?:```)/);if(l===null)return i;const h=l[1];return i.split(`
288
+ `).map(x=>{const D=x.match(/^\s+/);if(D===null)return x;const[_]=D;return _.length>=h.length?x.slice(h.length):x}).join(`
289
+ `)}class Zf{constructor(i){wr(this,"options");wr(this,"rules");wr(this,"lexer");this.options=i||xl}space(i){const l=this.rules.block.newline.exec(i);if(l&&l[0].length>0)return{type:"space",raw:l[0]}}code(i){const l=this.rules.block.code.exec(i);if(l){const h=l[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:l[0],codeBlockStyle:"indented",text:this.options.pedantic?h:kf(h,`
290
+ `)}}}fences(i){const l=this.rules.block.fences.exec(i);if(l){const h=l[0],x=FB(h,l[3]||"");return{type:"code",raw:h,lang:l[2]?l[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):l[2],text:x}}}heading(i){const l=this.rules.block.heading.exec(i);if(l){let h=l[2].trim();if(/#$/.test(h)){const x=kf(h,"#");(this.options.pedantic||!x||/ $/.test(x))&&(h=x.trim())}return{type:"heading",raw:l[0],depth:l[1].length,text:h,tokens:this.lexer.inline(h)}}}hr(i){const l=this.rules.block.hr.exec(i);if(l)return{type:"hr",raw:l[0]}}blockquote(i){const l=this.rules.block.blockquote.exec(i);if(l){let h=l[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
291
+ $1`);h=kf(h.replace(/^ *>[ \t]?/gm,""),`
292
+ `);const x=this.lexer.state.top;this.lexer.state.top=!0;const D=this.lexer.blockTokens(h);return this.lexer.state.top=x,{type:"blockquote",raw:l[0],tokens:D,text:h}}}list(i){let l=this.rules.block.list.exec(i);if(l){let h=l[1].trim();const x=h.length>1,D={type:"list",raw:"",ordered:x,start:x?+h.slice(0,-1):"",loose:!1,items:[]};h=x?`\\d{1,9}\\${h.slice(-1)}`:`\\${h}`,this.options.pedantic&&(h=x?h:"[*+-]");const _=new RegExp(`^( {0,3}${h})((?:[ ][^\\n]*)?(?:\\n|$))`);let s="",u="",f=!1;for(;i;){let g=!1;if(!(l=_.exec(i))||this.rules.block.hr.test(i))break;s=l[0],i=i.substring(s.length);let d=l[2].split(`
293
+ `,1)[0].replace(/^\t+/,p=>" ".repeat(3*p.length)),y=i.split(`
294
+ `,1)[0],N=0;this.options.pedantic?(N=2,u=d.trimStart()):(N=l[2].search(/[^ ]/),N=N>4?1:N,u=d.slice(N),N+=l[1].length);let k=!1;if(!d&&/^ *$/.test(y)&&(s+=y+`
295
+ `,i=i.substring(y.length+1),g=!0),!g){const p=new RegExp(`^ {0,${Math.min(3,N-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),v=new RegExp(`^ {0,${Math.min(3,N-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),w=new RegExp(`^ {0,${Math.min(3,N-1)}}(?:\`\`\`|~~~)`),C=new RegExp(`^ {0,${Math.min(3,N-1)}}#`);for(;i;){const T=i.split(`
296
+ `,1)[0];if(y=T,this.options.pedantic&&(y=y.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),w.test(y)||C.test(y)||p.test(y)||v.test(i))break;if(y.search(/[^ ]/)>=N||!y.trim())u+=`
297
+ `+y.slice(N);else{if(k||d.search(/[^ ]/)>=4||w.test(d)||C.test(d)||v.test(d))break;u+=`
298
+ `+y}!k&&!y.trim()&&(k=!0),s+=T+`
299
+ `,i=i.substring(T.length+1),d=y.slice(N)}}D.loose||(f?D.loose=!0:/\n *\n *$/.test(s)&&(f=!0));let b=null,c;this.options.gfm&&(b=/^\[[ xX]\] /.exec(u),b&&(c=b[0]!=="[ ] ",u=u.replace(/^\[[ xX]\] +/,""))),D.items.push({type:"list_item",raw:s,task:!!b,checked:c,loose:!1,text:u,tokens:[]}),D.raw+=s}D.items[D.items.length-1].raw=s.trimEnd(),D.items[D.items.length-1].text=u.trimEnd(),D.raw=D.raw.trimEnd();for(let g=0;g<D.items.length;g++)if(this.lexer.state.top=!1,D.items[g].tokens=this.lexer.blockTokens(D.items[g].text,[]),!D.loose){const d=D.items[g].tokens.filter(N=>N.type==="space"),y=d.length>0&&d.some(N=>/\n.*\n/.test(N.raw));D.loose=y}if(D.loose)for(let g=0;g<D.items.length;g++)D.items[g].loose=!0;return D}}html(i){const l=this.rules.block.html.exec(i);if(l)return{type:"html",block:!0,raw:l[0],pre:l[1]==="pre"||l[1]==="script"||l[1]==="style",text:l[0]}}def(i){const l=this.rules.block.def.exec(i);if(l){const h=l[1].toLowerCase().replace(/\s+/g," "),x=l[2]?l[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",D=l[3]?l[3].substring(1,l[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):l[3];return{type:"def",tag:h,raw:l[0],href:x,title:D}}}table(i){const l=this.rules.block.table.exec(i);if(!l||!/[:|]/.test(l[2]))return;const h=oC(l[1]),x=l[2].replace(/^\||\| *$/g,"").split("|"),D=l[3]&&l[3].trim()?l[3].replace(/\n[ \t]*$/,"").split(`
300
+ `):[],_={type:"table",raw:l[0],header:[],align:[],rows:[]};if(h.length===x.length){for(const s of x)/^ *-+: *$/.test(s)?_.align.push("right"):/^ *:-+: *$/.test(s)?_.align.push("center"):/^ *:-+ *$/.test(s)?_.align.push("left"):_.align.push(null);for(const s of h)_.header.push({text:s,tokens:this.lexer.inline(s)});for(const s of D)_.rows.push(oC(s,_.header.length).map(u=>({text:u,tokens:this.lexer.inline(u)})));return _}}lheading(i){const l=this.rules.block.lheading.exec(i);if(l)return{type:"heading",raw:l[0],depth:l[2].charAt(0)==="="?1:2,text:l[1],tokens:this.lexer.inline(l[1])}}paragraph(i){const l=this.rules.block.paragraph.exec(i);if(l){const h=l[1].charAt(l[1].length-1)===`
301
+ `?l[1].slice(0,-1):l[1];return{type:"paragraph",raw:l[0],text:h,tokens:this.lexer.inline(h)}}}text(i){const l=this.rules.block.text.exec(i);if(l)return{type:"text",raw:l[0],text:l[0],tokens:this.lexer.inline(l[0])}}escape(i){const l=this.rules.inline.escape.exec(i);if(l)return{type:"escape",raw:l[0],text:gs(l[1])}}tag(i){const l=this.rules.inline.tag.exec(i);if(l)return!this.lexer.state.inLink&&/^<a /i.test(l[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(l[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(l[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(l[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:l[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:l[0]}}link(i){const l=this.rules.inline.link.exec(i);if(l){const h=l[2].trim();if(!this.options.pedantic&&/^</.test(h)){if(!/>$/.test(h))return;const _=kf(h.slice(0,-1),"\\");if((h.length-_.length)%2===0)return}else{const _=IB(l[2],"()");if(_>-1){const u=(l[0].indexOf("!")===0?5:4)+l[1].length+_;l[2]=l[2].substring(0,_),l[0]=l[0].substring(0,u).trim(),l[3]=""}}let x=l[2],D="";if(this.options.pedantic){const _=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(x);_&&(x=_[1],D=_[3])}else D=l[3]?l[3].slice(1,-1):"";return x=x.trim(),/^</.test(x)&&(this.options.pedantic&&!/>$/.test(h)?x=x.slice(1):x=x.slice(1,-1)),lC(l,{href:x&&x.replace(this.rules.inline.anyPunctuation,"$1"),title:D&&D.replace(this.rules.inline.anyPunctuation,"$1")},l[0],this.lexer)}}reflink(i,l){let h;if((h=this.rules.inline.reflink.exec(i))||(h=this.rules.inline.nolink.exec(i))){const x=(h[2]||h[1]).replace(/\s+/g," "),D=l[x.toLowerCase()];if(!D){const _=h[0].charAt(0);return{type:"text",raw:_,text:_}}return lC(h,D,h[0],this.lexer)}}emStrong(i,l,h=""){let x=this.rules.inline.emStrongLDelim.exec(i);if(!x||x[3]&&h.match(/[\p{L}\p{N}]/u))return;if(!(x[1]||x[2]||"")||!h||this.rules.inline.punctuation.exec(h)){const _=[...x[0]].length-1;let s,u,f=_,g=0;const d=x[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,l=l.slice(-1*i.length+_);(x=d.exec(l))!=null;){if(s=x[1]||x[2]||x[3]||x[4]||x[5]||x[6],!s)continue;if(u=[...s].length,x[3]||x[4]){f+=u;continue}else if((x[5]||x[6])&&_%3&&!((_+u)%3)){g+=u;continue}if(f-=u,f>0)continue;u=Math.min(u,u+f+g);const y=[...x[0]][0].length,N=i.slice(0,_+x.index+y+u);if(Math.min(_,u)%2){const b=N.slice(1,-1);return{type:"em",raw:N,text:b,tokens:this.lexer.inlineTokens(b)}}const k=N.slice(2,-2);return{type:"strong",raw:N,text:k,tokens:this.lexer.inlineTokens(k)}}}}codespan(i){const l=this.rules.inline.code.exec(i);if(l){let h=l[2].replace(/\n/g," ");const x=/[^ ]/.test(h),D=/^ /.test(h)&&/ $/.test(h);return x&&D&&(h=h.substring(1,h.length-1)),h=gs(h,!0),{type:"codespan",raw:l[0],text:h}}}br(i){const l=this.rules.inline.br.exec(i);if(l)return{type:"br",raw:l[0]}}del(i){const l=this.rules.inline.del.exec(i);if(l)return{type:"del",raw:l[0],text:l[2],tokens:this.lexer.inlineTokens(l[2])}}autolink(i){const l=this.rules.inline.autolink.exec(i);if(l){let h,x;return l[2]==="@"?(h=gs(l[1]),x="mailto:"+h):(h=gs(l[1]),x=h),{type:"link",raw:l[0],text:h,href:x,tokens:[{type:"text",raw:h,text:h}]}}}url(i){var h;let l;if(l=this.rules.inline.url.exec(i)){let x,D;if(l[2]==="@")x=gs(l[0]),D="mailto:"+x;else{let _;do _=l[0],l[0]=((h=this.rules.inline._backpedal.exec(l[0]))==null?void 0:h[0])??"";while(_!==l[0]);x=gs(l[0]),l[1]==="www."?D="http://"+l[0]:D=l[0]}return{type:"link",raw:l[0],text:x,href:D,tokens:[{type:"text",raw:x,text:x}]}}}inlineText(i){const l=this.rules.inline.text.exec(i);if(l){let h;return this.lexer.state.inRawBlock?h=l[0]:h=gs(l[0]),{type:"text",raw:l[0],text:h}}}}const HB=/^(?: *(?:\n|$))+/,zB=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,$B=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,rh=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,WB=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,wj=/(?:[*+-]|\d{1,9}[.)])/,yj=dr(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,wj).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(),Gw=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,GB=/^[^\n]+/,Yw=/(?!\s*\])(?:\\.|[^\[\]\\])+/,YB=dr(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Yw).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),qB=dr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,wj).getRegex(),mp="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",qw=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,KB=dr("^ {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",qw).replace("tag",mp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xj=dr(Gw).replace("hr",rh).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",mp).getRegex(),XB=dr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",xj).getRegex(),Kw={blockquote:XB,code:zB,def:YB,fences:$B,heading:WB,hr:rh,html:KB,lheading:yj,list:qB,newline:HB,paragraph:xj,table:Fd,text:GB},cC=dr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",rh).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",mp).getRegex(),JB={...Kw,table:cC,paragraph:dr(Gw).replace("hr",rh).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",cC).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",mp).getRegex()},ZB={...Kw,html:dr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",qw).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:Fd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:dr(Gw).replace("hr",rh).replace("heading",` *#{1,6} *[^
302
+ ]`).replace("lheading",yj).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Nj=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,QB=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Sj=/^( {2,}|\\)\n(?!\s*$)/,eP=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ih="\\p{P}\\p{S}",tP=dr(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,ih).getRegex(),nP=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,rP=dr(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,ih).getRegex(),iP=dr("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,ih).getRegex(),sP=dr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,ih).getRegex(),aP=dr(/\\([punct])/,"gu").replace(/punct/g,ih).getRegex(),oP=dr(/^<(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(),lP=dr(qw).replace("(?:-->|$)","-->").getRegex(),cP=dr("^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",lP).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Qf=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,uP=dr(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Qf).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Cj=dr(/^!?\[(label)\]\[(ref)\]/).replace("label",Qf).replace("ref",Yw).getRegex(),Ej=dr(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yw).getRegex(),dP=dr("reflink|nolink(?!\\()","g").replace("reflink",Cj).replace("nolink",Ej).getRegex(),Xw={_backpedal:Fd,anyPunctuation:aP,autolink:oP,blockSkip:nP,br:Sj,code:QB,del:Fd,emStrongLDelim:rP,emStrongRDelimAst:iP,emStrongRDelimUnd:sP,escape:Nj,link:uP,nolink:Ej,punctuation:tP,reflink:Cj,reflinkSearch:dP,tag:cP,text:eP,url:Fd},hP={...Xw,link:dr(/^!?\[(label)\]\((.*?)\)/).replace("label",Qf).getRegex(),reflink:dr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Qf).getRegex()},cw={...Xw,escape:dr(Nj).replace("])","~|])").getRegex(),url:dr(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},mP={...cw,br:dr(Sj).replace("{2,}","*").getRegex(),text:dr(cw.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Rf={normal:Kw,gfm:JB,pedantic:ZB},Ed={normal:Xw,gfm:cw,breaks:mP,pedantic:hP};class da{constructor(i){wr(this,"tokens");wr(this,"options");wr(this,"state");wr(this,"tokenizer");wr(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=i||xl,this.options.tokenizer=this.options.tokenizer||new Zf,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 l={block:Rf.normal,inline:Ed.normal};this.options.pedantic?(l.block=Rf.pedantic,l.inline=Ed.pedantic):this.options.gfm&&(l.block=Rf.gfm,this.options.breaks?l.inline=Ed.breaks:l.inline=Ed.gfm),this.tokenizer.rules=l}static get rules(){return{block:Rf,inline:Ed}}static lex(i,l){return new da(l).lex(i)}static lexInline(i,l){return new da(l).inlineTokens(i)}lex(i){i=i.replace(/\r\n|\r/g,`
303
+ `),this.blockTokens(i,this.tokens);for(let l=0;l<this.inlineQueue.length;l++){const h=this.inlineQueue[l];this.inlineTokens(h.src,h.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,l=[]){this.options.pedantic?i=i.replace(/\t/g," ").replace(/^ +$/gm,""):i=i.replace(/^( *)(\t+)/gm,(s,u,f)=>u+" ".repeat(f.length));let h,x,D,_;for(;i;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(h=s.call({lexer:this},i,l))?(i=i.substring(h.raw.length),l.push(h),!0):!1))){if(h=this.tokenizer.space(i)){i=i.substring(h.raw.length),h.raw.length===1&&l.length>0?l[l.length-1].raw+=`
304
+ `:l.push(h);continue}if(h=this.tokenizer.code(i)){i=i.substring(h.raw.length),x=l[l.length-1],x&&(x.type==="paragraph"||x.type==="text")?(x.raw+=`
305
+ `+h.raw,x.text+=`
306
+ `+h.text,this.inlineQueue[this.inlineQueue.length-1].src=x.text):l.push(h);continue}if(h=this.tokenizer.fences(i)){i=i.substring(h.raw.length),l.push(h);continue}if(h=this.tokenizer.heading(i)){i=i.substring(h.raw.length),l.push(h);continue}if(h=this.tokenizer.hr(i)){i=i.substring(h.raw.length),l.push(h);continue}if(h=this.tokenizer.blockquote(i)){i=i.substring(h.raw.length),l.push(h);continue}if(h=this.tokenizer.list(i)){i=i.substring(h.raw.length),l.push(h);continue}if(h=this.tokenizer.html(i)){i=i.substring(h.raw.length),l.push(h);continue}if(h=this.tokenizer.def(i)){i=i.substring(h.raw.length),x=l[l.length-1],x&&(x.type==="paragraph"||x.type==="text")?(x.raw+=`
307
+ `+h.raw,x.text+=`
308
+ `+h.raw,this.inlineQueue[this.inlineQueue.length-1].src=x.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title});continue}if(h=this.tokenizer.table(i)){i=i.substring(h.raw.length),l.push(h);continue}if(h=this.tokenizer.lheading(i)){i=i.substring(h.raw.length),l.push(h);continue}if(D=i,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const u=i.slice(1);let f;this.options.extensions.startBlock.forEach(g=>{f=g.call({lexer:this},u),typeof f=="number"&&f>=0&&(s=Math.min(s,f))}),s<1/0&&s>=0&&(D=i.substring(0,s+1))}if(this.state.top&&(h=this.tokenizer.paragraph(D))){x=l[l.length-1],_&&x.type==="paragraph"?(x.raw+=`
309
+ `+h.raw,x.text+=`
310
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=x.text):l.push(h),_=D.length!==i.length,i=i.substring(h.raw.length);continue}if(h=this.tokenizer.text(i)){i=i.substring(h.raw.length),x=l[l.length-1],x&&x.type==="text"?(x.raw+=`
311
+ `+h.raw,x.text+=`
312
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=x.text):l.push(h);continue}if(i){const s="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,l}inline(i,l=[]){return this.inlineQueue.push({src:i,tokens:l}),l}inlineTokens(i,l=[]){let h,x,D,_=i,s,u,f;if(this.tokens.links){const g=Object.keys(this.tokens.links);if(g.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(_))!=null;)g.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(_=_.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+_.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(_))!=null;)_=_.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+_.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(_))!=null;)_=_.slice(0,s.index)+"++"+_.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;i;)if(u||(f=""),u=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(g=>(h=g.call({lexer:this},i,l))?(i=i.substring(h.raw.length),l.push(h),!0):!1))){if(h=this.tokenizer.escape(i)){i=i.substring(h.raw.length),l.push(h);continue}if(h=this.tokenizer.tag(i)){i=i.substring(h.raw.length),x=l[l.length-1],x&&h.type==="text"&&x.type==="text"?(x.raw+=h.raw,x.text+=h.text):l.push(h);continue}if(h=this.tokenizer.link(i)){i=i.substring(h.raw.length),l.push(h);continue}if(h=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(h.raw.length),x=l[l.length-1],x&&h.type==="text"&&x.type==="text"?(x.raw+=h.raw,x.text+=h.text):l.push(h);continue}if(h=this.tokenizer.emStrong(i,_,f)){i=i.substring(h.raw.length),l.push(h);continue}if(h=this.tokenizer.codespan(i)){i=i.substring(h.raw.length),l.push(h);continue}if(h=this.tokenizer.br(i)){i=i.substring(h.raw.length),l.push(h);continue}if(h=this.tokenizer.del(i)){i=i.substring(h.raw.length),l.push(h);continue}if(h=this.tokenizer.autolink(i)){i=i.substring(h.raw.length),l.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(i))){i=i.substring(h.raw.length),l.push(h);continue}if(D=i,this.options.extensions&&this.options.extensions.startInline){let g=1/0;const d=i.slice(1);let y;this.options.extensions.startInline.forEach(N=>{y=N.call({lexer:this},d),typeof y=="number"&&y>=0&&(g=Math.min(g,y))}),g<1/0&&g>=0&&(D=i.substring(0,g+1))}if(h=this.tokenizer.inlineText(D)){i=i.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(f=h.raw.slice(-1)),u=!0,x=l[l.length-1],x&&x.type==="text"?(x.raw+=h.raw,x.text+=h.text):l.push(h);continue}if(i){const g="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return l}}class ep{constructor(i){wr(this,"options");this.options=i||xl}code(i,l,h){var D;const x=(D=(l||"").match(/^\S*/))==null?void 0:D[0];return i=i.replace(/\n$/,"")+`
313
+ `,x?'<pre><code class="language-'+gs(x)+'">'+(h?i:gs(i,!0))+`</code></pre>
314
+ `:"<pre><code>"+(h?i:gs(i,!0))+`</code></pre>
315
+ `}blockquote(i){return`<blockquote>
316
+ ${i}</blockquote>
317
+ `}html(i,l){return i}heading(i,l,h){return`<h${l}>${i}</h${l}>
318
+ `}hr(){return`<hr>
319
+ `}list(i,l,h){const x=l?"ol":"ul",D=l&&h!==1?' start="'+h+'"':"";return"<"+x+D+`>
320
+ `+i+"</"+x+`>
321
+ `}listitem(i,l,h){return`<li>${i}</li>
322
+ `}checkbox(i){return"<input "+(i?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(i){return`<p>${i}</p>
323
+ `}table(i,l){return l&&(l=`<tbody>${l}</tbody>`),`<table>
324
+ <thead>
325
+ `+i+`</thead>
326
+ `+l+`</table>
327
+ `}tablerow(i){return`<tr>
328
+ ${i}</tr>
329
+ `}tablecell(i,l){const h=l.header?"th":"td";return(l.align?`<${h} align="${l.align}">`:`<${h}>`)+i+`</${h}>
330
+ `}strong(i){return`<strong>${i}</strong>`}em(i){return`<em>${i}</em>`}codespan(i){return`<code>${i}</code>`}br(){return"<br>"}del(i){return`<del>${i}</del>`}link(i,l,h){const x=aC(i);if(x===null)return h;i=x;let D='<a href="'+i+'"';return l&&(D+=' title="'+l+'"'),D+=">"+h+"</a>",D}image(i,l,h){const x=aC(i);if(x===null)return h;i=x;let D=`<img src="${i}" alt="${h}"`;return l&&(D+=` title="${l}"`),D+=">",D}text(i){return i}}class Jw{strong(i){return i}em(i){return i}codespan(i){return i}del(i){return i}html(i){return i}text(i){return i}link(i,l,h){return""+h}image(i,l,h){return""+h}br(){return""}}class ha{constructor(i){wr(this,"options");wr(this,"renderer");wr(this,"textRenderer");this.options=i||xl,this.options.renderer=this.options.renderer||new ep,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Jw}static parse(i,l){return new ha(l).parse(i)}static parseInline(i,l){return new ha(l).parseInline(i)}parse(i,l=!0){let h="";for(let x=0;x<i.length;x++){const D=i[x];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[D.type]){const _=D,s=this.options.extensions.renderers[_.type].call({parser:this},_);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(_.type)){h+=s||"";continue}}switch(D.type){case"space":continue;case"hr":{h+=this.renderer.hr();continue}case"heading":{const _=D;h+=this.renderer.heading(this.parseInline(_.tokens),_.depth,BB(this.parseInline(_.tokens,this.textRenderer)));continue}case"code":{const _=D;h+=this.renderer.code(_.text,_.lang,!!_.escaped);continue}case"table":{const _=D;let s="",u="";for(let g=0;g<_.header.length;g++)u+=this.renderer.tablecell(this.parseInline(_.header[g].tokens),{header:!0,align:_.align[g]});s+=this.renderer.tablerow(u);let f="";for(let g=0;g<_.rows.length;g++){const d=_.rows[g];u="";for(let y=0;y<d.length;y++)u+=this.renderer.tablecell(this.parseInline(d[y].tokens),{header:!1,align:_.align[y]});f+=this.renderer.tablerow(u)}h+=this.renderer.table(s,f);continue}case"blockquote":{const _=D,s=this.parse(_.tokens);h+=this.renderer.blockquote(s);continue}case"list":{const _=D,s=_.ordered,u=_.start,f=_.loose;let g="";for(let d=0;d<_.items.length;d++){const y=_.items[d],N=y.checked,k=y.task;let b="";if(y.task){const c=this.renderer.checkbox(!!N);f?y.tokens.length>0&&y.tokens[0].type==="paragraph"?(y.tokens[0].text=c+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=c+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:c+" "}):b+=c+" "}b+=this.parse(y.tokens,f),g+=this.renderer.listitem(b,k,!!N)}h+=this.renderer.list(g,s,u);continue}case"html":{const _=D;h+=this.renderer.html(_.text,_.block);continue}case"paragraph":{const _=D;h+=this.renderer.paragraph(this.parseInline(_.tokens));continue}case"text":{let _=D,s=_.tokens?this.parseInline(_.tokens):_.text;for(;x+1<i.length&&i[x+1].type==="text";)_=i[++x],s+=`
331
+ `+(_.tokens?this.parseInline(_.tokens):_.text);h+=l?this.renderer.paragraph(s):s;continue}default:{const _='Token with "'+D.type+'" type was not found.';if(this.options.silent)return console.error(_),"";throw new Error(_)}}}return h}parseInline(i,l){l=l||this.renderer;let h="";for(let x=0;x<i.length;x++){const D=i[x];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[D.type]){const _=this.options.extensions.renderers[D.type].call({parser:this},D);if(_!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(D.type)){h+=_||"";continue}}switch(D.type){case"escape":{const _=D;h+=l.text(_.text);break}case"html":{const _=D;h+=l.html(_.text);break}case"link":{const _=D;h+=l.link(_.href,_.title,this.parseInline(_.tokens,l));break}case"image":{const _=D;h+=l.image(_.href,_.title,_.text);break}case"strong":{const _=D;h+=l.strong(this.parseInline(_.tokens,l));break}case"em":{const _=D;h+=l.em(this.parseInline(_.tokens,l));break}case"codespan":{const _=D;h+=l.codespan(_.text);break}case"br":{h+=l.br();break}case"del":{const _=D;h+=l.del(this.parseInline(_.tokens,l));break}case"text":{const _=D;h+=l.text(_.text);break}default:{const _='Token with "'+D.type+'" type was not found.';if(this.options.silent)return console.error(_),"";throw new Error(_)}}}return h}}class Hd{constructor(i){wr(this,"options");this.options=i||xl}preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}}wr(Hd,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var _l,uw,jj;class fP{constructor(...i){BS(this,_l);wr(this,"defaults",Ww());wr(this,"options",this.setOptions);wr(this,"parse",xf(this,_l,uw).call(this,da.lex,ha.parse));wr(this,"parseInline",xf(this,_l,uw).call(this,da.lexInline,ha.parseInline));wr(this,"Parser",ha);wr(this,"Renderer",ep);wr(this,"TextRenderer",Jw);wr(this,"Lexer",da);wr(this,"Tokenizer",Zf);wr(this,"Hooks",Hd);this.use(...i)}walkTokens(i,l){var x,D;let h=[];for(const _ of i)switch(h=h.concat(l.call(this,_)),_.type){case"table":{const s=_;for(const u of s.header)h=h.concat(this.walkTokens(u.tokens,l));for(const u of s.rows)for(const f of u)h=h.concat(this.walkTokens(f.tokens,l));break}case"list":{const s=_;h=h.concat(this.walkTokens(s.items,l));break}default:{const s=_;(D=(x=this.defaults.extensions)==null?void 0:x.childTokens)!=null&&D[s.type]?this.defaults.extensions.childTokens[s.type].forEach(u=>{const f=s[u].flat(1/0);h=h.concat(this.walkTokens(f,l))}):s.tokens&&(h=h.concat(this.walkTokens(s.tokens,l)))}}return h}use(...i){const l=this.defaults.extensions||{renderers:{},childTokens:{}};return i.forEach(h=>{const x={...h};if(x.async=this.defaults.async||x.async||!1,h.extensions&&(h.extensions.forEach(D=>{if(!D.name)throw new Error("extension name required");if("renderer"in D){const _=l.renderers[D.name];_?l.renderers[D.name]=function(...s){let u=D.renderer.apply(this,s);return u===!1&&(u=_.apply(this,s)),u}:l.renderers[D.name]=D.renderer}if("tokenizer"in D){if(!D.level||D.level!=="block"&&D.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const _=l[D.level];_?_.unshift(D.tokenizer):l[D.level]=[D.tokenizer],D.start&&(D.level==="block"?l.startBlock?l.startBlock.push(D.start):l.startBlock=[D.start]:D.level==="inline"&&(l.startInline?l.startInline.push(D.start):l.startInline=[D.start]))}"childTokens"in D&&D.childTokens&&(l.childTokens[D.name]=D.childTokens)}),x.extensions=l),h.renderer){const D=this.defaults.renderer||new ep(this.defaults);for(const _ in h.renderer){if(!(_ in D))throw new Error(`renderer '${_}' does not exist`);if(_==="options")continue;const s=_,u=h.renderer[s],f=D[s];D[s]=(...g)=>{let d=u.apply(D,g);return d===!1&&(d=f.apply(D,g)),d||""}}x.renderer=D}if(h.tokenizer){const D=this.defaults.tokenizer||new Zf(this.defaults);for(const _ in h.tokenizer){if(!(_ in D))throw new Error(`tokenizer '${_}' does not exist`);if(["options","rules","lexer"].includes(_))continue;const s=_,u=h.tokenizer[s],f=D[s];D[s]=(...g)=>{let d=u.apply(D,g);return d===!1&&(d=f.apply(D,g)),d}}x.tokenizer=D}if(h.hooks){const D=this.defaults.hooks||new Hd;for(const _ in h.hooks){if(!(_ in D))throw new Error(`hook '${_}' does not exist`);if(_==="options")continue;const s=_,u=h.hooks[s],f=D[s];Hd.passThroughHooks.has(_)?D[s]=g=>{if(this.defaults.async)return Promise.resolve(u.call(D,g)).then(y=>f.call(D,y));const d=u.call(D,g);return f.call(D,d)}:D[s]=(...g)=>{let d=u.apply(D,g);return d===!1&&(d=f.apply(D,g)),d}}x.hooks=D}if(h.walkTokens){const D=this.defaults.walkTokens,_=h.walkTokens;x.walkTokens=function(s){let u=[];return u.push(_.call(this,s)),D&&(u=u.concat(D.call(this,s))),u}}this.defaults={...this.defaults,...x}}),this}setOptions(i){return this.defaults={...this.defaults,...i},this}lexer(i,l){return da.lex(i,l??this.defaults)}parser(i,l){return ha.parse(i,l??this.defaults)}}_l=new WeakSet,uw=function(i,l){return(h,x)=>{const D={...x},_={...this.defaults,...D};this.defaults.async===!0&&D.async===!1&&(_.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),_.async=!0);const s=xf(this,_l,jj).call(this,!!_.silent,!!_.async);if(typeof h>"u"||h===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof h!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(h)+", string expected"));if(_.hooks&&(_.hooks.options=_),_.async)return Promise.resolve(_.hooks?_.hooks.preprocess(h):h).then(u=>i(u,_)).then(u=>_.hooks?_.hooks.processAllTokens(u):u).then(u=>_.walkTokens?Promise.all(this.walkTokens(u,_.walkTokens)).then(()=>u):u).then(u=>l(u,_)).then(u=>_.hooks?_.hooks.postprocess(u):u).catch(s);try{_.hooks&&(h=_.hooks.preprocess(h));let u=i(h,_);_.hooks&&(u=_.hooks.processAllTokens(u)),_.walkTokens&&this.walkTokens(u,_.walkTokens);let f=l(u,_);return _.hooks&&(f=_.hooks.postprocess(f)),f}catch(u){return s(u)}}},jj=function(i,l){return h=>{if(h.message+=`
332
+ Please report this to https://github.com/markedjs/marked.`,i){const x="<p>An error occurred:</p><pre>"+gs(h.message+"",!0)+"</pre>";return l?Promise.resolve(x):x}if(l)return Promise.reject(h);throw h}};const bl=new fP;function cr(n,i){return bl.parse(n,i)}cr.options=cr.setOptions=function(n){return bl.setOptions(n),cr.defaults=bl.defaults,gj(cr.defaults),cr};cr.getDefaults=Ww;cr.defaults=xl;cr.use=function(...n){return bl.use(...n),cr.defaults=bl.defaults,gj(cr.defaults),cr};cr.walkTokens=function(n,i){return bl.walkTokens(n,i)};cr.parseInline=bl.parseInline;cr.Parser=ha;cr.parser=ha.parse;cr.Renderer=ep;cr.TextRenderer=Jw;cr.Lexer=da;cr.lexer=da.lex;cr.Tokenizer=Zf;cr.Hooks=Hd;cr.parse=cr;cr.options;cr.setOptions;cr.use;cr.walkTokens;cr.parseInline;ha.parse;da.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 uC(n,i){(i==null||i>n.length)&&(i=n.length);for(var l=0,h=Array(i);l<i;l++)h[l]=n[l];return h}function pP(n){if(Array.isArray(n))return n}function vP(n,i){var l=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l!=null){var h,x,D,_,s=[],u=!0,f=!1;try{if(D=(l=l.call(n)).next,i!==0)for(;!(u=(h=D.call(l)).done)&&(s.push(h.value),s.length!==i);u=!0);}catch(g){f=!0,x=g}finally{try{if(!u&&l.return!=null&&(_=l.return(),Object(_)!==_))return}finally{if(f)throw x}}return s}}function gP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
333
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bP(n,i){return pP(n)||vP(n,i)||_P(n,i)||gP()}function _P(n,i){if(n){if(typeof n=="string")return uC(n,i);var l={}.toString.call(n).slice(8,-1);return l==="Object"&&n.constructor&&(l=n.constructor.name),l==="Map"||l==="Set"?Array.from(n):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?uC(n,i):void 0}}const Dj=Object.entries,dC=Object.setPrototypeOf,wP=Object.isFrozen,yP=Object.getPrototypeOf,xP=Object.getOwnPropertyDescriptor;let Zi=Object.freeze,Rs=Object.seal,Cc=Object.create,kj=typeof Reflect<"u"&&Reflect,dw=kj.apply,hw=kj.construct;Zi||(Zi=function(i){return i});Rs||(Rs=function(i){return i});dw||(dw=function(i,l){for(var h=arguments.length,x=new Array(h>2?h-2:0),D=2;D<h;D++)x[D-2]=arguments[D];return i.apply(l,x)});hw||(hw=function(i){for(var l=arguments.length,h=new Array(l>1?l-1:0),x=1;x<l;x++)h[x-1]=arguments[x];return new i(...h)});const al=qr(Array.prototype.forEach),NP=qr(Array.prototype.lastIndexOf),hC=qr(Array.prototype.pop),yc=qr(Array.prototype.push),SP=qr(Array.prototype.splice),Xi=Array.isArray,Md=qr(String.prototype.toLowerCase),j_=qr(String.prototype.toString),mC=qr(String.prototype.match),xc=qr(String.prototype.replace),fC=qr(String.prototype.indexOf),CP=qr(String.prototype.trim),EP=qr(Number.prototype.toString),jP=qr(Boolean.prototype.toString),pC=typeof BigInt>"u"?null:qr(BigInt.prototype.toString),vC=typeof Symbol>"u"?null:qr(Symbol.prototype.toString),Ur=qr(Object.prototype.hasOwnProperty),jd=qr(Object.prototype.toString),Di=qr(RegExp.prototype.test),Nc=DP(TypeError);function qr(n){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var l=arguments.length,h=new Array(l>1?l-1:0),x=1;x<l;x++)h[x-1]=arguments[x];return dw(n,i,h)}}function DP(n){return function(){for(var i=arguments.length,l=new Array(i),h=0;h<i;h++)l[h]=arguments[h];return hw(n,l)}}function Dn(n,i){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Md;if(dC&&dC(n,null),!Xi(i))return n;let h=i.length;for(;h--;){let x=i[h];if(typeof x=="string"){const D=l(x);D!==x&&(wP(i)||(i[h]=D),x=D)}n[x]=!0}return n}function kP(n){for(let i=0;i<n.length;i++)Ur(n,i)||(n[i]=null);return n}function Fi(n){const i=Cc(null);for(const h of Dj(n)){var l=bP(h,2);const x=l[0],D=l[1];Ur(n,x)&&(Xi(D)?i[x]=kP(D):D&&typeof D=="object"&&D.constructor===Object?i[x]=Fi(D):i[x]=D)}return i}function RP(n){switch(typeof n){case"string":return n;case"number":return EP(n);case"boolean":return jP(n);case"bigint":return pC?pC(n):"0";case"symbol":return vC?vC(n):"Symbol()";case"undefined":return jd(n);case"function":case"object":{if(n===null)return jd(n);const i=n,l=ua(i,"toString");if(typeof l=="function"){const h=l(i);return typeof h=="string"?h:jd(h)}return jd(n)}default:return jd(n)}}function ua(n,i){for(;n!==null;){const h=xP(n,i);if(h){if(h.get)return qr(h.get);if(typeof h.value=="function")return qr(h.value)}n=yP(n)}function l(){return null}return l}function TP(n){try{return Di(n,""),!0}catch{return!1}}const gC=Zi(["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"]),D_=Zi(["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"]),k_=Zi(["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"]),LP=Zi(["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"]),R_=Zi(["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"]),AP=Zi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),bC=Zi(["#text"]),_C=Zi(["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"]),T_=Zi(["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"]),wC=Zi(["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"]),Tf=Zi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),MP=Rs(/{{[\w\W]*|^[\w\W]*}}/g),UP=Rs(/<%[\w\W]*|^[\w\W]*%>/g),OP=Rs(/\${[\w\W]*/g),VP=Rs(/^data-[\-\w.\u00B7-\uFFFF]+$/),BP=Rs(/^aria-[\-\w]+$/),yC=Rs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),PP=Rs(/^(?:\w+script|data):/i),IP=Rs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),FP=Rs(/^html$/i),HP=Rs(/^[a-z][.\w]*(-[.\w]+)+$/i),ca={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},zP=function(){return typeof window>"u"?null:window},$P=function(i,l){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let h=null;const x="data-tt-policy-suffix";l&&l.hasAttribute(x)&&(h=l.getAttribute(x));const D="dompurify"+(h?"#"+h:"");try{return i.createPolicy(D,{createHTML(_){return _},createScriptURL(_){return _}})}catch{return console.warn("TrustedTypes policy "+D+" could not be created."),null}},xC=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Rj(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zP();const i=gt=>Rj(gt);if(i.version="3.4.8",i.removed=[],!n||!n.document||n.document.nodeType!==ca.document||!n.Element)return i.isSupported=!1,i;let l=n.document;const h=l,x=h.currentScript;n.DocumentFragment;const D=n.HTMLTemplateElement,_=n.Node,s=n.Element,u=n.NodeFilter,f=n.NamedNodeMap;f===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;const g=n.DOMParser,d=n.trustedTypes,y=s.prototype,N=ua(y,"cloneNode"),k=ua(y,"remove"),b=ua(y,"nextSibling"),c=ua(y,"childNodes"),p=ua(y,"parentNode"),v=ua(y,"shadowRoot"),w=ua(y,"attributes"),C=_&&_.prototype?ua(_.prototype,"nodeType"):null,T=_&&_.prototype?ua(_.prototype,"nodeName"):null;if(typeof D=="function"){const gt=l.createElement("template");gt.content&&gt.content.ownerDocument&&(l=gt.content.ownerDocument)}let S,R="",j=0;const A=function(se){if(j>0)throw Nc('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.');j++;try{return S.createHTML(se)}finally{j--}},O=l,H=O.implementation,V=O.createNodeIterator,P=O.createDocumentFragment,Y=O.getElementsByTagName,Q=h.importNode;let z=xC();i.isSupported=typeof Dj=="function"&&typeof p=="function"&&H&&H.createHTMLDocument!==void 0;const X=MP,K=UP,B=OP,F=VP,G=BP,Z=PP,ae=IP,me=HP;let Ue=yC,De=null;const ie=Dn({},[...gC,...D_,...k_,...R_,...bC]);let q=null;const fe=Dn({},[..._C,...T_,...wC,...Tf]);let le=Object.seal(Cc(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}})),Oe=null,ke=null;const nt=Object.seal(Cc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let xe=!0,$e=!0,at=!1,Ge=!0,Ft=!1,Rt=!0,oe=!1,Te=!1,Ie=!1,Ve=!1,tt=!1,ot=!1,bt=!0,ve=!1;const Ne="user-content-";let Qe=!0,ye=!1,Fe={},ze=null;const Nt=Dn({},["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 Wt=null;const Gt=Dn({},["audio","video","img","source","image","track"]);let Qt=null;const Rn=Dn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),we="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",J="http://www.w3.org/1999/xhtml";let lt=J,it=!1,Pt=null;const pt=Dn({},[we,Ye,J],j_);let en=Dn({},["mi","mo","mn","ms","mtext"]),It=Dn({},["annotation-xml"]);const Ht=Dn({},["title","style","font","a","script"]);let Ut=null;const hn=["application/xhtml+xml","text/html"],_n="text/html";let Xt=null,jn=null;const Nr=l.createElement("form"),Or=function(se){return se instanceof RegExp||se instanceof Function},ce=function(){let se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(jn&&jn===se)return;(!se||typeof se!="object")&&(se={}),se=Fi(se),Ut=hn.indexOf(se.PARSER_MEDIA_TYPE)===-1?_n:se.PARSER_MEDIA_TYPE,Xt=Ut==="application/xhtml+xml"?j_:Md,De=Ur(se,"ALLOWED_TAGS")&&Xi(se.ALLOWED_TAGS)?Dn({},se.ALLOWED_TAGS,Xt):ie,q=Ur(se,"ALLOWED_ATTR")&&Xi(se.ALLOWED_ATTR)?Dn({},se.ALLOWED_ATTR,Xt):fe,Pt=Ur(se,"ALLOWED_NAMESPACES")&&Xi(se.ALLOWED_NAMESPACES)?Dn({},se.ALLOWED_NAMESPACES,j_):pt,Qt=Ur(se,"ADD_URI_SAFE_ATTR")&&Xi(se.ADD_URI_SAFE_ATTR)?Dn(Fi(Rn),se.ADD_URI_SAFE_ATTR,Xt):Rn,Wt=Ur(se,"ADD_DATA_URI_TAGS")&&Xi(se.ADD_DATA_URI_TAGS)?Dn(Fi(Gt),se.ADD_DATA_URI_TAGS,Xt):Gt,ze=Ur(se,"FORBID_CONTENTS")&&Xi(se.FORBID_CONTENTS)?Dn({},se.FORBID_CONTENTS,Xt):Nt,Oe=Ur(se,"FORBID_TAGS")&&Xi(se.FORBID_TAGS)?Dn({},se.FORBID_TAGS,Xt):Fi({}),ke=Ur(se,"FORBID_ATTR")&&Xi(se.FORBID_ATTR)?Dn({},se.FORBID_ATTR,Xt):Fi({}),Fe=Ur(se,"USE_PROFILES")?se.USE_PROFILES&&typeof se.USE_PROFILES=="object"?Fi(se.USE_PROFILES):se.USE_PROFILES:!1,xe=se.ALLOW_ARIA_ATTR!==!1,$e=se.ALLOW_DATA_ATTR!==!1,at=se.ALLOW_UNKNOWN_PROTOCOLS||!1,Ge=se.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ft=se.SAFE_FOR_TEMPLATES||!1,Rt=se.SAFE_FOR_XML!==!1,oe=se.WHOLE_DOCUMENT||!1,Ve=se.RETURN_DOM||!1,tt=se.RETURN_DOM_FRAGMENT||!1,ot=se.RETURN_TRUSTED_TYPE||!1,Ie=se.FORCE_BODY||!1,bt=se.SANITIZE_DOM!==!1,ve=se.SANITIZE_NAMED_PROPS||!1,Qe=se.KEEP_CONTENT!==!1,ye=se.IN_PLACE||!1,Ue=TP(se.ALLOWED_URI_REGEXP)?se.ALLOWED_URI_REGEXP:yC,lt=typeof se.NAMESPACE=="string"?se.NAMESPACE:J,en=Ur(se,"MATHML_TEXT_INTEGRATION_POINTS")&&se.MATHML_TEXT_INTEGRATION_POINTS&&typeof se.MATHML_TEXT_INTEGRATION_POINTS=="object"?Fi(se.MATHML_TEXT_INTEGRATION_POINTS):Dn({},["mi","mo","mn","ms","mtext"]),It=Ur(se,"HTML_INTEGRATION_POINTS")&&se.HTML_INTEGRATION_POINTS&&typeof se.HTML_INTEGRATION_POINTS=="object"?Fi(se.HTML_INTEGRATION_POINTS):Dn({},["annotation-xml"]);const Ae=Ur(se,"CUSTOM_ELEMENT_HANDLING")&&se.CUSTOM_ELEMENT_HANDLING&&typeof se.CUSTOM_ELEMENT_HANDLING=="object"?Fi(se.CUSTOM_ELEMENT_HANDLING):Cc(null);if(le=Cc(null),Ur(Ae,"tagNameCheck")&&Or(Ae.tagNameCheck)&&(le.tagNameCheck=Ae.tagNameCheck),Ur(Ae,"attributeNameCheck")&&Or(Ae.attributeNameCheck)&&(le.attributeNameCheck=Ae.attributeNameCheck),Ur(Ae,"allowCustomizedBuiltInElements")&&typeof Ae.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=Ae.allowCustomizedBuiltInElements),Ft&&($e=!1),tt&&(Ve=!0),Fe&&(De=Dn({},bC),q=Cc(null),Fe.html===!0&&(Dn(De,gC),Dn(q,_C)),Fe.svg===!0&&(Dn(De,D_),Dn(q,T_),Dn(q,Tf)),Fe.svgFilters===!0&&(Dn(De,k_),Dn(q,T_),Dn(q,Tf)),Fe.mathMl===!0&&(Dn(De,R_),Dn(q,wC),Dn(q,Tf))),nt.tagCheck=null,nt.attributeCheck=null,Ur(se,"ADD_TAGS")&&(typeof se.ADD_TAGS=="function"?nt.tagCheck=se.ADD_TAGS:Xi(se.ADD_TAGS)&&(De===ie&&(De=Fi(De)),Dn(De,se.ADD_TAGS,Xt))),Ur(se,"ADD_ATTR")&&(typeof se.ADD_ATTR=="function"?nt.attributeCheck=se.ADD_ATTR:Xi(se.ADD_ATTR)&&(q===fe&&(q=Fi(q)),Dn(q,se.ADD_ATTR,Xt))),Ur(se,"ADD_URI_SAFE_ATTR")&&Xi(se.ADD_URI_SAFE_ATTR)&&Dn(Qt,se.ADD_URI_SAFE_ATTR,Xt),Ur(se,"FORBID_CONTENTS")&&Xi(se.FORBID_CONTENTS)&&(ze===Nt&&(ze=Fi(ze)),Dn(ze,se.FORBID_CONTENTS,Xt)),Ur(se,"ADD_FORBID_CONTENTS")&&Xi(se.ADD_FORBID_CONTENTS)&&(ze===Nt&&(ze=Fi(ze)),Dn(ze,se.ADD_FORBID_CONTENTS,Xt)),Qe&&(De["#text"]=!0),oe&&Dn(De,["html","head","body"]),De.table&&(Dn(De,["tbody"]),delete Oe.tbody),se.TRUSTED_TYPES_POLICY){if(typeof se.TRUSTED_TYPES_POLICY.createHTML!="function")throw Nc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof se.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Nc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const vt=S;S=se.TRUSTED_TYPES_POLICY;try{R=A("")}catch(on){throw S=vt,on}}else S===void 0&&se.TRUSTED_TYPES_POLICY!==null&&(S=$P(d,x)),S&&typeof R=="string"&&(R=A(""));(z.uponSanitizeElement.length>0||z.uponSanitizeAttribute.length>0)&&De===ie&&(De=Fi(De)),z.uponSanitizeAttribute.length>0&&q===fe&&(q=Fi(q)),Zi&&Zi(se),jn=se},rt=Dn({},[...D_,...k_,...LP]),mt=Dn({},[...R_,...AP]),Se=function(se){let Ae=p(se);(!Ae||!Ae.tagName)&&(Ae={namespaceURI:lt,tagName:"template"});const vt=Md(se.tagName),on=Md(Ae.tagName);return Pt[se.namespaceURI]?se.namespaceURI===Ye?Ae.namespaceURI===J?vt==="svg":Ae.namespaceURI===we?vt==="svg"&&(on==="annotation-xml"||en[on]):!!rt[vt]:se.namespaceURI===we?Ae.namespaceURI===J?vt==="math":Ae.namespaceURI===Ye?vt==="math"&&It[on]:!!mt[vt]:se.namespaceURI===J?Ae.namespaceURI===Ye&&!It[on]||Ae.namespaceURI===we&&!en[on]?!1:!mt[vt]&&(Ht[vt]||!rt[vt]):!!(Ut==="application/xhtml+xml"&&Pt[se.namespaceURI]):!1},ct=function(se){yc(i.removed,{element:se});try{p(se).removeChild(se)}catch{k(se)}},ft=function(se,Ae){try{yc(i.removed,{attribute:Ae.getAttributeNode(se),from:Ae})}catch{yc(i.removed,{attribute:null,from:Ae})}if(Ae.removeAttribute(se),se==="is")if(Ve||tt)try{ct(Ae)}catch{}else try{Ae.setAttribute(se,"")}catch{}},Le=function(se){let Ae=null,vt=null;if(Ie)se="<remove></remove>"+se;else{const ue=mC(se,/^[\r\n\t ]+/);vt=ue&&ue[0]}Ut==="application/xhtml+xml"&&lt===J&&(se='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+se+"</body></html>");const on=S?A(se):se;if(lt===J)try{Ae=new g().parseFromString(on,Ut)}catch{}if(!Ae||!Ae.documentElement){Ae=H.createDocument(lt,"template",null);try{Ae.documentElement.innerHTML=it?R:on}catch{}}const Yt=Ae.body||Ae.documentElement;return se&&vt&&Yt.insertBefore(l.createTextNode(vt),Yt.childNodes[0]||null),lt===J?Y.call(Ae,oe?"html":"body")[0]:oe?Ae.documentElement:Yt},Ct=function(se){return V.call(se.ownerDocument||se,se,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Bn=function(se){var Ae,vt;se.normalize();const on=V.call(se.ownerDocument||se,se,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let Yt=on.nextNode();for(;Yt;){let Ze=Yt.data;al([X,K,B],st=>{Ze=xc(Ze,st," ")}),Yt.data=Ze,Yt=on.nextNode()}const ue=(Ae=(vt=se.querySelectorAll)===null||vt===void 0?void 0:vt.call(se,"template"))!==null&&Ae!==void 0?Ae:[];al(Array.from(ue),Ze=>{nn(Ze.content)&&Bn(Ze.content)})},tn=function(se){const Ae=T?T(se):null;return typeof Ae!="string"||Xt(Ae)!=="form"?!1:typeof se.nodeName!="string"||typeof se.textContent!="string"||typeof se.removeChild!="function"||se.attributes!==w(se)||typeof se.removeAttribute!="function"||typeof se.setAttribute!="function"||typeof se.namespaceURI!="string"||typeof se.insertBefore!="function"||typeof se.hasChildNodes!="function"||se.nodeType!==C(se)||se.childNodes!==c(se)},nn=function(se){if(!C||typeof se!="object"||se===null)return!1;try{return C(se)===ca.documentFragment}catch{return!1}},Xn=function(se){if(!C||typeof se!="object"||se===null)return!1;try{return typeof C(se)=="number"}catch{return!1}};function Lt(gt,se,Ae){al(gt,vt=>{vt.call(i,se,Ae,jn)})}const zt=function(se){let Ae=null;if(Lt(z.beforeSanitizeElements,se,null),tn(se))return ct(se),!0;const vt=Xt(T?T(se):se.nodeName);if(Lt(z.uponSanitizeElement,se,{tagName:vt,allowedTags:De}),Rt&&se.hasChildNodes()&&!Xn(se.firstElementChild)&&Di(/<[/\w!]/g,se.innerHTML)&&Di(/<[/\w!]/g,se.textContent)||Rt&&se.namespaceURI===J&&vt==="style"&&Xn(se.firstElementChild)||se.nodeType===ca.progressingInstruction||Rt&&se.nodeType===ca.comment&&Di(/<[/\w]/g,se.data))return ct(se),!0;if(Oe[vt]||!(nt.tagCheck instanceof Function&&nt.tagCheck(vt))&&!De[vt]){if(!Oe[vt]&&$n(vt)&&(le.tagNameCheck instanceof RegExp&&Di(le.tagNameCheck,vt)||le.tagNameCheck instanceof Function&&le.tagNameCheck(vt)))return!1;if(Qe&&!ze[vt]){const Yt=p(se),ue=c(se);if(ue&&Yt){const Ze=ue.length;for(let st=Ze-1;st>=0;--st){const yt=N(ue[st],!0);Yt.insertBefore(yt,b(se))}}}return ct(se),!0}return(C?C(se):se.nodeType)===ca.element&&!Se(se)||(vt==="noscript"||vt==="noembed"||vt==="noframes")&&Di(/<\/no(script|embed|frames)/i,se.innerHTML)?(ct(se),!0):(Ft&&se.nodeType===ca.text&&(Ae=se.textContent,al([X,K,B],Yt=>{Ae=xc(Ae,Yt," ")}),se.textContent!==Ae&&(yc(i.removed,{element:se.cloneNode()}),se.textContent=Ae)),Lt(z.afterSanitizeElements,se,null),!1)},Sn=function(se,Ae,vt){if(ke[Ae]||bt&&(Ae==="id"||Ae==="name")&&(vt in l||vt in Nr))return!1;const on=q[Ae]||nt.attributeCheck instanceof Function&&nt.attributeCheck(Ae,se);if(!($e&&!ke[Ae]&&Di(F,Ae))){if(!(xe&&Di(G,Ae))){if(!on||ke[Ae]){if(!($n(se)&&(le.tagNameCheck instanceof RegExp&&Di(le.tagNameCheck,se)||le.tagNameCheck instanceof Function&&le.tagNameCheck(se))&&(le.attributeNameCheck instanceof RegExp&&Di(le.attributeNameCheck,Ae)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(Ae,se))||Ae==="is"&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&Di(le.tagNameCheck,vt)||le.tagNameCheck instanceof Function&&le.tagNameCheck(vt))))return!1}else if(!Qt[Ae]){if(!Di(Ue,xc(vt,ae,""))){if(!((Ae==="src"||Ae==="xlink:href"||Ae==="href")&&se!=="script"&&fC(vt,"data:")===0&&Wt[se])){if(!(at&&!Di(Z,xc(vt,ae,"")))){if(vt)return!1}}}}}}return!0},hr=Dn({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),$n=function(se){return!hr[Md(se)]&&Di(me,se)},Jt=function(se){Lt(z.beforeSanitizeAttributes,se,null);const Ae=se.attributes;if(!Ae||tn(se))return;const vt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0};let on=Ae.length;for(;on--;){const Yt=Ae[on],ue=Yt.name,Ze=Yt.namespaceURI,st=Yt.value,yt=Xt(ue),xn=st;let Kt=ue==="value"?xn:CP(xn);if(vt.attrName=yt,vt.attrValue=Kt,vt.keepAttr=!0,vt.forceKeepAttr=void 0,Lt(z.uponSanitizeAttribute,se,vt),Kt=vt.attrValue,ve&&(yt==="id"||yt==="name")&&fC(Kt,Ne)!==0&&(ft(ue,se),Kt=Ne+Kt),Rt&&Di(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Kt)){ft(ue,se);continue}if(yt==="attributename"&&mC(Kt,"href")){ft(ue,se);continue}if(vt.forceKeepAttr)continue;if(!vt.keepAttr){ft(ue,se);continue}if(!Ge&&Di(/\/>/i,Kt)){ft(ue,se);continue}Ft&&al([X,K,B],Tn=>{Kt=xc(Kt,Tn," ")});const fr=Xt(se.nodeName);if(!Sn(fr,yt,Kt)){ft(ue,se);continue}if(S&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Ze)switch(d.getAttributeType(fr,yt)){case"TrustedHTML":{Kt=A(Kt);break}case"TrustedScriptURL":{Kt=S.createScriptURL(Kt);break}}if(Kt!==xn)try{Ze?se.setAttributeNS(Ze,ue,Kt):se.setAttribute(ue,Kt),tn(se)?ct(se):hC(i.removed)}catch{ft(ue,se)}}Lt(z.afterSanitizeAttributes,se,null)},yr=function(se){let Ae=null;const vt=Ct(se);for(Lt(z.beforeSanitizeShadowDOM,se,null);Ae=vt.nextNode();)if(Lt(z.uponSanitizeShadowNode,Ae,null),zt(Ae),Jt(Ae),nn(Ae.content)&&yr(Ae.content),(C?C(Ae):Ae.nodeType)===ca.element){const Yt=v?v(Ae):Ae.shadowRoot;nn(Yt)&&(Wn(Yt),yr(Yt))}Lt(z.afterSanitizeShadowDOM,se,null)},Wn=function(se){const Ae=C?C(se):se.nodeType;if(Ae===ca.element){const Yt=v?v(se):se.shadowRoot;nn(Yt)&&(Wn(Yt),yr(Yt))}const vt=c?c(se):se.childNodes;if(!vt)return;const on=[];al(vt,Yt=>{yc(on,Yt)});for(const Yt of on)Wn(Yt);if(Ae===ca.element){const Yt=T?T(se):null;if(typeof Yt=="string"&&Xt(Yt)==="template"){const ue=se.content;nn(ue)&&Wn(ue)}}};return i.sanitize=function(gt){let se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ae=null,vt=null,on=null,Yt=null;if(it=!gt,it&&(gt="<!-->"),typeof gt!="string"&&!Xn(gt)&&(gt=RP(gt),typeof gt!="string"))throw Nc("dirty is not a string, aborting");if(!i.isSupported)return gt;if(Te||ce(se),i.removed=[],typeof gt=="string"&&(ye=!1),ye){const st=T?T(gt):gt.nodeName;if(typeof st=="string"){const yt=Xt(st);if(!De[yt]||Oe[yt])throw Nc("root node is forbidden and cannot be sanitized in-place")}if(tn(gt))throw Nc("root node is clobbered and cannot be sanitized in-place");Wn(gt)}else if(Xn(gt))Ae=Le("<!---->"),vt=Ae.ownerDocument.importNode(gt,!0),vt.nodeType===ca.element&&vt.nodeName==="BODY"||vt.nodeName==="HTML"?Ae=vt:Ae.appendChild(vt),Wn(vt);else{if(!Ve&&!Ft&&!oe&&gt.indexOf("<")===-1)return S&&ot?A(gt):gt;if(Ae=Le(gt),!Ae)return Ve?null:ot?R:""}Ae&&Ie&&ct(Ae.firstChild);const ue=Ct(ye?gt:Ae);for(;on=ue.nextNode();)zt(on),Jt(on),nn(on.content)&&yr(on.content);if(ye)return Ft&&Bn(gt),gt;if(Ve){if(Ft&&Bn(Ae),tt)for(Yt=P.call(Ae.ownerDocument);Ae.firstChild;)Yt.appendChild(Ae.firstChild);else Yt=Ae;return(q.shadowroot||q.shadowrootmode)&&(Yt=Q.call(h,Yt,!0)),Yt}let Ze=oe?Ae.outerHTML:Ae.innerHTML;return oe&&De["!doctype"]&&Ae.ownerDocument&&Ae.ownerDocument.doctype&&Ae.ownerDocument.doctype.name&&Di(FP,Ae.ownerDocument.doctype.name)&&(Ze="<!DOCTYPE "+Ae.ownerDocument.doctype.name+`>
334
+ `+Ze),Ft&&al([X,K,B],st=>{Ze=xc(Ze,st," ")}),S&&ot?A(Ze):Ze},i.setConfig=function(){let gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(gt),Te=!0},i.clearConfig=function(){jn=null,Te=!1},i.isValidAttribute=function(gt,se,Ae){jn||ce({});const vt=Xt(gt),on=Xt(se);return Sn(vt,on,Ae)},i.addHook=function(gt,se){typeof se=="function"&&yc(z[gt],se)},i.removeHook=function(gt,se){if(se!==void 0){const Ae=NP(z[gt],se);return Ae===-1?void 0:SP(z[gt],Ae,1)[0]}return hC(z[gt])},i.removeHooks=function(gt){z[gt]=[]},i.removeAllHooks=function(){z=xC()},i}var Tj=Rj();const ul=500,NC=20;function SC(n,i){const l=new Map(n.map(x=>[x.k,x]));for(const x of i)l.set(x.k,x);const h=Array.from(l.values()).sort((x,D)=>x.k-D.k);return h.length>ul?h.slice(-ul):h}function WP(n,i){const[l,h]=L.useState([]),[x,D]=L.useState(!1),[_,s]=L.useState(!1),[u,f]=L.useState(null),[g,d]=L.useState(!1),y=L.useRef(""),N=L.useRef(null),k=L.useRef(!1),b=L.useRef(!1),c=L.useRef(null),p=L.useRef([]);L.useEffect(()=>{y.current="",N.current=null,k.current=!1,b.current=!1,c.current=null,p.current=[],h([]),D(!1),s(!1),f(null),d(!1)},[n]);const v=L.useCallback(()=>n1(n,{since:y.current,limit:NC}),[n]),w=L.useCallback(T=>{if(!T)return;d(!0),y.current=T.hash||"";const S=Array.isArray(T.messages)?T.messages:[];T.session&&c.current&&T.session!==c.current?(p.current=S.slice(-ul),h(p.current),N.current=T.firstSeq??null,D(!!T.hasMore),k.current=!0):(p.current=SC(p.current,S),h(p.current),!k.current&&!b.current&&(k.current=!0,N.current=T.firstSeq??null,D(!!T.hasMore)),p.current.length>=ul&&D(!1)),T.session&&(c.current=T.session,f(T.session))},[]);Uf({fetch:v,apply:w,intervalMs:1500,enabled:!!n,deps:[n]});const C=L.useCallback(async()=>{if(!(b.current||!x||N.current==null)){if(p.current.length>=ul){D(!1);return}b.current=!0,s(!0);try{const T=Math.min(NC,ul-p.current.length),S=await n1(n,{before:N.current,limit:T});if(!S)return;const R=Array.isArray(S.messages)?S.messages:[];p.current=SC(p.current,R),h(p.current),N.current=S.firstSeq??N.current,D(!!S.hasMore&&p.current.length<ul)}finally{b.current=!1,s(!1)}}},[n,x]);return{messages:l,hasMoreOlder:x,loadOlder:C,loadingOlder:_,session:u,loaded:g}}const GP=1200,YP=450;function qP(n,i){const[l,h]=L.useState(null),x=L.useRef(!0),D=L.useCallback(async()=>{if(!n||!i){h(null);return}try{const s=await D3(n);x.current&&h(s)}catch{}},[n,i]),_=L.useCallback(()=>{setTimeout(()=>{D()},YP)},[D]);return L.useEffect(()=>{if(x.current=!0,!i)return h(null),()=>{x.current=!1};D();const s=setInterval(D,GP);return()=>{x.current=!1,clearInterval(s)}},[n,i,D]),{prompt:l,refetch:_}}function KP(){return{prompt:"需要你确认",options:[{label:"允许",keys:["Enter"]},{label:"拒绝",keys:["Escape"]}]}}function XP({pane:n,prompt:i,onAuthFail:l,onAct:h}){var c;const x=i.cursor??((c=i.options[0])==null?void 0:c.n)??null,[D,_]=L.useState(x),[s,u]=L.useState(null),f=`${i.title}|${i.options.map(p=>`${p.n}:${p.label}`).join(",")}`,g=s===f;L.useEffect(()=>{var p;_(i.cursor??((p=i.options[0])==null?void 0:p.n)??null)},[f]),L.useEffect(()=>{if(!g)return;const p=setTimeout(()=>u(null),2e3);return()=>clearTimeout(p)},[g]);const d=async p=>{try{await p(),h==null||h()}catch(v){v instanceof li&&(l==null||l())}},y=p=>d(()=>Dc(n,String(p),!1)),N=()=>d(()=>Jd(n,["Escape"])),k=(p=N)=>{if(!g){u(f);return}u(null),p()},b=g?"再点一次取消":"取消";if(i.submit){const p=(i.options.find(w=>/submit/i.test(w.label))||i.options[0]).n,v=i.options.find(w=>/cancel/i.test(w.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:()=>k(()=>v?y(v.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:()=>{u(null),y(p)},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:[i.leadIn&&o.jsxDEV("div",{className:"chat-gate-leadin",children:i.leadIn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:63,columnNumber:25},this),i.multi&&o.jsxDEV("div",{className:"chat-gate-step",children:["第 ",i.step,"/",i.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:i.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:i.options.map(p=>o.jsxDEV("button",{type:"button",role:"radio","aria-checked":D===p.n,className:`chat-gate-opt${D===p.n?" on":""}`,onClick:()=>{u(null),_(p.n)},children:[o.jsxDEV("span",{className:"chat-gate-opt-label",children:p.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:70,columnNumber:13},this),p.description&&o.jsxDEV("span",{className:"chat-gate-opt-desc",children:p.description},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:71,columnNumber:31},this)]},p.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:()=>k(),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:D==null,onClick:()=>{u(null),y(D)},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 JP(n){const i=n.name||"工具",l=n.input||{};return i==="Bash"?`运行 ${l.command||""}`.trim():i==="Edit"||i==="MultiEdit"||i==="Write"?`${i==="Write"?"写入":"编辑"} ${l.file_path||""}`.trim():i==="Read"?`读取 ${l.file_path||l.notebook_path||""}`.trim():i==="NotebookEdit"?`编辑 ${l.notebook_path||""}`.trim():i==="Grep"?`搜索 ${l.pattern||""}`.trim():i==="Glob"?`查找文件 ${l.pattern||""}`.trim():i==="WebSearch"?`联网搜索 ${l.query||""}`.trim():i==="WebFetch"?`读取网页 ${l.url||""}`.trim():i==="TodoWrite"?"更新待办":i==="Skill"?`激活技能 ${l.command||l.skill||""}`.trim():i==="Task"||i==="Agent"?`调用 Agent${l.subagent_type?`(${l.subagent_type})`:""}: ${l.description||""}`.trim():`调用工具 ${i}`}function Lj(n){return n==="Bash"?o.jsxDEV(C2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:47,columnNumber:31},this):n==="Edit"||n==="MultiEdit"||n==="Write"||n==="NotebookEdit"?o.jsxDEV(EE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:48,columnNumber:102},this):n==="Read"?o.jsxDEV(yE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:49,columnNumber:31},this):n==="Grep"||n==="Glob"?o.jsxDEV(D2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:50,columnNumber:50},this):n==="WebSearch"||n==="WebFetch"?o.jsxDEV(zd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:51,columnNumber:59},this):n==="TodoWrite"?o.jsxDEV(R2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:52,columnNumber:36},this):n==="Skill"?o.jsxDEV(T2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:53,columnNumber:32},this):n==="Task"||n==="Agent"?o.jsxDEV(L2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:54,columnNumber:51},this):o.jsxDEV(A2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:55,columnNumber:10},this)}function mw(){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: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),o.jsxDEV("span",{className:"chat-typing-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:64,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:61,columnNumber:5},this)}function Aj({diff:n}){return!n||!n.added&&!n.removed?null:o.jsxDEV("span",{className:"chat-tool-stat","aria-label":`增 ${n.added} 行,删 ${n.removed} 行`,children:[n.added>0&&o.jsxDEV("span",{className:"cts-add",children:["+",n.added]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:75,columnNumber:26},this),n.removed>0&&o.jsxDEV("span",{className:"cts-del",children:["−",n.removed]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:76,columnNumber:28},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:74,columnNumber:5},this)}function ZP({tool:n}){return n.diff&&n.diff.hunks&&n.diff.hunks.length?o.jsxDEV("div",{className:"chat-diff",children:n.diff.hunks.map((i,l)=>o.jsxDEV("div",{className:"chat-diff-hunk",children:i.lines.map((h,x)=>{const D=h[0]==="+"?"add":h[0]==="-"?"del":"ctx";return o.jsxDEV("div",{className:"chat-diff-line cd-"+D,children:h||" "},x,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:91,columnNumber:22},this)})},l,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:88,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:86,columnNumber:7},this):n.result!=null?o.jsxDEV("pre",{className:"chat-tool-body",children:n.result},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:98,columnNumber:35},this):null}function QP({tool:n}){if(n.isError)return o.jsxDEV("span",{className:"chat-tool-status err","aria-label":"失败",children:o.jsxDEV(Gs,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:106,columnNumber:83},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:106,columnNumber:28},this);const i=n.diff&&(n.diff.added||n.diff.removed);return n.result!=null&&!i?o.jsxDEV("span",{className:"chat-tool-status ok","aria-label":"成功",children:o.jsxDEV(op,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:108,columnNumber:105},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:108,columnNumber:51},this):null}function eI({tool:n,running:i,onOpen:l}){return o.jsxDEV("div",{className:"chat-tool"+(n.isError?" chat-tool-err":"")+(i?" chat-tool-running":""),children:o.jsxDEV("button",{type:"button",className:"chat-tool-head",onClick:l,children:[o.jsxDEV("span",{className:"chat-tool-ic",children:Lj(n.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:118,columnNumber:9},this),o.jsxDEV("span",{className:"chat-tool-head-text",children:JP(n)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:119,columnNumber:9},this),o.jsxDEV(Aj,{diff:n.diff},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:120,columnNumber:9},this),i?o.jsxDEV("span",{className:"chat-tool-head-running",children:o.jsxDEV(mw,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:122,columnNumber:61},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:122,columnNumber:20},this):o.jsxDEV(QP,{tool:n},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:122,columnNumber:85},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:117,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:116,columnNumber:5},this)}function Mj(n){return{Bash:"运行命令",Edit:"编辑文件",MultiEdit:"编辑文件",Write:"写入文件",Read:"读取文件",NotebookEdit:"编辑笔记本",Grep:"搜索",Glob:"查找文件",WebSearch:"联网搜索",WebFetch:"读取网页",TodoWrite:"更新待办",Skill:"激活技能",Task:"调用 Agent",Agent:"调用 Agent"}[n]||"调用工具"}function tI(n){const i=n.name,l=n.input||{};return i==="Bash"?l.command||"":i==="Read"||i==="Edit"||i==="MultiEdit"||i==="Write"?l.file_path||"":i==="NotebookEdit"?l.notebook_path||"":i==="Grep"||i==="Glob"?l.pattern||"":i==="WebSearch"?l.query||"":i==="WebFetch"?l.url||"":i==="Skill"?l.command||l.skill||"":i==="Task"||i==="Agent"?l.prompt||l.description||"":Object.keys(l).length?JSON.stringify(l,null,2):""}function nI(n){if(!n)return{dir:"",name:""};const i=n.lastIndexOf("/");return i>=0?{dir:n.slice(0,i+1),name:n.slice(i+1)}:{dir:"",name:n}}function rI({hunks:n}){return o.jsxDEV("div",{className:"dv",children:n.map((i,l)=>{let h=i.oldStart||0,x=i.newStart||0;return o.jsxDEV("div",{className:"dv-hunk",children:[l>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:176,columnNumber:48},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:176,columnNumber:24},this),(i.lines||[]).map((D,_)=>{const s=typeof D=="string"?D[0]:" ",u=typeof D=="string"?D.slice(1):"";let f,g;return s==="+"?(f=x++,g="add"):s==="-"?(f=h++,g="del"):(f=x++,h++,g="ctx"),o.jsxDEV("div",{className:"dv-row dv-"+g,children:[o.jsxDEV("span",{className:"dv-ln",children:f},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-sign",children:s==="+"?"+":s==="-"?"−":""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:188,columnNumber:19},this),o.jsxDEV("span",{className:"dv-code",children:u||" "},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:189,columnNumber:19},this)]},_,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:186,columnNumber:17},this)})]},l,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:175,columnNumber:11},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:170,columnNumber:5},this)}function Uj(n,i){return i?{txt:"执行中",cls:"run"}:n.isError?{txt:"失败",cls:"err"}:n.result!=null?{txt:"成功",cls:"ok"}:{txt:"未返回",cls:"idle"}}function iI({tool:n,running:i}){const{dir:l,name:h}=nI(n.input&&n.input.file_path||""),x=Uj(n,i),D=n.diff&&n.diff.created,_=n.diff&&n.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(EE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:219,columnNumber:41},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:219,columnNumber:9},this),o.jsxDEV("div",{className:"es-file",children:[o.jsxDEV("span",{className:"es-name",children:h||n.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:221,columnNumber:11},this),l&&o.jsxDEV("span",{className:"es-dir",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:222,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:220,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:218,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:Mj(n.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:227,columnNumber:11},this),o.jsxDEV("span",{className:"tool-sheet-state "+x.cls,children:x.txt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:228,columnNumber:11},this),o.jsxDEV(Aj,{diff:n.diff},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:229,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:226,columnNumber:9},this),_&&_.length?o.jsxDEV("div",{className:"es-diff",children:o.jsxDEV(rI,{hunks:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:232,columnNumber:38},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:232,columnNumber:13},this):D?o.jsxDEV("div",{className:"es-note",children:["新建文件",n.diff.added?` · 新增 ${n.diff.added} 行`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:234,columnNumber:15},this):i?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):o.jsxDEV("div",{className:"tool-sheet-empty",children:"没有可显示的改动"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:237,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:225,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:217,columnNumber:5},this)}function sI({tool:n,running:i,onClose:l}){if(!n)return null;const h=!!(n.diff&&(n.diff.hunks&&n.diff.hunks.length||n.diff.created)),x=tI(n),D=n.result!=null,_=Uj(n,i);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"tool-sheet-backdrop",onClick:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:254,columnNumber:7},this),o.jsxDEV("div",{className:"tool-sheet"+(h?" 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:256,columnNumber:9},this),o.jsxDEV("button",{type:"button",className:"cmd-close tool-sheet-x","aria-label":"关闭",onClick:l,children:o.jsxDEV(Gs,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:257,columnNumber:100},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:257,columnNumber:9},this),h?o.jsxDEV(iI,{tool:n,running:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:259,columnNumber:11},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"tool-sheet-head",children:[o.jsxDEV("span",{className:"tool-sheet-ic",children:Lj(n.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:263,columnNumber:15},this),o.jsxDEV("span",{className:"tool-sheet-title",children:n.name||"工具"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:264,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:262,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:268,columnNumber:17},this),o.jsxDEV("div",{className:"tool-sheet-mode-row",children:[o.jsxDEV("span",{className:"tool-sheet-mode-val",children:Mj(n.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:270,columnNumber:19},this),o.jsxDEV("span",{className:"tool-sheet-state "+_.cls,children:_.txt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:271,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:269,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:267,columnNumber:15},this),x&&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:276,columnNumber:19},this),o.jsxDEV("pre",{className:"tool-sheet-cmd",children:x},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:277,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:275,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:281,columnNumber:51},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:281,columnNumber:17},this),D?o.jsxDEV(ZP,{tool:n},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:283,columnNumber:21},this):o.jsxDEV("div",{className:"tool-sheet-empty",children:i?"执行中…":"无输出"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:284,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:280,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:266,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:261,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:255,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:253,columnNumber:5},this)}function aI({m:n,running:i,onOpenTool:l}){if(n.type==="tool")return o.jsxDEV(eI,{tool:n.tool,running:i,onOpen:()=>l(n)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:295,columnNumber:33},this);if(n.type==="interrupt")return o.jsxDEV("div",{className:"chat-interrupt",children:M("chat.interrupted")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:298,columnNumber:38},this);if(n.type==="compact")return o.jsxDEV("div",{className:"chat-compact-divider",children:M("chat.compacted")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:300,columnNumber:36},this);if(n.type==="slash")return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"chat-slash-cmd",children:[n.name,n.args?" "+n.args:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:308,columnNumber:9},this),n.result&&o.jsxDEV("div",{className:"chat-slash-result",children:n.result},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:309,columnNumber:22},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:307,columnNumber:7},this);if(n.type==="thinking")return null;if(n.role!=="user"){const h=Tj.sanitize(cr.parse(n.text||""));return o.jsxDEV("div",{className:"chat-bubble chat-them chat-md",dangerouslySetInnerHTML:{__html:h}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:320,columnNumber:12},this)}return o.jsxDEV("div",{className:"chat-bubble chat-me",children:n.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:322,columnNumber:10},this)}const oI=40,lI=80;function cI(n){const i=new Set;let l=-1;return n.forEach((h,x)=>{h.type==="text"&&h.role==="user"?(i.add(x),l>=0&&(i.add(l),l=-1)):h.type==="text"&&(l=x)}),l>=0&&i.add(l),i}function uI(n){if(!n)return null;const i=new Date(n);if(Number.isNaN(i.getTime()))return null;const l=`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`,h=new Date;return i.getFullYear()===h.getFullYear()&&i.getMonth()===h.getMonth()&&i.getDate()===h.getDate()?l:`${i.getMonth()+1}月${i.getDate()}日 ${l}`}function dI(n){var D,_,s,u;const i=(D=n.closest)==null?void 0:D.call(n,".chat-md pre");if(i)return{el:i,text:i.innerText};const l=(_=n.closest)==null?void 0:_.call(n,".chat-tool-body, .chat-diff");if(l)return{el:l,text:l.innerText};const h=(s=n.closest)==null?void 0:s.call(n,".chat-bubble");if(h)return{el:h,text:h.innerText};const x=(u=n.closest)==null?void 0:u.call(n,".chat-tool");return x?{el:x,text:x.innerText}:null}const CC=72;function hI({pane:n,kind:i,msg:l,onAuthFail:h,slashEcho:x,onSlashEchoDone:D}){const{messages:_,hasMoreOlder:s,loadOlder:u,loadingOlder:f,session:g,loaded:d}=WP(n),y=L.useMemo(()=>cI(_),[_]),N=i==="permission",{prompt:k,refetch:b}=qP(n,N),c=L.useRef(!1);L.useEffect(()=>{k&&(c.current=!0)},[k]),L.useEffect(()=>{N||(c.current=!1)},[N]);const p=!k&&N&&!c.current?KP():null,v=_.length?_[_.length-1]:null,w=(v==null?void 0:v.type)==="tool"&&v.tool.result===null&&i==="working",C=w,T=i==="compacting",S=i==="error",R=L.useRef(null);x&&!R.current&&(R.current={k:_.reduce((oe,Te)=>Math.max(oe,Te.k??-1),-1),session:g}),!x&&R.current&&(R.current=null);const j=!!(x&&R.current&&(R.current.session&&g&&R.current.session!==g||_.some(oe=>oe.type==="slash"&&oe.name===x.name&&(oe.k??-1)>R.current.k)));L.useEffect(()=>{j&&(D==null||D())},[j,D]);const A=!w&&!T&&!S&&((v==null?void 0:v.role)==="user"?i!=="permission":i==="working"),O=L.useRef(null),H=L.useRef(null),V=L.useRef(!0),P=L.useRef(null),Y=L.useRef(!1),Q=L.useRef(null),[z,X]=L.useState(!0),[K,B]=L.useState(null),F=L.useRef(null),G=L.useRef({timer:null,x:0,y:0,fired:!1}),[Z,ae]=L.useState(null),me=Z!=null?_.find(oe=>oe.type==="tool"&&(oe.k??oe.i)===Z):null;L.useEffect(()=>{Z!=null&&!me&&ae(null)},[Z,me]);const Ue=me!=null,De=L.useRef(0);Zd(Ue,()=>{De.current=0,ae(null)}),L.useEffect(()=>{if(Ue)return window.history.pushState({chatToolSheet:!0},""),De.current=1,()=>{De.current>0&&(Qd(De.current),De.current=0)}},[Ue]);const ie=()=>{F.current&&(F.current.classList.remove("chat-copy-hl"),F.current=null)},q=()=>{ie(),B(null)};nr(!!K,q);const fe=()=>{const oe=G.current;oe.timer&&(clearTimeout(oe.timer),oe.timer=null)},le=(oe,Te,Ie)=>{var ye;G.current.timer=null;const Ve=dI(Ie),tt=H.current;if(!Ve||!Ve.text.trim()||!tt)return;G.current.fired=!0,(ye=navigator.vibrate)==null||ye.call(navigator,12),Ve.el.classList.add("chat-copy-hl"),F.current=Ve.el;const ot=tt.getBoundingClientRect(),bt=Ve.el.getBoundingClientRect(),ve=Math.max(8,Math.min(oe-ot.left-CC/2,ot.width-CC-8)),Ne=bt.top-ot.top-44,Qe=Ne<4?Math.min(bt.bottom-ot.top+8,ot.height-52):Ne;B({top:Qe,left:ve,text:Ve.text})},Oe=oe=>{if(q(),G.current.fired=!1,oe.pointerType==="mouse")return;const Te=G.current;Te.x=oe.clientX,Te.y=oe.clientY;const{target:Ie}=oe;fe(),Te.timer=setTimeout(()=>le(Te.x,Te.y,Ie),480)},ke=oe=>{G.current.fired&&(G.current.fired=!1,oe.stopPropagation(),oe.preventDefault())},nt=oe=>{const Te=G.current;Te.timer&&Math.hypot(oe.clientX-Te.x,oe.clientY-Te.y)>10&&fe()},xe=async oe=>{var Te;try{await navigator.clipboard.writeText(oe),(Te=navigator.vibrate)==null||Te.call(navigator,8)}catch{}q()};L.useEffect(()=>fe,[]),L.useEffect(()=>{q(),ae(null)},[n]);const[$e,at]=L.useState(null),Ge=!!(k||p);L.useEffect(()=>{var Te;if(!Ge){at(null);return}const oe=()=>{const Ie=H.current,Ve=Ie==null?void 0:Ie.closest(".app");if(!Ie||!Ve)return;const tt=Ie.getBoundingClientRect(),ot=Ve.getBoundingClientRect(),bt=ot.bottom-tt.top;at(bt>0?{top:tt.top-ot.top,height:bt}:null)};return oe(),window.addEventListener("resize",oe),(Te=window.visualViewport)==null||Te.addEventListener("resize",oe),()=>{var Ie;window.removeEventListener("resize",oe),(Ie=window.visualViewport)==null||Ie.removeEventListener("resize",oe)}},[Ge]);const Ft=()=>{const oe=O.current;if(!oe)return;fe(),K&&q();const Te=oe.scrollHeight-oe.scrollTop-oe.clientHeight<oI;V.current=Te,X(Te),oe.scrollTop<lI&&s&&!f&&(P.current=oe.scrollHeight,Y.current=!0,u())},Rt=()=>{const oe=O.current;oe&&(oe.scrollTop=oe.scrollHeight,V.current=!0,X(!0))};return L.useEffect(()=>{const oe=O.current,Te=_.length?_[_.length-1]:null,Ie=Te?Te.k??Te.i:null,Ve=Te&&Te.role==="user"&&Q.current!=null&&Ie!=null&&Ie>Q.current;if(oe){if(Y.current){oe.scrollTop+=oe.scrollHeight-P.current,P.current=null,Y.current=!1;return}if(Ie!=null&&(Q.current=Q.current==null?Ie:Math.max(Q.current,Ie)),Ve){oe.scrollTop=oe.scrollHeight,V.current=!0,X(!0);return}V.current&&(oe.scrollTop=oe.scrollHeight)}},[_,A]),L.useEffect(()=>{const oe=O.current;if(!oe)return;const Te=()=>{f||!s||_.length===0||oe.clientHeight>0&&oe.scrollHeight<=oe.clientHeight&&(P.current=oe.scrollHeight,Y.current=!0,u())};if(Te(),typeof ResizeObserver>"u")return;const Ie=new ResizeObserver(Te);return Ie.observe(oe),()=>Ie.disconnect()},[_,s,f,u]),L.useEffect(()=>{const oe=O.current;oe&&(oe.scrollTop=oe.scrollHeight),V.current=!0,X(!0),Q.current=null},[n]),o.jsxDEV("div",{className:"chat-view",ref:H,children:[o.jsxDEV("div",{className:"chat-scroll",ref:O,onScroll:Ft,onPointerDown:Oe,onPointerMove:nt,onPointerUp:fe,onPointerCancel:fe,onClickCapture:ke,children:[_.length===0&&(d?o.jsxDEV("div",{className:"chat-new",children:M("boot.chat_empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:647,columnNumber:13},this):o.jsxDEV(oj,{hint:M("boot.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:648,columnNumber:13},this)),_.map((oe,Te)=>{if(oe.type==="thinking")return null;const Ie=y.has(Te)?uI(oe.ts):null;return o.jsxDEV(L.Fragment,{children:[o.jsxDEV(aI,{m:oe,running:C&&Te===_.length-1,onOpenTool:Ve=>ae(Ve.k??Ve.i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:654,columnNumber:15},this),Ie&&o.jsxDEV("div",{className:"chat-ts "+(oe.role==="user"?"ts-me":"ts-them"),children:Ie},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:656,columnNumber:25},this)]},(oe.k??oe.i)+":"+Te,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:653,columnNumber:13},this)}),x&&!j&&o.jsxDEV("div",{className:"chat-slash-cmd",children:[x.name,x.args?" "+x.args:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:661,columnNumber:11},this),T&&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:665,columnNumber:13},this),o.jsxDEV(mw,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:666,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:664,columnNumber:11},this),S&&o.jsxDEV("div",{className:"chat-turn-error",role:"status",children:["本轮出错",l?`:${l}`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:670,columnNumber:11},this),A&&o.jsxDEV("div",{className:"chat-typing","aria-hidden":"true",children:o.jsxDEV(mw,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:676,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:675,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:640,columnNumber:7},this),K&&o.jsxDEV("div",{className:"sel-callout chat-copy-callout",style:{top:K.top,left:K.left},onPointerDown:oe=>oe.preventDefault(),children:o.jsxDEV("button",{type:"button",onClick:()=>xe(K.text),children:"拷贝"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:684,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:682,columnNumber:9},this),!z&&o.jsxDEV("button",{type:"button",className:"new-output","aria-label":"回到最新",onClick:Rt,children:"↓ 回到底部"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:689,columnNumber:9},this),me&&o.jsxDEV(sI,{tool:me.tool,running:C&&me===_[_.length-1],onClose:()=>ae(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:695,columnNumber:9},this),Ge&&o.jsxDEV("div",{className:"chat-gate-backdrop",style:$e?{top:$e.top+"px",height:$e.height+"px",bottom:"auto"}:void 0},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:706,columnNumber:18},this),k&&o.jsxDEV(XP,{pane:n,prompt:k,onAuthFail:h,onAct:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:708,columnNumber:18},this),p&&o.jsxDEV("div",{className:"chat-gate",children:[o.jsxDEV("div",{className:"chat-gate-prompt",children:p.prompt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:711,columnNumber:11},this),o.jsxDEV("div",{className:"chat-gate-actions",children:p.options.map((oe,Te)=>o.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:()=>Jd(n,oe.keys),children:oe.label},Te,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:714,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:712,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:710,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:639,columnNumber:5},this)}function mI({onSaved:n}){const[i,l]=L.useState(""),h=x=>{x.preventDefault();const D=i.trim();D&&(jU(D),n())};return o.jsxDEV("form",{className:"token-prompt",onSubmit:h,children:[o.jsxDEV("h2",{children:M("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:i,onChange:x=>l(x.target.value),placeholder:M("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:M("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 fI({pushKey:n,notifyOn:i}){const[l,h]=L.useState(""),x='handmux push "构建完成" "耗时 3m12s"',D=!!(i&&n),_=x,s=`${x} --session ${M("scriptPush.session_placeholder")}`,u=`${x} --device ${D?n:M("scriptPush.device_placeholder")}`,f=async(y,N)=>{try{await navigator.clipboard.writeText(y),h(N),setTimeout(()=>h(""),1500)}catch{}},g=y=>M(l===y?"scriptPush.copied":"common.copy"),d=(y,N,k,b)=>o.jsxDEV("div",{className:"push-script-block",children:[o.jsxDEV("div",{className:"push-script-label",children:N},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:24,columnNumber:7},this),o.jsxDEV("pre",{className:"push-script-cmd",children:o.jsxDEV("code",{children:k},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:25,columnNumber:40},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:25,columnNumber:7},this),b&&o.jsxDEV("div",{className:"push-script-hint",children:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:26,columnNumber:16},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>f(k,y),children:g(y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:27,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:23,columnNumber:5},this);return o.jsxDEV("div",{className:"push-script-content",children:[o.jsxDEV("p",{className:"push-script-intro",children:M("scriptPush.intro")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:33,columnNumber:7},this),d("all",M("scriptPush.scope_all"),_),d("session",M("scriptPush.scope_session"),s),d("device",M("scriptPush.scope_device"),u,M(D?"scriptPush.device_key_note":"scriptPush.device_need_enable")),o.jsxDEV("div",{className:"push-script-block",children:[o.jsxDEV("div",{className:"push-script-label",children:M("scriptPush.opts_label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:41,columnNumber:9},this),o.jsxDEV("ul",{className:"push-script-fields",children:[o.jsxDEV("li",{children:M("scriptPush.opt_tag")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:43,columnNumber:11},this),o.jsxDEV("li",{children:M("scriptPush.opt_url")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:44,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:42,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:40,columnNumber:7},this),o.jsxDEV("div",{className:"push-script-note",children:M("scriptPush.reliability")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:48,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:32,columnNumber:5},this)}const Oj="tw_terminal_transport",Vj="tw_terminal_snapshot_interval",Zw=[800,1e3,1200,1500,2e3],Bj=1e3;function pI(n=localStorage){return n.getItem(Oj)==="snapshot"?"snapshot":"live"}function vI(n,i=localStorage){const l=n==="snapshot"?"snapshot":"live";return i.setItem(Oj,l),l}function gI(n=localStorage){const i=Number(n.getItem(Vj));return Zw.includes(i)?i:Bj}function bI(n,i=localStorage){const l=Number(n),h=Zw.includes(l)?l:Bj;return i.setItem(Vj,String(h)),h}function _I(n=window.location,i="live"){return new URLSearchParams(n.search).get("terminalStream")==="0"?!1:i!=="snapshot"}const wI={language:"settings.language",font:"settings.font_size",keyboard:"settings.keyboard_mode",transport:"settings.terminal_transport",tone:"settings.chat_tone",feedback:"settings.feedback",script:"settings.script_push"};function yI({title:n,onBack:i}){return o.jsxDEV("header",{className:"settings-page-head",children:[o.jsxDEV("button",{type:"button",className:"settings-page-back",onClick:i,"aria-label":M("common.back"),children:"‹"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:23,columnNumber:7},this),o.jsxDEV("h1",{children:n},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:24,columnNumber:7},this),o.jsxDEV("span",{className:"settings-page-head-spacer","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:25,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:22,columnNumber:5},this)}function Dd({title:n,children:i,footer:l}){return o.jsxDEV("section",{className:"settings-page-group",children:[o.jsxDEV("h2",{children:n},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:33,columnNumber:7},this),o.jsxDEV("div",{className:"settings-page-list",children:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:34,columnNumber:7},this),l&&o.jsxDEV("div",{className:"settings-page-footer",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:35,columnNumber:18},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:32,columnNumber:5},this)}function Va({label:n,value:i,onClick:l,dot:h=!1,disabled:x=!1}){return o.jsxDEV("button",{type:"button",className:"settings-page-row",onClick:l,disabled:x,children:[o.jsxDEV("span",{className:"settings-page-row-label",children:n},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:43,columnNumber:7},this),o.jsxDEV("span",{className:"settings-page-row-trailing",children:[i&&o.jsxDEV("span",{className:"settings-page-row-value",children:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:45,columnNumber:19},this),h&&o.jsxDEV("span",{className:"settings-page-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:46,columnNumber:17},this),o.jsxDEV("span",{className:"settings-page-chevron","aria-hidden":"true",children:"›"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:44,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:42,columnNumber:5},this)}function xI({label:n,value:i,dot:l=!1}){return o.jsxDEV("div",{className:"settings-page-row settings-page-value-row",children:[o.jsxDEV("span",{className:"settings-page-row-label",children:n},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:56,columnNumber:7},this),o.jsxDEV("span",{className:"settings-page-row-trailing",children:[o.jsxDEV("span",{className:"settings-page-row-value",children:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:58,columnNumber:9},this),l&&o.jsxDEV("span",{className:"settings-page-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:59,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:57,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:55,columnNumber:5},this)}function EC({label:n,href:i}){return o.jsxDEV("a",{className:"settings-page-row",href:i,target:"_blank",rel:"noreferrer",children:[o.jsxDEV("span",{className:"settings-page-row-label",children:n},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:68,columnNumber:7},this),o.jsxDEV("span",{className:"settings-page-row-trailing",children:o.jsxDEV("span",{className:"settings-page-external","aria-hidden":"true",children:"↗"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:70,columnNumber:9},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:69,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:67,columnNumber:5},this)}function L_({label:n,checked:i,onChange:l,disabled:h=!1,busy:x=!1}){return o.jsxDEV("label",{className:`settings-page-row settings-page-switch${h?" disabled":""}`,children:[o.jsxDEV("span",{className:"settings-page-row-label",children:n},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:79,columnNumber:7},this),o.jsxDEV("span",{className:"settings-page-row-trailing",children:[x&&o.jsxDEV("span",{className:"spinner",role:"status","aria-label":M("settings.processing")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:81,columnNumber:18},this),o.jsxDEV("span",{className:"cmd-switch",children:[o.jsxDEV("input",{type:"checkbox",checked:i,disabled:h,onChange:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:83,columnNumber:11},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:84,columnNumber:11},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:85,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:82,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:80,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:78,columnNumber:5},this)}function kd({label:n,options:i,value:l,onChange:h}){return o.jsxDEV("div",{className:"settings-page-list settings-choice-list",role:"group","aria-label":n,children:i.map(x=>o.jsxDEV("button",{type:"button",className:"settings-page-row settings-choice-row","aria-pressed":l===x.value,onClick:()=>h(x.value),children:[o.jsxDEV("span",{className:"settings-page-row-label",children:x.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:98,columnNumber:11},this),o.jsxDEV("span",{className:"settings-choice-check","aria-hidden":"true",children:l===x.value&&o.jsxDEV(op,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:100,columnNumber:40},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:99,columnNumber:11},this)]},x.value,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:96,columnNumber:9},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:94,columnNumber:5},this)}function NI({updateInfo:n}){var i,l;return n!=null&&n.updateAvailable?o.jsxDEV("div",{className:"settings-update",children:[o.jsxDEV("div",{className:"settings-update-title",children:M("settings.update_available",{v:n.latest})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:112,columnNumber:7},this),((i=n.whatsNew)==null?void 0:i.length)>0&&o.jsxDEV("ul",{className:"settings-update-new",children:n.whatsNew.slice(0,1).map(h=>o.jsxDEV("li",{children:[o.jsxDEV("span",{className:"settings-update-new-ver",children:["v",h.version]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:117,columnNumber:15},this),(So().startsWith("zh")?h.zh:h.en)||h.en]},h.version,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:116,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:114,columnNumber:9},this),((l=n.whatsNew)==null?void 0:l.length)>1&&o.jsxDEV("details",{className:"settings-update-more",children:[o.jsxDEV("summary",{children:M("settings.update_more",{n:n.whatsNew.length-1})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:125,columnNumber:11},this),o.jsxDEV("ul",{className:"settings-update-new",children:n.whatsNew.slice(1).map(h=>o.jsxDEV("li",{children:[o.jsxDEV("span",{className:"settings-update-new-ver",children:["v",h.version]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:129,columnNumber:17},this),(So().startsWith("zh")?h.zh:h.en)||h.en]},h.version,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:128,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:126,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:124,columnNumber:9},this),o.jsxDEV("div",{className:"settings-update-how",children:[M("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:136,columnNumber:71},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:136,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:111,columnNumber:5},this):null}function SI({open:n,onClose:i,termRef:l,onOpenChangelog:h,changelogUnread:x,onReloadApp:D=()=>window.location.reload(),chatTone:_="ink",onChatTone:s=()=>{},chatLensEnabled:u=!1,onChatLensEnabled:f=()=>{},keyboardMode:g="auto",onKeyboardMode:d=()=>{},terminalTransport:y="live",onTerminalTransport:N=()=>{},snapshotInterval:k=1e3,onSnapshotInterval:b=()=>{},hooksStatus:c=null,onEnableHooks:p=null,notifUnread:v=!1,onOpenInbox:w,updateInfo:C=null,workspaceProtection:T=null}){var bt;const[S,R]=L.useState("root"),[j,A]=L.useState(null),[O,H]=L.useState(mE()),[V,P]=L.useState(Pd()),[Y,Q]=L.useState(!1),[z,X]=L.useState(""),[K,B]=L.useState(!1),[F,G]=L.useState(!1),[Z,ae]=L.useState(!1),[me,Ue]=L.useState(null),De=L.useRef(null),ie=L.useRef(0),q=c==="absent"||c==="no-claude",fe=th();if(L.useEffect(()=>{var ve,Ne;n?(A(((Ne=(ve=l.current)==null?void 0:ve.getFontSize)==null?void 0:Ne.call(ve))??null),P(Pd())):(R("root"),X(""),B(!1),ie.current=0)},[n,l]),nr(n&&S!=="root",()=>R("root")),nr(n&&K,()=>B(!1)),L.useLayoutEffect(()=>{n&&S==="root"&&De.current&&(De.current.scrollTop=ie.current)},[n,S]),!n)return null;const le=ve=>{var Ne;S==="root"&&(ie.current=((Ne=De.current)==null?void 0:Ne.scrollTop)??0),R(ve)},Oe=()=>R("root"),ke=ve=>{var ye,Fe,ze,Nt;const Ne=(Fe=(ye=l.current)==null?void 0:ye.getFontSize)==null?void 0:Fe.call(ye),Qe=(Nt=(ze=l.current)==null?void 0:ze.setFontSize)==null?void 0:Nt.call(ze,((Ne==null?void 0:Ne.size)??14)+ve);Qe!=null&&A({size:Qe,auto:!1})},nt=()=>{var ve,Ne;(Ne=(ve=l.current)==null?void 0:ve.autoFont)==null||Ne.call(ve),A({size:null,auto:!0})},xe=ve=>{var Ne,Qe;H(ve),i3(ve),(Qe=(Ne=l.current)==null?void 0:Ne.setDocHighlight)==null||Qe.call(Ne,ve)},$e=async()=>{G(!0),ae(!1);try{const ve=await(p==null?void 0:p());(!ve||ve.status!=="installed")&&ae(!0)}catch{ae(!0)}finally{G(!1)}},at=async ve=>{Q(!0),X("");try{ve?(await bO(),P(!0),X(M("settings.notify_enabled"))):(await _O(),P(!1),X(M("settings.notify_disabled")))}catch(Ne){X(Ne.message||M("settings.notify_failed"))}finally{Q(!1)}},Ge=ve=>{if(!ve.target.checked){B(!0);return}at(!0)},Ft=()=>{B(!1),at(!1)},Rt=async()=>{try{Ue(Pd()?await wO():null)}catch{Ue(null)}le("script")},oe=j!=null&&j.auto?M("settings.font_auto"):j!=null&&j.size?`${j.size}px`:"—",Te=((bt=FS.find(ve=>ve.code===So()))==null?void 0:bt.label)||"—",Ie=["live-corrupt","live-unavailable"].includes(T==null?void 0:T.errorCode)?T.errorCode:"unknown",Ve=q?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{children:M(c==="no-claude"?"settings.chat_lens_no_claude":"settings.chat_lens_need_hooks")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:273,columnNumber:7},this),c==="absent"&&o.jsxDEV("button",{type:"button",className:"settings-page-inline-action",disabled:F,onClick:$e,children:M(F?"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:275,columnNumber:9},this),Z&&o.jsxDEV("div",{className:"settings-hint-err",children:M("settings.chat_lens_hooks_err")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:280,columnNumber:24},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:272,columnNumber:5},this):M("settings.chat_lens_hint"),tt=o.jsxDEV(o.Fragment,{children:[(T==null?void 0:T.status)==="degraded"&&o.jsxDEV("div",{className:"settings-page-alert",role:"status",children:[o.jsxDEV("strong",{children:M("workspace.protectionTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:288,columnNumber:11},this),o.jsxDEV("span",{children:M(`workspace.protection.${Ie}`)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:289,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:287,columnNumber:9},this),o.jsxDEV(Dd,{title:M("settings.group_general"),children:[o.jsxDEV(Va,{label:M("settings.language"),value:Te,onClick:()=>le("language")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:294,columnNumber:9},this),o.jsxDEV(Va,{label:M("settings.font_size"),value:oe,onClick:()=>le("font")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:295,columnNumber:9},this),o.jsxDEV(Va,{label:M("settings.keyboard_mode"),value:M(`settings.keyboard_mode_${g}`),onClick:()=>le("keyboard")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:296,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:293,columnNumber:7},this),o.jsxDEV(Dd,{title:M("settings.group_terminal"),footer:M("settings.path_highlight_hint"),children:[o.jsxDEV(Va,{label:M("settings.terminal_transport"),value:M(`settings.terminal_transport_${y}`),onClick:()=>le("transport")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:301,columnNumber:9},this),o.jsxDEV(L_,{label:M("settings.path_highlight"),checked:O,onChange:ve=>xe(ve.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:303,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:300,columnNumber:7},this),o.jsxDEV(Dd,{title:M("settings.group_chat"),footer:Ve,children:[o.jsxDEV(L_,{label:M("settings.chat_lens"),checked:u,disabled:q&&!u,onChange:ve=>f(ve.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:308,columnNumber:9},this),u&&o.jsxDEV(Va,{label:M("settings.chat_tone"),value:M(`settings.chat_tone_${_}`),onClick:()=>le("tone")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:312,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:307,columnNumber:7},this),o.jsxDEV(Dd,{title:M("settings.group_notifications"),footer:z||M(fe?"settings.push_hint":"settings.push_unsupported"),children:[o.jsxDEV(L_,{label:M("settings.push_notifications"),checked:V,disabled:!fe||Y,busy:Y,onChange:Ge},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:320,columnNumber:9},this),o.jsxDEV(Va,{label:M("settings.script_push"),value:M("settings.script_push_open"),disabled:!fe,onClick:Rt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:322,columnNumber:9},this),o.jsxDEV(Va,{label:M("pushInbox.title"),dot:v,onClick:()=>w==null?void 0:w()},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:324,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:317,columnNumber:7},this),o.jsxDEV(Dd,{title:M("settings.group_about"),footer:C!=null&&C.updateAvailable?o.jsxDEV(NI,{updateInfo:C},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:328,columnNumber:47},this):null,children:[o.jsxDEV(xI,{label:M("settings.version"),value:C!=null&&C.current?`v${C.current}`:"—",dot:!!(C!=null&&C.updateAvailable)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:329,columnNumber:9},this),o.jsxDEV(Va,{label:M("settings.view_changelog"),dot:x,onClick:h},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:331,columnNumber:9},this),o.jsxDEV(Va,{label:M("settings.feedback"),onClick:()=>le("feedback")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:332,columnNumber:9},this),o.jsxDEV("button",{type:"button",className:"settings-page-row settings-page-text-action",onClick:D,children:o.jsxDEV("span",{className:"settings-page-row-label",children:M("settings.reload_app")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:334,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:333,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:327,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:285,columnNumber:5},this),ot={language:o.jsxDEV(kd,{label:M("settings.language"),value:So(),onChange:yU,options:FS.map(ve=>({value:ve.code,label:ve.label}))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:342,columnNumber:7},this),font:o.jsxDEV("section",{className:"settings-detail-card settings-font-card",children:[o.jsxDEV("div",{className:"settings-font-value",children:oe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:347,columnNumber:9},this),o.jsxDEV("div",{className:"settings-font-controls",role:"group","aria-label":M("settings.font_size"),children:[o.jsxDEV("button",{type:"button",onClick:()=>ke(-1),"aria-label":M("settings.font_decrease"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:349,columnNumber:11},this),o.jsxDEV("button",{type:"button",onClick:()=>ke(1),"aria-label":M("settings.font_increase"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:350,columnNumber:11},this),o.jsxDEV("button",{type:"button",className:j!=null&&j.auto?"selected":"",onClick:nt,"aria-pressed":!!(j!=null&&j.auto),children:M("settings.font_auto")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:351,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:348,columnNumber:9},this),o.jsxDEV("p",{children:M("settings.font_auto_title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:354,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:346,columnNumber:7},this),keyboard:o.jsxDEV(o.Fragment,{children:[o.jsxDEV(kd,{label:M("settings.keyboard_mode"),value:g,onChange:d,options:["auto","mobile","desktop"].map(ve=>({value:ve,label:M(`settings.keyboard_mode_${ve}`)}))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:359,columnNumber:9},this),o.jsxDEV("p",{className:"settings-detail-note",children:M("settings.keyboard_mode_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:363,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:358,columnNumber:7},this),transport:o.jsxDEV(o.Fragment,{children:[o.jsxDEV(kd,{label:M("settings.terminal_transport"),value:y,onChange:N,options:["live","snapshot"].map(ve=>({value:ve,label:M(`settings.terminal_transport_${ve}`)}))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:368,columnNumber:9},this),o.jsxDEV("p",{className:"settings-detail-note",children:M("settings.terminal_transport_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:372,columnNumber:9},this),y==="snapshot"&&o.jsxDEV("section",{className:"settings-page-group settings-detail-group",children:[o.jsxDEV("h2",{children:M("settings.snapshot_interval")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:375,columnNumber:13},this),o.jsxDEV(kd,{label:M("settings.snapshot_interval"),value:k,onChange:b,options:Zw.map(ve=>({value:ve,label:`${(ve/1e3).toFixed(ve%1e3?1:0)}s`}))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:376,columnNumber:13},this),o.jsxDEV("p",{className:"settings-page-footer",children:M("settings.snapshot_interval_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:381,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:374,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:367,columnNumber:7},this),tone:o.jsxDEV(o.Fragment,{children:[o.jsxDEV(kd,{label:M("settings.chat_tone"),value:_,onChange:s,options:["dusk","ink","light"].map(ve=>({value:ve,label:M(`settings.chat_tone_${ve}`)}))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:388,columnNumber:9},this),o.jsxDEV("p",{className:"settings-detail-note",children:M("settings.chat_tone_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:392,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:387,columnNumber:7},this),feedback:o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-page-list",children:[o.jsxDEV(EC,{label:M("settings.feedback_issues"),href:"https://github.com/handmux/handmux/issues"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:398,columnNumber:11},this),So().startsWith("zh")&&o.jsxDEV(EC,{label:M("settings.feedback_group"),href:"https://handmux.com/#community"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:400,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:397,columnNumber:9},this),o.jsxDEV("p",{className:"settings-detail-note",children:M("settings.feedback_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:403,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:396,columnNumber:7},this),script:o.jsxDEV(fI,{pushKey:me,notifyOn:V},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:406,columnNumber:13},this)};return o.jsxDEV("div",{className:"settings-page",role:"dialog","aria-label":M("settings.title"),"aria-modal":"true",children:[o.jsxDEV(yI,{title:M(S==="root"?"settings.title":wI[S]),onBack:S==="root"?i:Oe},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:411,columnNumber:7},this),o.jsxDEV("div",{ref:De,className:"settings-page-body",children:o.jsxDEV("main",{className:`settings-page-content${S==="root"?"":" detail"}`,children:S==="root"?tt:ot[S]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:414,columnNumber:9},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:413,columnNumber:7},this),K&&o.jsxDEV("div",{className:"settings-confirm-backdrop",onClick:()=>B(!1),children:o.jsxDEV("div",{className:"settings-confirm",role:"alertdialog","aria-modal":"true","aria-labelledby":"settings-notify-disable-title","aria-describedby":"settings-notify-disable-hint",onClick:ve=>ve.stopPropagation(),children:[o.jsxDEV("h2",{id:"settings-notify-disable-title",children:M("settings.notify_disable_title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:423,columnNumber:13},this),o.jsxDEV("p",{id:"settings-notify-disable-hint",children:M("settings.notify_disable_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:424,columnNumber:13},this),o.jsxDEV("div",{className:"settings-confirm-actions",children:[o.jsxDEV("button",{type:"button",autoFocus:!0,onClick:()=>B(!1),children:M("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:426,columnNumber:15},this),o.jsxDEV("button",{type:"button",className:"danger",onClick:Ft,children:M("settings.notify_disable_confirm")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:427,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:425,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:420,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:419,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:410,columnNumber:5},this)}const CI=new Set(["succeeded","partial","failed","interrupted"]),EI=new Set(["restore-interrupted","checkpoint-not-found","storage-full","permission-denied","plan-failed","agent-unavailable","tmux-unavailable","restore-failed","operation-not-found"]),fw=new Set(["cwd-fallback","layout-fallback","agent-warning","live-reconcile-failed","workspace-unavailable","restore-warning"]);function jC(n){return M(`workspace.error.${EI.has(n)?n:"restore-failed"}`)}function DC(n){return M(`workspace.warning.${fw.has(n)?n:"restore-warning"}`)}function jI({open:n,plan:i,operation:l=null,submitting:h=!1,returnFocusRef:x=null,onRestore:D,onIgnore:_,onClose:s,onRebind:u}){var H,V,P,Y,Q,z;const f=L.useRef(!1),g=L.useRef(null),d=L.useRef(null),y=L.useRef(null),N=h||(l==null?void 0:l.status)==="pending"||(l==null?void 0:l.status)==="running",k=l&&CI.has(l.status),b=l&&["succeeded","partial"].includes(l.status);if(L.useEffect(()=>{(!N||k)&&(f.current=!1)},[N,k,i==null?void 0:i.checkpointId]),L.useEffect(()=>{var X;if(n)return y.current=(x==null?void 0:x.current)||(document.activeElement instanceof HTMLElement?document.activeElement:null),(X=d.current)==null||X.focus(),()=>{var K;(K=y.current)!=null&&K.isConnected&&y.current.focus(),y.current=null}},[n,x]),!n||!i)return null;const c=(((H=i.planSummary)==null?void 0:H.create)||0)+(((V=i.planSummary)==null?void 0:V.renamed)||0),p=((P=i.planSummary)==null?void 0:P.alreadyPresent)||0,v=(i.sessions||[]).filter(X=>X.action==="create-renamed"),w=(l==null?void 0:l.progress)||{completed:0,total:c},C=((l==null?void 0:l.results)||[]).filter(X=>X.status==="restored").length,T=(l==null?void 0:l.summary)||{sessions:C,windows:0,panes:0},S=((l==null?void 0:l.results)||[]).filter(X=>X.status==="failed"),R=((l==null?void 0:l.warningCodes)||[]).filter(X=>fw.has(X)),j=((l==null?void 0:l.results)||[]).flatMap(X=>(X.warningCodes||[]).filter(K=>fw.has(K)).map(K=>({row:X,code:K}))),A=()=>{N||f.current||(f.current=!0,D==null||D())},O=X=>{var G,Z,ae,me;if(X.key!=="Tab")return;const K=[...((G=g.current)==null?void 0:G.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))||[]];if(K.length===0){X.preventDefault(),(Z=g.current)==null||Z.focus();return}const B=K[0],F=K[K.length-1];X.shiftKey&&(document.activeElement===B||!((ae=g.current)!=null&&ae.contains(document.activeElement)))?(X.preventDefault(),F.focus()):!X.shiftKey&&(document.activeElement===F||!((me=g.current)!=null&&me.contains(document.activeElement)))&&(X.preventDefault(),B.focus())};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop workspace-restore-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:93,columnNumber:7},this),o.jsxDEV("div",{ref:g,className:"settings-card workspace-restore-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"workspace-restore-title",tabIndex:-1,onKeyDown:O,children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{id:"workspace-restore-title",className:"settings-title",children:M("workspace.restoreLast")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:97,columnNumber:11},this),o.jsxDEV("button",{ref:d,type:"button",className:"settings-close workspace-restore-close",onClick:s,"aria-label":M("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:98,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:96,columnNumber:9},this),o.jsxDEV("div",{className:"workspace-restore-body",children:[o.jsxDEV("div",{className:"workspace-restore-reason",children:M(YE(i))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:102,columnNumber:11},this),o.jsxDEV("div",{className:"workspace-restore-time",children:M("workspace.savedAt",{time:qE(i.capturedAt)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:103,columnNumber:11},this),o.jsxDEV("div",{className:"workspace-restore-summary",children:M("workspace.topologySummary",{sessions:((Y=i.summary)==null?void 0:Y.sessions)??0,windows:((Q=i.summary)==null?void 0:Q.windows)??0,panes:((z=i.summary)==null?void 0:z.panes)??0})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:106,columnNumber:11},this),o.jsxDEV("div",{className:"workspace-restore-plan",children:M("workspace.planSummary",{restore:c,already:p})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:113,columnNumber:11},this),o.jsxDEV("div",{className:"workspace-restore-note",children:M("workspace.renameRule")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:116,columnNumber:11},this),v.length>0&&o.jsxDEV("ul",{className:"workspace-restore-renames",children:v.map(X=>o.jsxDEV("li",{children:[X.sourceName," → ",X.targetName]},X.logicalId||X.sourceName,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:119,columnNumber:37},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:118,columnNumber:13},this),o.jsxDEV("div",{className:"workspace-restore-note",children:M("workspace.nonDestructive")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:122,columnNumber:11},this),(l==null?void 0:l.status)==="partial"&&o.jsxDEV("div",{className:"workspace-restore-progress partial",role:"status",children:M("workspace.progressDone",{completed:C,total:w.total||c})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:125,columnNumber:13},this),(l==null?void 0:l.status)==="succeeded"&&o.jsxDEV("div",{className:"workspace-restore-success",children:M("workspace.complete")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:129,columnNumber:49},this),b&&o.jsxDEV("div",{className:"workspace-restore-summary workspace-restore-completed-summary",children:M("workspace.completedSummary",T)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:131,columnNumber:13},this),b&&T.sessions>0&&o.jsxDEV("div",{className:"workspace-restore-note",children:M("workspace.rebindHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:136,columnNumber:13},this),(l==null?void 0:l.errorCode)&&S.length===0&&o.jsxDEV("div",{className:"workspace-restore-errors",role:"alert",children:jC(l.errorCode)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:139,columnNumber:13},this),S.length>0&&o.jsxDEV("ul",{className:"workspace-restore-errors",role:"alert",children:S.map((X,K)=>o.jsxDEV("li",{children:M("workspace.sessionFailure",{session:X.sourceName||M("workspace.unknownSession"),reason:jC(X.errorCode)})},X.logicalId||`${X.sourceName}-${K}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:144,columnNumber:17},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:142,columnNumber:13},this),(R.length>0||j.length>0)&&o.jsxDEV("ul",{className:"workspace-restore-warnings",role:"status",children:[R.map(X=>o.jsxDEV("li",{children:DC(X)},`operation-${X}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:155,columnNumber:42},this)),j.map(({row:X,code:K},B)=>o.jsxDEV("li",{children:M("workspace.sessionWarning",{session:X.sourceName||M("workspace.unknownSession"),reason:DC(K)})},`${X.logicalId||X.sourceName||B}-${K}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:157,columnNumber:17},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:154,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:101,columnNumber:9},this),o.jsxDEV("div",{className:"workspace-restore-actions",children:b?o.jsxDEV(o.Fragment,{children:[T.sessions>0&&o.jsxDEV("button",{type:"button",className:"workspace-restore-primary",onClick:u,children:M("workspace.rebind")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:171,columnNumber:17},this),o.jsxDEV("button",{type:"button",className:"workspace-restore-ignore",onClick:s,children:M("common.done")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:175,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:169,columnNumber:13},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("button",{type:"button",className:"workspace-restore-primary",disabled:N,onClick:A,children:N?M("workspace.progress",{completed:w.completed||0,total:w.total||c}):M("workspace.restore")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:181,columnNumber:15},this),o.jsxDEV("button",{type:"button",className:"workspace-restore-ignore",disabled:N,onClick:_,children:M("workspace.ignore")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:186,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:180,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:167,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:94,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WorkspaceRestoreDialog.jsx",lineNumber:92,columnNumber:5},this)}function kC(n){return n===300?M("usage.win5h"):n===10080?M("usage.winWeekly"):n===43200?M("usage.winMonthly"):n>0?M("usage.winGeneric",{h:Math.round(n/60)}):""}function tp(n,i){if(!n)return"";const l=n-Math.floor(i/1e3);if(l<=0)return M("usage.resetSoon");const h=Math.floor(l/86400),x=Math.floor(l%86400/3600),D=Math.floor(l%3600/60),_=h>0?`${h}d ${x}h`:x>0?`${x}h ${D}m`:`${D}m`;return M("usage.resetIn",{t:_})}function Pj({at:n,now:i}){if(!n)return null;const l=Math.max(0,Math.floor((i-n)/1e3)),h=l<60?M("usage.updatedNow"):l<3600?M("usage.updatedMin",{n:Math.floor(l/60)}):l<86400?M("usage.updatedHr",{n:Math.floor(l/3600)}):M("usage.updatedDay",{n:Math.floor(l/86400)});return o.jsxDEV("div",{className:"usage-updated",children:h},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:38,columnNumber:10},this)}function Ec(n,i,l){if(!n||!i)return null;const h=n-Math.floor(l/1e3);return Math.max(0,Math.min(100,(1-h/(i*60))*100))}function DI({pct:n,timePct:i}){const l=Math.max(0,Math.min(100,n??0)),h=l>=80?"hi":l>=50?"mid":"lo";return o.jsxDEV("div",{className:"usage-bar",children:[o.jsxDEV("div",{className:`usage-bar-fill lvl-${h}`,style:{width:`${l}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:54,columnNumber:7},this),i!=null&&o.jsxDEV("div",{className:"usage-bar-time",style:{left:`${i}%`},title:M("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 jc({label:n,pct:i,reset:l,sub:h,timePct:x}){return o.jsxDEV("div",{className:"usage-row",children:[o.jsxDEV("div",{className:"usage-row-head",children:[o.jsxDEV("span",{className:"usage-row-label",children:[n,h&&o.jsxDEV("span",{className:"usage-row-sub",children:[" · ",h]},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(i),"%"]},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(DI,{pct:i,timePct:x},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:67,columnNumber:7},this),l&&o.jsxDEV("div",{className:"usage-row-reset",children:l},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 kI({claude:n,now:i}){var l,h;return o.jsxDEV("section",{className:"usage-agent",children:[o.jsxDEV("div",{className:"usage-agent-head",children:[o.jsxDEV(pl,{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(Pj,{at:n==null?void 0:n.updatedAt,now:i},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),n?!((l=n.rateLimits)!=null&&l.fiveHour)&&!((h=n.rateLimits)!=null&&h.sevenDay)?o.jsxDEV("div",{className:"usage-empty",children:M("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:[n.rateLimits.fiveHour&&o.jsxDEV(jc,{label:M("usage.win5h"),pct:n.rateLimits.fiveHour.usedPercent,reset:tp(n.rateLimits.fiveHour.resetsAt,i),timePct:Ec(n.rateLimits.fiveHour.resetsAt,300,i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:87,columnNumber:13},this),n.rateLimits.sevenDay&&o.jsxDEV(jc,{label:M("usage.winWeekly"),pct:n.rateLimits.sevenDay.usedPercent,reset:tp(n.rateLimits.sevenDay.resetsAt,i),timePct:Ec(n.rateLimits.sevenDay.resetsAt,10080,i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:92,columnNumber:13},this),n.rateLimits.sevenDayOpus&&o.jsxDEV(jc,{label:M("usage.winWeekly"),sub:"Opus",pct:n.rateLimits.sevenDayOpus.usedPercent,timePct:Ec(n.rateLimits.sevenDayOpus.resetsAt,10080,i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:97,columnNumber:13},this),n.rateLimits.sevenDaySonnet&&o.jsxDEV(jc,{label:M("usage.winWeekly"),sub:"Sonnet",pct:n.rateLimits.sevenDaySonnet.usedPercent,timePct:Ec(n.rateLimits.sevenDaySonnet.resetsAt,10080,i)},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:M("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 RI({codex:n,now:i}){const l=n==null?void 0:n.rateLimits;return o.jsxDEV("section",{className:"usage-agent",children:[o.jsxDEV("div",{className:"usage-agent-head",children:[o.jsxDEV(pl,{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(Pj,{at:n==null?void 0:n.updatedAt,now:i},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),n?o.jsxDEV(o.Fragment,{children:[(l==null?void 0:l.primary)&&o.jsxDEV(jc,{label:kC(l.primary.windowMinutes)||M("usage.winPrimary"),pct:l.primary.usedPercent,reset:tp(l.primary.resetsAt,i),timePct:Ec(l.primary.resetsAt,l.primary.windowMinutes,i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:120,columnNumber:13},this),(l==null?void 0:l.secondary)&&o.jsxDEV(jc,{label:kC(l.secondary.windowMinutes)||M("usage.winSecondary"),pct:l.secondary.usedPercent,reset:tp(l.secondary.resetsAt,i),timePct:Ec(l.secondary.resetsAt,l.secondary.windowMinutes,i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:125,columnNumber:13},this),!(l!=null&&l.primary)&&!(l!=null&&l.secondary)&&o.jsxDEV("div",{className:"usage-empty",children:M("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:M("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 TI({open:n,onClose:i,onAuthFail:l}){const[h,x]=L.useState(null),[D,_]=L.useState(""),[s,u]=L.useState(!1),f=Date.now();return L.useEffect(()=>{if(!n)return;let g=!1;return u(!0),_(""),C3().then(d=>{g||(x(d),u(!1))}).catch(d=>{g||(d instanceof li?l==null||l():_(M("usage.loadFailed")),u(!1))}),()=>{g=!0}},[n]),n?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:i},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":M("usage.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:M("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:M("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:i,"aria-label":M("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:s&&!h?o.jsxDEV("div",{className:"usage-empty",children:M("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:170,columnNumber:13},this):D?o.jsxDEV("div",{className:"bind-error",children:D},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:172,columnNumber:13},this):h?o.jsxDEV(o.Fragment,{children:[o.jsxDEV(RI,{codex:h.codex,now:f},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:175,columnNumber:15},this),o.jsxDEV(kI,{claude:h.claude,now:f},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 LI({rows:n,top:i,open:l,onToggle:h,onClose:x,onSelectRow:D,onMarkAllRead:_,hooksStatus:s,onEnableHooks:u}){const f=[];for(const w of n){const C=f[f.length-1];C&&C.session===w.session?C.items.push(w):f.push({session:w.session,items:[w]})}const g=Date.now(),d=n.some(w=>w.view==="done"),y=mO(n),[N,k]=L.useState(!1),[b,c]=L.useState(!1),p=f.length===0&&s==="absent",v=async()=>{k(!0),c(!1);try{const w=await(u==null?void 0:u());(!w||w.status!=="installed")&&c(!0)}catch{c(!0)}finally{k(!1)}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("button",{className:"topbar-icon inbox-btn",onClick:h,"aria-label":M("inbox.title"),title:M("inbox.title"),children:[o.jsxDEV(v2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:36,columnNumber:9},this),i&&o.jsxDEV("span",{className:`inbox-dot ${i}`,"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),l&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"inbox-backdrop",onClick:x},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":M("inbox.title"),children:[o.jsxDEV("div",{className:"inbox-head",children:[o.jsxDEV("span",{children:M("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:[M("inbox.working")," ",y.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:[M("inbox.done")," ",y.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:[M("inbox.needs")," ",y.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),d&&o.jsxDEV("button",{className:"inbox-readall",onClick:_,children:M("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),f.length===0?p?o.jsxDEV("div",{className:"inbox-empty inbox-enable",children:[o.jsxDEV("div",{className:"inbox-enable-title",children:M("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:M("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:v,disabled:N,children:M(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:M("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:M("inbox.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:64,columnNumber:17},this):f.map(w=>o.jsxDEV("div",{className:"inbox-group",children:[o.jsxDEV("div",{className:"inbox-group-title",children:w.session},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:68,columnNumber:17},this),w.items.map(C=>o.jsxDEV("button",{className:"inbox-row",onClick:()=>D(C),children:[o.jsxDEV("div",{className:"inbox-row-head",children:[o.jsxDEV("span",{className:`inbox-chip ${C.view}`,children:dO[C.view]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:72,columnNumber:23},this),o.jsxDEV(pl,{agent:C.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:C.windowName||C.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:FE(C.ts,g)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:75,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:71,columnNumber:21},this),C.msg&&o.jsxDEV("div",{className:"inbox-msg",children:C.msg},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:77,columnNumber:31},this)]},C.pane,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:70,columnNumber:19},this))]},w.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 AI({open:n,orphan:i,onConfirm:l,onClose:h,inset:x=0}){var w;const[D,_]=L.useState([]),[s,u]=L.useState("new"),[f,g]=L.useState(""),[d,y]=L.useState(!0),[N,k]=L.useState(!1),[b,c]=L.useState("");if(L.useEffect(()=>{n&&(u("new"),g((i==null?void 0:i.suggestedName)||""),y(n3()),k(!1),c(""),ol().then(C=>_(Array.isArray(C)?C:[])).catch(()=>_([])))},[n,i]),!n||!i)return null;const p=s==="new"?f.trim()||i.suggestedName||"":((w=D.find(C=>C.id===s))==null?void 0:w.name)||"",v=async()=>{if(N)return;k(!0),c(""),r3(d);const C=s==="new"?{mode:"new"}:{mode:"window",session:s};try{await l({target:C,kill:d,name:s==="new"?f.trim():void 0})}catch{k(!1),c(M("inbox.orphans.failed"))}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:h},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% + ${x/2}px))`},role:"dialog","aria-label":M("inbox.orphans.takeover"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:M("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:h,"aria-label":M("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:i.cwdLabel||i.cwd},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:56,columnNumber:13},this),i.snippet&&o.jsxDEV("div",{className:"inbox-msg",children:i.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:M("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":s==="new",onClick:()=>u("new"),children:M("inbox.orphans.targetNew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:62,columnNumber:15},this),D.map(C=>o.jsxDEV("button",{className:"fontbtn","aria-pressed":s===C.id,onClick:()=>u(C.id),children:C.name},C.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:66,columnNumber:17},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:61,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:59,columnNumber:11},this),s==="new"&&o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:M("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:f,placeholder:M("bind.invalidName"),onChange:C=>{g(C.target.value),c("")}},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:M("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":d,onClick:()=>y(!0),children:[M("inbox.orphans.killEnd"),o.jsxDEV("span",{className:"orphan-reco",children:M("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":!d,onClick:()=>y(!1),children:M("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:M("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:[M("inbox.orphans.reopenPre")," ",o.jsxDEV("code",{className:"orphan-cmd",children:["handmux open ",p||M("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:h,children:M("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:v,disabled:N,children:M(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 RC="tw_a2hs_dismissed",Kd=()=>typeof navigator<"u"&&navigator.userAgent||"",Of=()=>/iP(hone|ad|od)/.test(Kd())||/Macintosh/.test(Kd())&&typeof navigator<"u"&&navigator.maxTouchPoints>1,MI=()=>/Android/.test(Kd()),UI=()=>Of()&&/Safari/.test(Kd())&&!/(CriOS|FxiOS|EdgiOS|OPiOS|mercury|GSA)/.test(Kd());function OI(){const[n,i]=L.useState(!1),[l,h]=L.useState(null);if(L.useEffect(()=>{if($E()||!Of()&&!MI())return;try{if(localStorage.getItem(RC)==="1")return}catch{}const f=g=>{g.preventDefault(),h(g)};return window.addEventListener("beforeinstallprompt",f),i(!0),()=>window.removeEventListener("beforeinstallprompt",f)},[]),!n)return null;const x=()=>{try{localStorage.setItem(RC,"1")}catch{}i(!1)},D=async()=>{if(l){l.prompt();try{await l.userChoice}catch{}x()}};let _,s,u=null;return l?(_="install",s=M("a2hs.lead"),u=o.jsxDEV("button",{className:"a2hs-banner-cta",onClick:D,children:M("a2hs.install")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:54,columnNumber:11},this)):Of()&&!UI()?(_="ios-other",s=M("a2hs.iosOpenSafari")):Of()?(_="ios",s=M("a2hs.iosHint")):(_="android",s=M("a2hs.androidManual")),o.jsxDEV("div",{className:"a2hs-banner",role:"status","aria-label":M("a2hs.title"),"data-mode":_,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:M("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:s},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),u,o.jsxDEV("button",{className:"a2hs-banner-x",onClick:x,"aria-label":M("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 pw="tw_claude_hooks";function VI(){try{return localStorage.getItem(pw)||null}catch{return null}}function BI(n=null){const[i,l]=L.useState(VI);L.useEffect(()=>{if(!n)return;const x=n.claudeHooks||"installed";l(x);try{localStorage.setItem(pw,x)}catch{}},[n]);const h=L.useCallback(async()=>{const x=await K3();if(x!=null&&x.status){l(x.status);try{localStorage.setItem(pw,x.status)}catch{}}return x},[]);return{status:i,enable:h}}function PI({value:n,options:i,onChange:l,ariaLabel:h}){const[x,D]=L.useState(!1),_=L.useRef(null),s=i.find(u=>u.value===n)||i[0];return L.useEffect(()=>{if(!x)return;const u=f=>{var g;(g=_.current)!=null&&g.contains(f.target)||D(!1)};return document.addEventListener("pointerdown",u,!0),()=>document.removeEventListener("pointerdown",u,!0)},[x]),nr(x,()=>D(!1)),o.jsxDEV("div",{className:"dd",ref:_,children:[o.jsxDEV("button",{type:"button",className:"field dd-trigger","aria-haspopup":"listbox","aria-expanded":x,"aria-label":h,onClick:()=>D(u=>!u),children:[o.jsxDEV("span",{className:"dd-value",children:s==null?void 0:s.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:32,columnNumber:9},this),o.jsxDEV("span",{className:`dd-caret${x?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:33,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:24,columnNumber:7},this),x&&o.jsxDEV("div",{className:"dd-menu",role:"listbox",children:i.map(u=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":u.value===n,className:`dd-option${u.value===n?" is-selected":""}`,onClick:()=>{l==null||l(u.value),D(!1)},children:[o.jsxDEV("span",{className:"dd-option-label",children:u.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:46,columnNumber:15},this),u.value===n&&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:47,columnNumber:37},this)]},u.value||"__none__",!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:38,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:36,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:23,columnNumber:5},this)}const Ij=[{value:"",label:M("startup.preset_shell")},{value:"claude",label:M("startup.preset_claude")},{value:"claude --continue",label:M("startup.preset_claude_continue")},{value:"codex",label:M("startup.preset_codex")}],Vf="__custom__",II=[...Ij,{value:Vf,label:M("startup.custom")}];function Fj({value:n="",onChange:i}){const l=Ij.some(f=>f.value===n),[h,x]=L.useState(l?n:Vf),[D,_]=L.useState(l?"":n),s=f=>{x(f),i==null||i(f===Vf?D:f)},u=f=>{const g=f.target.value;_(g),i==null||i(g)};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-label",children:M("startup.label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:29,columnNumber:7},this),o.jsxDEV(PI,{value:h,options:II,onChange:s,ariaLabel:M("startup.aria")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:30,columnNumber:7},this),h===Vf&&o.jsxDEV("input",{className:"bind-input startup-custom",value:D,placeholder:M("startup.custom_placeholder"),onChange:u,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 FI=/^[A-Za-z0-9-]{1,16}$/;function HI({open:n,onClose:i,onBound:l,bound:h,onAuthFail:x,inset:D=0}){const[_,s]=L.useState([]),[u,f]=L.useState("new"),[g,d]=L.useState(null),[y,N]=L.useState(""),[k,b]=L.useState(""),[c,p]=L.useState(!1),[v,w]=L.useState(null),[C,T]=L.useState(cE()),[S,R]=L.useState(!1),j=L.useRef(null);if(L.useEffect(()=>{n&&(N(""),b(""),p(!1),w(null),R(!1),f("new"),d("new"),ol().then(V=>{const P=Array.isArray(V)?V:[];s(P),P.some(Y=>!h.includes(Y.name))&&(f("existing"),d(null))}).catch(V=>{V instanceof li?x==null||x():b(M("bind.checkFailed"))}))},[n]),L.useEffect(()=>{g==="new"&&setTimeout(()=>{var V;return(V=j.current)==null?void 0:V.focus()},0)},[g]),nr(n&&S,()=>R(!1)),!n)return null;const A=_.filter(V=>!h.includes(V.name)),O=async()=>{if(c||!g)return;if(g!=="new"){l(g);return}const V=y.trim();if(V){if(h.includes(V)||_.some(P=>P.name===V)){b(M("bind.alreadyExists"));return}if(!FI.test(V)){b(M("bind.invalidName"));return}p(!0),b(""),uE(C);try{await O3(V,v||void 0,C||void 0),l(V)}catch(P){P instanceof li?x==null||x():b(M("bind.createFailed")),p(!1)}}},H=M(g==="new"?c?"bind.creating":"bind.createAndOpen":c?"bind.checking":"bind.bind");return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:81,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${D/2}px))`},role:"dialog","aria-label":M("bind.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:M("bind.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:91,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:i,"aria-label":M("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:92,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:90,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":M("bind.pickSession"),children:[o.jsxDEV("button",{className:"seg",role:"tab","aria-pressed":u==="new",onClick:()=>{f("new"),d("new"),b("")},children:M("bind.modeNew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:99,columnNumber:15},this),o.jsxDEV("button",{className:"seg",role:"tab","aria-pressed":u==="existing",disabled:!A.length,onClick:()=>{f("existing"),d(null),b("")},children:M("bind.modeExisting")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:105,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:98,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:95,columnNumber:11},this),u==="existing"&&o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:M("bind.pickSession")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:115,columnNumber:15},this),o.jsxDEV("div",{className:"orphan-targets",children:A.map(V=>o.jsxDEV("button",{className:"fontbtn","aria-pressed":g===V.name,onClick:()=>{d(V.name),b("")},children:V.name},V.id||V.name,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:118,columnNumber:19},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:116,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:114,columnNumber:13},this),u==="new"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:M("bind.sessionName")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:133,columnNumber:17},this),o.jsxDEV("input",{ref:j,className:"bind-input",value:y,placeholder:M("bind.invalidName"),onChange:V=>{N(V.target.value),b("")},onKeyDown:V=>{V.key==="Enter"&&O()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:134,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:132,columnNumber:15},this),o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:M("bind.startDir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:144,columnNumber:17},this),o.jsxDEV("button",{type:"button",className:"field cwd-field",onClick:()=>R(!0),children:[o.jsxDEV("span",{className:"cwd-path",children:v||M("bind.homeDirDefault")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:146,columnNumber:19},this),o.jsxDEV("span",{className:"cwd-action",children:M("bind.choose")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:147,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:145,columnNumber:17},this),v&&o.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>w(null),children:M("bind.reset")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:149,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:143,columnNumber:15},this),o.jsxDEV("div",{className:"opt",children:o.jsxDEV(Fj,{value:C,onChange:T},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:152,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:151,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:131,columnNumber:13},this),k&&o.jsxDEV("div",{className:"bind-error",children:k},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:156,columnNumber:21},this),o.jsxDEV("div",{className:"settings-hint",children:M("bind.desktopHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:159,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns bind-actions",children:[o.jsxDEV("button",{className:"fontbtn",onClick:i,children:M("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:161,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:O,disabled:c||!g,children:H},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:162,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:160,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:94,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:85,columnNumber:7},this),o.jsxDEV(eh,{open:S,seedCwd:v,allowMkdir:!0,onPick:V=>{w(V),R(!1)},onClose:()=>R(!1),inset:D},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:168,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:80,columnNumber:5},this)}const zI=/^[A-Za-z0-9-]{1,16}$/;function $I({open:n,onClose:i,onCreate:l,paneId:h,inset:x=0}){const[D,_]=L.useState(""),[s,u]=L.useState(""),[f,g]=L.useState(!1),[d,y]=L.useState(null),[N,k]=L.useState(""),[b,c]=L.useState(cE()),[p,v]=L.useState(!1),w=L.useRef(null);if(L.useEffect(()=>{n&&(_(""),u(""),g(!1),y(null),k(""),v(!1),setTimeout(()=>{var T;return(T=w.current)==null?void 0:T.focus()},0),h&&fl(h).then(({cwd:T})=>k(T||"")).catch(()=>{}))},[n,h]),nr(n&&p,()=>v(!1)),!n)return null;const C=async()=>{if(f)return;const T=D.trim();if(T&&!zI.test(T)){u(M("newwindow.name_rule"));return}g(!0),u(""),uE(b);try{await l(T,d||void 0,b||void 0)}catch{g(!1)}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:51,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${x/2}px))`},role:"dialog","aria-label":M("newwindow.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:M("newwindow.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:58,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:i,"aria-label":M("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:59,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:57,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:M("newwindow.window_name")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:63,columnNumber:13},this),o.jsxDEV("input",{ref:w,className:"bind-input",value:D,placeholder:M("newwindow.name_placeholder"),onChange:T=>{_(T.target.value),u("")},onKeyDown:T=>{T.key==="Enter"&&C()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:64,columnNumber:13},this),s&&o.jsxDEV("div",{className:"bind-error",children:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:72,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:62,columnNumber:11},this),o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:M("newwindow.start_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:75,columnNumber:13},this),o.jsxDEV("button",{type:"button",className:"field cwd-field",onClick:()=>v(!0),children:[o.jsxDEV("span",{className:"cwd-path",children:d||(N?M("newwindow.session_dir_named",{dir:N}):M("newwindow.session_dir_default"))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:77,columnNumber:15},this),o.jsxDEV("span",{className:"cwd-action",children:M("newwindow.choose")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:78,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:76,columnNumber:13},this),d&&o.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>y(null),children:M("newwindow.reset_to_session_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:80,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:74,columnNumber:11},this),o.jsxDEV("div",{className:"opt",children:o.jsxDEV(Fj,{value:b,onChange:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:83,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:82,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns bind-actions",children:[o.jsxDEV("button",{className:"fontbtn",onClick:i,children:M("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:86,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:C,disabled:f,children:M(f?"newwindow.creating":"common.create")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:87,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:85,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:61,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:52,columnNumber:7},this),o.jsxDEV(eh,{open:p,seedCwd:d||N||null,pane:h,allowMkdir:!0,onPick:T=>{y(T),v(!1)},onClose:()=>v(!1),inset:x},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:93,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:50,columnNumber:5},this)}const WI=/^[A-Za-z0-9-]{1,16}$/;function GI({open:n,title:i,currentName:l="",onClose:h,onSubmit:x,inset:D=0}){const[_,s]=L.useState(l),[u,f]=L.useState(""),[g,d]=L.useState(!1),y=L.useRef(null);if(L.useEffect(()=>{n&&(s(l),f(""),d(!1),setTimeout(()=>{var k;return(k=y.current)==null?void 0:k.focus()},0))},[n,l]),!n)return null;const N=async()=>{if(g)return;const k=_.trim();if(!WI.test(k)){f(M("rename.name_rule"));return}d(!0),f("");try{await x(k)}catch(b){f((b==null?void 0:b.message)||M("rename.failed")),d(!1)}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:h},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% + ${D/2}px))`},role:"dialog","aria-label":i,"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:i},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:h,"aria-label":M("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:M("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:y,className:"bind-input",value:_,placeholder:M("rename.name_rule"),onChange:k=>{s(k.target.value),f("")},onKeyDown:k=>{k.key==="Enter"&&N()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:48,columnNumber:11},this),u&&o.jsxDEV("div",{className:"bind-error",children:u},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:h,children:M("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:g,children:M(g?"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 TC({label:n,cols:i,onAdjust:l,onRestore:h,restoreLabel:x,restoreDisabled:D=!1}){const _=[-10,-1,1,10];return o.jsxDEV("div",{className:"sheet-size-control",children:[o.jsxDEV("div",{className:"sheet-size-head",children:[o.jsxDEV("span",{className:"settings-label",children:n},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ColumnStepper.jsx",lineNumber:10,columnNumber:9},this),o.jsxDEV("span",{className:"sheet-size-value",children:M("resize.columns",{n:i})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ColumnStepper.jsx",lineNumber:11,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ColumnStepper.jsx",lineNumber:9,columnNumber:7},this),o.jsxDEV("div",{className:"sheet-size-buttons",children:[_.map(s=>o.jsxDEV("button",{type:"button",className:`fontbtn col-step${Math.abs(s)===1?" col-fine":""}`,"aria-label":`${n} ${s>0?"+":"−"}${Math.abs(s)}`,onClick:()=>l(s,i),children:[s>0?"+":"−",Math.abs(s)]},s,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ColumnStepper.jsx",lineNumber:15,columnNumber:11},this)),o.jsxDEV("button",{type:"button",className:"fontbtn sheet-size-restore",disabled:D,"aria-label":x,title:x,onClick:h,children:["↺ ",M("resize.restore")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ColumnStepper.jsx",lineNumber:25,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ColumnStepper.jsx",lineNumber:13,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ColumnStepper.jsx",lineNumber:8,columnNumber:5},this)}function YI({onOpenDoc:n,refreshKey:i=0}){const[l,h]=L.useState(()=>Vd()),x=_=>{l3(_),h(Vd())},D=L.useRef(!0);return L.useEffect(()=>{if(D.current){D.current=!1;return}h(Vd())},[i]),l.length===0?o.jsxDEV("div",{className:"home-view",children:o.jsxDEV("div",{className:"home-empty",children:[M("home.empty"),o.jsxDEV("span",{children:M("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:l.map(_=>o.jsxDEV("div",{className:"home-recent-row",children:[o.jsxDEV("button",{className:"home-recent",onClick:()=>n(_.path),title:_.path,children:[o.jsxDEV("span",{className:"home-name",children:_.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:_.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":M("home.remove"),onClick:()=>x(_.path),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:35,columnNumber:11},this)]},_.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 qI=/[^\n]*?(?:[。!?…]+|[.!?]+(?=\s|$)|\n+|$)/gu,KI=/[。!?…]$|[.!?]$/;function XI(n,i){for(let l=n.parentNode;l&&l!==i;l=l.parentNode){const h=l.nodeName;if(h==="PRE"||h==="SCRIPT"||h==="STYLE"||h==="CODE")return!0}return!1}function JI(n){if(!n)return[];if(n.querySelector("span.tts-sent"))return ZI(n);const i=document.createTreeWalker(n,NodeFilter.SHOW_TEXT,{acceptNode:s=>s.nodeValue&&s.nodeValue.trim()&&!XI(s,n)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),l=[];for(;i.nextNode();)l.push(i.currentNode);const h=[],x=[];let D=0;for(const s of l){const u=s.ownerDocument.createDocumentFragment();for(const f of s.nodeValue.matchAll(qI)){const g=f[0];if(g==="")continue;const d=s.ownerDocument.createElement("span");d.className="tts-sent",d.textContent=g,u.appendChild(d),(x[D]||(x[D]=[])).push(d),h[D]=(h[D]||"")+g,KI.test(g)&&D++}s.parentNode.replaceChild(u,s)}const _=[];return h.forEach((s,u)=>{const f=(s||"").replace(/\s+/g," ").trim();if(!f)return;const g=_.length;_.push(f);for(const d of x[u]||[])d.dataset.tts=String(g)}),_}function ZI(n){const i=[];return n.querySelectorAll("span.tts-sent[data-tts]").forEach(l=>{const h=Number(l.dataset.tts);i[h]=(i[h]||"")+l.textContent}),i.map(l=>(l||"").replace(/\s+/g," ").trim())}const Hj="tw_doc_rate",Bf=[1,1.25,1.5],LC=()=>{const n=Number(localStorage.getItem(Hj));return Bf.includes(n)?n:1};function QI(){const n=typeof window<"u"&&window.speechSynthesis||null,[i,l]=L.useState({playing:!1,paused:!1,idx:-1}),[h,x]=L.useState(LC),D=L.useRef({sentences:[],idx:-1,playing:!1,rate:LC()});D.current.rate=h;const _=()=>((n==null?void 0:n.getVoices())||[]).find(N=>/^zh/i.test(N.lang))||null,s=N=>{const k=D.current;if(!n)return;if(N<0||N>=k.sentences.length){u();return}k.idx=N,l({playing:!0,paused:!1,idx:N});const b=new SpeechSynthesisUtterance(k.sentences[N]);b.rate=k.rate;const c=_();c?(b.voice=c,b.lang=c.lang):b.lang="zh-CN";const p=()=>{k.playing&&k.idx===N&&s(N+1)};b.onend=p,b.onerror=p,n.speak(b)},u=()=>{const N=D.current;N.playing=!1,N.idx=-1,n&&n.cancel(),l({playing:!1,paused:!1,idx:-1})},f=N=>{if(!n||!N||!N.length)return;n.cancel();const k=D.current;if(k.sentences=N,k.playing=!0,k.idx=-1,l({playing:!0,paused:!1,idx:-1}),n.getVoices().length){s(0);return}const b=()=>{n.removeEventListener("voiceschanged",b),k.playing&&k.idx===-1&&s(0)};n.addEventListener("voiceschanged",b),setTimeout(b,300)},g=()=>{n&&D.current.playing&&(n.pause(),l(N=>({...N,paused:!0})))},d=()=>{n&&D.current.playing&&(n.resume(),l(N=>({...N,paused:!1})))},y=()=>{const N=Bf[(Bf.indexOf(h)+1)%Bf.length]||1;localStorage.setItem(Hj,String(N)),D.current.rate=N,x(N);const k=D.current;n&&k.playing&&k.idx>=0&&(n.cancel(),s(k.idx))};return L.useEffect(()=>()=>{D.current.playing=!1,n&&n.cancel()},[n]),{supported:!!n,playing:i.playing,paused:i.paused,idx:i.idx,rate:h,play:f,pause:g,resume:d,stop:u,cycleRate:y}}const AC=6,e6=500,MC=10,t6=300,UC=(n,i)=>Math.hypot(n.x-i.x,n.y-i.y);function n6({url:n,name:i}){const[l,h]=L.useState({s:1,x:0,y:0}),[x,D]=L.useState(""),[_,s]=L.useState(!1),u=L.useRef(l);u.current=l;const f=L.useRef(null),g=L.useRef(null),d=L.useRef(null),y=L.useRef(new Map),N=L.useRef(null),k=L.useRef(null),b=L.useRef(null),c=L.useRef({moved:!1,lpFired:!1,pinched:!1}),p=L.useRef(0);if(nr(_,()=>s(!1)),!n)return o.jsxDEV("div",{className:"doc-image-msg",children:M("imageviewer.loadFailed")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:41,columnNumber:20},this);const v=(V,P,Y)=>{const Q=g.current,z=d.current;if(!Q||!z)return{x:P,y:Y};const X=Math.max(0,(z.offsetWidth*V-Q.clientWidth)/2),K=Math.max(0,(z.offsetHeight*V-Q.clientHeight)/2);return{x:Math.min(X,Math.max(-X,P)),y:Math.min(K,Math.max(-K,Y))}},w=(V,P,Y)=>{if(V=Math.min(AC,Math.max(1,V)),V<=1){h({s:1,x:0,y:0});return}const Q=v(V,P,Y);h({s:V,x:Q.x,y:Q.y})},C=V=>w(u.current.s*V,u.current.x,u.current.y),T=()=>{b.current&&(clearTimeout(b.current),b.current=null)},S=V=>{D(V),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>D(""),2500)},R=()=>{s(!1);const V=document.createElement("a");V.href=n,V.download=i||"image",document.body.appendChild(V),V.click(),V.remove(),S(M("imageviewer.saved"))},j=async()=>{var V;s(!1);try{const P=await(await fetch(n)).blob(),Y=new File([P],i||"image",{type:sp(i)||P.type||"application/octet-stream"});if((V=navigator.canShare)!=null&&V.call(navigator,{files:[Y]})){await navigator.share({files:[Y]});return}}catch{return}S(M("imageviewer.shareUnsupported"))},A=V=>{var Y,Q;(Q=(Y=V.currentTarget).setPointerCapture)==null||Q.call(Y,V.pointerId),y.current.set(V.pointerId,{x:V.clientX,y:V.clientY});const P=y.current.size;if(P===2){T(),c.current.pinched=!0;const[z,X]=[...y.current.values()];N.current={dist:UC(z,X)||1,s:u.current.s}}else P===1&&(c.current.moved=!1,c.current.lpFired=!1,c.current.pinched=!1,k.current={x:V.clientX,y:V.clientY},T(),b.current=setTimeout(()=>{b.current=null,y.current.size===1&&!c.current.moved&&(c.current.lpFired=!0,s(!0))},e6))},O=V=>{if(y.current.has(V.pointerId)){if(y.current.set(V.pointerId,{x:V.clientX,y:V.clientY}),y.current.size>=2&&N.current){const[P,Y]=[...y.current.values()];w(N.current.s*(UC(P,Y)/N.current.dist),u.current.x,u.current.y);return}if(k.current){const P=V.clientX-k.current.x,Y=V.clientY-k.current.y;(Math.abs(P)>MC||Math.abs(Y)>MC)&&(c.current.moved=!0,T()),u.current.s>1&&(k.current={x:V.clientX,y:V.clientY},w(u.current.s,u.current.x+P,u.current.y+Y))}}},H=V=>{if(T(),y.current.delete(V.pointerId),y.current.size===1){N.current=null;const[P]=[...y.current.values()];k.current={x:P.x,y:P.y}}else if(y.current.size===0){if(!c.current.moved&&!c.current.lpFired&&!c.current.pinched){const Y=V.timeStamp||0;Y-p.current<t6?(p.current=0,u.current.s>1?w(1,0,0):w(2,0,0)):p.current=Y}N.current=null,k.current=null,c.current={moved:!1,lpFired:!1,pinched:!1}}};return o.jsxDEV("div",{ref:g,className:"doc-image-wrap",onPointerDown:A,onPointerMove:O,onPointerUp:H,onPointerCancel:H,onContextMenu:V=>V.preventDefault(),children:[o.jsxDEV("img",{ref:d,className:"doc-image",src:n,alt:i,draggable:!1,style:{transform:`translate(${l.x}px, ${l.y}px) scale(${l.s})`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:161,columnNumber:7},this),o.jsxDEV("div",{className:"doc-image-zoom",onPointerDown:V=>V.stopPropagation(),children:[o.jsxDEV("button",{onClick:()=>C(1/1.5),disabled:l.s<=1,"aria-label":M("imageviewer.zoomOut"),children:"−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:170,columnNumber:9},this),o.jsxDEV("span",{className:"doc-image-zoom-val","aria-hidden":"true",children:[Math.round(l.s*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:171,columnNumber:9},this),o.jsxDEV("button",{onClick:()=>C(1.5),disabled:l.s>=AC,"aria-label":M("imageviewer.zoomIn"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:172,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:169,columnNumber:7},this),x&&o.jsxDEV("div",{className:"doc-image-note",role:"status",children:x},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:174,columnNumber:16},this),o.jsxDEV(qf,{open:_,title:i||M("imageviewer.imageTitle"),actions:[{key:"save",label:M("imageviewer.saveImage"),onClick:R},{key:"share",label:M("imageviewer.shareImage"),onClick:j}],onClose:()=>s(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:175,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:152,columnNumber:5},this)}const A_=Ia.length-1;function r6({type:n,name:i,content:l}){const[h,x]=L.useState(()=>d3()),D=L.useRef(null),_=QI();hp(_.playing&&!_.paused);const s=L.useMemo(()=>n==="markdown"?Tj.sanitize(cr.parse(l||"")):"",[n,l]);if(L.useEffect(()=>{_.stop()},[s]),L.useEffect(()=>{var N;const d=D.current;if(!d||(d.querySelectorAll(".tts-active").forEach(k=>k.classList.remove("tts-active")),_.idx<0))return;const y=d.querySelectorAll(`.tts-sent[data-tts="${_.idx}"]`);y.forEach(k=>k.classList.add("tts-active")),(N=y[0])==null||N.scrollIntoView({block:"center",behavior:"smooth"})},[_.idx]),n==="image")return o.jsxDEV(n6,{url:l,name:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:50,columnNumber:12},this);if(n==="html")return o.jsxDEV("iframe",{className:"doc-iframe",sandbox:"allow-scripts",srcDoc:l||"",title:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:54,columnNumber:12},this);const u=d=>{const y=Math.min(A_,Math.max(0,h+d));x(y),h3(y)};if(n==="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:()=>u(-1),disabled:h<=0,"aria-label":M("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:()=>u(1),disabled:h>=A_,"aria-label":M("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:`${Ia[h]}px`},children:l||""},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 f=()=>{if(_.playing){_.paused?_.resume():_.pause();return}const d=JI(D.current);d.length&&_.play(d)},g=_.playing&&!_.paused;return o.jsxDEV("div",{className:"doc-md-wrap",children:[o.jsxDEV("div",{className:"doc-zoom",children:[_.supported&&o.jsxDEV("div",{className:"doc-tts",children:[o.jsxDEV("button",{className:"doc-zoom-btn doc-zoom-icon",onClick:f,"aria-label":g?M("doc.pauseRead"):_.paused?M("doc.resumeRead"):M("doc.read"),children:g?o.jsxDEV(_2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:88,columnNumber:26},this):o.jsxDEV(b2,{},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:_.stop,disabled:!_.playing,"aria-label":M("doc.stopRead"),children:o.jsxDEV(Rw,{},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:_.cycleRate,"aria-label":M("doc.rate"),children:[_.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:()=>u(-1),disabled:h<=0,"aria-label":M("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:()=>u(1),disabled:h>=A_,"aria-label":M("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:D,className:"doc-md",style:{fontSize:`${Ia[h]}px`},dangerouslySetInnerHTML:{__html:s}},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 i6({open:n,pane:i,windowId:l,tabs:h,active:x,onActivate:D,onCloseTab:_,onMinimize:s,onOpenDoc:u,pendingShare:f,onPendingConsumed:g}){const d=h.find(z=>z.key===x)||h[0],[y,N]=L.useState("recent"),[k,b]=L.useState(null),[c,p]=L.useState(0),v=d.type==="home",w=L.useRef(null),C=L.useRef(k);C.current=k;const T=L.useRef(x);T.current=x;const S=L.useRef(l);S.current=l;const R=L.useRef(s);R.current=s;const j=L.useRef(D);j.current=D;const A=L.useRef(x),O=L.useRef(0),H=L.useRef([]),V=()=>{window.history.pushState({fileOverlay:!0},""),O.current+=1};Zd(n,()=>{var X,K;O.current=Math.max(0,O.current-1);const z=H.current.pop();if((z==null?void 0:z.type)==="doc"){(X=j.current)==null||X.call(j,"home");return}if((z==null?void 0:z.type)==="nav"){b(z.prev),z.prev&&XS(S.current,z.prev);return}(K=R.current)==null||K.call(R)});const P=z=>{n&&z!==C.current&&(H.current.push({type:"nav",prev:C.current}),V()),b(z),XS(l,z)},Y=L.useRef(n);L.useEffect(()=>{const z=A.current;A.current=x;const X=Y.current;Y.current=n,n&&X&&z==="home"&&x!=="home"&&(H.current.push({type:"doc"}),V())},[x,n]),L.useEffect(()=>{if(n)return H.current=[],O.current=0,V(),()=>{O.current>0&&(Qd(O.current),O.current=0)}},[n]);const Q=async()=>{try{const{cwd:z}=await fl(i);z&&b(z)}catch{}};return L.useEffect(()=>{f&&N("browse")},[f]),L.useEffect(()=>{n&&p(z=>z+1)},[n]),L.useEffect(()=>{if(!n){w.current=null;return}if(w.current===l)return;w.current=l,H.current=[],N("browse");let z=!1;return(async()=>{const X=$U(l);let K=null;if(X)try{await _E(X),K=X}catch{}if(!K&&i)try{const{cwd:B}=await fl(i);K=B}catch{}!z&&K&&b(K)})(),()=>{z=!0}},[n,l,i]),Co.createPortal(o.jsxDEV("div",{className:`file-sheet ${n?"open":""}`,"aria-hidden":!n,children:[o.jsxDEV("div",{className:"file-tabs",children:[o.jsxDEV("div",{className:"file-tabs-scroll",children:h.map(z=>o.jsxDEV("div",{className:`file-tab ${z.key===x?"active":""}`,children:[o.jsxDEV("button",{className:"file-tab-label",onClick:()=>D(z.key),children:z.key==="home"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV(kc,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:145,columnNumber:39},this),M("filemanager.files")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:145,columnNumber:37},this):z.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:144,columnNumber:15},this),z.key!=="home"&&o.jsxDEV("button",{className:"file-tab-x","aria-label":M("filemanager.closeTab"),onClick:()=>_(z.key),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:148,columnNumber:17},this)]},z.key,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:143,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:141,columnNumber:9},this),o.jsxDEV("button",{className:"file-min","aria-label":M("filemanager.minimize"),title:M("filemanager.minimize"),onClick:s,children:o.jsxDEV(Fa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:153,columnNumber:134},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:153,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:140,columnNumber:7},this),o.jsxDEV("div",{className:"file-body",children:v?o.jsxDEV("div",{className:"home-pane",children:[o.jsxDEV("div",{className:"file-seg",role:"tablist",children:[o.jsxDEV("button",{className:`file-seg-btn ${y==="recent"?"on":""}`,role:"tab","aria-selected":y==="recent",onClick:()=>N("recent"),children:[o.jsxDEV(xE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:161,columnNumber:17},this),M("filemanager.recent")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:159,columnNumber:15},this),o.jsxDEV("button",{className:`file-seg-btn ${y==="browse"?"on":""}`,role:"tab","aria-selected":y==="browse",onClick:()=>N("browse"),children:[o.jsxDEV(kc,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:165,columnNumber:17},this),M("filemanager.directory")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:163,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:158,columnNumber:13},this),y==="recent"?o.jsxDEV(YI,{onOpenDoc:u,refreshKey:c},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:169,columnNumber:17},this):o.jsxDEV(IE,{path:k,onNavigate:P,onOpenDoc:u,onJumpToCwd:i?Q:null,refreshKey:c,pendingFile:f,onPendingConsumed:g,overlayActive:n},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:170,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:157,columnNumber:11},this):o.jsxDEV(r6,{type:d.type,name:d.name,content:d.content},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:174,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:155,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:139,columnNumber:5},this),document.body)}function s6(n){if(!n)return[];const i=[];let l=null,h=null;for(const x of n.split(`
335
+ `)){if(x.startsWith("diff --git")){const _=x.match(/ b\/(.*)$/);l={path:_?_[1]:x.slice(11),hunks:[]},i.push(l),h=null;continue}if(!l)continue;if(x.startsWith("@@")){h={header:x,lines:[]},l.hunks.push(h);continue}if(!h)continue;const D=x[0];D==="+"?h.lines.push({type:"add",text:x.slice(1)}):D==="-"?h.lines.push({type:"del",text:x.slice(1)}):D===" "&&h.lines.push({type:"ctx",text:x.slice(1)})}return i}const a6=n=>String(n||"").replace(/\/+$/,"").split("/").pop()||n;function np(n,i){const l=(n&&n!==" "?n:i)||"?";return l==="?"?"?":l}function o6({open:n,pane:i,windowId:l,inset:h=0,onClose:x}){const D=L.useRef(!0);L.useEffect(()=>()=>{D.current=!1},[]);const[_,s]=L.useState([]),[u,f]=L.useState(null),[g,d]=L.useState([]),y=g.length?g[g.length-1]:null,[N,k]=L.useState(!1),[b,c]=L.useState(null),p=L.useRef(l);L.useEffect(()=>{p.current=l},[l]);const[v,w]=L.useState(null),[C,T]=L.useState(null),[S,R]=L.useState(null),[j,A]=L.useState(null),[O,H]=L.useState(20),[V,P]=L.useState(!1),[Y,Q]=L.useState({changes:!0,commits:!0}),[z,X]=L.useState(!1),K=L.useRef(null),[B,F]=L.useState(null),[G,Z]=L.useState(null),[ae,me]=L.useState(null),Ue=L.useRef(g);Ue.current=g;const De=L.useRef(N);De.current=N;const ie=L.useRef(x);ie.current=x;const q=L.useRef(0),fe=()=>{window.history.pushState({gitOverlay:!0},""),q.current+=1},le=Ne=>{fe(),d(Qe=>[...Qe,Ne])},Oe=()=>{fe(),k(!0)};nr(n&&z,()=>X(!1)),Zd(n,()=>{var Ne;if(q.current=Math.max(0,q.current-1),De.current){k(!1);return}if(Ue.current.length){d(Qe=>Qe.slice(0,-1));return}(Ne=ie.current)==null||Ne.call(ie)}),L.useEffect(()=>{if(n)return fe(),()=>{q.current>0&&(Qd(q.current),q.current=0)}},[n]),L.useEffect(()=>{if(!n)return;let Ne=!1;d([]),A(null),Z(null),me(null);const Qe=Dw(l);return Qe.length?(s(Qe),f(ye=>ye&&Qe.includes(ye)?ye:Qe[0]),()=>{Ne=!0}):(s([]),f(null),(async()=>{try{if(!i)return;const{cwd:ye}=await fl(i);if(!ye)return;const{repos:Fe=[]}=await d1(ye);if(Ne||!Fe.length)return;const ze=t1(l,Fe.map(Nt=>Nt.path));if(Ne)return;s(ze),f(ze[0]??null)}catch(ye){if(Ne)return;(ye==null?void 0:ye.message)==="outside home"?me(M("git.outsideRoots")):Z(M("git.errReadRepo"))}})(),()=>{Ne=!0})},[n,i,l]),L.useEffect(()=>{if(!n||!i)return;let Ne=!1;return fl(i).then(({cwd:Qe})=>{!Ne&&Qe&&c(Qe)}).catch(()=>{}),()=>{Ne=!0}},[n,i]),L.useEffect(()=>{if(!n||!u){w(null),T(null);return}let Ne=!1;return w(null),T(null),R(null),A(null),H(20),Z(null),me(null),(async()=>{try{const[Qe,ye]=await Promise.all([t2(u),r2(u)]);if(Ne)return;w(Qe.changes??[]),T(ye.branches??[])}catch{Ne||Z(M("git.errLoad"))}})(),()=>{Ne=!0}},[n,u]),L.useEffect(()=>{if(!n||!u){R(null);return}let Ne=!1;return(async()=>{try{const{commits:Qe=[]}=await n2(u,{ref:j||void 0,limit:O});Ne||R(Qe)}catch{Ne||R([])}finally{Ne||P(!1)}})(),()=>{Ne=!0}},[n,u,j,O]);const ke=!u||!y?"":y.kind==="diff"?`${u}|diff|${y.path}|${y.commit||""}|${y.staged?1:0}`:`${u}|commit|${y.hash}`;L.useEffect(()=>{if(!n||!u||!y){F(null);return}let Ne=!1;return Z(null),F(null),(async()=>{try{let Qe;if(y.kind==="diff"){const{diff:ye,truncated:Fe}=await i2(u,{path:y.path,commit:y.commit,staged:y.staged});Qe={files:s6(ye),truncated:Fe}}else Qe=await s2(u,y.hash);Ne||F({key:ke,payload:Qe})}catch{Ne||Z(M("git.errLoad"))}})(),()=>{Ne=!0}},[n,ke]);const nt=L.useCallback(()=>{window.history.back()},[]),xe=Ne=>{f(Ne),d([]),A(null)},$e=async Ne=>{window.history.back(),me(null);try{const{repos:Qe=[]}=await d1(Ne);if(!D.current)return;if(!Qe.length){me(M("git.noRepoInDir"));return}const ye=Qe.map(Wt=>Wt.path),Fe=p.current,ze=Fe?t1(Fe,ye):ye;s(Wt=>{const Gt=[...Wt];for(const Qt of ze)Gt.includes(Qt)||Gt.push(Qt);return Gt});const Nt=ye.find(Wt=>!_.includes(Wt))||ye[0];xe(Nt)}catch(Qe){if(!D.current)return;(Qe==null?void 0:Qe.message)==="outside home"?me(M("git.outsideRoots")):Z(M("git.errReadDir"))}},at=Ne=>{const Qe=y3(l,Ne);s(Qe),u===Ne&&(f(Qe[0]??null),d([]),A(null))},Ge=(C||[]).find(Ne=>Ne.current)||null,Ft=Ne=>{const Qe=Ne===(Ge==null?void 0:Ge.name)?null:Ne;Qe!==j&&(A(Qe),R(null),H(20))},Rt=Ne=>Q(Qe=>({...Qe,[Ne]:!Qe[Ne]})),oe=S!=null&&S.length>=O,Te=Ne=>{if(!oe||V)return;const Qe=Ne.currentTarget;Qe.scrollHeight-Qe.scrollTop-Qe.clientHeight<80&&(P(!0),H(ye=>ye+20))},Ie=j||(Ge==null?void 0:Ge.name)||null,Ve=!!j&&j!==(Ge==null?void 0:Ge.name),tt=j?(C||[]).find(Ne=>Ne.name===j):Ge,ot=B&&B.key===ke?B.payload:null,bt=!!y,ve=(y==null?void 0:y.kind)==="commit"?M("git.commitDetail"):(y==null?void 0:y.kind)==="diff"?y.path||M("git.diff"):"";return Co.createPortal(o.jsxDEV("div",{className:`file-sheet git-sheet ${n?"open":""}`,"aria-hidden":!n,style:{"--kb-inset":`${h}px`},children:[o.jsxDEV("div",{className:"file-tabs git-head",children:[bt?o.jsxDEV("div",{className:"git-drill-head",children:[o.jsxDEV("button",{className:"git-back","aria-label":M("common.back"),title:M("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(CE,{},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:ve},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":M("git.bindRepo"),title:M("git.bindRepo"),onClick:Oe,children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:296,columnNumber:13},this),_.map(Ne=>o.jsxDEV("div",{className:`git-tab ${Ne===u?"active":""}`,children:[o.jsxDEV("button",{className:"git-tab-label",onClick:()=>xe(Ne),children:a6(Ne)},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":M("common.close"),title:M("common.close"),onClick:()=>at(Ne),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:300,columnNumber:17},this)]},Ne,!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":M("git.collapse"),title:M("git.collapse"),onClick:()=>x==null?void 0:x(),children:o.jsxDEV(Fa,{},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),!bt&&u&&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)," ",Ie||"—",!Ve&&Ie&&o.jsxDEV("span",{className:"git-branch-cur-tag",children:M("git.currentBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:317,columnNumber:46},this),tt&&(tt.ahead||tt.behind)?o.jsxDEV("span",{className:"git-branch-bar-track",children:[tt.ahead?o.jsxDEV("span",{className:"git-ahead",children:["↑",tt.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:320,columnNumber:42},this):null,tt.behind?o.jsxDEV("span",{className:"git-behind",children:["↓",tt.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 ${Ve?"other":""}`,onClick:()=>X(Ne=>!Ne),"aria-haspopup":"listbox","aria-expanded":z,title:M("git.switchViewedBranch"),children:[o.jsxDEV("span",{className:"git-branch-trigger-name",children:M("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(Fa,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:329,columnNumber:50},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:329,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:326,columnNumber:13},this),z&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"git-dd-backdrop",onClick:()=>X(!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:[(C||[]).length===0&&o.jsxDEV("div",{className:"git-empty",children:M("git.noBranches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:335,columnNumber:53},this),(C||[]).map(Ne=>{const Qe=j?Ne.name===j:Ne.current;return o.jsxDEV("button",{role:"option","aria-selected":Qe,className:`git-dd-item ${Ne.current?"current":""} ${Qe?"viewing":""}`,onClick:()=>{Ft(Ne.name),X(!1)},children:[o.jsxDEV("span",{className:"git-branch-dot",children:Ne.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:Ne.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:343,columnNumber:25},this),Ne.upstream&&o.jsxDEV("span",{className:"git-branch-up",children:[Ne.upstream,Ne.ahead?o.jsxDEV("span",{className:"git-ahead",children:[" ↑",Ne.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:346,columnNumber:40},this):null,Ne.behind?o.jsxDEV("span",{className:"git-behind",children:[" ↓",Ne.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)]},Ne.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:[G&&o.jsxDEV("div",{className:"git-error",children:G},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:361,columnNumber:19},this),ae&&!G&&!bt&&o.jsxDEV("div",{className:"git-notice",children:ae},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:362,columnNumber:44},this),!u&&!G&&!ae&&o.jsxDEV("div",{className:"git-empty",children:M("git.noRepoBound")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:364,columnNumber:11},this),bt&&u&&!G&&o.jsxDEV("div",{className:"git-scroll",children:ot?y.kind==="diff"?o.jsxDEV(d6,{data:ot},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:370,columnNumber:41},this):o.jsxDEV(u6,{data:ot,onOpenFile:Ne=>le({kind:"diff",path:Ne,commit:y.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:M("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),!bt&&u&&!G&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV(OC,{variant:"top",title:M("git.changes"),count:v==null?void 0:v.length,expanded:Y.changes,onToggle:()=>Rt("changes"),children:v==null?o.jsxDEV("div",{className:"git-loading",children:M("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:380,columnNumber:34},this):o.jsxDEV(l6,{data:{changes:v},onOpenFile:(Ne,Qe)=>le({kind:"diff",path:Ne,staged:Qe})},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(OC,{variant:"mid",title:M("git.commits"),subtitle:Ve?Ie:null,expanded:Y.commits,onToggle:()=>Rt("commits"),bodyRef:K,onScroll:Te,children:S==null?o.jsxDEV("div",{className:"git-loading",children:M("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(c6,{data:{commits:S},onOpen:Ne=>le({kind:"commit",hash:Ne})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:388,columnNumber:21},this),oe&&o.jsxDEV("div",{className:"git-more",children:M(V?"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(eh,{open:N,seedCwd:b,pane:i,inset:h,hint:M("git.pickerHint"),onPick:$e,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 OC({variant:n,title:i,subtitle:l,count:h,expanded:x,onToggle:D,onScroll:_,bodyRef:s,children:u}){return o.jsxDEV("div",{className:`git-section git-section--${n} ${x?"open":""}`,children:[o.jsxDEV("button",{className:"git-section-head",onClick:D,"aria-expanded":x,children:[o.jsxDEV("span",{className:"git-section-caret",children:o.jsxDEV(Fa,{},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:i},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:419,columnNumber:9},this),l&&o.jsxDEV("span",{className:"git-section-sub",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:420,columnNumber:22},this),h!=null&&o.jsxDEV("span",{className:"git-section-count",children:h},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),x&&o.jsxDEV("div",{className:"git-section-body",ref:s,onScroll:_,children:u},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 l6({data:n,onOpenFile:i}){const l=(n==null?void 0:n.changes)??[];return l.length?o.jsxDEV("div",{className:"git-list",children:l.map((h,x)=>{const D=!!(h.x&&h.x!==" "&&h.x!=="?");return o.jsxDEV("button",{className:"git-row",onClick:()=>i(h.path,D),children:[o.jsxDEV("span",{className:`git-badge git-badge-${np(h.x,h.y).toLowerCase().replace("?","q")}`,children:np(h.x,h.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:h.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:438,columnNumber:13},this)]},`${h.path}-${x}`,!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:M("git.cleanTree")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:430,columnNumber:31},this)}function c6({data:n,onOpen:i}){const l=(n==null?void 0:n.commits)??[];return l.length?o.jsxDEV("div",{className:"git-list",children:l.map(h=>o.jsxDEV("button",{className:"git-row git-commit-row",onClick:()=>i(h.hash),children:[o.jsxDEV("span",{className:"git-hash",children:h.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:h.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:[h.author," · ",h.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)]},h.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:M("git.noCommits")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:448,columnNumber:31},this)}function u6({data:n,onOpenFile:i}){if(!n)return null;const l=n.files??[];return o.jsxDEV("div",{className:"git-commit-detail",children:[n.message&&o.jsxDEV("pre",{className:"git-commit-msg",children:n.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:l.map((h,x)=>o.jsxDEV("button",{className:"git-row",onClick:()=>i(h.path),children:[o.jsxDEV("span",{className:`git-badge git-badge-${np(h.x,h.y).toLowerCase().replace("?","q")}`,children:np(h.x,h.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:h.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:474,columnNumber:13},this)]},`${h.path}-${x}`,!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 VC=Ia.length-1;function d6({data:n}){const[i,l]=L.useState(()=>f3()),h=D=>{const _=Math.min(VC,Math.max(0,i+D));l(_),p3(_)};if(!n)return null;const x=n.files??[];return x.length?o.jsxDEV("div",{className:"git-diff-wrap",style:{fontSize:`${Ia[i]}px`},children:[o.jsxDEV("div",{className:"git-diff-zoom",children:[o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>h(-1),disabled:i<=0,"aria-label":M("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:()=>h(1),disabled:i>=VC,"aria-label":M("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),n.truncated&&o.jsxDEV("div",{className:"git-diff-trunc",children:M("git.diffTruncated")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:496,columnNumber:26},this),x.map((D,_)=>o.jsxDEV("div",{className:"git-diff-file",children:[x.length>1&&o.jsxDEV("div",{className:"git-diff-fname",children:D.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:D.hunks.map((s,u)=>o.jsxDEV("div",{className:"git-diff-hunk-block",children:[o.jsxDEV("div",{className:"git-diff-line git-diff-hunk",children:s.header},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:503,columnNumber:17},this),s.lines.map((f,g)=>o.jsxDEV("div",{className:`git-diff-line git-diff-${f.type}`,children:[f.type==="add"?"+":f.type==="del"?"-":" ",f.text]},g,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:505,columnNumber:19},this))]},u,!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)]},`${D.path}-${_}`,!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:M("git.noDiff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:489,columnNumber:29},this)}function h6(){const n=q2();if(Uw(n.active,g1),!n.active)return null;const i=n.phase==="sending",l=Math.round((n.pct||0)*100);return Co.createPortal(o.jsxDEV("div",{className:"upload-overlay",role:"alertdialog","aria-modal":"true","aria-label":M("upload.title"),children:o.jsxDEV("div",{className:"upload-card",children:[n.label&&o.jsxDEV("div",{className:"upload-card-label",children:n.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:20,columnNumber:23},this),i?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"upload-bar",children:o.jsxDEV("div",{className:"upload-bar-fill",style:{width:`${l}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:23,columnNumber:41},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:23,columnNumber:13},this),o.jsxDEV("div",{className:"upload-card-sub",children:[l,"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:24,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:22,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:28,columnNumber:13},this),o.jsxDEV("div",{className:"upload-card-sub",children:M("upload.processing")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:29,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:27,columnNumber:11},this),o.jsxDEV("button",{type:"button",className:"upload-cancel",onClick:g1,children:M("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:32,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:19,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:18,columnNumber:5},this),document.body)}const Lf=8,BC=12;function PC({path:n,x:i,y:l,onOpen:h,onClose:x,icon:D,name:_,openLabel:s,note:u,disabled:f=!1,busy:g=!1,busyMode:d=null,allowRepeat:y=!1,modeChoices:N=!1,proxyAvailable:k=!1}){const b=_??(n.split("/").filter(Boolean).pop()||n),c=L.useRef(null),[p,v]=L.useState(null);return L.useLayoutEffect(()=>{const w=c.current;if(!w)return;const C=w.offsetWidth,T=w.offsetHeight,S=window.innerWidth,R=window.innerHeight,j=Math.min(Math.max(i-C/2,Lf),S-C-Lf);let A=l+BC;A+T>R-Lf&&(A=Math.max(Lf,l-BC-T)),v({left:j,top:A})},[i,l,n]),o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"doclink-backdrop",onClick:x},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:37,columnNumber:7},this),o.jsxDEV("div",{ref:c,className:"doclink-pop",style:p?{left:p.left,top:p.top}:{left:0,top:0,visibility:"hidden"},role:"dialog","aria-label":M("doclink.title"),children:[o.jsxDEV("div",{className:"doclink-name",children:[D??o.jsxDEV(kc,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:44,columnNumber:48},this),b]},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:n},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:45,columnNumber:9},this),u&&o.jsxDEV("div",{className:"doclink-note",children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:46,columnNumber:18},this),N&&!k&&o.jsxDEV("div",{className:"doclink-note",children:M("browser.proxyUnavailable")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:47,columnNumber:44},this),o.jsxDEV("div",{className:"doclink-actions",children:[o.jsxDEV("button",{className:"doclink-cancel",onClick:x,children:M("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:49,columnNumber:11},this),!f&&(N?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("button",{className:"doclink-open",disabled:g&&!y,"aria-busy":g&&d==="direct"?"true":void 0,onClick:()=>h(n,"direct"),children:[M("browser.directMode"),g&&d==="direct"?` · ${M("common.loading")}`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:52,columnNumber:15},this),o.jsxDEV("button",{className:"doclink-open proxy",disabled:!k||g&&!y,"aria-busy":g&&d==="proxy"?"true":void 0,onClick:()=>h(n,"proxy"),children:[M("browser.proxyMode"),g&&d==="proxy"?` · ${M("common.loading")}`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:57,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:51,columnNumber:13},this):o.jsxDEV("button",{className:"doclink-open",disabled:g&&!y,onClick:()=>h(n),children:g?M("common.loading"):s??M("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:64,columnNumber:13},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:48,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 m6=()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`;function f6(n){const i=(n??"").trim();return i?{id:m6(),text:i}:null}function p6(n,i,l){const h=[...n];if(i<0||i>=h.length||l<0||l>=h.length||i===l)return h;const[x]=h.splice(i,1);return h.splice(l,0,x),h}function v6({open:n,session:i,window:l,onClose:h,onSend:x,onCountChange:D,micAvailable:_=!1}){const[s,u]=L.useState([]),[f,g]=L.useState(""),[d,y]=L.useState(null),[N,k]=L.useState(null),b=L.useRef(null),c=L.useRef({head:"",tail:""}),p=L.useRef(null),v=L.useRef(!1),w=L.useRef({active:!1}),C=B=>{e1(i,l,B),u(B),D==null||D(B.length)},T=B=>{B&&(B.style.height="auto",B.style.height=`${B.scrollHeight+2}px`)};L.useEffect(()=>{if(!n)return;const B=gE(i,l);u(B),D==null||D(B.length),g(""),y(null)},[n,i,l]);const R=$w({onText:B=>{if(v.current){v.current=!1;return}const{head:F,tail:G}=c.current;g(F+B+G),p.current=F.length+B.length}}),j=R.state==="recording"||R.state==="finalizing";hp(j),L.useEffect(()=>{if(R.state!=="recording"&&R.state!=="finalizing"||v.current)return;const{head:B,tail:F}=c.current;g(B+R.partial+F),p.current=B.length+R.partial.length},[R.partial,R.state]),L.useLayoutEffect(()=>{const B=b.current;if(!B||(T(B),p.current==null))return;const F=p.current;if(p.current=null,document.activeElement===B)try{B.setSelectionRange(F,F)}catch{}},[f]);const A=()=>{if(j){R.stop();return}const B=b.current,F=B?B.selectionStart:f.length;c.current={head:f.slice(0,F),tail:f.slice(F)},R.start()},O=()=>{j&&(v.current=!0,R.stop())},H=()=>{O();const B=f.trim();if(B){if(d)C(s.map(F=>F.id===d?{...F,text:B}:F));else{const F=f6(B);F&&C([...s,F])}g(""),y(null)}},V=B=>{y(B.id),g(B.text),requestAnimationFrame(()=>{var F;return(F=b.current)==null?void 0:F.focus()})},P=()=>{y(null),g("")},Y=B=>{C(s.filter(F=>F.id!==B)),B===d&&P()},Q=(B,F)=>{var G,Z;B.cancelable&&B.preventDefault(),(Z=(G=B.currentTarget).setPointerCapture)==null||Z.call(G,B.pointerId),w.current={active:!0,pointerId:B.pointerId,id:F},k(F)},z=B=>{var me;const F=w.current;if(!F.active||B.pointerId!==F.pointerId)return;const G=(me=B.currentTarget.closest(".idea-list"))==null?void 0:me.querySelectorAll("[data-idea]");if(!G||!G.length)return;const Z=B.clientY;let ae=G.length-1;for(let Ue=0;Ue<G.length;Ue++){const De=G[Ue].getBoundingClientRect();if(Z<De.top+De.height/2){ae=Ue;break}}u(Ue=>{const De=Ue.findIndex(ie=>ie.id===F.id);return De<0||De===ae?Ue:p6(Ue,De,ae)})},X=B=>{const F=w.current;!F.active||B.pointerId!==F.pointerId||(w.current={active:!1},k(null),u(G=>(e1(i,l,G),G)))};if(!n)return null;const K=d!=null;return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:h},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:147,columnNumber:7},this),o.jsxDEV("div",{className:"idea-panel",role:"dialog","aria-label":M("idea.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:[M("idea.title"),l?` · ${l}`:"",s.length>0&&o.jsxDEV("span",{className:"idea-head-count",children:s.length},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:150,columnNumber:100},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:150,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:h,"aria-label":M("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:151,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:149,columnNumber:9},this),o.jsxDEV("div",{className:`idea-compose${j?" recording":""}`,children:[o.jsxDEV("textarea",{ref:b,className:"idea-input",rows:1,placeholder:M(K?"idea.editPlaceholder":"idea.addPlaceholder"),value:f,readOnly:j,onChange:B=>g(B.target.value)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:155,columnNumber:11},this),K&&o.jsxDEV("button",{className:"idea-cancel",onClick:P,children:M("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:164,columnNumber:23},this),_&&o.jsxDEV(Hw,{active:j,disabled:R.state==="requesting",onToggle:A},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:165,columnNumber:28},this),o.jsxDEV("button",{className:"idea-act",onClick:H,disabled:!f.trim(),"aria-label":M(K?"common.save":"idea.add"),children:K?o.jsxDEV(op,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:167,columnNumber:24},this):o.jsxDEV(ap,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:167,columnNumber:40},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:166,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:154,columnNumber:9},this),o.jsxDEV("div",{className:"idea-list",children:s.length===0?o.jsxDEV("div",{className:"cmd-empty",children:M("idea.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:173,columnNumber:13},this):s.map(B=>o.jsxDEV("div",{"data-idea":B.id,className:`idea-row${B.id===N?" dragging":""}${B.id===d?" editing":""}`,children:[o.jsxDEV("button",{type:"button",className:"idea-handle","aria-label":M("idea.dragSort"),onPointerDown:F=>Q(F,B.id),onPointerMove:z,onPointerUp:X,onPointerCancel:X,children:"≡"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:180,columnNumber:15},this),o.jsxDEV("span",{className:"idea-text",onClick:()=>V(B),children:B.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:189,columnNumber:15},this),o.jsxDEV("button",{className:"idea-send",onClick:()=>x==null?void 0:x(B.text),"aria-label":M("idea.fillInput"),children:M("idea.send")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:190,columnNumber:15},this),o.jsxDEV("button",{className:"idea-del",onClick:()=>Y(B.id),"aria-label":M("common.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:191,columnNumber:15},this)]},B.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:175,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:171,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:148,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:146,columnNumber:5},this)}function g6({open:n,onClose:i}){return n?o.jsxDEV("div",{className:"settings-page changelog-page",role:"dialog","aria-label":M("changelog.title"),"aria-modal":"true",children:[o.jsxDEV("header",{className:"settings-page-head",children:[o.jsxDEV("button",{type:"button",className:"settings-page-back",onClick:i,"aria-label":M("common.back"),children:"‹"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:12,columnNumber:9},this),o.jsxDEV("h1",{children:M("changelog.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:13,columnNumber:9},this),o.jsxDEV("span",{className:"settings-page-head-spacer","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:14,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:11,columnNumber:7},this),o.jsxDEV("div",{className:"settings-page-body",children:o.jsxDEV("main",{className:"settings-page-content detail changelog-page-content",children:o.jsxDEV("div",{className:"changelog-list settings-page-list",children:F_.map(l=>{var D,_;const h=l.items[So()]||l.items.en||l.items.zh||[],x=l.version?`v${l.version}`:((D=l.label)==null?void 0:D[So()])||((_=l.label)==null?void 0:_.en);return o.jsxDEV("div",{className:"rel",children:[o.jsxDEV("div",{className:"rel-date",children:[x&&o.jsxDEV("span",{className:"rel-ver",children:x},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:28,columnNumber:31},this),o.jsxDEV("span",{className:"rel-day",children:l.date},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:29,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:27,columnNumber:19},this),o.jsxDEV("ul",{className:"rel-items",children:h.map((s,u)=>o.jsxDEV("li",{children:s},u,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:32,columnNumber:43},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:31,columnNumber:19},this)]},l.version||l.date,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:26,columnNumber:17},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:18,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:17,columnNumber:9},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:16,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:10,columnNumber:5},this):null}const zj="tw_asr";function b6(){try{const n=localStorage.getItem(zj);return n==null?null:n==="1"}catch{return null}}function _6(n=null){const[i,l]=L.useState(b6);return L.useEffect(()=>{if(!n)return;const h=!!n.asr;l(h);try{localStorage.setItem(zj,h?"1":"0")}catch{}},[n]),i}function w6(n){let i=!1,l=!1;for(let h=n;h&&h!==document.body&&h!==document.documentElement;h=h.parentElement){const x=getComputedStyle(h);if(!l&&(x.overflowY==="auto"||x.overflowY==="scroll")&&h.scrollHeight>h.clientHeight&&(l=!0),!i&&(x.overflowX==="auto"||x.overflowX==="scroll")&&h.scrollWidth>h.clientWidth&&(i=!0),i&&l)break}return{x:i,y:l}}function y6(){L.useEffect(()=>{let n="block",i=0,l=0;const h=D=>{const _=D.touches[0];if(i=_?_.clientX:0,l=_?_.clientY:0,!(D.target instanceof Element)){n="block";return}const{x:s,y:u}=w6(D.target);n=u?"free":s?"xonly":"block"},x=D=>{if(!(n==="free"||!D.cancelable)){if(n==="xonly"){const _=D.touches[0];if(_&&Math.abs(_.clientX-i)>=Math.abs(_.clientY-l))return}D.preventDefault()}};return document.addEventListener("touchstart",h,{passive:!0,capture:!0}),document.addEventListener("touchmove",x,{passive:!1,capture:!0}),()=>{document.removeEventListener("touchstart",h,{capture:!0}),document.removeEventListener("touchmove",x,{capture:!0})}},[])}function x6({open:n,historyActive:i,switchTab:l,setOpen:h}){const x=L.useRef(0),D=L.useRef(i),_=L.useRef(!1),s=L.useRef(l),u=L.useRef(h);s.current=l,u.current=h,Zd(n,()=>{var g,d;const f=x.current;if(x.current=Math.max(0,f-1),_.current){_.current=!1;return}f>1?(g=s.current)==null||g.call(s,"history"):(d=u.current)==null||d.call(u,!1)}),L.useEffect(()=>{if(!n){D.current=i;return}return window.history.pushState({overlay:!0},""),x.current=1,D.current=i,()=>{x.current>0&&Qd(x.current),x.current=0,_.current=!1}},[n]),L.useEffect(()=>{if(!n){D.current=i;return}const f=D.current;D.current=i,f&&!i?(window.history.pushState({overlay:!0},""),x.current+=1):!f&&i&&x.current>1&&(_.current=!0,window.history.back())},[i,n])}function N6(n,i,l=2e3){const h=L.useRef(i);h.current=i,L.useEffect(()=>{if(!n)return;let x=!1,D=null,_=!1;const s=()=>{var d;(d=window.history.state)!=null&&d.exitRoot||window.history.replaceState({...window.history.state,exitRoot:!0},"")},u=()=>{var d;_||(d=window.history.state)!=null&&d.exitGuard||(window.history.pushState({exitGuard:!0},""),_=!0)},f=()=>{var d;D&&(clearTimeout(D),D=null),x&&(x=!1,(d=h.current)==null||d.call(h,!1))};s(),u();const g=()=>{var d,y,N;if((d=window.history.state)!=null&&d.exitGuard){_=!0,f();return}(y=window.history.state)!=null&&y.exitRoot&&(_=!1,!x&&(x=!0,(N=h.current)==null||N.call(h,!0),D=setTimeout(()=>{var k;x=!1,D=null,(k=h.current)==null||k.call(h,!1),u()},l)))};return window.addEventListener("popstate",g),()=>{var d,y;window.removeEventListener("popstate",g),D&&clearTimeout(D),x&&((d=h.current)==null||d.call(h,!1)),_&&((y=window.history.state)!=null&&y.exitGuard)&&window.history.back()}},[n,l])}function IC(n){history.replaceState(history.state,"",`#${encodeURIComponent(n)}`)}const Rd=n=>{try{return decodeURIComponent(n)}catch{return n}};function M_(){const n=location.hash.replace(/^#/,""),i=n.match(/^\/inbox(?:\/(.*))?$/);if(i)return{session:null,window:null,pane:null,inbox:!0,inboxId:i[1]?Rd(i[1]):null};const l=n.match(/^\/s\/([^/]*)\/w\/([^/]*)\/p\/(.*)$/);return l?{session:Rd(l[1]),window:Rd(l[2]),pane:Rd(l[3]),inbox:!1,inboxId:null}:{session:Rd(n)||null,window:null,pane:null,inbox:!1,inboxId:null}}const S6="tmw-share-v1",C6="/__share__/";function E6(n=typeof location<"u"?location.search:""){try{return new URLSearchParams(n).has("share")}catch{return!1}}function j6(){if(typeof location>"u"||typeof history>"u")return;const n=new URL(location.href);n.searchParams.delete("share"),history.replaceState(history.state,"",n.pathname+n.search+n.hash)}async function D6(){if(typeof caches>"u")return null;let n;try{n=await caches.open(S6)}catch{return null}const i=await n.keys();if(!i.length)return null;const l=i[i.length-1],h=await n.match(l);if(await n.delete(l),!h)return null;const x=await h.blob();let D="shared";try{D=decodeURIComponent(new URL(l.url).pathname.slice(C6.length))||"shared"}catch{}return new File([x],D,{type:x.type||h.headers.get("Content-Type")||""})}const FC="①②③④⑤⑥⑦⑧⑨",k6=n=>Number.isFinite(n==null?void 0:n.width)&&Number.isFinite(n==null?void 0:n.height)?`${n.width}×${n.height}`:"",$j=(n,i)=>{const l=k6(i);return l?`${n} · ${l}`:n};function R6(n){return n?$j(n.name||n.id||"",n):""}function T6(n,i){const l=(n||[]).findIndex(D=>D.id===i);if(l<0)return"";const h=n[l],x=l<FC.length?FC[l]:String(l+1);return $j(`${x} ${h.command||h.id}`,h)}const Wj="tw_keyboard_mode",Gj=new Set(["auto","mobile","desktop"]);function L6({ua:n="",platform:i="",maxTouchPoints:l=0,mobileHint:h=null,finePointer:x=!1,hover:D=!1}={}){const _=/Android|iPhone|iPad|iPod/i.test(n)||i==="MacIntel"&&l>1||h===!0,s=/Mac|Win|Linux/i.test(i)||/Macintosh|Windows NT|X11; Linux/i.test(n);return!_&&s&&x&&D}function A6(n=window){var l,h,x;const i=n.navigator;return L6({ua:i.userAgent,platform:i.platform,maxTouchPoints:i.maxTouchPoints,mobileHint:((l=i.userAgentData)==null?void 0:l.mobile)??null,finePointer:((h=n.matchMedia)==null?void 0:h.call(n,"(pointer: fine)").matches)===!0,hover:((x=n.matchMedia)==null?void 0:x.call(n,"(hover: hover)").matches)===!0})}function M6(n=window.localStorage){try{const i=n.getItem(Wj);return Gj.has(i)?i:"auto"}catch{return"auto"}}function U6(n,i=window.localStorage){if(Gj.has(n))try{i.setItem(Wj,n)}catch{}}function O6(n,i){return n==="desktop"?!0:n==="mobile"?!1:!!i}const V6=n=>[...n].map(i=>i.toString(16).padStart(2,"0")).join(""),Af=16384*2;function B6({send:n,onDelivered:i=()=>{},onError:l=()=>{},encoder:h=new TextEncoder}){let x=[],D=[],_=!1,s=!1,u=!1;const f=(y,...N)=>{try{y(...N)}catch{}},g=async()=>{if(!(s||u||D.length===0)){s=!0;try{for(;!u&&D.length;){const y=D.shift();try{await n(y.pane,y.hex)}catch(N){D=D.filter(k=>k.pane!==y.pane),x=x.filter(k=>k.pane!==y.pane),f(l,N,y.pane);continue}f(i,y.pane)}}finally{s=!1}}},d=()=>{_=!1;const y=x;x=[];for(const N of y){let k=N.hex;for(;k;){const b=D.at(-1);if((b==null?void 0:b.pane)===N.pane&&b.hex.length<Af){const c=Af-b.hex.length;b.hex+=k.slice(0,c),k=k.slice(c)}else D.push({pane:N.pane,hex:k.slice(0,Af)}),k=k.slice(Af)}}g()};return{enqueue(y,N){if(u||!y||!N)return;const k=typeof N=="string"?h.encode(N):N instanceof Uint8Array?N:new Uint8Array(N);x.push({pane:y,hex:V6(k)}),_||(_=!0,queueMicrotask(d))},drop(y){x=x.filter(N=>N.pane!==y),D=D.filter(N=>N.pane!==y)},dispose(){u=!0,x=[],D=[]}}}function P6({enabled:n,currentPane:i,terminalRef:l,onAuthFail:h,send:x=k3}){const D=L.useRef(null),_=L.useRef(i),s=L.useRef(h);return _.current=i,s.current=h,L.useEffect(()=>{if(!n)return;let u=!1;const f=B6({send:x,onDelivered:g=>{var d,y;!u&&g===_.current&&((y=(d=l.current)==null?void 0:d.wake)==null||y.call(d))},onError:(g,d)=>{var y,N,k;u||(g instanceof li?(y=s.current)==null||y.call(s):d===_.current&&((k=(N=l.current)==null?void 0:N.inputFailed)==null||k.call(N,g)))}});return D.current=f,()=>{u=!0,D.current=null,f.dispose()}},[n,x,l]),L.useCallback((u,f)=>{var g;(g=D.current)==null||g.enqueue(u,f)},[])}const HC=n=>Math.max(20,Math.min(500,n)),Sc=(n,i)=>i&&n.some(l=>l.id===i)?i:n[0].id;function I6(){var Ya,gh,qa,bh,_h,wh,El,jl,ga,ba,Gc,yh,Yc,xh,qc,Kc,Xc,Dl,Nh,Jc,Sh,Ch,Eh,Ka,kl,Xa,Zc,Qc,Rl,jh;const n=L.useMemo(()=>A6(),[]),[i,l]=L.useState(M6),h=O6(i,n),[x,D]=L.useState(pI),[_,s]=L.useState(gI),u=typeof window<"u"&&_I(window.location,x),[f,g]=L.useState(!wl()),d=IO({enabled:!f}),y=(d==null?void 0:d.shortcuts)||up,N=_6(d),[k,b]=L.useState(!1),[c,p]=L.useState(!1),[v,w]=L.useState(XU),C=ee=>{JU(ee),w(ee)},[T,S]=L.useState(ZU),R=ee=>{QU(ee),S(ee)},[j,A]=L.useState(!1),[O,H]=L.useState(!1),[V,P]=L.useState(!1),[Y,Q]=L.useState(null),[z,X]=L.useState(null),[K,B]=L.useState(null),[F,G]=L.useState(null),[Z,ae]=L.useState(!1),[me,Ue]=L.useState(0),[De,ie]=L.useState(0),[q,fe]=L.useState(null),[le,Oe]=L.useState(!1),[ke,nt]=L.useState(!1),[xe,$e]=L.useState(!1),[at,Ge]=L.useState(null),[Ft,Rt]=L.useState(null),[oe,Te]=L.useState(null),[Ie,Ve]=L.useState(null),[tt,ot]=L.useState(null),[bt,ve]=L.useState(!1),[Ne,Qe]=L.useState(null),[ye,Fe]=L.useState(null),ze=TO(),Nt=VO({enabled:!f,browserProxy:!!(d!=null&&d.browserProxy)}),[Wt,Gt]=L.useState(ma),[Qt,Rn]=L.useState(zf),[we,Ye]=L.useState([]),[J,lt]=L.useState(null),it=L.useRef(0),[Pt,pt]=L.useState(!0),[en,It]=L.useState(null),[Ht,Ut]=L.useState(!1),[hn,_n]=L.useState(null),[Xt,jn]=L.useState(!1),[Nr,Or]=L.useState(null),[ce,rt]=L.useState({}),[mt,Se]=L.useState("terminal");L.useEffect(()=>{Se(localStorage.getItem("tw_lens_"+(J==null?void 0:J.paneId))||"terminal")},[J==null?void 0:J.paneId]);const[ct,ft]=L.useState([]),[Le,Ct]=L.useState(null),[Bn,tn]=L.useState(!1),{status:nn,enable:Xn}=BI(d),[Lt,zt]=L.useState(!1),[Sn,hr]=L.useState(0),[$n,Jt]=L.useState(!1),[yr,Wn]=L.useState(v3),[gt,se]=L.useState(null),[Ae,vt]=L.useState(b3),[on,Yt]=L.useState(GS),[ue,Ze]=L.useState(IU),[st,yt]=L.useState([]),[xn,Kt]=L.useState(""),[fr,Tn]=L.useState(0),[pr,vr]=L.useState(null),ki=L.useRef(!1),pi=L.useRef(0),[Ir,ci]=L.useState(Od),[rr,Fr]=L.useState(!1),[bs,Qi]=L.useState(null),[Nn,es]=L.useState(null),[Vr,ne]=L.useState(FU),He=()=>Fr(!0),Je=L.useRef(0),rn=L.useRef(null);rn.current=bs;const zn=()=>{window.history.pushState({overlay:!0},""),Je.current+=1},kr=ee=>{zn(),Qi(ee),KS(ee),ci(Od())},ir=()=>window.history.back(),un=()=>{Qi(null),Fr(!1)},gr=()=>{st.forEach(ee=>KS(ee.id)),ci(Od())},sr=async ee=>{if(ki.current)return!1;ki.current=!0,pi.current+=1,vr(ee),Kt("");try{return await NO(ee),yt(de=>de.filter(_e=>_e.id!==ee)),!0}catch(de){return pe(de)||Kt(M("pushInbox.deleteFailed")),!1}finally{pi.current+=1,ki.current=!1,vr(null)}},ln=L.useRef(null),Cn=L.useRef(null),[An,Rr]=L.useState(!1),Kr=L.useRef(!1);Kr.current=An;const Hr=L.useCallback(()=>{var ee,de;return(de=(ee=ln.current)==null?void 0:ee.focusInput)==null?void 0:de.call(ee)},[]),zr=L.useCallback(()=>{var ee,de,_e,We;(de=(ee=ln.current)==null?void 0:ee.blurInput)==null||de.call(ee),(We=(_e=Cn.current)==null?void 0:_e.focusComposer)==null||We.call(_e)},[]),as=L.useRef({owner:null,at:0}),ui=L.useCallback(()=>{var ee,de;h&&(as.current={owner:Kr.current?"terminal":(de=(ee=Cn.current)==null?void 0:ee.composerFocused)!=null&&de.call(ee)?"composer":null,at:Date.now()})},[h]),Tr=L.useRef(new Map),Sr=L.useRef(null),Xr=L.useRef(null);Xr.current=en;const Cr=L.useRef(null);Cr.current=hn;const Jr=L.useRef(!1),Ri=L.useRef(null),Ti=L.useRef(null),os=L.useRef(0),vi=L.useRef(null),fa=L.useRef(null),W=L.useCallback(()=>g(!0),[]),he=P6({enabled:h,currentPane:J==null?void 0:J.paneId,terminalRef:ln,onAuthFail:W}),pe=L.useCallback(ee=>FO(ee,W),[W]),Be=L.useCallback(()=>{os.current+=1,vi.current=null,Jr.current=!1,jn(!1),_n(null)},[]),dt=L.useCallback(()=>{var de,_e;const ee=(de=Xr.current)==null?void 0:de.checkpointId;ee&&WS(ee),!Jr.current&&["succeeded","partial"].includes((_e=Cr.current)==null?void 0:_e.status)&&(Be(),It(null)),Ut(!1)},[Be]),qt=L.useCallback(()=>{let ee=!1;const de=()=>{ee||(ee=!0,window.removeEventListener("popstate",_e),clearTimeout(We),H(!0))},_e=()=>de();window.addEventListener("popstate",_e);const We=setTimeout(de,300);dt()},[dt]),jt=L.useCallback(()=>{b(!1),Ut(!0)},[]),an=L.useCallback(()=>{var de;const ee=(de=Xr.current)==null?void 0:de.checkpointId;ee&&(MU(ee),Ti.current=ee),Be(),Ut(!1),It(null)},[Be]),wn=MO(J),On=z2([...Nt.tabs,...wn.tabs.map(ee=>({...ee,mode:"static"}))]),Vn=!!(k||c||j||O||V||Y||z||K||ke||xe||Ft||Ne||ye||Ht||Le||Bn||Lt||$n||rr||le||Nt.open),Qn=L.useRef(!1),gn=L.useRef(null),ur=L.useCallback(ee=>{U6(ee),ee==="desktop"&&Vn&&(gn.current="terminal"),l(ee)},[Vn]),xr=L.useCallback(ee=>{D(vI(ee))},[]),Ts=L.useCallback(ee=>{s(bI(ee))},[]);L.useEffect(()=>{var de,_e,We,qe,Pe,wt;const ee=Qn.current;if(h&&Vn){if(!ee){const Mt=as.current,fn=Kr.current?"terminal":(_e=(de=Cn.current)==null?void 0:de.composerFocused)!=null&&_e.call(de)?"composer":null;gn.current=fn||(Date.now()-Mt.at<1e3?Mt.owner:null),as.current={owner:null,at:0}}(qe=(We=ln.current)==null?void 0:We.blurInput)==null||qe.call(We),(wt=(Pe=Cn.current)==null?void 0:Pe.hideKeyboard)==null||wt.call(Pe)}else if(h&&ee&&gn.current){const Mt=gn.current;gn.current=null;const fn=requestAnimationFrame(()=>{var jr,Yn;mt==="terminal"&&(Mt==="terminal"?Hr():(Yn=(jr=Cn.current)==null?void 0:jr.focusComposer)==null||Yn.call(jr))});return Qn.current=Vn,()=>cancelAnimationFrame(fn)}Qn.current=Vn},[h,Vn,J==null?void 0:J.paneId,mt,Hr]),L.useEffect(()=>{if(!h||Vn||mt!=="terminal"||!(J!=null&&J.paneId))return;const ee=de=>{var _e,We;if(eV(de)){if(Q4(de)){de.preventDefault(),de.stopPropagation(),zr();return}(We=(_e=ln.current)==null?void 0:_e.forwardPageKey)!=null&&We.call(_e,de)&&(de.preventDefault(),de.stopPropagation())}};return window.addEventListener("keydown",ee,!0),()=>window.removeEventListener("keydown",ee,!0)},[h,Vn,mt,J==null?void 0:J.paneId,zr]),L.useEffect(()=>{f||G3().then(se).catch(()=>{})},[f]);const Ys=L.useCallback(()=>{DU(),Be(),p(!1),H(!1),b(!1),lt(null),pt(!0),g(!0)},[Be]);y6();const Lr=yB();x6({open:Nt.open,historyActive:Nt.historyActive&&!wn.selected,switchTab:()=>{wn.deactivate(),Nt.switchTab("history")},setOpen:Nt.setOpen}),nr(k||Ht,()=>{Ht?dt():b(!1)}),nr(Bn,()=>tn(!1)),nr(j,()=>A(!1)),nr(O,()=>H(!1)),nr(V,()=>P(!1)),nr(Lt,()=>zt(!1)),nr(!!Ft,()=>Rt(null)),nr(!!Le,()=>Ct(null)),nr(!!Ne||!!ye,()=>{ye?dh():Qe(null)}),nr(c,()=>p(!1)),nr($n,()=>Jt(!1)),nr(!!z||!!Y,()=>{Y?Q(null):X(null)}),nr(!!K,()=>{Sr.current&&Tr.current.delete(Sr.current),Sr.current=null,G(null),ae(!1),B(null)}),Zd(rr,()=>{if(Je.current=Math.max(0,Je.current-1),rn.current){Qi(null);return}Fr(!1)}),L.useEffect(()=>{if(rr)return zn(),()=>{Je.current>0&&(Qd(Je.current),Je.current=0)}},[rr]),L.useEffect(()=>{rr&&Nn&&(kr(Nn),es(null))},[rr,Nn]),L.useEffect(()=>{rr&&st.length&&st[0].ts>Vr&&(HU(st[0].ts),ne(st[0].ts))},[rr,st,Vr]),N6(!!J,ve);const Hi=L.useCallback(async ee=>{var _e,We;const de=J==null?void 0:J.paneId;if(de)try{await Jd(de,[ee]),(We=(_e=ln.current)==null?void 0:_e.wake)==null||We.call(_e)}catch(qe){pe(qe)}},[J,W]),qs=L.useCallback(async ee=>{var _e,We;const de=J==null?void 0:J.paneId;if(de)try{await Dc(de,ee,!1),(We=(_e=ln.current)==null?void 0:_e.wake)==null||We.call(_e)}catch(qe){pe(qe)}},[J,W]),$r=L.useCallback(async(ee,de=null,{isCancelled:_e=()=>!1}={})=>{const We=++it.current;if(_e())return!1;const qe=await xo(ee.id);if(_e()||We!==it.current||!qe.length)return!1;const Pe=(de==null?void 0:de.window)&&qe.find(fn=>fn.id===de.window)||qe.find(fn=>fn.id===Sc(qe,YU(ee.id))),wt=await ks(Pe.id);if(_e()||We!==it.current||!wt.length)return!1;const Mt=de!=null&&de.pane&&wt.some(fn=>fn.id===de.pane)?de.pane:Sc(wt,Nd(Pe.id));return lt({session:ee,windows:qe,window:Pe,panes:wt,paneId:Mt}),sl({sessionId:ee.id,windowId:Pe.id,paneId:Mt}),IC(ee.name),!0},[]),zi=L.useCallback(ee=>{ee&&(PU(ee),Gt(ma()))},[]),pa=L.useCallback((ee,de)=>{var Mt;if(Jr.current)return;ee!=null&&ee.mapping&&zi(ee.mapping);const _e=(ee==null?void 0:ee.checkpointId)||null;if(_e&&_e===Ti.current&&["succeeded","partial"].includes((Mt=Cr.current)==null?void 0:Mt.status))return;const qe=!!(_e&&Ti.current&&Ti.current!==_e);qe&&Be(),_e&&(Ti.current=_e);const Pe=AU(ee==null?void 0:ee.checkpointId),wt=HO(ee,{...Pe,liveSessionCount:de});if(wt==="none"){Be(),It(null),Ut(!1);return}It(ee),wt==="auto-dialog"?(WS(ee.checkpointId),b(!1),Ut(!0)):qe&&Ut(!1)},[zi,Be]),Do=L.useCallback(async()=>{var We,qe;const ee=Xr.current;if(!ee||Jr.current)return;const de={generation:os.current+1,checkpointId:ee.checkpointId,operationId:null};os.current=de.generation,vi.current=de,Jr.current=!0,jn(!0);const _e=()=>{var Pe;return vi.current===de&&os.current===de.generation&&((Pe=Xr.current)==null?void 0:Pe.checkpointId)===de.checkpointId};try{const Pe=await Y3({checkpointId:ee.checkpointId});if(!_e())return;if(!(Pe!=null&&Pe.operationId))throw new Error("restore operation id missing");de.operationId=Pe.operationId,_n({id:Pe.operationId,status:Pe.status||"pending",progress:{completed:0,total:(((We=ee.planSummary)==null?void 0:We.create)||0)+(((qe=ee.planSummary)==null?void 0:qe.renamed)||0)},results:[]})}catch(Pe){if(!_e())return;Jr.current=!1,jn(!1),pe(Pe)||_n({status:"failed",errorCode:"restore-failed",progress:{completed:0,total:0},results:[]})}},[pe]),Li=hn==null?void 0:hn.id;L.useEffect(()=>{if(!Li||f)return;const ee=vi.current;if(!ee||ee.operationId!==Li)return;let de=!1,_e=null;const We=()=>!de&&vi.current===ee&&os.current===ee.generation&&ee.operationId===Li,qe=()=>{We()&&(_e=setTimeout(wt,1e3))},Pe=async Mt=>{if(!We())return!0;const fn=Xr.current,jr=fn==null?void 0:fn.checkpointId;if(_n(Mt),zi(Mt.mapping),(Mt.results||[]).filter(Ot=>Ot.status==="restored").length>0&&(Gt(TU(Mt.results)),_c()),Jr.current=!1,jn(!1),!We())return!0;const[Wr,ys]=await Promise.allSettled([a1(),s1()]);if(!We())return!0;if(ys.status==="fulfilled"?Or(ys.value):pe(ys.reason),Wr.status==="fulfilled"&&Ri.current!==null){const Ot=Wr.value;Mt.status==="succeeded"&&(Ot==null?void 0:Ot.checkpointId)===jr?zi(Ot.mapping):pa(Ot,Ri.current)}else Wr.status==="rejected"&&pe(Wr.reason);return!0},wt=async()=>{if(We()){try{const Mt=await q3(Li);if(!We())return;if(_n(Mt),["succeeded","partial","failed","interrupted"].includes(Mt.status)){const fn=await Pe(Mt);if(!We())return;fn||qe();return}}catch(Mt){if(!We()||pe(Mt))return;if(Mt instanceof bE&&Mt.status>=400&&Mt.status<500){Jr.current=!1,jn(!1),_n({id:Li,status:"failed",errorCode:Mt.status===404?"operation-not-found":"restore-failed",progress:{completed:0,total:0},results:[]});return}}qe()}};return wt(),()=>{de=!0,clearTimeout(_e)}},[Li,f,zi,pa,pe]);const Ha=L.useCallback(async ee=>{const de=++it.current,We=Nd(ee.id)||ee.activePaneId||null;lt(qe=>qe&&{...qe,window:ee,panes:[],paneId:We}),sl({sessionId:J.session.id,windowId:ee.id,paneId:We});try{const qe=await ks(ee.id);if(de!==it.current)return null;if(!qe.length)return;const Pe=Sc(qe,Nd(ee.id));return lt(wt=>wt&&wt.window.id===ee.id?{...wt,window:ee,panes:qe,paneId:Pe}:wt),sl({sessionId:J.session.id,windowId:ee.id,paneId:Pe}),Pe}catch(qe){return pe(qe),null}},[J,W]),ko=L.useCallback(async(ee,de,_e)=>{var Pe,wt,Mt;const We=(Pe=J==null?void 0:J.session)==null?void 0:Pe.id,qe=J==null?void 0:J.paneId;if(!(!We||!qe))try{const{id:fn}=await V3(We,qe,ee||void 0,de,_e),jr=await xo(We),Yn=jr.find(Ot=>Ot.id===fn)||jr[jr.length-1],Wr=await ks(Yn.id);if(!Wr.length)return;const ys=Sc(Wr,Nd(Yn.id));lt(Ot=>Ot&&{...Ot,windows:jr,window:Yn,panes:Wr,paneId:ys}),sl({sessionId:We,windowId:Yn.id,paneId:ys}),P(!1),(Mt=(wt=ln.current)==null?void 0:wt.wake)==null||Mt.call(wt)}catch(fn){if(pe(fn))return;throw fn}},[J,W]),za=L.useCallback(async ee=>{var We,qe;const de=Y;if(!de)return;const _e=(We=J==null?void 0:J.session)==null?void 0:We.id;if(de.kind==="session"){try{await B3(de.id,ee)}catch(Pe){throw pe(Pe)?Pe:Pe.status===409?new Error(de("app.nameExists")):new Error(de("app.renameFailed"))}Gt(LU(de.name,ee)),_c(),IC(ee),lt(Pe=>Pe&&Pe.session.id===de.id?{...Pe,session:{...Pe.session,name:ee}}:Pe)}else{try{await P3(de.id,ee)}catch(wt){throw pe(wt)?wt:new Error(de("app.renameFailed"))}w3((qe=J==null?void 0:J.session)==null?void 0:qe.name,de.name||de.id,ee);const Pe=await xo(_e);lt(wt=>wt&&{...wt,windows:Pe,window:Pe.find(Mt=>Mt.id===wt.window.id)||wt.window})}Q(null)},[Y,J,W]),Lc=L.useCallback(async()=>{const ee=z,de=J==null?void 0:J.session;if(!ee||!de)return;const _e=de.id,We=J.windows.length<=1;try{await I3(ee.id)}catch(Pe){if(pe(Pe))return;window.alert(M("app.deleteFailed")),X(null);return}if(X(null),We){Gt($S(de.name)),_c(),lt(null);return}const qe=await xo(_e);if(ee.id===J.window.id&&qe.length){const Pe=qe.find(fn=>fn.active)||qe[0],wt=await ks(Pe.id);if(!wt.length)return;const Mt=Sc(wt,Nd(Pe.id));lt(fn=>fn&&{...fn,windows:qe,window:Pe,panes:wt,paneId:Mt}),sl({sessionId:_e,windowId:Pe.id,paneId:Mt})}else lt(Pe=>Pe&&{...Pe,windows:qe})},[z,J,W]),Zr=L.useCallback(async ee=>{var qe;const de=z,_e=(qe=J==null?void 0:J.session)==null?void 0:qe.id;if(!de||!_e)return;const We=v_(J.windows,de.id,ee);if(We)try{await F3(de.id,We.id);const Pe=await xo(_e);lt(wt=>wt&&{...wt,windows:Pe,window:Pe.find(Mt=>Mt.id===wt.window.id)||wt.window}),X(Pe.find(wt=>wt.id===de.id)||null)}catch(Pe){if(pe(Pe)){X(null);return}window.alert(M("app.moveFailed")),X(null)}},[z,J,W]),Nl=dp(()=>{J!=null&&J.session&&Q({kind:"session",id:J.session.id,name:J.session.name})}),Ce=L.useCallback(async ee=>{try{const de=(await ol()).find(_e=>_e.name===ee);if(!de){window.alert(M("app.sessionGone",{name:ee}));return}await $r(de)&&b(!1)}catch(de){pe(de)}},[$r,W]),_t=L.useCallback(async ee=>{tn(!1),Yt(YS(ee.pane,ee.ts));try{const de=(await ol()).find(_e=>_e.name===ee.session);if(!de){window.alert(M("app.sessionGone",{name:ee.session}));return}b(!1),await $r(de,{window:ee.window,pane:ee.pane})}catch(de){pe(de)}},[$r,W]),At=L.useCallback(async({target:ee,kill:de,name:_e})=>{const We=Le,qe=await e2({pid:We.pid,sessionId:We.sessionId,target:ee,kill:de,name:_e});qe.name&&(Gt(I_(qe.name)),_c()),Ct(null),tn(!1);try{qe.name&&(b(!1),await $r({id:qe.session,name:qe.name},{window:qe.window,pane:qe.pane}))}catch(Pe){pe(Pe)}try{ft(await u1())}catch{}},[Le,$r,W]),yn=L.useCallback(()=>{const ee=C1(ce);qS(ee),Ze(ee)},[ce]),Pn=L.useCallback(ee=>{Gt(I_(ee)),_c(),H(!1),Ce(ee)},[Ce]),er=L.useCallback(ee=>{Gt($S(ee)),_c(),lt(de=>de&&de.session.name===ee?null:de)},[]),Mn=L.useCallback(ee=>{lt(de=>de&&(sl({windowId:de.window.id,paneId:ee}),{...de,paneId:ee}))},[]),Bt=L.useCallback((ee,de)=>{lt(_e=>{if(!_e)return _e;const We=_e.windows.map(qe=>qe.id===ee?{...qe,panes:de.length}:qe);return _e.window.id===ee?{..._e,windows:We,panes:de}:{..._e,windows:We}})},[]),dn=L.useCallback(async ee=>{var _e;if(!ee)return;const de=(_e=J==null?void 0:J.session)==null?void 0:_e.id;if(!de){X(ee);return}try{const We=await xo(de),qe=We.find(Pe=>Pe.id===ee.id);if(!qe)return;lt(Pe=>!Pe||Pe.session.id!==de?Pe:{...Pe,windows:We,window:We.find(wt=>wt.id===Pe.window.id)||Pe.window}),X(qe)}catch(We){pe(We)||X(ee)}},[(Ya=J==null?void 0:J.session)==null?void 0:Ya.id,pe]),Br=L.useCallback(async(ee,de=(_e=>(_e=J==null?void 0:J.window)==null?void 0:_e.id)())=>{var We,qe,Pe;if(ee){if(!de){B(ee);return}try{const wt=await ks(de);if(!wt.some(Mt=>Mt.id===ee))return;Bt(de,wt),Sr.current!==de&&(Sr.current&&Tr.current.delete(Sr.current),Tr.current.delete(de),ae(!1)),Sr.current=de,G(((We=wt.find(Mt=>Mt.id===ee))==null?void 0:We.width)??null),B(ee)}catch(wt){pe(wt)||(Sr.current=de,G(((Pe=(qe=J==null?void 0:J.panes)==null?void 0:qe.find(Mt=>Mt.id===ee))==null?void 0:Pe.width)??null),B(ee))}}},[(gh=J==null?void 0:J.window)==null?void 0:gh.id,J==null?void 0:J.panes,Bt,pe]),gi=L.useCallback(async(ee=(de=>(de=J==null?void 0:J.window)==null?void 0:de.id)())=>{if(ee)try{Bt(ee,await ks(ee))}catch(_e){pe(_e)}},[(qa=J==null?void 0:J.window)==null?void 0:qa.id,Bt,pe]),Ai=L.useCallback((ee,de)=>{X(_e=>(_e==null?void 0:_e.id)===ee?{..._e,width:de}:_e),lt(_e=>{if(!_e)return _e;const We=_e.windows.map(qe=>qe.id===ee?{...qe,width:de}:qe);return{..._e,windows:We,window:_e.window.id===ee?{..._e.window,width:de}:_e.window}})},[]),_s=L.useCallback(async(ee,de)=>{var qe,Pe,wt,Mt;const _e=z;if(!_e||_e.panes!==1||!Number.isFinite(de))return;const We=HC(de+ee);Ai(_e.id,We),((qe=J==null?void 0:J.window)==null?void 0:qe.id)===_e.id&&((wt=(Pe=ln.current)==null?void 0:Pe.flash)==null||wt.call(Pe)),Ue(fn=>fn+1);try{await T3(_e.id,We)}catch(fn){if(pe(fn))return;try{const Yn=(await xo((Mt=J==null?void 0:J.session)==null?void 0:Mt.id)).find(Wr=>Wr.id===_e.id);Yn&&Ai(_e.id,Yn.width)}catch(jr){pe(jr)}}finally{Ue(fn=>Math.max(0,fn-1))}},[z,(bh=J==null?void 0:J.window)==null?void 0:bh.id,(_h=J==null?void 0:J.session)==null?void 0:_h.id,pe,Ai]),Mi=L.useCallback(async()=>{var _e;const ee=z,de=(_e=J==null?void 0:J.session)==null?void 0:_e.id;if(!(!ee||ee.panes!==1||!de))try{await U3(ee.id);const We=await xo(de),qe=We.find(Pe=>Pe.id===ee.id);lt(Pe=>!Pe||Pe.session.id!==de?Pe:{...Pe,windows:We,window:We.find(wt=>wt.id===Pe.window.id)||Pe.window}),qe&&X(qe)}catch(We){pe(We)}},[z,(wh=J==null?void 0:J.session)==null?void 0:wh.id,pe]),va=L.useCallback(async(ee,de)=>{var Pe,wt,Mt,fn,jr;const _e=(Pe=J==null?void 0:J.window)==null?void 0:Pe.id,We=(wt=J==null?void 0:J.panes)==null?void 0:wt.find(Yn=>Yn.id===K);if(!_e||!We||!U1(J.panes,We.id)||!Number.isFinite(de))return;const qe=HC(de+ee);G(qe),(fn=(Mt=ln.current)==null?void 0:Mt.flash)==null||fn.call(Mt),ie(Yn=>Yn+1);try{let Yn=Tr.current.get(_e);Yn==null&&(Yn=A3(_e).then(ys=>ys.layout||"").catch(()=>""),Tr.current.set(_e,Yn));const Wr=await Yn;Wr?(Tr.current.set(_e,Wr),Sr.current===_e&&ae(!0)):Tr.current.delete(_e),await L3(We.id,qe)}catch(Yn){if(pe(Yn))return;try{const Wr=await ks(_e);Bt(_e,Wr),G(((jr=Wr.find(ys=>ys.id===We.id))==null?void 0:jr.width)??null)}catch(Wr){pe(Wr)}}finally{ie(Yn=>Math.max(0,Yn-1))}},[J,K,Bt,pe]),Er=L.useCallback(async()=>{var We,qe;const ee=(We=J==null?void 0:J.window)==null?void 0:We.id;if(!ee)return;const de=Tr.current.get(ee),_e=de&&await de;if(_e)try{await M3(ee,_e);const Pe=await ks(ee);Bt(ee,Pe),G(((qe=Pe.find(wt=>wt.id===K))==null?void 0:qe.width)??null),Tr.current.delete(ee),ae(!1)}catch(Pe){pe(Pe)}},[(El=J==null?void 0:J.window)==null?void 0:El.id,K,Bt,pe]),Gn=L.useCallback(async(ee,de)=>{var We;const _e=(We=J==null?void 0:J.window)==null?void 0:We.id;if(_e){B(null),X(null),Tr.current.delete(_e),Sr.current=null,G(null),ae(!1);try{const{panes:qe,selectPaneId:Pe}=await m1({paneId:ee,dir:de,windowId:_e,api:{splitPane:r1},getPanes:ks});Bt(_e,qe),Mn(Pe)}catch(qe){if(pe(qe))return;window.alert(M("pane.splitFailed"))}}},[J,Bt,Mn,W]),ws=L.useCallback(async()=>{var We;const ee=K,de=(We=J==null?void 0:J.window)==null?void 0:We.id,_e=J==null?void 0:J.paneId;if(!(!ee||!de)){Tr.current.delete(de),Sr.current=null,G(null),ae(!1);try{const{panes:qe,selectPaneId:Pe}=await l2({paneId:ee,windowId:de,viewedPaneId:_e,api:{closePane:H3},getPanes:ks,pickId:Sc});B(null),Bt(de,qe),Pe&&Mn(Pe)}catch(qe){if(B(null),pe(qe))return;window.alert(M("pane.closeFailed"))}}},[K,J,Bt,Mn,W]),sh=L.useCallback(async(ee,de)=>{var We;const _e=(We=J==null?void 0:J.session)==null?void 0:We.id;if(!(!ee||!_e)){X(null);try{const qe=await ks(ee.id),Pe=qe.find(fn=>fn.active)||qe[0];if(!Pe)return;const{panes:wt,selectPaneId:Mt}=await m1({paneId:Pe.id,dir:de,windowId:ee.id,api:{splitPane:r1},getPanes:ks});lt(fn=>{if(!fn)return fn;const jr=fn.windows.map(Yn=>Yn.id===ee.id?{...Yn,panes:wt.length}:Yn);return{...fn,windows:jr,window:ee,panes:wt,paneId:Mt}}),sl({sessionId:_e,windowId:ee.id,paneId:Mt})}catch(qe){if(pe(qe))return;window.alert(M("pane.splitFailed"))}}},[J,W]),fp=L.useCallback(async ee=>{var _e;if(!ee)return;let de=J==null?void 0:J.paneId;ee.id!==((_e=J==null?void 0:J.window)==null?void 0:_e.id)?(X(null),de=await Ha(ee)):await new Promise(We=>{const qe=()=>{clearTimeout(Pe),window.removeEventListener("popstate",qe),We()},Pe=setTimeout(qe,80);window.addEventListener("popstate",qe),X(null)}),de&&(fe(ee.id),await Br(de,ee.id))},[J,Ha,Br]),Sl=(jl=J==null?void 0:J.session)==null?void 0:jl.name,Ac=(ga=J==null?void 0:J.window)==null?void 0:ga.id;L.useEffect(()=>{Ye(Sl&&Ac?$f(Sl,Ac):[])},[Sl,Ac]);const Mc=(ba=J==null?void 0:J.session)==null?void 0:ba.name,Uc=((Gc=J==null?void 0:J.window)==null?void 0:Gc.name)||((yh=J==null?void 0:J.window)==null?void 0:yh.id);L.useEffect(()=>{hr(Mc&&Uc?gE(Mc,Uc).length:0)},[Mc,Uc]),L.useEffect(()=>{J!=null&&J.paneId&&yO(J.paneId)},[J==null?void 0:J.paneId]),L.useEffect(()=>{var _e;const ee=J==null?void 0:J.paneId;if(!ee)return;const de=(_e=ce[ee])==null?void 0:_e.ts;de!=null&&GS()[ee]!==de&&Yt(YS(ee,de))},[J==null?void 0:J.paneId,ce]),L.useEffect(()=>{if(!E6())return;j6();let ee=!1;return(async()=>{const de=await D6();ee||!de||(Ge(de),ze.activate("home"),nt(!0))})(),()=>{ee=!0}},[]),L.useEffect(()=>{if(f||typeof navigator>"u"||!("serviceWorker"in navigator))return;const ee=async({session:We,window:qe,pane:Pe})=>{if(We)try{const Mt=(await ol()).find(fn=>fn.name===We);Mt&&(b(!1),await $r(Mt,{window:qe,pane:Pe}))}catch(wt){pe(wt)}},de=We=>{const qe=We.data;qe&&(qe.type==="navigate"?ee(qe):qe.type==="navigate-inbox"&&qe.id&&(Fr(!0),es(qe.id)))},_e=()=>{const We=M_();We.session&&(We.window||We.pane)&&ee(We)};return navigator.serviceWorker.addEventListener("message",de),window.addEventListener("hashchange",_e),()=>{navigator.serviceWorker.removeEventListener("message",de),window.removeEventListener("hashchange",_e)}},[f,$r,W]),L.useEffect(()=>{if(f)return;const ee=M_();ee.inbox&&(Fr(!0),ee.inboxId&&es(ee.inboxId),history.replaceState(history.state,"","#"))},[f]),L.useEffect(()=>{if(f)return;let ee=!0;const de=async()=>{var qe;const We=pi.current;try{const Pe=await xO();if(!ee||We!==pi.current)return;yt(Pe),ci(zU(Pe.map(wt=>wt.id))),Kt("")}catch(Pe){if(ee&&!pe(Pe)){const wt=(qe=Pe==null?void 0:Pe.code)!=null&&qe.startsWith("push.")?Pe.message:Pe!=null&&Pe.status?`HTTP ${Pe.status}`:"";Kt(wt?`${M("pushInbox.loadFailed")} (${wt})`:M("pushInbox.loadFailed"))}}};de();const _e=()=>{document.visibilityState==="visible"&&de()};return document.addEventListener("visibilitychange",_e),()=>{ee=!1,document.removeEventListener("visibilitychange",_e)}},[f,rr,fr,pe]);const Oc=L.useCallback(ee=>{var qe,Pe,wt,Mt;(Pe=(qe=ln.current)==null?void 0:qe.wake)==null||Pe.call(qe);const de=(wt=J==null?void 0:J.session)==null?void 0:wt.name,_e=(Mt=J==null?void 0:J.window)==null?void 0:Mt.id;de&&_e&&Ye(s3(de,_e,ee));const We=DB(ee);Ve(We&&(J!=null&&J.paneId)?{...We,paneId:J.paneId}:null)},[J]),$a=L.useCallback(ee=>{Rn(zf().includes(ee)?t3(ee):e3(ee))},[]),Vc=L.useCallback(ee=>{var We,qe;const de=(We=J==null?void 0:J.session)==null?void 0:We.name,_e=(qe=J==null?void 0:J.window)==null?void 0:qe.id;de&&_e&&Ye(a3(de,_e,ee))},[J]),Ro=((xh=(Yc=J==null?void 0:J.panes)==null?void 0:Yc.find(ee=>ee.id===J.paneId))==null?void 0:xh.cwd)||null,Bc=T&&((qc=ce[J==null?void 0:J.paneId])==null?void 0:qc.agent)==="claude",ah=Bc&&mt==="chat",Pc=async ee=>{if(S3(ee)){const _e=ee.split("/").pop()||ee;if(ze.tabs.some(Pe=>Pe.key===ee)){ze.activate(ee),Ic(ee),nt(!0);return}const{url:We,mtimeMs:qe}=await h1(ee);ze.openDoc(ee,{type:"image",name:_e,content:We,mtime:qe}),ZS({path:ee,name:_e,type:"image",ts:Date.now()}),nt(!0);return}const de=await i1(ee);ze.openDoc(ee,{type:de.type,name:de.name,content:de.content,mtime:de.mtimeMs}),ZS({path:ee,name:de.name,type:de.type,ts:Date.now()}),nt(!0)},pp=ee=>{const de=ze.tabs.find(_e=>_e.key===ee);(de==null?void 0:de.type)==="image"&&de.content&&URL.revokeObjectURL(de.content),ze.closeTab(ee)},Ic=ee=>{const de=ze.tabs.find(_e=>_e.key===ee);if(!(!de||de.type==="home")){if(de.type==="image"){h1(ee,de.mtime??null).then(_e=>{if(_e.notModified)return;const We=de.content;ze.refreshDoc(ee,{content:_e.url,mtime:_e.mtimeMs}),We&&URL.revokeObjectURL(We)}).catch(()=>{});return}i1(ee,de.mtime??null).then(_e=>{_e.notModified||ze.refreshDoc(ee,{type:_e.type,name:_e.name,content:_e.content,mtime:_e.mtimeMs})}).catch(()=>{})}},vp=ee=>{ze.activate(ee),Ic(ee)},gp=()=>{nt(!0),Ic(ze.active)},oh=ee=>{const de=/-> (\d+)/.exec((ee==null?void 0:ee.message)||""),_e=de?Number(de[1]):0;return M(_e===404?"app.docNotFound":_e===413?"app.docTooLarge":_e===400?"app.docUnsupported":"app.docOpenFailed")},lh=async ee=>{if(OE(ee)){try{await Pc(ee)}catch(_e){ot(oh(_e))}return}const de=QS(J==null?void 0:J.paneId)??Ro;if(de)try{await Pc(ll(de,ee));return}catch{}Rt({rawPath:ee})},ch=async ee=>{try{await Pc(ll(ee,Ft.rawPath))}catch(de){ot(oh(de));return}J!=null&&J.paneId&&c3(J.paneId,ee),setTimeout(()=>Rt(null),0)},bp=(ee,de,_e)=>{(ee==null?void 0:ee.kind)==="url"?Fe({protocol:ee.protocol,port:ee.port,path:ee.urlPath,raw:ee.raw,x:de,y:_e}):Qe({path:(ee==null?void 0:ee.path)??ee,x:de,y:_e})},uh=ee=>{Qe(null),lh(ee)},[_p,Cl]=L.useState(null),[wp,Fc]=L.useState(!1),[Hc,Ls]=L.useState(null),Ks=L.useRef(null),Wa=L.useRef(0),Ga=async(ee,de="direct")=>{var Pe;const _e=ye;if(!_e)return;(Pe=Ks.current)==null||Pe.abort();const We=++Wa.current,qe=new AbortController;Ks.current=qe,Ls(de),Fc(!0);try{const wt=await Nt.openUrl(_e.raw,{mode:de,signal:qe.signal});if(We!==Wa.current)return;if(!wt){Cl(M("localurl.failed"));return}Fe(null),Cl(null)}catch(wt){if(We!==Wa.current||pe(wt))return;Cl(wt.message||M("localurl.failed"))}finally{We===Wa.current&&(Ks.current=null,Ls(null),Fc(!1))}},dh=()=>{var ee;Wa.current+=1,(ee=Ks.current)==null||ee.abort(),Ks.current=null,Ls(null),Fc(!1),Fe(null),Cl(null)};if(L.useEffect(()=>{if(!tt)return;const ee=setTimeout(()=>ot(null),4e3);return()=>clearTimeout(ee)},[tt]),L.useEffect(()=>{if(!oe)return;const ee=setTimeout(()=>Te(null),3500);return()=>clearTimeout(ee)},[oe]),Uf({fetch:async()=>{const[ee,de,_e]=await Promise.allSettled([ol(),a1(),s1()]);for(const We of[ee,de,_e])We.status==="rejected"&&pe(We.reason);return{sessions:ee.status==="fulfilled"?ee.value:void 0,plan:de.status==="fulfilled"?de.value:void 0,protection:_e.status==="fulfilled"?_e.value:void 0}},apply:({sessions:ee,plan:de,protection:_e})=>{_e!==void 0&&Or(_e),Array.isArray(ee)&&(Ri.current=ee.length),de!=null&&de.mapping&&Ri.current===null&&zi(de.mapping),de!==void 0&&Ri.current!==null&&pa(de,Ri.current)},intervalMs:15e3,enabled:!f}),L.useEffect(()=>{if(f)return;const ee=ma();if(!ee.length){pt(!1);return}let de=!1;return(async()=>{try{const _e=await ol();if(de||!_e.length)return;const We=_e.filter(Mt=>ee.includes(Mt.name));if(!We.length)return;const qe=M_();let Pe=qe.session?We.find(Mt=>Mt.name===qe.session):null;const wt=Pe?{window:qe.window,pane:qe.pane}:null;if(!Pe){const Mt=GU();Mt&&(Pe=We.find(fn=>fn.id===Mt))}Pe||(Pe=We[0]),de||await $r(Pe,wt)}catch(_e){pe(_e)}finally{de||pt(!1)}})(),()=>{de=!0}},[f,$r]),Uf({fetch:()=>X3(Wt),apply:ee=>rt(ee||{}),intervalMs:5e3,enabled:!f,deps:[Wt]}),L.useEffect(()=>{if(ue!=null)return;const ee=C1(ce);ee>0&&(qS(ee),Ze(ee))},[ce,ue]),Uf({fetch:u1,apply:ee=>ft(Array.isArray(ee)?ee:[]),intervalMs:15e3,enabled:!f}),f)return o.jsxDEV(mI,{onSaved:()=>{g(!1),pt(!0)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1617,columnNumber:12},this);const hh=hO(ce,on,ue??1/0),yp=fO(hh),mh={};for(const ee of Object.values(ce))ee.window&&ee.agent&&(mh[ee.window]=ee.agent);const fh={};for(const[ee,de]of Object.entries(ce))de.agent&&(fh[ee]=de.agent);const zc=!!Sf&&yr!==Sf,xp=!!(gt!=null&&gt.updateAvailable)&&gt.latest!==Ae,ph=new Set(Ir),bi=st.filter(ee=>!ph.has(ee.id)).length,$c=st.length>0&&st[0].ts>Vr,Np=zc||xp||$c,Sp=()=>{p(!0),gt!=null&&gt.latest&&(_3(gt.latest),vt(gt.latest))},Cp=()=>{Jt(!0),g3(Sf),Wn(Sf)},Ep=(Kc=J==null?void 0:J.panes)==null?void 0:Kc.find(ee=>ee.id===K),jp=Number.isFinite(F)&&!!Ep&&U1(J==null?void 0:J.panes,K),vh=F==null?J==null?void 0:J.panes:(Xc=J==null?void 0:J.panes)==null?void 0:Xc.map(ee=>ee.id===K?{...ee,width:F}:ee),Wc=()=>{Sr.current&&Tr.current.delete(Sr.current),Sr.current=null,G(null),ae(!1),B(null)};return o.jsxDEV("div",{className:"app","data-chat-tone":v,onPointerDownCapture:ui,style:Lr?{transform:`translateY(-${Lr}px)`}:void 0,children:[o.jsxDEV("header",{className:"topbar",children:[o.jsxDEV("button",{ref:fa,className:"hamburger",onClick:()=>b(!0),children:"☰"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1674,columnNumber:9},this),o.jsxDEV("span",{className:"session-name",...Nl,children:((Dl=J==null?void 0:J.session)==null?void 0:Dl.name)??"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1675,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>zt(!0),"aria-label":M("app.ideas"),title:M("app.ideas"),disabled:!J,children:[o.jsxDEV(p2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1679,columnNumber:11},this),Sn>0&&o.jsxDEV("span",{className:"idea-badge",children:Sn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1680,columnNumber:29},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1677,columnNumber:9},this),o.jsxDEV(LI,{rows:hh,top:yp,open:Bn,onToggle:()=>tn(ee=>!ee),onClose:()=>tn(!1),onSelectRow:_t,onMarkAllRead:yn,hooksStatus:nn,onEnableHooks:Xn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1682,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>A(!0),"aria-label":M("usage.title"),title:M("usage.title"),children:o.jsxDEV(x2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1693,columnNumber:131},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1693,columnNumber:9},this),o.jsxDEV("button",{className:`topbar-icon browser-entry${On?` ${On}`:""}`,onClick:()=>Nt.setOpen(!0),"aria-label":M("app.browser"),title:M("app.browser"),children:o.jsxDEV(zd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1696,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1694,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:gp,"aria-label":M("app.files"),title:M("app.files"),children:o.jsxDEV(kc,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1698,columnNumber:114},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1698,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>$e(!0),"aria-label":"Git",title:"Git",children:o.jsxDEV(CE,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1699,columnNumber:103},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1699,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:Sp,"aria-label":M("app.settings"),title:M("app.settings"),children:[o.jsxDEV(Gf,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1701,columnNumber:11},this),Np&&o.jsxDEV("span",{className:"topbar-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1702,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1700,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1673,columnNumber:7},this),o.jsxDEV(TI,{open:j,onClose:()=>A(!1),onAuthFail:W},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1705,columnNumber:7},this),o.jsxDEV(SI,{open:c,onClose:()=>p(!1),workspaceProtection:Nr,chatTone:v,onChatTone:C,chatLensEnabled:T,onChatLensEnabled:R,keyboardMode:i,onKeyboardMode:ur,terminalTransport:x,onTerminalTransport:xr,snapshotInterval:_,onSnapshotInterval:Ts,hooksStatus:nn,onEnableHooks:Xn,termRef:ln,onOpenChangelog:Cp,changelogUnread:zc,notifUnread:$c,onOpenInbox:He,updateInfo:gt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1710,columnNumber:7},this),o.jsxDEV(g6,{open:$n,onClose:()=>Jt(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1733,columnNumber:7},this),o.jsxDEV(EO,{open:rr,detailId:bs,items:st,readIds:Ir,onOpenDetail:kr,onCloseDetail:ir,onClose:un,onDelete:sr,deletingId:pr,error:xn,onRetry:()=>Tn(ee=>ee+1),onMarkAllRead:gr,unreadCount:bi},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1734,columnNumber:7},this),o.jsxDEV($O,{open:k,currentSessionName:(Nh=J==null?void 0:J.session)==null?void 0:Nh.name,bound:Wt,onSelectSession:Ce,onUnbind:er,onBind:()=>H(!0),onClose:()=>b(!1),onLogout:Ys,orphans:ct,onTakeoverRequest:Ct,recoveryPlan:en,recoveryOperation:hn,onOpenRecovery:jt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1749,columnNumber:7},this),o.jsxDEV(jI,{open:Ht,plan:en,operation:hn,submitting:Xt,returnFocusRef:fa,onRestore:Do,onIgnore:an,onClose:dt,onRebind:qt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1764,columnNumber:7},this),o.jsxDEV(HI,{open:O,bound:Wt,onBound:Pn,onClose:()=>H(!1),onAuthFail:W,inset:Lr},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1775,columnNumber:7},this),o.jsxDEV($I,{open:V,onClose:()=>P(!1),onCreate:ko,paneId:J==null?void 0:J.paneId,inset:Lr},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1783,columnNumber:7},this),o.jsxDEV(GI,{open:!!Y,title:(Y==null?void 0:Y.kind)==="session"?M("app.renameSession"):M("app.renameWindow"),currentName:(Y==null?void 0:Y.name)||"",onClose:()=>Q(null),onSubmit:za,inset:Lr},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1790,columnNumber:7},this),o.jsxDEV(AI,{open:!!Le,orphan:Le,onConfirm:At,onClose:()=>Ct(null),inset:Lr},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1798,columnNumber:7},this),o.jsxDEV(qf,{open:!!z,title:M("app.manageWindow"),subtitle:R6(z),onClose:()=>X(null),actions:z?[...z.panes===1?[[{key:"split-h",icon:o.jsxDEV(f1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1816,columnNumber:39},this),label:M("pane.splitH"),onClick:()=>sh(z,"h")},{key:"split-v",icon:o.jsxDEV(p1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1817,columnNumber:39},this),label:M("pane.splitV"),onClick:()=>sh(z,"v")}]]:[],...z.panes>1?[{key:"manage-split",icon:o.jsxDEV(j2,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1822,columnNumber:42},this),label:M("pane.manage"),onClick:()=>fp(z)}]:[],...J&&J.windows.length>1?[[{key:"move-left",label:M("app.moveLeft"),disabled:!v_(J.windows,z.id,"left"),onClick:()=>Zr("left")},{key:"move-right",label:M("app.moveRight"),disabled:!v_(J.windows,z.id,"right"),onClick:()=>Zr("right")}]]:[],{key:"rename",label:M("common.rename"),onClick:()=>{Q({kind:"window",id:z.id,name:z.name||""}),X(null)}},{key:"delete",label:M("app.deleteWindow"),danger:!0,confirm:!0,confirmLabel:J&&J.windows.length<=1?M("app.deleteLastWindowConfirm"):M("app.deleteConfirm"),onClick:Lc}]:[],children:(z==null?void 0:z.panes)===1&&Number.isFinite(z.width)&&o.jsxDEV(TC,{label:M("resize.windowWidth"),cols:z.width,onAdjust:_s,onRestore:Mi,restoreLabel:M("resize.restoreAutoWidth"),restoreDisabled:me>0},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1855,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1805,columnNumber:7},this),o.jsxDEV(qf,{open:!!K,title:M("pane.manageTitle"),subtitle:T6(vh,K),onClose:Wc,actions:K?[{key:"split-h",icon:o.jsxDEV(f1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1871,columnNumber:35},this),label:M("pane.splitH"),onClick:()=>Gn(K,"h")},{key:"split-v",icon:o.jsxDEV(p1,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1872,columnNumber:35},this),label:M("pane.splitV"),onClick:()=>Gn(K,"v")},{key:"close",icon:o.jsxDEV(Gs,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1874,columnNumber:33},this),label:M("pane.close"),danger:!0,confirm:!0,confirmLabel:M("pane.closeConfirm"),onClick:ws}]:[],children:jp&&o.jsxDEV(TC,{label:M("resize.paneWidth"),cols:F,onAdjust:va,onRestore:Er,restoreLabel:M("resize.restoreRatio"),restoreDisabled:!Z||De>0},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1880,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1865,columnNumber:7},this),o.jsxDEV(i6,{open:ke,pane:J==null?void 0:J.paneId,windowId:(Jc=J==null?void 0:J.window)==null?void 0:Jc.id,tabs:ze.tabs,active:ze.active,onActivate:vp,onCloseTab:pp,onMinimize:()=>nt(!1),onOpenDoc:lh,pendingShare:at,onPendingConsumed:()=>Ge(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1890,columnNumber:7},this),o.jsxDEV(o6,{open:xe,pane:J==null?void 0:J.paneId,windowId:(Sh=J==null?void 0:J.window)==null?void 0:Sh.id,inset:Lr,onClose:()=>$e(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1903,columnNumber:7},this),o.jsxDEV(h6,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1906,columnNumber:7},this),o.jsxDEV(OI,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1908,columnNumber:7},this),o.jsxDEV(cO,{browser:Nt,staticPreview:wn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1909,columnNumber:7},this),tt&&o.jsxDEV("div",{className:"doc-toast",role:"alert",onClick:()=>ot(null),children:tt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1911,columnNumber:9},this),bt&&o.jsxDEV("div",{className:"exit-toast",role:"status",children:M("app.backToExit")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1914,columnNumber:9},this),oe&&o.jsxDEV("div",{className:"handoff-toast",role:"status",children:M("chat.slash.handedOff",{cmd:oe})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1917,columnNumber:9},this),Ne&&o.jsxDEV(PC,{path:Ne.path,x:Ne.x,y:Ne.y,onOpen:uh,onClose:()=>Qe(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1920,columnNumber:9},this),ye&&o.jsxDEV(PC,{icon:o.jsxDEV(zd,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1930,columnNumber:17},this),name:M("localurl.title"),path:ye.raw,openLabel:M("localurl.open"),note:_p,x:ye.x,y:ye.y,busy:wp,busyMode:Hc,allowRepeat:!0,modeChoices:!0,proxyAvailable:Nt.proxyAvailable,onOpen:Ga,onClose:dh},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1929,columnNumber:9},this),o.jsxDEV(v6,{open:Lt,session:(Ch=J==null?void 0:J.session)==null?void 0:Ch.name,window:((Eh=J==null?void 0:J.window)==null?void 0:Eh.name)||((Ka=J==null?void 0:J.window)==null?void 0:Ka.id),micAvailable:N,onClose:()=>zt(!1),onSend:ee=>{var de;(de=Cn.current)==null||de.fill(ee),zt(!1)},onCountChange:hr},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1946,columnNumber:7},this),o.jsxDEV(eh,{open:!!Ft,seedCwd:QS(J==null?void 0:J.paneId)??Ro??null,pane:(J==null?void 0:J.paneId)??null,hint:Ft?o.jsxDEV(o.Fragment,{children:[M("app.cannotLocate")," ",o.jsxDEV("code",{children:Ft.rawPath},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1959,columnNumber:54},this),M("app.pickItsDir")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1959,columnNumber:28},this):null,onPick:ch,onClose:()=>Rt(null),inset:Lr},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1955,columnNumber:7},this),J?o.jsxDEV(o.Fragment,{children:[o.jsxDEV(i4,{windows:J.windows,windowAgents:mh,paneAgents:fh,currentAgent:(kl=ce[J.paneId])==null?void 0:kl.agent,currentWindowId:J.window.id,panes:J.panes,currentPaneId:J.paneId,onSelectWindow:Ha,onSelectPane:Mn,onNewWindow:()=>P(!0),onManageWindow:dn,onManagePane:Br,onBeforePaneMapOpen:gi,paneSheetOpen:!!K,openMapFor:q,onMapOpened:()=>fe(null),onPaneMapOpenChange:Oe,trackWindowId:z==null?void 0:z.id,lens:mt,chatLensEnabled:Bc,onLensChange:ee=>{Se(ee),localStorage.setItem("tw_lens_"+J.paneId,ee)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1966,columnNumber:11},this),J.paneId&&(ah?o.jsxDEV(hI,{pane:J.paneId,kind:(Xa=ce[J.paneId])==null?void 0:Xa.kind,msg:(Zc=ce[J.paneId])==null?void 0:Zc.msg,onAuthFail:W,slashEcho:Ie&&Ie.paneId===J.paneId?Ie:null,onSlashEchoDone:()=>Ve(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1991,columnNumber:15},this):o.jsxDEV(DV,{ref:ln,pane:J.paneId,stream:u,snapshotIntervalMs:_,desktop:h,autoFocusInput:!Vn,inset:Lr,onAuthFail:W,onDocLinkTap:bp,onInputFocusChange:Rr,onInputData:he,onRequestDraft:zr,onKeepKeyboard:()=>{var ee,de;return((de=(ee=Cn.current)==null?void 0:ee.keepKeyboardForGesture)==null?void 0:de.call(ee))??!1},onTap:()=>{var ee;h?Hr():(ee=Cn.current)==null||ee.hideKeyboard()}},J.paneId,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1995,columnNumber:15},this)),ah?o.jsxDEV(AB,{pane:J.paneId,desktop:h,kind:(Qc=ce[J.paneId])==null?void 0:Qc.kind,cwd:Ro,onKey:Hi,onAuthFail:W,onSent:Oc,shortcuts:y,micAvailable:N,onInteractiveSlash:ee=>{Se("terminal"),localStorage.setItem("tw_lens_"+J.paneId,"terminal"),Te(ee)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:2019,columnNumber:13},this):o.jsxDEV(EB,{ref:Cn,pane:J.paneId,onAuthFail:W,onKey:Hi,onText:qs,cwd:Ro,agent:(Rl=ce[J.paneId])==null?void 0:Rl.agent,windowId:(jh=J.window)==null?void 0:jh.id,recent:we,favorites:Qt,onSent:Oc,onToggleFav:$a,onRemoveRecent:Vc,inset:Lr,shortcuts:y,micAvailable:N,desktopUnified:h,terminalFocused:An,onLeaveTerminal:()=>{var ee,de;return(de=(ee=ln.current)==null?void 0:ee.blurInput)==null?void 0:de.call(ee)},onReturnToTerminal:Hr},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:2032,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1965,columnNumber:9},this):Pt?o.jsxDEV("div",{className:"loading",children:M("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:2057,columnNumber:9},this):Wt.length===0?o.jsxDEV("button",{className:"empty-cta",onClick:()=>H(!0),children:[M("app.noBoundSession"),o.jsxDEV("span",{children:M("app.tapToBind")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:2060,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:2059,columnNumber:9},this):o.jsxDEV("div",{className:"loading",children:M("app.selectSessionHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:2063,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1671,columnNumber:5},this)}qC(document.getElementById("root")).render(o.jsxDEV(I6,{},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 n=[...document.querySelectorAll('link[rel="stylesheet"]')].filter(l=>l.media==="print"),i=n.length?new Promise(l=>{let h=n.length;n.forEach(x=>x.addEventListener("load",()=>{--h||l()},{once:!0}))}):Promise.resolve();requestAnimationFrame(()=>requestAnimationFrame(()=>i.then(()=>window.__hideBootSplash())))}