clitrigger 0.2.67 → 0.2.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AnalyticsPanel-DQ9grCp0.js → AnalyticsPanel-Dr9Zypd4.js} +1 -1
- package/dist/client/assets/{CalendarGrid-Fk99r9nq.js → CalendarGrid-BRVf7WJK.js} +1 -1
- package/dist/client/assets/{DiscussionDetail-HcG3ohsQ.js → DiscussionDetail-DetjETsr.js} +4 -4
- package/dist/client/assets/{DiscussionForm-BZfnK2EV.js → DiscussionForm-Bi4L47Ly.js} +1 -1
- package/dist/client/assets/{EmptyState-GADfcNs7.js → EmptyState--9RqKIk6.js} +1 -1
- package/dist/client/assets/{FloatingComposerController-5A3GJtK4-CTCqYxNF.js → FloatingComposerController-5A3GJtK4-85zrcVy6.js} +1 -1
- package/dist/client/assets/{LogViewer-Di7SxByZ.js → LogViewer-BDuckIDB.js} +1 -1
- package/dist/client/assets/{MarkdownContent-WshMOH5P.js → MarkdownContent-CwGbW814.js} +1 -1
- package/dist/client/assets/{PersonalAgenda-DrfVGibs.js → PersonalAgenda-JNpWPEDQ.js} +3 -3
- package/dist/client/assets/{PlannerPageEditor-B2m5SwtT.js → PlannerPageEditor-9_jJ-l98.js} +3 -3
- package/dist/client/assets/ProjectDetail-DwN6S3uf.js +183 -0
- package/dist/client/assets/{ProjectList-D2tf2Kfp.js → ProjectList-LeZ7mrEM.js} +1 -1
- package/dist/client/assets/{ReviewQueue-UrhgwrGk.js → ReviewQueue-DzTHqZdO.js} +1 -1
- package/dist/client/assets/{TaskGraph-Bp62pL5V.js → TaskGraph-BrHxqYJn.js} +1 -1
- package/dist/client/assets/{VaultLayout-ClyLfQdP.js → VaultLayout-DftlF-Gd.js} +1 -1
- package/dist/client/assets/{folder-git-2-CntWBh-U.js → folder-git-2-DocDG5LN.js} +1 -1
- package/dist/client/assets/index--CryAcdA.js +427 -0
- package/dist/client/assets/index-xIZH9sMw.css +32 -0
- package/dist/client/assets/{rotate-ccw-DRnyCt5y.js → rotate-ccw-CY6Wl56G.js} +1 -1
- package/dist/client/assets/{style-DcT-60Dn.js → style-D7Mv0Jex.js} +1 -1
- package/dist/client/assets/{with-selector-QmxTx8WM.js → with-selector-bSOP5zTp.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/services/cli-adapters.js +1 -1
- package/dist/server/services/cli-adapters.js.map +1 -1
- package/dist/server/services/cli-status.d.ts.map +1 -1
- package/dist/server/services/cli-status.js +12 -1
- package/dist/server/services/cli-status.js.map +1 -1
- package/package.json +1 -1
- package/dist/client/assets/ProjectDetail-B96iIeaz.js +0 -183
- package/dist/client/assets/index-DB7C6wx1.js +0 -427
- package/dist/client/assets/index-gug7OXWO.css +0 -32
|
@@ -1,427 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProjectList-D2tf2Kfp.js","assets/EmptyState-GADfcNs7.js","assets/ProjectDetail-B96iIeaz.js","assets/CalendarGrid-Fk99r9nq.js","assets/LogViewer-Di7SxByZ.js","assets/MarkdownContent-WshMOH5P.js","assets/DiscussionForm-BZfnK2EV.js","assets/rotate-ccw-DRnyCt5y.js","assets/DiscussionDetail-HcG3ohsQ.js","assets/ReviewQueue-UrhgwrGk.js","assets/folder-git-2-CntWBh-U.js","assets/PersonalAgenda-DrfVGibs.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var zb=Object.defineProperty;var Hb=(s,h,w)=>h in s?zb(s,h,{enumerable:!0,configurable:!0,writable:!0,value:w}):s[h]=w;var jm=(s,h,w)=>Hb(s,typeof h!="symbol"?h+"":h,w);function Pb(s,h){for(var w=0;w<h.length;w++){const S=h[w];if(typeof S!="string"&&!Array.isArray(S)){for(const M in S)if(M!=="default"&&!(M in s)){const O=Object.getOwnPropertyDescriptor(S,M);O&&Object.defineProperty(s,M,O.get?O:{enumerable:!0,get:()=>S[M]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}(function(){const h=document.createElement("link").relList;if(h&&h.supports&&h.supports("modulepreload"))return;for(const M of document.querySelectorAll('link[rel="modulepreload"]'))S(M);new MutationObserver(M=>{for(const O of M)if(O.type==="childList")for(const A of O.addedNodes)A.tagName==="LINK"&&A.rel==="modulepreload"&&S(A)}).observe(document,{childList:!0,subtree:!0});function w(M){const O={};return M.integrity&&(O.integrity=M.integrity),M.referrerPolicy&&(O.referrerPolicy=M.referrerPolicy),M.crossOrigin==="use-credentials"?O.credentials="include":M.crossOrigin==="anonymous"?O.credentials="omit":O.credentials="same-origin",O}function S(M){if(M.ep)return;M.ep=!0;const O=w(M);fetch(M.href,O)}})();var K2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var zu={exports:{}},ma={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react-jsx-runtime.production.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var Om;function Ib(){if(Om)return ma;Om=1;var s=Symbol.for("react.transitional.element"),h=Symbol.for("react.fragment");function w(S,M,O){var A=null;if(O!==void 0&&(A=""+O),M.key!==void 0&&(A=""+M.key),"key"in M){O={};for(var r in M)r!=="key"&&(O[r]=M[r])}else O=M;return M=O.ref,{$$typeof:s,type:S,key:A,ref:M!==void 0?M:null,props:O}}return ma.Fragment=h,ma.jsx=w,ma.jsxs=w,ma}var Bm;function Fb(){return Bm||(Bm=1,zu.exports=Ib()),zu.exports}var v=Fb(),Hu={exports:{}},ft={};/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react.production.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var Nm;function Ub(){if(Nm)return ft;Nm=1;var s=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),A=Symbol.for("react.context"),r=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),l=Symbol.for("react.activity"),m=Symbol.iterator;function b(B){return B===null||typeof B!="object"?null:(B=m&&B[m]||B["@@iterator"],typeof B=="function"?B:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,a={};function c(B,W,ee){this.props=B,this.context=W,this.refs=a,this.updater=ee||C}c.prototype.isReactComponent={},c.prototype.setState=function(B,W){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,W,"setState")},c.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function o(){}o.prototype=c.prototype;function f(B,W,ee){this.props=B,this.context=W,this.refs=a,this.updater=ee||C}var y=f.prototype=new o;y.constructor=f,p(y,c.prototype),y.isPureReactComponent=!0;var R=Array.isArray;function k(){}var D={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function L(B,W,ee){var ne=ee.ref;return{$$typeof:s,type:B,key:W,ref:ne!==void 0?ne:null,props:ee}}function z(B,W){return L(B.type,W,B.props)}function H(B){return typeof B=="object"&&B!==null&&B.$$typeof===s}function P(B){var W={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(ee){return W[ee]})}var I=/\/+/g;function K(B,W){return typeof B=="object"&&B!==null&&B.key!=null?P(""+B.key):W.toString(36)}function X(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(k,k):(B.status="pending",B.then(function(W){B.status==="pending"&&(B.status="fulfilled",B.value=W)},function(W){B.status==="pending"&&(B.status="rejected",B.reason=W)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function Y(B,W,ee,ne,pe){var ke=typeof B;(ke==="undefined"||ke==="boolean")&&(B=null);var Q=!1;if(B===null)Q=!0;else switch(ke){case"bigint":case"string":case"number":Q=!0;break;case"object":switch(B.$$typeof){case s:case h:Q=!0;break;case g:return Q=B._init,Y(Q(B._payload),W,ee,ne,pe)}}if(Q)return pe=pe(B),Q=ne===""?"."+K(B,0):ne,R(pe)?(ee="",Q!=null&&(ee=Q.replace(I,"$&/")+"/"),Y(pe,W,ee,"",function(ae){return ae})):pe!=null&&(H(pe)&&(pe=z(pe,ee+(pe.key==null||B&&B.key===pe.key?"":(""+pe.key).replace(I,"$&/")+"/")+Q)),W.push(pe)),1;Q=0;var G=ne===""?".":ne+":";if(R(B))for(var he=0;he<B.length;he++)ne=B[he],ke=G+K(ne,he),Q+=Y(ne,W,ee,ke,pe);else if(he=b(B),typeof he=="function")for(B=he.call(B),he=0;!(ne=B.next()).done;)ne=ne.value,ke=G+K(ne,he++),Q+=Y(ne,W,ee,ke,pe);else if(ke==="object"){if(typeof B.then=="function")return Y(X(B),W,ee,ne,pe);throw W=String(B),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return Q}function $(B,W,ee){if(B==null)return B;var ne=[],pe=0;return Y(B,ne,"","",function(ke){return W.call(ee,ke,pe++)}),ne}function U(B){if(B._status===-1){var W=B._result;W=W(),W.then(function(ee){(B._status===0||B._status===-1)&&(B._status=1,B._result=ee)},function(ee){(B._status===0||B._status===-1)&&(B._status=2,B._result=ee)}),B._status===-1&&(B._status=0,B._result=W)}if(B._status===1)return B._result.default;throw B._result}var T=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},F={map:$,forEach:function(B,W,ee){$(B,function(){W.apply(this,arguments)},ee)},count:function(B){var W=0;return $(B,function(){W++}),W},toArray:function(B){return $(B,function(W){return W})||[]},only:function(B){if(!H(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return ft.Activity=l,ft.Children=F,ft.Component=c,ft.Fragment=w,ft.Profiler=M,ft.PureComponent=f,ft.StrictMode=S,ft.Suspense=u,ft.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,ft.__COMPILER_RUNTIME={__proto__:null,c:function(B){return D.H.useMemoCache(B)}},ft.cache=function(B){return function(){return B.apply(null,arguments)}},ft.cacheSignal=function(){return null},ft.cloneElement=function(B,W,ee){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var ne=p({},B.props),pe=B.key;if(W!=null)for(ke in W.key!==void 0&&(pe=""+W.key),W)!E.call(W,ke)||ke==="key"||ke==="__self"||ke==="__source"||ke==="ref"&&W.ref===void 0||(ne[ke]=W[ke]);var ke=arguments.length-2;if(ke===1)ne.children=ee;else if(1<ke){for(var Q=Array(ke),G=0;G<ke;G++)Q[G]=arguments[G+2];ne.children=Q}return L(B.type,pe,ne)},ft.createContext=function(B){return B={$$typeof:A,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:O,_context:B},B},ft.createElement=function(B,W,ee){var ne,pe={},ke=null;if(W!=null)for(ne in W.key!==void 0&&(ke=""+W.key),W)E.call(W,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(pe[ne]=W[ne]);var Q=arguments.length-2;if(Q===1)pe.children=ee;else if(1<Q){for(var G=Array(Q),he=0;he<Q;he++)G[he]=arguments[he+2];pe.children=G}if(B&&B.defaultProps)for(ne in Q=B.defaultProps,Q)pe[ne]===void 0&&(pe[ne]=Q[ne]);return L(B,ke,pe)},ft.createRef=function(){return{current:null}},ft.forwardRef=function(B){return{$$typeof:r,render:B}},ft.isValidElement=H,ft.lazy=function(B){return{$$typeof:g,_payload:{_status:-1,_result:B},_init:U}},ft.memo=function(B,W){return{$$typeof:d,type:B,compare:W===void 0?null:W}},ft.startTransition=function(B){var W=D.T,ee={};D.T=ee;try{var ne=B(),pe=D.S;pe!==null&&pe(ee,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(k,T)}catch(ke){T(ke)}finally{W!==null&&ee.types!==null&&(W.types=ee.types),D.T=W}},ft.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},ft.use=function(B){return D.H.use(B)},ft.useActionState=function(B,W,ee){return D.H.useActionState(B,W,ee)},ft.useCallback=function(B,W){return D.H.useCallback(B,W)},ft.useContext=function(B){return D.H.useContext(B)},ft.useDebugValue=function(){},ft.useDeferredValue=function(B,W){return D.H.useDeferredValue(B,W)},ft.useEffect=function(B,W){return D.H.useEffect(B,W)},ft.useEffectEvent=function(B){return D.H.useEffectEvent(B)},ft.useId=function(){return D.H.useId()},ft.useImperativeHandle=function(B,W,ee){return D.H.useImperativeHandle(B,W,ee)},ft.useInsertionEffect=function(B,W){return D.H.useInsertionEffect(B,W)},ft.useLayoutEffect=function(B,W){return D.H.useLayoutEffect(B,W)},ft.useMemo=function(B,W){return D.H.useMemo(B,W)},ft.useOptimistic=function(B,W){return D.H.useOptimistic(B,W)},ft.useReducer=function(B,W,ee){return D.H.useReducer(B,W,ee)},ft.useRef=function(B){return D.H.useRef(B)},ft.useState=function(B){return D.H.useState(B)},ft.useSyncExternalStore=function(B,W,ee){return D.H.useSyncExternalStore(B,W,ee)},ft.useTransition=function(){return D.H.useTransition()},ft.version="19.2.4",ft}var zm;function wh(){return zm||(zm=1,Hu.exports=Ub()),Hu.exports}var j=wh();const tv=yh(j),X2=Pb({__proto__:null,default:tv},[j]);var Pu={exports:{}},ga={},Iu={exports:{}},Fu={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.production.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var Hm;function $b(){return Hm||(Hm=1,(function(s){function h(Y,$){var U=Y.length;Y.push($);e:for(;0<U;){var T=U-1>>>1,F=Y[T];if(0<M(F,$))Y[T]=$,Y[U]=F,U=T;else break e}}function w(Y){return Y.length===0?null:Y[0]}function S(Y){if(Y.length===0)return null;var $=Y[0],U=Y.pop();if(U!==$){Y[0]=U;e:for(var T=0,F=Y.length,B=F>>>1;T<B;){var W=2*(T+1)-1,ee=Y[W],ne=W+1,pe=Y[ne];if(0>M(ee,U))ne<F&&0>M(pe,ee)?(Y[T]=pe,Y[ne]=U,T=ne):(Y[T]=ee,Y[W]=U,T=W);else if(ne<F&&0>M(pe,U))Y[T]=pe,Y[ne]=U,T=ne;else break e}}return $}function M(Y,$){var U=Y.sortIndex-$.sortIndex;return U!==0?U:Y.id-$.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var O=performance;s.unstable_now=function(){return O.now()}}else{var A=Date,r=A.now();s.unstable_now=function(){return A.now()-r}}var u=[],d=[],g=1,l=null,m=3,b=!1,C=!1,p=!1,a=!1,c=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;function y(Y){for(var $=w(d);$!==null;){if($.callback===null)S(d);else if($.startTime<=Y)S(d),$.sortIndex=$.expirationTime,h(u,$);else break;$=w(d)}}function R(Y){if(p=!1,y(Y),!C)if(w(u)!==null)C=!0,k||(k=!0,P());else{var $=w(d);$!==null&&X(R,$.startTime-Y)}}var k=!1,D=-1,E=5,L=-1;function z(){return a?!0:!(s.unstable_now()-L<E)}function H(){if(a=!1,k){var Y=s.unstable_now();L=Y;var $=!0;try{e:{C=!1,p&&(p=!1,o(D),D=-1),b=!0;var U=m;try{t:{for(y(Y),l=w(u);l!==null&&!(l.expirationTime>Y&&z());){var T=l.callback;if(typeof T=="function"){l.callback=null,m=l.priorityLevel;var F=T(l.expirationTime<=Y);if(Y=s.unstable_now(),typeof F=="function"){l.callback=F,y(Y),$=!0;break t}l===w(u)&&S(u),y(Y)}else S(u);l=w(u)}if(l!==null)$=!0;else{var B=w(d);B!==null&&X(R,B.startTime-Y),$=!1}}break e}finally{l=null,m=U,b=!1}$=void 0}}finally{$?P():k=!1}}}var P;if(typeof f=="function")P=function(){f(H)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,K=I.port2;I.port1.onmessage=H,P=function(){K.postMessage(null)}}else P=function(){c(H,0)};function X(Y,$){D=c(function(){Y(s.unstable_now())},$)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(Y){Y.callback=null},s.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<Y?Math.floor(1e3/Y):5},s.unstable_getCurrentPriorityLevel=function(){return m},s.unstable_next=function(Y){switch(m){case 1:case 2:case 3:var $=3;break;default:$=m}var U=m;m=$;try{return Y()}finally{m=U}},s.unstable_requestPaint=function(){a=!0},s.unstable_runWithPriority=function(Y,$){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var U=m;m=Y;try{return $()}finally{m=U}},s.unstable_scheduleCallback=function(Y,$,U){var T=s.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?T+U:T):U=T,Y){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=U+F,Y={id:g++,callback:$,priorityLevel:Y,startTime:U,expirationTime:F,sortIndex:-1},U>T?(Y.sortIndex=U,h(d,Y),w(u)===null&&Y===w(d)&&(p?(o(D),D=-1):p=!0,X(R,U-T))):(Y.sortIndex=F,h(u,Y),C||b||(C=!0,k||(k=!0,P()))),Y},s.unstable_shouldYield=z,s.unstable_wrapCallback=function(Y){var $=m;return function(){var U=m;m=$;try{return Y.apply(this,arguments)}finally{m=U}}}})(Fu)),Fu}var Pm;function Wb(){return Pm||(Pm=1,Iu.exports=$b()),Iu.exports}var Uu={exports:{}},gi={};/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.production.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var Im;function qb(){if(Im)return gi;Im=1;var s=wh();function h(u){var d="https://react.dev/errors/"+u;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)d+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+u+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function w(){}var S={d:{f:w,r:function(){throw Error(h(522))},D:w,C:w,L:w,m:w,X:w,S:w,M:w},p:0,findDOMNode:null},M=Symbol.for("react.portal");function O(u,d,g){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:l==null?null:""+l,children:u,containerInfo:d,implementation:g}}var A=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function r(u,d){if(u==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return gi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,gi.createPortal=function(u,d){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(h(299));return O(u,d,null,g)},gi.flushSync=function(u){var d=A.T,g=S.p;try{if(A.T=null,S.p=2,u)return u()}finally{A.T=d,S.p=g,S.d.f()}},gi.preconnect=function(u,d){typeof u=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,S.d.C(u,d))},gi.prefetchDNS=function(u){typeof u=="string"&&S.d.D(u)},gi.preinit=function(u,d){if(typeof u=="string"&&d&&typeof d.as=="string"){var g=d.as,l=r(g,d.crossOrigin),m=typeof d.integrity=="string"?d.integrity:void 0,b=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;g==="style"?S.d.S(u,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:l,integrity:m,fetchPriority:b}):g==="script"&&S.d.X(u,{crossOrigin:l,integrity:m,fetchPriority:b,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},gi.preinitModule=function(u,d){if(typeof u=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var g=r(d.as,d.crossOrigin);S.d.M(u,{crossOrigin:g,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&S.d.M(u)},gi.preload=function(u,d){if(typeof u=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var g=d.as,l=r(g,d.crossOrigin);S.d.L(u,g,{crossOrigin:l,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},gi.preloadModule=function(u,d){if(typeof u=="string")if(d){var g=r(d.as,d.crossOrigin);S.d.m(u,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:g,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else S.d.m(u)},gi.requestFormReset=function(u){S.d.r(u)},gi.unstable_batchedUpdates=function(u,d){return u(d)},gi.useFormState=function(u,d,g){return A.H.useFormState(u,d,g)},gi.useFormStatus=function(){return A.H.useHostTransitionStatus()},gi.version="19.2.4",gi}var Fm;function iv(){if(Fm)return Uu.exports;Fm=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(h){console.error(h)}}return s(),Uu.exports=qb(),Uu.exports}/**
|
|
35
|
-
* @license React
|
|
36
|
-
* react-dom-client.production.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var Um;function Gb(){if(Um)return ga;Um=1;var s=Wb(),h=wh(),w=iv();function S(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function M(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function O(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function A(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function r(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(O(e)!==e)throw Error(S(188))}function d(e){var t=e.alternate;if(!t){if(t=O(e),t===null)throw Error(S(188));return t!==e?null:e}for(var i=e,n=t;;){var _=i.return;if(_===null)break;var x=_.alternate;if(x===null){if(n=_.return,n!==null){i=n;continue}break}if(_.child===x.child){for(x=_.child;x;){if(x===i)return u(_),e;if(x===n)return u(_),t;x=x.sibling}throw Error(S(188))}if(i.return!==n.return)i=_,n=x;else{for(var N=!1,q=_.child;q;){if(q===i){N=!0,i=_,n=x;break}if(q===n){N=!0,n=_,i=x;break}q=q.sibling}if(!N){for(q=x.child;q;){if(q===i){N=!0,i=x,n=_;break}if(q===n){N=!0,n=x,i=_;break}q=q.sibling}if(!N)throw Error(S(189))}}if(i.alternate!==n)throw Error(S(190))}if(i.tag!==3)throw Error(S(188));return i.stateNode.current===i?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var l=Object.assign,m=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),f=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function P(e){return e===null||typeof e!="object"?null:(e=H&&e[H]||e["@@iterator"],typeof e=="function"?e:null)}var I=Symbol.for("react.client.reference");function K(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===I?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case p:return"Fragment";case c:return"Profiler";case a:return"StrictMode";case R:return"Suspense";case k:return"SuspenseList";case L:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case f:return e.displayName||"Context";case o:return(e._context.displayName||"Context")+".Consumer";case y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case D:return t=e.displayName||null,t!==null?t:K(e.type)||"Memo";case E:t=e._payload,e=e._init;try{return K(e(t))}catch{}}return null}var X=Array.isArray,Y=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=w.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U={pending:!1,data:null,method:null,action:null},T=[],F=-1;function B(e){return{current:e}}function W(e){0>F||(e.current=T[F],T[F]=null,F--)}function ee(e,t){F++,T[F]=e.current,e.current=t}var ne=B(null),pe=B(null),ke=B(null),Q=B(null);function G(e,t){switch(ee(ke,t),ee(pe,e),ee(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?im(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=im(t),e=sm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}W(ne),ee(ne,e)}function he(){W(ne),W(pe),W(ke)}function ae(e){e.memoizedState!==null&&ee(Q,e);var t=ne.current,i=sm(t,e.type);t!==i&&(ee(pe,e),ee(ne,i))}function Ae(e){pe.current===e&&(W(ne),W(pe)),Q.current===e&&(W(Q),ha._currentValue=U)}var Oe,Ye;function $e(e){if(Oe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Oe=t&&t[1]||"",Ye=-1<i.stack.indexOf(`
|
|
43
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+Oe+e+Ye}var at=!1;function ye(e,t){if(!e||at)return"";at=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var De=function(){throw Error()};if(Object.defineProperty(De.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(De,[])}catch(we){var ge=we}Reflect.construct(e,[],De)}else{try{De.call()}catch(we){ge=we}e.call(De.prototype)}}else{try{throw Error()}catch(we){ge=we}(De=e())&&typeof De.catch=="function"&&De.catch(function(){})}}catch(we){if(we&&ge&&typeof we.stack=="string")return[we.stack,ge.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=n.DetermineComponentFrameRoot(),N=x[0],q=x[1];if(N&&q){var se=N.split(`
|
|
45
|
-
`),fe=q.split(`
|
|
46
|
-
`);for(_=n=0;n<se.length&&!se[n].includes("DetermineComponentFrameRoot");)n++;for(;_<fe.length&&!fe[_].includes("DetermineComponentFrameRoot");)_++;if(n===se.length||_===fe.length)for(n=se.length-1,_=fe.length-1;1<=n&&0<=_&&se[n]!==fe[_];)_--;for(;1<=n&&0<=_;n--,_--)if(se[n]!==fe[_]){if(n!==1||_!==1)do if(n--,_--,0>_||se[n]!==fe[_]){var Le=`
|
|
47
|
-
`+se[n].replace(" at new "," at ");return e.displayName&&Le.includes("<anonymous>")&&(Le=Le.replace("<anonymous>",e.displayName)),Le}while(1<=n&&0<=_);break}}}finally{at=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?$e(i):""}function Te(e,t){switch(e.tag){case 26:case 27:case 5:return $e(e.type);case 16:return $e("Lazy");case 13:return e.child!==t&&t!==null?$e("Suspense Fallback"):$e("Suspense");case 19:return $e("SuspenseList");case 0:case 15:return ye(e.type,!1);case 11:return ye(e.type.render,!1);case 1:return ye(e.type,!0);case 31:return $e("Activity");default:return""}}function ut(e){try{var t="",i=null;do t+=Te(e,i),i=e,e=e.return;while(e);return t}catch(n){return`
|
|
48
|
-
Error generating stack: `+n.message+`
|
|
49
|
-
`+n.stack}}var tt=Object.prototype.hasOwnProperty,He=s.unstable_scheduleCallback,We=s.unstable_cancelCallback,Fe=s.unstable_shouldYield,Be=s.unstable_requestPaint,Ue=s.unstable_now,ct=s.unstable_getCurrentPriorityLevel,it=s.unstable_ImmediatePriority,St=s.unstable_UserBlockingPriority,Ce=s.unstable_NormalPriority,Ie=s.unstable_LowPriority,ce=s.unstable_IdlePriority,ze=s.log,je=s.unstable_setDisableYieldValue,le=null,ie=null;function _e(e){if(typeof ze=="function"&&je(e),ie&&typeof ie.setStrictMode=="function")try{ie.setStrictMode(le,e)}catch{}}var ue=Math.clz32?Math.clz32:J,Pe=Math.log,Me=Math.LN2;function J(e){return e>>>=0,e===0?32:31-(Pe(e)/Me|0)|0}var Z=256,te=262144,V=4194304;function xe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function me(e,t,i){var n=e.pendingLanes;if(n===0)return 0;var _=0,x=e.suspendedLanes,N=e.pingedLanes;e=e.warmLanes;var q=n&134217727;return q!==0?(n=q&~x,n!==0?_=xe(n):(N&=q,N!==0?_=xe(N):i||(i=q&~e,i!==0&&(_=xe(i))))):(q=n&~x,q!==0?_=xe(q):N!==0?_=xe(N):i||(i=n&~e,i!==0&&(_=xe(i)))),_===0?0:t!==0&&t!==_&&(t&x)===0&&(x=_&-_,i=t&-t,x>=i||x===32&&(i&4194048)!==0)?t:_}function ve(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Se(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ne(){var e=V;return V<<=1,(V&62914560)===0&&(V=4194304),e}function qe(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Xe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(e,t,i,n,_,x){var N=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var q=e.entanglements,se=e.expirationTimes,fe=e.hiddenUpdates;for(i=N&~i;0<i;){var Le=31-ue(i),De=1<<Le;q[Le]=0,se[Le]=-1;var ge=fe[Le];if(ge!==null)for(fe[Le]=null,Le=0;Le<ge.length;Le++){var we=ge[Le];we!==null&&(we.lane&=-536870913)}i&=~De}n!==0&&Je(e,n,0),x!==0&&_===0&&e.tag!==0&&(e.suspendedLanes|=x&~(N&~t))}function Je(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-ue(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|i&261930}function bt(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var n=31-ue(i),_=1<<n;_&t|e[n]&t&&(e[n]|=t),i&=~_}}function Et(e,t){var i=t&-t;return i=(i&42)!==0?1:ht(i),(i&(e.suspendedLanes|t))!==0?0:i}function ht(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function $t(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ot(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:Em(e.type))}function ot(e,t){var i=$.p;try{return $.p=e,t()}finally{$.p=i}}var st=Math.random().toString(36).slice(2),be="__reactFiber$"+st,nt="__reactProps$"+st,dt="__reactContainer$"+st,Wt="__reactEvents$"+st,oi="__reactListeners$"+st,Lt="__reactHandles$"+st,Gt="__reactResources$"+st,Kt="__reactMarker$"+st;function bi(e){delete e[be],delete e[nt],delete e[Wt],delete e[oi],delete e[Lt]}function pi(e){var t=e[be];if(t)return t;for(var i=e.parentNode;i;){if(t=i[dt]||i[be]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=um(e);e!==null;){if(i=e[be])return i;e=um(e)}return t}e=i,i=e.parentNode}return null}function Vi(e){if(e=e[be]||e[dt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function mi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(S(33))}function Jt(e){var t=e[Gt];return t||(t=e[Gt]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Qt(e){e[Kt]=!0}var Er=new Set,Lr={};function vi(e,t){An(e,t),An(e+"Capture",t)}function An(e,t){for(Lr[e]=t,e=0;e<t.length;e++)Er.add(t[e])}var R_=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),qh={},Gh={};function D_(e){return tt.call(Gh,e)?!0:tt.call(qh,e)?!1:R_.test(e)?Gh[e]=!0:(qh[e]=!0,!1)}function Ha(e,t,i){if(D_(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function Pa(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function hs(e,t,i,n){if(n===null)e.removeAttribute(i);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+n)}}function Hi(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function T_(e,t,i){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var _=n.get,x=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return _.call(this)},set:function(N){i=""+N,x.call(this,N)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(N){i=""+N},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Tl(e){if(!e._valueTracker){var t=Yh(e)?"checked":"value";e._valueTracker=T_(e,t,""+e[t])}}function Kh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),n="";return e&&(n=Yh(e)?e.checked?"true":"false":e.value),e=n,e!==i?(t.setValue(e),!0):!1}function Ia(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 M_=/[\n"\\]/g;function Pi(e){return e.replace(M_,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ml(e,t,i,n,_,x,N,q){e.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?e.type=N:e.removeAttribute("type"),t!=null?N==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Hi(t)):e.value!==""+Hi(t)&&(e.value=""+Hi(t)):N!=="submit"&&N!=="reset"||e.removeAttribute("value"),t!=null?Al(e,N,Hi(t)):i!=null?Al(e,N,Hi(i)):n!=null&&e.removeAttribute("value"),_==null&&x!=null&&(e.defaultChecked=!!x),_!=null&&(e.checked=_&&typeof _!="function"&&typeof _!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?e.name=""+Hi(q):e.removeAttribute("name")}function Xh(e,t,i,n,_,x,N,q){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.type=x),t!=null||i!=null){if(!(x!=="submit"&&x!=="reset"||t!=null)){Tl(e);return}i=i!=null?""+Hi(i):"",t=t!=null?""+Hi(t):i,q||t===e.value||(e.value=t),e.defaultValue=t}n=n??_,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=q?e.checked:!!n,e.defaultChecked=!!n,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(e.name=N),Tl(e)}function Al(e,t,i){t==="number"&&Ia(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function jn(e,t,i,n){if(e=e.options,t){t={};for(var _=0;_<i.length;_++)t["$"+i[_]]=!0;for(i=0;i<e.length;i++)_=t.hasOwnProperty("$"+e[i].value),e[i].selected!==_&&(e[i].selected=_),_&&n&&(e[i].defaultSelected=!0)}else{for(i=""+Hi(i),t=null,_=0;_<e.length;_++){if(e[_].value===i){e[_].selected=!0,n&&(e[_].defaultSelected=!0);return}t!==null||e[_].disabled||(t=e[_])}t!==null&&(t.selected=!0)}}function Vh(e,t,i){if(t!=null&&(t=""+Hi(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Hi(i):""}function Jh(e,t,i,n){if(t==null){if(n!=null){if(i!=null)throw Error(S(92));if(X(n)){if(1<n.length)throw Error(S(93));n=n[0]}i=n}i==null&&(i=""),t=i}i=Hi(t),e.defaultValue=i,n=e.textContent,n===i&&n!==""&&n!==null&&(e.value=n),Tl(e)}function On(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var A_=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Qh(e,t,i){var n=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,i):typeof i!="number"||i===0||A_.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Zh(e,t,i){if(t!=null&&typeof t!="object")throw Error(S(62));if(e=e.style,i!=null){for(var n in i)!i.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var _ in t)n=t[_],t.hasOwnProperty(_)&&i[_]!==n&&Qh(e,_,n)}else for(var x in t)t.hasOwnProperty(x)&&Qh(e,x,t[x])}function jl(e){if(e.indexOf("-")===-1)return!1;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 j_=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),O_=/^[\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;function Fa(e){return O_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ds(){}var Ol=null;function Bl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Bn=null,Nn=null;function ed(e){var t=Vi(e);if(t&&(e=t.stateNode)){var i=e[nt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ml(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Pi(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var n=i[t];if(n!==e&&n.form===e.form){var _=n[nt]||null;if(!_)throw Error(S(90));Ml(n,_.value,_.defaultValue,_.defaultValue,_.checked,_.defaultChecked,_.type,_.name)}}for(t=0;t<i.length;t++)n=i[t],n.form===e.form&&Kh(n)}break e;case"textarea":Vh(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&jn(e,!!i.multiple,t,!1)}}}var Nl=!1;function td(e,t,i){if(Nl)return e(t,i);Nl=!0;try{var n=e(t);return n}finally{if(Nl=!1,(Bn!==null||Nn!==null)&&(Do(),Bn&&(t=Bn,e=Nn,Nn=Bn=null,ed(t),e)))for(t=0;t<e.length;t++)ed(e[t])}}function Rr(e,t){var i=e.stateNode;if(i===null)return null;var n=i[nt]||null;if(n===null)return null;i=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(S(231,t,typeof i));return i}var fs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zl=!1;if(fs)try{var Dr={};Object.defineProperty(Dr,"passive",{get:function(){zl=!0}}),window.addEventListener("test",Dr,Dr),window.removeEventListener("test",Dr,Dr)}catch{zl=!1}var As=null,Hl=null,Ua=null;function id(){if(Ua)return Ua;var e,t=Hl,i=t.length,n,_="value"in As?As.value:As.textContent,x=_.length;for(e=0;e<i&&t[e]===_[e];e++);var N=i-e;for(n=1;n<=N&&t[i-n]===_[x-n];n++);return Ua=_.slice(e,1<n?1-n:void 0)}function $a(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Wa(){return!0}function sd(){return!1}function yi(e){function t(i,n,_,x,N){this._reactName=i,this._targetInst=_,this.type=n,this.nativeEvent=x,this.target=N,this.currentTarget=null;for(var q in e)e.hasOwnProperty(q)&&(i=e[q],this[q]=i?i(x):x[q]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?Wa:sd,this.isPropagationStopped=sd,this}return l(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Wa)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Wa)},persist:function(){},isPersistent:Wa}),t}var un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qa=yi(un),Tr=l({},un,{view:0,detail:0}),B_=yi(Tr),Pl,Il,Mr,Ga=l({},Tr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ul,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Mr&&(Mr&&e.type==="mousemove"?(Pl=e.screenX-Mr.screenX,Il=e.screenY-Mr.screenY):Il=Pl=0,Mr=e),Pl)},movementY:function(e){return"movementY"in e?e.movementY:Il}}),nd=yi(Ga),N_=l({},Ga,{dataTransfer:0}),z_=yi(N_),H_=l({},Tr,{relatedTarget:0}),Fl=yi(H_),P_=l({},un,{animationName:0,elapsedTime:0,pseudoElement:0}),I_=yi(P_),F_=l({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),U_=yi(F_),$_=l({},un,{data:0}),rd=yi($_),W_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},q_={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"},G_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Y_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=G_[e])?!!t[e]:!1}function Ul(){return Y_}var K_=l({},Tr,{key:function(e){if(e.key){var t=W_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$a(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?q_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ul,charCode:function(e){return e.type==="keypress"?$a(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$a(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),X_=yi(K_),V_=l({},Ga,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ad=yi(V_),J_=l({},Tr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ul}),Q_=yi(J_),Z_=l({},un,{propertyName:0,elapsedTime:0,pseudoElement:0}),e0=yi(Z_),t0=l({},Ga,{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}),i0=yi(t0),s0=l({},un,{newState:0,oldState:0}),n0=yi(s0),r0=[9,13,27,32],$l=fs&&"CompositionEvent"in window,Ar=null;fs&&"documentMode"in document&&(Ar=document.documentMode);var a0=fs&&"TextEvent"in window&&!Ar,od=fs&&(!$l||Ar&&8<Ar&&11>=Ar),ld=" ",cd=!1;function ud(e,t){switch(e){case"keyup":return r0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zn=!1;function o0(e,t){switch(e){case"compositionend":return hd(t);case"keypress":return t.which!==32?null:(cd=!0,ld);case"textInput":return e=t.data,e===ld&&cd?null:e;default:return null}}function l0(e,t){if(zn)return e==="compositionend"||!$l&&ud(e,t)?(e=id(),Ua=Hl=As=null,zn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return od&&t.locale!=="ko"?null:t.data;default:return null}}var c0={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 dd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!c0[e.type]:t==="textarea"}function fd(e,t,i,n){Bn?Nn?Nn.push(n):Nn=[n]:Bn=n,t=No(t,"onChange"),0<t.length&&(i=new qa("onChange","change",null,i,n),e.push({event:i,listeners:t}))}var jr=null,Or=null;function u0(e){Vp(e,0)}function Ya(e){var t=mi(e);if(Kh(t))return e}function pd(e,t){if(e==="change")return t}var md=!1;if(fs){var Wl;if(fs){var ql="oninput"in document;if(!ql){var gd=document.createElement("div");gd.setAttribute("oninput","return;"),ql=typeof gd.oninput=="function"}Wl=ql}else Wl=!1;md=Wl&&(!document.documentMode||9<document.documentMode)}function vd(){jr&&(jr.detachEvent("onpropertychange",_d),Or=jr=null)}function _d(e){if(e.propertyName==="value"&&Ya(Or)){var t=[];fd(t,Or,e,Bl(e)),td(u0,t)}}function h0(e,t,i){e==="focusin"?(vd(),jr=t,Or=i,jr.attachEvent("onpropertychange",_d)):e==="focusout"&&vd()}function d0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ya(Or)}function f0(e,t){if(e==="click")return Ya(t)}function p0(e,t){if(e==="input"||e==="change")return Ya(t)}function m0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ti=typeof Object.is=="function"?Object.is:m0;function Br(e,t){if(Ti(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;for(n=0;n<i.length;n++){var _=i[n];if(!tt.call(t,_)||!Ti(e[_],t[_]))return!1}return!0}function bd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yd(e,t){var i=bd(e);e=0;for(var n;i;){if(i.nodeType===3){if(n=e+i.textContent.length,e<=t&&n>=t)return{node:i,offset:t-e};e=n}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=bd(i)}}function wd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ia(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Ia(e.document)}return t}function Gl(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")}var g0=fs&&"documentMode"in document&&11>=document.documentMode,Hn=null,Yl=null,Nr=null,Kl=!1;function xd(e,t,i){var n=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Kl||Hn==null||Hn!==Ia(n)||(n=Hn,"selectionStart"in n&&Gl(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Nr&&Br(Nr,n)||(Nr=n,n=No(Yl,"onSelect"),0<n.length&&(t=new qa("onSelect","select",null,t,i),e.push({event:t,listeners:n}),t.target=Hn)))}function hn(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Pn={animationend:hn("Animation","AnimationEnd"),animationiteration:hn("Animation","AnimationIteration"),animationstart:hn("Animation","AnimationStart"),transitionrun:hn("Transition","TransitionRun"),transitionstart:hn("Transition","TransitionStart"),transitioncancel:hn("Transition","TransitionCancel"),transitionend:hn("Transition","TransitionEnd")},Xl={},Cd={};fs&&(Cd=document.createElement("div").style,"AnimationEvent"in window||(delete Pn.animationend.animation,delete Pn.animationiteration.animation,delete Pn.animationstart.animation),"TransitionEvent"in window||delete Pn.transitionend.transition);function dn(e){if(Xl[e])return Xl[e];if(!Pn[e])return e;var t=Pn[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Cd)return Xl[e]=t[i];return e}var kd=dn("animationend"),Ed=dn("animationiteration"),Ld=dn("animationstart"),v0=dn("transitionrun"),_0=dn("transitionstart"),b0=dn("transitioncancel"),Rd=dn("transitionend"),Dd=new Map,Vl="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Vl.push("scrollEnd");function Ji(e,t){Dd.set(e,t),vi(t,[e])}var Ka=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ii=[],In=0,Jl=0;function Xa(){for(var e=In,t=Jl=In=0;t<e;){var i=Ii[t];Ii[t++]=null;var n=Ii[t];Ii[t++]=null;var _=Ii[t];Ii[t++]=null;var x=Ii[t];if(Ii[t++]=null,n!==null&&_!==null){var N=n.pending;N===null?_.next=_:(_.next=N.next,N.next=_),n.pending=_}x!==0&&Td(i,_,x)}}function Va(e,t,i,n){Ii[In++]=e,Ii[In++]=t,Ii[In++]=i,Ii[In++]=n,Jl|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Ql(e,t,i,n){return Va(e,t,i,n),Ja(e)}function fn(e,t){return Va(e,null,null,t),Ja(e)}function Td(e,t,i){e.lanes|=i;var n=e.alternate;n!==null&&(n.lanes|=i);for(var _=!1,x=e.return;x!==null;)x.childLanes|=i,n=x.alternate,n!==null&&(n.childLanes|=i),x.tag===22&&(e=x.stateNode,e===null||e._visibility&1||(_=!0)),e=x,x=x.return;return e.tag===3?(x=e.stateNode,_&&t!==null&&(_=31-ue(i),e=x.hiddenUpdates,n=e[_],n===null?e[_]=[t]:n.push(t),t.lane=i|536870912),x):null}function Ja(e){if(50<na)throw na=0,ou=null,Error(S(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Fn={};function y0(e,t,i,n){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mi(e,t,i,n){return new y0(e,t,i,n)}function Zl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ps(e,t){var i=e.alternate;return i===null?(i=Mi(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Md(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Qa(e,t,i,n,_,x){var N=0;if(n=e,typeof e=="function")Zl(e)&&(N=1);else if(typeof e=="string")N=kb(e,i,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case L:return e=Mi(31,i,t,_),e.elementType=L,e.lanes=x,e;case p:return pn(i.children,_,x,t);case a:N=8,_|=24;break;case c:return e=Mi(12,i,t,_|2),e.elementType=c,e.lanes=x,e;case R:return e=Mi(13,i,t,_),e.elementType=R,e.lanes=x,e;case k:return e=Mi(19,i,t,_),e.elementType=k,e.lanes=x,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case f:N=10;break e;case o:N=9;break e;case y:N=11;break e;case D:N=14;break e;case E:N=16,n=null;break e}N=29,i=Error(S(130,e===null?"null":typeof e,"")),n=null}return t=Mi(N,i,t,_),t.elementType=e,t.type=n,t.lanes=x,t}function pn(e,t,i,n){return e=Mi(7,e,n,t),e.lanes=i,e}function ec(e,t,i){return e=Mi(6,e,null,t),e.lanes=i,e}function Ad(e){var t=Mi(18,null,null,0);return t.stateNode=e,t}function tc(e,t,i){return t=Mi(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var jd=new WeakMap;function Fi(e,t){if(typeof e=="object"&&e!==null){var i=jd.get(e);return i!==void 0?i:(t={value:e,source:t,stack:ut(t)},jd.set(e,t),t)}return{value:e,source:t,stack:ut(t)}}var Un=[],$n=0,Za=null,zr=0,Ui=[],$i=0,js=null,rs=1,as="";function ms(e,t){Un[$n++]=zr,Un[$n++]=Za,Za=e,zr=t}function Od(e,t,i){Ui[$i++]=rs,Ui[$i++]=as,Ui[$i++]=js,js=e;var n=rs;e=as;var _=32-ue(n)-1;n&=~(1<<_),i+=1;var x=32-ue(t)+_;if(30<x){var N=_-_%5;x=(n&(1<<N)-1).toString(32),n>>=N,_-=N,rs=1<<32-ue(t)+_|i<<_|n,as=x+e}else rs=1<<x|i<<_|n,as=e}function ic(e){e.return!==null&&(ms(e,1),Od(e,1,0))}function sc(e){for(;e===Za;)Za=Un[--$n],Un[$n]=null,zr=Un[--$n],Un[$n]=null;for(;e===js;)js=Ui[--$i],Ui[$i]=null,as=Ui[--$i],Ui[$i]=null,rs=Ui[--$i],Ui[$i]=null}function Bd(e,t){Ui[$i++]=rs,Ui[$i++]=as,Ui[$i++]=js,rs=t.id,as=t.overflow,js=e}var ci=null,Ft=null,kt=!1,Os=null,Wi=!1,nc=Error(S(519));function Bs(e){var t=Error(S(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Hr(Fi(t,e)),nc}function Nd(e){var t=e.stateNode,i=e.type,n=e.memoizedProps;switch(t[be]=e,t[nt]=n,i){case"dialog":wt("cancel",t),wt("close",t);break;case"iframe":case"object":case"embed":wt("load",t);break;case"video":case"audio":for(i=0;i<aa.length;i++)wt(aa[i],t);break;case"source":wt("error",t);break;case"img":case"image":case"link":wt("error",t),wt("load",t);break;case"details":wt("toggle",t);break;case"input":wt("invalid",t),Xh(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":wt("invalid",t);break;case"textarea":wt("invalid",t),Jh(t,n.value,n.defaultValue,n.children)}i=n.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||n.suppressHydrationWarning===!0||em(t.textContent,i)?(n.popover!=null&&(wt("beforetoggle",t),wt("toggle",t)),n.onScroll!=null&&wt("scroll",t),n.onScrollEnd!=null&&wt("scrollend",t),n.onClick!=null&&(t.onclick=ds),t=!0):t=!1,t||Bs(e,!0)}function zd(e){for(ci=e.return;ci;)switch(ci.tag){case 5:case 31:case 13:Wi=!1;return;case 27:case 3:Wi=!0;return;default:ci=ci.return}}function Wn(e){if(e!==ci)return!1;if(!kt)return zd(e),kt=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Su(e.type,e.memoizedProps)),i=!i),i&&Ft&&Bs(e),zd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(317));Ft=cm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(317));Ft=cm(e)}else t===27?(t=Ft,Xs(e.type)?(e=Lu,Lu=null,Ft=e):Ft=t):Ft=ci?Gi(e.stateNode.nextSibling):null;return!0}function mn(){Ft=ci=null,kt=!1}function rc(){var e=Os;return e!==null&&(Ci===null?Ci=e:Ci.push.apply(Ci,e),Os=null),e}function Hr(e){Os===null?Os=[e]:Os.push(e)}var ac=B(null),gn=null,gs=null;function Ns(e,t,i){ee(ac,t._currentValue),t._currentValue=i}function vs(e){e._currentValue=ac.current,W(ac)}function oc(e,t,i){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===i)break;e=e.return}}function lc(e,t,i,n){var _=e.child;for(_!==null&&(_.return=e);_!==null;){var x=_.dependencies;if(x!==null){var N=_.child;x=x.firstContext;e:for(;x!==null;){var q=x;x=_;for(var se=0;se<t.length;se++)if(q.context===t[se]){x.lanes|=i,q=x.alternate,q!==null&&(q.lanes|=i),oc(x.return,i,e),n||(N=null);break e}x=q.next}}else if(_.tag===18){if(N=_.return,N===null)throw Error(S(341));N.lanes|=i,x=N.alternate,x!==null&&(x.lanes|=i),oc(N,i,e),N=null}else N=_.child;if(N!==null)N.return=_;else for(N=_;N!==null;){if(N===e){N=null;break}if(_=N.sibling,_!==null){_.return=N.return,N=_;break}N=N.return}_=N}}function qn(e,t,i,n){e=null;for(var _=t,x=!1;_!==null;){if(!x){if((_.flags&524288)!==0)x=!0;else if((_.flags&262144)!==0)break}if(_.tag===10){var N=_.alternate;if(N===null)throw Error(S(387));if(N=N.memoizedProps,N!==null){var q=_.type;Ti(_.pendingProps.value,N.value)||(e!==null?e.push(q):e=[q])}}else if(_===Q.current){if(N=_.alternate,N===null)throw Error(S(387));N.memoizedState.memoizedState!==_.memoizedState.memoizedState&&(e!==null?e.push(ha):e=[ha])}_=_.return}e!==null&&lc(t,e,i,n),t.flags|=262144}function eo(e){for(e=e.firstContext;e!==null;){if(!Ti(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function vn(e){gn=e,gs=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ui(e){return Hd(gn,e)}function to(e,t){return gn===null&&vn(e),Hd(e,t)}function Hd(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},gs===null){if(e===null)throw Error(S(308));gs=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else gs=gs.next=t;return i}var w0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},S0=s.unstable_scheduleCallback,x0=s.unstable_NormalPriority,ti={$$typeof:f,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function cc(){return{controller:new w0,data:new Map,refCount:0}}function Pr(e){e.refCount--,e.refCount===0&&S0(x0,function(){e.controller.abort()})}var Ir=null,uc=0,Gn=0,Yn=null;function C0(e,t){if(Ir===null){var i=Ir=[];uc=0,Gn=fu(),Yn={status:"pending",value:void 0,then:function(n){i.push(n)}}}return uc++,t.then(Pd,Pd),t}function Pd(){if(--uc===0&&Ir!==null){Yn!==null&&(Yn.status="fulfilled");var e=Ir;Ir=null,Gn=0,Yn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function k0(e,t){var i=[],n={status:"pending",value:null,reason:null,then:function(_){i.push(_)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var _=0;_<i.length;_++)(0,i[_])(t)},function(_){for(n.status="rejected",n.reason=_,_=0;_<i.length;_++)(0,i[_])(void 0)}),n}var Id=Y.S;Y.S=function(e,t){Cp=Ue(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&C0(e,t),Id!==null&&Id(e,t)};var _n=B(null);function hc(){var e=_n.current;return e!==null?e:Ht.pooledCache}function io(e,t){t===null?ee(_n,_n.current):ee(_n,t.pool)}function Fd(){var e=hc();return e===null?null:{parent:ti._currentValue,pool:e}}var Kn=Error(S(460)),dc=Error(S(474)),so=Error(S(542)),no={then:function(){}};function Ud(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $d(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(ds,ds),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,qd(e),e;default:if(typeof t.status=="string")t.then(ds,ds);else{if(e=Ht,e!==null&&100<e.shellSuspendCounter)throw Error(S(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var _=t;_.status="fulfilled",_.value=n}},function(n){if(t.status==="pending"){var _=t;_.status="rejected",_.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,qd(e),e}throw yn=t,Kn}}function bn(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(yn=i,Kn):i}}var yn=null;function Wd(){if(yn===null)throw Error(S(459));var e=yn;return yn=null,e}function qd(e){if(e===Kn||e===so)throw Error(S(483))}var Xn=null,Fr=0;function ro(e){var t=Fr;return Fr+=1,Xn===null&&(Xn=[]),$d(Xn,e,t)}function Ur(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ao(e,t){throw t.$$typeof===m?Error(S(525)):(e=Object.prototype.toString.call(t),Error(S(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Gd(e){function t(oe,re){if(e){var de=oe.deletions;de===null?(oe.deletions=[re],oe.flags|=16):de.push(re)}}function i(oe,re){if(!e)return null;for(;re!==null;)t(oe,re),re=re.sibling;return null}function n(oe){for(var re=new Map;oe!==null;)oe.key!==null?re.set(oe.key,oe):re.set(oe.index,oe),oe=oe.sibling;return re}function _(oe,re){return oe=ps(oe,re),oe.index=0,oe.sibling=null,oe}function x(oe,re,de){return oe.index=de,e?(de=oe.alternate,de!==null?(de=de.index,de<re?(oe.flags|=67108866,re):de):(oe.flags|=67108866,re)):(oe.flags|=1048576,re)}function N(oe){return e&&oe.alternate===null&&(oe.flags|=67108866),oe}function q(oe,re,de,Re){return re===null||re.tag!==6?(re=ec(de,oe.mode,Re),re.return=oe,re):(re=_(re,de),re.return=oe,re)}function se(oe,re,de,Re){var Ze=de.type;return Ze===p?Le(oe,re,de.props.children,Re,de.key):re!==null&&(re.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===E&&bn(Ze)===re.type)?(re=_(re,de.props),Ur(re,de),re.return=oe,re):(re=Qa(de.type,de.key,de.props,null,oe.mode,Re),Ur(re,de),re.return=oe,re)}function fe(oe,re,de,Re){return re===null||re.tag!==4||re.stateNode.containerInfo!==de.containerInfo||re.stateNode.implementation!==de.implementation?(re=tc(de,oe.mode,Re),re.return=oe,re):(re=_(re,de.children||[]),re.return=oe,re)}function Le(oe,re,de,Re,Ze){return re===null||re.tag!==7?(re=pn(de,oe.mode,Re,Ze),re.return=oe,re):(re=_(re,de),re.return=oe,re)}function De(oe,re,de){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=ec(""+re,oe.mode,de),re.return=oe,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case b:return de=Qa(re.type,re.key,re.props,null,oe.mode,de),Ur(de,re),de.return=oe,de;case C:return re=tc(re,oe.mode,de),re.return=oe,re;case E:return re=bn(re),De(oe,re,de)}if(X(re)||P(re))return re=pn(re,oe.mode,de,null),re.return=oe,re;if(typeof re.then=="function")return De(oe,ro(re),de);if(re.$$typeof===f)return De(oe,to(oe,re),de);ao(oe,re)}return null}function ge(oe,re,de,Re){var Ze=re!==null?re.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return Ze!==null?null:q(oe,re,""+de,Re);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case b:return de.key===Ze?se(oe,re,de,Re):null;case C:return de.key===Ze?fe(oe,re,de,Re):null;case E:return de=bn(de),ge(oe,re,de,Re)}if(X(de)||P(de))return Ze!==null?null:Le(oe,re,de,Re,null);if(typeof de.then=="function")return ge(oe,re,ro(de),Re);if(de.$$typeof===f)return ge(oe,re,to(oe,de),Re);ao(oe,de)}return null}function we(oe,re,de,Re,Ze){if(typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint")return oe=oe.get(de)||null,q(re,oe,""+Re,Ze);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case b:return oe=oe.get(Re.key===null?de:Re.key)||null,se(re,oe,Re,Ze);case C:return oe=oe.get(Re.key===null?de:Re.key)||null,fe(re,oe,Re,Ze);case E:return Re=bn(Re),we(oe,re,de,Re,Ze)}if(X(Re)||P(Re))return oe=oe.get(de)||null,Le(re,oe,Re,Ze,null);if(typeof Re.then=="function")return we(oe,re,de,ro(Re),Ze);if(Re.$$typeof===f)return we(oe,re,de,to(re,Re),Ze);ao(re,Re)}return null}function Ge(oe,re,de,Re){for(var Ze=null,Rt=null,Ke=re,mt=re=0,Ct=null;Ke!==null&&mt<de.length;mt++){Ke.index>mt?(Ct=Ke,Ke=null):Ct=Ke.sibling;var Dt=ge(oe,Ke,de[mt],Re);if(Dt===null){Ke===null&&(Ke=Ct);break}e&&Ke&&Dt.alternate===null&&t(oe,Ke),re=x(Dt,re,mt),Rt===null?Ze=Dt:Rt.sibling=Dt,Rt=Dt,Ke=Ct}if(mt===de.length)return i(oe,Ke),kt&&ms(oe,mt),Ze;if(Ke===null){for(;mt<de.length;mt++)Ke=De(oe,de[mt],Re),Ke!==null&&(re=x(Ke,re,mt),Rt===null?Ze=Ke:Rt.sibling=Ke,Rt=Ke);return kt&&ms(oe,mt),Ze}for(Ke=n(Ke);mt<de.length;mt++)Ct=we(Ke,oe,mt,de[mt],Re),Ct!==null&&(e&&Ct.alternate!==null&&Ke.delete(Ct.key===null?mt:Ct.key),re=x(Ct,re,mt),Rt===null?Ze=Ct:Rt.sibling=Ct,Rt=Ct);return e&&Ke.forEach(function(en){return t(oe,en)}),kt&&ms(oe,mt),Ze}function lt(oe,re,de,Re){if(de==null)throw Error(S(151));for(var Ze=null,Rt=null,Ke=re,mt=re=0,Ct=null,Dt=de.next();Ke!==null&&!Dt.done;mt++,Dt=de.next()){Ke.index>mt?(Ct=Ke,Ke=null):Ct=Ke.sibling;var en=ge(oe,Ke,Dt.value,Re);if(en===null){Ke===null&&(Ke=Ct);break}e&&Ke&&en.alternate===null&&t(oe,Ke),re=x(en,re,mt),Rt===null?Ze=en:Rt.sibling=en,Rt=en,Ke=Ct}if(Dt.done)return i(oe,Ke),kt&&ms(oe,mt),Ze;if(Ke===null){for(;!Dt.done;mt++,Dt=de.next())Dt=De(oe,Dt.value,Re),Dt!==null&&(re=x(Dt,re,mt),Rt===null?Ze=Dt:Rt.sibling=Dt,Rt=Dt);return kt&&ms(oe,mt),Ze}for(Ke=n(Ke);!Dt.done;mt++,Dt=de.next())Dt=we(Ke,oe,mt,Dt.value,Re),Dt!==null&&(e&&Dt.alternate!==null&&Ke.delete(Dt.key===null?mt:Dt.key),re=x(Dt,re,mt),Rt===null?Ze=Dt:Rt.sibling=Dt,Rt=Dt);return e&&Ke.forEach(function(Nb){return t(oe,Nb)}),kt&&ms(oe,mt),Ze}function zt(oe,re,de,Re){if(typeof de=="object"&&de!==null&&de.type===p&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case b:e:{for(var Ze=de.key;re!==null;){if(re.key===Ze){if(Ze=de.type,Ze===p){if(re.tag===7){i(oe,re.sibling),Re=_(re,de.props.children),Re.return=oe,oe=Re;break e}}else if(re.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===E&&bn(Ze)===re.type){i(oe,re.sibling),Re=_(re,de.props),Ur(Re,de),Re.return=oe,oe=Re;break e}i(oe,re);break}else t(oe,re);re=re.sibling}de.type===p?(Re=pn(de.props.children,oe.mode,Re,de.key),Re.return=oe,oe=Re):(Re=Qa(de.type,de.key,de.props,null,oe.mode,Re),Ur(Re,de),Re.return=oe,oe=Re)}return N(oe);case C:e:{for(Ze=de.key;re!==null;){if(re.key===Ze)if(re.tag===4&&re.stateNode.containerInfo===de.containerInfo&&re.stateNode.implementation===de.implementation){i(oe,re.sibling),Re=_(re,de.children||[]),Re.return=oe,oe=Re;break e}else{i(oe,re);break}else t(oe,re);re=re.sibling}Re=tc(de,oe.mode,Re),Re.return=oe,oe=Re}return N(oe);case E:return de=bn(de),zt(oe,re,de,Re)}if(X(de))return Ge(oe,re,de,Re);if(P(de)){if(Ze=P(de),typeof Ze!="function")throw Error(S(150));return de=Ze.call(de),lt(oe,re,de,Re)}if(typeof de.then=="function")return zt(oe,re,ro(de),Re);if(de.$$typeof===f)return zt(oe,re,to(oe,de),Re);ao(oe,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,re!==null&&re.tag===6?(i(oe,re.sibling),Re=_(re,de),Re.return=oe,oe=Re):(i(oe,re),Re=ec(de,oe.mode,Re),Re.return=oe,oe=Re),N(oe)):i(oe,re)}return function(oe,re,de,Re){try{Fr=0;var Ze=zt(oe,re,de,Re);return Xn=null,Ze}catch(Ke){if(Ke===Kn||Ke===so)throw Ke;var Rt=Mi(29,Ke,null,oe.mode);return Rt.lanes=Re,Rt.return=oe,Rt}finally{}}}var wn=Gd(!0),Yd=Gd(!1),zs=!1;function fc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Hs(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ps(e,t,i){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Mt&2)!==0){var _=n.pending;return _===null?t.next=t:(t.next=_.next,_.next=t),n.pending=t,t=Ja(e),Td(e,null,i),t}return Va(e,n,t,i),Ja(e)}function $r(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,i|=n,t.lanes=i,bt(e,i)}}function mc(e,t){var i=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,i===n)){var _=null,x=null;if(i=i.firstBaseUpdate,i!==null){do{var N={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};x===null?_=x=N:x=x.next=N,i=i.next}while(i!==null);x===null?_=x=t:x=x.next=t}else _=x=t;i={baseState:n.baseState,firstBaseUpdate:_,lastBaseUpdate:x,shared:n.shared,callbacks:n.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var gc=!1;function Wr(){if(gc){var e=Yn;if(e!==null)throw e}}function qr(e,t,i,n){gc=!1;var _=e.updateQueue;zs=!1;var x=_.firstBaseUpdate,N=_.lastBaseUpdate,q=_.shared.pending;if(q!==null){_.shared.pending=null;var se=q,fe=se.next;se.next=null,N===null?x=fe:N.next=fe,N=se;var Le=e.alternate;Le!==null&&(Le=Le.updateQueue,q=Le.lastBaseUpdate,q!==N&&(q===null?Le.firstBaseUpdate=fe:q.next=fe,Le.lastBaseUpdate=se))}if(x!==null){var De=_.baseState;N=0,Le=fe=se=null,q=x;do{var ge=q.lane&-536870913,we=ge!==q.lane;if(we?(xt&ge)===ge:(n&ge)===ge){ge!==0&&ge===Gn&&(gc=!0),Le!==null&&(Le=Le.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});e:{var Ge=e,lt=q;ge=t;var zt=i;switch(lt.tag){case 1:if(Ge=lt.payload,typeof Ge=="function"){De=Ge.call(zt,De,ge);break e}De=Ge;break e;case 3:Ge.flags=Ge.flags&-65537|128;case 0:if(Ge=lt.payload,ge=typeof Ge=="function"?Ge.call(zt,De,ge):Ge,ge==null)break e;De=l({},De,ge);break e;case 2:zs=!0}}ge=q.callback,ge!==null&&(e.flags|=64,we&&(e.flags|=8192),we=_.callbacks,we===null?_.callbacks=[ge]:we.push(ge))}else we={lane:ge,tag:q.tag,payload:q.payload,callback:q.callback,next:null},Le===null?(fe=Le=we,se=De):Le=Le.next=we,N|=ge;if(q=q.next,q===null){if(q=_.shared.pending,q===null)break;we=q,q=we.next,we.next=null,_.lastBaseUpdate=we,_.shared.pending=null}}while(!0);Le===null&&(se=De),_.baseState=se,_.firstBaseUpdate=fe,_.lastBaseUpdate=Le,x===null&&(_.shared.lanes=0),Ws|=N,e.lanes=N,e.memoizedState=De}}function Kd(e,t){if(typeof e!="function")throw Error(S(191,e));e.call(t)}function Xd(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Kd(i[e],t)}var Vn=B(null),oo=B(0);function Vd(e,t){e=Es,ee(oo,e),ee(Vn,t),Es=e|t.baseLanes}function vc(){ee(oo,Es),ee(Vn,Vn.current)}function _c(){Es=oo.current,W(Vn),W(oo)}var Ai=B(null),qi=null;function Is(e){var t=e.alternate;ee(Zt,Zt.current&1),ee(Ai,e),qi===null&&(t===null||Vn.current!==null||t.memoizedState!==null)&&(qi=e)}function bc(e){ee(Zt,Zt.current),ee(Ai,e),qi===null&&(qi=e)}function Jd(e){e.tag===22?(ee(Zt,Zt.current),ee(Ai,e),qi===null&&(qi=e)):Fs()}function Fs(){ee(Zt,Zt.current),ee(Ai,Ai.current)}function ji(e){W(Ai),qi===e&&(qi=null),W(Zt)}var Zt=B(0);function lo(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||ku(i)||Eu(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var _s=0,pt=null,Bt=null,ii=null,co=!1,Jn=!1,Sn=!1,uo=0,Gr=0,Qn=null,E0=0;function Xt(){throw Error(S(321))}function yc(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Ti(e[i],t[i]))return!1;return!0}function wc(e,t,i,n,_,x){return _s=x,pt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Y.H=e===null||e.memoizedState===null?Bf:Nc,Sn=!1,x=i(n,_),Sn=!1,Jn&&(x=Zd(t,i,n,_)),Qd(e),x}function Qd(e){Y.H=Xr;var t=Bt!==null&&Bt.next!==null;if(_s=0,ii=Bt=pt=null,co=!1,Gr=0,Qn=null,t)throw Error(S(300));e===null||si||(e=e.dependencies,e!==null&&eo(e)&&(si=!0))}function Zd(e,t,i,n){pt=e;var _=0;do{if(Jn&&(Qn=null),Gr=0,Jn=!1,25<=_)throw Error(S(301));if(_+=1,ii=Bt=null,e.updateQueue!=null){var x=e.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}Y.H=Nf,x=t(i,n)}while(Jn);return x}function L0(){var e=Y.H,t=e.useState()[0];return t=typeof t.then=="function"?Yr(t):t,e=e.useState()[0],(Bt!==null?Bt.memoizedState:null)!==e&&(pt.flags|=1024),t}function Sc(){var e=uo!==0;return uo=0,e}function xc(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Cc(e){if(co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}co=!1}_s=0,ii=Bt=pt=null,Jn=!1,Gr=uo=0,Qn=null}function _i(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ii===null?pt.memoizedState=ii=e:ii=ii.next=e,ii}function ei(){if(Bt===null){var e=pt.alternate;e=e!==null?e.memoizedState:null}else e=Bt.next;var t=ii===null?pt.memoizedState:ii.next;if(t!==null)ii=t,Bt=e;else{if(e===null)throw pt.alternate===null?Error(S(467)):Error(S(310));Bt=e,e={memoizedState:Bt.memoizedState,baseState:Bt.baseState,baseQueue:Bt.baseQueue,queue:Bt.queue,next:null},ii===null?pt.memoizedState=ii=e:ii=ii.next=e}return ii}function ho(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yr(e){var t=Gr;return Gr+=1,Qn===null&&(Qn=[]),e=$d(Qn,e,t),t=pt,(ii===null?t.memoizedState:ii.next)===null&&(t=t.alternate,Y.H=t===null||t.memoizedState===null?Bf:Nc),e}function fo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Yr(e);if(e.$$typeof===f)return ui(e)}throw Error(S(438,String(e)))}function kc(e){var t=null,i=pt.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var n=pt.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(_){return _.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=ho(),pt.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),n=0;n<e;n++)i[n]=z;return t.index++,i}function bs(e,t){return typeof t=="function"?t(e):t}function po(e){var t=ei();return Ec(t,Bt,e)}function Ec(e,t,i){var n=e.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=i;var _=e.baseQueue,x=n.pending;if(x!==null){if(_!==null){var N=_.next;_.next=x.next,x.next=N}t.baseQueue=_=x,n.pending=null}if(x=e.baseState,_===null)e.memoizedState=x;else{t=_.next;var q=N=null,se=null,fe=t,Le=!1;do{var De=fe.lane&-536870913;if(De!==fe.lane?(xt&De)===De:(_s&De)===De){var ge=fe.revertLane;if(ge===0)se!==null&&(se=se.next={lane:0,revertLane:0,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),De===Gn&&(Le=!0);else if((_s&ge)===ge){fe=fe.next,ge===Gn&&(Le=!0);continue}else De={lane:0,revertLane:fe.revertLane,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},se===null?(q=se=De,N=x):se=se.next=De,pt.lanes|=ge,Ws|=ge;De=fe.action,Sn&&i(x,De),x=fe.hasEagerState?fe.eagerState:i(x,De)}else ge={lane:De,revertLane:fe.revertLane,gesture:fe.gesture,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},se===null?(q=se=ge,N=x):se=se.next=ge,pt.lanes|=De,Ws|=De;fe=fe.next}while(fe!==null&&fe!==t);if(se===null?N=x:se.next=q,!Ti(x,e.memoizedState)&&(si=!0,Le&&(i=Yn,i!==null)))throw i;e.memoizedState=x,e.baseState=N,e.baseQueue=se,n.lastRenderedState=x}return _===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Lc(e){var t=ei(),i=t.queue;if(i===null)throw Error(S(311));i.lastRenderedReducer=e;var n=i.dispatch,_=i.pending,x=t.memoizedState;if(_!==null){i.pending=null;var N=_=_.next;do x=e(x,N.action),N=N.next;while(N!==_);Ti(x,t.memoizedState)||(si=!0),t.memoizedState=x,t.baseQueue===null&&(t.baseState=x),i.lastRenderedState=x}return[x,n]}function ef(e,t,i){var n=pt,_=ei(),x=kt;if(x){if(i===void 0)throw Error(S(407));i=i()}else i=t();var N=!Ti((Bt||_).memoizedState,i);if(N&&(_.memoizedState=i,si=!0),_=_.queue,Tc(nf.bind(null,n,_,e),[e]),_.getSnapshot!==t||N||ii!==null&&ii.memoizedState.tag&1){if(n.flags|=2048,Zn(9,{destroy:void 0},sf.bind(null,n,_,i,t),null),Ht===null)throw Error(S(349));x||(_s&127)!==0||tf(n,t,i)}return i}function tf(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=pt.updateQueue,t===null?(t=ho(),pt.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function sf(e,t,i,n){t.value=i,t.getSnapshot=n,rf(t)&&af(e)}function nf(e,t,i){return i(function(){rf(t)&&af(e)})}function rf(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Ti(e,i)}catch{return!0}}function af(e){var t=fn(e,2);t!==null&&ki(t,e,2)}function Rc(e){var t=_i();if(typeof e=="function"){var i=e;if(e=i(),Sn){_e(!0);try{i()}finally{_e(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bs,lastRenderedState:e},t}function of(e,t,i,n){return e.baseState=i,Ec(e,Bt,typeof n=="function"?n:bs)}function R0(e,t,i,n,_){if(vo(e))throw Error(S(485));if(e=t.action,e!==null){var x={payload:_,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){x.listeners.push(N)}};Y.T!==null?i(!0):x.isTransition=!1,n(x),i=t.pending,i===null?(x.next=t.pending=x,lf(t,x)):(x.next=i.next,t.pending=i.next=x)}}function lf(e,t){var i=t.action,n=t.payload,_=e.state;if(t.isTransition){var x=Y.T,N={};Y.T=N;try{var q=i(_,n),se=Y.S;se!==null&&se(N,q),cf(e,t,q)}catch(fe){Dc(e,t,fe)}finally{x!==null&&N.types!==null&&(x.types=N.types),Y.T=x}}else try{x=i(_,n),cf(e,t,x)}catch(fe){Dc(e,t,fe)}}function cf(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(n){uf(e,t,n)},function(n){return Dc(e,t,n)}):uf(e,t,i)}function uf(e,t,i){t.status="fulfilled",t.value=i,hf(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,lf(e,i)))}function Dc(e,t,i){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=i,hf(t),t=t.next;while(t!==n)}e.action=null}function hf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function df(e,t){return t}function ff(e,t){if(kt){var i=Ht.formState;if(i!==null){e:{var n=pt;if(kt){if(Ft){t:{for(var _=Ft,x=Wi;_.nodeType!==8;){if(!x){_=null;break t}if(_=Gi(_.nextSibling),_===null){_=null;break t}}x=_.data,_=x==="F!"||x==="F"?_:null}if(_){Ft=Gi(_.nextSibling),n=_.data==="F!";break e}}Bs(n)}n=!1}n&&(t=i[0])}}return i=_i(),i.memoizedState=i.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:df,lastRenderedState:t},i.queue=n,i=Af.bind(null,pt,n),n.dispatch=i,n=Rc(!1),x=Bc.bind(null,pt,!1,n.queue),n=_i(),_={state:t,dispatch:null,action:e,pending:null},n.queue=_,i=R0.bind(null,pt,_,x,i),_.dispatch=i,n.memoizedState=e,[t,i,!1]}function pf(e){var t=ei();return mf(t,Bt,e)}function mf(e,t,i){if(t=Ec(e,t,df)[0],e=po(bs)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Yr(t)}catch(N){throw N===Kn?so:N}else n=t;t=ei();var _=t.queue,x=_.dispatch;return i!==t.memoizedState&&(pt.flags|=2048,Zn(9,{destroy:void 0},D0.bind(null,_,i),null)),[n,x,e]}function D0(e,t){e.action=t}function gf(e){var t=ei(),i=Bt;if(i!==null)return mf(t,i,e);ei(),t=t.memoizedState,i=ei();var n=i.queue.dispatch;return i.memoizedState=e,[t,n,!1]}function Zn(e,t,i,n){return e={tag:e,create:i,deps:n,inst:t,next:null},t=pt.updateQueue,t===null&&(t=ho(),pt.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(n=i.next,i.next=e,e.next=n,t.lastEffect=e),e}function vf(){return ei().memoizedState}function mo(e,t,i,n){var _=_i();pt.flags|=e,_.memoizedState=Zn(1|t,{destroy:void 0},i,n===void 0?null:n)}function go(e,t,i,n){var _=ei();n=n===void 0?null:n;var x=_.memoizedState.inst;Bt!==null&&n!==null&&yc(n,Bt.memoizedState.deps)?_.memoizedState=Zn(t,x,i,n):(pt.flags|=e,_.memoizedState=Zn(1|t,x,i,n))}function _f(e,t){mo(8390656,8,e,t)}function Tc(e,t){go(2048,8,e,t)}function T0(e){pt.flags|=4;var t=pt.updateQueue;if(t===null)t=ho(),pt.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function bf(e){var t=ei().memoizedState;return T0({ref:t,nextImpl:e}),function(){if((Mt&2)!==0)throw Error(S(440));return t.impl.apply(void 0,arguments)}}function yf(e,t){return go(4,2,e,t)}function wf(e,t){return go(4,4,e,t)}function Sf(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xf(e,t,i){i=i!=null?i.concat([e]):null,go(4,4,Sf.bind(null,t,e),i)}function Mc(){}function Cf(e,t){var i=ei();t=t===void 0?null:t;var n=i.memoizedState;return t!==null&&yc(t,n[1])?n[0]:(i.memoizedState=[e,t],e)}function kf(e,t){var i=ei();t=t===void 0?null:t;var n=i.memoizedState;if(t!==null&&yc(t,n[1]))return n[0];if(n=e(),Sn){_e(!0);try{e()}finally{_e(!1)}}return i.memoizedState=[n,t],n}function Ac(e,t,i){return i===void 0||(_s&1073741824)!==0&&(xt&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Ep(),pt.lanes|=e,Ws|=e,i)}function Ef(e,t,i,n){return Ti(i,t)?i:Vn.current!==null?(e=Ac(e,i,n),Ti(e,t)||(si=!0),e):(_s&42)===0||(_s&1073741824)!==0&&(xt&261930)===0?(si=!0,e.memoizedState=i):(e=Ep(),pt.lanes|=e,Ws|=e,t)}function Lf(e,t,i,n,_){var x=$.p;$.p=x!==0&&8>x?x:8;var N=Y.T,q={};Y.T=q,Bc(e,!1,t,i);try{var se=_(),fe=Y.S;if(fe!==null&&fe(q,se),se!==null&&typeof se=="object"&&typeof se.then=="function"){var Le=k0(se,n);Kr(e,t,Le,Ni(e))}else Kr(e,t,n,Ni(e))}catch(De){Kr(e,t,{then:function(){},status:"rejected",reason:De},Ni())}finally{$.p=x,N!==null&&q.types!==null&&(N.types=q.types),Y.T=N}}function M0(){}function jc(e,t,i,n){if(e.tag!==5)throw Error(S(476));var _=Rf(e).queue;Lf(e,_,t,U,i===null?M0:function(){return Df(e),i(n)})}function Rf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bs,lastRenderedState:U},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bs,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Df(e){var t=Rf(e);t.next===null&&(t=e.alternate.memoizedState),Kr(e,t.next.queue,{},Ni())}function Oc(){return ui(ha)}function Tf(){return ei().memoizedState}function Mf(){return ei().memoizedState}function A0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Ni();e=Hs(i);var n=Ps(t,e,i);n!==null&&(ki(n,t,i),$r(n,t,i)),t={cache:cc()},e.payload=t;return}t=t.return}}function j0(e,t,i){var n=Ni();i={lane:n,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},vo(e)?jf(t,i):(i=Ql(e,t,i,n),i!==null&&(ki(i,e,n),Of(i,t,n)))}function Af(e,t,i){var n=Ni();Kr(e,t,i,n)}function Kr(e,t,i,n){var _={lane:n,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(vo(e))jf(t,_);else{var x=e.alternate;if(e.lanes===0&&(x===null||x.lanes===0)&&(x=t.lastRenderedReducer,x!==null))try{var N=t.lastRenderedState,q=x(N,i);if(_.hasEagerState=!0,_.eagerState=q,Ti(q,N))return Va(e,t,_,0),Ht===null&&Xa(),!1}catch{}finally{}if(i=Ql(e,t,_,n),i!==null)return ki(i,e,n),Of(i,t,n),!0}return!1}function Bc(e,t,i,n){if(n={lane:2,revertLane:fu(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},vo(e)){if(t)throw Error(S(479))}else t=Ql(e,i,n,2),t!==null&&ki(t,e,2)}function vo(e){var t=e.alternate;return e===pt||t!==null&&t===pt}function jf(e,t){Jn=co=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Of(e,t,i){if((i&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,i|=n,t.lanes=i,bt(e,i)}}var Xr={readContext:ui,use:fo,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};Xr.useEffectEvent=Xt;var Bf={readContext:ui,use:fo,useCallback:function(e,t){return _i().memoizedState=[e,t===void 0?null:t],e},useContext:ui,useEffect:_f,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,mo(4194308,4,Sf.bind(null,t,e),i)},useLayoutEffect:function(e,t){return mo(4194308,4,e,t)},useInsertionEffect:function(e,t){mo(4,2,e,t)},useMemo:function(e,t){var i=_i();t=t===void 0?null:t;var n=e();if(Sn){_e(!0);try{e()}finally{_e(!1)}}return i.memoizedState=[n,t],n},useReducer:function(e,t,i){var n=_i();if(i!==void 0){var _=i(t);if(Sn){_e(!0);try{i(t)}finally{_e(!1)}}}else _=t;return n.memoizedState=n.baseState=_,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:_},n.queue=e,e=e.dispatch=j0.bind(null,pt,e),[n.memoizedState,e]},useRef:function(e){var t=_i();return e={current:e},t.memoizedState=e},useState:function(e){e=Rc(e);var t=e.queue,i=Af.bind(null,pt,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Mc,useDeferredValue:function(e,t){var i=_i();return Ac(i,e,t)},useTransition:function(){var e=Rc(!1);return e=Lf.bind(null,pt,e.queue,!0,!1),_i().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var n=pt,_=_i();if(kt){if(i===void 0)throw Error(S(407));i=i()}else{if(i=t(),Ht===null)throw Error(S(349));(xt&127)!==0||tf(n,t,i)}_.memoizedState=i;var x={value:i,getSnapshot:t};return _.queue=x,_f(nf.bind(null,n,x,e),[e]),n.flags|=2048,Zn(9,{destroy:void 0},sf.bind(null,n,x,i,t),null),i},useId:function(){var e=_i(),t=Ht.identifierPrefix;if(kt){var i=as,n=rs;i=(n&~(1<<32-ue(n)-1)).toString(32)+i,t="_"+t+"R_"+i,i=uo++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=E0++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Oc,useFormState:ff,useActionState:ff,useOptimistic:function(e){var t=_i();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Bc.bind(null,pt,!0,i),i.dispatch=t,[e,t]},useMemoCache:kc,useCacheRefresh:function(){return _i().memoizedState=A0.bind(null,pt)},useEffectEvent:function(e){var t=_i(),i={impl:e};return t.memoizedState=i,function(){if((Mt&2)!==0)throw Error(S(440));return i.impl.apply(void 0,arguments)}}},Nc={readContext:ui,use:fo,useCallback:Cf,useContext:ui,useEffect:Tc,useImperativeHandle:xf,useInsertionEffect:yf,useLayoutEffect:wf,useMemo:kf,useReducer:po,useRef:vf,useState:function(){return po(bs)},useDebugValue:Mc,useDeferredValue:function(e,t){var i=ei();return Ef(i,Bt.memoizedState,e,t)},useTransition:function(){var e=po(bs)[0],t=ei().memoizedState;return[typeof e=="boolean"?e:Yr(e),t]},useSyncExternalStore:ef,useId:Tf,useHostTransitionStatus:Oc,useFormState:pf,useActionState:pf,useOptimistic:function(e,t){var i=ei();return of(i,Bt,e,t)},useMemoCache:kc,useCacheRefresh:Mf};Nc.useEffectEvent=bf;var Nf={readContext:ui,use:fo,useCallback:Cf,useContext:ui,useEffect:Tc,useImperativeHandle:xf,useInsertionEffect:yf,useLayoutEffect:wf,useMemo:kf,useReducer:Lc,useRef:vf,useState:function(){return Lc(bs)},useDebugValue:Mc,useDeferredValue:function(e,t){var i=ei();return Bt===null?Ac(i,e,t):Ef(i,Bt.memoizedState,e,t)},useTransition:function(){var e=Lc(bs)[0],t=ei().memoizedState;return[typeof e=="boolean"?e:Yr(e),t]},useSyncExternalStore:ef,useId:Tf,useHostTransitionStatus:Oc,useFormState:gf,useActionState:gf,useOptimistic:function(e,t){var i=ei();return Bt!==null?of(i,Bt,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:kc,useCacheRefresh:Mf};Nf.useEffectEvent=bf;function zc(e,t,i,n){t=e.memoizedState,i=i(n,t),i=i==null?t:l({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Hc={enqueueSetState:function(e,t,i){e=e._reactInternals;var n=Ni(),_=Hs(n);_.payload=t,i!=null&&(_.callback=i),t=Ps(e,_,n),t!==null&&(ki(t,e,n),$r(t,e,n))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var n=Ni(),_=Hs(n);_.tag=1,_.payload=t,i!=null&&(_.callback=i),t=Ps(e,_,n),t!==null&&(ki(t,e,n),$r(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Ni(),n=Hs(i);n.tag=2,t!=null&&(n.callback=t),t=Ps(e,n,i),t!==null&&(ki(t,e,i),$r(t,e,i))}};function zf(e,t,i,n,_,x,N){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,x,N):t.prototype&&t.prototype.isPureReactComponent?!Br(i,n)||!Br(_,x):!0}function Hf(e,t,i,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,n),t.state!==e&&Hc.enqueueReplaceState(t,t.state,null)}function xn(e,t){var i=t;if("ref"in t){i={};for(var n in t)n!=="ref"&&(i[n]=t[n])}if(e=e.defaultProps){i===t&&(i=l({},i));for(var _ in e)i[_]===void 0&&(i[_]=e[_])}return i}function Pf(e){Ka(e)}function If(e){console.error(e)}function Ff(e){Ka(e)}function _o(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Uf(e,t,i){try{var n=e.onCaughtError;n(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(_){setTimeout(function(){throw _})}}function Pc(e,t,i){return i=Hs(i),i.tag=3,i.payload={element:null},i.callback=function(){_o(e,t)},i}function $f(e){return e=Hs(e),e.tag=3,e}function Wf(e,t,i,n){var _=i.type.getDerivedStateFromError;if(typeof _=="function"){var x=n.value;e.payload=function(){return _(x)},e.callback=function(){Uf(t,i,n)}}var N=i.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(e.callback=function(){Uf(t,i,n),typeof _!="function"&&(qs===null?qs=new Set([this]):qs.add(this));var q=n.stack;this.componentDidCatch(n.value,{componentStack:q!==null?q:""})})}function O0(e,t,i,n,_){if(i.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=i.alternate,t!==null&&qn(t,i,_,!0),i=Ai.current,i!==null){switch(i.tag){case 31:case 13:return qi===null?To():i.alternate===null&&Vt===0&&(Vt=3),i.flags&=-257,i.flags|=65536,i.lanes=_,n===no?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([n]):t.add(n),uu(e,n,_)),!1;case 22:return i.flags|=65536,n===no?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([n]):i.add(n)),uu(e,n,_)),!1}throw Error(S(435,i.tag))}return uu(e,n,_),To(),!1}if(kt)return t=Ai.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=_,n!==nc&&(e=Error(S(422),{cause:n}),Hr(Fi(e,i)))):(n!==nc&&(t=Error(S(423),{cause:n}),Hr(Fi(t,i))),e=e.current.alternate,e.flags|=65536,_&=-_,e.lanes|=_,n=Fi(n,i),_=Pc(e.stateNode,n,_),mc(e,_),Vt!==4&&(Vt=2)),!1;var x=Error(S(520),{cause:n});if(x=Fi(x,i),sa===null?sa=[x]:sa.push(x),Vt!==4&&(Vt=2),t===null)return!0;n=Fi(n,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=_&-_,i.lanes|=e,e=Pc(i.stateNode,n,e),mc(i,e),!1;case 1:if(t=i.type,x=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(qs===null||!qs.has(x))))return i.flags|=65536,_&=-_,i.lanes|=_,_=$f(_),Wf(_,e,i,n),mc(i,_),!1}i=i.return}while(i!==null);return!1}var Ic=Error(S(461)),si=!1;function hi(e,t,i,n){t.child=e===null?Yd(t,null,i,n):wn(t,e.child,i,n)}function qf(e,t,i,n,_){i=i.render;var x=t.ref;if("ref"in n){var N={};for(var q in n)q!=="ref"&&(N[q]=n[q])}else N=n;return vn(t),n=wc(e,t,i,N,x,_),q=Sc(),e!==null&&!si?(xc(e,t,_),ys(e,t,_)):(kt&&q&&ic(t),t.flags|=1,hi(e,t,n,_),t.child)}function Gf(e,t,i,n,_){if(e===null){var x=i.type;return typeof x=="function"&&!Zl(x)&&x.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=x,Yf(e,t,x,n,_)):(e=Qa(i.type,null,n,t,t.mode,_),e.ref=t.ref,e.return=t,t.child=e)}if(x=e.child,!Kc(e,_)){var N=x.memoizedProps;if(i=i.compare,i=i!==null?i:Br,i(N,n)&&e.ref===t.ref)return ys(e,t,_)}return t.flags|=1,e=ps(x,n),e.ref=t.ref,e.return=t,t.child=e}function Yf(e,t,i,n,_){if(e!==null){var x=e.memoizedProps;if(Br(x,n)&&e.ref===t.ref)if(si=!1,t.pendingProps=n=x,Kc(e,_))(e.flags&131072)!==0&&(si=!0);else return t.lanes=e.lanes,ys(e,t,_)}return Fc(e,t,i,n,_)}function Kf(e,t,i,n){var _=n.children,x=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(x=x!==null?x.baseLanes|i:i,e!==null){for(n=t.child=e.child,_=0;n!==null;)_=_|n.lanes|n.childLanes,n=n.sibling;n=_&~x}else n=0,t.child=null;return Xf(e,t,x,i,n)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&io(t,x!==null?x.cachePool:null),x!==null?Vd(t,x):vc(),Jd(t);else return n=t.lanes=536870912,Xf(e,t,x!==null?x.baseLanes|i:i,i,n)}else x!==null?(io(t,x.cachePool),Vd(t,x),Fs(),t.memoizedState=null):(e!==null&&io(t,null),vc(),Fs());return hi(e,t,_,i),t.child}function Vr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Xf(e,t,i,n,_){var x=hc();return x=x===null?null:{parent:ti._currentValue,pool:x},t.memoizedState={baseLanes:i,cachePool:x},e!==null&&io(t,null),vc(),Jd(t),e!==null&&qn(e,t,n,!0),t.childLanes=_,null}function bo(e,t){return t=wo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Vf(e,t,i){return wn(t,e.child,null,i),e=bo(t,t.pendingProps),e.flags|=2,ji(t),t.memoizedState=null,e}function B0(e,t,i){var n=t.pendingProps,_=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(kt){if(n.mode==="hidden")return e=bo(t,n),t.lanes=536870912,Vr(null,e);if(bc(t),(e=Ft)?(e=lm(e,Wi),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:js!==null?{id:rs,overflow:as}:null,retryLane:536870912,hydrationErrors:null},i=Ad(e),i.return=t,t.child=i,ci=t,Ft=null)):e=null,e===null)throw Bs(t);return t.lanes=536870912,null}return bo(t,n)}var x=e.memoizedState;if(x!==null){var N=x.dehydrated;if(bc(t),_)if(t.flags&256)t.flags&=-257,t=Vf(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(S(558));else if(si||qn(e,t,i,!1),_=(i&e.childLanes)!==0,si||_){if(n=Ht,n!==null&&(N=Et(n,i),N!==0&&N!==x.retryLane))throw x.retryLane=N,fn(e,N),ki(n,e,N),Ic;To(),t=Vf(e,t,i)}else e=x.treeContext,Ft=Gi(N.nextSibling),ci=t,kt=!0,Os=null,Wi=!1,e!==null&&Bd(t,e),t=bo(t,n),t.flags|=4096;return t}return e=ps(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function yo(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(S(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Fc(e,t,i,n,_){return vn(t),i=wc(e,t,i,n,void 0,_),n=Sc(),e!==null&&!si?(xc(e,t,_),ys(e,t,_)):(kt&&n&&ic(t),t.flags|=1,hi(e,t,i,_),t.child)}function Jf(e,t,i,n,_,x){return vn(t),t.updateQueue=null,i=Zd(t,n,i,_),Qd(e),n=Sc(),e!==null&&!si?(xc(e,t,x),ys(e,t,x)):(kt&&n&&ic(t),t.flags|=1,hi(e,t,i,x),t.child)}function Qf(e,t,i,n,_){if(vn(t),t.stateNode===null){var x=Fn,N=i.contextType;typeof N=="object"&&N!==null&&(x=ui(N)),x=new i(n,x),t.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=Hc,t.stateNode=x,x._reactInternals=t,x=t.stateNode,x.props=n,x.state=t.memoizedState,x.refs={},fc(t),N=i.contextType,x.context=typeof N=="object"&&N!==null?ui(N):Fn,x.state=t.memoizedState,N=i.getDerivedStateFromProps,typeof N=="function"&&(zc(t,i,N,n),x.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(N=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),N!==x.state&&Hc.enqueueReplaceState(x,x.state,null),qr(t,n,x,_),Wr(),x.state=t.memoizedState),typeof x.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){x=t.stateNode;var q=t.memoizedProps,se=xn(i,q);x.props=se;var fe=x.context,Le=i.contextType;N=Fn,typeof Le=="object"&&Le!==null&&(N=ui(Le));var De=i.getDerivedStateFromProps;Le=typeof De=="function"||typeof x.getSnapshotBeforeUpdate=="function",q=t.pendingProps!==q,Le||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(q||fe!==N)&&Hf(t,x,n,N),zs=!1;var ge=t.memoizedState;x.state=ge,qr(t,n,x,_),Wr(),fe=t.memoizedState,q||ge!==fe||zs?(typeof De=="function"&&(zc(t,i,De,n),fe=t.memoizedState),(se=zs||zf(t,i,se,n,ge,fe,N))?(Le||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(t.flags|=4194308)):(typeof x.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=fe),x.props=n,x.state=fe,x.context=N,n=se):(typeof x.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{x=t.stateNode,pc(e,t),N=t.memoizedProps,Le=xn(i,N),x.props=Le,De=t.pendingProps,ge=x.context,fe=i.contextType,se=Fn,typeof fe=="object"&&fe!==null&&(se=ui(fe)),q=i.getDerivedStateFromProps,(fe=typeof q=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(N!==De||ge!==se)&&Hf(t,x,n,se),zs=!1,ge=t.memoizedState,x.state=ge,qr(t,n,x,_),Wr();var we=t.memoizedState;N!==De||ge!==we||zs||e!==null&&e.dependencies!==null&&eo(e.dependencies)?(typeof q=="function"&&(zc(t,i,q,n),we=t.memoizedState),(Le=zs||zf(t,i,Le,n,ge,we,se)||e!==null&&e.dependencies!==null&&eo(e.dependencies))?(fe||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(n,we,se),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(n,we,se)),typeof x.componentDidUpdate=="function"&&(t.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof x.componentDidUpdate!="function"||N===e.memoizedProps&&ge===e.memoizedState||(t.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&ge===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=we),x.props=n,x.state=we,x.context=se,n=Le):(typeof x.componentDidUpdate!="function"||N===e.memoizedProps&&ge===e.memoizedState||(t.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&ge===e.memoizedState||(t.flags|=1024),n=!1)}return x=n,yo(e,t),n=(t.flags&128)!==0,x||n?(x=t.stateNode,i=n&&typeof i.getDerivedStateFromError!="function"?null:x.render(),t.flags|=1,e!==null&&n?(t.child=wn(t,e.child,null,_),t.child=wn(t,null,i,_)):hi(e,t,i,_),t.memoizedState=x.state,e=t.child):e=ys(e,t,_),e}function Zf(e,t,i,n){return mn(),t.flags|=256,hi(e,t,i,n),t.child}var Uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $c(e){return{baseLanes:e,cachePool:Fd()}}function Wc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Bi),e}function ep(e,t,i){var n=t.pendingProps,_=!1,x=(t.flags&128)!==0,N;if((N=x)||(N=e!==null&&e.memoizedState===null?!1:(Zt.current&2)!==0),N&&(_=!0,t.flags&=-129),N=(t.flags&32)!==0,t.flags&=-33,e===null){if(kt){if(_?Is(t):Fs(),(e=Ft)?(e=lm(e,Wi),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:js!==null?{id:rs,overflow:as}:null,retryLane:536870912,hydrationErrors:null},i=Ad(e),i.return=t,t.child=i,ci=t,Ft=null)):e=null,e===null)throw Bs(t);return Eu(e)?t.lanes=32:t.lanes=536870912,null}var q=n.children;return n=n.fallback,_?(Fs(),_=t.mode,q=wo({mode:"hidden",children:q},_),n=pn(n,_,i,null),q.return=t,n.return=t,q.sibling=n,t.child=q,n=t.child,n.memoizedState=$c(i),n.childLanes=Wc(e,N,i),t.memoizedState=Uc,Vr(null,n)):(Is(t),qc(t,q))}var se=e.memoizedState;if(se!==null&&(q=se.dehydrated,q!==null)){if(x)t.flags&256?(Is(t),t.flags&=-257,t=Gc(e,t,i)):t.memoizedState!==null?(Fs(),t.child=e.child,t.flags|=128,t=null):(Fs(),q=n.fallback,_=t.mode,n=wo({mode:"visible",children:n.children},_),q=pn(q,_,i,null),q.flags|=2,n.return=t,q.return=t,n.sibling=q,t.child=n,wn(t,e.child,null,i),n=t.child,n.memoizedState=$c(i),n.childLanes=Wc(e,N,i),t.memoizedState=Uc,t=Vr(null,n));else if(Is(t),Eu(q)){if(N=q.nextSibling&&q.nextSibling.dataset,N)var fe=N.dgst;N=fe,n=Error(S(419)),n.stack="",n.digest=N,Hr({value:n,source:null,stack:null}),t=Gc(e,t,i)}else if(si||qn(e,t,i,!1),N=(i&e.childLanes)!==0,si||N){if(N=Ht,N!==null&&(n=Et(N,i),n!==0&&n!==se.retryLane))throw se.retryLane=n,fn(e,n),ki(N,e,n),Ic;ku(q)||To(),t=Gc(e,t,i)}else ku(q)?(t.flags|=192,t.child=e.child,t=null):(e=se.treeContext,Ft=Gi(q.nextSibling),ci=t,kt=!0,Os=null,Wi=!1,e!==null&&Bd(t,e),t=qc(t,n.children),t.flags|=4096);return t}return _?(Fs(),q=n.fallback,_=t.mode,se=e.child,fe=se.sibling,n=ps(se,{mode:"hidden",children:n.children}),n.subtreeFlags=se.subtreeFlags&65011712,fe!==null?q=ps(fe,q):(q=pn(q,_,i,null),q.flags|=2),q.return=t,n.return=t,n.sibling=q,t.child=n,Vr(null,n),n=t.child,q=e.child.memoizedState,q===null?q=$c(i):(_=q.cachePool,_!==null?(se=ti._currentValue,_=_.parent!==se?{parent:se,pool:se}:_):_=Fd(),q={baseLanes:q.baseLanes|i,cachePool:_}),n.memoizedState=q,n.childLanes=Wc(e,N,i),t.memoizedState=Uc,Vr(e.child,n)):(Is(t),i=e.child,e=i.sibling,i=ps(i,{mode:"visible",children:n.children}),i.return=t,i.sibling=null,e!==null&&(N=t.deletions,N===null?(t.deletions=[e],t.flags|=16):N.push(e)),t.child=i,t.memoizedState=null,i)}function qc(e,t){return t=wo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function wo(e,t){return e=Mi(22,e,null,t),e.lanes=0,e}function Gc(e,t,i){return wn(t,e.child,null,i),e=qc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tp(e,t,i){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),oc(e.return,t,i)}function Yc(e,t,i,n,_,x){var N=e.memoizedState;N===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:i,tailMode:_,treeForkCount:x}:(N.isBackwards=t,N.rendering=null,N.renderingStartTime=0,N.last=n,N.tail=i,N.tailMode=_,N.treeForkCount=x)}function ip(e,t,i){var n=t.pendingProps,_=n.revealOrder,x=n.tail;n=n.children;var N=Zt.current,q=(N&2)!==0;if(q?(N=N&1|2,t.flags|=128):N&=1,ee(Zt,N),hi(e,t,n,i),n=kt?zr:0,!q&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tp(e,i,t);else if(e.tag===19)tp(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(_){case"forwards":for(i=t.child,_=null;i!==null;)e=i.alternate,e!==null&&lo(e)===null&&(_=i),i=i.sibling;i=_,i===null?(_=t.child,t.child=null):(_=i.sibling,i.sibling=null),Yc(t,!1,_,i,x,n);break;case"backwards":case"unstable_legacy-backwards":for(i=null,_=t.child,t.child=null;_!==null;){if(e=_.alternate,e!==null&&lo(e)===null){t.child=_;break}e=_.sibling,_.sibling=i,i=_,_=e}Yc(t,!0,i,null,x,n);break;case"together":Yc(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function ys(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Ws|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(qn(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(S(153));if(t.child!==null){for(e=t.child,i=ps(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=ps(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Kc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&eo(e)))}function N0(e,t,i){switch(t.tag){case 3:G(t,t.stateNode.containerInfo),Ns(t,ti,e.memoizedState.cache),mn();break;case 27:case 5:ae(t);break;case 4:G(t,t.stateNode.containerInfo);break;case 10:Ns(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,bc(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Is(t),t.flags|=128,null):(i&t.child.childLanes)!==0?ep(e,t,i):(Is(t),e=ys(e,t,i),e!==null?e.sibling:null);Is(t);break;case 19:var _=(e.flags&128)!==0;if(n=(i&t.childLanes)!==0,n||(qn(e,t,i,!1),n=(i&t.childLanes)!==0),_){if(n)return ip(e,t,i);t.flags|=128}if(_=t.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),ee(Zt,Zt.current),n)break;return null;case 22:return t.lanes=0,Kf(e,t,i,t.pendingProps);case 24:Ns(t,ti,e.memoizedState.cache)}return ys(e,t,i)}function sp(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)si=!0;else{if(!Kc(e,i)&&(t.flags&128)===0)return si=!1,N0(e,t,i);si=(e.flags&131072)!==0}else si=!1,kt&&(t.flags&1048576)!==0&&Od(t,zr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=bn(t.elementType),t.type=e,typeof e=="function")Zl(e)?(n=xn(e,n),t.tag=1,t=Qf(null,t,e,n,i)):(t.tag=0,t=Fc(null,t,e,n,i));else{if(e!=null){var _=e.$$typeof;if(_===y){t.tag=11,t=qf(null,t,e,n,i);break e}else if(_===D){t.tag=14,t=Gf(null,t,e,n,i);break e}}throw t=K(e)||e,Error(S(306,t,""))}}return t;case 0:return Fc(e,t,t.type,t.pendingProps,i);case 1:return n=t.type,_=xn(n,t.pendingProps),Qf(e,t,n,_,i);case 3:e:{if(G(t,t.stateNode.containerInfo),e===null)throw Error(S(387));n=t.pendingProps;var x=t.memoizedState;_=x.element,pc(e,t),qr(t,n,null,i);var N=t.memoizedState;if(n=N.cache,Ns(t,ti,n),n!==x.cache&&lc(t,[ti],i,!0),Wr(),n=N.element,x.isDehydrated)if(x={element:n,isDehydrated:!1,cache:N.cache},t.updateQueue.baseState=x,t.memoizedState=x,t.flags&256){t=Zf(e,t,n,i);break e}else if(n!==_){_=Fi(Error(S(424)),t),Hr(_),t=Zf(e,t,n,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ft=Gi(e.firstChild),ci=t,kt=!0,Os=null,Wi=!0,i=Yd(t,null,n,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(mn(),n===_){t=ys(e,t,i);break e}hi(e,t,n,i)}t=t.child}return t;case 26:return yo(e,t),e===null?(i=pm(t.type,null,t.pendingProps,null))?t.memoizedState=i:kt||(i=t.type,e=t.pendingProps,n=zo(ke.current).createElement(i),n[be]=t,n[nt]=e,di(n,i,e),Qt(n),t.stateNode=n):t.memoizedState=pm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ae(t),e===null&&kt&&(n=t.stateNode=hm(t.type,t.pendingProps,ke.current),ci=t,Wi=!0,_=Ft,Xs(t.type)?(Lu=_,Ft=Gi(n.firstChild)):Ft=_),hi(e,t,t.pendingProps.children,i),yo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&kt&&((_=n=Ft)&&(n=db(n,t.type,t.pendingProps,Wi),n!==null?(t.stateNode=n,ci=t,Ft=Gi(n.firstChild),Wi=!1,_=!0):_=!1),_||Bs(t)),ae(t),_=t.type,x=t.pendingProps,N=e!==null?e.memoizedProps:null,n=x.children,Su(_,x)?n=null:N!==null&&Su(_,N)&&(t.flags|=32),t.memoizedState!==null&&(_=wc(e,t,L0,null,null,i),ha._currentValue=_),yo(e,t),hi(e,t,n,i),t.child;case 6:return e===null&&kt&&((e=i=Ft)&&(i=fb(i,t.pendingProps,Wi),i!==null?(t.stateNode=i,ci=t,Ft=null,e=!0):e=!1),e||Bs(t)),null;case 13:return ep(e,t,i);case 4:return G(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=wn(t,null,n,i):hi(e,t,n,i),t.child;case 11:return qf(e,t,t.type,t.pendingProps,i);case 7:return hi(e,t,t.pendingProps,i),t.child;case 8:return hi(e,t,t.pendingProps.children,i),t.child;case 12:return hi(e,t,t.pendingProps.children,i),t.child;case 10:return n=t.pendingProps,Ns(t,t.type,n.value),hi(e,t,n.children,i),t.child;case 9:return _=t.type._context,n=t.pendingProps.children,vn(t),_=ui(_),n=n(_),t.flags|=1,hi(e,t,n,i),t.child;case 14:return Gf(e,t,t.type,t.pendingProps,i);case 15:return Yf(e,t,t.type,t.pendingProps,i);case 19:return ip(e,t,i);case 31:return B0(e,t,i);case 22:return Kf(e,t,i,t.pendingProps);case 24:return vn(t),n=ui(ti),e===null?(_=hc(),_===null&&(_=Ht,x=cc(),_.pooledCache=x,x.refCount++,x!==null&&(_.pooledCacheLanes|=i),_=x),t.memoizedState={parent:n,cache:_},fc(t),Ns(t,ti,_)):((e.lanes&i)!==0&&(pc(e,t),qr(t,null,null,i),Wr()),_=e.memoizedState,x=t.memoizedState,_.parent!==n?(_={parent:n,cache:n},t.memoizedState=_,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=_),Ns(t,ti,n)):(n=x.cache,Ns(t,ti,n),n!==_.cache&&lc(t,[ti],i,!0))),hi(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(S(156,t.tag))}function ws(e){e.flags|=4}function Xc(e,t,i,n,_){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(_&335544128)===_)if(e.stateNode.complete)e.flags|=8192;else if(Tp())e.flags|=8192;else throw yn=no,dc}else e.flags&=-16777217}function np(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!bm(t))if(Tp())e.flags|=8192;else throw yn=no,dc}function So(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ne():536870912,e.lanes|=t,sr|=t)}function Jr(e,t){if(!kt)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var n=null;i!==null;)i.alternate!==null&&(n=i),i=i.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,n=0;if(t)for(var _=e.child;_!==null;)i|=_.lanes|_.childLanes,n|=_.subtreeFlags&65011712,n|=_.flags&65011712,_.return=e,_=_.sibling;else for(_=e.child;_!==null;)i|=_.lanes|_.childLanes,n|=_.subtreeFlags,n|=_.flags,_.return=e,_=_.sibling;return e.subtreeFlags|=n,e.childLanes=i,t}function z0(e,t,i){var n=t.pendingProps;switch(sc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ut(t),null;case 1:return Ut(t),null;case 3:return i=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),vs(ti),he(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Wn(t)?ws(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,rc())),Ut(t),null;case 26:var _=t.type,x=t.memoizedState;return e===null?(ws(t),x!==null?(Ut(t),np(t,x)):(Ut(t),Xc(t,_,null,n,i))):x?x!==e.memoizedState?(ws(t),Ut(t),np(t,x)):(Ut(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&ws(t),Ut(t),Xc(t,_,e,n,i)),null;case 27:if(Ae(t),i=ke.current,_=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&ws(t);else{if(!n){if(t.stateNode===null)throw Error(S(166));return Ut(t),null}e=ne.current,Wn(t)?Nd(t):(e=hm(_,n,i),t.stateNode=e,ws(t))}return Ut(t),null;case 5:if(Ae(t),_=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&ws(t);else{if(!n){if(t.stateNode===null)throw Error(S(166));return Ut(t),null}if(x=ne.current,Wn(t))Nd(t);else{var N=zo(ke.current);switch(x){case 1:x=N.createElementNS("http://www.w3.org/2000/svg",_);break;case 2:x=N.createElementNS("http://www.w3.org/1998/Math/MathML",_);break;default:switch(_){case"svg":x=N.createElementNS("http://www.w3.org/2000/svg",_);break;case"math":x=N.createElementNS("http://www.w3.org/1998/Math/MathML",_);break;case"script":x=N.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof n.is=="string"?N.createElement("select",{is:n.is}):N.createElement("select"),n.multiple?x.multiple=!0:n.size&&(x.size=n.size);break;default:x=typeof n.is=="string"?N.createElement(_,{is:n.is}):N.createElement(_)}}x[be]=t,x[nt]=n;e:for(N=t.child;N!==null;){if(N.tag===5||N.tag===6)x.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===t)break e;for(;N.sibling===null;){if(N.return===null||N.return===t)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}t.stateNode=x;e:switch(di(x,_,n),_){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&ws(t)}}return Ut(t),Xc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&ws(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(S(166));if(e=ke.current,Wn(t)){if(e=t.stateNode,i=t.memoizedProps,n=null,_=ci,_!==null)switch(_.tag){case 27:case 5:n=_.memoizedProps}e[be]=t,e=!!(e.nodeValue===i||n!==null&&n.suppressHydrationWarning===!0||em(e.nodeValue,i)),e||Bs(t,!0)}else e=zo(e).createTextNode(n),e[be]=t,t.stateNode=e}return Ut(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(n=Wn(t),i!==null){if(e===null){if(!n)throw Error(S(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(557));e[be]=t}else mn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ut(t),e=!1}else i=rc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(ji(t),t):(ji(t),null);if((t.flags&128)!==0)throw Error(S(558))}return Ut(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_=Wn(t),n!==null&&n.dehydrated!==null){if(e===null){if(!_)throw Error(S(318));if(_=t.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(S(317));_[be]=t}else mn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ut(t),_=!1}else _=rc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=_),_=!0;if(!_)return t.flags&256?(ji(t),t):(ji(t),null)}return ji(t),(t.flags&128)!==0?(t.lanes=i,t):(i=n!==null,e=e!==null&&e.memoizedState!==null,i&&(n=t.child,_=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(_=n.alternate.memoizedState.cachePool.pool),x=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(x=n.memoizedState.cachePool.pool),x!==_&&(n.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),So(t,t.updateQueue),Ut(t),null);case 4:return he(),e===null&&vu(t.stateNode.containerInfo),Ut(t),null;case 10:return vs(t.type),Ut(t),null;case 19:if(W(Zt),n=t.memoizedState,n===null)return Ut(t),null;if(_=(t.flags&128)!==0,x=n.rendering,x===null)if(_)Jr(n,!1);else{if(Vt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(x=lo(e),x!==null){for(t.flags|=128,Jr(n,!1),e=x.updateQueue,t.updateQueue=e,So(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Md(i,e),i=i.sibling;return ee(Zt,Zt.current&1|2),kt&&ms(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ue()>Lo&&(t.flags|=128,_=!0,Jr(n,!1),t.lanes=4194304)}else{if(!_)if(e=lo(x),e!==null){if(t.flags|=128,_=!0,e=e.updateQueue,t.updateQueue=e,So(t,e),Jr(n,!0),n.tail===null&&n.tailMode==="hidden"&&!x.alternate&&!kt)return Ut(t),null}else 2*Ue()-n.renderingStartTime>Lo&&i!==536870912&&(t.flags|=128,_=!0,Jr(n,!1),t.lanes=4194304);n.isBackwards?(x.sibling=t.child,t.child=x):(e=n.last,e!==null?e.sibling=x:t.child=x,n.last=x)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Ue(),e.sibling=null,i=Zt.current,ee(Zt,_?i&1|2:i&1),kt&&ms(t,n.treeForkCount),e):(Ut(t),null);case 22:case 23:return ji(t),_c(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(i&536870912)!==0&&(t.flags&128)===0&&(Ut(t),t.subtreeFlags&6&&(t.flags|=8192)):Ut(t),i=t.updateQueue,i!==null&&So(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==i&&(t.flags|=2048),e!==null&&W(_n),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),vs(ti),Ut(t),null;case 25:return null;case 30:return null}throw Error(S(156,t.tag))}function H0(e,t){switch(sc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vs(ti),he(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ae(t),null;case 31:if(t.memoizedState!==null){if(ji(t),t.alternate===null)throw Error(S(340));mn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ji(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));mn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(Zt),null;case 4:return he(),null;case 10:return vs(t.type),null;case 22:case 23:return ji(t),_c(),e!==null&&W(_n),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return vs(ti),null;case 25:return null;default:return null}}function rp(e,t){switch(sc(t),t.tag){case 3:vs(ti),he();break;case 26:case 27:case 5:Ae(t);break;case 4:he();break;case 31:t.memoizedState!==null&&ji(t);break;case 13:ji(t);break;case 19:W(Zt);break;case 10:vs(t.type);break;case 22:case 23:ji(t),_c(),e!==null&&W(_n);break;case 24:vs(ti)}}function Qr(e,t){try{var i=t.updateQueue,n=i!==null?i.lastEffect:null;if(n!==null){var _=n.next;i=_;do{if((i.tag&e)===e){n=void 0;var x=i.create,N=i.inst;n=x(),N.destroy=n}i=i.next}while(i!==_)}}catch(q){jt(t,t.return,q)}}function Us(e,t,i){try{var n=t.updateQueue,_=n!==null?n.lastEffect:null;if(_!==null){var x=_.next;n=x;do{if((n.tag&e)===e){var N=n.inst,q=N.destroy;if(q!==void 0){N.destroy=void 0,_=t;var se=i,fe=q;try{fe()}catch(Le){jt(_,se,Le)}}}n=n.next}while(n!==x)}}catch(Le){jt(t,t.return,Le)}}function ap(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Xd(t,i)}catch(n){jt(e,e.return,n)}}}function op(e,t,i){i.props=xn(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(n){jt(e,t,n)}}function Zr(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof i=="function"?e.refCleanup=i(n):i.current=n}}catch(_){jt(e,t,_)}}function os(e,t){var i=e.ref,n=e.refCleanup;if(i!==null)if(typeof n=="function")try{n()}catch(_){jt(e,t,_)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(_){jt(e,t,_)}else i.current=null}function lp(e){var t=e.type,i=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&n.focus();break e;case"img":i.src?n.src=i.src:i.srcSet&&(n.srcset=i.srcSet)}}catch(_){jt(e,e.return,_)}}function Vc(e,t,i){try{var n=e.stateNode;ab(n,e.type,i,t),n[nt]=t}catch(_){jt(e,e.return,_)}}function cp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Xs(e.type)||e.tag===4}function Jc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Xs(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,i){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=ds));else if(n!==4&&(n===27&&Xs(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,i),e=e.sibling;e!==null;)Qc(e,t,i),e=e.sibling}function xo(e,t,i){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(n!==4&&(n===27&&Xs(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(xo(e,t,i),e=e.sibling;e!==null;)xo(e,t,i),e=e.sibling}function up(e){var t=e.stateNode,i=e.memoizedProps;try{for(var n=e.type,_=t.attributes;_.length;)t.removeAttributeNode(_[0]);di(t,n,i),t[be]=e,t[nt]=i}catch(x){jt(e,e.return,x)}}var Ss=!1,ni=!1,Zc=!1,hp=typeof WeakSet=="function"?WeakSet:Set,li=null;function P0(e,t){if(e=e.containerInfo,yu=Wo,e=Sd(e),Gl(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var n=i.getSelection&&i.getSelection();if(n&&n.rangeCount!==0){i=n.anchorNode;var _=n.anchorOffset,x=n.focusNode;n=n.focusOffset;try{i.nodeType,x.nodeType}catch{i=null;break e}var N=0,q=-1,se=-1,fe=0,Le=0,De=e,ge=null;t:for(;;){for(var we;De!==i||_!==0&&De.nodeType!==3||(q=N+_),De!==x||n!==0&&De.nodeType!==3||(se=N+n),De.nodeType===3&&(N+=De.nodeValue.length),(we=De.firstChild)!==null;)ge=De,De=we;for(;;){if(De===e)break t;if(ge===i&&++fe===_&&(q=N),ge===x&&++Le===n&&(se=N),(we=De.nextSibling)!==null)break;De=ge,ge=De.parentNode}De=we}i=q===-1||se===-1?null:{start:q,end:se}}else i=null}i=i||{start:0,end:0}}else i=null;for(wu={focusedElem:e,selectionRange:i},Wo=!1,li=t;li!==null;)if(t=li,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,li=e;else for(;li!==null;){switch(t=li,x=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)_=e[i],_.ref.impl=_.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&x!==null){e=void 0,i=t,_=x.memoizedProps,x=x.memoizedState,n=i.stateNode;try{var Ge=xn(i.type,_);e=n.getSnapshotBeforeUpdate(Ge,x),n.__reactInternalSnapshotBeforeUpdate=e}catch(lt){jt(i,i.return,lt)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Cu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Cu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(S(163))}if(e=t.sibling,e!==null){e.return=t.return,li=e;break}li=t.return}}function dp(e,t,i){var n=i.flags;switch(i.tag){case 0:case 11:case 15:Cs(e,i),n&4&&Qr(5,i);break;case 1:if(Cs(e,i),n&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(N){jt(i,i.return,N)}else{var _=xn(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(_,t,e.__reactInternalSnapshotBeforeUpdate)}catch(N){jt(i,i.return,N)}}n&64&&ap(i),n&512&&Zr(i,i.return);break;case 3:if(Cs(e,i),n&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Xd(e,t)}catch(N){jt(i,i.return,N)}}break;case 27:t===null&&n&4&&up(i);case 26:case 5:Cs(e,i),t===null&&n&4&&lp(i),n&512&&Zr(i,i.return);break;case 12:Cs(e,i);break;case 31:Cs(e,i),n&4&&mp(e,i);break;case 13:Cs(e,i),n&4&&gp(e,i),n&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=K0.bind(null,i),pb(e,i))));break;case 22:if(n=i.memoizedState!==null||Ss,!n){t=t!==null&&t.memoizedState!==null||ni,_=Ss;var x=ni;Ss=n,(ni=t)&&!x?ks(e,i,(i.subtreeFlags&8772)!==0):Cs(e,i),Ss=_,ni=x}break;case 30:break;default:Cs(e,i)}}function fp(e){var t=e.alternate;t!==null&&(e.alternate=null,fp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var qt=null,wi=!1;function xs(e,t,i){for(i=i.child;i!==null;)pp(e,t,i),i=i.sibling}function pp(e,t,i){if(ie&&typeof ie.onCommitFiberUnmount=="function")try{ie.onCommitFiberUnmount(le,i)}catch{}switch(i.tag){case 26:ni||os(i,t),xs(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ni||os(i,t);var n=qt,_=wi;Xs(i.type)&&(qt=i.stateNode,wi=!1),xs(e,t,i),la(i.stateNode),qt=n,wi=_;break;case 5:ni||os(i,t);case 6:if(n=qt,_=wi,qt=null,xs(e,t,i),qt=n,wi=_,qt!==null)if(wi)try{(qt.nodeType===9?qt.body:qt.nodeName==="HTML"?qt.ownerDocument.body:qt).removeChild(i.stateNode)}catch(x){jt(i,t,x)}else try{qt.removeChild(i.stateNode)}catch(x){jt(i,t,x)}break;case 18:qt!==null&&(wi?(e=qt,am(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),hr(e)):am(qt,i.stateNode));break;case 4:n=qt,_=wi,qt=i.stateNode.containerInfo,wi=!0,xs(e,t,i),qt=n,wi=_;break;case 0:case 11:case 14:case 15:Us(2,i,t),ni||Us(4,i,t),xs(e,t,i);break;case 1:ni||(os(i,t),n=i.stateNode,typeof n.componentWillUnmount=="function"&&op(i,t,n)),xs(e,t,i);break;case 21:xs(e,t,i);break;case 22:ni=(n=ni)||i.memoizedState!==null,xs(e,t,i),ni=n;break;default:xs(e,t,i)}}function mp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{hr(e)}catch(i){jt(t,t.return,i)}}}function gp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{hr(e)}catch(i){jt(t,t.return,i)}}function I0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new hp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new hp),t;default:throw Error(S(435,e.tag))}}function Co(e,t){var i=I0(e);t.forEach(function(n){if(!i.has(n)){i.add(n);var _=X0.bind(null,e,n);n.then(_,_)}})}function Si(e,t){var i=t.deletions;if(i!==null)for(var n=0;n<i.length;n++){var _=i[n],x=e,N=t,q=N;e:for(;q!==null;){switch(q.tag){case 27:if(Xs(q.type)){qt=q.stateNode,wi=!1;break e}break;case 5:qt=q.stateNode,wi=!1;break e;case 3:case 4:qt=q.stateNode.containerInfo,wi=!0;break e}q=q.return}if(qt===null)throw Error(S(160));pp(x,N,_),qt=null,wi=!1,x=_.alternate,x!==null&&(x.return=null),_.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vp(t,e),t=t.sibling}var Qi=null;function vp(e,t){var i=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Si(t,e),xi(e),n&4&&(Us(3,e,e.return),Qr(3,e),Us(5,e,e.return));break;case 1:Si(t,e),xi(e),n&512&&(ni||i===null||os(i,i.return)),n&64&&Ss&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?n:i.concat(n))));break;case 26:var _=Qi;if(Si(t,e),xi(e),n&512&&(ni||i===null||os(i,i.return)),n&4){var x=i!==null?i.memoizedState:null;if(n=e.memoizedState,i===null)if(n===null)if(e.stateNode===null){e:{n=e.type,i=e.memoizedProps,_=_.ownerDocument||_;t:switch(n){case"title":x=_.getElementsByTagName("title")[0],(!x||x[Kt]||x[be]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=_.createElement(n),_.head.insertBefore(x,_.querySelector("head > title"))),di(x,n,i),x[be]=e,Qt(x),n=x;break e;case"link":var N=vm("link","href",_).get(n+(i.href||""));if(N){for(var q=0;q<N.length;q++)if(x=N[q],x.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&x.getAttribute("rel")===(i.rel==null?null:i.rel)&&x.getAttribute("title")===(i.title==null?null:i.title)&&x.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){N.splice(q,1);break t}}x=_.createElement(n),di(x,n,i),_.head.appendChild(x);break;case"meta":if(N=vm("meta","content",_).get(n+(i.content||""))){for(q=0;q<N.length;q++)if(x=N[q],x.getAttribute("content")===(i.content==null?null:""+i.content)&&x.getAttribute("name")===(i.name==null?null:i.name)&&x.getAttribute("property")===(i.property==null?null:i.property)&&x.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&x.getAttribute("charset")===(i.charSet==null?null:i.charSet)){N.splice(q,1);break t}}x=_.createElement(n),di(x,n,i),_.head.appendChild(x);break;default:throw Error(S(468,n))}x[be]=e,Qt(x),n=x}e.stateNode=n}else _m(_,e.type,e.stateNode);else e.stateNode=gm(_,n,e.memoizedProps);else x!==n?(x===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):x.count--,n===null?_m(_,e.type,e.stateNode):gm(_,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Vc(e,e.memoizedProps,i.memoizedProps)}break;case 27:Si(t,e),xi(e),n&512&&(ni||i===null||os(i,i.return)),i!==null&&n&4&&Vc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Si(t,e),xi(e),n&512&&(ni||i===null||os(i,i.return)),e.flags&32){_=e.stateNode;try{On(_,"")}catch(Ge){jt(e,e.return,Ge)}}n&4&&e.stateNode!=null&&(_=e.memoizedProps,Vc(e,_,i!==null?i.memoizedProps:_)),n&1024&&(Zc=!0);break;case 6:if(Si(t,e),xi(e),n&4){if(e.stateNode===null)throw Error(S(162));n=e.memoizedProps,i=e.stateNode;try{i.nodeValue=n}catch(Ge){jt(e,e.return,Ge)}}break;case 3:if(Io=null,_=Qi,Qi=Ho(t.containerInfo),Si(t,e),Qi=_,xi(e),n&4&&i!==null&&i.memoizedState.isDehydrated)try{hr(t.containerInfo)}catch(Ge){jt(e,e.return,Ge)}Zc&&(Zc=!1,_p(e));break;case 4:n=Qi,Qi=Ho(e.stateNode.containerInfo),Si(t,e),xi(e),Qi=n;break;case 12:Si(t,e),xi(e);break;case 31:Si(t,e),xi(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Co(e,n)));break;case 13:Si(t,e),xi(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Eo=Ue()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Co(e,n)));break;case 22:_=e.memoizedState!==null;var se=i!==null&&i.memoizedState!==null,fe=Ss,Le=ni;if(Ss=fe||_,ni=Le||se,Si(t,e),ni=Le,Ss=fe,xi(e),n&8192)e:for(t=e.stateNode,t._visibility=_?t._visibility&-2:t._visibility|1,_&&(i===null||se||Ss||ni||Cn(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){se=i=t;try{if(x=se.stateNode,_)N=x.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{q=se.stateNode;var De=se.memoizedProps.style,ge=De!=null&&De.hasOwnProperty("display")?De.display:null;q.style.display=ge==null||typeof ge=="boolean"?"":(""+ge).trim()}}catch(Ge){jt(se,se.return,Ge)}}}else if(t.tag===6){if(i===null){se=t;try{se.stateNode.nodeValue=_?"":se.memoizedProps}catch(Ge){jt(se,se.return,Ge)}}}else if(t.tag===18){if(i===null){se=t;try{var we=se.stateNode;_?om(we,!0):om(se.stateNode,!1)}catch(Ge){jt(se,se.return,Ge)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(i=n.retryQueue,i!==null&&(n.retryQueue=null,Co(e,i))));break;case 19:Si(t,e),xi(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Co(e,n)));break;case 30:break;case 21:break;default:Si(t,e),xi(e)}}function xi(e){var t=e.flags;if(t&2){try{for(var i,n=e.return;n!==null;){if(cp(n)){i=n;break}n=n.return}if(i==null)throw Error(S(160));switch(i.tag){case 27:var _=i.stateNode,x=Jc(e);xo(e,x,_);break;case 5:var N=i.stateNode;i.flags&32&&(On(N,""),i.flags&=-33);var q=Jc(e);xo(e,q,N);break;case 3:case 4:var se=i.stateNode.containerInfo,fe=Jc(e);Qc(e,fe,se);break;default:throw Error(S(161))}}catch(Le){jt(e,e.return,Le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _p(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_p(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Cs(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)dp(e,t.alternate,t),t=t.sibling}function Cn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Us(4,t,t.return),Cn(t);break;case 1:os(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&op(t,t.return,i),Cn(t);break;case 27:la(t.stateNode);case 26:case 5:os(t,t.return),Cn(t);break;case 22:t.memoizedState===null&&Cn(t);break;case 30:Cn(t);break;default:Cn(t)}e=e.sibling}}function ks(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,_=e,x=t,N=x.flags;switch(x.tag){case 0:case 11:case 15:ks(_,x,i),Qr(4,x);break;case 1:if(ks(_,x,i),n=x,_=n.stateNode,typeof _.componentDidMount=="function")try{_.componentDidMount()}catch(fe){jt(n,n.return,fe)}if(n=x,_=n.updateQueue,_!==null){var q=n.stateNode;try{var se=_.shared.hiddenCallbacks;if(se!==null)for(_.shared.hiddenCallbacks=null,_=0;_<se.length;_++)Kd(se[_],q)}catch(fe){jt(n,n.return,fe)}}i&&N&64&&ap(x),Zr(x,x.return);break;case 27:up(x);case 26:case 5:ks(_,x,i),i&&n===null&&N&4&&lp(x),Zr(x,x.return);break;case 12:ks(_,x,i);break;case 31:ks(_,x,i),i&&N&4&&mp(_,x);break;case 13:ks(_,x,i),i&&N&4&&gp(_,x);break;case 22:x.memoizedState===null&&ks(_,x,i),Zr(x,x.return);break;case 30:break;default:ks(_,x,i)}t=t.sibling}}function eu(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Pr(i))}function tu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Pr(e))}function Zi(e,t,i,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bp(e,t,i,n),t=t.sibling}function bp(e,t,i,n){var _=t.flags;switch(t.tag){case 0:case 11:case 15:Zi(e,t,i,n),_&2048&&Qr(9,t);break;case 1:Zi(e,t,i,n);break;case 3:Zi(e,t,i,n),_&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Pr(e)));break;case 12:if(_&2048){Zi(e,t,i,n),e=t.stateNode;try{var x=t.memoizedProps,N=x.id,q=x.onPostCommit;typeof q=="function"&&q(N,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(se){jt(t,t.return,se)}}else Zi(e,t,i,n);break;case 31:Zi(e,t,i,n);break;case 13:Zi(e,t,i,n);break;case 23:break;case 22:x=t.stateNode,N=t.alternate,t.memoizedState!==null?x._visibility&2?Zi(e,t,i,n):ea(e,t):x._visibility&2?Zi(e,t,i,n):(x._visibility|=2,er(e,t,i,n,(t.subtreeFlags&10256)!==0||!1)),_&2048&&eu(N,t);break;case 24:Zi(e,t,i,n),_&2048&&tu(t.alternate,t);break;default:Zi(e,t,i,n)}}function er(e,t,i,n,_){for(_=_&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var x=e,N=t,q=i,se=n,fe=N.flags;switch(N.tag){case 0:case 11:case 15:er(x,N,q,se,_),Qr(8,N);break;case 23:break;case 22:var Le=N.stateNode;N.memoizedState!==null?Le._visibility&2?er(x,N,q,se,_):ea(x,N):(Le._visibility|=2,er(x,N,q,se,_)),_&&fe&2048&&eu(N.alternate,N);break;case 24:er(x,N,q,se,_),_&&fe&2048&&tu(N.alternate,N);break;default:er(x,N,q,se,_)}t=t.sibling}}function ea(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,n=t,_=n.flags;switch(n.tag){case 22:ea(i,n),_&2048&&eu(n.alternate,n);break;case 24:ea(i,n),_&2048&&tu(n.alternate,n);break;default:ea(i,n)}t=t.sibling}}var ta=8192;function tr(e,t,i){if(e.subtreeFlags&ta)for(e=e.child;e!==null;)yp(e,t,i),e=e.sibling}function yp(e,t,i){switch(e.tag){case 26:tr(e,t,i),e.flags&ta&&e.memoizedState!==null&&Eb(i,Qi,e.memoizedState,e.memoizedProps);break;case 5:tr(e,t,i);break;case 3:case 4:var n=Qi;Qi=Ho(e.stateNode.containerInfo),tr(e,t,i),Qi=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=ta,ta=16777216,tr(e,t,i),ta=n):tr(e,t,i));break;default:tr(e,t,i)}}function wp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ia(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var n=t[i];li=n,xp(n,e)}wp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Sp(e),e=e.sibling}function Sp(e){switch(e.tag){case 0:case 11:case 15:ia(e),e.flags&2048&&Us(9,e,e.return);break;case 3:ia(e);break;case 12:ia(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ko(e)):ia(e);break;default:ia(e)}}function ko(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var n=t[i];li=n,xp(n,e)}wp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Us(8,t,t.return),ko(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,ko(t));break;default:ko(t)}e=e.sibling}}function xp(e,t){for(;li!==null;){var i=li;switch(i.tag){case 0:case 11:case 15:Us(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var n=i.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Pr(i.memoizedState.cache)}if(n=i.child,n!==null)n.return=i,li=n;else e:for(i=e;li!==null;){n=li;var _=n.sibling,x=n.return;if(fp(n),n===i){li=null;break e}if(_!==null){_.return=x,li=_;break e}li=x}}}var F0={getCacheForType:function(e){var t=ui(ti),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return ui(ti).controller.signal}},U0=typeof WeakMap=="function"?WeakMap:Map,Mt=0,Ht=null,yt=null,xt=0,At=0,Oi=null,$s=!1,ir=!1,iu=!1,Es=0,Vt=0,Ws=0,kn=0,su=0,Bi=0,sr=0,sa=null,Ci=null,nu=!1,Eo=0,Cp=0,Lo=1/0,Ro=null,qs=null,ri=0,Gs=null,nr=null,Ls=0,ru=0,au=null,kp=null,na=0,ou=null;function Ni(){return(Mt&2)!==0&&xt!==0?xt&-xt:Y.T!==null?fu():Ot()}function Ep(){if(Bi===0)if((xt&536870912)===0||kt){var e=te;te<<=1,(te&3932160)===0&&(te=262144),Bi=e}else Bi=536870912;return e=Ai.current,e!==null&&(e.flags|=32),Bi}function ki(e,t,i){(e===Ht&&(At===2||At===9)||e.cancelPendingCommit!==null)&&(rr(e,0),Ys(e,xt,Bi,!1)),Xe(e,i),((Mt&2)===0||e!==Ht)&&(e===Ht&&((Mt&2)===0&&(kn|=i),Vt===4&&Ys(e,xt,Bi,!1)),ls(e))}function Lp(e,t,i){if((Mt&6)!==0)throw Error(S(327));var n=!i&&(t&127)===0&&(t&e.expiredLanes)===0||ve(e,t),_=n?q0(e,t):cu(e,t,!0),x=n;do{if(_===0){ir&&!n&&Ys(e,t,0,!1);break}else{if(i=e.current.alternate,x&&!$0(i)){_=cu(e,t,!1),x=!1;continue}if(_===2){if(x=t,e.errorRecoveryDisabledLanes&x)var N=0;else N=e.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){t=N;e:{var q=e;_=sa;var se=q.current.memoizedState.isDehydrated;if(se&&(rr(q,N).flags|=256),N=cu(q,N,!1),N!==2){if(iu&&!se){q.errorRecoveryDisabledLanes|=x,kn|=x,_=4;break e}x=Ci,Ci=_,x!==null&&(Ci===null?Ci=x:Ci.push.apply(Ci,x))}_=N}if(x=!1,_!==2)continue}}if(_===1){rr(e,0),Ys(e,t,0,!0);break}e:{switch(n=e,x=_,x){case 0:case 1:throw Error(S(345));case 4:if((t&4194048)!==t)break;case 6:Ys(n,t,Bi,!$s);break e;case 2:Ci=null;break;case 3:case 5:break;default:throw Error(S(329))}if((t&62914560)===t&&(_=Eo+300-Ue(),10<_)){if(Ys(n,t,Bi,!$s),me(n,0,!0)!==0)break e;Ls=t,n.timeoutHandle=nm(Rp.bind(null,n,i,Ci,Ro,nu,t,Bi,kn,sr,$s,x,"Throttled",-0,0),_);break e}Rp(n,i,Ci,Ro,nu,t,Bi,kn,sr,$s,x,null,-0,0)}}break}while(!0);ls(e)}function Rp(e,t,i,n,_,x,N,q,se,fe,Le,De,ge,we){if(e.timeoutHandle=-1,De=t.subtreeFlags,De&8192||(De&16785408)===16785408){De={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ds},yp(t,x,De);var Ge=(x&62914560)===x?Eo-Ue():(x&4194048)===x?Cp-Ue():0;if(Ge=Lb(De,Ge),Ge!==null){Ls=x,e.cancelPendingCommit=Ge(Np.bind(null,e,t,x,i,n,_,N,q,se,Le,De,null,ge,we)),Ys(e,x,N,!fe);return}}Np(e,t,x,i,n,_,N,q,se)}function $0(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var n=0;n<i.length;n++){var _=i[n],x=_.getSnapshot;_=_.value;try{if(!Ti(x(),_))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ys(e,t,i,n){t&=~su,t&=~kn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var _=t;0<_;){var x=31-ue(_),N=1<<x;n[x]=-1,_&=~N}i!==0&&Je(e,i,t)}function Do(){return(Mt&6)===0?(ra(0),!1):!0}function lu(){if(yt!==null){if(At===0)var e=yt.return;else e=yt,gs=gn=null,Cc(e),Xn=null,Fr=0,e=yt;for(;e!==null;)rp(e.alternate,e),e=e.return;yt=null}}function rr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,cb(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Ls=0,lu(),Ht=e,yt=i=ps(e.current,null),xt=t,At=0,Oi=null,$s=!1,ir=ve(e,t),iu=!1,sr=Bi=su=kn=Ws=Vt=0,Ci=sa=null,nu=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var _=31-ue(n),x=1<<_;t|=e[_],n&=~x}return Es=t,Xa(),i}function Dp(e,t){pt=null,Y.H=Xr,t===Kn||t===so?(t=Wd(),At=3):t===dc?(t=Wd(),At=4):At=t===Ic?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Oi=t,yt===null&&(Vt=1,_o(e,Fi(t,e.current)))}function Tp(){var e=Ai.current;return e===null?!0:(xt&4194048)===xt?qi===null:(xt&62914560)===xt||(xt&536870912)!==0?e===qi:!1}function Mp(){var e=Y.H;return Y.H=Xr,e===null?Xr:e}function Ap(){var e=Y.A;return Y.A=F0,e}function To(){Vt=4,$s||(xt&4194048)!==xt&&Ai.current!==null||(ir=!0),(Ws&134217727)===0&&(kn&134217727)===0||Ht===null||Ys(Ht,xt,Bi,!1)}function cu(e,t,i){var n=Mt;Mt|=2;var _=Mp(),x=Ap();(Ht!==e||xt!==t)&&(Ro=null,rr(e,t)),t=!1;var N=Vt;e:do try{if(At!==0&&yt!==null){var q=yt,se=Oi;switch(At){case 8:lu(),N=6;break e;case 3:case 2:case 9:case 6:Ai.current===null&&(t=!0);var fe=At;if(At=0,Oi=null,ar(e,q,se,fe),i&&ir){N=0;break e}break;default:fe=At,At=0,Oi=null,ar(e,q,se,fe)}}W0(),N=Vt;break}catch(Le){Dp(e,Le)}while(!0);return t&&e.shellSuspendCounter++,gs=gn=null,Mt=n,Y.H=_,Y.A=x,yt===null&&(Ht=null,xt=0,Xa()),N}function W0(){for(;yt!==null;)jp(yt)}function q0(e,t){var i=Mt;Mt|=2;var n=Mp(),_=Ap();Ht!==e||xt!==t?(Ro=null,Lo=Ue()+500,rr(e,t)):ir=ve(e,t);e:do try{if(At!==0&&yt!==null){t=yt;var x=Oi;t:switch(At){case 1:At=0,Oi=null,ar(e,t,x,1);break;case 2:case 9:if(Ud(x)){At=0,Oi=null,Op(t);break}t=function(){At!==2&&At!==9||Ht!==e||(At=7),ls(e)},x.then(t,t);break e;case 3:At=7;break e;case 4:At=5;break e;case 7:Ud(x)?(At=0,Oi=null,Op(t)):(At=0,Oi=null,ar(e,t,x,7));break;case 5:var N=null;switch(yt.tag){case 26:N=yt.memoizedState;case 5:case 27:var q=yt;if(N?bm(N):q.stateNode.complete){At=0,Oi=null;var se=q.sibling;if(se!==null)yt=se;else{var fe=q.return;fe!==null?(yt=fe,Mo(fe)):yt=null}break t}}At=0,Oi=null,ar(e,t,x,5);break;case 6:At=0,Oi=null,ar(e,t,x,6);break;case 8:lu(),Vt=6;break e;default:throw Error(S(462))}}G0();break}catch(Le){Dp(e,Le)}while(!0);return gs=gn=null,Y.H=n,Y.A=_,Mt=i,yt!==null?0:(Ht=null,xt=0,Xa(),Vt)}function G0(){for(;yt!==null&&!Fe();)jp(yt)}function jp(e){var t=sp(e.alternate,e,Es);e.memoizedProps=e.pendingProps,t===null?Mo(e):yt=t}function Op(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Jf(i,t,t.pendingProps,t.type,void 0,xt);break;case 11:t=Jf(i,t,t.pendingProps,t.type.render,t.ref,xt);break;case 5:Cc(t);default:rp(i,t),t=yt=Md(t,Es),t=sp(i,t,Es)}e.memoizedProps=e.pendingProps,t===null?Mo(e):yt=t}function ar(e,t,i,n){gs=gn=null,Cc(t),Xn=null,Fr=0;var _=t.return;try{if(O0(e,_,t,i,xt)){Vt=1,_o(e,Fi(i,e.current)),yt=null;return}}catch(x){if(_!==null)throw yt=_,x;Vt=1,_o(e,Fi(i,e.current)),yt=null;return}t.flags&32768?(kt||n===1?e=!0:ir||(xt&536870912)!==0?e=!1:($s=e=!0,(n===2||n===9||n===3||n===6)&&(n=Ai.current,n!==null&&n.tag===13&&(n.flags|=16384))),Bp(t,e)):Mo(t)}function Mo(e){var t=e;do{if((t.flags&32768)!==0){Bp(t,$s);return}e=t.return;var i=z0(t.alternate,t,Es);if(i!==null){yt=i;return}if(t=t.sibling,t!==null){yt=t;return}yt=t=e}while(t!==null);Vt===0&&(Vt=5)}function Bp(e,t){do{var i=H0(e.alternate,e);if(i!==null){i.flags&=32767,yt=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){yt=e;return}yt=e=i}while(e!==null);Vt=6,yt=null}function Np(e,t,i,n,_,x,N,q,se){e.cancelPendingCommit=null;do Ao();while(ri!==0);if((Mt&6)!==0)throw Error(S(327));if(t!==null){if(t===e.current)throw Error(S(177));if(x=t.lanes|t.childLanes,x|=Jl,Qe(e,i,x,N,q,se),e===Ht&&(yt=Ht=null,xt=0),nr=t,Gs=e,Ls=i,ru=x,au=_,kp=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,V0(Ce,function(){return Fp(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=Y.T,Y.T=null,_=$.p,$.p=2,N=Mt,Mt|=4;try{P0(e,t,i)}finally{Mt=N,$.p=_,Y.T=n}}ri=1,zp(),Hp(),Pp()}}function zp(){if(ri===1){ri=0;var e=Gs,t=nr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=Y.T,Y.T=null;var n=$.p;$.p=2;var _=Mt;Mt|=4;try{vp(t,e);var x=wu,N=Sd(e.containerInfo),q=x.focusedElem,se=x.selectionRange;if(N!==q&&q&&q.ownerDocument&&wd(q.ownerDocument.documentElement,q)){if(se!==null&&Gl(q)){var fe=se.start,Le=se.end;if(Le===void 0&&(Le=fe),"selectionStart"in q)q.selectionStart=fe,q.selectionEnd=Math.min(Le,q.value.length);else{var De=q.ownerDocument||document,ge=De&&De.defaultView||window;if(ge.getSelection){var we=ge.getSelection(),Ge=q.textContent.length,lt=Math.min(se.start,Ge),zt=se.end===void 0?lt:Math.min(se.end,Ge);!we.extend&<>zt&&(N=zt,zt=lt,lt=N);var oe=yd(q,lt),re=yd(q,zt);if(oe&&re&&(we.rangeCount!==1||we.anchorNode!==oe.node||we.anchorOffset!==oe.offset||we.focusNode!==re.node||we.focusOffset!==re.offset)){var de=De.createRange();de.setStart(oe.node,oe.offset),we.removeAllRanges(),lt>zt?(we.addRange(de),we.extend(re.node,re.offset)):(de.setEnd(re.node,re.offset),we.addRange(de))}}}}for(De=[],we=q;we=we.parentNode;)we.nodeType===1&&De.push({element:we,left:we.scrollLeft,top:we.scrollTop});for(typeof q.focus=="function"&&q.focus(),q=0;q<De.length;q++){var Re=De[q];Re.element.scrollLeft=Re.left,Re.element.scrollTop=Re.top}}Wo=!!yu,wu=yu=null}finally{Mt=_,$.p=n,Y.T=i}}e.current=t,ri=2}}function Hp(){if(ri===2){ri=0;var e=Gs,t=nr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=Y.T,Y.T=null;var n=$.p;$.p=2;var _=Mt;Mt|=4;try{dp(e,t.alternate,t)}finally{Mt=_,$.p=n,Y.T=i}}ri=3}}function Pp(){if(ri===4||ri===3){ri=0,Be();var e=Gs,t=nr,i=Ls,n=kp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ri=5:(ri=0,nr=Gs=null,Ip(e,e.pendingLanes));var _=e.pendingLanes;if(_===0&&(qs=null),$t(i),t=t.stateNode,ie&&typeof ie.onCommitFiberRoot=="function")try{ie.onCommitFiberRoot(le,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=Y.T,_=$.p,$.p=2,Y.T=null;try{for(var x=e.onRecoverableError,N=0;N<n.length;N++){var q=n[N];x(q.value,{componentStack:q.stack})}}finally{Y.T=t,$.p=_}}(Ls&3)!==0&&Ao(),ls(e),_=e.pendingLanes,(i&261930)!==0&&(_&42)!==0?e===ou?na++:(na=0,ou=e):na=0,ra(0)}}function Ip(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Pr(t)))}function Ao(){return zp(),Hp(),Pp(),Fp()}function Fp(){if(ri!==5)return!1;var e=Gs,t=ru;ru=0;var i=$t(Ls),n=Y.T,_=$.p;try{$.p=32>i?32:i,Y.T=null,i=au,au=null;var x=Gs,N=Ls;if(ri=0,nr=Gs=null,Ls=0,(Mt&6)!==0)throw Error(S(331));var q=Mt;if(Mt|=4,Sp(x.current),bp(x,x.current,N,i),Mt=q,ra(0,!1),ie&&typeof ie.onPostCommitFiberRoot=="function")try{ie.onPostCommitFiberRoot(le,x)}catch{}return!0}finally{$.p=_,Y.T=n,Ip(e,t)}}function Up(e,t,i){t=Fi(i,t),t=Pc(e.stateNode,t,2),e=Ps(e,t,2),e!==null&&(Xe(e,2),ls(e))}function jt(e,t,i){if(e.tag===3)Up(e,e,i);else for(;t!==null;){if(t.tag===3){Up(t,e,i);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(qs===null||!qs.has(n))){e=Fi(i,e),i=$f(2),n=Ps(t,i,2),n!==null&&(Wf(i,n,t,e),Xe(n,2),ls(n));break}}t=t.return}}function uu(e,t,i){var n=e.pingCache;if(n===null){n=e.pingCache=new U0;var _=new Set;n.set(t,_)}else _=n.get(t),_===void 0&&(_=new Set,n.set(t,_));_.has(i)||(iu=!0,_.add(i),e=Y0.bind(null,e,t,i),t.then(e,e))}function Y0(e,t,i){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ht===e&&(xt&i)===i&&(Vt===4||Vt===3&&(xt&62914560)===xt&&300>Ue()-Eo?(Mt&2)===0&&rr(e,0):su|=i,sr===xt&&(sr=0)),ls(e)}function $p(e,t){t===0&&(t=Ne()),e=fn(e,t),e!==null&&(Xe(e,t),ls(e))}function K0(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),$p(e,i)}function X0(e,t){var i=0;switch(e.tag){case 31:case 13:var n=e.stateNode,_=e.memoizedState;_!==null&&(i=_.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(S(314))}n!==null&&n.delete(t),$p(e,i)}function V0(e,t){return He(e,t)}var jo=null,or=null,hu=!1,Oo=!1,du=!1,Ks=0;function ls(e){e!==or&&e.next===null&&(or===null?jo=or=e:or=or.next=e),Oo=!0,hu||(hu=!0,Q0())}function ra(e,t){if(!du&&Oo){du=!0;do for(var i=!1,n=jo;n!==null;){if(e!==0){var _=n.pendingLanes;if(_===0)var x=0;else{var N=n.suspendedLanes,q=n.pingedLanes;x=(1<<31-ue(42|e)+1)-1,x&=_&~(N&~q),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(i=!0,Yp(n,x))}else x=xt,x=me(n,n===Ht?x:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(x&3)===0||ve(n,x)||(i=!0,Yp(n,x));n=n.next}while(i);du=!1}}function J0(){Wp()}function Wp(){Oo=hu=!1;var e=0;Ks!==0&&lb()&&(e=Ks);for(var t=Ue(),i=null,n=jo;n!==null;){var _=n.next,x=qp(n,t);x===0?(n.next=null,i===null?jo=_:i.next=_,_===null&&(or=i)):(i=n,(e!==0||(x&3)!==0)&&(Oo=!0)),n=_}ri!==0&&ri!==5||ra(e),Ks!==0&&(Ks=0)}function qp(e,t){for(var i=e.suspendedLanes,n=e.pingedLanes,_=e.expirationTimes,x=e.pendingLanes&-62914561;0<x;){var N=31-ue(x),q=1<<N,se=_[N];se===-1?((q&i)===0||(q&n)!==0)&&(_[N]=Se(q,t)):se<=t&&(e.expiredLanes|=q),x&=~q}if(t=Ht,i=xt,i=me(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,i===0||e===t&&(At===2||At===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&We(n),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||ve(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(n!==null&&We(n),$t(i)){case 2:case 8:i=St;break;case 32:i=Ce;break;case 268435456:i=ce;break;default:i=Ce}return n=Gp.bind(null,e),i=He(i,n),e.callbackPriority=t,e.callbackNode=i,t}return n!==null&&n!==null&&We(n),e.callbackPriority=2,e.callbackNode=null,2}function Gp(e,t){if(ri!==0&&ri!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Ao()&&e.callbackNode!==i)return null;var n=xt;return n=me(e,e===Ht?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Lp(e,n,t),qp(e,Ue()),e.callbackNode!=null&&e.callbackNode===i?Gp.bind(null,e):null)}function Yp(e,t){if(Ao())return null;Lp(e,t,!0)}function Q0(){ub(function(){(Mt&6)!==0?He(it,J0):Wp()})}function fu(){if(Ks===0){var e=Gn;e===0&&(e=Z,Z<<=1,(Z&261888)===0&&(Z=256)),Ks=e}return Ks}function Kp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Fa(""+e)}function Xp(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function Z0(e,t,i,n,_){if(t==="submit"&&i&&i.stateNode===_){var x=Kp((_[nt]||null).action),N=n.submitter;N&&(t=(t=N[nt]||null)?Kp(t.formAction):N.getAttribute("formAction"),t!==null&&(x=t,N=null));var q=new qa("action","action",null,n,_);e.push({event:q,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ks!==0){var se=N?Xp(_,N):new FormData(_);jc(i,{pending:!0,data:se,method:_.method,action:x},null,se)}}else typeof x=="function"&&(q.preventDefault(),se=N?Xp(_,N):new FormData(_),jc(i,{pending:!0,data:se,method:_.method,action:x},x,se))},currentTarget:_}]})}}for(var pu=0;pu<Vl.length;pu++){var mu=Vl[pu],eb=mu.toLowerCase(),tb=mu[0].toUpperCase()+mu.slice(1);Ji(eb,"on"+tb)}Ji(kd,"onAnimationEnd"),Ji(Ed,"onAnimationIteration"),Ji(Ld,"onAnimationStart"),Ji("dblclick","onDoubleClick"),Ji("focusin","onFocus"),Ji("focusout","onBlur"),Ji(v0,"onTransitionRun"),Ji(_0,"onTransitionStart"),Ji(b0,"onTransitionCancel"),Ji(Rd,"onTransitionEnd"),An("onMouseEnter",["mouseout","mouseover"]),An("onMouseLeave",["mouseout","mouseover"]),An("onPointerEnter",["pointerout","pointerover"]),An("onPointerLeave",["pointerout","pointerover"]),vi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),vi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),vi("onBeforeInput",["compositionend","keypress","textInput","paste"]),vi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),vi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),vi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var aa="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ib=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(aa));function Vp(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var n=e[i],_=n.event;n=n.listeners;e:{var x=void 0;if(t)for(var N=n.length-1;0<=N;N--){var q=n[N],se=q.instance,fe=q.currentTarget;if(q=q.listener,se!==x&&_.isPropagationStopped())break e;x=q,_.currentTarget=fe;try{x(_)}catch(Le){Ka(Le)}_.currentTarget=null,x=se}else for(N=0;N<n.length;N++){if(q=n[N],se=q.instance,fe=q.currentTarget,q=q.listener,se!==x&&_.isPropagationStopped())break e;x=q,_.currentTarget=fe;try{x(_)}catch(Le){Ka(Le)}_.currentTarget=null,x=se}}}}function wt(e,t){var i=t[Wt];i===void 0&&(i=t[Wt]=new Set);var n=e+"__bubble";i.has(n)||(Jp(t,e,2,!1),i.add(n))}function gu(e,t,i){var n=0;t&&(n|=4),Jp(i,e,n,t)}var Bo="_reactListening"+Math.random().toString(36).slice(2);function vu(e){if(!e[Bo]){e[Bo]=!0,Er.forEach(function(i){i!=="selectionchange"&&(ib.has(i)||gu(i,!1,e),gu(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Bo]||(t[Bo]=!0,gu("selectionchange",!1,t))}}function Jp(e,t,i,n){switch(Em(t)){case 2:var _=Tb;break;case 8:_=Mb;break;default:_=Au}i=_.bind(null,t,i,e),_=void 0,!zl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(_=!0),n?_!==void 0?e.addEventListener(t,i,{capture:!0,passive:_}):e.addEventListener(t,i,!0):_!==void 0?e.addEventListener(t,i,{passive:_}):e.addEventListener(t,i,!1)}function _u(e,t,i,n,_){var x=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var N=n.tag;if(N===3||N===4){var q=n.stateNode.containerInfo;if(q===_)break;if(N===4)for(N=n.return;N!==null;){var se=N.tag;if((se===3||se===4)&&N.stateNode.containerInfo===_)return;N=N.return}for(;q!==null;){if(N=pi(q),N===null)return;if(se=N.tag,se===5||se===6||se===26||se===27){n=x=N;continue e}q=q.parentNode}}n=n.return}td(function(){var fe=x,Le=Bl(i),De=[];e:{var ge=Dd.get(e);if(ge!==void 0){var we=qa,Ge=e;switch(e){case"keypress":if($a(i)===0)break e;case"keydown":case"keyup":we=X_;break;case"focusin":Ge="focus",we=Fl;break;case"focusout":Ge="blur",we=Fl;break;case"beforeblur":case"afterblur":we=Fl;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":we=nd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=z_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=Q_;break;case kd:case Ed:case Ld:we=I_;break;case Rd:we=e0;break;case"scroll":case"scrollend":we=B_;break;case"wheel":we=i0;break;case"copy":case"cut":case"paste":we=U_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=ad;break;case"toggle":case"beforetoggle":we=n0}var lt=(t&4)!==0,zt=!lt&&(e==="scroll"||e==="scrollend"),oe=lt?ge!==null?ge+"Capture":null:ge;lt=[];for(var re=fe,de;re!==null;){var Re=re;if(de=Re.stateNode,Re=Re.tag,Re!==5&&Re!==26&&Re!==27||de===null||oe===null||(Re=Rr(re,oe),Re!=null&<.push(oa(re,Re,de))),zt)break;re=re.return}0<lt.length&&(ge=new we(ge,Ge,null,i,Le),De.push({event:ge,listeners:lt}))}}if((t&7)===0){e:{if(ge=e==="mouseover"||e==="pointerover",we=e==="mouseout"||e==="pointerout",ge&&i!==Ol&&(Ge=i.relatedTarget||i.fromElement)&&(pi(Ge)||Ge[dt]))break e;if((we||ge)&&(ge=Le.window===Le?Le:(ge=Le.ownerDocument)?ge.defaultView||ge.parentWindow:window,we?(Ge=i.relatedTarget||i.toElement,we=fe,Ge=Ge?pi(Ge):null,Ge!==null&&(zt=O(Ge),lt=Ge.tag,Ge!==zt||lt!==5&<!==27&<!==6)&&(Ge=null)):(we=null,Ge=fe),we!==Ge)){if(lt=nd,Re="onMouseLeave",oe="onMouseEnter",re="mouse",(e==="pointerout"||e==="pointerover")&&(lt=ad,Re="onPointerLeave",oe="onPointerEnter",re="pointer"),zt=we==null?ge:mi(we),de=Ge==null?ge:mi(Ge),ge=new lt(Re,re+"leave",we,i,Le),ge.target=zt,ge.relatedTarget=de,Re=null,pi(Le)===fe&&(lt=new lt(oe,re+"enter",Ge,i,Le),lt.target=de,lt.relatedTarget=zt,Re=lt),zt=Re,we&&Ge)t:{for(lt=sb,oe=we,re=Ge,de=0,Re=oe;Re;Re=lt(Re))de++;Re=0;for(var Ze=re;Ze;Ze=lt(Ze))Re++;for(;0<de-Re;)oe=lt(oe),de--;for(;0<Re-de;)re=lt(re),Re--;for(;de--;){if(oe===re||re!==null&&oe===re.alternate){lt=oe;break t}oe=lt(oe),re=lt(re)}lt=null}else lt=null;we!==null&&Qp(De,ge,we,lt,!1),Ge!==null&&zt!==null&&Qp(De,zt,Ge,lt,!0)}}e:{if(ge=fe?mi(fe):window,we=ge.nodeName&&ge.nodeName.toLowerCase(),we==="select"||we==="input"&&ge.type==="file")var Rt=pd;else if(dd(ge))if(md)Rt=p0;else{Rt=d0;var Ke=h0}else we=ge.nodeName,!we||we.toLowerCase()!=="input"||ge.type!=="checkbox"&&ge.type!=="radio"?fe&&jl(fe.elementType)&&(Rt=pd):Rt=f0;if(Rt&&(Rt=Rt(e,fe))){fd(De,Rt,i,Le);break e}Ke&&Ke(e,ge,fe),e==="focusout"&&fe&&ge.type==="number"&&fe.memoizedProps.value!=null&&Al(ge,"number",ge.value)}switch(Ke=fe?mi(fe):window,e){case"focusin":(dd(Ke)||Ke.contentEditable==="true")&&(Hn=Ke,Yl=fe,Nr=null);break;case"focusout":Nr=Yl=Hn=null;break;case"mousedown":Kl=!0;break;case"contextmenu":case"mouseup":case"dragend":Kl=!1,xd(De,i,Le);break;case"selectionchange":if(g0)break;case"keydown":case"keyup":xd(De,i,Le)}var mt;if($l)e:{switch(e){case"compositionstart":var Ct="onCompositionStart";break e;case"compositionend":Ct="onCompositionEnd";break e;case"compositionupdate":Ct="onCompositionUpdate";break e}Ct=void 0}else zn?ud(e,i)&&(Ct="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ct="onCompositionStart");Ct&&(od&&i.locale!=="ko"&&(zn||Ct!=="onCompositionStart"?Ct==="onCompositionEnd"&&zn&&(mt=id()):(As=Le,Hl="value"in As?As.value:As.textContent,zn=!0)),Ke=No(fe,Ct),0<Ke.length&&(Ct=new rd(Ct,e,null,i,Le),De.push({event:Ct,listeners:Ke}),mt?Ct.data=mt:(mt=hd(i),mt!==null&&(Ct.data=mt)))),(mt=a0?o0(e,i):l0(e,i))&&(Ct=No(fe,"onBeforeInput"),0<Ct.length&&(Ke=new rd("onBeforeInput","beforeinput",null,i,Le),De.push({event:Ke,listeners:Ct}),Ke.data=mt)),Z0(De,e,fe,i,Le)}Vp(De,t)})}function oa(e,t,i){return{instance:e,listener:t,currentTarget:i}}function No(e,t){for(var i=t+"Capture",n=[];e!==null;){var _=e,x=_.stateNode;if(_=_.tag,_!==5&&_!==26&&_!==27||x===null||(_=Rr(e,i),_!=null&&n.unshift(oa(e,_,x)),_=Rr(e,t),_!=null&&n.push(oa(e,_,x))),e.tag===3)return n;e=e.return}return[]}function sb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Qp(e,t,i,n,_){for(var x=t._reactName,N=[];i!==null&&i!==n;){var q=i,se=q.alternate,fe=q.stateNode;if(q=q.tag,se!==null&&se===n)break;q!==5&&q!==26&&q!==27||fe===null||(se=fe,_?(fe=Rr(i,x),fe!=null&&N.unshift(oa(i,fe,se))):_||(fe=Rr(i,x),fe!=null&&N.push(oa(i,fe,se)))),i=i.return}N.length!==0&&e.push({event:t,listeners:N})}var nb=/\r\n?/g,rb=/\u0000|\uFFFD/g;function Zp(e){return(typeof e=="string"?e:""+e).replace(nb,`
|
|
50
|
-
`).replace(rb,"")}function em(e,t){return t=Zp(t),Zp(e)===t}function Nt(e,t,i,n,_,x){switch(i){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||On(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&On(e,""+n);break;case"className":Pa(e,"class",n);break;case"tabIndex":Pa(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Pa(e,i,n);break;case"style":Zh(e,n,x);break;case"data":if(t!=="object"){Pa(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(i);break}n=Fa(""+n),e.setAttribute(i,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(i==="formAction"?(t!=="input"&&Nt(e,t,"name",_.name,_,null),Nt(e,t,"formEncType",_.formEncType,_,null),Nt(e,t,"formMethod",_.formMethod,_,null),Nt(e,t,"formTarget",_.formTarget,_,null)):(Nt(e,t,"encType",_.encType,_,null),Nt(e,t,"method",_.method,_,null),Nt(e,t,"target",_.target,_,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(i);break}n=Fa(""+n),e.setAttribute(i,n);break;case"onClick":n!=null&&(e.onclick=ds);break;case"onScroll":n!=null&&wt("scroll",e);break;case"onScrollEnd":n!=null&&wt("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(S(61));if(i=n.__html,i!=null){if(_.children!=null)throw Error(S(60));e.innerHTML=i}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}i=Fa(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(i,""+n):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":n===!0?e.setAttribute(i,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(i,n):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(i,n):e.removeAttribute(i);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(i):e.setAttribute(i,n);break;case"popover":wt("beforetoggle",e),wt("toggle",e),Ha(e,"popover",n);break;case"xlinkActuate":hs(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":hs(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":hs(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":hs(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":hs(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":hs(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":hs(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":hs(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":hs(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Ha(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=j_.get(i)||i,Ha(e,i,n))}}function bu(e,t,i,n,_,x){switch(i){case"style":Zh(e,n,x);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(S(61));if(i=n.__html,i!=null){if(_.children!=null)throw Error(S(60));e.innerHTML=i}}break;case"children":typeof n=="string"?On(e,n):(typeof n=="number"||typeof n=="bigint")&&On(e,""+n);break;case"onScroll":n!=null&&wt("scroll",e);break;case"onScrollEnd":n!=null&&wt("scrollend",e);break;case"onClick":n!=null&&(e.onclick=ds);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Lr.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(_=i.endsWith("Capture"),t=i.slice(2,_?i.length-7:void 0),x=e[nt]||null,x=x!=null?x[i]:null,typeof x=="function"&&e.removeEventListener(t,x,_),typeof n=="function")){typeof x!="function"&&x!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,n,_);break e}i in e?e[i]=n:n===!0?e.setAttribute(i,""):Ha(e,i,n)}}}function di(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":wt("error",e),wt("load",e);var n=!1,_=!1,x;for(x in i)if(i.hasOwnProperty(x)){var N=i[x];if(N!=null)switch(x){case"src":n=!0;break;case"srcSet":_=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(S(137,t));default:Nt(e,t,x,N,i,null)}}_&&Nt(e,t,"srcSet",i.srcSet,i,null),n&&Nt(e,t,"src",i.src,i,null);return;case"input":wt("invalid",e);var q=x=N=_=null,se=null,fe=null;for(n in i)if(i.hasOwnProperty(n)){var Le=i[n];if(Le!=null)switch(n){case"name":_=Le;break;case"type":N=Le;break;case"checked":se=Le;break;case"defaultChecked":fe=Le;break;case"value":x=Le;break;case"defaultValue":q=Le;break;case"children":case"dangerouslySetInnerHTML":if(Le!=null)throw Error(S(137,t));break;default:Nt(e,t,n,Le,i,null)}}Xh(e,x,q,se,fe,N,_,!1);return;case"select":wt("invalid",e),n=N=x=null;for(_ in i)if(i.hasOwnProperty(_)&&(q=i[_],q!=null))switch(_){case"value":x=q;break;case"defaultValue":N=q;break;case"multiple":n=q;default:Nt(e,t,_,q,i,null)}t=x,i=N,e.multiple=!!n,t!=null?jn(e,!!n,t,!1):i!=null&&jn(e,!!n,i,!0);return;case"textarea":wt("invalid",e),x=_=n=null;for(N in i)if(i.hasOwnProperty(N)&&(q=i[N],q!=null))switch(N){case"value":n=q;break;case"defaultValue":_=q;break;case"children":x=q;break;case"dangerouslySetInnerHTML":if(q!=null)throw Error(S(91));break;default:Nt(e,t,N,q,i,null)}Jh(e,n,_,x);return;case"option":for(se in i)if(i.hasOwnProperty(se)&&(n=i[se],n!=null))switch(se){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Nt(e,t,se,n,i,null)}return;case"dialog":wt("beforetoggle",e),wt("toggle",e),wt("cancel",e),wt("close",e);break;case"iframe":case"object":wt("load",e);break;case"video":case"audio":for(n=0;n<aa.length;n++)wt(aa[n],e);break;case"image":wt("error",e),wt("load",e);break;case"details":wt("toggle",e);break;case"embed":case"source":case"link":wt("error",e),wt("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(fe in i)if(i.hasOwnProperty(fe)&&(n=i[fe],n!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":throw Error(S(137,t));default:Nt(e,t,fe,n,i,null)}return;default:if(jl(t)){for(Le in i)i.hasOwnProperty(Le)&&(n=i[Le],n!==void 0&&bu(e,t,Le,n,i,void 0));return}}for(q in i)i.hasOwnProperty(q)&&(n=i[q],n!=null&&Nt(e,t,q,n,i,null))}function ab(e,t,i,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var _=null,x=null,N=null,q=null,se=null,fe=null,Le=null;for(we in i){var De=i[we];if(i.hasOwnProperty(we)&&De!=null)switch(we){case"checked":break;case"value":break;case"defaultValue":se=De;default:n.hasOwnProperty(we)||Nt(e,t,we,null,n,De)}}for(var ge in n){var we=n[ge];if(De=i[ge],n.hasOwnProperty(ge)&&(we!=null||De!=null))switch(ge){case"type":x=we;break;case"name":_=we;break;case"checked":fe=we;break;case"defaultChecked":Le=we;break;case"value":N=we;break;case"defaultValue":q=we;break;case"children":case"dangerouslySetInnerHTML":if(we!=null)throw Error(S(137,t));break;default:we!==De&&Nt(e,t,ge,we,n,De)}}Ml(e,N,q,se,fe,Le,x,_);return;case"select":we=N=q=ge=null;for(x in i)if(se=i[x],i.hasOwnProperty(x)&&se!=null)switch(x){case"value":break;case"multiple":we=se;default:n.hasOwnProperty(x)||Nt(e,t,x,null,n,se)}for(_ in n)if(x=n[_],se=i[_],n.hasOwnProperty(_)&&(x!=null||se!=null))switch(_){case"value":ge=x;break;case"defaultValue":q=x;break;case"multiple":N=x;default:x!==se&&Nt(e,t,_,x,n,se)}t=q,i=N,n=we,ge!=null?jn(e,!!i,ge,!1):!!n!=!!i&&(t!=null?jn(e,!!i,t,!0):jn(e,!!i,i?[]:"",!1));return;case"textarea":we=ge=null;for(q in i)if(_=i[q],i.hasOwnProperty(q)&&_!=null&&!n.hasOwnProperty(q))switch(q){case"value":break;case"children":break;default:Nt(e,t,q,null,n,_)}for(N in n)if(_=n[N],x=i[N],n.hasOwnProperty(N)&&(_!=null||x!=null))switch(N){case"value":ge=_;break;case"defaultValue":we=_;break;case"children":break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(S(91));break;default:_!==x&&Nt(e,t,N,_,n,x)}Vh(e,ge,we);return;case"option":for(var Ge in i)if(ge=i[Ge],i.hasOwnProperty(Ge)&&ge!=null&&!n.hasOwnProperty(Ge))switch(Ge){case"selected":e.selected=!1;break;default:Nt(e,t,Ge,null,n,ge)}for(se in n)if(ge=n[se],we=i[se],n.hasOwnProperty(se)&&ge!==we&&(ge!=null||we!=null))switch(se){case"selected":e.selected=ge&&typeof ge!="function"&&typeof ge!="symbol";break;default:Nt(e,t,se,ge,n,we)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var lt in i)ge=i[lt],i.hasOwnProperty(lt)&&ge!=null&&!n.hasOwnProperty(lt)&&Nt(e,t,lt,null,n,ge);for(fe in n)if(ge=n[fe],we=i[fe],n.hasOwnProperty(fe)&&ge!==we&&(ge!=null||we!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(S(137,t));break;default:Nt(e,t,fe,ge,n,we)}return;default:if(jl(t)){for(var zt in i)ge=i[zt],i.hasOwnProperty(zt)&&ge!==void 0&&!n.hasOwnProperty(zt)&&bu(e,t,zt,void 0,n,ge);for(Le in n)ge=n[Le],we=i[Le],!n.hasOwnProperty(Le)||ge===we||ge===void 0&&we===void 0||bu(e,t,Le,ge,n,we);return}}for(var oe in i)ge=i[oe],i.hasOwnProperty(oe)&&ge!=null&&!n.hasOwnProperty(oe)&&Nt(e,t,oe,null,n,ge);for(De in n)ge=n[De],we=i[De],!n.hasOwnProperty(De)||ge===we||ge==null&&we==null||Nt(e,t,De,ge,n,we)}function tm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ob(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),n=0;n<i.length;n++){var _=i[n],x=_.transferSize,N=_.initiatorType,q=_.duration;if(x&&q&&tm(N)){for(N=0,q=_.responseEnd,n+=1;n<i.length;n++){var se=i[n],fe=se.startTime;if(fe>q)break;var Le=se.transferSize,De=se.initiatorType;Le&&tm(De)&&(se=se.responseEnd,N+=Le*(se<q?1:(q-fe)/(se-fe)))}if(--n,t+=8*(x+N)/(_.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var yu=null,wu=null;function zo(e){return e.nodeType===9?e:e.ownerDocument}function im(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function sm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Su(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xu=null;function lb(){var e=window.event;return e&&e.type==="popstate"?e===xu?!1:(xu=e,!0):(xu=null,!1)}var nm=typeof setTimeout=="function"?setTimeout:void 0,cb=typeof clearTimeout=="function"?clearTimeout:void 0,rm=typeof Promise=="function"?Promise:void 0,ub=typeof queueMicrotask=="function"?queueMicrotask:typeof rm<"u"?function(e){return rm.resolve(null).then(e).catch(hb)}:nm;function hb(e){setTimeout(function(){throw e})}function Xs(e){return e==="head"}function am(e,t){var i=t,n=0;do{var _=i.nextSibling;if(e.removeChild(i),_&&_.nodeType===8)if(i=_.data,i==="/$"||i==="/&"){if(n===0){e.removeChild(_),hr(t);return}n--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")n++;else if(i==="html")la(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,la(i);for(var x=i.firstChild;x;){var N=x.nextSibling,q=x.nodeName;x[Kt]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&x.rel.toLowerCase()==="stylesheet"||i.removeChild(x),x=N}}else i==="body"&&la(e.ownerDocument.body);i=_}while(i);hr(t)}function om(e,t){var i=e;e=0;do{var n=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),n&&n.nodeType===8)if(i=n.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=n}while(i)}function Cu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Cu(i),bi(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function db(e,t,i,n){for(;e.nodeType===1;){var _=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Kt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(x=e.getAttribute("rel"),x==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(x!==_.rel||e.getAttribute("href")!==(_.href==null||_.href===""?null:_.href)||e.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin)||e.getAttribute("title")!==(_.title==null?null:_.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(x=e.getAttribute("src"),(x!==(_.src==null?null:_.src)||e.getAttribute("type")!==(_.type==null?null:_.type)||e.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin))&&x&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var x=_.name==null?null:""+_.name;if(_.type==="hidden"&&e.getAttribute("name")===x)return e}else return e;if(e=Gi(e.nextSibling),e===null)break}return null}function fb(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Gi(e.nextSibling),e===null))return null;return e}function lm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Gi(e.nextSibling),e===null))return null;return e}function ku(e){return e.data==="$?"||e.data==="$~"}function Eu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function pb(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var n=function(){t(),i.removeEventListener("DOMContentLoaded",n)};i.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Gi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Lu=null;function cm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Gi(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function um(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function hm(e,t,i){switch(t=zo(i),e){case"html":if(e=t.documentElement,!e)throw Error(S(452));return e;case"head":if(e=t.head,!e)throw Error(S(453));return e;case"body":if(e=t.body,!e)throw Error(S(454));return e;default:throw Error(S(451))}}function la(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bi(e)}var Yi=new Map,dm=new Set;function Ho(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Rs=$.d;$.d={f:mb,r:gb,D:vb,C:_b,L:bb,m:yb,X:Sb,S:wb,M:xb};function mb(){var e=Rs.f(),t=Do();return e||t}function gb(e){var t=Vi(e);t!==null&&t.tag===5&&t.type==="form"?Df(t):Rs.r(e)}var lr=typeof document>"u"?null:document;function fm(e,t,i){var n=lr;if(n&&typeof t=="string"&&t){var _=Pi(t);_='link[rel="'+e+'"][href="'+_+'"]',typeof i=="string"&&(_+='[crossorigin="'+i+'"]'),dm.has(_)||(dm.add(_),e={rel:e,crossOrigin:i,href:t},n.querySelector(_)===null&&(t=n.createElement("link"),di(t,"link",e),Qt(t),n.head.appendChild(t)))}}function vb(e){Rs.D(e),fm("dns-prefetch",e,null)}function _b(e,t){Rs.C(e,t),fm("preconnect",e,t)}function bb(e,t,i){Rs.L(e,t,i);var n=lr;if(n&&e&&t){var _='link[rel="preload"][as="'+Pi(t)+'"]';t==="image"&&i&&i.imageSrcSet?(_+='[imagesrcset="'+Pi(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(_+='[imagesizes="'+Pi(i.imageSizes)+'"]')):_+='[href="'+Pi(e)+'"]';var x=_;switch(t){case"style":x=cr(e);break;case"script":x=ur(e)}Yi.has(x)||(e=l({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Yi.set(x,e),n.querySelector(_)!==null||t==="style"&&n.querySelector(ca(x))||t==="script"&&n.querySelector(ua(x))||(t=n.createElement("link"),di(t,"link",e),Qt(t),n.head.appendChild(t)))}}function yb(e,t){Rs.m(e,t);var i=lr;if(i&&e){var n=t&&typeof t.as=="string"?t.as:"script",_='link[rel="modulepreload"][as="'+Pi(n)+'"][href="'+Pi(e)+'"]',x=_;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=ur(e)}if(!Yi.has(x)&&(e=l({rel:"modulepreload",href:e},t),Yi.set(x,e),i.querySelector(_)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(ua(x)))return}n=i.createElement("link"),di(n,"link",e),Qt(n),i.head.appendChild(n)}}}function wb(e,t,i){Rs.S(e,t,i);var n=lr;if(n&&e){var _=Jt(n).hoistableStyles,x=cr(e);t=t||"default";var N=_.get(x);if(!N){var q={loading:0,preload:null};if(N=n.querySelector(ca(x)))q.loading=5;else{e=l({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Yi.get(x))&&Ru(e,i);var se=N=n.createElement("link");Qt(se),di(se,"link",e),se._p=new Promise(function(fe,Le){se.onload=fe,se.onerror=Le}),se.addEventListener("load",function(){q.loading|=1}),se.addEventListener("error",function(){q.loading|=2}),q.loading|=4,Po(N,t,n)}N={type:"stylesheet",instance:N,count:1,state:q},_.set(x,N)}}}function Sb(e,t){Rs.X(e,t);var i=lr;if(i&&e){var n=Jt(i).hoistableScripts,_=ur(e),x=n.get(_);x||(x=i.querySelector(ua(_)),x||(e=l({src:e,async:!0},t),(t=Yi.get(_))&&Du(e,t),x=i.createElement("script"),Qt(x),di(x,"link",e),i.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},n.set(_,x))}}function xb(e,t){Rs.M(e,t);var i=lr;if(i&&e){var n=Jt(i).hoistableScripts,_=ur(e),x=n.get(_);x||(x=i.querySelector(ua(_)),x||(e=l({src:e,async:!0,type:"module"},t),(t=Yi.get(_))&&Du(e,t),x=i.createElement("script"),Qt(x),di(x,"link",e),i.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},n.set(_,x))}}function pm(e,t,i,n){var _=(_=ke.current)?Ho(_):null;if(!_)throw Error(S(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=cr(i.href),i=Jt(_).hoistableStyles,n=i.get(t),n||(n={type:"style",instance:null,count:0,state:null},i.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=cr(i.href);var x=Jt(_).hoistableStyles,N=x.get(e);if(N||(_=_.ownerDocument||_,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(e,N),(x=_.querySelector(ca(e)))&&!x._p&&(N.instance=x,N.state.loading=5),Yi.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Yi.set(e,i),x||Cb(_,e,i,N.state))),t&&n===null)throw Error(S(528,""));return N}if(t&&n!==null)throw Error(S(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ur(i),i=Jt(_).hoistableScripts,n=i.get(t),n||(n={type:"script",instance:null,count:0,state:null},i.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(S(444,e))}}function cr(e){return'href="'+Pi(e)+'"'}function ca(e){return'link[rel="stylesheet"]['+e+"]"}function mm(e){return l({},e,{"data-precedence":e.precedence,precedence:null})}function Cb(e,t,i,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),di(t,"link",i),Qt(t),e.head.appendChild(t))}function ur(e){return'[src="'+Pi(e)+'"]'}function ua(e){return"script[async]"+e}function gm(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Pi(i.href)+'"]');if(n)return t.instance=n,Qt(n),n;var _=l({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Qt(n),di(n,"style",_),Po(n,i.precedence,e),t.instance=n;case"stylesheet":_=cr(i.href);var x=e.querySelector(ca(_));if(x)return t.state.loading|=4,t.instance=x,Qt(x),x;n=mm(i),(_=Yi.get(_))&&Ru(n,_),x=(e.ownerDocument||e).createElement("link"),Qt(x);var N=x;return N._p=new Promise(function(q,se){N.onload=q,N.onerror=se}),di(x,"link",n),t.state.loading|=4,Po(x,i.precedence,e),t.instance=x;case"script":return x=ur(i.src),(_=e.querySelector(ua(x)))?(t.instance=_,Qt(_),_):(n=i,(_=Yi.get(x))&&(n=l({},i),Du(n,_)),e=e.ownerDocument||e,_=e.createElement("script"),Qt(_),di(_,"link",n),e.head.appendChild(_),t.instance=_);case"void":return null;default:throw Error(S(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Po(n,i.precedence,e));return t.instance}function Po(e,t,i){for(var n=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),_=n.length?n[n.length-1]:null,x=_,N=0;N<n.length;N++){var q=n[N];if(q.dataset.precedence===t)x=q;else if(x!==_)break}x?x.parentNode.insertBefore(e,x.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Ru(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Du(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Io=null;function vm(e,t,i){if(Io===null){var n=new Map,_=Io=new Map;_.set(i,n)}else _=Io,n=_.get(i),n||(n=new Map,_.set(i,n));if(n.has(e))return n;for(n.set(e,null),i=i.getElementsByTagName(e),_=0;_<i.length;_++){var x=i[_];if(!(x[Kt]||x[be]||e==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var N=x.getAttribute(t)||"";N=e+N;var q=n.get(N);q?q.push(x):n.set(N,[x])}}return n}function _m(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function kb(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function bm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Eb(e,t,i,n){if(i.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var _=cr(n.href),x=t.querySelector(ca(_));if(x){t=x._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Fo.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=x,Qt(x);return}x=t.ownerDocument||t,n=mm(n),(_=Yi.get(_))&&Ru(n,_),x=x.createElement("link"),Qt(x);var N=x;N._p=new Promise(function(q,se){N.onload=q,N.onerror=se}),di(x,"link",n),i.instance=x}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Fo.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Tu=0;function Lb(e,t){return e.stylesheets&&e.count===0&&$o(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var n=setTimeout(function(){if(e.stylesheets&&$o(e,e.stylesheets),e.unsuspend){var x=e.unsuspend;e.unsuspend=null,x()}},6e4+t);0<e.imgBytes&&Tu===0&&(Tu=62500*ob());var _=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$o(e,e.stylesheets),e.unsuspend)){var x=e.unsuspend;e.unsuspend=null,x()}},(e.imgBytes>Tu?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(_)}}:null}function Fo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$o(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Uo=null;function $o(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Uo=new Map,t.forEach(Rb,e),Uo=null,Fo.call(e))}function Rb(e,t){if(!(t.state.loading&4)){var i=Uo.get(e);if(i)var n=i.get(null);else{i=new Map,Uo.set(e,i);for(var _=e.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<_.length;x++){var N=_[x];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(i.set(N.dataset.precedence,N),n=N)}n&&i.set(null,n)}_=t.instance,N=_.getAttribute("data-precedence"),x=i.get(N)||n,x===n&&i.set(null,_),i.set(N,_),this.count++,n=Fo.bind(this),_.addEventListener("load",n),_.addEventListener("error",n),x?x.parentNode.insertBefore(_,x.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(_,e.firstChild)),t.state.loading|=4}}var ha={$$typeof:f,Provider:null,Consumer:null,_currentValue:U,_currentValue2:U,_threadCount:0};function Db(e,t,i,n,_,x,N,q,se){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.hiddenUpdates=qe(null),this.identifierPrefix=n,this.onUncaughtError=_,this.onCaughtError=x,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=se,this.incompleteTransitions=new Map}function ym(e,t,i,n,_,x,N,q,se,fe,Le,De){return e=new Db(e,t,i,N,se,fe,Le,De,q),t=1,x===!0&&(t|=24),x=Mi(3,null,null,t),e.current=x,x.stateNode=e,t=cc(),t.refCount++,e.pooledCache=t,t.refCount++,x.memoizedState={element:n,isDehydrated:i,cache:t},fc(x),e}function wm(e){return e?(e=Fn,e):Fn}function Sm(e,t,i,n,_,x){_=wm(_),n.context===null?n.context=_:n.pendingContext=_,n=Hs(t),n.payload={element:i},x=x===void 0?null:x,x!==null&&(n.callback=x),i=Ps(e,n,t),i!==null&&(ki(i,e,t),$r(i,e,t))}function xm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Mu(e,t){xm(e,t),(e=e.alternate)&&xm(e,t)}function Cm(e){if(e.tag===13||e.tag===31){var t=fn(e,67108864);t!==null&&ki(t,e,67108864),Mu(e,67108864)}}function km(e){if(e.tag===13||e.tag===31){var t=Ni();t=ht(t);var i=fn(e,t);i!==null&&ki(i,e,t),Mu(e,t)}}var Wo=!0;function Tb(e,t,i,n){var _=Y.T;Y.T=null;var x=$.p;try{$.p=2,Au(e,t,i,n)}finally{$.p=x,Y.T=_}}function Mb(e,t,i,n){var _=Y.T;Y.T=null;var x=$.p;try{$.p=8,Au(e,t,i,n)}finally{$.p=x,Y.T=_}}function Au(e,t,i,n){if(Wo){var _=ju(n);if(_===null)_u(e,t,n,qo,i),Lm(e,n);else if(jb(_,e,t,i,n))n.stopPropagation();else if(Lm(e,n),t&4&&-1<Ab.indexOf(e)){for(;_!==null;){var x=Vi(_);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var N=xe(x.pendingLanes);if(N!==0){var q=x;for(q.pendingLanes|=2,q.entangledLanes|=2;N;){var se=1<<31-ue(N);q.entanglements[1]|=se,N&=~se}ls(x),(Mt&6)===0&&(Lo=Ue()+500,ra(0))}}break;case 31:case 13:q=fn(x,2),q!==null&&ki(q,x,2),Do(),Mu(x,2)}if(x=ju(n),x===null&&_u(e,t,n,qo,i),x===_)break;_=x}_!==null&&n.stopPropagation()}else _u(e,t,n,null,i)}}function ju(e){return e=Bl(e),Ou(e)}var qo=null;function Ou(e){if(qo=null,e=pi(e),e!==null){var t=O(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=A(t),e!==null)return e;e=null}else if(i===31){if(e=r(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return qo=e,null}function Em(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ct()){case it:return 2;case St:return 8;case Ce:case Ie:return 32;case ce:return 268435456;default:return 32}default:return 32}}var Bu=!1,Vs=null,Js=null,Qs=null,da=new Map,fa=new Map,Zs=[],Ab="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".split(" ");function Lm(e,t){switch(e){case"focusin":case"focusout":Vs=null;break;case"dragenter":case"dragleave":Js=null;break;case"mouseover":case"mouseout":Qs=null;break;case"pointerover":case"pointerout":da.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fa.delete(t.pointerId)}}function pa(e,t,i,n,_,x){return e===null||e.nativeEvent!==x?(e={blockedOn:t,domEventName:i,eventSystemFlags:n,nativeEvent:x,targetContainers:[_]},t!==null&&(t=Vi(t),t!==null&&Cm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,_!==null&&t.indexOf(_)===-1&&t.push(_),e)}function jb(e,t,i,n,_){switch(t){case"focusin":return Vs=pa(Vs,e,t,i,n,_),!0;case"dragenter":return Js=pa(Js,e,t,i,n,_),!0;case"mouseover":return Qs=pa(Qs,e,t,i,n,_),!0;case"pointerover":var x=_.pointerId;return da.set(x,pa(da.get(x)||null,e,t,i,n,_)),!0;case"gotpointercapture":return x=_.pointerId,fa.set(x,pa(fa.get(x)||null,e,t,i,n,_)),!0}return!1}function Rm(e){var t=pi(e.target);if(t!==null){var i=O(t);if(i!==null){if(t=i.tag,t===13){if(t=A(i),t!==null){e.blockedOn=t,ot(e.priority,function(){km(i)});return}}else if(t===31){if(t=r(i),t!==null){e.blockedOn=t,ot(e.priority,function(){km(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Go(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=ju(e.nativeEvent);if(i===null){i=e.nativeEvent;var n=new i.constructor(i.type,i);Ol=n,i.target.dispatchEvent(n),Ol=null}else return t=Vi(i),t!==null&&Cm(t),e.blockedOn=i,!1;t.shift()}return!0}function Dm(e,t,i){Go(e)&&i.delete(t)}function Ob(){Bu=!1,Vs!==null&&Go(Vs)&&(Vs=null),Js!==null&&Go(Js)&&(Js=null),Qs!==null&&Go(Qs)&&(Qs=null),da.forEach(Dm),fa.forEach(Dm)}function Yo(e,t){e.blockedOn===t&&(e.blockedOn=null,Bu||(Bu=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Ob)))}var Ko=null;function Tm(e){Ko!==e&&(Ko=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Ko===e&&(Ko=null);for(var t=0;t<e.length;t+=3){var i=e[t],n=e[t+1],_=e[t+2];if(typeof n!="function"){if(Ou(n||i)===null)continue;break}var x=Vi(i);x!==null&&(e.splice(t,3),t-=3,jc(x,{pending:!0,data:_,method:i.method,action:n},n,_))}}))}function hr(e){function t(se){return Yo(se,e)}Vs!==null&&Yo(Vs,e),Js!==null&&Yo(Js,e),Qs!==null&&Yo(Qs,e),da.forEach(t),fa.forEach(t);for(var i=0;i<Zs.length;i++){var n=Zs[i];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Zs.length&&(i=Zs[0],i.blockedOn===null);)Rm(i),i.blockedOn===null&&Zs.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(n=0;n<i.length;n+=3){var _=i[n],x=i[n+1],N=_[nt]||null;if(typeof x=="function")N||Tm(i);else if(N){var q=null;if(x&&x.hasAttribute("formAction")){if(_=x,N=x[nt]||null)q=N.formAction;else if(Ou(_)!==null)continue}else q=N.action;typeof q=="function"?i[n+1]=q:(i.splice(n,3),n-=3),Tm(i)}}}function Mm(){function e(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(N){return _=N})},focusReset:"manual",scroll:"manual"})}function t(){_!==null&&(_(),_=null),n||setTimeout(i,20)}function i(){if(!n&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,_=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),_!==null&&(_(),_=null)}}}function Nu(e){this._internalRoot=e}Xo.prototype.render=Nu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(S(409));var i=t.current,n=Ni();Sm(i,n,e,t,null,null)},Xo.prototype.unmount=Nu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Sm(e.current,2,null,e,null,null),Do(),t[dt]=null}};function Xo(e){this._internalRoot=e}Xo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ot();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Zs.length&&t!==0&&t<Zs[i].priority;i++);Zs.splice(i,0,e),i===0&&Rm(e)}};var Am=h.version;if(Am!=="19.2.4")throw Error(S(527,Am,"19.2.4"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(S(188)):(e=Object.keys(e).join(","),Error(S(268,e)));return e=d(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var Bb={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vo.isDisabled&&Vo.supportsFiber)try{le=Vo.inject(Bb),ie=Vo}catch{}}return ga.createRoot=function(e,t){if(!M(e))throw Error(S(299));var i=!1,n="",_=Pf,x=If,N=Ff;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(_=t.onUncaughtError),t.onCaughtError!==void 0&&(x=t.onCaughtError),t.onRecoverableError!==void 0&&(N=t.onRecoverableError)),t=ym(e,1,!1,null,null,i,n,null,_,x,N,Mm),e[dt]=t.current,vu(e),new Nu(t)},ga.hydrateRoot=function(e,t,i){if(!M(e))throw Error(S(299));var n=!1,_="",x=Pf,N=If,q=Ff,se=null;return i!=null&&(i.unstable_strictMode===!0&&(n=!0),i.identifierPrefix!==void 0&&(_=i.identifierPrefix),i.onUncaughtError!==void 0&&(x=i.onUncaughtError),i.onCaughtError!==void 0&&(N=i.onCaughtError),i.onRecoverableError!==void 0&&(q=i.onRecoverableError),i.formState!==void 0&&(se=i.formState)),t=ym(e,1,!0,t,i??null,n,_,se,x,N,q,Mm),t.context=wm(null),i=t.current,n=Ni(),n=ht(n),_=Hs(n),_.callback=null,Ps(i,_,n),i=n,t.current.lanes=i,Xe(t,i),ls(t),e[dt]=t.current,vu(e),new Xo(t)},ga.version="19.2.4",ga}var $m;function Yb(){if($m)return Pu.exports;$m=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(h){console.error(h)}}return s(),Pu.exports=Gb(),Pu.exports}var Kb=Yb();const Xb=yh(Kb),Vb="modulepreload",Jb=function(s){return"/"+s},Wm={},ja=function(h,w,S){let M=Promise.resolve();if(w&&w.length>0){let A=function(d){return Promise.all(d.map(g=>Promise.resolve(g).then(l=>({status:"fulfilled",value:l}),l=>({status:"rejected",reason:l}))))};document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),u=(r==null?void 0:r.nonce)||(r==null?void 0:r.getAttribute("nonce"));M=A(w.map(d=>{if(d=Jb(d),d in Wm)return;Wm[d]=!0;const g=d.endsWith(".css"),l=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${l}`))return;const m=document.createElement("link");if(m.rel=g?"stylesheet":Vb,g||(m.as="script"),m.crossOrigin="",m.href=d,u&&m.setAttribute("nonce",u),document.head.appendChild(m),g)return new Promise((b,C)=>{m.addEventListener("load",b),m.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${d}`)))})}))}function O(A){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=A,window.dispatchEvent(r),!r.defaultPrevented)throw A}return M.then(A=>{for(const r of A||[])r.status==="rejected"&&O(r.reason);return h().catch(O)})};/**
|
|
51
|
-
* react-router v7.13.2
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) Remix Software Inc.
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the MIT license found in the
|
|
56
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
-
*
|
|
58
|
-
* @license MIT
|
|
59
|
-
*/var qm="popstate";function Gm(s){return typeof s=="object"&&s!=null&&"pathname"in s&&"search"in s&&"hash"in s&&"state"in s&&"key"in s}function Qb(s={}){function h(S,M){var d;let O=(d=M.state)==null?void 0:d.masked,{pathname:A,search:r,hash:u}=O||S.location;return rh("",{pathname:A,search:r,hash:u},M.state&&M.state.usr||null,M.state&&M.state.key||"default",O?{pathname:S.location.pathname,search:S.location.search,hash:S.location.hash}:void 0)}function w(S,M){return typeof M=="string"?M:La(M)}return ey(h,w,null,s)}function Yt(s,h){if(s===!1||s===null||typeof s>"u")throw new Error(h)}function ss(s,h){if(!s){typeof console<"u"&&console.warn(h);try{throw new Error(h)}catch{}}}function Zb(){return Math.random().toString(36).substring(2,10)}function Ym(s,h){return{usr:s.state,key:s.key,idx:h,masked:s.unstable_mask?{pathname:s.pathname,search:s.search,hash:s.hash}:void 0}}function rh(s,h,w=null,S,M){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof h=="string"?Sr(h):h,state:w,key:h&&h.key||S||Zb(),unstable_mask:M}}function La({pathname:s="/",search:h="",hash:w=""}){return h&&h!=="?"&&(s+=h.charAt(0)==="?"?h:"?"+h),w&&w!=="#"&&(s+=w.charAt(0)==="#"?w:"#"+w),s}function Sr(s){let h={};if(s){let w=s.indexOf("#");w>=0&&(h.hash=s.substring(w),s=s.substring(0,w));let S=s.indexOf("?");S>=0&&(h.search=s.substring(S),s=s.substring(0,S)),s&&(h.pathname=s)}return h}function ey(s,h,w,S={}){let{window:M=document.defaultView,v5Compat:O=!1}=S,A=M.history,r="POP",u=null,d=g();d==null&&(d=0,A.replaceState({...A.state,idx:d},""));function g(){return(A.state||{idx:null}).idx}function l(){r="POP";let a=g(),c=a==null?null:a-d;d=a,u&&u({action:r,location:p.location,delta:c})}function m(a,c){r="PUSH";let o=Gm(a)?a:rh(p.location,a,c);d=g()+1;let f=Ym(o,d),y=p.createHref(o.unstable_mask||o);try{A.pushState(f,"",y)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;M.location.assign(y)}O&&u&&u({action:r,location:p.location,delta:1})}function b(a,c){r="REPLACE";let o=Gm(a)?a:rh(p.location,a,c);d=g();let f=Ym(o,d),y=p.createHref(o.unstable_mask||o);A.replaceState(f,"",y),O&&u&&u({action:r,location:p.location,delta:0})}function C(a){return ty(a)}let p={get action(){return r},get location(){return s(M,A)},listen(a){if(u)throw new Error("A history only accepts one active listener");return M.addEventListener(qm,l),u=a,()=>{M.removeEventListener(qm,l),u=null}},createHref(a){return h(M,a)},createURL:C,encodeLocation(a){let c=C(a);return{pathname:c.pathname,search:c.search,hash:c.hash}},push:m,replace:b,go(a){return A.go(a)}};return p}function ty(s,h=!1){let w="http://localhost";typeof window<"u"&&(w=window.location.origin!=="null"?window.location.origin:window.location.href),Yt(w,"No window.location.(origin|href) available to create URL");let S=typeof s=="string"?s:La(s);return S=S.replace(/ $/,"%20"),!h&&S.startsWith("//")&&(S=w+S),new URL(S,w)}function sv(s,h,w="/"){return iy(s,h,w,!1)}function iy(s,h,w,S){let M=typeof h=="string"?Sr(h):h,O=Ms(M.pathname||"/",w);if(O==null)return null;let A=nv(s);sy(A);let r=null;for(let u=0;r==null&&u<A.length;++u){let d=py(O);r=dy(A[u],d,S)}return r}function nv(s,h=[],w=[],S="",M=!1){let O=(A,r,u=M,d)=>{let g={relativePath:d===void 0?A.path||"":d,caseSensitive:A.caseSensitive===!0,childrenIndex:r,route:A};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(S)&&u)return;Yt(g.relativePath.startsWith(S),`Absolute route path "${g.relativePath}" nested under path "${S}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(S.length)}let l=cs([S,g.relativePath]),m=w.concat(g);A.children&&A.children.length>0&&(Yt(A.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),nv(A.children,h,m,l,u)),!(A.path==null&&!A.index)&&h.push({path:l,score:uy(l,A.index),routesMeta:m})};return s.forEach((A,r)=>{var u;if(A.path===""||!((u=A.path)!=null&&u.includes("?")))O(A,r);else for(let d of rv(A.path))O(A,r,!0,d)}),h}function rv(s){let h=s.split("/");if(h.length===0)return[];let[w,...S]=h,M=w.endsWith("?"),O=w.replace(/\?$/,"");if(S.length===0)return M?[O,""]:[O];let A=rv(S.join("/")),r=[];return r.push(...A.map(u=>u===""?O:[O,u].join("/"))),M&&r.push(...A),r.map(u=>s.startsWith("/")&&u===""?"/":u)}function sy(s){s.sort((h,w)=>h.score!==w.score?w.score-h.score:hy(h.routesMeta.map(S=>S.childrenIndex),w.routesMeta.map(S=>S.childrenIndex)))}var ny=/^:[\w-]+$/,ry=3,ay=2,oy=1,ly=10,cy=-2,Km=s=>s==="*";function uy(s,h){let w=s.split("/"),S=w.length;return w.some(Km)&&(S+=cy),h&&(S+=ay),w.filter(M=>!Km(M)).reduce((M,O)=>M+(ny.test(O)?ry:O===""?oy:ly),S)}function hy(s,h){return s.length===h.length&&s.slice(0,-1).every((S,M)=>S===h[M])?s[s.length-1]-h[h.length-1]:0}function dy(s,h,w=!1){let{routesMeta:S}=s,M={},O="/",A=[];for(let r=0;r<S.length;++r){let u=S[r],d=r===S.length-1,g=O==="/"?h:h.slice(O.length)||"/",l=fl({path:u.relativePath,caseSensitive:u.caseSensitive,end:d},g),m=u.route;if(!l&&d&&w&&!S[S.length-1].route.index&&(l=fl({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},g)),!l)return null;Object.assign(M,l.params),A.push({params:M,pathname:cs([O,l.pathname]),pathnameBase:_y(cs([O,l.pathnameBase])),route:m}),l.pathnameBase!=="/"&&(O=cs([O,l.pathnameBase]))}return A}function fl(s,h){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[w,S]=fy(s.path,s.caseSensitive,s.end),M=h.match(w);if(!M)return null;let O=M[0],A=O.replace(/(.)\/+$/,"$1"),r=M.slice(1);return{params:S.reduce((d,{paramName:g,isOptional:l},m)=>{if(g==="*"){let C=r[m]||"";A=O.slice(0,O.length-C.length).replace(/(.)\/+$/,"$1")}const b=r[m];return l&&!b?d[g]=void 0:d[g]=(b||"").replace(/%2F/g,"/"),d},{}),pathname:O,pathnameBase:A,pattern:s}}function fy(s,h=!1,w=!0){ss(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let S=[],M="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(A,r,u,d,g)=>{if(S.push({paramName:r,isOptional:u!=null}),u){let l=g.charAt(d+A.length);return l&&l!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(S.push({paramName:"*"}),M+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):w?M+="\\/*$":s!==""&&s!=="/"&&(M+="(?:(?=\\/|$))"),[new RegExp(M,h?void 0:"i"),S]}function py(s){try{return s.split("/").map(h=>decodeURIComponent(h).replace(/\//g,"%2F")).join("/")}catch(h){return ss(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${h}).`),s}}function Ms(s,h){if(h==="/")return s;if(!s.toLowerCase().startsWith(h.toLowerCase()))return null;let w=h.endsWith("/")?h.length-1:h.length,S=s.charAt(w);return S&&S!=="/"?null:s.slice(w)||"/"}var my=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function gy(s,h="/"){let{pathname:w,search:S="",hash:M=""}=typeof s=="string"?Sr(s):s,O;return w?(w=w.replace(/\/\/+/g,"/"),w.startsWith("/")?O=Xm(w.substring(1),"/"):O=Xm(w,h)):O=h,{pathname:O,search:by(S),hash:yy(M)}}function Xm(s,h){let w=h.replace(/\/+$/,"").split("/");return s.split("/").forEach(M=>{M===".."?w.length>1&&w.pop():M!=="."&&w.push(M)}),w.length>1?w.join("/"):"/"}function $u(s,h,w,S){return`Cannot include a '${s}' character in a manually specified \`to.${h}\` field [${JSON.stringify(S)}]. Please separate it out to the \`to.${w}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function vy(s){return s.filter((h,w)=>w===0||h.route.path&&h.route.path.length>0)}function av(s){let h=vy(s);return h.map((w,S)=>S===h.length-1?w.pathname:w.pathnameBase)}function Sh(s,h,w,S=!1){let M;typeof s=="string"?M=Sr(s):(M={...s},Yt(!M.pathname||!M.pathname.includes("?"),$u("?","pathname","search",M)),Yt(!M.pathname||!M.pathname.includes("#"),$u("#","pathname","hash",M)),Yt(!M.search||!M.search.includes("#"),$u("#","search","hash",M)));let O=s===""||M.pathname==="",A=O?"/":M.pathname,r;if(A==null)r=w;else{let l=h.length-1;if(!S&&A.startsWith("..")){let m=A.split("/");for(;m[0]==="..";)m.shift(),l-=1;M.pathname=m.join("/")}r=l>=0?h[l]:"/"}let u=gy(M,r),d=A&&A!=="/"&&A.endsWith("/"),g=(O||A===".")&&w.endsWith("/");return!u.pathname.endsWith("/")&&(d||g)&&(u.pathname+="/"),u}var cs=s=>s.join("/").replace(/\/\/+/g,"/"),_y=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),by=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,yy=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,wy=class{constructor(s,h,w,S=!1){this.status=s,this.statusText=h||"",this.internal=S,w instanceof Error?(this.data=w.toString(),this.error=w):this.data=w}};function Sy(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function xy(s){return s.map(h=>h.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ov=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function lv(s,h){let w=s;if(typeof w!="string"||!my.test(w))return{absoluteURL:void 0,isExternal:!1,to:w};let S=w,M=!1;if(ov)try{let O=new URL(window.location.href),A=w.startsWith("//")?new URL(O.protocol+w):new URL(w),r=Ms(A.pathname,h);A.origin===O.origin&&r!=null?w=r+A.search+A.hash:M=!0}catch{ss(!1,`<Link to="${w}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:S,isExternal:M,to:w}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var cv=["POST","PUT","PATCH","DELETE"];new Set(cv);var Cy=["GET",...cv];new Set(Cy);var xr=j.createContext(null);xr.displayName="DataRouter";var Sl=j.createContext(null);Sl.displayName="DataRouterState";var ky=j.createContext(!1),uv=j.createContext({isTransitioning:!1});uv.displayName="ViewTransition";var Ey=j.createContext(new Map);Ey.displayName="Fetchers";var Ly=j.createContext(null);Ly.displayName="Await";var Xi=j.createContext(null);Xi.displayName="Navigation";var Oa=j.createContext(null);Oa.displayName="Location";var us=j.createContext({outlet:null,matches:[],isDataRoute:!1});us.displayName="Route";var xh=j.createContext(null);xh.displayName="RouteError";var hv="REACT_ROUTER_ERROR",Ry="REDIRECT",Dy="ROUTE_ERROR_RESPONSE";function Ty(s){if(s.startsWith(`${hv}:${Ry}:{`))try{let h=JSON.parse(s.slice(28));if(typeof h=="object"&&h&&typeof h.status=="number"&&typeof h.statusText=="string"&&typeof h.location=="string"&&typeof h.reloadDocument=="boolean"&&typeof h.replace=="boolean")return h}catch{}}function My(s){if(s.startsWith(`${hv}:${Dy}:{`))try{let h=JSON.parse(s.slice(40));if(typeof h=="object"&&h&&typeof h.status=="number"&&typeof h.statusText=="string")return new wy(h.status,h.statusText,h.data)}catch{}}function Ay(s,{relative:h}={}){Yt(Ba(),"useHref() may be used only in the context of a <Router> component.");let{basename:w,navigator:S}=j.useContext(Xi),{hash:M,pathname:O,search:A}=Na(s,{relative:h}),r=O;return w!=="/"&&(r=O==="/"?w:cs([w,O])),S.createHref({pathname:r,search:A,hash:M})}function Ba(){return j.useContext(Oa)!=null}function ns(){return Yt(Ba(),"useLocation() may be used only in the context of a <Router> component."),j.useContext(Oa).location}var dv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fv(s){j.useContext(Xi).static||j.useLayoutEffect(s)}function xl(){let{isDataRoute:s}=j.useContext(us);return s?Gy():jy()}function jy(){Yt(Ba(),"useNavigate() may be used only in the context of a <Router> component.");let s=j.useContext(xr),{basename:h,navigator:w}=j.useContext(Xi),{matches:S}=j.useContext(us),{pathname:M}=ns(),O=JSON.stringify(av(S)),A=j.useRef(!1);return fv(()=>{A.current=!0}),j.useCallback((u,d={})=>{if(ss(A.current,dv),!A.current)return;if(typeof u=="number"){w.go(u);return}let g=Sh(u,JSON.parse(O),M,d.relative==="path");s==null&&h!=="/"&&(g.pathname=g.pathname==="/"?h:cs([h,g.pathname])),(d.replace?w.replace:w.push)(g,d.state,d)},[h,w,O,M,s])}j.createContext(null);function Oy(){let{matches:s}=j.useContext(us),h=s[s.length-1];return h?h.params:{}}function Na(s,{relative:h}={}){let{matches:w}=j.useContext(us),{pathname:S}=ns(),M=JSON.stringify(av(w));return j.useMemo(()=>Sh(s,JSON.parse(M),S,h==="path"),[s,M,S,h])}function By(s,h){return pv(s,h)}function pv(s,h,w){var a;Yt(Ba(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:S}=j.useContext(Xi),{matches:M}=j.useContext(us),O=M[M.length-1],A=O?O.params:{},r=O?O.pathname:"/",u=O?O.pathnameBase:"/",d=O&&O.route;{let c=d&&d.path||"";gv(r,!d||c.endsWith("*")||c.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${r}" (under <Route path="${c}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
60
|
-
|
|
61
|
-
Please change the parent <Route path="${c}"> to <Route path="${c==="/"?"*":`${c}/*`}">.`)}let g=ns(),l;if(h){let c=typeof h=="string"?Sr(h):h;Yt(u==="/"||((a=c.pathname)==null?void 0:a.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${c.pathname}" was given in the \`location\` prop.`),l=c}else l=g;let m=l.pathname||"/",b=m;if(u!=="/"){let c=u.replace(/^\//,"").split("/");b="/"+m.replace(/^\//,"").split("/").slice(c.length).join("/")}let C=sv(s,{pathname:b});ss(d||C!=null,`No routes matched location "${l.pathname}${l.search}${l.hash}" `),ss(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${l.pathname}${l.search}${l.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let p=Iy(C&&C.map(c=>Object.assign({},c,{params:Object.assign({},A,c.params),pathname:cs([u,S.encodeLocation?S.encodeLocation(c.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:c.pathname]),pathnameBase:c.pathnameBase==="/"?u:cs([u,S.encodeLocation?S.encodeLocation(c.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:c.pathnameBase])})),M,w);return h&&p?j.createElement(Oa.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...l},navigationType:"POP"}},p):p}function Ny(){let s=qy(),h=Sy(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),w=s instanceof Error?s.stack:null,S="rgba(200,200,200, 0.5)",M={padding:"0.5rem",backgroundColor:S},O={padding:"2px 4px",backgroundColor:S},A=null;return console.error("Error handled by React Router default ErrorBoundary:",s),A=j.createElement(j.Fragment,null,j.createElement("p",null,"💿 Hey developer 👋"),j.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",j.createElement("code",{style:O},"ErrorBoundary")," or"," ",j.createElement("code",{style:O},"errorElement")," prop on your route.")),j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},h),w?j.createElement("pre",{style:M},w):null,A)}var zy=j.createElement(Ny,null),mv=class extends j.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,h){return h.location!==s.location||h.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:h.error,location:h.location,revalidation:s.revalidation||h.revalidation}}componentDidCatch(s,h){this.props.onError?this.props.onError(s,h):console.error("React Router caught the following error during render",s)}render(){let s=this.state.error;if(this.context&&typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){const w=My(s.digest);w&&(s=w)}let h=s!==void 0?j.createElement(us.Provider,{value:this.props.routeContext},j.createElement(xh.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?j.createElement(Hy,{error:s},h):h}};mv.contextType=ky;var Wu=new WeakMap;function Hy({children:s,error:h}){let{basename:w}=j.useContext(Xi);if(typeof h=="object"&&h&&"digest"in h&&typeof h.digest=="string"){let S=Ty(h.digest);if(S){let M=Wu.get(h);if(M)throw M;let O=lv(S.location,w);if(ov&&!Wu.get(h))if(O.isExternal||S.reloadDocument)window.location.href=O.absoluteURL||O.to;else{const A=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(O.to,{replace:S.replace}));throw Wu.set(h,A),A}return j.createElement("meta",{httpEquiv:"refresh",content:`0;url=${O.absoluteURL||O.to}`})}}return s}function Py({routeContext:s,match:h,children:w}){let S=j.useContext(xr);return S&&S.static&&S.staticContext&&(h.route.errorElement||h.route.ErrorBoundary)&&(S.staticContext._deepestRenderedBoundaryId=h.route.id),j.createElement(us.Provider,{value:s},w)}function Iy(s,h=[],w){let S=w==null?void 0:w.state;if(s==null){if(!S)return null;if(S.errors)s=S.matches;else if(h.length===0&&!S.initialized&&S.matches.length>0)s=S.matches;else return null}let M=s,O=S==null?void 0:S.errors;if(O!=null){let g=M.findIndex(l=>l.route.id&&(O==null?void 0:O[l.route.id])!==void 0);Yt(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(O).join(",")}`),M=M.slice(0,Math.min(M.length,g+1))}let A=!1,r=-1;if(w&&S){A=S.renderFallback;for(let g=0;g<M.length;g++){let l=M[g];if((l.route.HydrateFallback||l.route.hydrateFallbackElement)&&(r=g),l.route.id){let{loaderData:m,errors:b}=S,C=l.route.loader&&!m.hasOwnProperty(l.route.id)&&(!b||b[l.route.id]===void 0);if(l.route.lazy||C){w.isStatic&&(A=!0),r>=0?M=M.slice(0,r+1):M=[M[0]];break}}}}let u=w==null?void 0:w.onError,d=S&&u?(g,l)=>{var m,b;u(g,{location:S.location,params:((b=(m=S.matches)==null?void 0:m[0])==null?void 0:b.params)??{},unstable_pattern:xy(S.matches),errorInfo:l})}:void 0;return M.reduceRight((g,l,m)=>{let b,C=!1,p=null,a=null;S&&(b=O&&l.route.id?O[l.route.id]:void 0,p=l.route.errorElement||zy,A&&(r<0&&m===0?(gv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,a=null):r===m&&(C=!0,a=l.route.hydrateFallbackElement||null)));let c=h.concat(M.slice(0,m+1)),o=()=>{let f;return b?f=p:C?f=a:l.route.Component?f=j.createElement(l.route.Component,null):l.route.element?f=l.route.element:f=g,j.createElement(Py,{match:l,routeContext:{outlet:g,matches:c,isDataRoute:S!=null},children:f})};return S&&(l.route.ErrorBoundary||l.route.errorElement||m===0)?j.createElement(mv,{location:S.location,revalidation:S.revalidation,component:p,error:b,children:o(),routeContext:{outlet:null,matches:c,isDataRoute:!0},onError:d}):o()},null)}function Ch(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Fy(s){let h=j.useContext(xr);return Yt(h,Ch(s)),h}function Uy(s){let h=j.useContext(Sl);return Yt(h,Ch(s)),h}function $y(s){let h=j.useContext(us);return Yt(h,Ch(s)),h}function kh(s){let h=$y(s),w=h.matches[h.matches.length-1];return Yt(w.route.id,`${s} can only be used on routes that contain a unique "id"`),w.route.id}function Wy(){return kh("useRouteId")}function qy(){var S;let s=j.useContext(xh),h=Uy("useRouteError"),w=kh("useRouteError");return s!==void 0?s:(S=h.errors)==null?void 0:S[w]}function Gy(){let{router:s}=Fy("useNavigate"),h=kh("useNavigate"),w=j.useRef(!1);return fv(()=>{w.current=!0}),j.useCallback(async(M,O={})=>{ss(w.current,dv),w.current&&(typeof M=="number"?await s.navigate(M):await s.navigate(M,{fromRouteId:h,...O}))},[s,h])}var Vm={};function gv(s,h,w){!h&&!Vm[s]&&(Vm[s]=!0,ss(!1,w))}j.memo(Yy);function Yy({routes:s,future:h,state:w,isStatic:S,onError:M}){return pv(s,void 0,{state:w,isStatic:S,onError:M})}function an(s){Yt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Ky({basename:s="/",children:h=null,location:w,navigationType:S="POP",navigator:M,static:O=!1,unstable_useTransitions:A}){Yt(!Ba(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let r=s.replace(/^\/*/,"/"),u=j.useMemo(()=>({basename:r,navigator:M,static:O,unstable_useTransitions:A,future:{}}),[r,M,O,A]);typeof w=="string"&&(w=Sr(w));let{pathname:d="/",search:g="",hash:l="",state:m=null,key:b="default",unstable_mask:C}=w,p=j.useMemo(()=>{let a=Ms(d,r);return a==null?null:{location:{pathname:a,search:g,hash:l,state:m,key:b,unstable_mask:C},navigationType:S}},[r,d,g,l,m,b,S,C]);return ss(p!=null,`<Router basename="${r}"> is not able to match the URL "${d}${g}${l}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:j.createElement(Xi.Provider,{value:u},j.createElement(Oa.Provider,{children:h,value:p}))}function Jm({children:s,location:h}){return By(ah(s),h)}function ah(s,h=[]){let w=[];return j.Children.forEach(s,(S,M)=>{if(!j.isValidElement(S))return;let O=[...h,M];if(S.type===j.Fragment){w.push.apply(w,ah(S.props.children,O));return}Yt(S.type===an,`[${typeof S.type=="string"?S.type:S.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Yt(!S.props.index||!S.props.children,"An index route cannot have child routes.");let A={id:S.props.id||O.join("-"),caseSensitive:S.props.caseSensitive,element:S.props.element,Component:S.props.Component,index:S.props.index,path:S.props.path,middleware:S.props.middleware,loader:S.props.loader,action:S.props.action,hydrateFallbackElement:S.props.hydrateFallbackElement,HydrateFallback:S.props.HydrateFallback,errorElement:S.props.errorElement,ErrorBoundary:S.props.ErrorBoundary,hasErrorBoundary:S.props.hasErrorBoundary===!0||S.props.ErrorBoundary!=null||S.props.errorElement!=null,shouldRevalidate:S.props.shouldRevalidate,handle:S.props.handle,lazy:S.props.lazy};S.props.children&&(A.children=ah(S.props.children,O)),w.push(A)}),w}var cl="get",ul="application/x-www-form-urlencoded";function Cl(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function Xy(s){return Cl(s)&&s.tagName.toLowerCase()==="button"}function Vy(s){return Cl(s)&&s.tagName.toLowerCase()==="form"}function Jy(s){return Cl(s)&&s.tagName.toLowerCase()==="input"}function Qy(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function Zy(s,h){return s.button===0&&(!h||h==="_self")&&!Qy(s)}function oh(s=""){return new URLSearchParams(typeof s=="string"||Array.isArray(s)||s instanceof URLSearchParams?s:Object.keys(s).reduce((h,w)=>{let S=s[w];return h.concat(Array.isArray(S)?S.map(M=>[w,M]):[[w,S]])},[]))}function ew(s,h){let w=oh(s);return h&&h.forEach((S,M)=>{w.has(M)||h.getAll(M).forEach(O=>{w.append(M,O)})}),w}var Jo=null;function tw(){if(Jo===null)try{new FormData(document.createElement("form"),0),Jo=!1}catch{Jo=!0}return Jo}var iw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function qu(s){return s!=null&&!iw.has(s)?(ss(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ul}"`),null):s}function sw(s,h){let w,S,M,O,A;if(Vy(s)){let r=s.getAttribute("action");S=r?Ms(r,h):null,w=s.getAttribute("method")||cl,M=qu(s.getAttribute("enctype"))||ul,O=new FormData(s)}else if(Xy(s)||Jy(s)&&(s.type==="submit"||s.type==="image")){let r=s.form;if(r==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=s.getAttribute("formaction")||r.getAttribute("action");if(S=u?Ms(u,h):null,w=s.getAttribute("formmethod")||r.getAttribute("method")||cl,M=qu(s.getAttribute("formenctype"))||qu(r.getAttribute("enctype"))||ul,O=new FormData(r,s),!tw()){let{name:d,type:g,value:l}=s;if(g==="image"){let m=d?`${d}.`:"";O.append(`${m}x`,"0"),O.append(`${m}y`,"0")}else d&&O.append(d,l)}}else{if(Cl(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');w=cl,S=null,M=ul,A=s}return O&&M==="text/plain"&&(A=O,O=void 0),{action:S,method:w.toLowerCase(),encType:M,formData:O,body:A}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Eh(s,h){if(s===!1||s===null||typeof s>"u")throw new Error(h)}function nw(s,h,w,S){let M=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return w?M.pathname.endsWith("/")?M.pathname=`${M.pathname}_.${S}`:M.pathname=`${M.pathname}.${S}`:M.pathname==="/"?M.pathname=`_root.${S}`:h&&Ms(M.pathname,h)==="/"?M.pathname=`${h.replace(/\/$/,"")}/_root.${S}`:M.pathname=`${M.pathname.replace(/\/$/,"")}.${S}`,M}async function rw(s,h){if(s.id in h)return h[s.id];try{let w=await import(s.module);return h[s.id]=w,w}catch(w){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(w),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function aw(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function ow(s,h,w){let S=await Promise.all(s.map(async M=>{let O=h.routes[M.route.id];if(O){let A=await rw(O,w);return A.links?A.links():[]}return[]}));return hw(S.flat(1).filter(aw).filter(M=>M.rel==="stylesheet"||M.rel==="preload").map(M=>M.rel==="stylesheet"?{...M,rel:"prefetch",as:"style"}:{...M,rel:"prefetch"}))}function Qm(s,h,w,S,M,O){let A=(u,d)=>w[d]?u.route.id!==w[d].route.id:!0,r=(u,d)=>{var g;return w[d].pathname!==u.pathname||((g=w[d].route.path)==null?void 0:g.endsWith("*"))&&w[d].params["*"]!==u.params["*"]};return O==="assets"?h.filter((u,d)=>A(u,d)||r(u,d)):O==="data"?h.filter((u,d)=>{var l;let g=S.routes[u.route.id];if(!g||!g.hasLoader)return!1;if(A(u,d)||r(u,d))return!0;if(u.route.shouldRevalidate){let m=u.route.shouldRevalidate({currentUrl:new URL(M.pathname+M.search+M.hash,window.origin),currentParams:((l=w[0])==null?void 0:l.params)||{},nextUrl:new URL(s,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function lw(s,h,{includeHydrateFallback:w}={}){return cw(s.map(S=>{let M=h.routes[S.route.id];if(!M)return[];let O=[M.module];return M.clientActionModule&&(O=O.concat(M.clientActionModule)),M.clientLoaderModule&&(O=O.concat(M.clientLoaderModule)),w&&M.hydrateFallbackModule&&(O=O.concat(M.hydrateFallbackModule)),M.imports&&(O=O.concat(M.imports)),O}).flat(1))}function cw(s){return[...new Set(s)]}function uw(s){let h={},w=Object.keys(s).sort();for(let S of w)h[S]=s[S];return h}function hw(s,h){let w=new Set;return new Set(h),s.reduce((S,M)=>{let O=JSON.stringify(uw(M));return w.has(O)||(w.add(O),S.push({key:O,link:M})),S},[])}function vv(){let s=j.useContext(xr);return Eh(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function dw(){let s=j.useContext(Sl);return Eh(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var Lh=j.createContext(void 0);Lh.displayName="FrameworkContext";function _v(){let s=j.useContext(Lh);return Eh(s,"You must render this element inside a <HydratedRouter> element"),s}function fw(s,h){let w=j.useContext(Lh),[S,M]=j.useState(!1),[O,A]=j.useState(!1),{onFocus:r,onBlur:u,onMouseEnter:d,onMouseLeave:g,onTouchStart:l}=h,m=j.useRef(null);j.useEffect(()=>{if(s==="render"&&A(!0),s==="viewport"){let p=c=>{c.forEach(o=>{A(o.isIntersecting)})},a=new IntersectionObserver(p,{threshold:.5});return m.current&&a.observe(m.current),()=>{a.disconnect()}}},[s]),j.useEffect(()=>{if(S){let p=setTimeout(()=>{A(!0)},100);return()=>{clearTimeout(p)}}},[S]);let b=()=>{M(!0)},C=()=>{M(!1),A(!1)};return w?s!=="intent"?[O,m,{}]:[O,m,{onFocus:va(r,b),onBlur:va(u,C),onMouseEnter:va(d,b),onMouseLeave:va(g,C),onTouchStart:va(l,b)}]:[!1,m,{}]}function va(s,h){return w=>{s&&s(w),w.defaultPrevented||h(w)}}function pw({page:s,...h}){let{router:w}=vv(),S=j.useMemo(()=>sv(w.routes,s,w.basename),[w.routes,s,w.basename]);return S?j.createElement(gw,{page:s,matches:S,...h}):null}function mw(s){let{manifest:h,routeModules:w}=_v(),[S,M]=j.useState([]);return j.useEffect(()=>{let O=!1;return ow(s,h,w).then(A=>{O||M(A)}),()=>{O=!0}},[s,h,w]),S}function gw({page:s,matches:h,...w}){let S=ns(),{future:M,manifest:O,routeModules:A}=_v(),{basename:r}=vv(),{loaderData:u,matches:d}=dw(),g=j.useMemo(()=>Qm(s,h,d,O,S,"data"),[s,h,d,O,S]),l=j.useMemo(()=>Qm(s,h,d,O,S,"assets"),[s,h,d,O,S]),m=j.useMemo(()=>{if(s===S.pathname+S.search+S.hash)return[];let p=new Set,a=!1;if(h.forEach(o=>{var y;let f=O.routes[o.route.id];!f||!f.hasLoader||(!g.some(R=>R.route.id===o.route.id)&&o.route.id in u&&((y=A[o.route.id])!=null&&y.shouldRevalidate)||f.hasClientLoader?a=!0:p.add(o.route.id))}),p.size===0)return[];let c=nw(s,r,M.unstable_trailingSlashAwareDataRequests,"data");return a&&p.size>0&&c.searchParams.set("_routes",h.filter(o=>p.has(o.route.id)).map(o=>o.route.id).join(",")),[c.pathname+c.search]},[r,M.unstable_trailingSlashAwareDataRequests,u,S,O,g,h,s,A]),b=j.useMemo(()=>lw(l,O),[l,O]),C=mw(l);return j.createElement(j.Fragment,null,m.map(p=>j.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...w})),b.map(p=>j.createElement("link",{key:p,rel:"modulepreload",href:p,...w})),C.map(({key:p,link:a})=>j.createElement("link",{key:p,nonce:w.nonce,...a,crossOrigin:a.crossOrigin??w.crossOrigin})))}function vw(...s){return h=>{s.forEach(w=>{typeof w=="function"?w(h):w!=null&&(w.current=h)})}}var _w=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{_w&&(window.__reactRouterVersion="7.13.2")}catch{}function bw({basename:s,children:h,unstable_useTransitions:w,window:S}){let M=j.useRef();M.current==null&&(M.current=Qb({window:S,v5Compat:!0}));let O=M.current,[A,r]=j.useState({action:O.action,location:O.location}),u=j.useCallback(d=>{w===!1?r(d):j.startTransition(()=>r(d))},[w]);return j.useLayoutEffect(()=>O.listen(u),[O,u]),j.createElement(Ky,{basename:s,children:h,location:A.location,navigationType:A.action,navigator:O,unstable_useTransitions:w})}var bv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ts=j.forwardRef(function({onClick:h,discover:w="render",prefetch:S="none",relative:M,reloadDocument:O,replace:A,unstable_mask:r,state:u,target:d,to:g,preventScrollReset:l,viewTransition:m,unstable_defaultShouldRevalidate:b,...C},p){let{basename:a,navigator:c,unstable_useTransitions:o}=j.useContext(Xi),f=typeof g=="string"&&bv.test(g),y=lv(g,a);g=y.to;let R=Ay(g,{relative:M}),k=ns(),D=null;if(r){let X=Sh(r,[],k.unstable_mask?k.unstable_mask.pathname:"/",!0);a!=="/"&&(X.pathname=X.pathname==="/"?a:cs([a,X.pathname])),D=c.createHref(X)}let[E,L,z]=fw(S,C),H=xw(g,{replace:A,unstable_mask:r,state:u,target:d,preventScrollReset:l,relative:M,viewTransition:m,unstable_defaultShouldRevalidate:b,unstable_useTransitions:o});function P(X){h&&h(X),X.defaultPrevented||H(X)}let I=!(y.isExternal||O),K=j.createElement("a",{...C,...z,href:(I?D:void 0)||y.absoluteURL||R,onClick:I?P:h,ref:vw(p,L),target:d,"data-discover":!f&&w==="render"?"true":void 0});return E&&!f?j.createElement(j.Fragment,null,K,j.createElement(pw,{page:R})):K});ts.displayName="Link";var yw=j.forwardRef(function({"aria-current":h="page",caseSensitive:w=!1,className:S="",end:M=!1,style:O,to:A,viewTransition:r,children:u,...d},g){let l=Na(A,{relative:d.relative}),m=ns(),b=j.useContext(Sl),{navigator:C,basename:p}=j.useContext(Xi),a=b!=null&&Dw(l)&&r===!0,c=C.encodeLocation?C.encodeLocation(l).pathname:l.pathname,o=m.pathname,f=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;w||(o=o.toLowerCase(),f=f?f.toLowerCase():null,c=c.toLowerCase()),f&&p&&(f=Ms(f,p)||f);const y=c!=="/"&&c.endsWith("/")?c.length-1:c.length;let R=o===c||!M&&o.startsWith(c)&&o.charAt(y)==="/",k=f!=null&&(f===c||!M&&f.startsWith(c)&&f.charAt(c.length)==="/"),D={isActive:R,isPending:k,isTransitioning:a},E=R?h:void 0,L;typeof S=="function"?L=S(D):L=[S,R?"active":null,k?"pending":null,a?"transitioning":null].filter(Boolean).join(" ");let z=typeof O=="function"?O(D):O;return j.createElement(ts,{...d,"aria-current":E,className:L,ref:g,style:z,to:A,viewTransition:r},typeof u=="function"?u(D):u)});yw.displayName="NavLink";var ww=j.forwardRef(({discover:s="render",fetcherKey:h,navigate:w,reloadDocument:S,replace:M,state:O,method:A=cl,action:r,onSubmit:u,relative:d,preventScrollReset:g,viewTransition:l,unstable_defaultShouldRevalidate:m,...b},C)=>{let{unstable_useTransitions:p}=j.useContext(Xi),a=Lw(),c=Rw(r,{relative:d}),o=A.toLowerCase()==="get"?"get":"post",f=typeof r=="string"&&bv.test(r),y=R=>{if(u&&u(R),R.defaultPrevented)return;R.preventDefault();let k=R.nativeEvent.submitter,D=(k==null?void 0:k.getAttribute("formmethod"))||A,E=()=>a(k||R.currentTarget,{fetcherKey:h,method:D,navigate:w,replace:M,state:O,relative:d,preventScrollReset:g,viewTransition:l,unstable_defaultShouldRevalidate:m});p&&w!==!1?j.startTransition(()=>E()):E()};return j.createElement("form",{ref:C,method:o,action:c,onSubmit:S?u:y,...b,"data-discover":!f&&s==="render"?"true":void 0})});ww.displayName="Form";function Sw(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yv(s){let h=j.useContext(xr);return Yt(h,Sw(s)),h}function xw(s,{target:h,replace:w,unstable_mask:S,state:M,preventScrollReset:O,relative:A,viewTransition:r,unstable_defaultShouldRevalidate:u,unstable_useTransitions:d}={}){let g=xl(),l=ns(),m=Na(s,{relative:A});return j.useCallback(b=>{if(Zy(b,h)){b.preventDefault();let C=w!==void 0?w:La(l)===La(m),p=()=>g(s,{replace:C,unstable_mask:S,state:M,preventScrollReset:O,relative:A,viewTransition:r,unstable_defaultShouldRevalidate:u});d?j.startTransition(()=>p()):p()}},[l,g,m,w,S,M,h,s,O,A,r,u,d])}function Cw(s){ss(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let h=j.useRef(oh(s)),w=j.useRef(!1),S=ns(),M=j.useMemo(()=>ew(S.search,w.current?null:h.current),[S.search]),O=xl(),A=j.useCallback((r,u)=>{const d=oh(typeof r=="function"?r(new URLSearchParams(M)):r);w.current=!0,O("?"+d,u)},[O,M]);return[M,A]}var kw=0,Ew=()=>`__${String(++kw)}__`;function Lw(){let{router:s}=yv("useSubmit"),{basename:h}=j.useContext(Xi),w=Wy(),S=s.fetch,M=s.navigate;return j.useCallback(async(O,A={})=>{let{action:r,method:u,encType:d,formData:g,body:l}=sw(O,h);if(A.navigate===!1){let m=A.fetcherKey||Ew();await S(m,w,A.action||r,{unstable_defaultShouldRevalidate:A.unstable_defaultShouldRevalidate,preventScrollReset:A.preventScrollReset,formData:g,body:l,formMethod:A.method||u,formEncType:A.encType||d,flushSync:A.flushSync})}else await M(A.action||r,{unstable_defaultShouldRevalidate:A.unstable_defaultShouldRevalidate,preventScrollReset:A.preventScrollReset,formData:g,body:l,formMethod:A.method||u,formEncType:A.encType||d,replace:A.replace,state:A.state,fromRouteId:w,flushSync:A.flushSync,viewTransition:A.viewTransition})},[S,M,h,w])}function Rw(s,{relative:h}={}){let{basename:w}=j.useContext(Xi),S=j.useContext(us);Yt(S,"useFormAction must be used inside a RouteContext");let[M]=S.matches.slice(-1),O={...Na(s||".",{relative:h})},A=ns();if(s==null){O.search=A.search;let r=new URLSearchParams(O.search),u=r.getAll("index");if(u.some(g=>g==="")){r.delete("index"),u.filter(l=>l).forEach(l=>r.append("index",l));let g=r.toString();O.search=g?`?${g}`:""}}return(!s||s===".")&&M.route.index&&(O.search=O.search?O.search.replace(/^\?/,"?index&"):"?index"),w!=="/"&&(O.pathname=O.pathname==="/"?w:cs([w,O.pathname])),La(O)}function Dw(s,{relative:h}={}){let w=j.useContext(uv);Yt(w!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:S}=yv("useViewTransitionState"),M=Na(s,{relative:h});if(!w.isTransitioning)return!1;let O=Ms(w.currentLocation.pathname,S)||w.currentLocation.pathname,A=Ms(w.nextLocation.pathname,S)||w.nextLocation.pathname;return fl(M.pathname,A)!=null||fl(M.pathname,O)!=null}var zi=iv();const V2=yh(zi);class pl extends Error{constructor(h,w){super(w),this.status=h}}async function kl(s,h,w){const S={method:s,credentials:"include",headers:{"Content-Type":"application/json"}};w!==void 0&&(S.body=JSON.stringify(w));const M=await fetch(h,S);if(M.status===401)throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new pl(401,"Unauthorized");if(!M.ok){const O=await M.text().catch(()=>"");let A="";try{A=JSON.parse(O).error??""}catch{}throw A||(console.error("[api]",s,h,M.status,O),A=`HTTP ${M.status}`),new pl(M.status,A)}if(M.status!==204)return M.json()}function _t(s){return kl("GET",s)}function rt(s,h){return kl("POST",s,h)}function Di(s,h){return kl("PUT",s,h)}function Cr(s){return kl("DELETE",s)}function Zm(s,h=!1){return rt("/api/auth/login",{password:s,remember:h})}function eg(){return rt("/api/auth/logout")}function Tw(){return _t("/api/auth/status")}function Mw(s,h){return rt("/api/auth/setup",{password:s,confirmPassword:h})}function wv(s,h,w){return Di("/api/auth/password",{oldPassword:s,newPassword:h,confirmPassword:w})}function Aw(){const[s,h]=j.useState(!1),[w,S]=j.useState(!0),[M,O]=j.useState(!1),[A,r]=j.useState(!0);j.useEffect(()=>{Tw().then(m=>{h(m.authenticated),S(m.authRequired),O(m.setupRequired)}).catch(()=>h(!1)).finally(()=>r(!1))},[]),j.useEffect(()=>{const m=()=>h(!1);return window.addEventListener("auth:unauthorized",m),()=>window.removeEventListener("auth:unauthorized",m)},[]);const u=j.useCallback(async(m,b)=>{await Zm(m,b),h(!0)},[]),d=j.useCallback(async()=>{await eg(),h(!1)},[]),g=j.useCallback(async(m,b)=>{await Mw(m,b),O(!1),h(!0)},[]),l=j.useCallback(async(m,b,C,p)=>{await Zm(m,p);try{await wv(m,b,C)}catch(a){throw await eg().catch(()=>{}),a}h(!0)},[]);return{authenticated:s,authRequired:w,setupRequired:M,loading:A,login:u,logout:d,setup:g,changePassword:l}}const jw=1;function Ow(s){const[h,w]=j.useState(!1),S=j.useRef(null),M=j.useRef(new Set),O=j.useRef(new Map),A=j.useRef(void 0),r=j.useRef(0),u=j.useCallback(()=>{if(!s)return;const b=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,C=new WebSocket(b);C.binaryType="arraybuffer",S.current=C,C.onopen=()=>{w(!0),r.current=0},C.onmessage=p=>{if(p.data instanceof ArrayBuffer){const a=new Uint8Array(p.data);if(a.length<2||a[0]!==jw)return;const c=a[1];if(a.length<2+c)return;const o=new TextDecoder("utf-8").decode(a.subarray(2,2+c)),f=a.subarray(2+c),y=O.current.get(o);if(y)for(const R of y)try{R(f)}catch{}return}try{const a=JSON.parse(p.data);M.current.forEach(c=>c(a))}catch{}},C.onclose=()=>{w(!1),S.current=null;const p=Math.min(1e3*2**r.current,3e4);r.current++,A.current=setTimeout(u,p)},C.onerror=()=>{C.close()}},[s]);j.useEffect(()=>(u(),()=>{A.current&&clearTimeout(A.current),S.current&&S.current.close()}),[u]);const d=j.useCallback(m=>(M.current.add(m),()=>{M.current.delete(m)}),[]),g=j.useCallback(m=>{S.current&&S.current.readyState===WebSocket.OPEN&&S.current.send(JSON.stringify(m))},[]),l=j.useCallback((m,b)=>{let C=O.current.get(m);return C||(C=new Set,O.current.set(m,C)),C.add(b),()=>{const p=O.current.get(m);p&&(p.delete(b),p.size===0&&O.current.delete(m))}},[]);return{connected:h,onEvent:d,sendMessage:g,subscribeBinary:l}}const Rh=new Map;function Bw(s){Rh.set(s.id,s)}function J2(){return Array.from(Rh.values())}function Nw(){const s={},h={};for(const w of Rh.values())Object.assign(s,w.translations.en),Object.assign(h,w.translations.ko);return{en:s,ko:h}}const zw={en:{"login.title":"CLITrigger","login.subtitle":"Authentication Required","login.password":"Enter password","login.rememberMe":"Keep me logged in","login.submit":"Sign In","login.loading":"Authenticating…","login.error":"Access denied. Please try again.","login.footer":"Secure Access","login.changePassword":"Change password","login.backToLogin":"Back to sign in","login.changeSubmit":"Change password & sign in","login.forgot":"Forgot your password?","login.forgotHint":'Resetting requires access to the machine running the server. Run "clitrigger reset-password" in a terminal (desktop app: Help → Reset password menu), then set a new password on this screen.',"login.disclaimer":'This software is provided "as is" without any warranties. Users are solely responsible for all actions taken using this tool, including any costs incurred from AI CLI usage, data loss, or unintended code changes. The developers assume no liability for any direct, indirect, or consequential damages arising from use.',"setup.title":"Welcome to CLITrigger","setup.subtitle":"Set a password to secure this instance","setup.password":"New password","setup.confirm":"Confirm password","setup.submit":"Create password","setup.loading":"Saving…","setup.tooShort":"Password must be at least 8 characters.","setup.mismatch":"Passwords do not match.","setup.tunnelPaused":"External sharing (Cloudflare tunnel) is paused until setup completes.","setup.error":"Failed to save password.","errors.unexpected":"Something went wrong. Please try again.","errors.renderTitle":"CLITrigger could not display this screen","errors.renderDescription":"Your data is safe. Reload the app to restore the screen.","errors.reload":"Reload app","errors.projectsLoad":"Failed to load projects.","errors.projectCreate":"Failed to create the project.","errors.projectDelete":"Failed to delete the project.","projects.cleanupPartialFailed":"Cleanup partially failed: {details}","common.ok":"OK","common.cancel":"Cancel","sidebar.home":"Home","sidebar.review":"Review Queue","sidebar.agenda":"My Schedule","agenda.title":"My Schedule","agenda.subtitle":"Personal notes and agenda, plus routines across all projects","agenda.today":"Today","agenda.refresh":"Refresh","agenda.refreshHelp":"Re-fetches the current range: memos, project routines/planner, and assigned Jira issues. The view also refreshes when you navigate or switch views; it does not poll while idle.","agenda.view.month":"Month","agenda.view.week":"Week","agenda.view.day":"Day","agenda.view.table":"Table","agenda.addItem":"Add item","agenda.expand":"Expand","agenda.collapse":"Collapse","agenda.tags.all":"All","agenda.tags.placeholder":"Add tag…","agenda.resizePanel":"Drag to resize","agenda.resizeCalendar":"Drag to resize the calendar","agenda.untitled":"(untitled)","agenda.source.personal":"Memos","agenda.source.schedule":"Routines","agenda.source.planner":"Planner","agenda.source.jira":"Jira","agenda.jira.settings":"Jira connection","agenda.jira.subtitle":"See the Jira tasks assigned to you right here on your calendar.","agenda.jira.enable":"Show Jira issues assigned to me","agenda.jira.baseUrlLabel":"Jira site address","agenda.jira.baseUrlHint":"The address you use to open Jira: the part at the very start of your browser's address bar. e.g. https://yourcompany.atlassian.net","agenda.jira.emailLabel":"Login email","agenda.jira.emailHint":"The email you sign in to Jira (Atlassian) with.","agenda.jira.tokenLabel":"API token","agenda.jira.tokenPlaceholder":"Paste your API token","agenda.jira.tokenLink":"Create an API token","agenda.jira.tokenStep1":"1. Open the link above and sign in.","agenda.jira.tokenStep2":'2. Click "Create API token", give it any name.',"agenda.jira.tokenStep3":"3. Copy it and paste it into the box above. (Not your password; a separate token.)","agenda.jira.criteria":"Import criteria","agenda.jira.criteriaHint":"Choose which issues show up on the calendar and can be imported.","agenda.jira.assigneeMe":"Only issues assigned to me","agenda.jira.includeDone":"Include done issues","agenda.jira.projects":"Projects","agenda.jira.projectsHint":"Limit to these project keys (comma or space separated). Leave empty for all.","agenda.jira.statuses":"Statuses to import","agenda.jira.statusesHint":'Only issues in the checked statuses are imported. Leave all unchecked to use "Include done issues" above instead.',"agenda.jira.statusesLoad":"Load statuses","agenda.jira.statusesLoading":"Loading…","agenda.jira.statusesNeedConn":"Save & test the connection first to load statuses.","agenda.jira.statusesSearch":"Filter statuses…","agenda.jira.statusesEmpty":'No statuses loaded. Click "Load statuses".',"agenda.jira.dismiss":"Hide from my schedule","agenda.jira.dismissedTitle":"Hidden Jira issues","agenda.jira.restore":"Restore","agenda.jira.extraJql":"Advanced (JQL)","agenda.jira.extraJqlHint":"Extra JQL, AND-ed with the above. e.g. labels = urgent AND priority >= High","agenda.jira.test":"Test connection","agenda.jira.tokenSaved":"Token saved (leave blank to keep)","agenda.jira.hint":'Open issues assigned to you are pulled in. Due-dated ones land on the calendar; the rest are listed under "Jira (no due date)". Auth uses your email + API token.',"agenda.jira.import":"Add to my schedule","agenda.jira.noDue":"Jira (no due date)","agenda.jira.error":"Jira error","agenda.moveToPlanner":"Move to planner","agenda.importToPlanner":"Add to planner","agenda.pickProject":"Select a project","agenda.noProjects":"No projects","agenda.table.name":"Name","agenda.table.date":"Date","agenda.table.kind":"Type","agenda.table.status":"Status","agenda.kind.personal":"Memo","agenda.kind.schedule":"Routine","agenda.kind.planner":"Planner","agenda.kind.jira":"Jira","agenda.status.done":"Done","agenda.status.pending":"Pending","agenda.add":"Add","agenda.memo":"Memo","agenda.backlog":"No date","agenda.backlogEmpty":"No undated memos","agenda.dayEmpty":"Nothing on this day","agenda.fromSchedule":"Project routine","agenda.fromPlanner":"Project planner","agenda.toggleDone":"Toggle done","agenda.delete":"Delete","agenda.confirmDelete":"Delete this item?","agenda.addTitle":"New item","agenda.editTitle":"Edit item","agenda.titlePlaceholder":"Title","agenda.descPlaceholder":"Notes (optional)","agenda.dateHint":"Leave the date empty for an undated memo. Set a time for a timed item.","agenda.cancel":"Cancel","agenda.save":"Save","agenda.cleanup":"Clean up memos","agenda.cleanup.title":"Delete memos by date range","agenda.cleanup.subtitle":"Bulk-delete personal memos in a date range. This cannot be undone.","agenda.cleanup.from":"From","agenda.cleanup.to":"To","agenda.cleanup.doneOnly":"Only completed memos","agenda.cleanup.includeBacklog":"Also delete undated (backlog) memos","agenda.cleanup.previewLabel":"To delete","agenda.cleanup.unit":"memo(s)","agenda.cleanup.none":"No memos match these conditions","agenda.cleanup.confirm":"Delete","sidebar.workspaces":"Workspaces","sidebar.favorites":"Favorites","sidebar.collapse":"Collapse sidebar","sidebar.expand":"Expand sidebar","favorites.add":"Add favorite","favorites.edit":"Edit favorite","favorites.delete":"Delete","favorites.deleteConfirm":"Delete this favorite?","favorites.launchFailed":"Launch failed","favorites.empty":"No favorites yet.","favorites.form.title.create":"New Favorite","favorites.form.title.edit":"Edit Favorite","favorites.form.name":"Name","favorites.form.type":"Type","favorites.form.target":"Target","favorites.form.browse":"Browse…","favorites.form.targetHint.executable":"Absolute path to .exe / .bat / .sh","favorites.form.targetHint.command":"Shell command (runs as-is)","favorites.form.targetHint.url":"http:// or https:// URL","favorites.form.args":"Arguments (space-separated)","favorites.form.cwd":"Working directory (optional)","favorites.form.create":"Create","favorites.form.save":"Save","favorites.form.cancel":"Cancel","favorites.types.executable":"Executable","favorites.types.command":"Command","favorites.types.url":"URL","favorites.security.notice":"Favorites run on the server with your account. If tunneling is enabled, anyone with the password can launch them.","tunnel.title":"Tunnel Settings","tunnel.description":"Cloudflare tunnel configuration. Set a custom domain to avoid browser warnings on shared *.trycloudflare.com / *.cfargotunnel.com URLs.","tunnel.name.label":"Named tunnel","tunnel.name.placeholder":"my-app","tunnel.name.hint":"Empty = use a random Quick Tunnel (https://*.trycloudflare.com).","tunnel.hostname.label":"Custom domain (optional)","tunnel.hostname.placeholder":"app.your-domain.com","tunnel.hostname.hint":'You must run "cloudflared tunnel route dns" to point this domain at your tunnel first. Empty = fall back to *.cfargotunnel.com.',"tunnel.hostname.invalid":"Enter a valid public domain (e.g. app.your-domain.com).","tunnel.hostname.needsName":"Set a named tunnel first to use a custom domain.","tunnel.guide.toggle":"How to set up a custom domain","tunnel.guide.heading":"One-time setup with the cloudflared CLI:","tunnel.guide.step4":"Enter the tunnel name and domain above and save.","tunnel.guide.note":"Your domain must already be on a Cloudflare account (free plan is fine).","tunnel.status.stopped":"Stopped","tunnel.status.starting":"Starting…","tunnel.status.running":"Running","tunnel.status.error":"Error","tunnel.save":"Save","tunnel.saving":"Saving…","tunnel.saved":"Tunnel settings saved. Restart the tunnel to apply.","tunnel.saveFailed":"Failed to save tunnel settings.","tunnel.close":"Close","tunnel.restart":"Restart tunnel","tunnel.restarting":"Restarting…","tunnel.restarted":"Tunnel restarted.","tunnel.restartFailed":"Failed to restart tunnel.","tunnel.start":"Start tunnel","tunnel.starting":"Starting…","tunnel.urlCopied":"External URL copied to clipboard","settings.title":"Settings","settings.tabs.account":"Account","settings.tabs.session":"Terminals","settings.tabs.tunnel":"Tunnel","settings.tabs.mcp":"MCP","mcp.title":"MCP Connection","mcp.description":"Connect an AI CLI or desktop client to CLITrigger over MCP: list projects, create and run tasks, and check status from your editor. Register one of the two ways below and keep this server running.","mcp.loading":"Loading connection info…","mcp.config.label":"Option A · Paste this config (Claude Desktop and other JSON clients)","mcp.commands.label":"Option B · Run one command in your CLI","mcp.commands.hint":"Copy the line for the CLI you use. Each registers CLITrigger over HTTP transport.","mcp.copy":"Copy","mcp.copied":"Copied to clipboard","mcp.copyFailed":"Copy failed","mcp.tokenNote":"This token grants full API access to anyone who can reach this server. Treat it like a password.","mcp.close":"Close","sessionSettings.title":"Terminal preferences","sessionSettings.description":"Default behavior for new terminals and reusable color tags.","sessionSettings.saved":"Saved","sessionSettings.worktree.title":"Worktree default","sessionSettings.worktree.label":"Use git worktree for new terminals","sessionSettings.worktree.hint":"When enabled, every new terminal is created on its own branch in .worktrees/. Only applies to git repos.","sessionSettings.fontSize.title":"Default font size","sessionSettings.fontSize.label":"Font size for new terminals (px)","sessionSettings.fontSize.hint":"Terminals you have not zoomed yet inherit this value live. Per-terminal zoom (Ctrl+wheel, A−/A+) overrides it.","sessionSettings.tags.title":"Tags","sessionSettings.tags.description":"Pick a name and color, then assign in the terminal form.","sessionSettings.tags.empty":"No tags yet. Add one above.","sessionSettings.tags.namePlaceholder":"Tag name (e.g. exploring, deploy)","sessionSettings.tags.color":"Color","sessionSettings.tags.add":"Add","sessionSettings.tags.edit":"Edit","sessionSettings.tags.delete":"Delete","sessionSettings.tags.save":"Save","sessionSettings.tags.cancel":"Cancel","sessionSettings.tags.deleteConfirm":'Delete tag "{name}"? Terminals tagged with it will become untagged.',"sessionSettings.aliases.title":"Terminal aliases","sessionSettings.aliases.description":"Saved command snippets. Click the ⌘ icon in a terminal window's titlebar to insert one as input; Enter is yours to press.","sessionSettings.aliases.namePlaceholder":"Name (e.g. WSL Ubuntu)","sessionSettings.aliases.commandPlaceholder":"Command (e.g. wsl -d Ubuntu)","sessionSettings.aliases.add":"Add","sessionSettings.aliases.empty":"No aliases yet.","sessionSettings.aliases.deleteConfirm":'Delete alias "{name}"? Sessions using it will fall back to the OS default shell.',"common.save":"Save","common.edit":"Edit","common.delete":"Delete","session.tag.none":"No tag","account.title":"Change password","account.description":"Enter your current password, then choose a new one.","account.oldPassword":"Current password","account.newPassword":"New password","account.confirm":"Confirm new password","account.tooShort":"Password must be at least 8 characters.","account.mismatch":"Passwords do not match.","account.save":"Save","account.saving":"Saving…","account.saved":"Password updated. Other sessions will be signed out.","account.saveFailed":"Failed to update password.","account.close":"Close","review.title":"Review Queue","review.subtitle":"Triage overnight todos across all projects","review.refresh":"Refresh","review.empty":"Nothing to review in this window.","review.viewDetails":"View","review.approve":"Approve & Merge","review.requestChanges":"Request changes","review.discard":"Discard","review.cancel":"Cancel","review.send":"Send","review.continuePlaceholder":"Describe what to fix or change…","review.discardConfirm":"Discard this todo and clean up its worktree?","review.mergeFailed":"Merge failed","review.continueFailed":"Continue failed","review.discardFailed":"Discard failed","review.closeDetails":"Close details","review.justNow":"just now","review.minAgo":"m ago","review.hourAgo":"h ago","review.dayAgo":"d ago","review.files":"files","review.lines":"lines","review.rounds":"rounds","review.window.12h":"Last 12h","review.window.24h":"Last 24h","review.window.7d":"Last 7d","review.filter.all":"All","review.filter.risky":"Risky","review.filter.quickWins":"Quick wins","review.filter.failed":"Failed","review.risk.low":"Low risk","review.risk.medium":"Medium risk","review.risk.high":"High risk","review.tokens.total":"Total tokens","review.tokens.todos":"Todos","review.tokens.byCli":"By CLI tool","review.diff.empty":"No changes against the base branch.","review.diff.noBranch":"Diff unavailable: this todo has no branch (ran on the main branch).","review.diff.branchMissing":"Diff unavailable: branch was deleted.","review.diff.baseBranchMissing":"Diff unavailable: base branch not found in repo. Check the project's default_branch setting.","review.diff.notFound":"Todo not found.","projects.title":"All Projects","projects.subtitle":"Project Console","projects.new":"New Project","projects.logout":"Sign Out","projects.loading":"Loading projects…","projects.empty":"No projects yet","projects.emptyHint":"Create your first project to get started.","projects.tasks":"tasks","projects.active":"active","projects.done":"done","projects.search":"Search projects…","projects.delete":"Delete project","projects.deleteConfirm":"Are you sure you want to delete this project?","projects.pathMissing":"Path not found","projects.pathMissingConfirm":"The local folder for this project no longer exists. Delete it?","projects.noGit":"No Git","detail.back":"Projects","detail.loading":"Loading…","detail.notFound":"Project not found","detail.backToProjects":"Back to Projects","detail.live":"Connected","header.branch":"Branch","header.editName":"Click to rename project","header.openFolder":"Open folder","header.workers":"Workers","header.model":"Model","header.settings":"Settings","header.runAll":"Run All","header.stopAll":"Stop All","header.config":"Project Settings","header.execConfig":"Automation Settings","header.execConfigHint":"Applies to Tasks, Discussions, and Routines.","header.maxWorkers":"Max Workers","settings.defaultMaxTurns":"Default Max Turns","settings.defaultMaxTurnsHint":"Default turn limit per task. Tasks can override individually.","header.cliTool":"CLI Tool","header.cliFlags":"CLI Flags","header.cancel":"Cancel","header.save":"Save","header.saving":"Saving…","header.noGit":"No Git","header.noGitHint":'This project is not a git repository. Tasks will run directly without worktree isolation. Run "git init" in the project path, then re-check.',"header.recheckGit":"Re-check Git Status","header.fallbackChainTitle":"CLI Fallback Chain","header.fallbackChainHint":"When a CLI tool runs out of context, automatically switch to the next tool in the chain.","header.autoReviewerTitle":"Auto Reviewer","header.autoReviewerHint":"When a task assigned to the worker CLI completes successfully, automatically create a follow-up review task for the reviewer CLI.","header.autoReviewerEnable":"Enable auto review","header.autoReviewerFrom":"Worker CLI","header.autoReviewerTo":"Reviewer CLI","header.sandboxTitle":"Sandbox Mode","header.sandboxBadgeStrict":"Sandbox: Strict","header.sandboxBadgePermissive":"Sandbox: Permissive","header.sandboxStrict":"Strict (Recommended)","header.sandboxStrictDesc":"CLI tools can only access files within the worktree directory.","header.sandboxPermissive":"Permissive","header.sandboxPermissiveDesc":"CLI tools can access any file on the system.","header.sandboxWarning":"Warning: In permissive mode, CLI tools can access files outside the worktree. Use with caution.","header.worktreeTitle":"Worktree Isolation","header.worktreeEnabled":"Worktree (Recommended)","header.worktreeEnabledDesc":"Each task runs in its own branch. Safe for parallel tasks.","header.worktreeDisabled":"Direct (Main Branch)","header.worktreeDisabledDesc":"Tasks run on the main branch. Max workers forced to 1.","header.worktreeWarning":"Warning: Tasks will modify the main branch directly. Concurrent execution is disabled.","header.npmAutoInstallLabel":"Auto-run `npm install` on worktree creation","header.npmAutoInstallHint":"Lets agents run test/build inside the worktree immediately for npm projects. Disable for pnpm/yarn/bun or non-npm projects.","header.autoCommitLabel":"Auto-commit leftover changes","header.autoCommitHint":"Commits uncommitted worktree changes when a task or session ends, and before merging a worktree branch. When off, merging a worktree with uncommitted changes is refused.","header.noWorktreeBadge":"No Worktree","header.debugBadge":"Debug Logs","header.showTokenUsageTitle":"Token Usage Display","header.showTokenUsageDesc":"Show token usage (input/output) after task completion.","header.showTokenUsageEnable":"Show token usage","header.debugLoggingTitle":"Debug Logging","header.debugLoggingDesc":"Save full CLI input/output to .debug-logs/ for each task execution.","header.debugLoggingEnable":"Enable debug log files","header.usageLimit":"Usage","header.cliNotInstalled":"{tool} is not installed","header.cliInstalled":"Installed","header.cliNotFound":"Not installed","header.cliInstallHint.claude":"npm install -g @anthropic-ai/claude-code","header.cliInstallHint.antigravity":"curl -fsSL https://antigravity.google/cli/install.sh | bash","header.cliInstallHint.codex":"npm install -g @openai/codex","header.cliRefresh":"Re-check","form.newProject":"New Project","form.projectName":"Project Name","form.folderPath":"Folder Path","form.cancel":"Cancel","form.create":"Create","form.creating":"Creating…","form.createError":"Failed to create project","browse.title":"Browse Folder","browse.select":"Select","browse.loading":"Loading…","browse.error":"Failed to load directory","browse.empty":"No folders found","todos.title":"Tasks","todos.add":"Add Task","todos.empty":"No tasks yet","todos.emptyHint":"Add a task to begin.","todos.merge":"Merge","todos.filterAll":"All","todos.filterActive":"In Progress","todos.filterCompleted":"Completed","todos.filterCancelled":"Cancelled","todos.filterEmpty":"No tasks in this filter.","todos.stackModeOn":"Stack mode on. Click again to disable.","todos.stackModeOff":"Enable stack mode (iOS-style collapse)","todos.collapseStack":"Collapse to stack","todos.expandStack":"Click to expand","todo.description":"Description","todo.noDescription":"No description provided.","todo.attachedImages":"Attached Images","todo.branch":"Branch","todo.path":"Path","todo.worktree":"Worktree","todo.result":"Result","todo.mergeFailed":"Merge failed","todo.diffError":"Diff error","todo.diffOutput":"Changes","todo.files":"files","todo.systemLog":"Activity Log","todo.start":"Start","todo.startHeadless":"Headless","todo.startHeadlessDesc":"Runs autonomously. All permissions auto-approved. No user input needed.","todo.startInteractive":"Interactive","todo.startInteractiveDesc":"Keeps stdin open so you can send messages during execution.","todo.startVerbose":"Verbose","todo.startVerboseDesc":"Auto-approved + full raw log output in real-time.","todo.sendPlaceholder":"Type a message…","todo.startWithDependency":"Start parent task first","todo.stop":"Stop","todo.viewDiff":"View Diff","todo.hideDiff":"Hide Diff","todo.viewDebugLog":"Debug Log","todo.merge":"Merge","todo.mergeChain":"Merge Chain","todo.mergeChainDesc":"Merge all tasks in this chain to main branch","todo.chainComplete":"Chain Complete","todo.chainTasks":"{count} tasks","todo.edit":"Edit","todo.delete":"Delete","todo.cleanup":"Clean up worktree","todo.cleanupFailed":"Cleanup failed","cleanup.confirmDeleteBranch":`Worktree will be removed. Also delete branch "{name}"?
|
|
62
|
-
|
|
63
|
-
OK = delete worktree + branch
|
|
64
|
-
Cancel = delete worktree only`,"todo.retry":"Retry","todo.retryDesc":"Cleans up previous worktree, clears logs, and re-runs from scratch.","todo.retryFailed":"Retry failed","todo.continue":"Continue","todo.continueDesc":"Run a follow-up prompt in the same worktree, preserving prior work.","todo.continuing":"Continuing…","todo.confirmContinue":"Run follow-up","todo.continuePromptLabel":"Follow-up prompt","todo.continuePromptPlaceholder":"Describe the next step or fix to apply in this worktree…","todo.continuePromptRequired":"Follow-up prompt is required.","todo.roundLabel":"round","todo.dependsOn":"Depends on","todo.mergedFrom":"Inherited from","todo.transferredTo":"Transferred to","todo.schedule":"Schedule","todo.scheduleDesc":"Convert this task into a one-time routine run.","todo.scheduleAt":"Run at","todo.scheduling":"Scheduling…","todo.confirmSchedule":"Schedule","todo.scheduleKeepOriginal":"Keep original task","todo.scheduleOnReset":"Run on Reset","todo.scheduleOnResetDesc":"Auto-run a new task when the rate limit resets.","todo.scheduleOnResetLabel":"Rate limit resets at","todo.resetPromptPlaceholder":"Enter the prompt to run after rate limit resets…","todo.confirmResetSchedule":"Schedule on Reset","todoForm.titlePlaceholder":"e.g. Fix login redirect bug","todoForm.descPlaceholder":"Description (optional)…","todoForm.cliTool":"CLI Tool","todoForm.addImage":"Add Image","todoForm.pasteHint":"Ctrl+V to paste image","todoForm.images":"Images","todoForm.maxTurns":"Max Turns","todoForm.maxTurnsPlaceholder":"No limit","todoForm.maxTurnsHint":"Limit the number of agentic turns to prevent excessive token usage.","todoForm.loopEnable":"Repeat until a done rule is satisfied (loop)","todoForm.loopHint":"After each round the done rules are checked; if unmet, the task runs again in the same worktree with the check output.","todoForm.loopMaxRounds":"Max rounds","todoForm.loopMaxCost":"Cost cap (USD)","todoForm.loopMaxCostPlaceholder":"None","todoForm.loopCheck":"Verification command","todoForm.loopCheckHint":"Runs in the working directory after each round. Exit code 0 = done.","todoForm.loopDonePhrase":"Done phrase","todoForm.loopDonePhraseHint":"The loop ends when the agent's final message contains this text.","todoForm.loopNoDoneRule":"No done rule set: the loop will simply run for the max number of rounds.","todoForm.loopRules":"Rules for every round","todoForm.loopRulesPlaceholder":"e.g. Fix one failing test at a time and commit. Never touch src/legacy.","todoForm.loopRulesHint":"Appended to the prompt of every round.","todoForm.loopStopWhenNoChanges":"Stop if a round makes no commits","todoForm.loopResume":"Resume the CLI session between rounds","todoForm.loopResumeHint":"Off (recommended): each round starts with a fresh context and relies on git history plus the check output.","header.loopDefaultsTitle":"Default Loop Rules","header.loopDefaultsHint":"Template for new tasks: when a task turns on the loop, these rules are prefilled so you do not retype the verification command each time.","header.loopDefaultsEnable":"Keep a default loop rule template for this project","todoForm.dependsOn":"Depends On","todoForm.noDependency":"None (independent task)","todoForm.dependsOnHint":"This task will wait for the dependency to complete, then squash merge its changes into a new branch.","todoForm.worktreeMode":"Execution Branch","todoForm.worktreeInherit":"Follow project setting","todoForm.worktreeForceOn":"Use worktree (isolated branch)","todoForm.worktreeForceOff":"Run on main branch","todoForm.worktreeProjectDefaultOn":"Project default: worktree","todoForm.worktreeProjectDefaultOff":"Project default: main branch","todoForm.worktreeMainWarning":"Running on main branch blocks other todos from running concurrently.","todoForm.cancel":"Cancel","todoForm.save":"Save","dnd.dropHint":"Run after this task","dnd.removeDep":"Remove dependency","dnd.dropToRemoveDep":"Drop here to remove dependency","dnd.cyclicWarning":"Cannot link: circular dependency","graph.autoLayout":"Auto Layout","graph.listView":"List View","graph.graphView":"Graph View","status.pending":"Idle","status.running":"Running","status.completed":"Done","status.failed":"Failed","status.stopped":"Stopped","status.merged":"Merged","progress.complete":"complete","progress.done":"Done","progress.live":"Running","progress.idle":"Idle","progress.fail":"Failed","progress.stop":"Stopped","progress.merged":"Merged","failure.title":"Failure Reason","failure.exitCode":"Exit code","failure.fix":"Fix This: Creates a new task that analyzes the failure and attempts to fix the issue.","failure.fixPrefix":"[Fix] ","result.duration":"Duration","result.commits":"commits","result.filesChanged":"files changed","result.commitHistory":"Commit History","result.changedFiles":"Changed Files","result.tokenUsage":"Token Usage","result.inputTokens":"input","result.outputTokens":"output","result.totalCost":"Cost","result.cacheTokens":"cache","result.turns":"turns","result.contextUsed":"ctx","result.levelLight":"Light","result.levelModerate":"Moderate","result.levelHigh":"High","result.levelHeavy":"Heavy","log.awaiting":"Awaiting output…","log.waitingResponse":"Waiting for response…","log.noChanges":"No changes detected.","log.copy":"Copy","log.copied":"Copied!","log.viewChat":"Chat","log.viewRaw":"Raw","schedules.title":"Routines","schedules.add":"New Routine","schedules.empty":"No routines yet","schedules.emptyHint":"Create a routine to automate recurring tasks.","schedule.type":"Routine Type","schedule.recurring":"Recurring","schedule.once":"One-time","schedule.runAtLabel":"Run at","schedule.cronExpression":"Frequency","schedule.cronHint":"e.g. */30 * * * * (every 30min), 0 9 * * * (daily 9am), 0 9 * * 1-5 (weekdays 9am)","cron.everyMinutes":"Minutes","cron.hourly":"Hourly","cron.daily":"Daily","cron.weekly":"Weekly","cron.monthly":"Monthly","cron.custom":"Custom","cron.every":"Every","cron.minutesLabel":"minutes","cron.everyHourAt":"Every hour at","cron.minutesPast":"min past","cron.everyDayAt":"Every day at","cron.at":"at","cron.everyMonthOn":"Every month on day","cron.dayAt":"at","cron.expression":"Cron","cron.mon":"Mon","cron.tue":"Tue","cron.wed":"Wed","cron.thu":"Thu","cron.fri":"Fri","cron.sat":"Sat","cron.sun":"Sun","schedule.skipIfRunning":"Skip if previous run still active","schedule.active":"Active","schedule.paused":"Paused","schedule.lastRun":"Last run","schedule.never":"Never","schedule.trigger":"Run Now","schedule.activate":"Activate","schedule.pause":"Pause","schedule.edit":"Edit","schedule.delete":"Delete","schedule.runs":"Run History","schedule.runTriggered":"Triggered","schedule.runSkipped":"Skipped","schedule.runCompleted":"Completed","schedule.runFailed":"Failed","schedule.noRuns":"No runs yet","scheduleForm.titlePlaceholder":"e.g. Nightly dependency audit","scheduleForm.descPlaceholder":"Task description template…","scheduleForm.cliTool":"CLI Tool","scheduleForm.cancel":"Cancel","scheduleForm.save":"Save","tabs.automation":"Automation","tabs.automation.help":"Tasks, Loops, Discussions, and Routines in one place.","tabs.web":"Web","tabs.web.help":"Embed an external site (Notion, docs, dashboards) inside the desktop app.","tabs.projectNavigation":"Project workflow","tabs.group.prepare":"Prepare","tabs.group.execute":"Execute","tabs.group.review":"Review","tabs.tasks":"Auto Tasks","tabs.sessions":"Terminals","tabs.discussions":"Discussions","tabs.schedules":"Routines","tabs.git":"Git","tabs.svn":"SVN","tabs.files":"Documents","tabs.planner":"Planner","tabs.wiki":"Wiki","tabs.analytics":"Analytics","tabs.wiki.help":"Project knowledge graph. Curate nodes/edges and they get injected as a <long_term_memory> block into auto-task and discussion prompts so the LLM keeps context across runs.","tabs.planner.help":"Lightweight task notes with tags, priorities, and image attachments. Promote favorites into auto tasks or routines, or import/export as Markdown.","tabs.tasks.help":"A task queue: each TODO runs in its own isolated git worktree (Claude/Antigravity/Codex), in parallel up to the concurrency limit, with dependency chains, multi-round continue, and merge automation.","tabs.loops":"Loops","tabs.loops.help":"Tasks that repeat until a done rule is satisfied: a verification command passes or a done phrase appears. Stop rules (max rounds, cost cap, no-commit rounds) keep them bounded.","loops.empty":"No loops yet","loops.emptyHint":"Create a loop to keep an agent iterating until your verification command passes.","todoForm.loopRulesTitle":"Loop rules","tabs.sessions.help":"Drive Claude/Antigravity/Codex interactively in a floating window. Unlike auto tasks (fire-and-forget), terminals stay live so you can type, observe, and steer the CLI in real time.","tabs.discussions.help":"Multi-agent AI discussions over rounds, then optional implementation. Extract action items into the planner when finished.","tabs.schedules.help":"Trigger auto tasks on cron or one-off routines. Supports auto-restart at rate-limit reset times.","tabs.git.help":"Built-in Fork/SourceTree-style Git client: file status, commit graph, branch management, and diff viewer.","tabs.svn.help":"Built-in SVN working-copy panel: file status, revision log, and diff viewer.","svn.fileStatus":"File Status","svn.history":"History","svn.unversioned":"Unversioned","svn.changed":"Changed","svn.groupByDir":"Group by directory","svn.viewFlat":"Flat list","svn.dirFileCount":"{d} dirs · {f} files","svn.fileCount":"{f} files","svn.workingCopyRev":"Working Copy Revision","svn.update":"Update","svn.refresh":"Refresh","svn.add":"Add","svn.revert":"Revert","svn.delete":"Delete","svn.resolve":"Resolve","svn.commitMessagePlaceholder":"Describe the change. Required.","svn.templates":"Templates","svn.noTemplates":"No templates yet","svn.templatePickHint":"Click: append · Shift+click: replace","svn.templateNamePlaceholder":"Name (defaults to first line)","svn.saveTemplate":"Save","svn.saveTemplateHint":"Save the current message as a template","svn.deleteTemplate":"Delete template","svn.commit":"Commit","svn.committing":"Committing…","svn.commitSuccess":"Committed r{rev}","svn.updating":"Updating…","svn.updateProgress":"{n} files","svn.running":"Running {cmd}…","svn.updateSuccess":"Updated to r{rev}","svn.updateConflicts":"Update finished with {n} conflict(s)","svn.previewDiff":"Preview diff","svn.noChanges":"No local changes.","svn.selectFiles":"Select one or more files first.","svn.notSvn":"Not an SVN working copy.","svn.cliMissing":"svn CLI not found. Install Subversion to use this panel.","svn.repoUrl":"Repository URL","svn.relativePath":"Path","svn.viewsHeader":"Views","svn.actionsHeader":"Commands","svn.checkForModifications":"Check for modifications","svn.showLog":"Show log","svn.updateToRevision":"Update to revision…","svn.cleanup":"Clean up","svn.checkRepository":"Check repository","svn.remoteBadge":"remote","svn.remoteHint":"Contacts the SVN server","svn.loadLog":"Load log","svn.logEmptyHint":"The log is fetched from the SVN server. Nothing loads automatically.","svn.loadMore":"Load more","svn.revision":"Revision","svn.revisionPlaceholder":"e.g. 1234 or HEAD","svn.cleaningUp":"Cleaning up…","svn.cleanupSuccess":"Clean up complete","svn.checking":"Checking…","svn.behindCount":"{n} incoming change(s) on server","svn.upToDate":"Up to date with server","svn.resolveWorking":"Mark resolved (keep working copy)","svn.resolveMine":"Resolve using mine","svn.resolveTheirs":"Resolve using theirs","svn.resolveBase":"Resolve using base","svn.viewDiff":"View diff","svn.showRevisionChanges":"Show changes","svn.compareRevisionWithWorking":"Compare with working copy","svn.revisionChangesTitle":"r{rev} changes","svn.compareWithWorkingTitle":"r{rev} ↔ working copy","svn.cancel":"Cancel","svn.properties":"Properties","svn.propertiesOf":"Properties: {target}","svn.workingCopyRoot":"Working copy root","svn.noProperties":"No properties on this item.","svn.editProperty":"Edit","svn.saveProperty":"Save","svn.close":"Close","svn.ext.path":"Path","svn.ext.peg":"Peg","svn.ext.operative":"Operative","svn.ext.localPath":"Local path","svn.ext.revision":"Revision","svn.ext.showLog":"Show log","svn.ext.pickHint":"Click a revision to use it as the peg revision.","svn.ext.new":"New","svn.ext.remove":"Remove","svn.ext.findHead":"Find HEAD-Revision","svn.ext.editText":"Edit as text","svn.ext.editTable":"Edit as table","svn.ext.empty":"No externals defined.","svn.changelistDefault":"Changes","svn.changelistUnversioned":"Unversioned Files","svn.changelistMissing":"Locally Deleted Files","svn.moveToChangelist":"Move to Changelist","svn.newChangelist":"New Changelist…","svn.removeFromChangelist":"Remove from Changelist","svn.changelistNamePlaceholder":"Changelist name","svn.createChangelist":"Create","svn.renameChangelist":"Rename Changelist","svn.deleteChangelist":"Delete Changelist","header.svnTitle":"SVN (Subversion)","header.svnHint":"Off by default. When enabled, the project is checked for a .svn/ working copy and an SVN tab is shown when found.","header.svnEnable":"Enable SVN for this project","header.processesTitle":"Terminal processes","header.processesHint":"CLI processes of the running terminal sessions. Fetched once when this tab opens (2–3 s on Windows).","header.processesRefresh":"Refresh","header.processesSnapshotAt":"Snapshot time","header.processesNoneRunning":"No running terminal","header.processesLoading":"Listing processes…","header.processesNotFound":"Not in this snapshot — exited or just started","header.processesFailed":"Could not list processes: {reason}","header.processesSub":"{count} subprocesses","header.processesSubHint":"Processes the CLI spawned to do its work (shells, hooks, status line…)","header.processesNoSub":"No subprocesses","header.tabShowHint":"On by default. Uncheck to hide this tab in this project.","header.tabShowEnable":"Show the {tab} tab in this project","tabs.files.help":"Markdown document wiki: browse the file tree, preview/edit notes, and explore wikilinks between .md files through graph, backlinks, outline, tags, and search panels.","tabs.analytics.help":"Execution and cost analytics. Token usage by CLI, status distribution, and daily cost trends in interactive charts.","files.root":"Root","files.empty":"Empty folder","files.loading":"Loading…","files.refresh":"Refresh","files.graph":"Wiki graph: wikilink connections between .md files","files.showHidden":"Show hidden files","files.hideHidden":"Hide hidden files","files.copyPath":"Copy path","files.sendToTerminal":"Send to terminal","files.newTerminal":"New terminal","files.includeLinks":"Include linked docs","files.sendToTask":"Create task from file","files.sentToTerminal":"Sent to terminal","files.noActiveSession":"No open session","files.taskCreated":"Task created","files.taskCreateFailed":"Failed to create task","files.hide":"Hide from Documents","files.unhide":"Show in Documents","files.openInOS":"Open in default app","files.revealInExplorer":"Reveal in file manager","files.openFolder":"Open folder in file manager","files.pin":"Pin to top","files.unpin":"Unpin","files.pinned":"Pinned","files.tooLarge":"File too large to preview (max 2 MB).","files.binaryNotPreviewable":"Binary file. Preview not available.","files.download":"Download","files.preview.empty":"Select a file to preview.","files.html.sandboxNotice":"Safe preview: scripts and external resources are blocked.","files.editor.edit":"Edit","files.editor.save":"Save","files.editor.done":"Done","files.editor.saved":"Saved","files.editor.saveFailed":"Save failed","files.editor.conflict":"File changed on disk. Reopen it to see the new content.","files.editor.discardConfirm":"Discard unsaved changes?","vault.onboarding.title":"Set up the Docs tab","vault.onboarding.intro":"The Docs tab scans the project's .md/.html files and shows them as a [[wikilink]] graph. On large projects the first scan and graph render can be slow. A .vaultignore file (gitignore syntax) limits the tab to the documents you pick.","vault.onboarding.step1Title":"Start with everything hidden","vault.onboarding.step1Body":".vaultignore starts with *, so every file is excluded from the Docs tab. Files stay on disk; they are only hidden here.","vault.onboarding.step2Title":"Unhide the documents you need","vault.onboarding.step2Body":'Right-click a grayed-out file or folder in the file explorer and choose "Show in Docs". The hidden-file toggle is turned on for you.',"vault.onboarding.step3Title":"The graph only includes visible documents","vault.onboarding.step3Body":"Only unhidden documents are scanned and graphed. Edit the patterns anytime in the .vaultignore settings on the left rail.","vault.onboarding.startIgnoreAll":"Start with everything hidden (recommended for large projects)","vault.onboarding.startShowAll":"Start with everything visible (fine for small projects)","vault.onboarding.saving":"Saving…","files.editor.dirty":"Modified","files.editor.draftRestored":"Recovered unsaved edits","find.openFind":"Find","find.placeholder":"Find","find.replacePlaceholder":"Replace","find.case":"Match case","find.word":"Match whole word","find.regex":"Use regular expression","find.next":"Next match (Enter)","find.prev":"Previous match (Shift+Enter)","find.replace":"Replace","find.replaceAll":"Replace all","find.close":"Close (Esc)","find.toggleReplace":"Toggle replace","find.noMatches":"No results","annotate.start":"Start drawing","annotate.stop":"Stop drawing","annotate.select":"Select","annotate.pen":"Pen","annotate.highlighter":"Highlighter","annotate.eraser":"Eraser","annotate.color":"Color","annotate.undo":"Undo","annotate.redo":"Redo","annotate.clear":"Clear all","wiki.title":"Wiki","wiki.add":"New Entry","wiki.edit":"Edit","wiki.delete":"Delete","wiki.save":"Save","wiki.saving":"Saving…","wiki.cancel":"Cancel","wiki.empty":"No wiki entries yet","wiki.emptyHint":"Add notes, conventions, and lessons that the LLM should reference when running tasks.","wiki.viewList":"List","wiki.viewGraph":"Graph","wiki.viewHierarchical":"Hierarchy","wiki.viewNetwork":"Network","wiki.searchPlaceholder":"Search wiki…","wiki.backlinks":"Backlinks","wiki.addLink":"Add link to another entry","wiki.addLinkPlaceholder":"Search an entry to link…","wiki.connect.title":"How should these entries be connected?","wiki.connect.wikilink":"Reference (wikilink)","wiki.connect.wikilinkHint":"Inserts [[target title]] into the source body. Free-form mention, no semantic relation.","wiki.connect.edge":"Relation (typed edge)","wiki.connect.edgeHint":"Adds a typed relation (related/precedes/refines/...) you can label.","wiki.allTags":"All tags","wiki.countLabel":"{count} item(s)","wiki.deleteConfirm":"Delete this entry and all its connections?","wiki.noResults":"No results","wiki.noBody":"No content","wiki.connections":"Connections","wiki.outgoing":"Outgoing","wiki.incoming":"Incoming","wiki.autoLayout":"Auto Layout","wiki.form.newTitle":"New entry","wiki.form.editTitle":"Edit entry","wiki.form.title":"Title","wiki.form.titlePlaceholder":"Short, descriptive title","wiki.form.body":"Body (Markdown supported)","wiki.form.bodyPlaceholder":"Write the knowledge or convention you want the LLM to reference…","wiki.form.linkHint":"Type [[ or @ to link another wiki entry.","wiki.form.tags":"Tags","wiki.form.tagsPlaceholder":"Type tag and press Enter","wiki.form.pinned":"Pin to highlight","wiki.edge.editTitle":"Edit Connection","wiki.edge.relationType":"Relation","wiki.edge.label":"Label","wiki.edge.labelPlaceholder":'Optional note (e.g. "see section 3.2")',"wiki.edge.deleteConfirm":"Delete this connection?","wiki.edge.relations.related":"Related","wiki.edge.relations.precedes":"Precedes","wiki.edge.relations.example_of":"Example of","wiki.edge.relations.counter_example":"Counter-example","wiki.edge.relations.refines":"Refines","vault.title":"Documents","vault.empty":"No markdown files found","vault.noResults":"No matching files","vault.searchPlaceholder":"Search files…","vault.graph.addLink":"Add link from here","vault.graph.linkHint":"Click a target node to link · Esc to cancel","vault.graph.showLabels":"Show names","vault.graph.rightClickHint":"Right-click → add link","vault.newFile":"New File","vault.create":"Create","vault.save":"Save","vault.delete":"Delete","vault.unsaved":"unsaved","vault.confirmDelete":"Delete {path}?","vault.backlinks":"Backlinks","vault.filesCount":"files","vault.panel.fileExplorer":"Files","vault.panel.search":"Search","vault.panel.tags":"Tags","vault.panel.graph":"Graph","vault.panel.outline":"Outline","vault.panel.backlinks":"Backlinks","vault.panel.outgoing":"Outgoing Links","vault.panel.preview":"Preview","vault.outline.empty":"No headings in this note","vault.outgoing.empty":"No outgoing wikilinks","vault.backlinks.empty":"No backlinks","vault.tags.empty":"No tags in documents","vault.search.empty":"No matches","vault.search.prompt":"Search across .md notes","vault.activeFile.empty":"Select a file to preview or edit","vault.sidebar.collapse":"Collapse sidebar","vault.sidebar.expand":"Expand sidebar","vault.loadError":"Failed to load documents","vault.retry":"Retry","vault.allHidden":"All documents are hidden by .vaultignore. Right-click a file in the explorer to show it.","vault.ignoreHelp":".vaultignore guide","vaultInject.title":"Document Injection","vaultInject.modeNone":"Off","vaultInject.modeAuto":"Auto","vaultInject.modeAll":"Inject all","vaultInject.modeSelected":"Inject selected","vaultInject.autoHint":"Before each run, the LLM picks up to 10 relevant files from {count} file(s) using the task description as the query.","vaultInject.previewToggle":"Preview","vaultInject.previewChars":"{n} chars","vaultInject.previewTokens":"~{n} tokens","vaultInject.empty":"No .md or .html files in the project root.","vaultInject.injectedCount":"Will inject {count} file(s)","vaultInject.allCount":"Will inject all {count} file(s)","vaultInject.searchPlaceholder":"Filter by name…","vaultInject.loading":"Loading…","vaultInject.includeLinked":"Also pull in 1-hop linked files when I check one","vaultInject.linkedAdded":"+{n} linked","vaultInject.noResults":"No files match.","wiki.ingest":"Ingest","wiki.ingest.title":"Ingest Source Material","wiki.ingest.tabTask":"From Task","wiki.ingest.tabDiscussion":"From Discussion","wiki.ingest.tabText":"Paste Text","wiki.ingest.selectTask":"Select a completed task","wiki.ingest.selectDiscussion":"Select a completed discussion","wiki.ingest.noTasks":"No completed tasks found","wiki.ingest.noDiscussions":"No completed discussions found","wiki.ingest.textPlaceholder":"Paste any text (article, notes, chat transcript) to extract knowledge…","wiki.ingest.run":"Ingest","wiki.ingest.running":"Ingesting…","wiki.ingest.success":"Created {created}, updated {updated}, {edges} edge(s) added","wiki.ingest.parseFailed":"Could not parse the LLM response. Nothing was changed.","wiki.ingest.modelEmpty":"The LLM returned no proposals. It judged the source had nothing new worth adding.","wiki.ingest.allSkipped":"All proposals were skipped. See the breakdown below.","wiki.ingest.proposed":"Proposed: {c} create, {u} update, {e} edges","wiki.ingest.skipNote":"Skipped","wiki.ingest.skip.duplicate":"duplicate title (already exists)","wiki.ingest.skip.unique":"DB UNIQUE conflict on title","wiki.ingest.skip.empty":"empty title","wiki.ingest.skip.badId":"invalid update id","wiki.ingest.skip.badEdge":"edge endpoint not found","wiki.ingest.skip.selfEdge":"self-edge","wiki.ingest.skip.edgeUnique":"edge UNIQUE conflict","wiki.ingest.rawSnippet":"Show raw response snippet","wiki.ingest.toast.success":"Wiki updated from {source}: {created} created, {updated} updated, {edges} edges","wiki.ingest.toast.empty":"Wiki ingest from {source}: nothing new to add","wiki.ingest.toast.parseFailed":"Wiki ingest from {source}: could not parse LLM response","wiki.ingest.toast.failed":"Wiki auto-ingest failed","wiki.schemaSection":"Schema","wiki.schemaSectionHint":"Defines entry types and conventions used by Ingest. Edit to customize for this project.","wiki.schemaBannerTitle":"Wiki Schema","wiki.schemaBannerHint":"Edits here change how the LLM categorizes new entries on Ingest. Delete this entry to reset to defaults.","wiki.systemSection":"System","wiki.systemSectionHint":"Auto-maintained entries that drive Ingest behavior and quick navigation.","wiki.indexBannerTitle":"Wiki Index","wiki.indexBannerHint":"Auto-regenerated on every wiki change. Manual edits are overwritten; deleting it only lasts until the next change.","wiki.asset.uploading":"Uploading image…","wiki.asset.tooLarge":"Image too large (max 10MB)","wiki.diskDiff.button":"Disk diff","wiki.diskDiff.tooltip":"Compare exported wiki files against the database","wiki.diskDiff.title":"Wiki vs. .clitrigger/wiki/","wiki.diskDiff.intro":"Read-only view of disk files that differ from what the database would export. Files edited outside (e.g. Obsidian) surface here; Rebuild overwrites disk with the current DB state.","wiki.diskDiff.running":"Comparing…","wiki.diskDiff.empty":"Disk and database are in sync.","wiki.diskDiff.refresh":"Re-check","wiki.diskDiff.close":"Close","wiki.diskDiff.section.modified":"Modified on disk ({n})","wiki.diskDiff.section.missing":"Missing on disk ({n})","wiki.diskDiff.section.untracked":"Untracked file on disk ({n})","wiki.diskDiff.rebuild":"Rebuild from DB","wiki.diskDiff.rebuildTooltip":"Overwrites all wiki/ files with the current database state. Disk-only edits will be lost.","wiki.diskDiff.rebuildConfirm":"Overwrite the wiki/ folder with the current database state? Any disk-only edits will be lost.","wiki.diskDiff.rebuildResult":"Rebuilt: {written} written, {removed} removed","wiki.lint":"Lint","wiki.lint.title":"Wiki Health Check","wiki.lint.running":"Checking…","wiki.lint.empty":"No issues found.","wiki.lint.close":"Close","wiki.lint.rerun":"Re-run","wiki.lint.mergeConfirm":'Merge "{absorb}" into "{keep}"? This combines bodies, unions tags, redirects edges and wikilinks, and deletes "{absorb}".',"wiki.lint.action.mergeKeep":'Keep "{keep}", merge "{absorb}"',"wiki.lint.action.delete":"Delete","wiki.lint.action.deleteTitle":'Delete "{title}"',"wiki.lint.action.link":"Link","wiki.lint.action.linkTo":"Link to…","wiki.sourceAutoLabel":"Auto","wiki.viewRaw":"View Raw Source","wiki.loading":"Loading…","wiki.close":"Close","wiki.subTab.wiki":"Wiki","wiki.subTab.sources":"Sources","wiki.subTab.activity":"Activity","wiki.activity.empty":"No activity yet","wiki.activity.emptyHint":"Ingest, lint, retrieve, and merge events show up here.","wiki.activity.refresh":"Refresh","wiki.activity.filter.all":"All","wiki.activity.filter.ingest":"Ingest","wiki.activity.filter.lint":"Lint","wiki.activity.filter.retrieve":"Retrieve","wiki.activity.filter.merge":"Merge","wiki.sources.empty":"Select a raw file from the sidebar to view its content.","wiki.sources.noFiles":"No raw files yet. Run Ingest to create some.","wiki.rawFile.derivedTitle":"Derived Wiki Entries","wiki.rawFile.noDerived":"No wiki entries derived from this source","wiki.rawFile.openSiblings":"Show {n} entries from this source","wiki.rawFile.openExternal":"Open in default app","wiki.rawFile.revealInFolder":"Reveal in folder","wiki.rawFile.delete":"Delete raw file","wiki.rawFile.deleteConfirm":"Delete this raw source file? Wiki entries are kept.","wiki.rawFile.deleteConfirmDerived":"Delete this raw source file and unlink {n} derived wiki entr(y/ies)? The entries themselves are kept; only the source link is removed.","planner.title":"Planner","planner.add":"New Item","planner.empty":"No planner items yet","planner.emptyHint":"Add ideas, tasks, and plans to your planner.","planner.view.pages":"Pages","planner.view.all":"All items","planner.nav.calendar":"Calendar","planner.nav.list":"List","web.urlPlaceholder":"https://…","web.go":"Go","web.desktopOnly":"Embedded web pages are available in the desktop app.","web.openExternal":"Open in browser","web.fullscreen":"Fullscreen","web.exitFullscreen":"Exit fullscreen","web.newTab":"New tab","web.closeTab":"Close tab","web.emptyTab":"Enter a URL above to start","web.hideBar":"Hide address bar","web.showBar":"Show address bar","web.back":"Back","web.addFavorite":"Add to favorites","web.removeFavorite":"Remove from favorites","planner.block.tasklist":"Task list","planner.block.calendar":"Calendar","planner.block.addTask":"Add a task…","planner.pages.newTemplate":"New page: choose a template","planner.tpl.blank":"Blank","planner.tpl.blank.desc":"Start from an empty page","planner.tpl.meeting":"Meeting notes","planner.tpl.meeting.desc":"Date, attendees, agenda, action items","planner.tpl.project":"Project plan","planner.tpl.project.desc":"Overview, milestones, schedule","planner.tpl.weekly":"Weekly planner","planner.tpl.weekly.desc":"Weekly goals, tasks, calendar","planner.pages.new":"New Page","planner.pages.untitled":"Untitled","planner.pages.empty":"No pages yet","planner.pages.emptyHint":"Create a free-form page to write notes, docs, and checklists.","planner.pages.deleteConfirm":"Delete this page? This cannot be undone.","planner.pages.saving":"Saving…","planner.pages.saved":"Saved","planner.filterTag":"All Tags","planner.filterStatus":"All Statuses","planner.col.title":"Title","planner.col.tags":"Tags","planner.col.dueDate":"Due Date","planner.col.status":"Status","planner.col.actions":"","planner.edit":"Edit","planner.delete":"Delete","planner.deleteConfirm":"Delete this planner item?","planner.convertToTask":"Convert to Task","planner.convertToSchedule":"Convert to Routine","planner.convertToTerminal":"Send to Terminal","planner.movedToTodo":"Moved to Tasks","planner.movedToSchedule":"Moved to Routines","planner.movedToSession":"Moved to Terminal","planner.fromDiscussion":"From Discussion","planner.noDueDate":"—","planner.export":"Export","planner.exportTooltip":"Export planner items to a Markdown file","planner.exportError":"Export failed","planner.import":"Import","planner.importTooltip":"Import planner items from a Markdown file","planner.importSuccess":"Imported {items} item(s) and {tags} tag(s).","planner.importError":"Import failed","planner.importInvalidMarkdown":"File is empty or not valid Markdown","planner.importNoImages":"Note: images are not included in exported files.","planner.dropHint":"Drop a Markdown file to import","planner.dropHintSub":".md or .markdown","planner.dropInvalidFile":"Only Markdown files (.md / .markdown) can be imported","plannerForm.titlePlaceholder":"e.g. Draft release notes","plannerForm.descPlaceholder":"Details, links, acceptance criteria…","plannerForm.tags":"Tags","plannerForm.tagsPlaceholder":"Type and press Enter","plannerForm.dueDate":"Due Date","plannerForm.priority":"Priority","plannerForm.priorityLow":"Low","plannerForm.priorityNormal":"Normal","plannerForm.priorityHigh":"High","plannerForm.priorityCritical":"Critical","plannerForm.status":"Status","plannerForm.addImage":"Add Image","plannerForm.pasteHint":"Ctrl+V to paste image","plannerForm.images":"Images","plannerForm.cancel":"Cancel","plannerForm.save":"Save","plannerStatus.pending":"Pending","plannerStatus.in_progress":"In Progress","plannerStatus.done":"Done","plannerStatus.moved":"Moved","plannerConvert.toTask":"Convert to Task","plannerConvert.toSchedule":"Convert to Routine","plannerConvert.toTerminal":"Send to Terminal","plannerConvert.useWorktree":"Use git worktree","plannerConvert.cliTool":"CLI Tool","plannerConvert.maxTurns":"Max Turns","plannerConvert.scheduleType":"Routine Type","plannerConvert.recurring":"Recurring","plannerConvert.once":"One-time","plannerConvert.cronExpression":"Cron Expression","plannerConvert.runAt":"Run At","plannerConvert.cancel":"Cancel","plannerConvert.convert":"Convert","plannerTag.selectOrCreate":"Select or create","plannerTag.delete":"Delete","plannerTag.deleteConfirm":"Remove this tag from all items?","plannerTag.color":"Color","plannerTag.rename":"Rename","plannerTag.color.default":"Default","plannerTag.color.gray":"Gray","plannerTag.color.brown":"Brown","plannerTag.color.orange":"Orange","plannerTag.color.yellow":"Yellow","plannerTag.color.green":"Green","plannerTag.color.blue":"Blue","plannerTag.color.purple":"Purple","plannerTag.color.pink":"Pink","plannerTag.color.red":"Red","session.new":"New Terminal","session.windowState.floating":"Open","session.windowState.minimized":"Minimized","session.windowState.popped":"Separate window","session.recallToMain":"Bring to main window","session.popout.minimize":"Minimize","session.restoreWindow":"Restore window","session.focusWindow":"Go to window","session.maximize":"Maximize terminal","session.restoreSize":"Restore terminal size","session.maximizeHint":"Double-click the title bar to toggle","session.layout.single":"Single pane","session.layout.columns":"Two columns","session.layout.grid":"2 × 2 grid","session.openWindow":"Open terminal","session.dock.poppedHint":"Separate window. Click to bring it to front.","session.title":"Terminal Title","session.description":"Initial Prompt (Optional)","session.start":"Start","session.stop":"Stop","session.resume":"Resume","session.resumeHint":"Continue the last Claude conversation of this session","session.delete":"Delete","session.edit":"Edit","session.editDisabledRunning":"Cannot edit while running","session.save":"Save","session.saving":"saving…","session.empty":"No terminals yet","session.emptyHint":"Start an interactive AI conversation.","session.create":"Create Terminal","session.cliTool":"CLI Tool","session.cliNotInstalled":" (not installed)","session.worktree":"Use worktree (isolated branch)","session.cleanup":"Clean up worktree","session.startInWindow":"Start","session.starting":"starting…","session.starting.typeAhead":"type-ahead is captured and replayed once ready","session.stopping":"stopping…","session.startFailed":"Failed to start","session.confirmStop":"End this terminal? The running task will be terminated.","session.popout.blocked":"Popup blocked. Allow popups for this site to use Pop Out.","session.diff.capture":"Capture snapshot","session.diff.pageStart":"From start","session.minimize":"Minimize","session.fontDecrease":"Decrease font size","session.fontIncrease":"Increase font size","session.refresh":"Refresh rendering","session.refresh.hint":"Rebuild the terminal view (PTY stays running)","session.initialPrompt.ready":"Initial prompt ready to send","session.initialPrompt.preview":"Preview","session.initialPrompt.hidePreview":"Hide","session.initialPrompt.send":"Send","session.initialPrompt.skip":"Skip","session.initialPrompt.loading":"loading…","session.initialPrompt.blocked":"Press Send or Skip before typing. Keystrokes are ignored until then.","group.closeTab":"Close tab","group.newTab":"New shell tab","analytics.title":"Execution Analytics","analytics.loading":"Loading analytics…","analytics.noData":"No data available","analytics.totalTasks":"Total Tasks","analytics.successRate":"Success Rate","analytics.totalCost":"Total Cost","analytics.totalTokens":"Total Tokens","analytics.avgPerTask":"Avg / Task","analytics.byStatus":"By Status","analytics.byCliTool":"By CLI Tool","analytics.dailyActivity":"Daily Activity","analytics.dailyCost":"Daily Cost","analytics.costBreakdown":"Cost Summary","analytics.tasks":"tasks","analytics.period.7d":"7D","analytics.period.30d":"30D","analytics.period.90d":"90D","analytics.period.all":"All","analytics.clear":"Clear","analytics.clearConfirm":"Reset analytics? Tasks are kept, but only tasks created from now on will be counted.","discussions.title":"Discussions","discussions.add":"New Discussion","discussions.empty":"No discussions yet","discussions.emptyHint":"Create a discussion to have agents collaborate on a feature.","discussions.round":"Round","discussions.maxRounds":"Max Rounds","discussions.agents":"Agents","discussions.speaking":"Speaking…","discussions.inject":"Send Message","discussions.skipTurn":"Skip Turn","discussions.implement":"Start Implementation","discussions.implementHint":"Select an agent to implement the discussed feature.","discussions.selectAgent":"Select Implementer","discussions.toPlanner":"Send to Planner","discussions.extractTitle":"Extract Action Items","discussions.extractHint":"AI proposed these planner items from the discussion. Edit, deselect, or adjust priority before saving.","discussions.extractLoading":"Extracting action items from the discussion…","discussions.extractLoadingHint":"This may take up to two minutes. The dialog will stay open until extraction finishes.","discussions.extractEmpty":"No actionable items found. Try a different discussion or add more agreement.","discussions.extractConfirm":"Save to Planner","discussions.extractSaving":"Saving…","discussions.priorityLow":"Low","discussions.priorityMedium":"Medium","discussions.priorityHigh":"High","discussions.priorityUrgent":"Urgent","discussions.notFound":"Discussion not found","discussions.back":"Back to Discussions","discussions.userMessage":"Your message…","discussions.implementation":"Implementation","discussions.resume":"Resume","discussions.retry":"Retry","discussions.failureTitle":"Discussion Failed","discussions.noErrorLogs":"No error details available","discussions.pause":"Pause","discussions.waiting":"Waiting…","discussions.roundExplain":"One round = each agent speaks once.","discussions.autoImplement":"Auto-implement after discussion","discussions.autoImplementHint":"Automatically start implementation when all rounds complete.","discussions.collapse":"Collapse","discussions.expand":"Expand","discussions.collapseAll":"Collapse All","discussions.expandAll":"Expand All","status.skipped":"Skipped","status.paused":"Paused","agents.title":"Agent Personas","agents.add":"Add Agent","agents.name":"Name","agents.role":"Role","agents.systemPrompt":"System Prompt","agents.cliTool":"CLI Tool","agents.color":"Color","agents.empty":"No agents yet. Create agent personas to start a discussion.","agents.manage":"Manage Agents","agents.presets":"Preset Templates","agents.roles.architect":"Architect","agents.roles.developer":"Developer","agents.roles.reviewer":"Reviewer","agents.roles.pm":"Product Manager","agents.roles.tester":"Tester","agents.roles.custom":"Custom","agents.canImplement":"Implement during discussion","agents.canImplementHelp":"When it is this agent's turn, they can write code and commit to the discussion branch, not just talk. Useful for developer-style agents that should demonstrate ideas mid-discussion.","agents.canImplementBadge":"Implementer","git.ahead":"ahead","git.behind":"behind","git.staged":"Staged","git.unstaged":"Unstaged","git.noChanges":"Working tree clean","git.refresh":"Refresh","git.files":"files","git.commitHistory":"Commit History","git.branches":"Branches","git.remotes":"Remotes","git.tags":"Tags","git.stashes":"Stashes","git.noCommits":"No commits yet","git.loadMore":"Loading more…","git.author":"Author","git.hash":"Hash","git.graph":"Graph","git.description":"Description","git.date":"Date","git.commit":"Commit","git.pull":"Pull","git.push":"Push","git.pushDialog.targetRemote":"Push to","git.pushDialog.branchesHeader":"Branches to push","git.pushDialog.colPush":"Push?","git.pushDialog.colLocal":"Local branch","git.pushDialog.colRemote":"Remote branch","git.pushDialog.colTracking":"Track?","git.pushDialog.selectAll":"Select all","git.pushDialog.allTags":"Push all tags","git.pushDialog.force":"Force push","git.pushDialog.forceHint":"Uses --force-with-lease (rejects if remote moved since your last fetch).","git.pushDialog.submit":"Push","git.pushDialog.cancel":"Cancel","git.pushDialog.pushing":"Pushing…","git.pushDialog.loading":"Loading…","git.pushDialog.errorRequireBranch":"Select at least one branch to push.","git.pushDialog.noLocalBranches":"No local branches.","git.pushDialog.newBranch":"new","git.pushDialog.customRemote":"Enter name…","git.fetch":"Fetch","git.branch":"Branch","git.merge":"Merge","git.conflicts":"Conflicts","git.conflictMergeInProgress":"Merge in progress","git.conflictRebaseInProgress":"Rebase in progress","git.conflictBanner":"{n} conflicted file(s). Resolve each, then press Continue.","git.conflictAllResolved":"All conflicts resolved. Press Continue.","git.acceptOurs":"Use ours","git.acceptTheirs":"Use theirs","git.cr.ours":"Ours (HEAD)","git.cr.theirs":"Theirs (incoming)","git.cr.both":"Use both","git.cr.manual":"Edit manually","git.cr.guided":"Guided","git.cr.save":"Save resolution","git.cr.unresolved":"{n} unresolved","git.cr.allResolved":"All resolved","git.cr.markersRemain":"Conflict markers still remain","git.cr.loadFailed":"Failed to load conflicted file","git.cr.noConflicts":"No conflict regions in this file","git.conflictContinue":"Continue","git.conflictAbort":"Abort","git.confirmConflictAbort":"Abort and restore the previous state?","git.viewConflicts":"View conflicts","git.stash":"Stash","git.discard":"Discard","git.tag":"Tag","git.untracked":"Untracked","git.fileStatus":"File Status","git.stageAll":"Stage All","git.unstageAll":"Unstage All","git.stage":"Stage","git.unstage":"Unstage","git.commitMessage":"Commit message…","git.branchName":"Branch name…","git.tagName":"Tag name…","git.tagMessage":"Tag message (optional)…","git.stashMessage":"Stash message (optional)…","git.selectBranch":"Select branch…","git.discardAll":"Discard All","git.confirmDiscard":"Discard all changes? This cannot be undone.","git.confirmDiscardFile":"Discard changes to this file?","git.newBranch":"New Branch","git.deleteBranch":"Delete Branch","git.stashPop":"Pop","git.noStashes":"No stashes","git.actions":"Actions","git.close":"Close","git.create":"Create","git.delete":"Delete","git.modified":"Modified","git.added":"Added","git.deleted":"Deleted","git.renamed":"Renamed","git.copied":"Copied","git.checkout":"Checkout","git.mergeInto":"Merge into current branch","git.rebaseOnto":"Rebase current onto","git.copySha":"Copy SHA","git.createBranchHere":"Create branch here…","git.createTagHere":"Create tag here…","git.cherryPick":"Cherry-pick to current branch","git.revertCommit":"Revert commit","git.resetHere":"Reset current branch to here","git.confirmRevert":"Revert commit {hash}? This creates a new commit that undoes its changes.","git.confirmCherryPick":"Cherry-pick {hash} onto the current branch?","git.confirmReset":"Reset current branch to {hash} ({mode})?","git.confirmResetHard":"Hard reset to {hash}? Commits after this point and any uncommitted changes will be permanently lost.","git.promptBranchName":"New branch name (from {hash}):","git.promptTagName":"New tag name (at {hash}):","git.renameBranch":"Rename branch","git.confirmDelete":"Delete branch {name}?","git.newBranchName":"New branch name…","git.rename":"Rename","git.checkoutRemote":"Checkout as local branch","git.commitDetail":"Commit Detail","git.changedFiles":"Changed Files","git.selectFileToViewDiff":"Select a file to view diff","git.noFilesChanged":"No files changed","git.loadingFiles":"Loading files…","git.loadingDiff":"Loading diff…","git.worktrees":"Worktrees","git.cleanupWorktree":"Cleanup","git.confirmCleanupWorktree":"Remove worktree and branch {name}?","git.deleteWorktreeAndBranch":"Delete branch + worktree","git.confirmDeleteWorktreeAndBranch":"Delete branch {name} and its worktree?","git.confirmForceDelete":"Branch {name} is not fully merged. Force delete anyway? Unmerged commits will be lost.","git.workspace":"WORKSPACE","git.viewFileStatus":"File Status","git.viewHistory":"History","git.search":"Search","git.searchPlaceholder":"Search","git.stagedFiles":"Staged files","git.unstagedFiles":"Unstaged files","git.untrackedFiles":"Untracked files","git.unstageAllShort":"Unstage all","git.unstageSelectedShort":"Unstage selected","git.stageAllShort":"Stage all","git.stageSelectedShort":"Stage selected","git.addToGitignore":"Add to .gitignore","git.commitOptions":"Commit options","git.pushImmediately":"Push to {remote} after commit","git.amendLastCommit":"Amend last commit","git.commitButton":"Commit","git.selectFileForDiff":"Select a file to view the diff","git.binaryFile":"Binary file (no diff preview)","git.untrackedNewFile":"(new file)","git.workingTreeClean":"Working tree is clean. Nothing to commit.","git.statusTarget":"Checkout","git.mainCheckout":"Main checkout","lang.toggle":"KO","theme.light":"Light","theme.dark":"Dark","notification.taskCompleted":"Task Completed","notification.taskFailed":"Task Failed","notification.discussionCompleted":"Discussion Completed","notification.discussionFailed":"Discussion Failed","notification.toggle":"Toggle notifications","notification.blocked":"Notifications blocked by browser","notification.sessionBlocked":"Session is waiting for input","notification.sessionDone":"Session finished"},ko:{"login.title":"CLITrigger","login.subtitle":"인증이 필요합니다","login.password":"비밀번호 입력","login.rememberMe":"로그인 상태 유지","login.submit":"로그인","login.loading":"인증 중…","login.error":"접근이 거부되었습니다. 다시 시도해주세요.","login.footer":"보안 접속","login.changePassword":"비밀번호 변경","login.backToLogin":"로그인으로 돌아가기","login.changeSubmit":"변경 후 로그인","login.forgot":"비밀번호를 잊으셨나요?","login.forgotHint":'초기화는 서버가 실행 중인 머신에서만 가능합니다. 터미널에서 "clitrigger reset-password"를 실행하거나 데스크톱 앱의 도움말 → 비밀번호 초기화 메뉴를 사용한 뒤, 이 화면에서 새 비밀번호를 설정하세요.',"login.disclaimer":'This software is provided "as is" without any warranties. Users are solely responsible for all actions taken using this tool, including any costs incurred from AI CLI usage, data loss, or unintended code changes. The developers assume no liability for any direct, indirect, or consequential damages arising from use.',"setup.title":"CLITrigger에 오신 것을 환영합니다","setup.subtitle":"이 인스턴스를 보호할 비밀번호를 설정하세요","setup.password":"새 비밀번호","setup.confirm":"비밀번호 확인","setup.submit":"비밀번호 만들기","setup.loading":"저장 중…","setup.tooShort":"비밀번호는 8자 이상이어야 합니다.","setup.mismatch":"비밀번호가 일치하지 않습니다.","setup.tunnelPaused":"셋업이 끝날 때까지 외부 공유(Cloudflare 터널)는 자동 시작되지 않습니다.","setup.error":"비밀번호 저장에 실패했습니다.","errors.unexpected":"예상하지 못한 오류가 발생했습니다. 다시 시도해 주세요.","errors.renderTitle":"화면을 표시할 수 없습니다","errors.renderDescription":"데이터는 안전합니다. 앱을 다시 불러와 화면을 복구하세요.","errors.reload":"앱 다시 불러오기","errors.projectsLoad":"프로젝트를 불러오지 못했습니다.","errors.projectCreate":"프로젝트를 생성하지 못했습니다.","errors.projectDelete":"프로젝트를 삭제하지 못했습니다.","projects.cleanupPartialFailed":"정리가 일부 실패했습니다: {details}","common.ok":"확인","common.cancel":"취소","sidebar.home":"홈","sidebar.review":"리뷰 큐","sidebar.agenda":"내 일정","agenda.title":"내 일정","agenda.subtitle":"개인 메모·일정과 전 프로젝트 루틴을 한곳에서","agenda.today":"오늘","agenda.refresh":"새로고침","agenda.refreshHelp":"현재 기간의 내 메모, 프로젝트 루틴/플래너, 할당된 Jira 이슈를 다시 불러옵니다. 달/주/일 이동이나 뷰 전환 시에도 자동 갱신되며, 가만히 있을 때는 폴링하지 않습니다.","agenda.view.month":"월","agenda.view.week":"주","agenda.view.day":"일","agenda.view.table":"표","agenda.addItem":"항목 추가","agenda.expand":"크게 보기","agenda.collapse":"작게 보기","agenda.tags.all":"전체","agenda.tags.placeholder":"태그 추가…","agenda.resizePanel":"드래그하여 크기 조절","agenda.resizeCalendar":"드래그하여 달력 크기 조절","agenda.untitled":"(제목 없음)","agenda.source.personal":"메모","agenda.source.schedule":"루틴","agenda.source.planner":"플래너","agenda.source.jira":"Jira","agenda.jira.settings":"Jira 연결","agenda.jira.subtitle":"내게 할당된 Jira 작업을 이 캘린더에서 함께 봅니다.","agenda.jira.enable":"내게 할당된 Jira 이슈 표시","agenda.jira.baseUrlLabel":"Jira 사이트 주소","agenda.jira.baseUrlHint":"Jira를 열 때 쓰는 주소예요. 브라우저 주소창 맨 앞부분. 예: https://회사이름.atlassian.net","agenda.jira.emailLabel":"로그인 이메일","agenda.jira.emailHint":"Jira(Atlassian)에 로그인할 때 쓰는 이메일이에요.","agenda.jira.tokenLabel":"API 토큰","agenda.jira.tokenPlaceholder":"발급받은 API 토큰을 붙여넣으세요","agenda.jira.tokenLink":"API 토큰 발급받기","agenda.jira.tokenStep1":"1. 위 링크를 열고 로그인하세요.","agenda.jira.tokenStep2":'2. "API 토큰 만들기"를 누르고 아무 이름이나 지어주세요.',"agenda.jira.tokenStep3":"3. 만들어진 토큰을 복사해 위 칸에 붙여넣으세요. (비밀번호가 아니라 별도 토큰이에요.)","agenda.jira.criteria":"가져오기 기준","agenda.jira.criteriaHint":"캘린더에 표시하고 가져올 수 있는 이슈의 조건을 정합니다.","agenda.jira.assigneeMe":"나에게 할당된 이슈만","agenda.jira.includeDone":"완료된 이슈도 포함","agenda.jira.projects":"프로젝트","agenda.jira.projectsHint":"이 프로젝트 키만 가져옵니다(쉼표 또는 공백으로 구분). 비우면 전체.","agenda.jira.statuses":"가져올 상태","agenda.jira.statusesHint":'체크한 상태의 이슈만 가져옵니다. 모두 체크 해제하면 위 "완료된 이슈도 포함" 설정을 따릅니다.',"agenda.jira.statusesLoad":"상태 불러오기","agenda.jira.statusesLoading":"불러오는 중…","agenda.jira.statusesNeedConn":"상태를 불러오려면 먼저 연결을 저장하고 테스트하세요.","agenda.jira.statusesSearch":"상태 검색…","agenda.jira.statusesEmpty":'불러온 상태가 없습니다. "상태 불러오기"를 누르세요.',"agenda.jira.dismiss":"내 일정에서 숨기기","agenda.jira.dismissedTitle":"숨긴 JIRA 이슈","agenda.jira.restore":"복원","agenda.jira.extraJql":"고급 (JQL)","agenda.jira.extraJqlHint":"위 조건에 AND로 합쳐지는 추가 JQL. 예: labels = urgent AND priority >= High","agenda.jira.test":"연결 테스트","agenda.jira.tokenSaved":"토큰 저장됨 (비우면 유지)","agenda.jira.hint":'내게 할당된 열린 이슈를 가져옵니다. 기한 있는 것은 캘린더에, 나머지는 "Jira (마감일 없음)" 목록에 표시됩니다. 인증은 이메일 + API 토큰.',"agenda.jira.import":"내 일정에 추가","agenda.jira.noDue":"Jira (마감일 없음)","agenda.jira.error":"Jira 오류","agenda.moveToPlanner":"플래너로 이동","agenda.importToPlanner":"플래너에 추가","agenda.pickProject":"프로젝트 선택","agenda.noProjects":"프로젝트 없음","agenda.table.name":"제목","agenda.table.date":"날짜","agenda.table.kind":"종류","agenda.table.status":"상태","agenda.kind.personal":"메모","agenda.kind.schedule":"루틴","agenda.kind.planner":"플래너","agenda.kind.jira":"Jira","agenda.status.done":"완료","agenda.status.pending":"대기","agenda.add":"추가","agenda.memo":"메모","agenda.backlog":"날짜 없음","agenda.backlogEmpty":"날짜 없는 메모가 없습니다","agenda.dayEmpty":"이 날짜에 일정이 없습니다","agenda.fromSchedule":"프로젝트 루틴","agenda.fromPlanner":"프로젝트 플래너","agenda.toggleDone":"완료 토글","agenda.delete":"삭제","agenda.confirmDelete":"이 항목을 삭제할까요?","agenda.addTitle":"새 항목","agenda.editTitle":"항목 편집","agenda.titlePlaceholder":"제목","agenda.descPlaceholder":"메모 (선택)","agenda.dateHint":"날짜를 비우면 날짜 없는 메모로 저장됩니다. 시간을 지정하면 시간 일정이 됩니다.","agenda.cancel":"취소","agenda.save":"저장","agenda.cleanup":"메모 정리","agenda.cleanup.title":"기간으로 메모 삭제","agenda.cleanup.subtitle":"선택한 기간의 개인 메모를 한 번에 삭제합니다. 되돌릴 수 없습니다.","agenda.cleanup.from":"시작","agenda.cleanup.to":"종료","agenda.cleanup.doneOnly":"완료된 메모만","agenda.cleanup.includeBacklog":"날짜 없는 백로그 메모도 삭제","agenda.cleanup.previewLabel":"삭제 대상","agenda.cleanup.unit":"개","agenda.cleanup.none":"조건에 해당하는 메모가 없습니다","agenda.cleanup.confirm":"삭제","sidebar.workspaces":"워크스페이스","sidebar.favorites":"즐겨찾기","sidebar.collapse":"사이드바 접기","sidebar.expand":"사이드바 펼치기","favorites.add":"즐겨찾기 추가","favorites.edit":"즐겨찾기 편집","favorites.delete":"삭제","favorites.deleteConfirm":"이 즐겨찾기를 삭제할까요?","favorites.launchFailed":"실행 실패","favorites.empty":"등록된 즐겨찾기가 없습니다.","favorites.form.title.create":"새 즐겨찾기","favorites.form.title.edit":"즐겨찾기 편집","favorites.form.name":"이름","favorites.form.type":"종류","favorites.form.target":"대상","favorites.form.browse":"찾아보기…","favorites.form.targetHint.executable":".exe / .bat / .sh 절대 경로","favorites.form.targetHint.command":"셸 명령어 (그대로 실행됨)","favorites.form.targetHint.url":"http:// 또는 https:// URL","favorites.form.args":"인자 (공백으로 구분)","favorites.form.cwd":"작업 디렉토리 (선택)","favorites.form.create":"생성","favorites.form.save":"저장","favorites.form.cancel":"취소","favorites.types.executable":"실행 파일","favorites.types.command":"명령어","favorites.types.url":"URL","favorites.security.notice":"즐겨찾기는 서버 계정으로 실행됩니다. 터널 공유가 켜져 있다면 비밀번호를 아는 사람이 누구나 실행할 수 있습니다.","tunnel.title":"터널 설정","tunnel.description":"Cloudflare 터널 설정. 공유 도메인(*.trycloudflare.com / *.cfargotunnel.com)에서 뜨는 브라우저 위험 경고를 피하려면 본인 도메인을 지정하세요.","tunnel.name.label":"Named tunnel 이름","tunnel.name.placeholder":"my-app","tunnel.name.hint":"비워두면 무작위 Quick Tunnel(https://*.trycloudflare.com)을 사용합니다.","tunnel.hostname.label":"커스텀 도메인 (선택)","tunnel.hostname.placeholder":"app.your-domain.com","tunnel.hostname.hint":'미리 "cloudflared tunnel route dns" 명령으로 이 도메인을 터널에 연결해 두어야 합니다. 비우면 *.cfargotunnel.com으로 폴백.',"tunnel.hostname.invalid":"유효한 공인 도메인을 입력하세요 (예: app.your-domain.com).","tunnel.hostname.needsName":"커스텀 도메인을 사용하려면 먼저 named tunnel 이름을 지정하세요.","tunnel.guide.toggle":"커스텀 도메인 셋업 방법","tunnel.guide.heading":"cloudflared CLI로 1회 셋업:","tunnel.guide.step4":"위 입력란에 터널 이름과 도메인을 적고 저장하세요.","tunnel.guide.note":"도메인은 Cloudflare 계정에 등록되어 있어야 합니다 (무료 플랜으로 충분).","tunnel.status.stopped":"중지됨","tunnel.status.starting":"시작 중…","tunnel.status.running":"실행 중","tunnel.status.error":"오류","tunnel.save":"저장","tunnel.saving":"저장 중…","tunnel.saved":"터널 설정을 저장했습니다. 터널을 재시작하면 적용됩니다.","tunnel.saveFailed":"터널 설정 저장에 실패했습니다.","tunnel.close":"닫기","tunnel.restart":"터널 재시작","tunnel.restarting":"재시작 중…","tunnel.restarted":"터널을 재시작했습니다.","tunnel.restartFailed":"터널 재시작에 실패했습니다.","tunnel.start":"터널 시작","tunnel.starting":"시작 중…","tunnel.urlCopied":"외부 URL을 클립보드에 복사했습니다.","settings.title":"설정","settings.tabs.account":"계정","settings.tabs.session":"터미널","settings.tabs.tunnel":"터널","settings.tabs.mcp":"MCP","mcp.title":"MCP 연결","mcp.description":"AI CLI나 데스크톱 클라이언트를 MCP로 CLITrigger에 연결합니다. 에디터에서 바로 프로젝트 조회, 할일 생성·실행, 상태 확인이 가능합니다. 아래 두 방법 중 하나로 등록하고, 사용하는 동안 이 서버를 켜 두세요.","mcp.loading":"연결 정보를 불러오는 중…","mcp.config.label":"방법 A · 설정 파일에 붙여넣기 (Claude Desktop 등 JSON 클라이언트)","mcp.commands.label":"방법 B · CLI에서 한 줄 실행","mcp.commands.hint":"쓰는 CLI에 맞는 줄을 복사하세요. 셋 다 HTTP transport로 CLITrigger를 등록합니다.","mcp.copy":"복사","mcp.copied":"클립보드에 복사됨","mcp.copyFailed":"복사 실패","mcp.tokenNote":"이 토큰은 서버에 접근 가능한 누구에게나 전체 API 권한을 부여합니다. 비밀번호처럼 취급하세요.","mcp.close":"닫기","sessionSettings.title":"터미널 환경설정","sessionSettings.description":"새 터미널의 기본 동작과 재사용할 색상 태그를 관리합니다.","sessionSettings.saved":"저장되었습니다.","sessionSettings.worktree.title":"Worktree 기본값","sessionSettings.worktree.label":"새 터미널에 git worktree 사용","sessionSettings.worktree.hint":"켜두면 새 터미널이 .worktrees/ 안의 별도 브랜치에서 생성됩니다. git 저장소에만 적용됩니다.","sessionSettings.fontSize.title":"기본 폰트 크기","sessionSettings.fontSize.label":"새 터미널의 폰트 크기 (px)","sessionSettings.fontSize.hint":"아직 줌을 만지지 않은 터미널은 이 값을 즉시 따라갑니다. 터미널별 줌(Ctrl+휠, A−/A+)이 적용된 터미널은 영향받지 않습니다.","sessionSettings.tags.title":"태그","sessionSettings.tags.description":"이름과 색을 정해두면 터미널 생성 폼에서 골라 붙일 수 있습니다.","sessionSettings.tags.empty":"아직 태그가 없습니다. 위에서 하나 추가하세요.","sessionSettings.tags.namePlaceholder":"태그 이름 (예: 탐색, 배포)","sessionSettings.tags.color":"색","sessionSettings.tags.add":"추가","sessionSettings.tags.edit":"수정","sessionSettings.tags.delete":"삭제","sessionSettings.tags.save":"저장","sessionSettings.tags.cancel":"취소","sessionSettings.tags.deleteConfirm":'"{name}" 태그를 삭제할까요? 이 태그를 쓰던 터미널은 태그가 비워집니다.',"sessionSettings.aliases.title":"터미널 별칭","sessionSettings.aliases.description":"저장해 둔 명령 스니펫입니다. 터미널 창 타이틀바의 ⌘ 아이콘을 누르면 입력창에 삽입되고, Enter는 직접 누릅니다.","sessionSettings.aliases.namePlaceholder":"이름 (예: WSL Ubuntu)","sessionSettings.aliases.commandPlaceholder":"명령 (예: wsl -d Ubuntu)","sessionSettings.aliases.add":"추가","sessionSettings.aliases.empty":"아직 별칭이 없습니다.","sessionSettings.aliases.deleteConfirm":'"{name}" 별칭을 삭제할까요? 이 별칭을 쓰던 세션은 OS 기본 셸로 대체됩니다.',"common.save":"저장","common.edit":"수정","common.delete":"삭제","session.tag.none":"태그 없음","account.title":"비밀번호 변경","account.description":"현재 비밀번호를 입력한 후 새 비밀번호를 선택하세요.","account.oldPassword":"현재 비밀번호","account.newPassword":"새 비밀번호","account.confirm":"새 비밀번호 확인","account.tooShort":"비밀번호는 8자 이상이어야 합니다.","account.mismatch":"비밀번호가 일치하지 않습니다.","account.save":"저장","account.saving":"저장 중…","account.saved":"비밀번호가 변경되었습니다. 다른 세션은 모두 로그아웃됩니다.","account.saveFailed":"비밀번호 변경에 실패했습니다.","account.close":"닫기","review.title":"리뷰 큐","review.subtitle":"모든 프로젝트의 밤샘 결과를 한 화면에서 정리","review.refresh":"새로고침","review.empty":"이 기간에 리뷰할 항목이 없습니다.","review.viewDetails":"자세히","review.approve":"승인 · 머지","review.requestChanges":"수정 요청","review.discard":"폐기","review.cancel":"취소","review.send":"전송","review.continuePlaceholder":"무엇을 고치거나 바꿔야 하는지 설명…","review.discardConfirm":"이 todo를 폐기하고 워크트리를 정리할까요?","review.mergeFailed":"머지 실패","review.continueFailed":"이어가기 실패","review.discardFailed":"폐기 실패","review.closeDetails":"닫기","review.justNow":"방금","review.minAgo":"분 전","review.hourAgo":"시간 전","review.dayAgo":"일 전","review.files":"파일","review.lines":"줄","review.rounds":"라운드","review.window.12h":"12시간","review.window.24h":"24시간","review.window.7d":"7일","review.filter.all":"전체","review.filter.risky":"위험","review.filter.quickWins":"Quick wins","review.filter.failed":"실패","review.risk.low":"낮은 위험","review.risk.medium":"중간 위험","review.risk.high":"높은 위험","review.tokens.total":"총 토큰","review.tokens.todos":"Todo 수","review.tokens.byCli":"CLI별","review.diff.empty":"베이스 브랜치 대비 변경 사항이 없습니다.","review.diff.noBranch":"브랜치 없이 메인 브랜치에서 실행된 todo라 diff를 표시할 수 없습니다.","review.diff.branchMissing":"브랜치가 삭제되어 diff를 표시할 수 없습니다.","review.diff.baseBranchMissing":"베이스 브랜치를 repo에서 찾을 수 없어 diff를 표시할 수 없습니다. 프로젝트 default_branch 설정을 확인하세요.","review.diff.notFound":"Todo를 찾을 수 없습니다.","projects.title":"전체 프로젝트","projects.subtitle":"프로젝트 콘솔","projects.new":"새 프로젝트","projects.logout":"로그아웃","projects.loading":"프로젝트 로딩 중…","projects.empty":"프로젝트가 없습니다","projects.emptyHint":"첫 번째 프로젝트를 만들어보세요.","projects.tasks":"작업","projects.active":"실행 중","projects.done":"완료","projects.search":"프로젝트 검색…","projects.delete":"프로젝트 삭제","projects.deleteConfirm":"이 프로젝트를 삭제하시겠습니까?","projects.pathMissing":"경로 없음","projects.pathMissingConfirm":"이 프로젝트의 로컬 폴더가 존재하지 않습니다. 삭제하시겠습니까?","projects.noGit":"Git 없음","detail.back":"프로젝트","detail.loading":"로딩 중…","detail.notFound":"프로젝트를 찾을 수 없습니다","detail.backToProjects":"프로젝트 목록으로","detail.live":"연결됨","header.branch":"브랜치","header.editName":"클릭하여 프로젝트 이름 변경","header.openFolder":"폴더 열기","header.workers":"워커","header.model":"모델","header.settings":"설정","header.runAll":"전체 실행","header.stopAll":"전체 중지","header.config":"프로젝트 설정","header.execConfig":"자동화 설정","header.execConfigHint":"자동 작업·토론·루틴 실행에 적용됩니다.","header.maxWorkers":"최대 워커 수","settings.defaultMaxTurns":"기본 턴 제한","settings.defaultMaxTurnsHint":"작업별 기본 턴 제한. 개별 작업에서 재설정 가능.","header.cliTool":"CLI 도구","header.cliFlags":"CLI 플래그","header.cancel":"취소","header.save":"저장","header.saving":"저장 중…","header.noGit":"Git 없음","header.noGitHint":'이 프로젝트는 Git 저장소가 아닙니다. 작업은 워크트리 격리 없이 직접 실행됩니다. 프로젝트 경로에서 "git init" 실행 후 재확인하세요.',"header.recheckGit":"Git 상태 재확인","header.fallbackChainTitle":"CLI 폴백 체인","header.fallbackChainHint":"CLI 도구의 컨텍스트가 소진되면 체인의 다음 도구로 자동 전환합니다.","header.autoReviewerTitle":"자동 리뷰어","header.autoReviewerHint":"작업 CLI에 할당된 태스크가 성공적으로 완료되면 리뷰 CLI에 할당된 후속 리뷰 태스크를 자동으로 생성합니다.","header.autoReviewerEnable":"자동 리뷰 활성화","header.autoReviewerFrom":"작업 CLI","header.autoReviewerTo":"리뷰 CLI","header.sandboxTitle":"샌드박스 모드","header.sandboxBadgeStrict":"샌드박스: 엄격","header.sandboxBadgePermissive":"샌드박스: 허용","header.sandboxStrict":"엄격 (권장)","header.sandboxStrictDesc":"CLI 도구가 워크트리 디렉토리 내 파일만 접근할 수 있습니다.","header.sandboxPermissive":"허용","header.sandboxPermissiveDesc":"CLI 도구가 시스템의 모든 파일에 접근할 수 있습니다.","header.sandboxWarning":"경고: 허용 모드에서는 CLI 도구가 워크트리 밖 파일에도 접근할 수 있습니다. 주의해서 사용하세요.","header.worktreeTitle":"워크트리 격리","header.worktreeEnabled":"워크트리 (권장)","header.worktreeEnabledDesc":"각 작업이 독립 브랜치에서 실행됩니다. 병렬 작업에 안전합니다.","header.worktreeDisabled":"직접 실행 (메인 브랜치)","header.worktreeDisabledDesc":"메인 브랜치에서 직접 실행합니다. 최대 워커 1개로 제한됩니다.","header.worktreeWarning":"경고: 메인 브랜치를 직접 수정합니다. 동시 실행이 비활성화됩니다.","header.npmAutoInstallLabel":"워크트리 생성 시 `npm install` 자동 실행","header.npmAutoInstallHint":"npm 프로젝트에서 에이전트가 워크트리 안에서 test/build를 바로 돌릴 수 있게 합니다. pnpm/yarn/bun이나 npm이 아닌 프로젝트에서는 꺼두세요.","header.autoCommitLabel":"남은 변경 자동 커밋","header.autoCommitHint":"작업이나 세션이 끝날 때, 그리고 워크트리 브랜치를 병합하기 전에 커밋되지 않은 변경을 자동으로 커밋합니다. 끄면 미커밋 변경이 있는 워크트리는 병합이 거부됩니다.","header.noWorktreeBadge":"워크트리 없음","header.debugBadge":"디버그 로그","header.showTokenUsageTitle":"토큰 사용량 표시","header.showTokenUsageDesc":"작업 완료 후 토큰 사용량(입력/출력)을 표시합니다.","header.showTokenUsageEnable":"토큰 사용량 표시","header.debugLoggingTitle":"디버그 로깅","header.debugLoggingDesc":"각 태스크 실행 시 CLI 입출력 전체를 .debug-logs/ 파일로 저장합니다.","header.debugLoggingEnable":"디버그 로그 파일 활성화","header.usageLimit":"사용량","header.cliNotInstalled":"{tool}이(가) 설치되지 않았습니다","header.cliInstalled":"설치됨","header.cliNotFound":"미설치","header.cliInstallHint.claude":"npm install -g @anthropic-ai/claude-code","header.cliInstallHint.antigravity":"curl -fsSL https://antigravity.google/cli/install.sh | bash","header.cliInstallHint.codex":"npm install -g @openai/codex","header.cliRefresh":"재확인","form.newProject":"새 프로젝트","form.projectName":"프로젝트 이름","form.folderPath":"폴더 경로","form.cancel":"취소","form.create":"생성","form.creating":"생성 중…","form.createError":"프로젝트 생성 실패","browse.title":"폴더 찾아보기","browse.select":"선택","browse.loading":"불러오는 중…","browse.error":"디렉토리를 불러올 수 없습니다","browse.empty":"폴더가 없습니다","todos.title":"자동 작업 목록","todos.add":"자동 작업 추가","todos.empty":"자동 작업이 없습니다","todos.emptyHint":"자동 작업을 추가하세요.","todos.filterAll":"전체","todos.filterActive":"작업중","todos.filterCompleted":"완료","todos.filterCancelled":"취소","todos.filterEmpty":"해당 상태의 자동 작업이 없습니다.","todos.stackModeOn":"스택 모드 켜짐 (다시 누르면 해제)","todos.stackModeOff":"스택 모드 켜기 (iOS 알림 스타일)","todos.collapseStack":"스택으로 접기","todos.expandStack":"클릭하면 펼쳐집니다","todos.merge":"병합","todo.description":"설명","todo.noDescription":"설명이 없습니다.","todo.attachedImages":"첨부 이미지","todo.branch":"브랜치","todo.path":"경로","todo.worktree":"워크트리","todo.result":"실행 결과","todo.mergeFailed":"병합 실패","todo.diffError":"Diff 오류","todo.diffOutput":"변경사항","todo.files":"파일","todo.systemLog":"활동 로그","todo.start":"시작","todo.startHeadless":"Headless","todo.startHeadlessDesc":"자율 실행. 모든 권한 자동 승인.","todo.startInteractive":"Interactive","todo.startInteractiveDesc":"stdin을 열어두고 실행 중 메시지 전송 가능.","todo.startVerbose":"Verbose","todo.startVerboseDesc":"자동 승인 + 모든 로그 실시간 출력.","todo.sendPlaceholder":"메시지 입력…","todo.startWithDependency":"선행 작업 먼저 시작","todo.stop":"중지","todo.viewDiff":"Diff 보기","todo.hideDiff":"Diff 접기","todo.viewDebugLog":"디버그 로그","todo.merge":"병합","todo.mergeChain":"체인 병합","todo.mergeChainDesc":"이 체인의 모든 작업을 메인 브랜치에 병합","todo.chainComplete":"체인 완료","todo.chainTasks":"{count}개 작업","todo.edit":"편집","todo.delete":"삭제","todo.cleanup":"워크트리 삭제","todo.cleanupFailed":"정리 실패","cleanup.confirmDeleteBranch":`워크트리를 삭제합니다. 브랜치 "{name}"도 함께 삭제할까요?
|
|
65
|
-
|
|
66
|
-
확인 = 워크트리 + 브랜치 삭제
|
|
67
|
-
취소 = 워크트리만 삭제`,"todo.retry":"재시도","todo.retryDesc":"이전 워크트리를 정리하고 처음부터 다시 실행합니다.","todo.retryFailed":"재시도 실패","todo.continue":"이어서","todo.continueDesc":"같은 워크트리에서 후속 프롬프트를 실행합니다.","todo.continuing":"이어가는 중…","todo.confirmContinue":"이어서 실행","todo.continuePromptLabel":"후속 프롬프트","todo.continuePromptPlaceholder":"이 워크트리에 적용할 다음 지시사항을 입력하세요…","todo.continuePromptRequired":"후속 프롬프트를 입력해주세요.","todo.roundLabel":"라운드","todo.dependsOn":"선행 작업","todo.mergedFrom":"이전 작업에서 병합","todo.transferredTo":"작업 이전됨","todo.schedule":"예약","todo.scheduleDesc":"특정 시간에 1회 실행되도록 루틴으로 변환합니다.","todo.scheduleAt":"실행 시각","todo.scheduling":"예약 중…","todo.confirmSchedule":"예약","todo.scheduleKeepOriginal":"원본 작업 유지","todo.scheduleOnReset":"리셋 시 실행","todo.scheduleOnResetDesc":"토큰 한도 리셋 시 자동으로 새 작업을 실행합니다.","todo.scheduleOnResetLabel":"리셋 시각","todo.resetPromptPlaceholder":"리셋 후 실행할 프롬프트를 입력하세요…","todo.confirmResetSchedule":"리셋 시 실행 예약","todoForm.titlePlaceholder":"예: 로그인 리다이렉트 버그 수정","todoForm.descPlaceholder":"설명 (선택사항)…","todoForm.cliTool":"CLI 도구","todoForm.addImage":"이미지 추가","todoForm.pasteHint":"Ctrl+V로 이미지 붙여넣기","todoForm.images":"이미지","todoForm.maxTurns":"최대 턴 수","todoForm.maxTurnsPlaceholder":"제한 없음","todoForm.maxTurnsHint":"에이전트 턴 수를 제한하여 과도한 토큰 사용을 방지합니다.","todoForm.loopEnable":"종료 규칙이 만족될 때까지 반복 (루프)","todoForm.loopHint":"라운드가 끝날 때마다 종료 규칙을 검사하고, 미달이면 검증 출력을 넘겨 같은 워크트리에서 다시 실행합니다.","todoForm.loopMaxRounds":"최대 라운드","todoForm.loopMaxCost":"비용 상한 (USD)","todoForm.loopMaxCostPlaceholder":"없음","todoForm.loopCheck":"검증 명령","todoForm.loopCheckHint":"라운드마다 작업 디렉터리에서 실행합니다. exit 0이면 완료.","todoForm.loopDonePhrase":"완료 문구","todoForm.loopDonePhraseHint":"에이전트의 마지막 메시지에 이 문구가 포함되면 완료로 봅니다.","todoForm.loopNoDoneRule":"종료 규칙이 없습니다. 최대 라운드만큼 반복한 뒤 완료 처리됩니다.","todoForm.loopRules":"매 라운드 규칙","todoForm.loopRulesPlaceholder":"예: 실패하는 테스트를 한 번에 하나씩 고치고 커밋할 것. src/legacy는 건드리지 말 것.","todoForm.loopRulesHint":"모든 라운드의 프롬프트 끝에 붙습니다.","todoForm.loopStopWhenNoChanges":"커밋 없이 끝난 라운드가 있으면 중단","todoForm.loopResume":"라운드 사이에 CLI 세션 이어가기","todoForm.loopResumeHint":"끄면(권장) 매 라운드 새 컨텍스트로 시작해 git 이력과 검증 출력만 보고 진행합니다.","header.loopDefaultsTitle":"기본 루프 규칙","header.loopDefaultsHint":"새 작업용 템플릿입니다. 작업에서 루프를 켜면 이 규칙이 미리 채워져 검증 명령을 매번 다시 입력하지 않아도 됩니다.","header.loopDefaultsEnable":"이 프로젝트의 기본 루프 규칙 템플릿 유지","todoForm.dependsOn":"선행 작업","todoForm.noDependency":"없음 (독립 작업)","todoForm.dependsOnHint":"선행 작업이 완료되면 변경사항을 스쿼시 머지하고 새 브랜치에서 실행됩니다.","todoForm.worktreeMode":"실행 브랜치","todoForm.worktreeInherit":"프로젝트 설정 따름","todoForm.worktreeForceOn":"워크트리 사용 (격리 브랜치)","todoForm.worktreeForceOff":"메인 브랜치에서 실행","todoForm.worktreeProjectDefaultOn":"프로젝트 기본: 워크트리","todoForm.worktreeProjectDefaultOff":"프로젝트 기본: 메인 브랜치","todoForm.worktreeMainWarning":"메인 브랜치에서 실행 시 다른 작업의 동시 실행이 차단됩니다.","todoForm.cancel":"취소","todoForm.save":"저장","dnd.dropHint":"이 작업 이후에 실행","dnd.removeDep":"의존성 제거","dnd.dropToRemoveDep":"여기에 놓으면 의존성 제거","dnd.cyclicWarning":"순환 의존성으로 연결할 수 없습니다","graph.autoLayout":"자동 정렬","graph.listView":"리스트 보기","graph.graphView":"그래프 보기","status.pending":"대기","status.running":"실행 중","status.completed":"완료","status.failed":"실패","status.stopped":"중지","status.merged":"병합됨","progress.complete":"완료","progress.done":"완료","progress.live":"실행 중","progress.idle":"대기","progress.fail":"실패","progress.stop":"중지","progress.merged":"병합됨","failure.title":"실패 원인","failure.exitCode":"종료 코드","failure.fix":"수정하기: 실패 원인을 분석하고 문제를 수정하는 새 작업을 생성합니다.","failure.fixPrefix":"[수정] ","result.duration":"소요 시간","result.commits":"커밋","result.filesChanged":"파일 변경","result.commitHistory":"커밋 이력","result.changedFiles":"변경된 파일","result.tokenUsage":"토큰 사용량","result.inputTokens":"입력","result.outputTokens":"출력","result.totalCost":"비용","result.cacheTokens":"캐시","result.turns":"턴","result.contextUsed":"사용","result.levelLight":"가벼움","result.levelModerate":"보통","result.levelHigh":"많음","result.levelHeavy":"과다","log.awaiting":"출력 대기 중…","log.waitingResponse":"응답 대기 중…","log.noChanges":"변경사항이 없습니다.","log.copy":"복사","log.copied":"복사됨!","log.viewChat":"대화","log.viewRaw":"원시","schedules.title":"루틴","schedules.add":"새 루틴","schedules.empty":"루틴이 없습니다","schedules.emptyHint":"반복 작업을 자동화할 루틴을 만드세요.","schedule.type":"루틴 유형","schedule.recurring":"반복","schedule.once":"1회","schedule.runAtLabel":"실행 시각","schedule.cronExpression":"실행 주기","schedule.cronHint":"예: */30 * * * * (30분마다), 0 9 * * * (매일 9시), 0 9 * * 1-5 (평일 9시)","cron.everyMinutes":"분 간격","cron.hourly":"매시간","cron.daily":"매일","cron.weekly":"매주","cron.monthly":"매월","cron.custom":"직접 입력","cron.every":"매","cron.minutesLabel":"분마다","cron.everyHourAt":"매시간","cron.minutesPast":"분에","cron.everyDayAt":"매일","cron.at":"시간","cron.everyMonthOn":"매월","cron.dayAt":"일","cron.expression":"Cron","cron.mon":"월","cron.tue":"화","cron.wed":"수","cron.thu":"목","cron.fri":"금","cron.sat":"토","cron.sun":"일","schedule.skipIfRunning":"이전 실행이 진행 중이면 건너뛰기","schedule.active":"활성","schedule.paused":"일시정지","schedule.lastRun":"마지막 실행","schedule.never":"없음","schedule.trigger":"즉시 실행","schedule.activate":"활성화","schedule.pause":"일시정지","schedule.edit":"편집","schedule.delete":"삭제","schedule.runs":"실행 이력","schedule.runTriggered":"실행됨","schedule.runSkipped":"건너뜀","schedule.runCompleted":"완료","schedule.runFailed":"실패","schedule.noRuns":"실행 이력이 없습니다","scheduleForm.titlePlaceholder":"예: 매일 밤 의존성 점검","scheduleForm.descPlaceholder":"작업 설명 템플릿…","scheduleForm.cliTool":"CLI 도구","scheduleForm.cancel":"취소","scheduleForm.save":"저장","tabs.automation":"자동화","tabs.automation.help":"자동 작업·루프·토론·루틴을 한곳에서 관리합니다.","tabs.web":"웹","tabs.web.help":"노션 등 외부 사이트를 데스크톱 앱 안에 임베드합니다.","tabs.projectNavigation":"프로젝트 작업 흐름","tabs.group.prepare":"준비","tabs.group.execute":"실행","tabs.group.review":"검토","tabs.tasks":"자동 작업","tabs.sessions":"터미널","tabs.discussions":"토론","tabs.schedules":"루틴","tabs.git":"Git","tabs.svn":"SVN","tabs.files":"문서","tabs.planner":"플래너","tabs.wiki":"위키","tabs.analytics":"통계","tabs.wiki.help":"프로젝트 지식 그래프. 노드/엣지를 만들어 두면 자동 작업·토론 프롬프트에 <long_term_memory> 블록으로 주입돼서 LLM이 실행 간에도 맥락을 유지합니다.","tabs.planner.help":"가벼운 작업 메모. 태그·우선순위·이미지 첨부가 가능하고, 마음에 드는 항목은 자동 작업이나 루틴으로 변환하거나 Markdown으로 내보내기/가져오기 할 수 있습니다.","tabs.tasks.help":"작업 큐입니다. 각 TODO는 독립된 git worktree에서 Claude/Antigravity/Codex로 실행되고, 동시 실행 한도까지 병렬 처리되며 의존성 체이닝·멀티 라운드 continue·머지 자동화를 지원합니다.","tabs.loops":"루프","tabs.loops.help":"종료 규칙이 만족될 때까지 반복 실행되는 작업입니다. 검증 명령 통과나 완료 문구 출력으로 끝나고, 최대 라운드·비용 상한·커밋 없음 중단 규칙으로 폭주를 막습니다.","loops.empty":"루프가 없습니다","loops.emptyHint":"검증 명령이 통과할 때까지 에이전트가 반복 작업하도록 루프를 만들어 보세요.","todoForm.loopRulesTitle":"루프 규칙","tabs.sessions.help":"Claude/Antigravity/Codex를 플로팅 창에서 직접 조작하는 대화형 모드입니다. 자동 작업(fire-and-forget)과 달리 터미널은 계속 살아 있어서 실시간으로 입력하고 결과를 보면서 CLI를 직접 컨트롤할 수 있습니다.","tabs.discussions.help":"여러 AI 에이전트가 라운드별로 토론한 뒤 합의를 코드로 구현. 결과를 플래너 항목으로 추출할 수도 있습니다.","tabs.schedules.help":"cron 또는 일회성 예약으로 자동 작업을 트리거. 레이트 리밋 리셋 시점 자동 재시작도 지원합니다.","tabs.git.help":"워크스페이스 내장 Git 클라이언트. 파일 상태/커밋 그래프/브랜치 관리/diff 뷰어를 Fork·SourceTree 스타일 레이아웃으로 제공합니다.","tabs.svn.help":"내장 SVN 워킹카피 패널. 파일 상태/리비전 로그/diff 뷰어를 제공합니다.","svn.fileStatus":"파일 상태","svn.history":"히스토리","svn.unversioned":"버전 미관리","svn.changed":"변경됨","svn.groupByDir":"디렉터리로 그룹화","svn.viewFlat":"목록으로 보기","svn.dirFileCount":"{d}개 디렉터리 · {f}개 파일","svn.fileCount":"{f}개 파일","svn.workingCopyRev":"워킹카피 리비전","svn.update":"업데이트","svn.refresh":"새로고침","svn.add":"추가","svn.revert":"되돌리기","svn.delete":"삭제","svn.resolve":"충돌 해결","svn.commitMessagePlaceholder":"커밋 메시지를 입력하세요. 필수.","svn.templates":"템플릿","svn.noTemplates":"저장된 템플릿이 없습니다","svn.templatePickHint":"클릭: 뒤에 이어붙이기 · Shift+클릭: 교체","svn.templateNamePlaceholder":"이름 (비우면 첫 줄 사용)","svn.saveTemplate":"저장","svn.saveTemplateHint":"현재 메시지를 템플릿으로 저장","svn.deleteTemplate":"템플릿 삭제","svn.commit":"커밋","svn.committing":"커밋 중…","svn.commitSuccess":"r{rev} 커밋 완료","svn.updating":"업데이트 중…","svn.updateProgress":"{n}개 파일","svn.running":"{cmd} 실행 중…","svn.updateSuccess":"r{rev}로 업데이트 완료","svn.updateConflicts":"업데이트 완료: 충돌 {n}개 발생","svn.previewDiff":"diff 미리보기","svn.noChanges":"로컬 변경사항 없음.","svn.selectFiles":"먼저 파일을 한 개 이상 선택하세요.","svn.notSvn":"SVN 워킹카피가 아닙니다.","svn.cliMissing":"svn CLI를 찾을 수 없습니다. 이 패널을 사용하려면 Subversion을 설치하세요.","svn.repoUrl":"저장소 URL","svn.relativePath":"경로","svn.viewsHeader":"보기","svn.actionsHeader":"명령","svn.checkForModifications":"로컬 변경 확인","svn.showLog":"로그 보기","svn.updateToRevision":"특정 리비전으로 업데이트…","svn.cleanup":"정리(Cleanup)","svn.checkRepository":"원격 변경 확인","svn.remoteBadge":"원격","svn.remoteHint":"SVN 서버에 접속합니다","svn.loadLog":"로그 불러오기","svn.logEmptyHint":"로그는 SVN 서버에서 가져옵니다. 자동으로 불러오지 않습니다.","svn.loadMore":"더 보기","svn.revision":"리비전","svn.revisionPlaceholder":"예: 1234 또는 HEAD","svn.cleaningUp":"정리 중…","svn.cleanupSuccess":"정리 완료","svn.checking":"확인 중…","svn.behindCount":"서버에 들어올 변경 {n}건","svn.upToDate":"서버와 동일","svn.resolveWorking":"해결 표시 (워킹카피 유지)","svn.resolveMine":"내 변경으로 해결","svn.resolveTheirs":"서버 변경으로 해결","svn.resolveBase":"기준본으로 해결","svn.viewDiff":"Diff 보기","svn.showRevisionChanges":"변경 내용 보기","svn.compareRevisionWithWorking":"작업 사본과 비교","svn.revisionChangesTitle":"r{rev} 변경 내용","svn.compareWithWorkingTitle":"r{rev} ↔ 작업 사본","svn.cancel":"취소","svn.properties":"속성(Properties)","svn.propertiesOf":"속성: {target}","svn.workingCopyRoot":"워킹카피 루트","svn.noProperties":"이 항목에 속성이 없습니다.","svn.editProperty":"수정","svn.saveProperty":"저장","svn.close":"닫기","svn.ext.path":"경로","svn.ext.peg":"Peg","svn.ext.operative":"Operative","svn.ext.localPath":"로컬 경로","svn.ext.revision":"리비전","svn.ext.showLog":"로그 보기","svn.ext.pickHint":"리비전을 클릭하면 Peg 리비전으로 적용됩니다.","svn.ext.new":"새 항목","svn.ext.remove":"삭제","svn.ext.findHead":"HEAD 리비전 조회","svn.ext.editText":"텍스트로 편집","svn.ext.editTable":"표로 편집","svn.ext.empty":"정의된 external이 없습니다.","svn.changelistDefault":"변경","svn.changelistUnversioned":"버전이 없는 파일","svn.changelistMissing":"로컬에서 삭제된 파일","svn.moveToChangelist":"변경 목록으로 이동","svn.newChangelist":"새 변경 목록…","svn.removeFromChangelist":"변경 목록에서 제거","svn.changelistNamePlaceholder":"변경 목록 이름","svn.createChangelist":"만들기","svn.renameChangelist":"변경 목록 이름 바꾸기","svn.deleteChangelist":"변경 목록 삭제","header.svnTitle":"SVN (Subversion)","header.svnHint":"기본값 OFF. 켜면 프로젝트에 .svn/ 워킹카피가 있는지 검사하고, 발견 시 SVN 탭이 표시됩니다.","header.svnEnable":"이 프로젝트에서 SVN 활성화","header.processesTitle":"터미널 프로세스","header.processesHint":"실행 중인 터미널 세션이 띄운 CLI 프로세스입니다. 이 탭을 열 때 한 번 조회하며, Windows에서는 2~3초 걸립니다.","header.processesRefresh":"새로고침","header.processesSnapshotAt":"스냅샷 시각","header.processesNoneRunning":"실행 중인 터미널이 없습니다","header.processesLoading":"프로세스 조회 중…","header.processesNotFound":"이 스냅샷에 없음 — 종료되었거나 방금 시작됨","header.processesFailed":"프로세스 목록을 가져올 수 없습니다: {reason}","header.processesSub":"서브 프로세스 {count}개","header.processesSubHint":"Claude가 작업을 위해 띄운 프로세스 (셸, 훅, 상태줄 등)","header.processesNoSub":"서브 프로세스 없음","header.tabShowHint":"기본값 ON. 체크를 해제하면 이 프로젝트에서 해당 탭이 숨겨집니다.","header.tabShowEnable":"이 프로젝트에서 {tab} 탭 표시","tabs.files.help":"마크다운 문서 위키: 파일 트리 탐색, 노트 미리보기/편집, 그래프·백링크·개요·태그·검색 패널로 .md 파일 간 위키링크 탐색.","tabs.analytics.help":"실행 통계와 비용 분석. CLI별 토큰 사용량, 상태 분포, 일별 비용 추이를 차트로 시각화합니다.","files.root":"루트","files.empty":"빈 폴더","files.loading":"불러오는 중…","files.refresh":"새로고침","files.graph":"위키 그래프: .md 파일 간 위키링크 연결 표시","files.showHidden":"숨김 파일 보기","files.hideHidden":"숨김 파일 숨기기","files.copyPath":"경로 복사","files.sendToTerminal":"터미널로 보내기","files.newTerminal":"새 터미널","files.includeLinks":"링크된 문서 포함","files.sendToTask":"작업으로 보내기","files.sentToTerminal":"터미널로 전송됨","files.noActiveSession":"열린 세션이 없습니다","files.taskCreated":"작업이 생성됨","files.taskCreateFailed":"작업 생성 실패","files.hide":"문서에서 숨기기","files.unhide":"문서에 다시 보이기","files.openInOS":"기본 앱으로 열기","files.revealInExplorer":"탐색기에서 보기","files.openFolder":"탐색기에서 폴더 열기","files.pin":"상단에 고정","files.unpin":"고정 해제","files.pinned":"고정됨","files.tooLarge":"미리보기를 표시하기엔 파일이 너무 큽니다 (최대 2MB).","files.binaryNotPreviewable":"바이너리 파일은 미리보기를 지원하지 않습니다.","files.download":"다운로드","files.preview.empty":"파일을 선택해 미리보기를 확인하세요.","files.html.sandboxNotice":"안전 미리보기: 스크립트와 외부 리소스가 차단되었습니다.","files.editor.edit":"편집","files.editor.save":"저장","files.editor.done":"완료","files.editor.saved":"저장됨","files.editor.saveFailed":"저장 실패","files.editor.conflict":"파일이 디스크에서 변경되었습니다. 다시 열어주세요.","files.editor.discardConfirm":"변경사항을 폐기하시겠습니까?","vault.onboarding.title":"문서 탭 시작하기","vault.onboarding.intro":"문서 탭은 프로젝트의 .md/.html 파일을 스캔해 [[wikilink]] 그래프로 보여줍니다. 큰 프로젝트는 첫 스캔과 그래프 렌더링이 느릴 수 있습니다. .vaultignore(gitignore 문법)로 표시할 문서만 골라두면 가볍게 쓸 수 있습니다.","vault.onboarding.step1Title":"전부 숨김으로 시작","vault.onboarding.step1Body":".vaultignore에 *가 들어가 모든 파일이 문서 탭에서 제외된 상태로 시작합니다. 파일은 그대로 있고 문서 탭에서만 보이지 않습니다.","vault.onboarding.step2Title":"필요한 문서만 해제","vault.onboarding.step2Body":'파일 탐색기에서 회색으로 표시된 파일·폴더를 우클릭해 "문서에 다시 보이기"를 선택합니다. 숨김 파일 표시는 자동으로 켜 둡니다.',"vault.onboarding.step3Title":"그래프는 표시된 문서만","vault.onboarding.step3Body":"해제한 문서만 스캔과 그래프에 올라갑니다. 패턴은 좌측 레일의 .vaultignore 설정에서 언제든 직접 편집할 수 있습니다.","vault.onboarding.startIgnoreAll":"전부 숨김으로 시작 (큰 프로젝트 권장)","vault.onboarding.startShowAll":"전체 표시로 시작 (작은 프로젝트에 적합)","vault.onboarding.saving":"설정 중…","files.editor.dirty":"변경됨","files.editor.draftRestored":"저장 안 된 편집 내용 복구됨","find.openFind":"찾기","find.placeholder":"찾을 내용","find.replacePlaceholder":"바꿀 내용","find.case":"대소문자 구분","find.word":"전체 단어 일치","find.regex":"정규식 사용","find.next":"다음 결과 (Enter)","find.prev":"이전 결과 (Shift+Enter)","find.replace":"바꾸기","find.replaceAll":"모두 바꾸기","find.close":"닫기 (Esc)","find.toggleReplace":"바꾸기 토글","find.noMatches":"결과 없음","annotate.start":"낙서 시작","annotate.stop":"낙서 종료","annotate.select":"선택","annotate.pen":"펜","annotate.highlighter":"형광펜","annotate.eraser":"지우개","annotate.color":"색상","annotate.undo":"되돌리기","annotate.redo":"다시 실행","annotate.clear":"모두 지우기","wiki.title":"위키","wiki.add":"새 항목","wiki.edit":"편집","wiki.delete":"삭제","wiki.save":"저장","wiki.saving":"저장 중…","wiki.cancel":"취소","wiki.empty":"아직 위키 항목이 없습니다","wiki.emptyHint":"LLM이 작업할 때 참고해야 할 노트, 컨벤션, 교훈을 추가하세요.","wiki.viewList":"목록","wiki.viewGraph":"그래프","wiki.viewHierarchical":"계층","wiki.viewNetwork":"네트워크","wiki.searchPlaceholder":"위키 검색…","wiki.backlinks":"백링크","wiki.addLink":"다른 항목 링크 추가","wiki.addLinkPlaceholder":"연결할 항목 검색…","wiki.connect.title":"어떻게 연결할까요?","wiki.connect.wikilink":"참조 (wikilink)","wiki.connect.wikilinkHint":"소스 본문에 [[대상 제목]]을 추가합니다. 자유로운 언급, 의미 관계 없음.","wiki.connect.edge":"관계 (타입드 엣지)","wiki.connect.edgeHint":"관계 타입(관련/선행/구체화 등)을 가진 엣지를 추가합니다.","wiki.allTags":"모든 태그","wiki.countLabel":"{count}개","wiki.deleteConfirm":"이 항목과 연결된 모든 관계를 삭제할까요?","wiki.noResults":"검색 결과 없음","wiki.noBody":"본문 없음","wiki.connections":"연결","wiki.outgoing":"나가는 연결","wiki.incoming":"들어오는 연결","wiki.autoLayout":"자동 정렬","wiki.form.newTitle":"새 항목","wiki.form.editTitle":"항목 편집","wiki.form.title":"제목","wiki.form.titlePlaceholder":"간결하고 명확한 제목","wiki.form.body":"본문 (Markdown 지원)","wiki.form.bodyPlaceholder":"LLM이 참고해야 할 지식이나 컨벤션을 작성하세요…","wiki.form.linkHint":"[[ 또는 @ 입력으로 다른 위키 항목을 링크하세요.","wiki.form.tags":"태그","wiki.form.tagsPlaceholder":"태그 입력 후 Enter","wiki.form.pinned":"고정 (강조 표시)","wiki.edge.editTitle":"연결 편집","wiki.edge.relationType":"관계 종류","wiki.edge.label":"라벨","wiki.edge.labelPlaceholder":'선택 메모 (예: "3.2절 참조")',"wiki.edge.deleteConfirm":"이 연결을 삭제할까요?","wiki.edge.relations.related":"관련","wiki.edge.relations.precedes":"선행","wiki.edge.relations.example_of":"예시","wiki.edge.relations.counter_example":"반례","wiki.edge.relations.refines":"구체화","vault.title":"문서","vault.empty":"마크다운 파일이 없습니다","vault.noResults":"일치하는 파일 없음","vault.searchPlaceholder":"파일 검색…","vault.graph.addLink":"여기서 링크 추가","vault.graph.linkHint":"연결할 대상 노드를 클릭하세요 · Esc 취소","vault.graph.showLabels":"이름 표시","vault.graph.rightClickHint":"우클릭 → 링크 추가","vault.newFile":"새 파일","vault.create":"만들기","vault.save":"저장","vault.delete":"삭제","vault.unsaved":"미저장","vault.confirmDelete":"{path} 파일을 삭제할까요?","vault.backlinks":"백링크","vault.filesCount":"개 파일","vault.panel.fileExplorer":"파일","vault.panel.search":"검색","vault.panel.tags":"태그","vault.panel.graph":"그래프","vault.panel.outline":"개요","vault.panel.backlinks":"백링크","vault.panel.outgoing":"아웃고잉 링크","vault.panel.preview":"미리보기","vault.outline.empty":"이 노트에 헤딩이 없습니다","vault.outgoing.empty":"아웃고잉 위키링크 없음","vault.backlinks.empty":"백링크 없음","vault.tags.empty":"문서에 태그 없음","vault.search.empty":"결과 없음","vault.search.prompt":".md 노트 검색","vault.activeFile.empty":"파일을 선택해 미리보기/편집하세요","vault.sidebar.collapse":"사이드바 접기","vault.sidebar.expand":"사이드바 펼치기","vault.loadError":"문서 목록을 불러오지 못했습니다","vault.retry":"다시 시도","vault.allHidden":'모든 문서가 .vaultignore로 숨김 상태입니다. 파일 탐색기에서 우클릭 → "문서에 다시 보이기"로 해제하세요.',"vault.ignoreHelp":".vaultignore 사용법","vaultInject.title":"문서 주입","vaultInject.modeNone":"사용 안 함","vaultInject.modeAuto":"자동","vaultInject.modeAll":"전체 주입","vaultInject.modeSelected":"선택 주입","vaultInject.autoHint":"실행 직전 LLM이 작업 설명을 기준으로 {count}개 파일 중 최대 10개를 골라 주입합니다.","vaultInject.previewToggle":"미리보기","vaultInject.previewChars":"{n}자","vaultInject.previewTokens":"약 {n} 토큰","vaultInject.empty":"프로젝트 루트에 .md/.html 파일이 없습니다.","vaultInject.injectedCount":"{count}개 파일 주입","vaultInject.allCount":"전체 {count}개 파일 주입","vaultInject.searchPlaceholder":"이름으로 필터…","vaultInject.loading":"불러오는 중…","vaultInject.includeLinked":"체크 시 1-hop 연결된 파일도 함께 선택","vaultInject.linkedAdded":"+{n}개 연결","vaultInject.noResults":"일치하는 파일 없음","wiki.ingest":"Ingest","wiki.ingest.title":"소스 자료 인제스트","wiki.ingest.tabTask":"태스크에서","wiki.ingest.tabDiscussion":"디스커션에서","wiki.ingest.tabText":"텍스트 붙여넣기","wiki.ingest.selectTask":"완료된 태스크 선택","wiki.ingest.selectDiscussion":"완료된 디스커션 선택","wiki.ingest.noTasks":"완료된 태스크가 없습니다","wiki.ingest.noDiscussions":"완료된 디스커션이 없습니다","wiki.ingest.textPlaceholder":"아티클, 노트, 채팅 기록 등 텍스트를 붙여넣으면 지식을 추출합니다…","wiki.ingest.run":"인제스트","wiki.ingest.running":"인제스트 중…","wiki.ingest.success":"{created}개 생성, {updated}개 갱신, 엣지 {edges}개 추가","wiki.ingest.parseFailed":"LLM 응답을 JSON으로 해석하지 못했습니다. 변경 사항 없음.","wiki.ingest.modelEmpty":"LLM이 추가할 만한 새 내용이 없다고 판단했습니다. 제안 0건.","wiki.ingest.allSkipped":"제안된 항목이 모두 스킵되었습니다. 아래 사유를 확인하세요.","wiki.ingest.proposed":"LLM 제안: 생성 {c}, 갱신 {u}, 엣지 {e}","wiki.ingest.skipNote":"스킵됨","wiki.ingest.skip.duplicate":"이미 존재하는 제목","wiki.ingest.skip.unique":"DB UNIQUE 충돌","wiki.ingest.skip.empty":"제목 없음","wiki.ingest.skip.badId":"갱신 대상 id 가 유효하지 않음","wiki.ingest.skip.badEdge":"엣지 양 끝 노드를 찾을 수 없음","wiki.ingest.skip.selfEdge":"자기 자신을 가리키는 엣지","wiki.ingest.skip.edgeUnique":"엣지 UNIQUE 충돌","wiki.ingest.rawSnippet":"원본 응답 일부 보기","wiki.ingest.toast.success":"{source} → 위키 업데이트: {created}개 생성, {updated}개 갱신, 엣지 {edges}개","wiki.ingest.toast.empty":"{source} → 위키 인제스트: 추가할 새 내용 없음","wiki.ingest.toast.parseFailed":"{source} → 위키 인제스트: LLM 응답 파싱 실패","wiki.ingest.toast.failed":"위키 자동 인제스트 실패","wiki.schemaSection":"스키마","wiki.schemaSectionHint":"Ingest가 사용하는 항목 종류와 규칙을 정의합니다. 프로젝트에 맞게 편집하세요.","wiki.schemaBannerTitle":"위키 스키마","wiki.schemaBannerHint":"여기를 편집하면 Ingest 시 LLM이 새 항목을 분류하는 방식이 바뀝니다. 삭제하면 기본값으로 재생성됩니다.","wiki.systemSection":"시스템","wiki.systemSectionHint":"Ingest 동작과 빠른 탐색을 지원하는 자동 유지 항목들입니다.","wiki.indexBannerTitle":"위키 인덱스","wiki.indexBannerHint":"위키 변경 시마다 자동 재생성됩니다. 수동 편집은 덮어써지고, 삭제해도 다음 변경 때 재생성됩니다.","wiki.asset.uploading":"이미지 업로드 중…","wiki.asset.tooLarge":"이미지가 너무 큽니다 (최대 10MB)","wiki.diskDiff.button":"디스크 비교","wiki.diskDiff.tooltip":"내보낸 위키 파일과 DB 비교","wiki.diskDiff.title":"위키 vs .clitrigger/wiki/","wiki.diskDiff.intro":"DB가 export할 내용과 디스크 파일이 다른 것만 보여주는 읽기 전용 뷰입니다. Obsidian 등 외부에서 편집한 내용이 여기 나타나고, Rebuild는 디스크를 현재 DB 상태로 덮어씁니다.","wiki.diskDiff.running":"비교 중…","wiki.diskDiff.empty":"디스크와 DB가 일치합니다.","wiki.diskDiff.refresh":"다시 비교","wiki.diskDiff.close":"닫기","wiki.diskDiff.section.modified":"디스크에서 수정됨 ({n})","wiki.diskDiff.section.missing":"디스크에 없음 ({n})","wiki.diskDiff.section.untracked":"추적되지 않는 디스크 파일 ({n})","wiki.diskDiff.rebuild":"DB 기준으로 재생성","wiki.diskDiff.rebuildTooltip":"현재 DB 상태로 wiki/ 폴더를 덮어씁니다. 디스크의 편집 내용은 사라집니다.","wiki.diskDiff.rebuildConfirm":"wiki/ 폴더를 현재 DB 상태로 덮어쓸까요? 디스크의 편집 내용은 사라집니다.","wiki.diskDiff.rebuildResult":"재생성됨: {written}개 작성, {removed}개 삭제","wiki.lint":"Lint","wiki.lint.title":"위키 건강 검사","wiki.lint.running":"검사 중…","wiki.lint.empty":"발견된 이슈가 없습니다.","wiki.lint.close":"닫기","wiki.lint.rerun":"다시 검사","wiki.lint.mergeConfirm":'"{absorb}"을(를) "{keep}"에 병합할까요? 본문 결합, 태그 합집합, 엣지/위키링크 재배선 후 "{absorb}"이 삭제됩니다.',"wiki.lint.action.mergeKeep":'"{keep}" 유지, "{absorb}" 병합',"wiki.lint.action.delete":"삭제","wiki.lint.action.deleteTitle":'"{title}" 삭제',"wiki.lint.action.link":"연결","wiki.lint.action.linkTo":"연결 대상…","wiki.sourceAutoLabel":"자동","wiki.viewRaw":"Raw 원본 보기","wiki.loading":"불러오는 중…","wiki.close":"닫기","wiki.subTab.wiki":"위키","wiki.subTab.sources":"원본","wiki.subTab.activity":"활동","wiki.activity.empty":"아직 활동 없음","wiki.activity.emptyHint":"Ingest, Lint, Retrieve, Merge 이벤트가 여기 기록됩니다.","wiki.activity.refresh":"새로고침","wiki.activity.filter.all":"전체","wiki.activity.filter.ingest":"인제스트","wiki.activity.filter.lint":"Lint","wiki.activity.filter.retrieve":"검색","wiki.activity.filter.merge":"병합","wiki.sources.empty":"사이드바에서 raw 파일을 선택하세요.","wiki.sources.noFiles":"아직 raw 파일이 없습니다. Ingest를 실행하세요.","wiki.rawFile.derivedTitle":"이 원본에서 파생된 항목","wiki.rawFile.noDerived":"이 원본에서 파생된 항목 없음","wiki.rawFile.openSiblings":"이 원본에서 파생된 {n}개 항목 보기","wiki.rawFile.openExternal":"기본 앱으로 열기","wiki.rawFile.revealInFolder":"폴더에서 보기","wiki.rawFile.delete":"원본 삭제","wiki.rawFile.deleteConfirm":"이 원본 파일을 삭제할까요? 위키 노드는 유지됩니다.","wiki.rawFile.deleteConfirmDerived":"이 원본 파일을 삭제하고 파생된 {n}개 위키 노드의 source 링크를 끊을까요? 노드 자체는 유지됩니다.","planner.title":"플래너","planner.add":"새 항목","planner.view.pages":"페이지","planner.view.all":"전체 보기","planner.nav.calendar":"달력","planner.nav.list":"목록","web.urlPlaceholder":"https://…","web.go":"이동","web.desktopOnly":"웹 페이지 임베드는 데스크톱 앱에서만 표시됩니다.","web.openExternal":"브라우저에서 열기","web.fullscreen":"전체 화면","web.exitFullscreen":"전체 화면 종료","web.newTab":"새 탭","web.closeTab":"탭 닫기","web.emptyTab":"위 주소창에 URL을 입력하세요","web.hideBar":"주소창 숨기기","web.showBar":"주소창 표시","web.back":"뒤로","web.addFavorite":"즐겨찾기 추가","web.removeFavorite":"즐겨찾기 삭제","planner.block.tasklist":"할일 목록","planner.block.calendar":"캘린더","planner.block.addTask":"작업 추가…","planner.pages.newTemplate":"새 페이지: 템플릿 선택","planner.tpl.blank":"빈 페이지","planner.tpl.blank.desc":"빈 페이지에서 시작","planner.tpl.meeting":"회의 노트","planner.tpl.meeting.desc":"날짜·참석자·안건·액션 아이템","planner.tpl.project":"프로젝트 플랜","planner.tpl.project.desc":"개요·마일스톤·일정","planner.tpl.weekly":"위클리 플래너","planner.tpl.weekly.desc":"주간 목표·할 일·캘린더","planner.pages.new":"새 페이지","planner.pages.untitled":"제목 없음","planner.pages.empty":"페이지가 없습니다","planner.pages.emptyHint":"메모·문서·체크리스트를 자유롭게 작성할 페이지를 만드세요.","planner.pages.deleteConfirm":"이 페이지를 삭제할까요? 되돌릴 수 없습니다.","planner.pages.saving":"저장 중…","planner.pages.saved":"저장됨","planner.empty":"플래너 항목이 없습니다","planner.emptyHint":"아이디어, 작업, 계획을 플래너에 추가하세요.","planner.filterTag":"모든 태그","planner.filterStatus":"모든 상태","planner.col.title":"제목","planner.col.tags":"태그","planner.col.dueDate":"마감일","planner.col.status":"상태","planner.col.actions":"","planner.edit":"수정","planner.delete":"삭제","planner.deleteConfirm":"이 플래너 항목을 삭제하시겠습니까?","planner.convertToTask":"자동 작업으로 변환","planner.convertToSchedule":"루틴으로 변환","planner.convertToTerminal":"터미널로 보내기","planner.movedToTodo":"자동 작업으로 이동됨","planner.movedToSchedule":"루틴으로 이동됨","planner.movedToSession":"터미널로 이동됨","planner.fromDiscussion":"토론에서","planner.noDueDate":"—","planner.export":"내보내기","planner.exportTooltip":"플래너 항목을 Markdown 파일로 내보내기","planner.exportError":"내보내기 실패","planner.import":"가져오기","planner.importTooltip":"Markdown 파일에서 플래너 항목 가져오기","planner.importSuccess":"{items}개 항목과 {tags}개 태그를 가져왔습니다.","planner.importError":"가져오기 실패","planner.importInvalidMarkdown":"파일이 비어 있거나 유효한 Markdown이 아닙니다","planner.importNoImages":"참고: 이미지는 내보낸 파일에 포함되지 않습니다.","planner.dropHint":"여기에 Markdown 파일을 놓아 가져오기","planner.dropHintSub":".md 또는 .markdown","planner.dropInvalidFile":"Markdown 파일(.md / .markdown)만 가져올 수 있습니다","plannerForm.titlePlaceholder":"예: 릴리스 노트 초안 작성","plannerForm.descPlaceholder":"세부 내용, 링크, 완료 조건…","plannerForm.tags":"태그","plannerForm.tagsPlaceholder":"태그를 입력하고 Enter를 누르세요","plannerForm.dueDate":"마감일","plannerForm.priority":"우선순위","plannerForm.priorityLow":"낮음","plannerForm.priorityNormal":"보통","plannerForm.priorityHigh":"높음","plannerForm.priorityCritical":"긴급","plannerForm.status":"상태","plannerForm.addImage":"이미지 추가","plannerForm.pasteHint":"Ctrl+V로 이미지 붙여넣기","plannerForm.images":"이미지","plannerForm.cancel":"취소","plannerForm.save":"저장","plannerStatus.pending":"대기","plannerStatus.in_progress":"진행 중","plannerStatus.done":"완료","plannerStatus.moved":"이동됨","plannerConvert.toTask":"자동 작업으로 변환","plannerConvert.toSchedule":"루틴으로 변환","plannerConvert.toTerminal":"터미널로 보내기","plannerConvert.useWorktree":"git worktree 사용","plannerConvert.cliTool":"CLI 도구","plannerConvert.maxTurns":"최대 턴","plannerConvert.scheduleType":"루틴 유형","plannerConvert.recurring":"반복","plannerConvert.once":"일회성","plannerConvert.cronExpression":"Cron 표현식","plannerConvert.runAt":"실행 시각","plannerConvert.cancel":"취소","plannerConvert.convert":"변환","plannerTag.selectOrCreate":"옵션 선택 또는 생성","plannerTag.delete":"삭제","plannerTag.deleteConfirm":"이 태그를 모든 항목에서 제거하시겠습니까?","plannerTag.color":"색","plannerTag.rename":"이름 변경","plannerTag.color.default":"기본","plannerTag.color.gray":"회색","plannerTag.color.brown":"갈색","plannerTag.color.orange":"주황색","plannerTag.color.yellow":"노란색","plannerTag.color.green":"초록색","plannerTag.color.blue":"파란색","plannerTag.color.purple":"보라색","plannerTag.color.pink":"분홍색","plannerTag.color.red":"빨간색","session.new":"새 터미널","session.windowState.floating":"열림","session.windowState.minimized":"최소화","session.windowState.popped":"별도 창","session.recallToMain":"중앙으로 불러오기","session.popout.minimize":"최소화","session.restoreWindow":"창 복원","session.focusWindow":"창으로 이동","session.maximize":"터미널 최대화","session.restoreSize":"터미널 크기 복원","session.maximizeHint":"제목 표시줄을 두 번 클릭해 전환","session.layout.single":"1분할","session.layout.columns":"2분할","session.layout.grid":"2 × 2 분할","session.openWindow":"터미널 열기","session.dock.poppedHint":"별도 창입니다. 클릭하면 앞으로 가져옵니다.","session.title":"터미널 제목","session.description":"초기 프롬프트 (선택)","session.start":"시작","session.stop":"중지","session.resume":"이어서 시작","session.resumeHint":"이 세션의 직전 Claude 대화에 이어서 시작합니다","session.delete":"삭제","session.edit":"편집","session.editDisabledRunning":"실행 중에는 편집할 수 없습니다","session.save":"저장","session.saving":"저장 중…","session.empty":"터미널이 없습니다","session.emptyHint":"대화형 AI 터미널을 시작하세요.","session.create":"터미널 생성","session.cliTool":"CLI 도구","session.cliNotInstalled":" (설치 안 됨)","session.worktree":"워크트리 사용 (격리된 브랜치)","session.cleanup":"워크트리 삭제","session.startInWindow":"시작","session.starting":"시작하는 중…","session.starting.typeAhead":"미리 입력한 내용은 터미널 준비가 끝나면 그대로 전송됩니다","session.stopping":"중지하는 중…","session.startFailed":"시작 실패","session.confirmStop":"이 터미널을 종료할까요? 진행 중인 작업이 종료됩니다.","session.popout.blocked":"팝업이 차단되었습니다. 팝아웃을 쓰려면 이 사이트의 팝업을 허용하세요.","session.diff.capture":"스냅샷 캡처","session.diff.pageStart":"시작부터","session.minimize":"최소화","session.fontDecrease":"글자 작게","session.refresh":"새로고침","session.refresh.hint":"터미널 화면만 다시 그립니다 (PTY는 그대로 유지)","session.initialPrompt.ready":"보낼 준비된 초기 프롬프트","session.initialPrompt.preview":"미리보기","session.initialPrompt.hidePreview":"숨기기","session.initialPrompt.send":"보내기","session.initialPrompt.skip":"건너뛰기","session.initialPrompt.loading":"불러오는 중…","session.initialPrompt.blocked":"타이핑하려면 보내기 또는 건너뛰기를 먼저 눌러주세요. 그 전엔 입력이 무시됩니다.","session.fontIncrease":"글자 크게","group.closeTab":"탭 닫기","group.newTab":"쉘 탭 새로 열기","analytics.title":"실행 통계","analytics.loading":"통계 로딩 중…","analytics.noData":"데이터 없음","analytics.totalTasks":"총 작업","analytics.successRate":"성공률","analytics.totalCost":"총 비용","analytics.totalTokens":"총 토큰","analytics.avgPerTask":"작업당 평균","analytics.byStatus":"상태별","analytics.byCliTool":"CLI 도구별","analytics.dailyActivity":"일별 활동","analytics.dailyCost":"일별 비용","analytics.costBreakdown":"비용 요약","analytics.tasks":"작업","analytics.period.7d":"7일","analytics.period.30d":"30일","analytics.period.90d":"90일","analytics.period.all":"전체","analytics.clear":"초기화","analytics.clearConfirm":"통계를 초기화할까요? 작업은 삭제되지 않으며, 지금 이후에 생성된 작업만 집계됩니다.","discussions.title":"에이전트 토론","discussions.add":"새 토론","discussions.empty":"아직 토론이 없습니다","discussions.emptyHint":"에이전트들이 피쳐를 함께 토론하도록 새 토론을 만드세요.","discussions.round":"라운드","discussions.maxRounds":"최대 라운드","discussions.agents":"에이전트","discussions.speaking":"발언 중…","discussions.inject":"메시지 전송","discussions.skipTurn":"턴 건너뛰기","discussions.implement":"구현 시작","discussions.implementHint":"토론된 기능을 구현할 에이전트를 선택하세요.","discussions.selectAgent":"구현 에이전트 선택","discussions.toPlanner":"Planner로 보내기","discussions.extractTitle":"액션 아이템 추출","discussions.extractHint":"AI가 토론에서 추출한 Planner 항목입니다. 저장 전에 편집하거나 제외하거나 우선순위를 조정하세요.","discussions.extractLoading":"토론에서 액션 아이템을 추출하는 중…","discussions.extractLoadingHint":"최대 2분 정도 걸릴 수 있습니다. 추출이 끝날 때까지 창이 닫히지 않습니다.","discussions.extractEmpty":"추출할 액션 아이템이 없습니다. 다른 토론을 시도하거나 합의된 내용을 보강하세요.","discussions.extractConfirm":"Planner에 저장","discussions.extractSaving":"저장 중…","discussions.priorityLow":"낮음","discussions.priorityMedium":"보통","discussions.priorityHigh":"높음","discussions.priorityUrgent":"긴급","discussions.notFound":"토론을 찾을 수 없습니다","discussions.back":"토론 목록으로","discussions.userMessage":"메시지를 입력하세요…","discussions.implementation":"구현","discussions.resume":"재개","discussions.retry":"다시 실행","discussions.failureTitle":"토론 실패","discussions.noErrorLogs":"에러 상세 정보가 없습니다","discussions.pause":"일시 중지","discussions.waiting":"대기 중…","discussions.roundExplain":"에이전트 전원이 한 번씩 발언하는 단위입니다.","discussions.autoImplement":"토론 후 자동 구현","discussions.autoImplementHint":"모든 라운드 완료 후 자동으로 구현을 시작합니다.","discussions.collapse":"접기","discussions.expand":"펼치기","discussions.collapseAll":"전체 접기","discussions.expandAll":"전체 펼치기","status.skipped":"건너뜀","status.paused":"일시 중지","agents.title":"에이전트 페르소나","agents.add":"에이전트 추가","agents.name":"이름","agents.role":"역할","agents.systemPrompt":"시스템 프롬프트","agents.cliTool":"CLI 도구","agents.color":"색상","agents.empty":"에이전트가 없습니다. 토론을 시작하려면 에이전트 페르소나를 만드세요.","agents.manage":"에이전트 관리","agents.presets":"프리셋 템플릿","agents.roles.architect":"아키텍트","agents.roles.developer":"개발자","agents.roles.reviewer":"리뷰어","agents.roles.pm":"PM","agents.roles.tester":"테스터","agents.roles.custom":"사용자 정의","agents.canImplement":"토론 중 구현 수행","agents.canImplementHelp":"이 에이전트의 턴에서 발언뿐 아니라 실제 코드 작성·커밋까지 수행합니다. 개발자 역할 에이전트가 아이디어를 즉석에서 시연하도록 할 때 유용합니다.","agents.canImplementBadge":"구현자","git.ahead":"앞섬","git.behind":"뒤처짐","git.staged":"스테이징","git.unstaged":"변경됨","git.noChanges":"작업 트리 깨끗","git.refresh":"새로고침","git.files":"파일","git.commitHistory":"커밋 히스토리","git.branches":"브랜치","git.remotes":"원격","git.tags":"태그","git.stashes":"스태시","git.noCommits":"아직 커밋이 없습니다","git.loadMore":"더 불러오는 중…","git.author":"작성자","git.hash":"해시","git.graph":"그래프","git.description":"설명","git.date":"날짜","git.commit":"커밋","git.pull":"Pull","git.push":"Push","git.pushDialog.targetRemote":"다음 저장소에 푸시","git.pushDialog.branchesHeader":"푸시할 브랜치","git.pushDialog.colPush":"푸시?","git.pushDialog.colLocal":"로컬 브랜치","git.pushDialog.colRemote":"리모트 브랜치","git.pushDialog.colTracking":"추적?","git.pushDialog.selectAll":"모두 선택","git.pushDialog.allTags":"모든 태그 푸시","git.pushDialog.force":"강제 푸시","git.pushDialog.forceHint":"--force-with-lease 사용 (마지막 fetch 이후 원격이 진행되었으면 거부).","git.pushDialog.submit":"Push","git.pushDialog.cancel":"취소","git.pushDialog.pushing":"푸시 중…","git.pushDialog.loading":"불러오는 중…","git.pushDialog.errorRequireBranch":"푸시할 브랜치를 하나 이상 선택하세요.","git.pushDialog.noLocalBranches":"로컬 브랜치가 없습니다.","git.pushDialog.newBranch":"신규","git.pushDialog.customRemote":"직접 입력…","git.fetch":"패치","git.branch":"브랜치","git.merge":"병합","git.conflicts":"충돌","git.conflictMergeInProgress":"병합 진행 중","git.conflictRebaseInProgress":"리베이스 진행 중","git.conflictBanner":"충돌 파일 {n}개. 파일별로 해결한 뒤 계속을 누르세요.","git.conflictAllResolved":"충돌이 모두 해결되었습니다. 계속을 누르세요.","git.acceptOurs":"내 변경 사용","git.acceptTheirs":"상대 변경 사용","git.cr.ours":"내 변경 (HEAD)","git.cr.theirs":"상대 변경 (incoming)","git.cr.both":"둘 다","git.cr.manual":"직접 편집","git.cr.guided":"가이드","git.cr.save":"해결 내용 저장","git.cr.unresolved":"미해결 {n}개","git.cr.allResolved":"모두 해결됨","git.cr.markersRemain":"아직 충돌 마커가 남아 있습니다","git.cr.loadFailed":"충돌 파일을 불러오지 못했습니다","git.cr.noConflicts":"이 파일에는 충돌 구역이 없습니다","git.conflictContinue":"계속","git.conflictAbort":"중단","git.confirmConflictAbort":"중단하고 이전 상태로 되돌릴까요?","git.viewConflicts":"충돌 보기","git.stash":"스태시","git.discard":"폐기","git.tag":"태그","git.untracked":"추적 안 됨","git.fileStatus":"파일 상태","git.stageAll":"모두 스테이지","git.unstageAll":"모두 언스테이지","git.stage":"스테이지","git.unstage":"언스테이지","git.commitMessage":"커밋 메시지…","git.branchName":"브랜치 이름…","git.tagName":"태그 이름…","git.tagMessage":"태그 메시지 (선택)…","git.stashMessage":"스태시 메시지 (선택)…","git.selectBranch":"브랜치 선택…","git.discardAll":"모두 폐기","git.confirmDiscard":"모든 변경 사항을 폐기하시겠습니까? 되돌릴 수 없습니다.","git.confirmDiscardFile":"이 파일의 변경 사항을 폐기하시겠습니까?","git.newBranch":"새 브랜치","git.deleteBranch":"브랜치 삭제","git.stashPop":"꺼내기","git.noStashes":"스태시 없음","git.actions":"작업","git.close":"닫기","git.create":"생성","git.delete":"삭제","git.modified":"수정됨","git.added":"추가됨","git.deleted":"삭제됨","git.renamed":"이름변경","git.copied":"복사됨","git.checkout":"체크아웃","git.mergeInto":"현재 브랜치로 병합","git.rebaseOnto":"현재 변경사항을 재배치","git.copySha":"SHA 복사","git.createBranchHere":"여기서 브랜치 생성…","git.createTagHere":"여기에 태그 생성…","git.cherryPick":"현재 브랜치로 Cherry-pick","git.revertCommit":"커밋 되돌리기 (Revert)","git.resetHere":"현재 브랜치를 이 커밋으로 초기화","git.confirmRevert":"커밋 {hash}을(를) 되돌릴까요? 변경을 취소하는 새 커밋이 생성됩니다.","git.confirmCherryPick":"{hash}을(를) 현재 브랜치에 cherry-pick할까요?","git.confirmReset":"현재 브랜치를 {hash}({mode})로 초기화할까요?","git.confirmResetHard":"{hash}로 hard 초기화할까요? 이 지점 이후의 커밋과 커밋되지 않은 변경이 영구히 사라집니다.","git.promptBranchName":"새 브랜치 이름 ({hash} 기준):","git.promptTagName":"새 태그 이름 ({hash} 위치):","git.renameBranch":"브랜치 이름 변경","git.confirmDelete":"브랜치 {name}을(를) 삭제하시겠습니까?","git.newBranchName":"새 브랜치 이름…","git.rename":"이름 변경","git.checkoutRemote":"로컬 브랜치로 체크아웃","git.commitDetail":"커밋 상세","git.changedFiles":"변경된 파일","git.selectFileToViewDiff":"파일을 선택하면 차이를 볼 수 있습니다","git.noFilesChanged":"변경된 파일 없음","git.loadingFiles":"파일 불러오는 중…","git.loadingDiff":"차이 불러오는 중…","git.worktrees":"워크트리","git.cleanupWorktree":"정리","git.confirmCleanupWorktree":"워크트리와 브랜치 {name}을(를) 삭제하시겠습니까?","git.deleteWorktreeAndBranch":"브랜치 + 워크트리 삭제","git.confirmDeleteWorktreeAndBranch":"브랜치 {name}과(와) 연결된 워크트리를 함께 삭제할까요?","git.confirmForceDelete":"브랜치 {name}은(는) 어디에도 머지되지 않았습니다. 그래도 강제로 삭제할까요? 머지되지 않은 커밋은 사라집니다.","git.workspace":"워크스페이스","git.viewFileStatus":"파일 상태","git.viewHistory":"History","git.search":"Search","git.searchPlaceholder":"검색","git.stagedFiles":"스테이지에 올라간 파일","git.unstagedFiles":"스테이지에 올라가지 않은 파일","git.untrackedFiles":"추적 안 되는 파일","git.unstageAllShort":"모두 스테이지에서 내리기","git.unstageSelectedShort":"선택 내용 스테이지에서 내리기","git.stageAllShort":"모두 스테이지에 올리기","git.stageSelectedShort":"선택 내용 스테이지에 올리기","git.addToGitignore":".gitignore에 추가","git.commitOptions":"커밋 옵션","git.pushImmediately":"커밋 후 {remote}에 즉시 푸시","git.amendLastCommit":"마지막 커밋 정정","git.commitButton":"커밋","git.selectFileForDiff":"파일을 선택하면 차이를 볼 수 있습니다","git.binaryFile":"바이너리 파일 (미리보기 불가)","git.untrackedNewFile":"(새 파일)","git.workingTreeClean":"커밋할 변경사항이 없습니다.","git.statusTarget":"체크아웃","git.mainCheckout":"메인 체크아웃","lang.toggle":"EN","theme.light":"라이트","theme.dark":"다크","notification.taskCompleted":"작업 완료","notification.taskFailed":"작업 실패","notification.discussionCompleted":"토론 완료","notification.discussionFailed":"토론 실패","notification.toggle":"알림 토글","notification.blocked":"브라우저에서 알림이 차단되었습니다","notification.sessionBlocked":"세션이 입력을 기다립니다","notification.sessionDone":"세션 작업이 끝났습니다"}},Sv=j.createContext(null);function Hw({children:s}){const[h,w]=j.useState(()=>{const A=localStorage.getItem("clitrigger-lang");return A==="ko"||A==="en"?A:"ko"}),S=j.useCallback(()=>{w(A=>{const r=A==="en"?"ko":"en";return localStorage.setItem("clitrigger-lang",r),r})},[]),M=j.useMemo(()=>Nw(),[]),O=j.useCallback(A=>zw[h][A]??M[h][A]??A,[h,M]);return v.jsx(Sv.Provider,{value:{lang:h,toggleLang:S,t:O},children:s})}function Tt(){const s=j.useContext(Sv);if(!s)throw new Error("useI18n must be used within I18nProvider");return s}const fi=({className:s="",variant:h="text",width:w,height:S,count:M=1})=>{const O="animate-pulse bg-warm-200",A={text:"rounded-md h-3 mb-2 last:mb-0",circular:"rounded-full",rectangular:"rounded-none",rounded:"rounded-xl"},r={width:w,height:S},u=Array.from({length:M});return v.jsx(v.Fragment,{children:u.map((d,g)=>v.jsx("div",{className:`${O} ${A[h]} ${s}`,style:r},g))})};/**
|
|
68
|
-
* @license lucide-react v1.8.0 - ISC
|
|
69
|
-
*
|
|
70
|
-
* This source code is licensed under the ISC license.
|
|
71
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const xv=(...s)=>s.filter((h,w,S)=>!!h&&h.trim()!==""&&S.indexOf(h)===w).join(" ").trim();/**
|
|
73
|
-
* @license lucide-react v1.8.0 - ISC
|
|
74
|
-
*
|
|
75
|
-
* This source code is licensed under the ISC license.
|
|
76
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const Pw=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
78
|
-
* @license lucide-react v1.8.0 - ISC
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the ISC license.
|
|
81
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const Iw=s=>s.replace(/^([A-Z])|[\s-_]+(\w)/g,(h,w,S)=>S?S.toUpperCase():w.toLowerCase());/**
|
|
83
|
-
* @license lucide-react v1.8.0 - ISC
|
|
84
|
-
*
|
|
85
|
-
* This source code is licensed under the ISC license.
|
|
86
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const tg=s=>{const h=Iw(s);return h.charAt(0).toUpperCase()+h.slice(1)};/**
|
|
88
|
-
* @license lucide-react v1.8.0 - ISC
|
|
89
|
-
*
|
|
90
|
-
* This source code is licensed under the ISC license.
|
|
91
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/var Gu={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
93
|
-
* @license lucide-react v1.8.0 - ISC
|
|
94
|
-
*
|
|
95
|
-
* This source code is licensed under the ISC license.
|
|
96
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const Fw=s=>{for(const h in s)if(h.startsWith("aria-")||h==="role"||h==="title")return!0;return!1},Uw=j.createContext({}),$w=()=>j.useContext(Uw),Ww=j.forwardRef(({color:s,size:h,strokeWidth:w,absoluteStrokeWidth:S,className:M="",children:O,iconNode:A,...r},u)=>{const{size:d=24,strokeWidth:g=2,absoluteStrokeWidth:l=!1,color:m="currentColor",className:b=""}=$w()??{},C=S??l?Number(w??g)*24/Number(h??d):w??g;return j.createElement("svg",{ref:u,...Gu,width:h??d??Gu.width,height:h??d??Gu.height,stroke:s??m,strokeWidth:C,className:xv("lucide",b,M),...!O&&!Fw(r)&&{"aria-hidden":"true"},...r},[...A.map(([p,a])=>j.createElement(p,a)),...Array.isArray(O)?O:[O]])});/**
|
|
98
|
-
* @license lucide-react v1.8.0 - ISC
|
|
99
|
-
*
|
|
100
|
-
* This source code is licensed under the ISC license.
|
|
101
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const Ve=(s,h)=>{const w=j.forwardRef(({className:S,...M},O)=>j.createElement(Ww,{ref:O,iconNode:h,className:xv(`lucide-${Pw(tg(s))}`,`lucide-${s}`,S),...M}));return w.displayName=tg(s),w};/**
|
|
103
|
-
* @license lucide-react v1.8.0 - ISC
|
|
104
|
-
*
|
|
105
|
-
* This source code is licensed under the ISC license.
|
|
106
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const qw=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]],Gw=Ve("bell-off",qw);/**
|
|
108
|
-
* @license lucide-react v1.8.0 - ISC
|
|
109
|
-
*
|
|
110
|
-
* This source code is licensed under the ISC license.
|
|
111
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const Yw=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Kw=Ve("bell",Yw);/**
|
|
113
|
-
* @license lucide-react v1.8.0 - ISC
|
|
114
|
-
*
|
|
115
|
-
* This source code is licensed under the ISC license.
|
|
116
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const Xw=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],Vw=Ve("bug",Xw);/**
|
|
118
|
-
* @license lucide-react v1.8.0 - ISC
|
|
119
|
-
*
|
|
120
|
-
* This source code is licensed under the ISC license.
|
|
121
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const Jw=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],ig=Ve("calendar-days",Jw);/**
|
|
123
|
-
* @license lucide-react v1.8.0 - ISC
|
|
124
|
-
*
|
|
125
|
-
* This source code is licensed under the ISC license.
|
|
126
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const Qw=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Zw=Ve("camera",Qw);/**
|
|
128
|
-
* @license lucide-react v1.8.0 - ISC
|
|
129
|
-
*
|
|
130
|
-
* This source code is licensed under the ISC license.
|
|
131
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const e1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ra=Ve("check",e1);/**
|
|
133
|
-
* @license lucide-react v1.8.0 - ISC
|
|
134
|
-
*
|
|
135
|
-
* This source code is licensed under the ISC license.
|
|
136
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const t1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Dh=Ve("chevron-down",t1);/**
|
|
138
|
-
* @license lucide-react v1.8.0 - ISC
|
|
139
|
-
*
|
|
140
|
-
* This source code is licensed under the ISC license.
|
|
141
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const i1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],s1=Ve("chevron-right",i1);/**
|
|
143
|
-
* @license lucide-react v1.8.0 - ISC
|
|
144
|
-
*
|
|
145
|
-
* This source code is licensed under the ISC license.
|
|
146
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const n1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Cv=Ve("chevron-up",n1);/**
|
|
148
|
-
* @license lucide-react v1.8.0 - ISC
|
|
149
|
-
*
|
|
150
|
-
* This source code is licensed under the ISC license.
|
|
151
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const r1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],kv=Ve("circle-alert",r1);/**
|
|
153
|
-
* @license lucide-react v1.8.0 - ISC
|
|
154
|
-
*
|
|
155
|
-
* This source code is licensed under the ISC license.
|
|
156
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const a1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],o1=Ve("circle-check-big",a1);/**
|
|
158
|
-
* @license lucide-react v1.8.0 - ISC
|
|
159
|
-
*
|
|
160
|
-
* This source code is licensed under the ISC license.
|
|
161
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const l1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],c1=Ve("circle-x",l1);/**
|
|
163
|
-
* @license lucide-react v1.8.0 - ISC
|
|
164
|
-
*
|
|
165
|
-
* This source code is licensed under the ISC license.
|
|
166
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const u1=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],h1=Ve("clipboard",u1);/**
|
|
168
|
-
* @license lucide-react v1.8.0 - ISC
|
|
169
|
-
*
|
|
170
|
-
* This source code is licensed under the ISC license.
|
|
171
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const d1=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],Ev=Ve("cloud",d1);/**
|
|
173
|
-
* @license lucide-react v1.8.0 - ISC
|
|
174
|
-
*
|
|
175
|
-
* This source code is licensed under the ISC license.
|
|
176
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const f1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],Lv=Ve("columns-2",f1);/**
|
|
178
|
-
* @license lucide-react v1.8.0 - ISC
|
|
179
|
-
*
|
|
180
|
-
* This source code is licensed under the ISC license.
|
|
181
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/const p1=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],m1=Ve("command",p1);/**
|
|
183
|
-
* @license lucide-react v1.8.0 - ISC
|
|
184
|
-
*
|
|
185
|
-
* This source code is licensed under the ISC license.
|
|
186
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
-
*/const g1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],v1=Ve("copy",g1);/**
|
|
188
|
-
* @license lucide-react v1.8.0 - ISC
|
|
189
|
-
*
|
|
190
|
-
* This source code is licensed under the ISC license.
|
|
191
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
-
*/const _1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],_r=Ve("external-link",_1);/**
|
|
193
|
-
* @license lucide-react v1.8.0 - ISC
|
|
194
|
-
*
|
|
195
|
-
* This source code is licensed under the ISC license.
|
|
196
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
-
*/const b1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],Rv=Ve("file-code",b1);/**
|
|
198
|
-
* @license lucide-react v1.8.0 - ISC
|
|
199
|
-
*
|
|
200
|
-
* This source code is licensed under the ISC license.
|
|
201
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
-
*/const y1=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Dv=Ve("folder-open",y1);/**
|
|
203
|
-
* @license lucide-react v1.8.0 - ISC
|
|
204
|
-
*
|
|
205
|
-
* This source code is licensed under the ISC license.
|
|
206
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
-
*/const w1=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],S1=Ve("git-branch",w1);/**
|
|
208
|
-
* @license lucide-react v1.8.0 - ISC
|
|
209
|
-
*
|
|
210
|
-
* This source code is licensed under the ISC license.
|
|
211
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
-
*/const x1=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]],C1=Ve("git-compare",x1);/**
|
|
213
|
-
* @license lucide-react v1.8.0 - ISC
|
|
214
|
-
*
|
|
215
|
-
* This source code is licensed under the ISC license.
|
|
216
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
-
*/const k1=[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 12h18",key:"1i2n21"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]],Tv=Ve("grid-2x2",k1);/**
|
|
218
|
-
* @license lucide-react v1.8.0 - ISC
|
|
219
|
-
*
|
|
220
|
-
* This source code is licensed under the ISC license.
|
|
221
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
222
|
-
*/const E1=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],L1=Ve("grip-vertical",E1);/**
|
|
223
|
-
* @license lucide-react v1.8.0 - ISC
|
|
224
|
-
*
|
|
225
|
-
* This source code is licensed under the ISC license.
|
|
226
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
227
|
-
*/const R1=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["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",key:"oot6mr"}]],sg=Ve("inbox",R1);/**
|
|
228
|
-
* @license lucide-react v1.8.0 - ISC
|
|
229
|
-
*
|
|
230
|
-
* This source code is licensed under the ISC license.
|
|
231
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
-
*/const D1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],T1=Ve("info",D1);/**
|
|
233
|
-
* @license lucide-react v1.8.0 - ISC
|
|
234
|
-
*
|
|
235
|
-
* This source code is licensed under the ISC license.
|
|
236
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
-
*/const M1=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],A1=Ve("key-round",M1);/**
|
|
238
|
-
* @license lucide-react v1.8.0 - ISC
|
|
239
|
-
*
|
|
240
|
-
* This source code is licensed under the ISC license.
|
|
241
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
-
*/const j1=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],ng=Ve("layout-dashboard",j1);/**
|
|
243
|
-
* @license lucide-react v1.8.0 - ISC
|
|
244
|
-
*
|
|
245
|
-
* This source code is licensed under the ISC license.
|
|
246
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
247
|
-
*/const O1=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Mv=Ve("link",O1);/**
|
|
248
|
-
* @license lucide-react v1.8.0 - ISC
|
|
249
|
-
*
|
|
250
|
-
* This source code is licensed under the ISC license.
|
|
251
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
252
|
-
*/const B1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],lh=Ve("loader-circle",B1);/**
|
|
253
|
-
* @license lucide-react v1.8.0 - ISC
|
|
254
|
-
*
|
|
255
|
-
* This source code is licensed under the ISC license.
|
|
256
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
257
|
-
*/const N1=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],z1=Ve("log-out",N1);/**
|
|
258
|
-
* @license lucide-react v1.8.0 - ISC
|
|
259
|
-
*
|
|
260
|
-
* This source code is licensed under the ISC license.
|
|
261
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
262
|
-
*/const H1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],El=Ve("maximize-2",H1);/**
|
|
263
|
-
* @license lucide-react v1.8.0 - ISC
|
|
264
|
-
*
|
|
265
|
-
* This source code is licensed under the ISC license.
|
|
266
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
267
|
-
*/const P1=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],I1=Ve("menu",P1);/**
|
|
268
|
-
* @license lucide-react v1.8.0 - ISC
|
|
269
|
-
*
|
|
270
|
-
* This source code is licensed under the ISC license.
|
|
271
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
-
*/const F1=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],Th=Ve("minimize-2",F1);/**
|
|
273
|
-
* @license lucide-react v1.8.0 - ISC
|
|
274
|
-
*
|
|
275
|
-
* This source code is licensed under the ISC license.
|
|
276
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
-
*/const U1=[["path",{d:"M5 12h14",key:"1ays0h"}]],Mh=Ve("minus",U1);/**
|
|
278
|
-
* @license lucide-react v1.8.0 - ISC
|
|
279
|
-
*
|
|
280
|
-
* This source code is licensed under the ISC license.
|
|
281
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
282
|
-
*/const $1=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],rg=Ve("moon",$1);/**
|
|
283
|
-
* @license lucide-react v1.8.0 - ISC
|
|
284
|
-
*
|
|
285
|
-
* This source code is licensed under the ISC license.
|
|
286
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
287
|
-
*/const W1=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],q1=Ve("palette",W1);/**
|
|
288
|
-
* @license lucide-react v1.8.0 - ISC
|
|
289
|
-
*
|
|
290
|
-
* This source code is licensed under the ISC license.
|
|
291
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
292
|
-
*/const G1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Y1=Ve("panel-left-close",G1);/**
|
|
293
|
-
* @license lucide-react v1.8.0 - ISC
|
|
294
|
-
*
|
|
295
|
-
* This source code is licensed under the ISC license.
|
|
296
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
297
|
-
*/const K1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],X1=Ve("panel-left-open",K1);/**
|
|
298
|
-
* @license lucide-react v1.8.0 - ISC
|
|
299
|
-
*
|
|
300
|
-
* This source code is licensed under the ISC license.
|
|
301
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
302
|
-
*/const V1=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],J1=Ve("pen",V1);/**
|
|
303
|
-
* @license lucide-react v1.8.0 - ISC
|
|
304
|
-
*
|
|
305
|
-
* This source code is licensed under the ISC license.
|
|
306
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
307
|
-
*/const Q1=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],ch=Ve("pencil",Q1);/**
|
|
308
|
-
* @license lucide-react v1.8.0 - ISC
|
|
309
|
-
*
|
|
310
|
-
* This source code is licensed under the ISC license.
|
|
311
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
312
|
-
*/const Z1=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],eS=Ve("play",Z1);/**
|
|
313
|
-
* @license lucide-react v1.8.0 - ISC
|
|
314
|
-
*
|
|
315
|
-
* This source code is licensed under the ISC license.
|
|
316
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
317
|
-
*/const tS=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],iS=Ve("plug",tS);/**
|
|
318
|
-
* @license lucide-react v1.8.0 - ISC
|
|
319
|
-
*
|
|
320
|
-
* This source code is licensed under the ISC license.
|
|
321
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
322
|
-
*/const sS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Tn=Ve("plus",sS);/**
|
|
323
|
-
* @license lucide-react v1.8.0 - ISC
|
|
324
|
-
*
|
|
325
|
-
* This source code is licensed under the ISC license.
|
|
326
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
327
|
-
*/const nS=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Av=Ve("refresh-cw",nS);/**
|
|
328
|
-
* @license lucide-react v1.8.0 - ISC
|
|
329
|
-
*
|
|
330
|
-
* This source code is licensed under the ISC license.
|
|
331
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
332
|
-
*/const rS=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],aS=Ve("rotate-cw",rS);/**
|
|
333
|
-
* @license lucide-react v1.8.0 - ISC
|
|
334
|
-
*
|
|
335
|
-
* This source code is licensed under the ISC license.
|
|
336
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
337
|
-
*/const oS=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ag=Ve("search",oS);/**
|
|
338
|
-
* @license lucide-react v1.8.0 - ISC
|
|
339
|
-
*
|
|
340
|
-
* This source code is licensed under the ISC license.
|
|
341
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
342
|
-
*/const lS=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],cS=Ve("send",lS);/**
|
|
343
|
-
* @license lucide-react v1.8.0 - ISC
|
|
344
|
-
*
|
|
345
|
-
* This source code is licensed under the ISC license.
|
|
346
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
347
|
-
*/const uS=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],og=Ve("settings",uS);/**
|
|
348
|
-
* @license lucide-react v1.8.0 - ISC
|
|
349
|
-
*
|
|
350
|
-
* This source code is licensed under the ISC license.
|
|
351
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
352
|
-
*/const hS=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],Ah=Ve("square-terminal",hS);/**
|
|
353
|
-
* @license lucide-react v1.8.0 - ISC
|
|
354
|
-
*
|
|
355
|
-
* This source code is licensed under the ISC license.
|
|
356
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
357
|
-
*/const dS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],jv=Ve("square",dS);/**
|
|
358
|
-
* @license lucide-react v1.8.0 - ISC
|
|
359
|
-
*
|
|
360
|
-
* This source code is licensed under the ISC license.
|
|
361
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
362
|
-
*/const fS=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],lg=Ve("sun",fS);/**
|
|
363
|
-
* @license lucide-react v1.8.0 - ISC
|
|
364
|
-
*
|
|
365
|
-
* This source code is licensed under the ISC license.
|
|
366
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
367
|
-
*/const pS=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Ov=Ve("terminal",pS);/**
|
|
368
|
-
* @license lucide-react v1.8.0 - ISC
|
|
369
|
-
*
|
|
370
|
-
* This source code is licensed under the ISC license.
|
|
371
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
372
|
-
*/const mS=[["path",{d:"m16 16-3 3 3 3",key:"117b85"}],["path",{d:"M3 12h14.5a1 1 0 0 1 0 7H13",key:"18xa6z"}],["path",{d:"M3 19h6",key:"1ygdsz"}],["path",{d:"M3 5h18",key:"1u36vt"}]],gS=Ve("text-wrap",mS);/**
|
|
373
|
-
* @license lucide-react v1.8.0 - ISC
|
|
374
|
-
*
|
|
375
|
-
* This source code is licensed under the ISC license.
|
|
376
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
377
|
-
*/const vS=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],cg=Ve("trash-2",vS);/**
|
|
378
|
-
* @license lucide-react v1.8.0 - ISC
|
|
379
|
-
*
|
|
380
|
-
* This source code is licensed under the ISC license.
|
|
381
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
382
|
-
*/const _S=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],bS=Ve("triangle-alert",_S);/**
|
|
383
|
-
* @license lucide-react v1.8.0 - ISC
|
|
384
|
-
*
|
|
385
|
-
* This source code is licensed under the ISC license.
|
|
386
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
387
|
-
*/const yS=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],wS=Ve("type",yS);/**
|
|
388
|
-
* @license lucide-react v1.8.0 - ISC
|
|
389
|
-
*
|
|
390
|
-
* This source code is licensed under the ISC license.
|
|
391
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
392
|
-
*/const SS=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ri=Ve("x",SS);/**
|
|
393
|
-
* @license lucide-react v1.8.0 - ISC
|
|
394
|
-
*
|
|
395
|
-
* This source code is licensed under the ISC license.
|
|
396
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
397
|
-
*/const xS=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],CS=Ve("zoom-in",xS);/**
|
|
398
|
-
* @license lucide-react v1.8.0 - ISC
|
|
399
|
-
*
|
|
400
|
-
* This source code is licensed under the ISC license.
|
|
401
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
402
|
-
*/const kS=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],ES=Ve("zoom-out",kS),ug=8;function LS({onLogin:s,onChangePassword:h}){const[w,S]=j.useState(""),[M,O]=j.useState(""),[A,r]=j.useState(""),[u,d]=j.useState(!1),[g,l]=j.useState(!1),[m,b]=j.useState(!1),[C,p]=j.useState(""),[a,c]=j.useState(!1),{t:o,toggleLang:f}=Tt(),y=u&&M.length>0&&M.length<ug,R=u&&A.length>0&&M!==A,k=u?!!w&&M.length>=ug&&M===A:!!w,D=()=>{d(L=>!L),O(""),r(""),p("")},E=async L=>{if(L.preventDefault(),!(!k||a)){p(""),c(!0);try{u?await h(w,M,A,m):await s(w,m)}catch(z){p(u&&z instanceof Error&&z.message?z.message:o("login.error"))}finally{c(!1)}}};return v.jsxs("div",{className:"min-h-screen bg-theme-bg flex items-center justify-center px-4 relative",children:[v.jsx("button",{onClick:f,className:"lang-toggle absolute top-6 right-6",children:o("lang.toggle")}),v.jsxs("div",{className:"w-full max-w-sm",children:[v.jsxs("div",{className:"text-center mb-10",children:[v.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-accent/10 mb-5",children:v.jsx(Ah,{size:32,className:"text-accent"})}),v.jsx("h1",{className:"text-2xl font-semibold text-theme-text",children:o("login.title")}),v.jsx("p",{className:"text-theme-muted text-sm mt-2",children:o("login.subtitle")})]}),v.jsx("form",{onSubmit:E,children:v.jsxs("div",{className:"card p-8",children:[v.jsx("label",{className:"block text-sm font-medium text-theme-text-secondary mb-2",children:o(u?"account.oldPassword":"login.password")}),v.jsx("input",{type:"password",value:w,onChange:L=>S(L.target.value),placeholder:"*************",className:"input-field text-base",autoComplete:"current-password",autoFocus:!0}),u&&v.jsxs(v.Fragment,{children:[v.jsx("label",{className:"block text-sm font-medium text-theme-text-secondary mb-2 mt-4",children:o("account.newPassword")}),v.jsx("input",{type:"password",value:M,onChange:L=>O(L.target.value),className:"input-field text-base",autoComplete:"new-password","aria-label":o("account.newPassword")}),y&&v.jsx("p",{className:"mt-1 text-2xs text-status-error",children:o("account.tooShort")}),v.jsx("label",{className:"block text-sm font-medium text-theme-text-secondary mb-2 mt-4",children:o("account.confirm")}),v.jsx("input",{type:"password",value:A,onChange:L=>r(L.target.value),className:"input-field text-base",autoComplete:"new-password","aria-label":o("account.confirm")}),R&&v.jsx("p",{className:"mt-1 text-2xs text-status-error",children:o("account.mismatch")})]}),C&&v.jsx("div",{className:"mt-4 py-2.5 px-4 bg-status-error/5 rounded-xl text-sm text-status-error",children:C}),v.jsxs("label",{className:"flex items-center gap-2 mt-5 text-sm text-theme-text-secondary cursor-pointer select-none",children:[v.jsx("input",{type:"checkbox",checked:m,onChange:L=>b(L.target.checked),className:"accent-accent w-4 h-4"}),o("login.rememberMe")]}),v.jsx("button",{type:"submit",disabled:!k||a,className:"btn-primary w-full mt-6 py-3",children:o(a?"login.loading":u?"login.changeSubmit":"login.submit")})]})}),v.jsxs("div",{className:"mt-4 flex items-center justify-center gap-5 text-xs",children:[v.jsx("button",{type:"button",onClick:D,className:"text-theme-muted hover:text-theme-text underline-offset-2 hover:underline",children:o(u?"login.backToLogin":"login.changePassword")}),v.jsx("button",{type:"button",onClick:()=>l(L=>!L),className:"text-theme-muted hover:text-theme-text underline-offset-2 hover:underline",children:o("login.forgot")})]}),g&&v.jsx("div",{className:"mt-3 px-4 py-3 rounded-xl text-xs text-theme-text-tertiary border leading-relaxed",children:o("login.forgotHint")}),v.jsx("div",{className:"mt-6 text-center text-xs text-theme-text-tertiary",children:o("login.footer")}),v.jsx("div",{className:"mt-4 px-2 py-3 rounded-xl text-xs text-theme-text-tertiary border leading-relaxed text-center",children:o("login.disclaimer")})]})]})}const hg=8;function RS({onSetup:s}){const[h,w]=j.useState(""),[S,M]=j.useState(""),[O,A]=j.useState(""),[r,u]=j.useState(!1),{t:d,toggleLang:g}=Tt(),l=h.length>0&&h.length<hg,m=S.length>0&&h!==S,b=h.length>=hg&&h===S&&!r,C=async p=>{if(p.preventDefault(),!!b){A(""),u(!0);try{await s(h,S)}catch(a){A(a instanceof Error&&a.message?a.message:d("setup.error"))}finally{u(!1)}}};return v.jsxs("div",{className:"min-h-screen bg-theme-bg flex items-center justify-center px-4 relative",children:[v.jsx("button",{onClick:g,className:"lang-toggle absolute top-6 right-6",children:d("lang.toggle")}),v.jsxs("div",{className:"w-full max-w-sm",children:[v.jsxs("div",{className:"text-center mb-10",children:[v.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-accent/10 mb-5",children:v.jsx(Ah,{size:32,className:"text-accent"})}),v.jsx("h1",{className:"text-2xl font-semibold text-theme-text",children:d("setup.title")}),v.jsx("p",{className:"text-theme-muted text-sm mt-2",children:d("setup.subtitle")})]}),v.jsx("form",{onSubmit:C,children:v.jsxs("div",{className:"card p-8",children:[v.jsx("label",{className:"block text-sm font-medium text-theme-text-secondary mb-2",children:d("setup.password")}),v.jsx("input",{type:"password",value:h,onChange:p=>w(p.target.value),placeholder:"*************",className:"input-field text-base",autoFocus:!0}),l&&v.jsx("p",{className:"mt-1 text-2xs text-status-error",children:d("setup.tooShort")}),v.jsx("label",{className:"block text-sm font-medium text-theme-text-secondary mb-2 mt-5",children:d("setup.confirm")}),v.jsx("input",{type:"password",value:S,onChange:p=>M(p.target.value),placeholder:"*************",className:"input-field text-base"}),m&&v.jsx("p",{className:"mt-1 text-2xs text-status-error",children:d("setup.mismatch")}),O&&v.jsx("div",{className:"mt-4 py-2.5 px-4 bg-status-error/5 rounded-xl text-sm text-status-error",children:O}),v.jsx("button",{type:"submit",disabled:!b,className:"btn-primary w-full mt-6 py-3",children:d(r?"setup.loading":"setup.submit")})]})}),v.jsx("div",{className:"mt-4 px-4 py-3 rounded-xl text-xs text-theme-text-tertiary border leading-relaxed text-center",children:d("setup.tunnelPaused")})]})]})}function DS(s){return rt("/api/projects/browse",{initialPath:s})}function Q2(s){return rt("/api/projects/open-folder",{path:s})}function Bv(){return _t("/api/projects")}function Z2(s){return _t(`/api/projects/${s}`)}function TS(s){return rt("/api/projects",s)}function ek(s){return _t(`/api/projects/${s}/svn-detect`)}function MS(s,h){return Di(`/api/projects/${s}`,h)}function tk(s,h){const w=h?`?todoId=${encodeURIComponent(h)}`:"";return _t(`/api/projects/${s}/debug-logs${w}`)}function AS(s){return Cr(`/api/projects/${s}`)}function jS(s){return rt("/api/projects/reorder",{ids:s})}function ik(s){return rt(`/api/projects/${s}/start`)}function sk(s){return rt(`/api/projects/${s}/stop`)}function OS(s){return _t(`/api/projects/${s}/status`)}function nk(){return _t("/api/active-work")}function rk(s){return rt(`/api/projects/${s}/check-git`)}function ak(s,h){const w=h?`?worktreePath=${encodeURIComponent(h)}`:"";return _t(`/api/projects/${s}/git-status${w}`)}function ok(s,h=0,w=50,S){const M=new URLSearchParams({skip:String(h),limit:String(w)});return _t(`/api/projects/${s}/git-log?${M}`)}function lk(s,h){return _t(`/api/projects/${s}/git-refs`)}function ck(s,h,w){return rt(`/api/projects/${s}/git-stage`,{files:h,worktreePath:w})}function uk(s,h,w){return rt(`/api/projects/${s}/git-unstage`,{files:h,worktreePath:w})}function hk(s,h,w){return rt(`/api/projects/${s}/git-ignore`,{path:h,worktreePath:w})}function dk(s,h,w){return rt(`/api/projects/${s}/git-commit`,{message:h,worktreePath:w})}function fk(s,h,w){return rt(`/api/projects/${s}/git-pull`,{remote:h,branch:w})}function pk(s,h){return rt(`/api/projects/${s}/git-push`,h||{})}function mk(s){return _t(`/api/projects/${s}/git-remotes`)}function gk(s,h,w){return rt(`/api/projects/${s}/git-fetch`,{remote:h,prune:w})}function vk(s,h,w){return rt(`/api/projects/${s}/git-branch`,{name:h,startPoint:w})}function _k(s,h,w){return rt(`/api/projects/${s}/git-branch-delete`,{name:h,force:w})}function bk(s,h){return rt(`/api/projects/${s}/git-checkout`,{branch:h})}function yk(s,h){return rt(`/api/projects/${s}/git-merge`,{branch:h})}function wk(s,h,w,S){return rt(`/api/projects/${s}/git-conflict-resolve`,{file:h,side:w,worktreePath:S})}function Sk(s,h,w){const S=w?`&worktreePath=${encodeURIComponent(w)}`:"";return _t(`/api/projects/${s}/git-conflict-file?file=${encodeURIComponent(h)}${S}`)}function xk(s,h,w,S){return rt(`/api/projects/${s}/git-conflict-file`,{file:h,content:w,worktreePath:S})}function Ck(s){return rt(`/api/projects/${s}/git-conflict-continue`)}function kk(s){return rt(`/api/projects/${s}/git-conflict-abort`)}function Ek(s,h){return rt(`/api/projects/${s}/git-stash`,{message:h})}function Lk(s,h){return rt(`/api/projects/${s}/git-stash-pop`,{index:h})}function Rk(s){return _t(`/api/projects/${s}/git-stash-list`)}function Dk(s,h,w,S){return rt(`/api/projects/${s}/git-discard`,{files:h,all:w,worktreePath:S})}function Tk(s,h,w,S){return rt(`/api/projects/${s}/git-tag`,{name:h,message:w,commit:S})}function Mk(s,h,w){return rt(`/api/projects/${s}/git-branch-rename`,{oldName:h,newName:w})}function Ak(s,h){return rt(`/api/projects/${s}/git-rebase`,{onto:h})}function jk(s,h){return rt(`/api/projects/${s}/git-revert`,{commit:h})}function Ok(s,h){return rt(`/api/projects/${s}/git-cherry-pick`,{commit:h})}function Bk(s,h,w){return rt(`/api/projects/${s}/git-reset`,{commit:h,mode:w})}function Nk(s,h,w,S){const M=new URLSearchParams;return h&&M.set("file",h),w&&M.set("staged","true"),S&&M.set("worktreePath",S),_t(`/api/projects/${s}/git-diff?${M}`)}function zk(s,h){const w=new URLSearchParams({hash:h});return _t(`/api/projects/${s}/git-commit-files?${w}`)}function Hk(s,h,w){const S=new URLSearchParams({hash:h});return w&&S.set("file",w),_t(`/api/projects/${s}/git-commit-diff?${S}`)}function Pk(s){return _t(`/api/projects/${s}/worktrees`)}function Ik(s,h,w){return rt(`/api/projects/${s}/worktree-cleanup`,{worktreePath:h,branchName:w})}function Nv(s){const h=new URLSearchParams;s.hours!==void 0&&h.set("hours",String(s.hours)),s.statuses&&s.statuses.length>0&&h.set("statuses",s.statuses.join(","));const w=h.toString();return w?`?${w}`:""}function Fk(s={}){return _t(`/api/review/queue${Nv(s)}`)}function BS(s={}){return _t(`/api/review/summary${Nv(s)}`)}function Uk(s){return _t(`/api/review/diff/${encodeURIComponent(s)}`)}function $k(s,h){return _t(`/api/review/diff/${encodeURIComponent(s)}/file?path=${encodeURIComponent(h)}`)}function NS(){return _t("/api/favorites")}function zS(s){return rt("/api/favorites",s)}function HS(s,h){return Di(`/api/favorites/${s}`,h)}function PS(s){return Cr(`/api/favorites/${s}`)}function IS(s){return rt(`/api/favorites/${s}/launch`)}function FS(s){return rt("/api/favorites/browse-file",{initialPath:s})}function uh(){return _t("/api/tunnel/status")}function US(){return _t("/api/tunnel/config")}function $S(s){return Di("/api/tunnel/config",s)}function zv(s){return rt("/api/tunnel/start",{})}function WS(){return rt("/api/tunnel/stop")}const Hv=j.createContext({theme:"light",toggleTheme:()=>{}});function qS(){const[s,h]=j.useState(()=>{const S=localStorage.getItem("theme");return S==="light"||S==="dark"?S:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"});j.useEffect(()=>{document.documentElement.setAttribute("data-theme",s),localStorage.setItem("theme",s)},[s]);const w=j.useCallback(()=>{h(S=>S==="light"?"dark":"light")},[]);return{theme:s,toggleTheme:w}}function GS(){return j.useContext(Hv)}const Pv=j.createContext({enabled:!1,supported:!1,toggleNotification:()=>{},sendNotification:()=>{}});function YS(){const s="Notification"in window,[h,w]=j.useState(()=>s?localStorage.getItem("clitrigger-notifications")==="on"&&Notification.permission==="granted":!1),S=j.useRef(h);j.useEffect(()=>{S.current=h},[h]);const M=j.useCallback(async()=>{if(s)if(S.current)localStorage.setItem("clitrigger-notifications","off"),w(!1);else{if(Notification.permission==="denied"||Notification.permission==="default"&&await Notification.requestPermission()!=="granted")return;localStorage.setItem("clitrigger-notifications","on"),w(!0)}},[s]),O=j.useCallback((A,r,u)=>{if(!S.current)return;const d=new Notification(A,{body:r});d.onclick=()=>{u==null||u();const g=window.electronAPI;g!=null&&g.windowFocus?g.windowFocus():window.focus(),d.close()}},[]);return{enabled:h,supported:s,toggleNotification:M,sendNotification:O}}function Ll(){return j.useContext(Pv)}let KS=0;const Iv=j.createContext(null);function XS({children:s}){const[h,w]=j.useState([]),S=j.useRef(new Map),M=j.useRef(new Map),O=j.useRef(new Map),A=j.useCallback(b=>{w(a=>a.filter(c=>c.id!==b));const C=O.current.get(b);C&&M.current.get(C)===b&&M.current.delete(C),O.current.delete(b);const p=S.current.get(b);p&&(clearTimeout(p),S.current.delete(b))},[]),r=j.useCallback((b,C="info",p=3500)=>{const a=`${C}:${b}`,c=M.current.get(a);if(c)return c;const o=`toast-${++KS}`;M.current.set(a,o),O.current.set(o,a),w(y=>[...y,{id:o,message:b,type:C,duration:p}]);const f=setTimeout(()=>A(o),p);return S.current.set(o,f),o},[A]),u=j.useCallback((b,C)=>r(b,"success",C),[r]),d=j.useCallback((b,C)=>r(b,"error",C),[r]),g=j.useCallback((b,C)=>r(b,"info",C),[r]),l=j.useCallback((b,C)=>r(b,"warning",C),[r]);j.useEffect(()=>()=>{S.current.forEach(clearTimeout),S.current.clear(),M.current.clear(),O.current.clear()},[]);const m=j.useMemo(()=>({toasts:h,show:r,success:u,error:d,info:g,warning:l,dismiss:A}),[h,r,u,d,g,l,A]);return j.createElement(Iv.Provider,{value:m},s)}function cn(){const s=j.useContext(Iv);if(!s)throw new Error("useToast must be used within ToastProvider");return s}function Dn(...s){return s.filter(Boolean).join(" ")}const VS={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","4xl":"max-w-4xl"};function za({open:s,onClose:h,size:w="md",position:S="center",disableEscClose:M=!1,disableBackdropClose:O=!1,children:A}){const r=j.useRef(null);return j.useEffect(()=>{if(!s||M)return;const u=d=>{d.key==="Escape"&&h()};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[s,M,h]),s?zi.createPortal(v.jsx("div",{ref:r,className:Dn("fixed inset-0 bg-black/50 backdrop-blur-sm z-modal flex",S==="center"?"items-center justify-center p-4":"items-start justify-center px-4 pt-[20vh]"),onClick:u=>{!O&&u.target===r.current&&h()},children:v.jsx("div",{className:Dn("w-full",VS[w]),children:A})}),document.body):null}const JS={default:"btn",primary:"btn-primary",secondary:"btn-secondary",danger:"btn-danger",ghost:"btn-ghost"},QS={sm:"btn-sm",md:"btn-md",lg:"btn-lg"},Li=j.forwardRef(function({variant:h="default",size:w,type:S="button",className:M,...O},A){return v.jsx("button",{ref:A,type:S,className:Dn(JS[h],w&&QS[w],M),...O})}),Fv=j.createContext(null);let dg=0;function ZS({children:s}){const[h,w]=j.useState(null),S=j.useRef(null),M=j.useCallback(d=>{const g=S.current;g&&(g.kind==="confirm"?g.resolve(!1):g.resolve(null)),S.current=d,w(d)},[]),O=j.useCallback(()=>{S.current=null,w(null)},[]),A=j.useCallback(d=>{const g=typeof d=="string"?{message:d}:d;return new Promise(l=>{M({id:++dg,kind:"confirm",options:g,resolve:l})})},[M]),r=j.useCallback(d=>{const g=typeof d=="string"?{message:d}:d;return new Promise(l=>{M({id:++dg,kind:"prompt",options:g,resolve:l})})},[M]),u=j.useMemo(()=>({confirm:A,prompt:r}),[A,r]);return v.jsxs(Fv.Provider,{value:u,children:[s,h&&v.jsx(ex,{dialog:h,onSettled:O},h.id)]})}function ex({dialog:s,onSettled:h}){const{t:w}=Tt(),[S,M]=j.useState(s.kind==="prompt"?s.options.initialValue??"":""),O=()=>{s.kind==="confirm"?s.resolve(!1):s.resolve(null),h()},A=()=>{s.kind==="confirm"?s.resolve(!0):s.resolve(S),h()},r=s.kind==="confirm"&&!!s.options.danger,u=s.kind==="confirm"&&s.options.confirmLabel||w("common.ok"),d=s.kind==="confirm"&&s.options.cancelLabel||w("common.cancel"),g=v.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[v.jsx(Li,{size:"sm",onClick:O,autoFocus:r,children:d}),v.jsx(Li,{variant:r?"danger":"primary",size:"sm",type:s.kind==="prompt"?"submit":"button",onClick:s.kind==="prompt"?void 0:A,autoFocus:s.kind==="confirm"&&!r,children:u})]});return v.jsx(za,{open:!0,onClose:O,size:"sm",children:v.jsxs("div",{className:"bg-theme-card border border-theme-border rounded-2xl shadow-elevated p-5",children:[s.options.title&&v.jsx("div",{className:"text-sm font-semibold text-theme-text mb-2",children:s.options.title}),v.jsx("p",{className:"text-sm text-theme-text-secondary whitespace-pre-line break-words",children:s.options.message}),s.kind==="prompt"?v.jsxs("form",{onSubmit:l=>{l.preventDefault(),A()},children:[v.jsx("input",{autoFocus:!0,value:S,onChange:l=>M(l.target.value),placeholder:s.options.placeholder,className:"input-field mt-3"}),g]}):g]})})}function kr(){const s=j.useContext(Fv);if(!s)throw new Error("useDialog must be used within DialogProvider");return s}function tx({onSubmit:s,onCancel:h}){const[w,S]=j.useState(""),[M,O]=j.useState(""),[A,r]=j.useState(!1),[u,d]=j.useState(!1),[g,l]=j.useState(""),{t:m}=Tt(),b=async p=>{if(p.preventDefault(),!(!w.trim()||!M.trim())){l(""),d(!0);try{await s(w.trim(),M.trim())}catch(a){const c=a instanceof Error?a.message:String(a);l(c||m("form.createError"))}finally{d(!1)}}},C=async()=>{r(!0);try{const p=await DS(M||void 0);p.path&&O(p.path)}catch{}r(!1)};return v.jsx(za,{open:!0,onClose:h,size:"md",children:v.jsxs("div",{className:"bg-theme-card border border-theme-border rounded-2xl shadow-elevated p-8",children:[v.jsx("h2",{className:"text-lg font-semibold text-warm-800 mb-6",children:m("form.newProject")}),v.jsxs("form",{onSubmit:b,children:[v.jsxs("div",{className:"mb-5",children:[v.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:m("form.projectName")}),v.jsx("input",{type:"text",placeholder:"my-project",value:w,onChange:p=>S(p.target.value),className:"input-field",autoFocus:!0})]}),v.jsxs("div",{className:"mb-8",children:[v.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:m("form.folderPath")}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx("input",{type:"text",placeholder:"C:/Projects/my-project",value:M,onChange:p=>O(p.target.value),className:"input-field text-sm flex-1"}),v.jsx("button",{type:"button",onClick:C,disabled:A,className:"btn-ghost text-sm px-3 shrink-0",title:m("browse.title"),children:A?v.jsx(lh,{size:16,className:"animate-spin"}):v.jsx(Dv,{size:16})})]})]}),g&&v.jsx("p",{className:"text-sm mb-4",style:{color:"var(--color-danger, #ef4444)"},children:g}),v.jsxs("div",{className:"flex justify-end gap-3",children:[v.jsx("button",{type:"button",onClick:h,className:"btn-ghost text-sm",children:m("form.cancel")}),v.jsx("button",{type:"submit",disabled:!w.trim()||!M.trim()||u,className:"btn-primary text-sm",children:m(u?"form.creating":"form.create")})]})]})]})})}const ix=[{value:"executable",icon:Rv},{value:"command",icon:Ov},{value:"url",icon:Mv}];function sx(s){const h=[],w=/"([^"]*)"|(\S+)/g;let S;for(;(S=w.exec(s))!==null;)h.push(S[1]!==void 0?S[1]:S[2]);return h}function fg(s){if(!s)return"";try{const h=JSON.parse(s);if(Array.isArray(h))return h.map(w=>typeof w=="string"&&/\s/.test(w)?`"${w}"`:String(w)).join(" ")}catch{}return""}function nx({initial:s,onSubmit:h,onCancel:w}){const{t:S}=Tt(),[M,O]=j.useState((s==null?void 0:s.name)??""),[A,r]=j.useState((s==null?void 0:s.type)??"executable"),[u,d]=j.useState((s==null?void 0:s.target)??""),[g,l]=j.useState(fg((s==null?void 0:s.args)??null)),[m,b]=j.useState((s==null?void 0:s.cwd)??""),[C,p]=j.useState(!1);j.useEffect(()=>{O((s==null?void 0:s.name)??""),r((s==null?void 0:s.type)??"executable"),d((s==null?void 0:s.target)??""),l(fg((s==null?void 0:s.args)??null)),b((s==null?void 0:s.cwd)??"")},[s]);const[a,c]=j.useState(!1),o=A==="executable",f=async()=>{c(!0);try{const{path:H}=await FS(u||void 0);if(!H)return;if(d(H),!M.trim()){const P=H.replace(/\\/g,"/").split("/").pop()||"";O(P.replace(/\.[^.]+$/,""))}}catch{}finally{c(!1)}},y=!!s,R=M.trim(),k=u.trim(),D=A!=="url"||/^https?:\/\//i.test(k),E=!!R&&!!k&&D&&!C,L=async H=>{if(H.preventDefault(),!!E){p(!0);try{const P={name:R,type:A,target:k,args:A==="executable"&&g.trim()?sx(g.trim()):null,cwd:A!=="url"&&m.trim()?m.trim():null};await h(P)}finally{p(!1)}}},z=S(A==="executable"?"favorites.form.targetHint.executable":A==="command"?"favorites.form.targetHint.command":"favorites.form.targetHint.url");return v.jsx(za,{open:!0,onClose:w,size:"md",children:v.jsxs("div",{className:"bg-theme-card border border-theme-border rounded-2xl shadow-elevated p-8",children:[v.jsx("h2",{className:"text-lg font-semibold text-warm-800 mb-6",children:S(y?"favorites.form.title.edit":"favorites.form.title.create")}),v.jsxs("form",{onSubmit:L,children:[v.jsxs("div",{className:"mb-5",children:[v.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:S("favorites.form.type")}),v.jsx("div",{className:"grid grid-cols-3 gap-2",children:ix.map(({value:H,icon:P})=>v.jsxs("button",{type:"button",onClick:()=>r(H),className:"flex items-center justify-center gap-2 px-3 py-2 rounded-lg text-xs font-medium transition-all border",style:A===H?{backgroundColor:"var(--color-accent)",color:"white",borderColor:"var(--color-accent)"}:{color:"var(--color-text-tertiary)",borderColor:"var(--color-border)"},children:[v.jsx(P,{size:14}),S(`favorites.types.${H}`)]},H))})]}),v.jsxs("div",{className:"mb-5",children:[v.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:S("favorites.form.name")}),v.jsx("input",{type:"text",value:M,onChange:H=>O(H.target.value),className:"input-field",autoFocus:!0})]}),v.jsxs("div",{className:"mb-5",children:[v.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:S("favorites.form.target")}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx("input",{type:"text",value:u,onChange:H=>d(H.target.value),className:"input-field text-sm font-mono flex-1",placeholder:z}),o&&v.jsxs("button",{type:"button",onClick:f,disabled:a,className:"btn-ghost text-sm whitespace-nowrap flex items-center gap-1.5 disabled:opacity-50",children:[v.jsx(Dv,{size:14}),S("favorites.form.browse")]})]}),v.jsx("p",{className:"mt-1 text-2xs",style:{color:"var(--color-text-muted)"},children:z})]}),A==="executable"&&v.jsxs("div",{className:"mb-5",children:[v.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:S("favorites.form.args")}),v.jsx("input",{type:"text",value:g,onChange:H=>l(H.target.value),className:"input-field text-sm font-mono",placeholder:'--flag value "with spaces"'})]}),A!=="url"&&v.jsxs("div",{className:"mb-5",children:[v.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:S("favorites.form.cwd")}),v.jsx("input",{type:"text",value:m,onChange:H=>b(H.target.value),className:"input-field text-sm font-mono",placeholder:"C:/Projects/my-project"})]}),v.jsx("p",{className:"mb-6 text-2xs leading-snug",style:{color:"var(--color-text-muted)"},children:S("favorites.security.notice")}),v.jsxs("div",{className:"flex justify-end gap-3",children:[v.jsx("button",{type:"button",onClick:w,className:"btn-ghost text-sm",children:S("favorites.form.cancel")}),v.jsx("button",{type:"submit",disabled:!E,className:"btn-primary text-sm",children:S(y?"favorites.form.save":"favorites.form.create")})]})]})]})})}const rx=/^([a-z0-9]([a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}$/i;function ax({onClose:s}){const{t:h}=Tt(),{error:w,success:S}=cn(),[M,O]=j.useState(""),[A,r]=j.useState(""),[u,d]=j.useState(""),[g,l]=j.useState(""),[m,b]=j.useState(!1),[C,p]=j.useState(!1),[a,c]=j.useState(!1),[o,f]=j.useState(null);j.useEffect(()=>{let P=!1;return Promise.all([US(),uh()]).then(([I,K])=>{P||(O(I.tunnelName),r(I.customHostname),d(I.tunnelName),l(I.customHostname),f(K))}).catch(()=>{}),()=>{P=!0}},[]);const y=M.trim(),R=A.trim(),k=y!==u.trim()||R!==g.trim(),D=!!R&&(!rx.test(R)||R.toLowerCase()==="localhost"||R.toLowerCase()==="127.0.0.1"),E=!!R&&!y,L=k&&!C&&!D&&!E,z=async()=>{if(L){p(!0);try{const P=await $S({tunnelName:y,customHostname:R});d(P.tunnelName),l(P.customHostname),O(P.tunnelName),r(P.customHostname),S(h("tunnel.saved"))}catch(P){w(P instanceof Error?P.message:h("tunnel.saveFailed"))}finally{p(!1)}}},H=async()=>{c(!0);try{try{await WS()}catch{}const P=await zv();f({status:"running",url:P.url}),S(h("tunnel.restarted"))}catch(P){w(P instanceof Error?P.message:h("tunnel.restartFailed"))}finally{c(!1)}};return v.jsxs("div",{className:"p-8",children:[v.jsx("h2",{className:"text-lg font-semibold text-warm-800 mb-1",children:h("tunnel.title")}),v.jsx("p",{className:"text-xs text-warm-400 mb-6",children:h("tunnel.description")}),o&&v.jsxs("div",{className:"mb-5 p-3 rounded-lg text-xs flex items-center gap-2",style:{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-tertiary)"},children:[v.jsx("span",{className:`w-2 h-2 rounded-full ${o.status==="running"?"bg-status-success":o.status==="error"?"bg-status-error":"bg-status-pending"}`}),v.jsx("span",{className:"font-medium",children:h(`tunnel.status.${o.status}`)}),o.url&&v.jsx("a",{href:o.url,target:"_blank",rel:"noreferrer",className:"ml-auto font-mono truncate hover:underline",style:{color:"var(--color-accent)"},children:o.url})]}),v.jsxs("div",{className:"mb-4",children:[v.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:h("tunnel.name.label")}),v.jsx("input",{type:"text",value:M,onChange:P=>O(P.target.value),placeholder:h("tunnel.name.placeholder"),className:"input-field text-sm font-mono"}),v.jsx("p",{className:"mt-1 text-2xs",style:{color:"var(--color-text-muted)"},children:h("tunnel.name.hint")})]}),v.jsxs("div",{className:"mb-4",children:[v.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:h("tunnel.hostname.label")}),v.jsx("input",{type:"text",value:A,onChange:P=>r(P.target.value),placeholder:h("tunnel.hostname.placeholder"),className:"input-field text-sm font-mono"}),v.jsx("p",{className:"mt-1 text-2xs",style:{color:"var(--color-text-muted)"},children:h("tunnel.hostname.hint")}),D&&v.jsx("p",{className:"mt-1 text-2xs text-status-error",children:h("tunnel.hostname.invalid")}),E&&v.jsx("p",{className:"mt-1 text-2xs text-status-error",children:h("tunnel.hostname.needsName")})]}),v.jsxs("div",{className:"mb-5",children:[v.jsxs("button",{type:"button",onClick:()=>b(!m),className:"flex items-center gap-1 text-xs text-accent-dark hover:text-accent transition-colors",children:[v.jsx("span",{className:`inline-block transition-transform ${m?"rotate-90":""}`,children:"▶"}),h("tunnel.guide.toggle")]}),m&&v.jsxs("div",{className:"mt-3 p-3 bg-warm-50 border border-warm-150 rounded-lg text-xs text-warm-600 space-y-2",children:[v.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:h("tunnel.guide.heading")}),v.jsxs("ol",{className:"list-decimal list-inside space-y-1 ml-1",children:[v.jsx("li",{children:v.jsx("code",{className:"font-mono",children:"cloudflared tunnel login"})}),v.jsx("li",{children:v.jsx("code",{className:"font-mono",children:"cloudflared tunnel create my-app"})}),v.jsx("li",{children:v.jsx("code",{className:"font-mono",children:"cloudflared tunnel route dns my-app app.your-domain.com"})}),v.jsx("li",{children:h("tunnel.guide.step4")})]}),v.jsx("p",{className:"text-2xs text-warm-400 pt-1",children:h("tunnel.guide.note")})]})]}),v.jsxs("div",{className:"flex items-center justify-between gap-3",children:[v.jsx("button",{type:"button",onClick:H,disabled:a,className:"btn-ghost text-sm disabled:opacity-50",children:a?(o==null?void 0:o.status)==="running"?h("tunnel.restarting"):h("tunnel.starting"):(o==null?void 0:o.status)==="running"?h("tunnel.restart"):h("tunnel.start")}),v.jsxs("div",{className:"flex gap-3",children:[s&&v.jsx("button",{type:"button",onClick:s,className:"btn-ghost text-sm",children:h("tunnel.close")}),v.jsx("button",{type:"button",onClick:z,disabled:!L,className:"btn-primary text-sm",children:h(C?"tunnel.saving":"tunnel.save")})]})]})]})}const pg=8;function ox({onClose:s}){const{t:h}=Tt(),{error:w,success:S}=cn(),[M,O]=j.useState(""),[A,r]=j.useState(""),[u,d]=j.useState(""),[g,l]=j.useState(!1),m=A.length>0&&A.length<pg,b=u.length>0&&A!==u,C=!!M&&A.length>=pg&&A===u&&!g,p=()=>{O(""),r(""),d("")},a=async()=>{if(C){l(!0);try{await wv(M,A,u),S(h("account.saved")),p()}catch(c){w(c instanceof Error&&c.message?c.message:h("account.saveFailed"))}finally{l(!1)}}};return v.jsxs("div",{className:"p-8",children:[v.jsx("h2",{className:"text-lg font-semibold text-warm-800 mb-1",children:h("account.title")}),v.jsx("p",{className:"text-xs text-warm-400 mb-6",children:h("account.description")}),v.jsxs("div",{className:"mb-4",children:[v.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:h("account.oldPassword")}),v.jsx("input",{type:"password",value:M,onChange:c=>O(c.target.value),className:"input-field text-sm",autoComplete:"current-password"})]}),v.jsxs("div",{className:"mb-4",children:[v.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:h("account.newPassword")}),v.jsx("input",{type:"password",value:A,onChange:c=>r(c.target.value),className:"input-field text-sm",autoComplete:"new-password"}),m&&v.jsx("p",{className:"mt-1 text-2xs text-status-error",children:h("account.tooShort")})]}),v.jsxs("div",{className:"mb-6",children:[v.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:h("account.confirm")}),v.jsx("input",{type:"password",value:u,onChange:c=>d(c.target.value),className:"input-field text-sm",autoComplete:"new-password"}),b&&v.jsx("p",{className:"mt-1 text-2xs text-status-error",children:h("account.mismatch")})]}),v.jsxs("div",{className:"flex items-center justify-end gap-3",children:[s&&v.jsx("button",{type:"button",onClick:s,className:"btn-ghost text-sm",children:h("account.close")}),v.jsx("button",{type:"button",onClick:a,disabled:!C,className:"btn-primary text-sm",children:h(g?"account.saving":"account.save")})]})]})}function lx(){return _t("/api/session-tags")}function cx(s){return rt("/api/session-tags",s)}function ux(s,h){return Di(`/api/session-tags/${s}`,h)}function hx(s){return Cr(`/api/session-tags/${s}`)}function Uv(){return _t("/api/session-aliases")}function $v(s){return rt("/api/session-aliases",s)}function dx(s,h){return Di(`/api/session-aliases/${s}`,h)}function fx(s){return Cr(`/api/session-aliases/${s}`)}function Wv(){return _t("/api/session-settings")}function Yu(s){return Di("/api/session-settings",s)}const Ee={titleBg:"#2d2d2d",titleText:"#999",bg:"#0c0c0c",text:"#cccccc",dim:"#666666",bright:"#f2f2f2",prompt:"#16c60c",success:"#16c60c",error:"#f14c4c",warning:"#cca700",info:"#569cd6",separator:"#333333"},vt="'Cascadia Code', 'Cascadia Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace",jh=13,ya=8,wa=28,br=new Map,Ln=new Map;let ml=jh;function Oh(s){return`sessionFontSize:${s}`}window.addEventListener("storage",s=>{var S;if(s.storageArea!==localStorage||!((S=s.key)!=null&&S.startsWith("sessionFontSize:")))return;const h=s.key.slice(16);br.delete(h);const w=Ln.get(h);if(w){const M=Sa(h);w.forEach(O=>O(M))}});function hh(s){return Number.isFinite(s)?Math.max(ya,Math.min(wa,Math.round(s))):ml}function px(s){if(br.has(s))return!0;try{return localStorage.getItem(Oh(s))!==null}catch{return!1}}function Sa(s){const h=br.get(s);if(h!==void 0)return h;let w=null;try{const S=localStorage.getItem(Oh(s));if(S!==null){const M=parseInt(S,10);Number.isFinite(M)&&(w=hh(M))}}catch{}return w===null?hh(ml):(br.set(s,w),w)}function dh(s,h){const w=hh(h);if(br.get(s)===w)return;br.set(s,w);try{localStorage.setItem(Oh(s),String(w))}catch{}const S=Ln.get(s);S&&S.forEach(M=>M(w))}function _a(s,h){dh(s,Sa(s)+h)}function hl(s){const h=Math.max(ya,Math.min(wa,Math.round(s)));Number.isFinite(h)&&h!==ml&&(ml=h,Ln.forEach((w,S)=>{px(S)||w.forEach(M=>M(h))}))}function qv(s){const[h,w]=j.useState(()=>Sa(s));j.useEffect(()=>{w(Sa(s));let O=Ln.get(s);return O||(O=new Set,Ln.set(s,O)),O.add(w),()=>{const A=Ln.get(s);A&&(A.delete(w),A.size===0&&Ln.delete(s))}},[s]);const S=j.useCallback(O=>dh(s,O),[s]),M=j.useCallback(O=>dh(s,Sa(s)+O),[s]);return[h,S,M]}const xa=["#A78BFA","#F472B6","#FB923C","#FBBF24","#34D399","#60A5FA","#F87171","#94A3B8"];function mg(s){for(const h of xa)if(!s.some(w=>w.color.toLowerCase()===h.toLowerCase()))return h;return xa[s.length%xa.length]}function mx({onClose:s}){const{t:h}=Tt(),{confirm:w}=kr(),{error:S,success:M}=cn(),[O,A]=j.useState([]),[r,u]=j.useState(!1),[d,g]=j.useState(jh),[l,m]=j.useState(!1),[b,C]=j.useState(!1),[p,a]=j.useState(!1),[c,o]=j.useState(!1),f=j.useRef(null),[y,R]=j.useState(""),[k,D]=j.useState(xa[0]),[E,L]=j.useState(!1),[z,H]=j.useState(null),[P,I]=j.useState(""),[K,X]=j.useState(xa[0]),[Y,$]=j.useState(!1),[U,T]=j.useState([]),[F,B]=j.useState(""),[W,ee]=j.useState(""),[ne,pe]=j.useState(!1),[ke,Q]=j.useState(null),[G,he]=j.useState(""),[ae,Ae]=j.useState(""),[Oe,Ye]=j.useState(!1);j.useEffect(()=>{let ie=!1;return Promise.all([lx(),Wv(),Uv()]).then(([_e,ue,Pe])=>{ie||(A(_e),u(ue.defaultUseWorktree),g(ue.defaultFontSize),hl(ue.defaultFontSize),m(ue.imeDebug),D(mg(_e)),T(Pe),C(!0))}).catch(_e=>{ie||S(_e instanceof Error?_e.message:"Failed to load")}),()=>{ie=!0}},[S]);const $e=y.trim(),at=!!$e&&!E,ye=j.useMemo(()=>[...O].sort((ie,_e)=>ie.sort_order-_e.sort_order||ie.name.localeCompare(_e.name)),[O]);j.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const Te=ie=>{if(!Number.isFinite(ie))return;const _e=Math.max(ya,Math.min(wa,Math.round(ie)));g(_e),hl(_e),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{Yu({defaultFontSize:_e}).then(ue=>{g(ue.defaultFontSize),hl(ue.defaultFontSize)}).catch(ue=>S(ue instanceof Error?ue.message:"Save failed"))},350)},ut=async ie=>{a(!0);try{const _e=await Yu({defaultUseWorktree:ie});u(_e.defaultUseWorktree),M(h("sessionSettings.saved"))}catch(_e){S(_e instanceof Error?_e.message:"Save failed")}finally{a(!1)}},tt=async ie=>{var _e,ue;o(!0);try{const Pe=await Yu({imeDebug:ie});m(Pe.imeDebug),(ue=(_e=window.electronAPI)==null?void 0:_e.imeSetDebug)==null||ue.call(_e,Pe.imeDebug),M(h("sessionSettings.saved"))}catch(Pe){S(Pe instanceof Error?Pe.message:"Save failed")}finally{o(!1)}},He=async()=>{if(at){L(!0);try{const ie=await cx({name:$e,color:k});A(_e=>[..._e,ie]),R(""),D(mg([...O,ie]))}catch(ie){S(ie instanceof Error?ie.message:"Create failed")}finally{L(!1)}}},We=ie=>{H(ie.id),I(ie.name),X(ie.color)},Fe=()=>{H(null),I("")},Be=async()=>{if(!z)return;const ie=P.trim();if(ie){$(!0);try{const _e=await ux(z,{name:ie,color:K});A(ue=>ue.map(Pe=>Pe.id===_e.id?_e:Pe)),Fe()}catch(_e){S(_e instanceof Error?_e.message:"Save failed")}finally{$(!1)}}},Ue=async ie=>{if(await w({message:h("sessionSettings.tags.deleteConfirm").replace("{name}",ie.name),danger:!0}))try{await hx(ie.id),A(_e=>_e.filter(ue=>ue.id!==ie.id))}catch(_e){S(_e instanceof Error?_e.message:"Delete failed")}},ct=F.trim(),it=W.trim(),St=!!ct&&!!it&&!ne,Ce=j.useMemo(()=>[...U].sort((ie,_e)=>ie.sort_order-_e.sort_order||ie.name.localeCompare(_e.name)),[U]),Ie=async()=>{if(St){pe(!0);try{const ie=await $v({name:ct,command_template:it});T(_e=>[..._e,ie]),B(""),ee("")}catch(ie){S(ie instanceof Error?ie.message:"Create failed")}finally{pe(!1)}}},ce=ie=>{Q(ie.id),he(ie.name),Ae(ie.command_template)},ze=()=>{Q(null),he(""),Ae("")},je=async()=>{if(!ke)return;const ie=G.trim(),_e=ae.trim();if(!(!ie||!_e)){Ye(!0);try{const ue=await dx(ke,{name:ie,command_template:_e});T(Pe=>Pe.map(Me=>Me.id===ue.id?ue:Me)),ze()}catch(ue){S(ue instanceof Error?ue.message:"Save failed")}finally{Ye(!1)}}},le=async ie=>{if(await w({message:h("sessionSettings.aliases.deleteConfirm").replace("{name}",ie.name),danger:!0}))try{await fx(ie.id),T(_e=>_e.filter(ue=>ue.id!==ie.id))}catch(_e){S(_e instanceof Error?_e.message:"Delete failed")}};return v.jsxs("div",{className:"p-8",children:[v.jsx("h2",{className:"text-lg font-semibold text-warm-800 mb-1",children:h("sessionSettings.title")}),v.jsx("p",{className:"text-xs text-warm-400 mb-6",children:h("sessionSettings.description")}),v.jsxs("section",{className:"mb-7",children:[v.jsxs("h3",{className:"text-sm font-semibold text-warm-700 mb-2 flex items-center gap-1.5",children:[v.jsx(S1,{size:14}),h("sessionSettings.worktree.title")]}),v.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[v.jsx("input",{type:"checkbox",checked:r,disabled:p||!b,onChange:ie=>ut(ie.target.checked),className:"rounded-md border-warm-300"}),v.jsx("span",{className:"text-sm text-warm-600",children:h("sessionSettings.worktree.label")})]}),v.jsx("p",{className:"mt-1 text-2xs ml-6",style:{color:"var(--color-text-muted)"},children:h("sessionSettings.worktree.hint")})]}),v.jsxs("section",{className:"mb-7",children:[v.jsxs("h3",{className:"text-sm font-semibold text-warm-700 mb-2 flex items-center gap-1.5",children:[v.jsx(wS,{size:14}),h("sessionSettings.fontSize.title")]}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("input",{type:"range",min:ya,max:wa,step:1,value:d,disabled:!b,onChange:ie=>Te(parseInt(ie.target.value,10)),className:"flex-1 max-w-xs","aria-label":h("sessionSettings.fontSize.label")}),v.jsx("input",{type:"number",min:ya,max:wa,step:1,value:d,disabled:!b,onChange:ie=>Te(parseInt(ie.target.value,10)),className:"input text-sm w-20"}),v.jsx("span",{className:"text-xs text-warm-400",children:"px"})]}),v.jsx("p",{className:"mt-1 text-2xs",style:{color:"var(--color-text-muted)"},children:h("sessionSettings.fontSize.hint")})]}),v.jsxs("section",{children:[v.jsx("h3",{className:"text-sm font-semibold text-warm-700 mb-2",children:h("sessionSettings.tags.title")}),v.jsx("p",{className:"text-xs text-warm-400 mb-3",children:h("sessionSettings.tags.description")}),v.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[v.jsx("input",{type:"color",value:k,onChange:ie=>D(ie.target.value),className:"w-9 h-9 rounded-md cursor-pointer border border-warm-200",title:h("sessionSettings.tags.color")}),v.jsx("input",{type:"text",value:y,onChange:ie=>R(ie.target.value),onKeyDown:ie=>{ie.key==="Enter"&&(ie.preventDefault(),He())},placeholder:h("sessionSettings.tags.namePlaceholder"),className:"input text-sm flex-1",maxLength:32}),v.jsxs("button",{type:"button",onClick:He,disabled:!at,className:"btn-primary text-sm py-1.5 px-3 inline-flex items-center gap-1",children:[v.jsx(Tn,{size:14}),h("sessionSettings.tags.add")]})]}),ye.length===0?v.jsx("p",{className:"text-xs text-warm-400 italic py-3",children:h("sessionSettings.tags.empty")}):v.jsx("ul",{className:"space-y-1.5",children:ye.map(ie=>{const _e=z===ie.id;return v.jsx("li",{className:"flex items-center gap-2 px-3 py-2 rounded-lg border",style:{borderColor:"var(--color-border)"},children:_e?v.jsxs(v.Fragment,{children:[v.jsx("input",{type:"color",value:K,onChange:ue=>X(ue.target.value),className:"w-7 h-7 rounded-md cursor-pointer border border-warm-200"}),v.jsx("input",{type:"text",value:P,onChange:ue=>I(ue.target.value),onKeyDown:ue=>{ue.key==="Enter"&&(ue.preventDefault(),Be()),ue.key==="Escape"&&Fe()},autoFocus:!0,className:"input text-sm flex-1",maxLength:32}),v.jsx("button",{type:"button",onClick:Be,disabled:Y||!P.trim(),className:"p-1.5 text-status-success hover:bg-status-success/10 rounded-md",title:h("sessionSettings.tags.save"),children:v.jsx(Ra,{size:14})}),v.jsx("button",{type:"button",onClick:Fe,className:"p-1.5 text-warm-400 hover:bg-warm-100 rounded-md",title:h("sessionSettings.tags.cancel"),children:v.jsx(Ri,{size:14})})]}):v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"w-4 h-4 rounded-full shrink-0 border",style:{backgroundColor:ie.color,borderColor:"rgba(0,0,0,0.08)"}}),v.jsx("span",{className:"text-sm text-warm-700 flex-1 truncate",children:ie.name}),v.jsx("button",{type:"button",onClick:()=>We(ie),className:"p-1.5 text-warm-400 hover:text-warm-700 hover:bg-warm-100 rounded-md",title:h("sessionSettings.tags.edit"),children:v.jsx(ch,{size:14})}),v.jsx("button",{type:"button",onClick:()=>Ue(ie),className:"p-1.5 text-warm-400 hover:text-status-error hover:bg-warm-100 rounded-md",title:h("sessionSettings.tags.delete"),children:v.jsx(cg,{size:14})})]})},ie.id)})})]}),v.jsxs("section",{className:"mt-7",children:[v.jsx("h3",{className:"text-sm font-semibold text-warm-700 mb-2",children:h("sessionSettings.aliases.title")}),v.jsx("p",{className:"text-xs text-warm-400 mb-3",children:h("sessionSettings.aliases.description")}),v.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[v.jsx("input",{type:"text",value:F,onChange:ie=>B(ie.target.value),placeholder:h("sessionSettings.aliases.namePlaceholder"),className:"input text-sm w-44",maxLength:64}),v.jsx("input",{type:"text",value:W,onChange:ie=>ee(ie.target.value),onKeyDown:ie=>{ie.key==="Enter"&&(ie.preventDefault(),Ie())},placeholder:h("sessionSettings.aliases.commandPlaceholder"),className:"input text-sm flex-1 font-mono",maxLength:1024}),v.jsxs("button",{type:"button",onClick:Ie,disabled:!St,className:"btn-primary text-sm py-1.5 px-3 inline-flex items-center gap-1",children:[v.jsx(Tn,{size:14}),h("sessionSettings.aliases.add")]})]}),Ce.length===0?v.jsx("p",{className:"text-xs text-warm-400 italic py-3",children:h("sessionSettings.aliases.empty")}):v.jsx("ul",{className:"space-y-1.5",children:Ce.map(ie=>{const _e=ke===ie.id;return v.jsx("li",{className:"flex items-center gap-2 px-3 py-2 rounded-lg border",style:{borderColor:"var(--color-border)"},children:_e?v.jsxs(v.Fragment,{children:[v.jsx("input",{type:"text",value:G,onChange:ue=>he(ue.target.value),className:"input text-sm w-44",maxLength:64}),v.jsx("input",{type:"text",value:ae,onChange:ue=>Ae(ue.target.value),onKeyDown:ue=>{ue.key==="Enter"&&(ue.preventDefault(),je()),ue.key==="Escape"&&ze()},autoFocus:!0,className:"input text-sm flex-1 font-mono",maxLength:1024}),v.jsx("button",{type:"button",onClick:je,disabled:Oe||!G.trim()||!ae.trim(),className:"p-1.5 text-status-success hover:bg-status-success/10 rounded-md",title:h("common.save"),children:v.jsx(Ra,{size:14})}),v.jsx("button",{type:"button",onClick:ze,className:"p-1.5 text-warm-400 hover:bg-warm-100 rounded-md",title:h("common.cancel"),children:v.jsx(Ri,{size:14})})]}):v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-sm text-warm-700 w-44 truncate",children:ie.name}),v.jsx("code",{className:"text-xs text-warm-500 flex-1 truncate font-mono",children:ie.command_template}),v.jsx("button",{type:"button",onClick:()=>ce(ie),className:"p-1.5 text-warm-400 hover:text-warm-700 hover:bg-warm-100 rounded-md",title:h("common.edit"),children:v.jsx(ch,{size:14})}),v.jsx("button",{type:"button",onClick:()=>le(ie),className:"p-1.5 text-warm-400 hover:text-status-error hover:bg-warm-100 rounded-md",title:h("common.delete"),children:v.jsx(cg,{size:14})})]})},ie.id)})})]}),v.jsxs("section",{className:"mt-7",children:[v.jsxs("h3",{className:"text-sm font-semibold text-warm-700 mb-2 flex items-center gap-1.5",children:[v.jsx(Vw,{size:14}),"IME 디버그 로그"]}),v.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[v.jsx("input",{type:"checkbox",checked:l,disabled:c||!b,onChange:ie=>tt(ie.target.checked),className:"rounded-md border-warm-300"}),v.jsx("span",{className:"text-sm text-warm-600",children:"한글 입력(IME) 진단 로그 기록"})]}),v.jsx("p",{className:"mt-1 text-2xs ml-6",style:{color:"var(--color-text-muted)"},children:"조합 창이 화면 좌상단에 뜨는 문제를 진단하기 위해 입력 시점 상태를 기록합니다. 데스크톱 앱에서만 동작하며, 로그는 앱 데이터 폴더의 ime-debug.log에 저장됩니다."})]}),s&&v.jsx("div",{className:"flex justify-end gap-3 mt-7",children:v.jsx("button",{type:"button",onClick:s,className:"btn-ghost text-sm",children:h("tunnel.close")})})]})}function gx(){return _t("/api/mcp/connection")}function vx({onClose:s}){const{t:h}=Tt(),{success:w,error:S}=cn(),[M,O]=j.useState(null),[A,r]=j.useState(null);j.useEffect(()=>{let m=!1;return gx().then(b=>{m||O(b)}).catch(()=>{}),()=>{m=!0}},[]);const u=async(m,b)=>{try{await navigator.clipboard.writeText(b),r(m),setTimeout(()=>r(C=>C===m?null:C),1500),w(h("mcp.copied"))}catch{S(h("mcp.copyFailed"))}},d=M?JSON.stringify(M.config,null,2):"",g=({label:m,text:b})=>v.jsxs("button",{type:"button",onClick:()=>u(m,b),className:"btn-ghost text-xs flex items-center gap-1",children:[A===m?v.jsx(Ra,{size:14}):v.jsx(v1,{size:14}),h("mcp.copy")]}),l={backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-secondary)"};return v.jsxs("div",{className:"p-8",children:[v.jsx("h2",{className:"text-lg font-semibold text-warm-800 mb-1",children:h("mcp.title")}),v.jsx("p",{className:"text-xs text-warm-400 mb-6",children:h("mcp.description")}),M?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"mb-5",children:[v.jsxs("div",{className:"flex items-center justify-between mb-2",children:[v.jsx("label",{className:"block text-sm font-medium text-warm-600",children:h("mcp.config.label")}),v.jsx(g,{label:"config",text:d})]}),v.jsx("pre",{className:"p-3 rounded-lg text-2xs font-mono overflow-x-auto",style:l,children:d})]}),v.jsxs("div",{className:"mb-5",children:[v.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-1",children:h("mcp.commands.label")}),v.jsx("p",{className:"text-2xs text-warm-400 mb-3",children:h("mcp.commands.hint")}),v.jsx("div",{className:"space-y-3",children:M.commands.map(m=>v.jsxs("div",{children:[v.jsxs("div",{className:"flex items-center justify-between mb-1",children:[v.jsx("span",{className:"text-xs text-warm-500",children:m.label}),v.jsx(g,{label:`command:${m.id}`,text:m.command})]}),v.jsx("pre",{className:"p-3 rounded-lg text-2xs font-mono overflow-x-auto",style:l,children:m.command})]},m.id))})]}),v.jsx("p",{className:"text-2xs text-warm-400",children:h("mcp.tokenNote")})]}):v.jsx("p",{className:"text-sm text-warm-400",children:h("mcp.loading")}),s&&v.jsx("div",{className:"flex justify-end mt-6",children:v.jsx("button",{type:"button",onClick:s,className:"btn-ghost text-sm",children:h("mcp.close")})})]})}function gg({open:s,onClose:h}){const{t:w}=Tt(),[S,M]=j.useState("account");if(!s)return null;const O=[{id:"account",label:w("settings.tabs.account"),icon:A1},{id:"session",label:w("settings.tabs.session"),icon:Ah},{id:"tunnel",label:w("settings.tabs.tunnel"),icon:Ev},{id:"mcp",label:w("settings.tabs.mcp"),icon:iS}];return v.jsx(za,{open:s,onClose:h,size:"xl",children:v.jsx("div",{className:"bg-theme-card border border-theme-border rounded-2xl shadow-elevated overflow-hidden",children:v.jsxs("div",{className:"flex",style:{minHeight:460},children:[v.jsxs("aside",{className:"w-44 shrink-0 border-r flex flex-col",style:{borderColor:"var(--color-border)",backgroundColor:"var(--color-bg-hover)"},children:[v.jsx("div",{className:"px-4 pt-5 pb-3 text-xs font-semibold uppercase tracking-wider",style:{color:"var(--color-text-muted)"},children:w("settings.title")}),v.jsx("nav",{className:"flex flex-col",children:O.map(({id:A,label:r,icon:u})=>{const d=S===A;return v.jsxs("button",{type:"button",onClick:()=>M(A),className:"flex items-center gap-2 px-4 py-2.5 text-sm transition-colors text-left",style:{color:d?"var(--color-accent)":"var(--color-text-secondary)",backgroundColor:d?"var(--color-bg-primary)":"transparent",fontWeight:d?600:400},children:[v.jsx(u,{size:14}),v.jsx("span",{children:r})]},A)})}),v.jsxs("div",{className:"px-4 py-3 mt-auto text-[11px] tracking-wide",style:{color:"var(--color-text-muted)"},children:["v","0.2.67"]})]}),v.jsxs("div",{className:"flex-1 min-w-0",children:[S==="account"&&v.jsx(ox,{onClose:h}),S==="session"&&v.jsx(mx,{onClose:h}),S==="tunnel"&&v.jsx(ax,{onClose:h}),S==="mcp"&&v.jsx(vx,{onClose:h})]})]})})})}const fh=["#55708F","#4F7A68","#9A783F","#A15F5A","#74658A","#925F73","#477B7D","#747A50"];function _x(s,h){let w=0;for(let S=0;S<s.length;S++)w=(w<<5)-w+s.charCodeAt(S)|0;return Math.abs(w)%h}function Da(s){return s.color&&/^#[0-9a-f]{6}$/i.test(s.color)?s.color:fh[_x(s.id,fh.length)]}const vg=192,bx=88,Qo=8;function yx({project:s,anchorX:h,anchorY:w,onPick:S,onClose:M}){const O=j.useRef(null),[A,r]=j.useState({left:h,top:w}),u=Da(s);return j.useLayoutEffect(()=>{const d=Math.min(Math.max(h,Qo),window.innerWidth-vg-Qo),g=Math.min(Math.max(w,Qo),window.innerHeight-bx-Qo);r({left:d,top:g})},[h,w]),j.useEffect(()=>{const d=l=>{var m;(m=O.current)!=null&&m.contains(l.target)||M()},g=l=>{l.key==="Escape"&&M()};return window.addEventListener("mousedown",d),window.addEventListener("keydown",g),()=>{window.removeEventListener("mousedown",d),window.removeEventListener("keydown",g)}},[M]),zi.createPortal(v.jsxs("div",{ref:O,role:"menu",className:"z-tooltip",style:{position:"fixed",left:A.left,top:A.top,width:vg,background:"var(--color-bg-elevated, #1f1f23)",border:"1px solid var(--color-border)",borderRadius:10,padding:10,boxShadow:"0 12px 32px rgba(0,0,0,0.45)"},children:[v.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginBottom:8},children:fh.map(d=>{const g=s.color?d.toLowerCase()===s.color.toLowerCase():d===u&&!s.color;return v.jsx("button",{onClick:()=>S(d),"aria-label":d,style:{width:20,height:20,borderRadius:6,background:d,border:g?"2px solid var(--color-text-primary)":"2px solid transparent",cursor:"pointer",padding:0}},d)})}),v.jsx("button",{onClick:()=>S(null),style:{width:"100%",background:"transparent",border:"1px solid var(--color-border)",color:"var(--color-text-tertiary)",padding:"4px 8px",borderRadius:6,fontSize:11,cursor:"pointer"},children:"자동 색 (기본값)"})]}),document.body)}function Gv(s,h){return s instanceof Error&&s.message.trim()?s.message:typeof s=="string"&&s.trim()?s:h}function wx(s){const h=s instanceof Error?s.message:typeof s=="string"?s:"";return/^ResizeObserver loop (?:limit exceeded|completed with undelivered notifications\.?)$/i.test(h.trim())}const Sx={sm:"btn-icon-sm",md:"btn-icon-md",lg:"btn-icon-lg"},xx={default:"",active:"btn-icon-active",danger:"btn-icon-danger"},Ei=j.forwardRef(function({label:h,size:w="md",variant:S="default",pressed:M,type:O="button",title:A,className:r,...u},d){return v.jsx("button",{ref:d,type:O,"aria-label":h,"aria-pressed":M,title:A??h,className:Dn("btn-icon",Sx[w],xx[S],r),...u})});function Cx(s){return s==="executable"?Rv:s==="command"?Ov:Mv}function kx({onLogout:s,authRequired:h,connected:w,onEvent:S,onClose:M,collapsed:O=!1,onToggleCollapsed:A}){var St;const[r,u]=j.useState([]),[d,g]=j.useState({}),[l,m]=j.useState(null),[b,C]=j.useState(!1),[p,a]=j.useState(null),[c,o]=j.useState([]),[f,y]=j.useState(!1),[R,k]=j.useState(null),[D,E]=j.useState(!1),[L,z]=j.useState(null),[H,P]=j.useState(!1),[I,K]=j.useState(null),[X,Y]=j.useState(null),$=ns(),U=xl(),{t:T,toggleLang:F}=Tt(),{theme:B,toggleTheme:W}=GS(),{enabled:ee,supported:ne,toggleNotification:pe}=Ll(),{error:ke,success:Q,info:G,warning:he}=cn(),{confirm:ae}=kr(),Ae=((St=$.pathname.match(/^\/projects\/([^/]+)/))==null?void 0:St[1])||null;j.useEffect(()=>{tt(),Ye(),uh().then(z).catch(()=>{})},[]);async function Oe(){if(!H){P(!0);try{const Ce=await uh();if(z(Ce),Ce.status==="running"&&Ce.url){await navigator.clipboard.writeText(Ce.url),Q(T("tunnel.urlCopied"));return}const Ie=await zv(),ce={status:"running",url:Ie.url};z(ce);try{await navigator.clipboard.writeText(Ie.url),Q(T("tunnel.urlCopied"))}catch{Q(Ie.url)}}catch(Ce){ke(Ce instanceof Error?Ce.message:T("tunnel.restartFailed"))}finally{P(!1)}}}function Ye(){NS().then(o).catch(()=>{})}const $e=async Ce=>{try{R?await HS(R.id,Ce):await zS(Ce),y(!1),k(null),Ye()}catch(Ie){ke(Ie instanceof Error?Ie.message:"Failed to save favorite")}},at=async Ce=>{try{await IS(Ce)}catch(Ie){const ce=Ie instanceof Error?Ie.message:T("favorites.launchFailed");ke(`${T("favorites.launchFailed")}: ${ce}`)}},ye=async(Ce,Ie)=>{if(Ie.preventDefault(),Ie.stopPropagation(),!!await ae({message:T("favorites.deleteConfirm"),danger:!0}))try{await PS(Ce),o(ce=>ce.filter(ze=>ze.id!==Ce))}catch(ce){ke(ce instanceof Error?ce.message:"Failed to delete favorite")}},Te=(Ce,Ie)=>{Ie.preventDefault(),Ie.stopPropagation(),k(Ce),y(!0)};j.useEffect(()=>{const Ce=()=>tt();return window.addEventListener("projects:changed",Ce),()=>window.removeEventListener("projects:changed",Ce)},[]),j.useEffect(()=>{const Ce=()=>ut();return window.addEventListener("review:changed",Ce),()=>window.removeEventListener("review:changed",Ce)},[]),j.useEffect(()=>S(Ce=>{var Ie;if(Ce.type==="project:status-changed"&&Ce.projectId&&g(ce=>({...ce,[Ce.projectId]:{running:Ce.running??0,completed:Ce.completed??0,total:Ce.total??0,running_sessions:Ce.running_sessions??0,running_discussions:Ce.running_discussions??0}})),Ce.type==="todo:status-changed"&&ut(),Ce.type==="memory:ingest-finished"){const ce=r.find(Me=>Me.id===Ce.projectId),ze=(ce==null?void 0:ce.name)??"",je=Ce.sourceTitle?`“${Ce.sourceTitle}”`:Ce.sourceType??"",le=ze?`[${ze}] `:"";if(Ce.error){ke(`${le}${T("wiki.ingest.toast.failed")}: ${Ce.error}`,6e3);return}const ie=Ce.created??0,_e=Ce.updated??0,ue=Ce.edgesAdded??0;if(ie+_e+ue>0){const Me=T("wiki.ingest.toast.success").replace("{source}",je).replace("{created}",String(ie)).replace("{updated}",String(_e)).replace("{edges}",String(ue));Q(`${le}${Me}`)}else(Ie=Ce.skipped)!=null&&Ie.parseFailed?he(`${le}${T("wiki.ingest.toast.parseFailed").replace("{source}",je)}`,5e3):G(`${le}${T("wiki.ingest.toast.empty").replace("{source}",je)}`,4e3)}}),[S,r,T,ke,G,Q,he]),j.useEffect(()=>{ut()},[]);function ut(){BS({hours:24}).then(Ce=>m(Ce.total_todos)).catch(()=>{})}function tt(){Bv().then(Ce=>{u(Ce),Ce.forEach(Ie=>{OS(Ie.id).then(ce=>{g(ze=>({...ze,[Ie.id]:ce}))}).catch(()=>{})})}).catch(()=>{})}const He=()=>{M==null||M()},We=async(Ce,Ie)=>{await TS({name:Ce,path:Ie}),C(!1),window.dispatchEvent(new Event("projects:changed"))},Fe=j.useCallback(async(Ce,Ie)=>{const ce=r.map(Me=>Me.id),ze=ce.indexOf(Ce);if(ze<0)return;const je=ce.filter(Me=>Me!==Ce),le=Ie>ze?Ie-1:Ie;if(le===ze)return;const ie=[...je.slice(0,le),Ce,...je.slice(le)],_e=r,ue=new Map(r.map(Me=>[Me.id,Me])),Pe=ie.map(Me=>ue.get(Me)).filter(Boolean);u(Pe);try{await jS(ie)}catch(Me){u(_e),ke(Me instanceof Error?Me.message:"Failed to reorder projects")}},[r,ke]),Be=j.useRef(!1),Ue=j.useCallback((Ce,Ie)=>{if(Ie.button!==0||Ie.target.closest("button"))return;Ie.preventDefault();const ze=Ie.clientX,je=Ie.clientY,le=6;let ie=!1,_e=null;const ue=te=>{const V=document.querySelectorAll("[data-workspace-item]");if(V.length===0)return null;const xe=V[0].getBoundingClientRect();if(te<xe.top)return 0;const me=V[V.length-1].getBoundingClientRect();if(te>me.bottom)return V.length;for(let ve=0;ve<V.length;ve++){const Se=V[ve].getBoundingClientRect();if(te>=Se.top&&te<=Se.bottom){const Ne=Se.top+Se.height/2;return te<Ne?ve:ve+1}}return null},Pe=te=>{if(!ie){if(Math.hypot(te.clientX-ze,te.clientY-je)<le)return;ie=!0,K(Ce)}const V=ue(te.clientY);V!==_e&&(_e=V,Y(V))},Me=()=>{window.removeEventListener("mousemove",Pe),window.removeEventListener("mouseup",J),window.removeEventListener("keydown",Z)},J=()=>{if(Me(),!ie)return;Be.current=!0,requestAnimationFrame(()=>{Be.current=!1});const te=_e;K(null),Y(null),te!==null&&Fe(Ce,te)},Z=te=>{te.key==="Escape"&&(Me(),K(null),Y(null),ie&&(Be.current=!0,requestAnimationFrame(()=>{Be.current=!1})))};window.addEventListener("mousemove",Pe),window.addEventListener("mouseup",J),window.addEventListener("keydown",Z)},[Fe]),ct=async(Ce,Ie)=>{if(Ie.preventDefault(),Ie.stopPropagation(),!!await ae({message:T("projects.deleteConfirm"),danger:!0}))try{await AS(Ce),u(ce=>ce.filter(ze=>ze.id!==Ce)),window.dispatchEvent(new Event("projects:changed")),Ae===String(Ce)&&U("/")}catch(ce){ke(Gv(ce,T("errors.projectDelete")))}},it=Ce=>v.jsx("div",{className:"pointer-events-none absolute left-2 right-2 h-0.5 rounded-full",style:{backgroundColor:"var(--color-accent)",zIndex:10,...Ce==="above"?{top:-1}:{bottom:-1}}});if(O){const Ce=v.jsx("div",{className:"w-7 border-t my-1.5",style:{borderColor:"var(--color-border)"}});return v.jsxs("div",{className:"flex flex-col items-center h-full bg-theme-bg-secondary border-none py-3",children:[v.jsx(Ei,{onClick:A,label:T("sidebar.expand"),size:"lg",children:v.jsx(X1,{size:16})}),Ce,v.jsx(ts,{to:"/",onClick:He,className:"relative flex items-center justify-center w-9 h-9 rounded-lg transition-colors hover:bg-theme-hover",style:$.pathname==="/"?{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-primary)"}:{color:"var(--color-text-tertiary)"},title:T("sidebar.home"),children:v.jsx(ng,{size:16})}),v.jsxs(ts,{to:"/review",onClick:He,className:"relative flex items-center justify-center w-9 h-9 rounded-lg transition-colors hover:bg-theme-hover mt-0.5",style:$.pathname==="/review"?{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-primary)"}:{color:"var(--color-text-tertiary)"},title:T("sidebar.review"),children:[v.jsx(sg,{size:16}),l!==null&&l>0&&v.jsx("span",{className:"absolute top-1 right-1 w-1.5 h-1.5 rounded-full",style:{backgroundColor:"var(--color-accent)"}})]}),v.jsx(ts,{to:"/agenda",onClick:He,className:"relative flex items-center justify-center w-9 h-9 rounded-lg transition-colors hover:bg-theme-hover mt-0.5",style:$.pathname==="/agenda"?{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-primary)"}:{color:"var(--color-text-tertiary)"},title:T("sidebar.agenda"),children:v.jsx(ig,{size:16})}),Ce,v.jsx("div",{className:"flex-1 overflow-y-auto w-full flex flex-col items-center gap-1 py-1",children:r.map(Ie=>{const ce=d[Ie.id],ze=Ae===String(Ie.id),je=ce?ce.running+ce.running_sessions+ce.running_discussions:0,le=je>0,ie=Da(Ie);return v.jsxs(ts,{to:`/projects/${Ie.id}`,onClick:He,className:"relative flex items-center justify-center w-9 h-9 rounded-lg transition-colors hover:bg-theme-hover",style:ze?{backgroundColor:"var(--color-bg-hover)"}:void 0,title:le?`${Ie.name} · ${je} ${T("detail.live")}`:Ie.name,children:[ze&&v.jsx("span",{className:"absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full",style:{backgroundColor:ie}}),v.jsx("span",{className:`w-2.5 h-2.5 rounded-[3px] ${le?"workspace-dot-pulse":""}`,style:{backgroundColor:ie,opacity:ze||le?1:.55}})]},Ie.id)})}),Ce,v.jsx("span",{className:`w-1.5 h-1.5 rounded-full my-1 ${w?"bg-status-success":"bg-status-error"}`,title:w?T("detail.live"):"Disconnected"}),v.jsx(Ei,{onClick:W,label:T(B==="light"?"theme.dark":"theme.light"),size:"lg",children:B==="light"?v.jsx(rg,{size:16}):v.jsx(lg,{size:16})}),v.jsx(Ei,{onClick:()=>E(!0),label:T("settings.title"),size:"lg",children:v.jsx(og,{size:16})}),v.jsx(gg,{open:D,onClose:()=>E(!1)})]})}return v.jsxs("div",{className:"flex flex-col h-full bg-theme-bg-secondary border-none",onDragStart:Ce=>Ce.preventDefault(),children:[v.jsxs("div",{className:"px-4 pt-5 pb-3 flex items-center justify-between",children:[v.jsxs(ts,{to:"/",onClick:He,className:"block font-mono text-[22px] leading-none whitespace-nowrap select-none",children:[v.jsxs("span",{className:"font-medium text-accent/50",children:[">","_ "]}),v.jsx("span",{className:"font-bold text-accent",children:"CLI"}),v.jsx("span",{className:"font-medium text-theme-text",children:"Trigger"})]}),v.jsx(Ei,{onClick:A,label:T("sidebar.collapse"),size:"sm",className:"hidden md:inline-flex flex-shrink-0",children:v.jsx(Y1,{size:16})})]}),v.jsxs("nav",{className:"px-3 mb-2 space-y-0.5",children:[v.jsxs(ts,{to:"/",onClick:He,className:`relative flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-all duration-200 active:scale-95 ${$.pathname==="/"?"font-medium":""}`,style:$.pathname==="/"?{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-primary)",boxShadow:"var(--shadow-soft)"}:{color:"var(--color-text-tertiary)"},children:[$.pathname==="/"&&v.jsx("span",{className:"absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full",style:{backgroundColor:"var(--color-accent)"}}),v.jsx(ng,{size:16}),T("sidebar.home")]}),v.jsxs(ts,{to:"/review",onClick:He,className:`relative flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-all duration-200 active:scale-95 ${$.pathname==="/review"?"font-medium":""}`,style:$.pathname==="/review"?{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-primary)",boxShadow:"var(--shadow-soft)"}:{color:"var(--color-text-tertiary)"},children:[$.pathname==="/review"&&v.jsx("span",{className:"absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full",style:{backgroundColor:"var(--color-accent)"}}),v.jsx(sg,{size:16}),v.jsx("span",{className:"flex-1",children:T("sidebar.review")}),l!==null&&l>0&&v.jsx("span",{className:"text-2xs px-1.5 py-0.5 rounded-full font-medium",style:{backgroundColor:"var(--color-accent)",color:"white"},children:l})]}),v.jsxs(ts,{to:"/agenda",onClick:He,className:`relative flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-all duration-200 active:scale-95 ${$.pathname==="/agenda"?"font-medium":""}`,style:$.pathname==="/agenda"?{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-primary)",boxShadow:"var(--shadow-soft)"}:{color:"var(--color-text-tertiary)"},children:[$.pathname==="/agenda"&&v.jsx("span",{className:"absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full",style:{backgroundColor:"var(--color-accent)"}}),v.jsx(ig,{size:16}),T("sidebar.agenda")]})]}),v.jsx("div",{className:"mx-4 border-t",style:{borderColor:"var(--color-border)"}}),v.jsxs("div",{className:"flex-1 overflow-y-auto px-3 pt-3",children:[v.jsxs("div",{className:"px-3 mb-2 flex items-center justify-between",children:[v.jsx("span",{className:"text-2xs font-semibold uppercase tracking-wider",style:{color:"var(--color-text-muted)"},children:T("sidebar.workspaces")}),v.jsx(Ei,{onClick:()=>C(!0),label:T("projects.new"),size:"sm",children:v.jsx(Tn,{size:14})})]}),v.jsx("div",{className:"space-y-0.5",children:r.map((Ce,Ie)=>{const ce=d[Ce.id],ze=Ae===String(Ce.id),je=ce?ce.running+ce.running_sessions+ce.running_discussions:0,le=je>0,ie=Da(Ce),_e=I===Ce.id,ue=I!==null&&X===Ie,Pe=I!==null&&Ie===r.length-1&&X===r.length;return v.jsxs("div",{className:"relative","data-workspace-item":!0,children:[ue&&it("above"),v.jsxs(ts,{to:`/projects/${Ce.id}`,draggable:!1,onDragStart:Me=>Me.preventDefault(),onClick:Me=>{if(Be.current){Me.preventDefault();return}He()},onMouseDown:Me=>Ue(Ce.id,Me),onContextMenu:Me=>{Me.preventDefault(),a({project:Ce,x:Me.clientX,y:Me.clientY})},className:`relative flex items-center gap-2.5 px-3 py-1.5 rounded-lg text-sm transition-all duration-200 hover:bg-theme-hover active:scale-95 group ${ze?"font-medium":""} ${_e?"opacity-50":""}`,style:ze?{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-primary)",boxShadow:"var(--shadow-soft)",cursor:I?"grabbing":"pointer",userSelect:"none"}:{color:"var(--color-text-tertiary)",cursor:I?"grabbing":"pointer",userSelect:"none"},children:[ze&&v.jsx("span",{className:"absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full",style:{backgroundColor:ie}}),v.jsx("span",{className:`w-1.5 h-3 rounded-[2px] flex-shrink-0 ${le?"workspace-dot-pulse":""}`,style:{backgroundColor:ie,opacity:ze||le?1:.55},title:le?`${T("sidebar.workspaces")} · ${je} ${T("detail.live")}`:Ce.name}),v.jsx("span",{className:"truncate flex-1",children:Ce.name}),v.jsx(Ei,{onClick:Me=>ct(Ce.id,Me),label:T("projects.delete"),size:"sm",variant:"danger",className:"flex-shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100",children:v.jsx(Ri,{size:12})})]}),Pe&&it("below")]},Ce.id)})})]}),b&&v.jsx(tx,{onSubmit:(Ce,Ie)=>We(Ce,Ie),onCancel:()=>C(!1)}),v.jsxs("div",{className:"px-3 pt-3 pb-2 border-t",style:{borderColor:"var(--color-border)"},children:[v.jsxs("div",{className:"px-3 mb-2 flex items-center justify-between",children:[v.jsx("span",{className:"text-2xs font-semibold uppercase tracking-wider",style:{color:"var(--color-text-muted)"},children:T("sidebar.favorites")}),v.jsx(Ei,{onClick:()=>{k(null),y(!0)},label:T("favorites.add"),size:"sm",children:v.jsx(Tn,{size:14})})]}),v.jsx("div",{className:"space-y-0.5 max-h-48 overflow-y-auto",children:c.map(Ce=>{const Ie=Cx(Ce.type);return v.jsxs("button",{onClick:()=>at(Ce.id),className:"w-full relative flex items-center gap-2.5 px-3 py-1.5 rounded-lg text-sm transition-all duration-200 hover:bg-theme-hover active:scale-95 group",style:{color:"var(--color-text-tertiary)"},title:Ce.target,children:[v.jsx(Ie,{size:14,className:"flex-shrink-0"}),v.jsx("span",{className:"truncate flex-1 text-left",children:Ce.name}),v.jsx("span",{onClick:ce=>Te(Ce,ce),className:"flex-shrink-0 p-0.5 rounded-md opacity-0 group-hover:opacity-100 transition-all hover:bg-theme-hover cursor-pointer",style:{color:"var(--color-text-muted)"},title:T("favorites.edit"),children:v.jsx(J1,{size:12})}),v.jsx("span",{onClick:ce=>ye(Ce.id,ce),className:"flex-shrink-0 p-0.5 rounded-md opacity-0 group-hover:opacity-100 transition-all hover:bg-status-error/10 cursor-pointer",style:{color:"var(--color-text-muted)"},title:T("favorites.delete"),children:v.jsx(Ri,{size:12})})]},Ce.id)})})]}),f&&v.jsx(nx,{initial:R??void 0,onSubmit:$e,onCancel:()=>{y(!1),k(null)}}),p&&v.jsx(yx,{project:p.project,anchorX:p.x,anchorY:p.y,onPick:async Ce=>{try{const Ie=await MS(p.project.id,{color:Ce});u(ce=>ce.map(ze=>ze.id===Ie.id?{...ze,color:Ie.color}:ze)),window.dispatchEvent(new Event("projects:changed"))}catch(Ie){ke(Ie instanceof Error?Ie.message:"Failed to update color")}a(null)},onClose:()=>a(null)}),v.jsx(gg,{open:D,onClose:()=>E(!1)}),v.jsx("div",{className:"px-3 pb-4 pt-2",style:{borderTop:"1px solid var(--color-border)"},children:v.jsxs("div",{className:"flex items-center gap-1 px-1",children:[v.jsx("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 mr-1 ${w?"bg-status-success":"bg-status-error"}`,title:w?T("detail.live"):"Disconnected"}),v.jsx(Ei,{onClick:W,label:T(B==="light"?"theme.dark":"theme.light"),children:B==="light"?v.jsx(rg,{size:16}):v.jsx(lg,{size:16})}),v.jsx(Ei,{onClick:F,label:T("lang.toggle"),className:"text-xs font-medium",children:T("lang.toggle")}),ne&&v.jsx(Ei,{onClick:pe,label:"Notification"in window&&Notification.permission==="denied"?T("notification.blocked"):T("notification.toggle"),variant:ee?"active":"default",pressed:ee,children:ee?v.jsx(Kw,{size:16}):v.jsx(Gw,{size:16})}),v.jsx(Ei,{onClick:Oe,disabled:H,label:T("tunnel.start"),variant:(L==null?void 0:L.status)==="running"?"active":"default",pressed:(L==null?void 0:L.status)==="running",title:(L==null?void 0:L.status)==="running"&&L.url?`${L.url} — ${T("tunnel.urlCopied")}`:T(H?"tunnel.starting":"tunnel.start"),children:v.jsx(Ev,{size:16})}),v.jsx(Ei,{onClick:()=>E(!0),label:T("settings.title"),children:v.jsx(og,{size:16})}),h&&v.jsx(Ei,{onClick:s,label:T("projects.logout"),variant:"danger",className:"ml-auto",children:v.jsx(z1,{size:16})})]})})]})}function Ex({children:s,onLogout:h,authRequired:w,connected:S,onEvent:M}){const[O,A]=j.useState(!1),{t:r}=Tt(),[u,d]=j.useState(()=>localStorage.getItem("sidebarCollapsed")==="1"),g=()=>{d(l=>{const m=!l;return localStorage.setItem("sidebarCollapsed",m?"1":"0"),m})};return v.jsxs("div",{className:"flex h-screen bg-theme-bg",children:[v.jsx("aside",{"data-app-sidebar":!0,className:`
|
|
403
|
-
fixed inset-y-0 left-0 z-40 flex-shrink-0
|
|
404
|
-
transition-[transform,width] duration-200 ease-in-out
|
|
405
|
-
md:translate-x-0 md:static md:z-auto
|
|
406
|
-
${u?"w-60 md:w-14":"w-60"}
|
|
407
|
-
${O?"translate-x-0":"-translate-x-full"}
|
|
408
|
-
`,children:v.jsx(kx,{onLogout:h,authRequired:w,connected:S,onEvent:M,onClose:()=>A(!1),collapsed:u,onToggleCollapsed:g})}),O&&v.jsx("div",{className:"fixed inset-0 z-overlay bg-black/50 backdrop-blur-sm md:hidden",onClick:()=>A(!1)}),v.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden min-w-0",children:[v.jsxs("div",{className:"md:hidden flex items-center px-4 py-3 border-b border-theme-border bg-theme-bg-secondary z-20",children:[v.jsx(Ei,{onClick:()=>A(!0),label:r("sidebar.expand"),size:"md",children:v.jsx(I1,{size:20})}),v.jsx("span",{className:"ml-3 text-sm font-semibold text-theme-text",children:"CLITrigger"})]}),v.jsx("main",{className:"flex-1 overflow-y-auto relative",style:{marginLeft:"var(--dock-inset-left, 0px)",marginRight:"var(--dock-inset-right, 0px)",marginTop:"var(--dock-inset-top, 0px)",marginBottom:"var(--dock-inset-bottom, 0px)"},children:v.jsx("div",{className:"relative",style:{zIndex:1},children:s})})]})]})}function on(s,h){return{kind:"stack",tabs:s.slice(),activeTab:h??s[0]}}function ln(s,h){let w=s;for(const S of h){if(w.kind!=="split"||S<0||S>=w.children.length)return null;w=w.children[S]}return w}function yr(s,h){if(s.kind==="stack")return s.tabs.includes(h)?[]:null;for(let w=0;w<s.children.length;w++){const S=yr(s.children[w],h);if(S)return[w,...S]}return null}function Pt(s){return s.kind==="stack"?s.tabs.slice():s.children.flatMap(Pt)}function wr(s){return s.kind==="stack"?[s.activeTab]:s.children.flatMap(wr)}function Yv(s,h){const w=Pt(s);if(w.length<=1||h==="single")return on(w,wr(s)[0]||w[0]);const S=Math.min(h==="columns"?2:4,w.length),M=Array.from({length:S},()=>[]);w.forEach((l,m)=>M[m%S].push(l));const O=new Set(wr(s)),A=M.map(l=>on(l,l.find(m=>O.has(m))||l[0]));if(h==="columns"||A.length<=2)return{kind:"split",orientation:"horizontal",children:A,sizes:A.map(()=>100/A.length)};const r=A.slice(0,2),u=A.slice(2),d=l=>l.length===1?l[0]:{kind:"split",orientation:"horizontal",children:l,sizes:l.map(()=>100/l.length)};return{kind:"split",orientation:"vertical",children:[d(r),d(u)],sizes:[50,50]}}function Rn(s,h){return Kv(s,h)}function Kv(s,h){if(s.kind==="stack"){if(!s.tabs.includes(h))return s;const O=s.tabs.filter(r=>r!==h);if(O.length===0)return null;const A=s.activeTab===h?O[0]:s.activeTab;return{kind:"stack",tabs:O,activeTab:A}}const w=[],S=[];for(let O=0;O<s.children.length;O++){const A=Kv(s.children[O],h);A!==null&&(w.push(A),S.push(s.sizes[O]))}if(w.length===0)return null;if(w.length===1)return w[0];const M=S.reduce((O,A)=>O+A,0)||1;return{kind:"split",orientation:s.orientation,children:w,sizes:S.map(O=>O/M*100)}}function pr(s,h,w){return Rl(s,h,S=>{if(S.kind!=="stack")throw new Error("insertIntoStack: target must be a stack");return S.tabs.includes(w)?{...S,activeTab:w}:{kind:"stack",tabs:[...S.tabs,w],activeTab:w}})}function Ca(s,h,w,S){const M=w==="left"||w==="right"?"horizontal":"vertical",O=w==="left"||w==="top";return Rl(s,h,A=>({kind:"split",orientation:M,children:O?[S,A]:[A,S],sizes:[50,50]}))}function Xv(s,h,w,S,M){const O=M&&S.includes(M)?M:S[S.length-1],A=w==="center"?S.reduce((r,u)=>pr(r,h,u),s):Ca(s,h,w,on(S,O));return Ki(A,O)}function Rl(s,h,w){if(h.length===0)return gl(w(s));if(s.kind!=="split")throw new Error("replaceAt: path traverses non-split");const[S,...M]=h;if(S<0||S>=s.children.length)throw new Error("replaceAt: bad path");const O=s.children.map((A,r)=>r===S?Rl(A,M,w):A);return gl({...s,children:O})}function gl(s){if(s.kind==="stack")return s;const h=s.children.map(gl),w=[],S=[];for(let O=0;O<h.length;O++){const A=h[O],r=s.sizes[O]??100/h.length;if(A.kind==="split"&&A.orientation===s.orientation){const u=A.sizes.reduce((d,g)=>d+g,0)||1;for(let d=0;d<A.children.length;d++)w.push(A.children[d]),S.push(A.sizes[d]/u*r)}else w.push(A),S.push(r)}if(w.length===1)return w[0];const M=S.reduce((O,A)=>O+A,0)||1;return{kind:"split",orientation:s.orientation,children:w,sizes:S.map(O=>O/M*100)}}function Ki(s,h){return s.kind==="stack"?s.tabs.includes(h)?{...s,activeTab:h}:s:{...s,children:s.children.map(w=>Ki(w,h))}}function Vv(s,h,w){if(s.kind==="stack"){if(!s.tabs.includes(h))return s;const S=s.tabs.indexOf(h),M=Math.max(0,Math.min(w,s.tabs.length-1));if(M===S)return s;const O=s.tabs.slice();return O.splice(S,1),O.splice(M,0,h),{...s,tabs:O}}return{...s,children:s.children.map(S=>Vv(S,h,w))}}function Jv(s,h,w){return Rl(s,h,S=>{if(S.kind!=="split")throw new Error("setSplitSizes: target must be a split");if(S.children.length!==w.length)throw new Error("setSplitSizes: size count mismatch");return{...S,sizes:w}})}function Lx(s,h,w,S){const M=ln(s,w);if(!M||M.kind!=="stack"||S==="center"&&M.tabs.includes(h))return null;const O=M.tabs.find(d=>d!==h);if(!O)return null;const A=Rn(s,h);if(!A)return null;const r=yr(A,O);if(!r)return null;const u=S==="center"?pr(A,r,h):Ca(A,r,S,on([h]));return Ki(u,h)}function Rx(s,h,w){const S=w==="left"||w==="right"?"horizontal":"vertical",M=w==="right"||w==="down";for(let O=h.length-1;O>=0;O--){const A=ln(s,h.slice(0,O));if(!A||A.kind!=="split"||A.orientation!==S)continue;const r=h[O]+(M?1:-1);if(r<0||r>=A.children.length)continue;const u=Dx(s,h,O,S);return[...h.slice(0,O),r,...Tx(A.children[r],M,u,S)]}return null}function Dx(s,h,w,S){let M=0,O=1;for(let A=w;A<h.length;A++){const r=ln(s,h.slice(0,A));if(!r||r.kind!=="split"||r.orientation===S)continue;const u=r.sizes.reduce((m,b)=>m+b,0)||1,d=r.sizes.slice(0,h[A]).reduce((m,b)=>m+b,0)/u,g=r.sizes[h[A]]/u,l=O-M;O=M+l*(d+g),M=M+l*d}return(M+O)/2}function Tx(s,h,w,S){const M=[];let O=s,A=w;for(;O.kind==="split";){let r=O.children.length-1;if(O.orientation===S)r=h?0:O.children.length-1;else{const u=O.sizes.reduce((g,l)=>g+l,0)||1;let d=0;for(let g=0;g<O.children.length;g++){const l=O.sizes[g]/u;if(A<d+l||g===O.children.length-1){r=g,A=l>0?(A-d)/l:.5;break}d+=l}}M.push(r),O=O.children[r]}return M}function Qv(s,h){const w=Pt(s);let S=s;for(const M of w){if(!S)break;h.has(M)||(S=Rn(S,M))}return S}function _g(s){const h=new Set,w=[];for(const S of s){const M=Pt(S.root),O=new Set(M.filter(d=>!h.has(d)));for(const d of M)h.add(d);if(O.size===M.length){w.push(S);continue}const A=Qv(S.root,O);if(!A)continue;const r={};for(const d of Object.keys(S.colors))O.has(d)&&(r[d]=S.colors[d]);const u={};for(const d of Object.keys(S.intents))O.has(d)&&(u[d]=S.intents[d]);w.push({...S,root:A,colors:r,intents:u})}return w}const Mx="clitrigger:session-windows:global";function Bh(){if(typeof BroadcastChannel>"u")return{post:()=>{},subscribe:()=>()=>{},close:()=>{}};const s=new BroadcastChannel(Mx),h=new Set;return s.onmessage=w=>{const S=w.data;for(const M of h)try{M(S)}catch{}},{post:w=>{s.postMessage(w)},subscribe:w=>(h.add(w),()=>{h.delete(w)}),close:()=>{h.clear(),s.close()}}}const gt="main",ph=new Map;function Ax(s,h){ph.set(s,h)}function jx(s){const h=ph.get(s);if(!h||h.closed)return ph.delete(s),!1;try{return h.focus(),!0}catch{return!1}}function Ox(){return`popout_${Math.random().toString(36).slice(2,10)}_${Date.now().toString(36)}`}const Nh=5e3,Zv=15e3;let fr=null;function Mn(){var w;const s=window.electronAPI,h=(w=s==null?void 0:s.getZoomFactor)==null?void 0:w.call(s);return typeof h=="number"&&h>0?h:1}function e_(){if(typeof window>"u")return()=>{};const s=h=>{const w=Mn();fr={ox:h.screenX-h.clientX*w,oy:h.screenY-h.clientY*w,wx:window.screenX,wy:window.screenY}};return window.addEventListener("mousemove",s,{passive:!0}),()=>window.removeEventListener("mousemove",s)}function t_(){if(fr)return{ox:fr.ox+(window.screenX-fr.wx),oy:fr.oy+(window.screenY-fr.wy)};const s=Mn(),h=Math.max(0,(window.outerWidth-window.innerWidth*s)/2),w=Math.max(0,window.outerHeight-window.innerHeight*s-h);return{ox:window.screenX+h,oy:window.screenY+w}}function vl(s,h){const w=Mn(),{ox:S,oy:M}=t_();return{x:(s-S)/w,y:(h-M)/w}}function i_(s,h){const w=Mn(),{ox:S,oy:M}=t_();return{x:S+s*w,y:M+h*w}}function _l(s){return s.x>=0&&s.y>=0&&s.x<=window.innerWidth&&s.y<=window.innerHeight}const mh="clitrigger:popout-alive:";function Bx(s){return`${mh}${s}`}function zh(){return typeof navigator<"u"&&!!navigator.locks&&typeof navigator.locks.query=="function"}function Nx(s){if(!zh())return()=>{};let h=()=>{};return navigator.locks.request(Bx(s),()=>new Promise(w=>{h=w})).catch(()=>{}),()=>h()}async function s_(){var s;if(!zh())return new Set;try{const h=await navigator.locks.query(),w=new Set;for(const S of h.held??[])(s=S.name)!=null&&s.startsWith(mh)&&w.add(S.name.slice(mh.length));return w}catch{return new Set}}const zx={states:{},attention:new Set},Hh=j.createContext(zx);function Ph(s,h,w){const[S,M]=j.useState({}),[O,A]=j.useState(()=>new Set),r=j.useRef(S);r.current=S;const u=j.useRef(h);u.current=h;const d=j.useRef(w);return d.current=w,j.useEffect(()=>s(g=>{var C;if(g.type!=="session:agent-state"||!g.sessionId||!g.state)return;const l=g.sessionId,m=g.state;if(r.current[l]===m)return;M(p=>({...p,[l]:m})),(m==="blocked"||m==="done"&&g.reason!=="stopped")&&!u.current.has(l)?(A(p=>p.has(l)?p:new Set(p).add(l)),(C=d.current)==null||C.call(d,l,m)):A(p=>{if(!p.has(l))return p;const a=new Set(p);return a.delete(l),a})}),[s]),j.useEffect(()=>{A(g=>{let l=null;for(const m of h)g.has(m)&&(l||(l=new Set(g)),l.delete(m));return l??g})},[h]),{states:S,attention:O}}const Ta="sessionGroups:",Hx="pendingSessionRestore",Px="pendingSessionRecall",n_="sessionDockOrder",r_="sessionDockTray:left";function dr(s){return`${s.projectId}:${s.groupId}`}function Ix(){try{const s=localStorage.getItem(n_),h=s?JSON.parse(s):[];return Array.isArray(h)?h.filter(w=>typeof w=="string"):[]}catch{return[]}}function Fx(s){try{localStorage.setItem(n_,JSON.stringify(s))}catch{}}function Ux(){try{const s=localStorage.getItem(r_);if(s===null)return null;const h=Number(s);return Number.isFinite(h)?h:null}catch{return null}}function bg(s){try{localStorage.setItem(r_,String(Math.round(s)))}catch{}}function yg(){var h;const s=[];try{for(let w=0;w<localStorage.length;w++){const S=localStorage.key(w);if(!S||!S.startsWith(Ta))continue;const M=S.slice(Ta.length),O=localStorage.getItem(S);if(O)try{const A=JSON.parse(O);if(!Array.isArray(A.groups))continue;const r=A.titles??{};for(const u of A.groups){if(!(u!=null&&u.root))continue;const d=!!u.ownerWindowId&&u.ownerWindowId!==gt;if(!d&&!u.minimized)continue;const g=Pt(u.root);s.push({projectId:M,groupId:u.id,sessionIds:g,titles:r,colorProjectId:((h=A.sessionProjects)==null?void 0:h[g[0]])??M,kind:d?"popped":"minimized",ownerWindowId:d?u.ownerWindowId:void 0})}}catch{}}}catch{}return s.sort((w,S)=>w.projectId.localeCompare(S.projectId)||w.groupId.localeCompare(S.groupId)),s}function $x(s,h){try{const w=Ta+s,S=localStorage.getItem(w);if(!S)return;const M=JSON.parse(S);if(!Array.isArray(M.groups))return;M.groups=M.groups.map(O=>O.id===h?{...O,ownerWindowId:gt}:O),localStorage.setItem(w,JSON.stringify(M))}catch{}}function Wx(s){const h=s.match(/^\/projects\/([^/]+)/);return h?h[1]:null}const qx=new Set;function Gx({onEvent:s}){const{t:h}=Tt(),{sendNotification:w}=Ll(),S=xl(),M=ns(),[O,A]=j.useState(()=>yg()),[r,u]=j.useState({}),d=Wx(M.pathname),g=j.useCallback(()=>A(yg()),[]),l=j.useRef(null);j.useEffect(()=>{const $=Bh();return l.current=$,()=>{$.close(),l.current=null}},[]);const[m,b]=j.useState(()=>Ix()),C=j.useRef(null),p=j.useMemo(()=>{const $=U=>{const T=m.indexOf(U);return T===-1?Number.MAX_SAFE_INTEGER:T};return[...O].sort((U,T)=>$(dr(U))-$(dr(T)))},[O,m]),a=j.useCallback($=>{const U=C.current;if(C.current=null,!U||U===$)return;const T=p.map(dr),F=T.indexOf(U),B=T.indexOf($);F<0||B<0||(T.splice(B,0,T.splice(F,1)[0]),b(T),Fx(T))},[p]),c=j.useRef(null),o=j.useRef(Ux()),f=j.useRef(null),[y,R]=j.useState(()=>o.current),k=j.useCallback($=>{const U=c.current;if(U){$.preventDefault(),f.current={startX:$.clientX,startLeft:U.getBoundingClientRect().left};try{$.currentTarget.setPointerCapture($.pointerId)}catch{}}},[]),D=j.useCallback($=>{var W;const U=f.current;if(!U)return;const T=((W=c.current)==null?void 0:W.offsetWidth)??200,F=Math.max(8,window.innerWidth-T-8),B=Math.max(8,Math.min(U.startLeft+($.clientX-U.startX),F));o.current=B,R(B)},[]),E=j.useCallback($=>{if(f.current){f.current=null;try{$.currentTarget.releasePointerCapture($.pointerId)}catch{}o.current!==null&&bg(o.current)}},[]);j.useEffect(()=>{const $=()=>R(U=>{var B;if(U===null)return U;const T=((B=c.current)==null?void 0:B.offsetWidth)??200,F=Math.max(8,Math.min(U,window.innerWidth-T-8));return F!==U&&(o.current=F,bg(F)),F});return window.addEventListener("resize",$),()=>window.removeEventListener("resize",$)},[]),j.useEffect(()=>{const $=()=>Bv().then(U=>{const T={};for(const F of U)T[F.id]=F;u(T)}).catch(()=>{});return $(),window.addEventListener("projects:changed",$),()=>window.removeEventListener("projects:changed",$)},[]),j.useEffect(()=>{const $=T=>{(T.key===null||T.key.startsWith(Ta))&&g()},U=()=>g();return window.addEventListener("storage",$),window.addEventListener("session-windows:changed",U),()=>{window.removeEventListener("storage",$),window.removeEventListener("session-windows:changed",U)}},[g]),j.useEffect(()=>{g()},[M.pathname,g]);const L=j.useRef(O);L.current=O;const{states:z,attention:H}=Ph(s,qx,($,U)=>{const T=L.current.find(F=>F.kind==="minimized"&&F.sessionIds.includes($));T&&w(h(U==="blocked"?"notification.sessionBlocked":"notification.sessionDone"),T.titles[$]||$,()=>I(T,$))}),P=j.useRef(new Map);j.useEffect(()=>{if(!zh())return;const $=async()=>{const T=L.current.filter(ee=>ee.kind==="popped"&&!!ee.ownerWindowId&&ee.projectId!==d);if(T.length===0){P.current.clear();return}const F=await s_(),B=Date.now();let W=!1;for(const ee of T){const ne=ee.ownerWindowId;if(F.has(ne)){P.current.delete(ne);continue}const pe=P.current.get(ne);if(pe===void 0){P.current.set(ne,B);continue}B-pe<Zv||(P.current.delete(ne),$x(ee.projectId,ee.groupId),W=!0)}W&&g()},U=setInterval(()=>{$()},Nh);return()=>clearInterval(U)},[d,g]);const I=($,U)=>{var T;if($.kind==="popped"){$.ownerWindowId&&(jx($.ownerWindowId),(T=l.current)==null||T.post({t:"group-focus",popoutId:$.ownerWindowId,groupId:$.groupId}));return}if($.projectId===d){window.dispatchEvent(new CustomEvent("session-windows:restore",{detail:{projectId:$.projectId,groupId:$.groupId,sessionId:U}}));return}try{sessionStorage.setItem(Hx,JSON.stringify({projectId:$.projectId,groupId:$.groupId,sessionId:U}))}catch{}S(`/projects/${$.projectId}`)},K=$=>{if($.projectId===d){window.dispatchEvent(new CustomEvent("session-windows:recall",{detail:{projectId:$.projectId,groupId:$.groupId}}));return}try{sessionStorage.setItem(Px,JSON.stringify({projectId:$.projectId,groupId:$.groupId}))}catch{}S(`/projects/${$.projectId}`)},X=$=>{if($.projectId===d){window.dispatchEvent(new CustomEvent("session-windows:close",{detail:{projectId:$.projectId,groupId:$.groupId}}));return}try{const U=Ta+$.projectId,T=localStorage.getItem(U);if(T){const F=JSON.parse(T);Array.isArray(F.groups)&&(F.groups=F.groups.filter(B=>B.id!==$.groupId),localStorage.setItem(U,JSON.stringify(F)))}}catch{}g()},Y=y!==null;return O.length===0?null:zi.createPortal(v.jsxs("div",{ref:c,className:Y?"fixed bottom-2":"fixed bottom-2 left-2 md:left-[248px] max-w-[calc(100vw-16px)] md:max-w-[calc(100vw-256px)]",style:{display:"flex",alignItems:"center",gap:6,zIndex:900,flexWrap:"wrap",...Y?{left:y,maxWidth:`calc(100vw - ${Math.round(y)+8}px)`}:{}},children:[v.jsx("div",{onPointerDown:k,onPointerMove:D,onPointerUp:E,"aria-label":"move dock",style:{display:"flex",alignItems:"center",flexShrink:0,color:Ee.titleText,cursor:"grab",padding:2,touchAction:"none"},children:v.jsx(L1,{size:14})}),p.map($=>{const U=$.sessionIds.map(ne=>$.titles[ne]||ne),T=U.length===1?U[0]:`${U[0]} +${U.length-1}`,F=$.projectId!==d,B=$.kind==="popped",W=B?void 0:$.sessionIds.find(ne=>H.has(ne)),ee=W?z[W]:void 0;return v.jsxs("div",{draggable:!0,onDragStart:ne=>{C.current=dr($),ne.dataTransfer.effectAllowed="move"},onDragOver:ne=>{C.current&&C.current!==dr($)&&ne.preventDefault()},onDrop:ne=>{ne.preventDefault(),a(dr($))},onDragEnd:()=>{C.current=null},onClick:()=>I($),title:`${F?`[${$.projectId}] `:""}${U.join(" · ")}${B?` — ${h("session.dock.poppedHint")}`:""}${ee?` — ${ee}`:""}`,style:{display:"flex",alignItems:"center",gap:6,background:Ee.titleBg,border:B?"1px solid rgba(139,92,246,0.7)":`1px solid ${Ee.separator}`,opacity:F?.75:1,borderRadius:6,padding:"4px 6px 4px 4px",fontFamily:vt,fontSize:12,color:Ee.titleText,cursor:"pointer",boxShadow:"0 4px 12px rgba(0,0,0,0.35)",maxWidth:240,userSelect:"none"},children:[v.jsx("div",{style:{height:12,width:12,borderRadius:3,flexShrink:0,background:r[$.colorProjectId]?Da(r[$.colorProjectId]):Da({id:$.colorProjectId})}}),B&&v.jsx(_r,{size:12,style:{flexShrink:0,color:"rgb(167,139,250)"}}),ee&&v.jsx("span",{"aria-label":ee,style:{width:7,height:7,borderRadius:"50%",flexShrink:0,background:ee==="blocked"?Ee.warning:Ee.info}}),v.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:T}),B&&v.jsx("button",{onClick:ne=>{ne.stopPropagation(),K($)},"aria-label":"recall",title:h("session.recallToMain"),style:{background:"transparent",border:"none",color:"rgb(167,139,250)",cursor:"pointer",padding:2,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:3},children:v.jsx(El,{size:12})}),v.jsx("button",{onClick:ne=>{ne.stopPropagation(),X($)},"aria-label":"close",style:{background:"transparent",border:"none",color:Ee.titleText,cursor:"pointer",padding:2,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:3},children:v.jsx(Ri,{size:12})})]},`${$.projectId}:${$.groupId}`)})]}),document.body)}var Ku={exports:{}},wg;function Yx(){return wg||(wg=1,(function(s,h){(function(w,S){s.exports=S()})(globalThis,(()=>(()=>{var w={4567:function(A,r,u){var d=this&&this.__decorate||function(o,f,y,R){var k,D=arguments.length,E=D<3?f:R===null?R=Object.getOwnPropertyDescriptor(f,y):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(o,f,y,R);else for(var L=o.length-1;L>=0;L--)(k=o[L])&&(E=(D<3?k(E):D>3?k(f,y,E):k(f,y))||E);return D>3&&E&&Object.defineProperty(f,y,E),E},g=this&&this.__param||function(o,f){return function(y,R){f(y,R,o)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const l=u(9042),m=u(9924),b=u(844),C=u(4725),p=u(2585),a=u(3656);let c=r.AccessibilityManager=class extends b.Disposable{constructor(o,f,y,R){super(),this._terminal=o,this._coreBrowserService=y,this._renderService=R,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 k=0;k<this._terminal.rows;k++)this._rowElements[k]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[k]);if(this._topBoundaryFocusListener=k=>this._handleBoundaryFocus(k,0),this._bottomBoundaryFocusListener=k=>this._handleBoundaryFocus(k,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 m.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((k=>this._handleResize(k.rows)))),this.register(this._terminal.onRender((k=>this._refreshRows(k.start,k.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((k=>this._handleChar(k)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
409
|
-
`)))),this.register(this._terminal.onA11yTab((k=>this._handleTab(k)))),this.register(this._terminal.onKey((k=>this._handleKey(k.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,a.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,b.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(o){for(let f=0;f<o;f++)this._handleChar(" ")}_handleChar(o){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==o&&(this._charsToAnnounce+=o):this._charsToAnnounce+=o,o===`
|
|
410
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=l.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(o){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(o)||this._charsToConsume.push(o)}_refreshRows(o,f){this._liveRegionDebouncer.refresh(o,f,this._terminal.rows)}_renderRows(o,f){const y=this._terminal.buffer,R=y.lines.length.toString();for(let k=o;k<=f;k++){const D=y.lines.get(y.ydisp+k),E=[],L=(D==null?void 0:D.translateToString(!0,void 0,void 0,E))||"",z=(y.ydisp+k+1).toString(),H=this._rowElements[k];H&&(L.length===0?(H.innerText=" ",this._rowColumns.set(H,[0,1])):(H.textContent=L,this._rowColumns.set(H,E)),H.setAttribute("aria-posinset",z),H.setAttribute("aria-setsize",R))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,f){const y=o.target,R=this._rowElements[f===0?1:this._rowElements.length-2];if(y.getAttribute("aria-posinset")===(f===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==R)return;let k,D;if(f===0?(k=y,D=this._rowElements.pop(),this._rowContainer.removeChild(D)):(k=this._rowElements.shift(),D=y,this._rowContainer.removeChild(k)),k.removeEventListener("focus",this._topBoundaryFocusListener),D.removeEventListener("focus",this._bottomBoundaryFocusListener),f===0){const E=this._createAccessibilityTreeNode();this._rowElements.unshift(E),this._rowContainer.insertAdjacentElement("afterbegin",E)}else{const E=this._createAccessibilityTreeNode();this._rowElements.push(E),this._rowContainer.appendChild(E)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(f===0?-1:1),this._rowElements[f===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}_handleSelectionChange(){var L;if(this._rowElements.length===0)return;const o=document.getSelection();if(!o)return;if(o.isCollapsed)return void(this._rowContainer.contains(o.anchorNode)&&this._terminal.clearSelection());if(!o.anchorNode||!o.focusNode)return void console.error("anchorNode and/or focusNode are null");let f={node:o.anchorNode,offset:o.anchorOffset},y={node:o.focusNode,offset:o.focusOffset};if((f.node.compareDocumentPosition(y.node)&Node.DOCUMENT_POSITION_PRECEDING||f.node===y.node&&f.offset>y.offset)&&([f,y]=[y,f]),f.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(f={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(f.node))return;const R=this._rowElements.slice(-1)[0];if(y.node.compareDocumentPosition(R)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(y={node:R,offset:((L=R.textContent)==null?void 0:L.length)??0}),!this._rowContainer.contains(y.node))return;const k=({node:z,offset:H})=>{const P=z instanceof Text?z.parentNode:z;let I=parseInt(P==null?void 0:P.getAttribute("aria-posinset"),10)-1;if(isNaN(I))return console.warn("row is invalid. Race condition?"),null;const K=this._rowColumns.get(P);if(!K)return console.warn("columns is null. Race condition?"),null;let X=H<K.length?K[H]:K.slice(-1)[0]+1;return X>=this._terminal.cols&&(++I,X=0),{row:I,column:X}},D=k(f),E=k(y);if(D&&E){if(D.row>E.row||D.row===E.row&&D.column>=E.column)throw new Error("invalid range");this._terminal.select(D.column,D.row,(E.row-D.row)*this._terminal.cols-D.column+E.column)}}_handleResize(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let f=this._rowContainer.children.length;f<this._terminal.rows;f++)this._rowElements[f]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[f]);for(;this._rowElements.length>o;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const o=this._coreBrowserService.mainDocument.createElement("div");return o.setAttribute("role","listitem"),o.tabIndex=-1,this._refreshRowDimensions(o),o}_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 o=0;o<this._terminal.rows;o++)this._refreshRowDimensions(this._rowElements[o])}}_refreshRowDimensions(o){o.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=c=d([g(1,p.IInstantiationService),g(2,C.ICoreBrowserService),g(3,C.IRenderService)],c)},3614:(A,r)=>{function u(m){return m.replace(/\r?\n/g,"\r")}function d(m,b){return b?"\x1B[200~"+m+"\x1B[201~":m}function g(m,b,C,p){m=d(m=u(m),C.decPrivateModes.bracketedPasteMode&&p.rawOptions.ignoreBracketedPasteMode!==!0),C.triggerDataEvent(m,!0),b.value=""}function l(m,b,C){const p=C.getBoundingClientRect(),a=m.clientX-p.left-10,c=m.clientY-p.top-10;b.style.width="20px",b.style.height="20px",b.style.left=`${a}px`,b.style.top=`${c}px`,b.style.zIndex="1000",b.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=u,r.bracketTextForPaste=d,r.copyHandler=function(m,b){m.clipboardData&&m.clipboardData.setData("text/plain",b.selectionText),m.preventDefault()},r.handlePasteEvent=function(m,b,C,p){m.stopPropagation(),m.clipboardData&&g(m.clipboardData.getData("text/plain"),b,C,p)},r.paste=g,r.moveTextAreaUnderMouseCursor=l,r.rightClickHandler=function(m,b,C,p,a){l(m,b,C),a&&p.rightClickSelect(m),b.value=p.selectionText,b.select()}},7239:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const d=u(1505);r.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(g,l,m){this._css.set(g,l,m)}getCss(g,l){return this._css.get(g,l)}setColor(g,l,m){this._color.set(g,l,m)}getColor(g,l){return this._color.get(g,l)}clear(){this._color.clear(),this._css.clear()}}},3656:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(u,d,g,l){u.addEventListener(d,g,l);let m=!1;return{dispose:()=>{m||(m=!0,u.removeEventListener(d,g,l))}}}},3551:function(A,r,u){var d=this&&this.__decorate||function(c,o,f,y){var R,k=arguments.length,D=k<3?o:y===null?y=Object.getOwnPropertyDescriptor(o,f):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(c,o,f,y);else for(var E=c.length-1;E>=0;E--)(R=c[E])&&(D=(k<3?R(D):k>3?R(o,f,D):R(o,f))||D);return k>3&&D&&Object.defineProperty(o,f,D),D},g=this&&this.__param||function(c,o){return function(f,y){o(f,y,c)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;const l=u(3656),m=u(8460),b=u(844),C=u(2585),p=u(4725);let a=r.Linkifier=class extends b.Disposable{get currentLink(){return this._currentLink}constructor(c,o,f,y,R){super(),this._element=c,this._mouseService=o,this._renderService=f,this._bufferService=y,this._linkProviderService=R,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,b.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,b.toDisposable)((()=>{var k;this._lastMouseEvent=void 0,(k=this._activeProviderReplies)==null||k.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,l.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,l.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,l.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,l.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(c){this._lastMouseEvent=c;const o=this._positionFromMouseEvent(c,this._element,this._mouseService);if(!o)return;this._isMouseOut=!1;const f=c.composedPath();for(let y=0;y<f.length;y++){const R=f[y];if(R.classList.contains("xterm"))break;if(R.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._handleHover(o),this._lastBufferCell=o)}_handleHover(c){if(this._activeLine!==c.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(c,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,c)||(this._clearCurrentLink(),this._askForLink(c,!0))}_askForLink(c,o){var y,R;this._activeProviderReplies&&o||((y=this._activeProviderReplies)==null||y.forEach((k=>{k==null||k.forEach((D=>{D.link.dispose&&D.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=c.y);let f=!1;for(const[k,D]of this._linkProviderService.linkProviders.entries())o?(R=this._activeProviderReplies)!=null&&R.get(k)&&(f=this._checkLinkProviderResult(k,c,f)):D.provideLinks(c.y,(E=>{var z,H;if(this._isMouseOut)return;const L=E==null?void 0:E.map((P=>({link:P})));(z=this._activeProviderReplies)==null||z.set(k,L),f=this._checkLinkProviderResult(k,c,f),((H=this._activeProviderReplies)==null?void 0:H.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(c.y,this._activeProviderReplies)}))}_removeIntersectingLinks(c,o){const f=new Set;for(let y=0;y<o.size;y++){const R=o.get(y);if(R)for(let k=0;k<R.length;k++){const D=R[k],E=D.link.range.start.y<c?0:D.link.range.start.x,L=D.link.range.end.y>c?this._bufferService.cols:D.link.range.end.x;for(let z=E;z<=L;z++){if(f.has(z)){R.splice(k--,1);break}f.add(z)}}}}_checkLinkProviderResult(c,o,f){var k;if(!this._activeProviderReplies)return f;const y=this._activeProviderReplies.get(c);let R=!1;for(let D=0;D<c;D++)this._activeProviderReplies.has(D)&&!this._activeProviderReplies.get(D)||(R=!0);if(!R&&y){const D=y.find((E=>this._linkAtPosition(E.link,o)));D&&(f=!0,this._handleNewLink(D))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!f)for(let D=0;D<this._activeProviderReplies.size;D++){const E=(k=this._activeProviderReplies.get(D))==null?void 0:k.find((L=>this._linkAtPosition(L.link,o)));if(E){f=!0,this._handleNewLink(E);break}}return f}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(c){if(!this._currentLink)return;const o=this._positionFromMouseEvent(c,this._element,this._mouseService);o&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(c,this._currentLink.link.text)}_clearCurrentLink(c,o){this._currentLink&&this._lastMouseEvent&&(!c||!o||this._currentLink.link.range.start.y>=c&&this._currentLink.link.range.end.y<=o)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,b.disposeArray)(this._linkCacheDisposables))}_handleNewLink(c){if(!this._lastMouseEvent)return;const o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._linkAtPosition(c.link,o)&&(this._currentLink=c,this._currentLink.state={decorations:{underline:c.link.decorations===void 0||c.link.decorations.underline,pointerCursor:c.link.decorations===void 0||c.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,c.link,this._lastMouseEvent),c.link.decorations={},Object.defineProperties(c.link.decorations,{pointerCursor:{get:()=>{var f,y;return(y=(f=this._currentLink)==null?void 0:f.state)==null?void 0:y.decorations.pointerCursor},set:f=>{var y;(y=this._currentLink)!=null&&y.state&&this._currentLink.state.decorations.pointerCursor!==f&&(this._currentLink.state.decorations.pointerCursor=f,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",f))}},underline:{get:()=>{var f,y;return(y=(f=this._currentLink)==null?void 0:f.state)==null?void 0:y.decorations.underline},set:f=>{var y,R,k;(y=this._currentLink)!=null&&y.state&&((k=(R=this._currentLink)==null?void 0:R.state)==null?void 0:k.decorations.underline)!==f&&(this._currentLink.state.decorations.underline=f,this._currentLink.state.isHovered&&this._fireUnderlineEvent(c.link,f))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((f=>{if(!this._currentLink)return;const y=f.start===0?0:f.start+1+this._bufferService.buffer.ydisp,R=this._bufferService.buffer.ydisp+1+f.end;if(this._currentLink.link.range.start.y>=y&&this._currentLink.link.range.end.y<=R&&(this._clearCurrentLink(y,R),this._lastMouseEvent)){const k=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);k&&this._askForLink(k,!1)}}))))}_linkHover(c,o,f){var y;(y=this._currentLink)!=null&&y.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&c.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(f,o.text)}_fireUnderlineEvent(c,o){const f=c.range,y=this._bufferService.buffer.ydisp,R=this._createLinkUnderlineEvent(f.start.x-1,f.start.y-y-1,f.end.x,f.end.y-y-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(R)}_linkLeave(c,o,f){var y;(y=this._currentLink)!=null&&y.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&c.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(f,o.text)}_linkAtPosition(c,o){const f=c.range.start.y*this._bufferService.cols+c.range.start.x,y=c.range.end.y*this._bufferService.cols+c.range.end.x,R=o.y*this._bufferService.cols+o.x;return f<=R&&R<=y}_positionFromMouseEvent(c,o,f){const y=f.getCoords(c,o,this._bufferService.cols,this._bufferService.rows);if(y)return{x:y[0],y:y[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(c,o,f,y,R){return{x1:c,y1:o,x2:f,y2:y,cols:this._bufferService.cols,fg:R}}};r.Linkifier=a=d([g(1,p.IMouseService),g(2,p.IRenderService),g(3,C.IBufferService),g(4,p.ILinkProviderService)],a)},9042:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(A,r,u){var d=this&&this.__decorate||function(p,a,c,o){var f,y=arguments.length,R=y<3?a:o===null?o=Object.getOwnPropertyDescriptor(a,c):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(p,a,c,o);else for(var k=p.length-1;k>=0;k--)(f=p[k])&&(R=(y<3?f(R):y>3?f(a,c,R):f(a,c))||R);return y>3&&R&&Object.defineProperty(a,c,R),R},g=this&&this.__param||function(p,a){return function(c,o){a(c,o,p)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const l=u(511),m=u(2585);let b=r.OscLinkProvider=class{constructor(p,a,c){this._bufferService=p,this._optionsService=a,this._oscLinkService=c}provideLinks(p,a){var L;const c=this._bufferService.buffer.lines.get(p-1);if(!c)return void a(void 0);const o=[],f=this._optionsService.rawOptions.linkHandler,y=new l.CellData,R=c.getTrimmedLength();let k=-1,D=-1,E=!1;for(let z=0;z<R;z++)if(D!==-1||c.hasContent(z)){if(c.loadCell(z,y),y.hasExtendedAttrs()&&y.extended.urlId){if(D===-1){D=z,k=y.extended.urlId;continue}E=y.extended.urlId!==k}else D!==-1&&(E=!0);if(E||D!==-1&&z===R-1){const H=(L=this._oscLinkService.getLinkData(k))==null?void 0:L.uri;if(H){const P={start:{x:D+1,y:p},end:{x:z+(E||z!==R-1?0:1),y:p}};let I=!1;if(!(f!=null&&f.allowNonHttpProtocols))try{const K=new URL(H);["http:","https:"].includes(K.protocol)||(I=!0)}catch{I=!0}I||o.push({text:H,range:P,activate:(K,X)=>f?f.activate(K,X,P):C(0,X),hover:(K,X)=>{var Y;return(Y=f==null?void 0:f.hover)==null?void 0:Y.call(f,K,X,P)},leave:(K,X)=>{var Y;return(Y=f==null?void 0:f.leave)==null?void 0:Y.call(f,K,X,P)}})}E=!1,y.hasExtendedAttrs()&&y.extended.urlId?(D=z,k=y.extended.urlId):(D=-1,k=-1)}}a(o)}};function C(p,a){if(confirm(`Do you want to navigate to ${a}?
|
|
411
|
-
|
|
412
|
-
WARNING: This link could potentially be dangerous`)){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=a}else console.warn("Opening link blocked as opener could not be cleared")}}r.OscLinkProvider=b=d([g(0,m.IBufferService),g(1,m.IOptionsService),g(2,m.IOscLinkService)],b)},6193:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RenderDebouncer=void 0,r.RenderDebouncer=class{constructor(u,d){this._renderCallback=u,this._coreBrowserService=d,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,d,g){this._rowCount=g,u=u!==void 0?u:0,d=d!==void 0?d: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,d):d,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),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Terminal=void 0;const d=u(3614),g=u(3656),l=u(3551),m=u(9042),b=u(3730),C=u(1680),p=u(3107),a=u(5744),c=u(2950),o=u(1296),f=u(428),y=u(4269),R=u(5114),k=u(8934),D=u(3230),E=u(9312),L=u(4725),z=u(6731),H=u(8055),P=u(8969),I=u(8460),K=u(844),X=u(6114),Y=u(8437),$=u(2584),U=u(7399),T=u(5941),F=u(9074),B=u(2585),W=u(5435),ee=u(4567),ne=u(779);class pe extends P.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(Q={}){super(Q),this.browser=X,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new K.MutableDisposable),this._onCursorMove=this.register(new I.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new I.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new I.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new I.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new I.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new I.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new I.EventEmitter),this._onBlur=this.register(new I.EventEmitter),this._onA11yCharEmitter=this.register(new I.EventEmitter),this._onA11yTabEmitter=this.register(new I.EventEmitter),this._onWillOpen=this.register(new I.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(F.DecorationService),this._instantiationService.setService(B.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ne.LinkProviderService),this._instantiationService.setService(L.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(b.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((G,he)=>this.refresh(G,he)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((G=>this._reportWindowsOptions(G)))),this.register(this._inputHandler.onColor((G=>this._handleColorEvent(G)))),this.register((0,I.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,I.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,I.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,I.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((G=>this._afterResize(G.cols,G.rows)))),this.register((0,K.toDisposable)((()=>{var G,he;this._customKeyEventHandler=void 0,(he=(G=this.element)==null?void 0:G.parentNode)==null||he.removeChild(this.element)})))}_handleColorEvent(Q){if(this._themeService)for(const G of Q){let he,ae="";switch(G.index){case 256:he="foreground",ae="10";break;case 257:he="background",ae="11";break;case 258:he="cursor",ae="12";break;default:he="ansi",ae="4;"+G.index}switch(G.type){case 0:const Ae=H.color.toColorRGB(he==="ansi"?this._themeService.colors.ansi[G.index]:this._themeService.colors[he]);this.coreService.triggerDataEvent(`${$.C0.ESC}]${ae};${(0,T.toRgbString)(Ae)}${$.C1_ESCAPED.ST}`);break;case 1:if(he==="ansi")this._themeService.modifyColors((Oe=>Oe.ansi[G.index]=H.channels.toColor(...G.color)));else{const Oe=he;this._themeService.modifyColors((Ye=>Ye[Oe]=H.channels.toColor(...G.color)))}break;case 2:this._themeService.restoreColor(G.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Q){Q?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(ee.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Q){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var Q;return(Q=this.textarea)==null?void 0:Q.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const Q=this.buffer.ybase+this.buffer.y,G=this.buffer.lines.get(Q);if(!G)return;const he=Math.min(this.buffer.x,this.cols-1),ae=this._renderService.dimensions.css.cell.height,Ae=G.getWidth(he),Oe=this._renderService.dimensions.css.cell.width*Ae,Ye=this.buffer.y*this._renderService.dimensions.css.cell.height,$e=he*this._renderService.dimensions.css.cell.width;this.textarea.style.left=$e+"px",this.textarea.style.top=Ye+"px",this.textarea.style.width=Oe+"px",this.textarea.style.height=ae+"px",this.textarea.style.lineHeight=ae+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,g.addDisposableDomListener)(this.element,"copy",(G=>{this.hasSelection()&&(0,d.copyHandler)(G,this._selectionService)})));const Q=G=>(0,d.handlePasteEvent)(G,this.textarea,this.coreService,this.optionsService);this.register((0,g.addDisposableDomListener)(this.textarea,"paste",Q)),this.register((0,g.addDisposableDomListener)(this.element,"paste",Q)),X.isFirefox?this.register((0,g.addDisposableDomListener)(this.element,"mousedown",(G=>{G.button===2&&(0,d.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,g.addDisposableDomListener)(this.element,"contextmenu",(G=>{(0,d.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),X.isLinux&&this.register((0,g.addDisposableDomListener)(this.element,"auxclick",(G=>{G.button===1&&(0,d.moveTextAreaUnderMouseCursor)(G,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,g.addDisposableDomListener)(this.textarea,"keyup",(Q=>this._keyUp(Q)),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"keydown",(Q=>this._keyDown(Q)),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"keypress",(Q=>this._keyPress(Q)),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionupdate",(Q=>this._compositionHelper.compositionupdate(Q)))),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,g.addDisposableDomListener)(this.textarea,"input",(Q=>this._inputEvent(Q)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Q){var he;if(!Q)throw new Error("Terminal requires a parent element.");if(Q.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((he=this.element)==null?void 0:he.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Q.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),Q.appendChild(this.element);const G=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),G.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,g.addDisposableDomListener)(this.screenElement,"mousemove",(ae=>this.updateCursorStyle(ae)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),G.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),X.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(R.CoreBrowserService,this.textarea,Q.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(L.ICoreBrowserService,this._coreBrowserService),this.register((0,g.addDisposableDomListener)(this.textarea,"focus",(ae=>this._handleTextAreaFocus(ae)))),this.register((0,g.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(f.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(L.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(z.ThemeService),this._instantiationService.setService(L.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(y.CharacterJoinerService),this._instantiationService.setService(L.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(D.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(L.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ae=>this._onRender.fire(ae)))),this.onResize((ae=>this._renderService.resize(ae.cols,ae.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(c.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(k.MouseService),this._instantiationService.setService(L.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(l.Linkifier,this.screenElement)),this.element.appendChild(G);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(C.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ae=>this.scrollLines(ae.amount,ae.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(E.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(L.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ae=>this.scrollLines(ae.amount,ae.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ae=>this._renderService.handleSelectionChanged(ae.start,ae.end,ae.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ae=>{this.textarea.value=ae,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ae=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,g.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(p.BufferDecorationRenderer,this.screenElement)),this.register((0,g.addDisposableDomListener)(this.element,"mousedown",(ae=>this._selectionService.handleMouseDown(ae)))),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(ee.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ae=>this._handleScreenReaderModeOptionChange(ae)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(a.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ae=>{!this._overviewRulerRenderer&&ae&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(a.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(o.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const Q=this,G=this.element;function he(Oe){const Ye=Q._mouseService.getMouseReportCoords(Oe,Q.screenElement);if(!Ye)return!1;let $e,at;switch(Oe.overrideType||Oe.type){case"mousemove":at=32,Oe.buttons===void 0?($e=3,Oe.button!==void 0&&($e=Oe.button<3?Oe.button:3)):$e=1&Oe.buttons?0:4&Oe.buttons?1:2&Oe.buttons?2:3;break;case"mouseup":at=0,$e=Oe.button<3?Oe.button:3;break;case"mousedown":at=1,$e=Oe.button<3?Oe.button:3;break;case"wheel":if(Q._customWheelEventHandler&&Q._customWheelEventHandler(Oe)===!1||Q.viewport.getLinesScrolled(Oe)===0)return!1;at=Oe.deltaY<0?0:1,$e=4;break;default:return!1}return!(at===void 0||$e===void 0||$e>4)&&Q.coreMouseService.triggerMouseEvent({col:Ye.col,row:Ye.row,x:Ye.x,y:Ye.y,button:$e,action:at,ctrl:Oe.ctrlKey,alt:Oe.altKey,shift:Oe.shiftKey})}const ae={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Ae={mouseup:Oe=>(he(Oe),Oe.buttons||(this._document.removeEventListener("mouseup",ae.mouseup),ae.mousedrag&&this._document.removeEventListener("mousemove",ae.mousedrag)),this.cancel(Oe)),wheel:Oe=>(he(Oe),this.cancel(Oe,!0)),mousedrag:Oe=>{Oe.buttons&&he(Oe)},mousemove:Oe=>{Oe.buttons||he(Oe)}};this.register(this.coreMouseService.onProtocolChange((Oe=>{Oe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Oe)),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&Oe?ae.mousemove||(G.addEventListener("mousemove",Ae.mousemove),ae.mousemove=Ae.mousemove):(G.removeEventListener("mousemove",ae.mousemove),ae.mousemove=null),16&Oe?ae.wheel||(G.addEventListener("wheel",Ae.wheel,{passive:!1}),ae.wheel=Ae.wheel):(G.removeEventListener("wheel",ae.wheel),ae.wheel=null),2&Oe?ae.mouseup||(ae.mouseup=Ae.mouseup):(this._document.removeEventListener("mouseup",ae.mouseup),ae.mouseup=null),4&Oe?ae.mousedrag||(ae.mousedrag=Ae.mousedrag):(this._document.removeEventListener("mousemove",ae.mousedrag),ae.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,g.addDisposableDomListener)(G,"mousedown",(Oe=>{if(Oe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Oe))return he(Oe),ae.mouseup&&this._document.addEventListener("mouseup",ae.mouseup),ae.mousedrag&&this._document.addEventListener("mousemove",ae.mousedrag),this.cancel(Oe)}))),this.register((0,g.addDisposableDomListener)(G,"wheel",(Oe=>{if(!ae.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Oe)===!1)return!1;if(!this.buffer.hasScrollback){const Ye=this.viewport.getLinesScrolled(Oe);if(Ye===0)return;const $e=$.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Oe.deltaY<0?"A":"B");let at="";for(let ye=0;ye<Math.abs(Ye);ye++)at+=$e;return this.coreService.triggerDataEvent(at,!0),this.cancel(Oe,!0)}return this.viewport.handleWheel(Oe)?this.cancel(Oe):void 0}}),{passive:!1})),this.register((0,g.addDisposableDomListener)(G,"touchstart",(Oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Oe),this.cancel(Oe)}),{passive:!0})),this.register((0,g.addDisposableDomListener)(G,"touchmove",(Oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Oe)?void 0:this.cancel(Oe)}),{passive:!1}))}refresh(Q,G){var he;(he=this._renderService)==null||he.refreshRows(Q,G)}updateCursorStyle(Q){var G;(G=this._selectionService)!=null&&G.shouldColumnSelect(Q)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(Q,G,he=0){var ae;he===1?(super.scrollLines(Q,G,he),this.refresh(0,this.rows-1)):(ae=this.viewport)==null||ae.scrollLines(Q)}paste(Q){(0,d.paste)(Q,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Q){this._customKeyEventHandler=Q}attachCustomWheelEventHandler(Q){this._customWheelEventHandler=Q}registerLinkProvider(Q){return this._linkProviderService.registerLinkProvider(Q)}registerCharacterJoiner(Q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const G=this._characterJoinerService.register(Q);return this.refresh(0,this.rows-1),G}deregisterCharacterJoiner(Q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Q)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Q){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Q)}registerDecoration(Q){return this._decorationService.registerDecoration(Q)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Q,G,he){this._selectionService.setSelection(Q,G,he)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var Q;(Q=this._selectionService)==null||Q.clearSelection()}selectAll(){var Q;(Q=this._selectionService)==null||Q.selectAll()}selectLines(Q,G){var he;(he=this._selectionService)==null||he.selectLines(Q,G)}_keyDown(Q){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1)return!1;const G=this.browser.isMac&&this.options.macOptionIsMeta&&Q.altKey;if(!G&&!this._compositionHelper.keydown(Q))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;G||Q.key!=="Dead"&&Q.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const he=(0,U.evaluateKeyboardEvent)(Q,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Q),he.type===3||he.type===2){const ae=this.rows-1;return this.scrollLines(he.type===2?-ae:ae),this.cancel(Q,!0)}return he.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Q)||(he.cancel&&this.cancel(Q,!0),!he.key||!!(Q.key&&!Q.ctrlKey&&!Q.altKey&&!Q.metaKey&&Q.key.length===1&&Q.key.charCodeAt(0)>=65&&Q.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(he.key!==$.C0.ETX&&he.key!==$.C0.CR||(this.textarea.value=""),this._onKey.fire({key:he.key,domEvent:Q}),this._showCursor(),this.coreService.triggerDataEvent(he.key,!0),!this.optionsService.rawOptions.screenReaderMode||Q.altKey||Q.ctrlKey?this.cancel(Q,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Q,G){const he=Q.isMac&&!this.options.macOptionIsMeta&&G.altKey&&!G.ctrlKey&&!G.metaKey||Q.isWindows&&G.altKey&&G.ctrlKey&&!G.metaKey||Q.isWindows&&G.getModifierState("AltGraph");return G.type==="keypress"?he:he&&(!G.keyCode||G.keyCode>47)}_keyUp(Q){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1||((function(G){return G.keyCode===16||G.keyCode===17||G.keyCode===18})(Q)||this.focus(),this.updateCursorStyle(Q),this._keyPressHandled=!1)}_keyPress(Q){let G;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Q)===!1)return!1;if(this.cancel(Q),Q.charCode)G=Q.charCode;else if(Q.which===null||Q.which===void 0)G=Q.keyCode;else{if(Q.which===0||Q.charCode===0)return!1;G=Q.which}return!(!G||(Q.altKey||Q.ctrlKey||Q.metaKey)&&!this._isThirdLevelShift(this.browser,Q)||(G=String.fromCharCode(G),this._onKey.fire({key:G,domEvent:Q}),this._showCursor(),this.coreService.triggerDataEvent(G,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Q){if(Q.data&&Q.inputType==="insertText"&&(!Q.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const G=Q.data;return this.coreService.triggerDataEvent(G,!0),this.cancel(Q),!0}return!1}resize(Q,G){Q!==this.cols||G!==this.rows?super.resize(Q,G):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Q,G){var he,ae;(he=this._charSizeService)==null||he.measure(),(ae=this.viewport)==null||ae.syncScrollArea(!0)}clear(){var Q;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let G=1;G<this.rows;G++)this.buffer.lines.push(this.buffer.getBlankLine(Y.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(Q=this.viewport)==null||Q.reset(),this.refresh(0,this.rows-1)}}reset(){var G,he;this.options.rows=this.rows,this.options.cols=this.cols;const Q=this._customKeyEventHandler;this._setup(),super.reset(),(G=this._selectionService)==null||G.reset(),this._decorationService.reset(),(he=this.viewport)==null||he.reset(),this._customKeyEventHandler=Q,this.refresh(0,this.rows-1)}clearTextureAtlas(){var Q;(Q=this._renderService)==null||Q.clearTextureAtlas()}_reportFocus(){var Q;(Q=this.element)!=null&&Q.classList.contains("focus")?this.coreService.triggerDataEvent($.C0.ESC+"[I"):this.coreService.triggerDataEvent($.C0.ESC+"[O")}_reportWindowsOptions(Q){if(this._renderService)switch(Q){case W.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const G=this._renderService.dimensions.css.canvas.width.toFixed(0),he=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${$.C0.ESC}[4;${he};${G}t`);break;case W.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ae=this._renderService.dimensions.css.cell.width.toFixed(0),Ae=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${$.C0.ESC}[6;${Ae};${ae}t`)}}cancel(Q,G){if(this.options.cancelEvents||G)return Q.preventDefault(),Q.stopPropagation(),!1}}r.Terminal=pe},9924:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TimeBasedDebouncer=void 0,r.TimeBasedDebouncer=class{constructor(u,d=1e3){this._renderCallback=u,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,d,g){this._rowCount=g,u=u!==void 0?u:0,d=d!==void 0?d: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,d):d;const l=Date.now();if(l-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=l,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=l-this._lastRefreshMs,b=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),b)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,d)}}},1680:function(A,r,u){var d=this&&this.__decorate||function(c,o,f,y){var R,k=arguments.length,D=k<3?o:y===null?y=Object.getOwnPropertyDescriptor(o,f):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(c,o,f,y);else for(var E=c.length-1;E>=0;E--)(R=c[E])&&(D=(k<3?R(D):k>3?R(o,f,D):R(o,f))||D);return k>3&&D&&Object.defineProperty(o,f,D),D},g=this&&this.__param||function(c,o){return function(f,y){o(f,y,c)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Viewport=void 0;const l=u(3656),m=u(4725),b=u(8460),C=u(844),p=u(2585);let a=r.Viewport=class extends C.Disposable{constructor(c,o,f,y,R,k,D,E){super(),this._viewportElement=c,this._scrollArea=o,this._bufferService=f,this._optionsService=y,this._charSizeService=R,this._renderService=k,this._coreBrowserService=D,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 b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,l.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((L=>this._activeBuffer=L.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((L=>this._renderDimensions=L))),this._handleThemeChange(E.colors),this.register(E.onChangeColors((L=>this._handleThemeChange(L)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(c){this._viewportElement.style.backgroundColor=c.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(c){if(c)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 o=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==o&&(this._lastRecordedBufferHeight=o,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const c=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==c&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=c),this._refreshAnimationFrame=null}syncScrollArea(c=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(c);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(c)}_handleScroll(c){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 o=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:o,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const c=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(c*(this._smoothScrollState.target-this._smoothScrollState.origin)),c<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(c,o){const f=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&f<this._lastRecordedBufferHeight)||(c.cancelable&&c.preventDefault(),!1)}handleWheel(c){const o=this._getPixelsScrolled(c);return o!==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+o:this._smoothScrollState.target+=o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=o,this._bubbleScroll(c,o))}scrollLines(c){if(c!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const o=c*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:c,suppressScrollEvent:!1})}_getPixelsScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let o=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_LINE?o*=this._currentRowHeight:c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._currentRowHeight*this._bufferService.rows),o}getBufferElements(c,o){var E;let f,y="";const R=[],k=o??this._bufferService.buffer.lines.length,D=this._bufferService.buffer.lines;for(let L=c;L<k;L++){const z=D.get(L);if(!z)continue;const H=(E=D.get(L+1))==null?void 0:E.isWrapped;if(y+=z.translateToString(!H),!H||L===D.length-1){const P=document.createElement("div");P.textContent=y,R.push(P),y.length>0&&(f=P),y=""}}return{bufferElements:R,cursorElement:f}}getLinesScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let o=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=this._currentRowHeight+0,this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(c,o){const f=this._optionsService.rawOptions.fastScrollModifier;return f==="alt"&&o.altKey||f==="ctrl"&&o.ctrlKey||f==="shift"&&o.shiftKey?c*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:c*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(c){this._lastTouchY=c.touches[0].pageY}handleTouchMove(c){const o=this._lastTouchY-c.touches[0].pageY;return this._lastTouchY=c.touches[0].pageY,o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(c,o))}};r.Viewport=a=d([g(2,p.IBufferService),g(3,p.IOptionsService),g(4,m.ICharSizeService),g(5,m.IRenderService),g(6,m.ICoreBrowserService),g(7,m.IThemeService)],a)},3107:function(A,r,u){var d=this&&this.__decorate||function(p,a,c,o){var f,y=arguments.length,R=y<3?a:o===null?o=Object.getOwnPropertyDescriptor(a,c):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(p,a,c,o);else for(var k=p.length-1;k>=0;k--)(f=p[k])&&(R=(y<3?f(R):y>3?f(a,c,R):f(a,c))||R);return y>3&&R&&Object.defineProperty(a,c,R),R},g=this&&this.__param||function(p,a){return function(c,o){a(c,o,p)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferDecorationRenderer=void 0;const l=u(4725),m=u(844),b=u(2585);let C=r.BufferDecorationRenderer=class extends m.Disposable{constructor(p,a,c,o,f){super(),this._screenElement=p,this._bufferService=a,this._coreBrowserService=c,this._decorationService=o,this._renderService=f,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((y=>this._removeDecoration(y)))),this.register((0,m.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 p of this._decorationService.decorations)this._renderDecoration(p);this._dimensionsChanged=!1}_renderDecoration(p){this._refreshStyle(p),this._dimensionsChanged&&this._refreshXPosition(p)}_createElement(p){var o;const a=this._coreBrowserService.mainDocument.createElement("div");a.classList.add("xterm-decoration"),a.classList.toggle("xterm-decoration-top-layer",((o=p==null?void 0:p.options)==null?void 0:o.layer)==="top"),a.style.width=`${Math.round((p.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,a.style.height=(p.options.height||1)*this._renderService.dimensions.css.cell.height+"px",a.style.top=(p.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",a.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const c=p.options.x??0;return c&&c>this._bufferService.cols&&(a.style.display="none"),this._refreshXPosition(p,a),a}_refreshStyle(p){const a=p.marker.line-this._bufferService.buffers.active.ydisp;if(a<0||a>=this._bufferService.rows)p.element&&(p.element.style.display="none",p.onRenderEmitter.fire(p.element));else{let c=this._decorationElements.get(p);c||(c=this._createElement(p),p.element=c,this._decorationElements.set(p,c),this._container.appendChild(c),p.onDispose((()=>{this._decorationElements.delete(p),c.remove()}))),c.style.top=a*this._renderService.dimensions.css.cell.height+"px",c.style.display=this._altBufferIsActive?"none":"block",p.onRenderEmitter.fire(c)}}_refreshXPosition(p,a=p.element){if(!a)return;const c=p.options.x??0;(p.options.anchor||"left")==="right"?a.style.right=c?c*this._renderService.dimensions.css.cell.width+"px":"":a.style.left=c?c*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(p){var a;(a=this._decorationElements.get(p))==null||a.remove(),this._decorationElements.delete(p),p.dispose()}};r.BufferDecorationRenderer=C=d([g(1,b.IBufferService),g(2,l.ICoreBrowserService),g(3,b.IDecorationService),g(4,l.IRenderService)],C)},5871:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorZoneStore=void 0,r.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(u){if(u.options.overviewRulerOptions){for(const d of this._zones)if(d.color===u.options.overviewRulerOptions.color&&d.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,u.marker.line))return;if(this._lineAdjacentToZone(d,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(d,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,d){return d>=u.startBufferLine&&d<=u.endBufferLine}_lineAdjacentToZone(u,d,g){return d>=u.startBufferLine-this._linePadding[g||"full"]&&d<=u.endBufferLine+this._linePadding[g||"full"]}_addLineToZone(u,d){u.startBufferLine=Math.min(u.startBufferLine,d),u.endBufferLine=Math.max(u.endBufferLine,d)}}},5744:function(A,r,u){var d=this&&this.__decorate||function(f,y,R,k){var D,E=arguments.length,L=E<3?y:k===null?k=Object.getOwnPropertyDescriptor(y,R):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(f,y,R,k);else for(var z=f.length-1;z>=0;z--)(D=f[z])&&(L=(E<3?D(L):E>3?D(y,R,L):D(y,R))||L);return E>3&&L&&Object.defineProperty(y,R,L),L},g=this&&this.__param||function(f,y){return function(R,k){y(R,k,f)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OverviewRulerRenderer=void 0;const l=u(5871),m=u(4725),b=u(844),C=u(2585),p={full:0,left:0,center:0,right:0},a={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0};let o=r.OverviewRulerRenderer=class extends b.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(f,y,R,k,D,E,L){var H;super(),this._viewportElement=f,this._screenElement=y,this._bufferService=R,this._decorationService=k,this._renderService=D,this._optionsService=E,this._coreBrowserService=L,this._colorZoneStore=new l.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 z=this._canvas.getContext("2d");if(!z)throw new Error("Ctx cannot be null");this._ctx=z,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,b.toDisposable)((()=>{var P;(P=this._canvas)==null||P.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const f=Math.floor(this._canvas.width/3),y=Math.ceil(this._canvas.width/3);a.full=this._canvas.width,a.left=f,a.center=y,a.right=f,this._refreshDrawHeightConstants(),c.full=0,c.left=0,c.center=a.left,c.right=a.left+a.center}_refreshDrawHeightConstants(){p.full=Math.round(2*this._coreBrowserService.dpr);const f=this._canvas.height/this._bufferService.buffer.lines.length,y=Math.round(Math.max(Math.min(f,12),6)*this._coreBrowserService.dpr);p.left=y,p.center=y,p.right=y}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.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 y of this._decorationService.decorations)this._colorZoneStore.addDecoration(y);this._ctx.lineWidth=1;const f=this._colorZoneStore.zones;for(const y of f)y.position!=="full"&&this._renderColorZone(y);for(const y of f)y.position==="full"&&this._renderColorZone(y);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(f){this._ctx.fillStyle=f.color,this._ctx.fillRect(c[f.position||"full"],Math.round((this._canvas.height-1)*(f.startBufferLine/this._bufferService.buffers.active.lines.length)-p[f.position||"full"]/2),a[f.position||"full"],Math.round((this._canvas.height-1)*((f.endBufferLine-f.startBufferLine)/this._bufferService.buffers.active.lines.length)+p[f.position||"full"]))}_queueRefresh(f,y){this._shouldUpdateDimensions=f||this._shouldUpdateDimensions,this._shouldUpdateAnchor=y||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};r.OverviewRulerRenderer=o=d([g(2,C.IBufferService),g(3,C.IDecorationService),g(4,m.IRenderService),g(5,C.IOptionsService),g(6,m.ICoreBrowserService)],o)},2950:function(A,r,u){var d=this&&this.__decorate||function(p,a,c,o){var f,y=arguments.length,R=y<3?a:o===null?o=Object.getOwnPropertyDescriptor(a,c):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(p,a,c,o);else for(var k=p.length-1;k>=0;k--)(f=p[k])&&(R=(y<3?f(R):y>3?f(a,c,R):f(a,c))||R);return y>3&&R&&Object.defineProperty(a,c,R),R},g=this&&this.__param||function(p,a){return function(c,o){a(c,o,p)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CompositionHelper=void 0;const l=u(4725),m=u(2585),b=u(2584);let C=r.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(p,a,c,o,f,y){this._textarea=p,this._compositionView=a,this._bufferService=c,this._optionsService=o,this._coreService=f,this._renderService=y,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(p){this._compositionView.textContent=p.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(p){if(this._isComposing||this._isSendingComposition){if(p.keyCode===229||p.keyCode===16||p.keyCode===17||p.keyCode===18)return!1;this._finalizeComposition(!1)}return p.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(p){if(this._compositionView.classList.remove("active"),this._isComposing=!1,p){const a={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let c;this._isSendingComposition=!1,a.start+=this._dataAlreadySent.length,c=this._isComposing?this._textarea.value.substring(a.start,a.end):this._textarea.value.substring(a.start),c.length>0&&this._coreService.triggerDataEvent(c,!0)}}),0)}else{this._isSendingComposition=!1;const a=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(a,!0)}}_handleAnyTextareaChanges(){const p=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const a=this._textarea.value,c=a.replace(p,"");this._dataAlreadySent=c,a.length>p.length?this._coreService.triggerDataEvent(c,!0):a.length<p.length?this._coreService.triggerDataEvent(`${b.C0.DEL}`,!0):a.length===p.length&&a!==p&&this._coreService.triggerDataEvent(a,!0)}}),0)}updateCompositionElements(p){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const a=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),c=this._renderService.dimensions.css.cell.height,o=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,f=a*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=f+"px",this._compositionView.style.top=o+"px",this._compositionView.style.height=c+"px",this._compositionView.style.lineHeight=c+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const y=this._compositionView.getBoundingClientRect();this._textarea.style.left=f+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(y.width,1)+"px",this._textarea.style.height=Math.max(y.height,1)+"px",this._textarea.style.lineHeight=y.height+"px"}p||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};r.CompositionHelper=C=d([g(2,m.IBufferService),g(3,m.IOptionsService),g(4,m.ICoreService),g(5,l.IRenderService)],C)},9806:(A,r)=>{function u(d,g,l){const m=l.getBoundingClientRect(),b=d.getComputedStyle(l),C=parseInt(b.getPropertyValue("padding-left")),p=parseInt(b.getPropertyValue("padding-top"));return[g.clientX-m.left-C,g.clientY-m.top-p]}Object.defineProperty(r,"__esModule",{value:!0}),r.getCoords=r.getCoordsRelativeToElement=void 0,r.getCoordsRelativeToElement=u,r.getCoords=function(d,g,l,m,b,C,p,a,c){if(!C)return;const o=u(d,g,l);return o?(o[0]=Math.ceil((o[0]+(c?p/2:0))/p),o[1]=Math.ceil(o[1]/a),o[0]=Math.min(Math.max(o[0],1),m+(c?1:0)),o[1]=Math.min(Math.max(o[1],1),b),o):void 0}},9504:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.moveToCellSequence=void 0;const d=u(2584);function g(a,c,o,f){const y=a-l(a,o),R=c-l(c,o),k=Math.abs(y-R)-(function(D,E,L){let z=0;const H=D-l(D,L),P=E-l(E,L);for(let I=0;I<Math.abs(H-P);I++){const K=m(D,E)==="A"?-1:1,X=L.buffer.lines.get(H+K*I);X!=null&&X.isWrapped&&z++}return z})(a,c,o);return p(k,C(m(a,c),f))}function l(a,c){let o=0,f=c.buffer.lines.get(a),y=f==null?void 0:f.isWrapped;for(;y&&a>=0&&a<c.rows;)o++,f=c.buffer.lines.get(--a),y=f==null?void 0:f.isWrapped;return o}function m(a,c){return a>c?"A":"B"}function b(a,c,o,f,y,R){let k=a,D=c,E="";for(;k!==o||D!==f;)k+=y?1:-1,y&&k>R.cols-1?(E+=R.buffer.translateBufferLineToString(D,!1,a,k),k=0,a=0,D++):!y&&k<0&&(E+=R.buffer.translateBufferLineToString(D,!1,0,a+1),k=R.cols-1,a=k,D--);return E+R.buffer.translateBufferLineToString(D,!1,a,k)}function C(a,c){const o=c?"O":"[";return d.C0.ESC+o+a}function p(a,c){a=Math.floor(a);let o="";for(let f=0;f<a;f++)o+=c;return o}r.moveToCellSequence=function(a,c,o,f){const y=o.buffer.x,R=o.buffer.y;if(!o.buffer.hasScrollback)return(function(E,L,z,H,P,I){return g(L,H,P,I).length===0?"":p(b(E,L,E,L-l(L,P),!1,P).length,C("D",I))})(y,R,0,c,o,f)+g(R,c,o,f)+(function(E,L,z,H,P,I){let K;K=g(L,H,P,I).length>0?H-l(H,P):L;const X=H,Y=(function($,U,T,F,B,W){let ee;return ee=g(T,F,B,W).length>0?F-l(F,B):U,$<T&&ee<=F||$>=T&&ee<F?"C":"D"})(E,L,z,H,P,I);return p(b(E,K,z,X,Y==="C",P).length,C(Y,I))})(y,R,a,c,o,f);let k;if(R===c)return k=y>a?"D":"C",p(Math.abs(y-a),C(k,f));k=R>c?"D":"C";const D=Math.abs(R-c);return p((function(E,L){return L.cols-E})(R>c?a:y,o)+(D-1)*o.cols+1+((R>c?y:a)-1),C(k,f))}},1296:function(A,r,u){var d=this&&this.__decorate||function(I,K,X,Y){var $,U=arguments.length,T=U<3?K:Y===null?Y=Object.getOwnPropertyDescriptor(K,X):Y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(I,K,X,Y);else for(var F=I.length-1;F>=0;F--)($=I[F])&&(T=(U<3?$(T):U>3?$(K,X,T):$(K,X))||T);return U>3&&T&&Object.defineProperty(K,X,T),T},g=this&&this.__param||function(I,K){return function(X,Y){K(X,Y,I)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRenderer=void 0;const l=u(3787),m=u(2550),b=u(2223),C=u(6171),p=u(6052),a=u(4725),c=u(8055),o=u(8460),f=u(844),y=u(2585),R="xterm-dom-renderer-owner-",k="xterm-rows",D="xterm-fg-",E="xterm-bg-",L="xterm-focus",z="xterm-selection";let H=1,P=r.DomRenderer=class extends f.Disposable{constructor(I,K,X,Y,$,U,T,F,B,W,ee,ne,pe){super(),this._terminal=I,this._document=K,this._element=X,this._screenElement=Y,this._viewportElement=$,this._helperContainer=U,this._linkifier2=T,this._charSizeService=B,this._optionsService=W,this._bufferService=ee,this._coreBrowserService=ne,this._themeService=pe,this._terminalClass=H++,this._rowElements=[],this._selectionRenderModel=(0,p.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(k),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(z),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,C.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ke=>this._injectCss(ke)))),this._injectCss(this._themeService.colors),this._rowFactory=F.createInstance(l.DomRendererRowFactory,document),this._element.classList.add(R+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ke=>this._handleLinkHover(ke)))),this.register(this._linkifier2.onHideLinkUnderline((ke=>this._handleLinkLeave(ke)))),this.register((0,f.toDisposable)((()=>{this._element.classList.remove(R+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new m.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const I=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*I,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*I),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/I),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/I),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const X of this._rowElements)X.style.width=`${this.dimensions.css.canvas.width}px`,X.style.height=`${this.dimensions.css.cell.height}px`,X.style.lineHeight=`${this.dimensions.css.cell.height}px`,X.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const K=`${this._terminalSelector} .${k} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=K,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(I){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let K=`${this._terminalSelector} .${k} { color: ${I.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;K+=`${this._terminalSelector} .${k} .xterm-dim { color: ${c.color.multiplyOpacity(I.foreground,.5).css};}`,K+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const X=`blink_underline_${this._terminalClass}`,Y=`blink_bar_${this._terminalClass}`,$=`blink_block_${this._terminalClass}`;K+=`@keyframes ${X} { 50% { border-bottom-style: hidden; }}`,K+=`@keyframes ${Y} { 50% { box-shadow: none; }}`,K+=`@keyframes ${$} { 0% { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css}; } 50% { background-color: inherit; color: ${I.cursor.css}; }}`,K+=`${this._terminalSelector} .${k}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${k}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${k}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-block { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css};}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${I.cursor.css} !important; color: ${I.cursorAccent.css} !important;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${I.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${I.cursor.css} inset;}${this._terminalSelector} .${k} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${I.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,K+=`${this._terminalSelector} .${z} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${z} div { position: absolute; background-color: ${I.selectionBackgroundOpaque.css};}${this._terminalSelector} .${z} div { position: absolute; background-color: ${I.selectionInactiveBackgroundOpaque.css};}`;for(const[U,T]of I.ansi.entries())K+=`${this._terminalSelector} .${D}${U} { color: ${T.css}; }${this._terminalSelector} .${D}${U}.xterm-dim { color: ${c.color.multiplyOpacity(T,.5).css}; }${this._terminalSelector} .${E}${U} { background-color: ${T.css}; }`;K+=`${this._terminalSelector} .${D}${b.INVERTED_DEFAULT_COLOR} { color: ${c.color.opaque(I.background).css}; }${this._terminalSelector} .${D}${b.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${c.color.multiplyOpacity(c.color.opaque(I.background),.5).css}; }${this._terminalSelector} .${E}${b.INVERTED_DEFAULT_COLOR} { background-color: ${I.foreground.css}; }`,this._themeStyleElement.textContent=K}_setDefaultSpacing(){const I=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${I}px`,this._rowFactory.defaultSpacing=I}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(I,K){for(let X=this._rowElements.length;X<=K;X++){const Y=this._document.createElement("div");this._rowContainer.appendChild(Y),this._rowElements.push(Y)}for(;this._rowElements.length>K;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(I,K){this._refreshRowElements(I,K),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(L),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(L),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(I,K,X){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(I,K,X),this.renderRows(0,this._bufferService.rows-1),!I||!K)return;this._selectionRenderModel.update(this._terminal,I,K,X);const Y=this._selectionRenderModel.viewportStartRow,$=this._selectionRenderModel.viewportEndRow,U=this._selectionRenderModel.viewportCappedStartRow,T=this._selectionRenderModel.viewportCappedEndRow;if(U>=this._bufferService.rows||T<0)return;const F=this._document.createDocumentFragment();if(X){const B=I[0]>K[0];F.appendChild(this._createSelectionElement(U,B?K[0]:I[0],B?I[0]:K[0],T-U+1))}else{const B=Y===U?I[0]:0,W=U===$?K[0]:this._bufferService.cols;F.appendChild(this._createSelectionElement(U,B,W));const ee=T-U-1;if(F.appendChild(this._createSelectionElement(U+1,0,this._bufferService.cols,ee)),U!==T){const ne=$===T?K[0]:this._bufferService.cols;F.appendChild(this._createSelectionElement(T,0,ne))}}this._selectionContainer.appendChild(F)}_createSelectionElement(I,K,X,Y=1){const $=this._document.createElement("div"),U=K*this.dimensions.css.cell.width;let T=this.dimensions.css.cell.width*(X-K);return U+T>this.dimensions.css.canvas.width&&(T=this.dimensions.css.canvas.width-U),$.style.height=Y*this.dimensions.css.cell.height+"px",$.style.top=I*this.dimensions.css.cell.height+"px",$.style.left=`${U}px`,$.style.width=`${T}px`,$}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const I of this._rowElements)I.replaceChildren()}renderRows(I,K){const X=this._bufferService.buffer,Y=X.ybase+X.y,$=Math.min(X.x,this._bufferService.cols-1),U=this._optionsService.rawOptions.cursorBlink,T=this._optionsService.rawOptions.cursorStyle,F=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=I;B<=K;B++){const W=B+X.ydisp,ee=this._rowElements[B],ne=X.lines.get(W);if(!ee||!ne)break;ee.replaceChildren(...this._rowFactory.createRow(ne,W,W===Y,T,F,$,U,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${R}${this._terminalClass}`}_handleLinkHover(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!0)}_handleLinkLeave(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!1)}_setCellUnderline(I,K,X,Y,$,U){X<0&&(I=0),Y<0&&(K=0);const T=this._bufferService.rows-1;X=Math.max(Math.min(X,T),0),Y=Math.max(Math.min(Y,T),0),$=Math.min($,this._bufferService.cols);const F=this._bufferService.buffer,B=F.ybase+F.y,W=Math.min(F.x,$-1),ee=this._optionsService.rawOptions.cursorBlink,ne=this._optionsService.rawOptions.cursorStyle,pe=this._optionsService.rawOptions.cursorInactiveStyle;for(let ke=X;ke<=Y;++ke){const Q=ke+F.ydisp,G=this._rowElements[ke],he=F.lines.get(Q);if(!G||!he)break;G.replaceChildren(...this._rowFactory.createRow(he,Q,Q===B,ne,pe,W,ee,this.dimensions.css.cell.width,this._widthCache,U?ke===X?I:0:-1,U?(ke===Y?K:$)-1:-1))}}};r.DomRenderer=P=d([g(7,y.IInstantiationService),g(8,a.ICharSizeService),g(9,y.IOptionsService),g(10,y.IBufferService),g(11,a.ICoreBrowserService),g(12,a.IThemeService)],P)},3787:function(A,r,u){var d=this&&this.__decorate||function(k,D,E,L){var z,H=arguments.length,P=H<3?D:L===null?L=Object.getOwnPropertyDescriptor(D,E):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(k,D,E,L);else for(var I=k.length-1;I>=0;I--)(z=k[I])&&(P=(H<3?z(P):H>3?z(D,E,P):z(D,E))||P);return H>3&&P&&Object.defineProperty(D,E,P),P},g=this&&this.__param||function(k,D){return function(E,L){D(E,L,k)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRendererRowFactory=void 0;const l=u(2223),m=u(643),b=u(511),C=u(2585),p=u(8055),a=u(4725),c=u(4269),o=u(6171),f=u(3734);let y=r.DomRendererRowFactory=class{constructor(k,D,E,L,z,H,P){this._document=k,this._characterJoinerService=D,this._optionsService=E,this._coreBrowserService=L,this._coreService=z,this._decorationService=H,this._themeService=P,this._workCell=new b.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(k,D,E){this._selectionStart=k,this._selectionEnd=D,this._columnSelectMode=E}createRow(k,D,E,L,z,H,P,I,K,X,Y){const $=[],U=this._characterJoinerService.getJoinedCharacters(D),T=this._themeService.colors;let F,B=k.getNoBgTrimmedLength();E&&B<H+1&&(B=H+1);let W=0,ee="",ne=0,pe=0,ke=0,Q=!1,G=0,he=!1,ae=0;const Ae=[],Oe=X!==-1&&Y!==-1;for(let Ye=0;Ye<B;Ye++){k.loadCell(Ye,this._workCell);let $e=this._workCell.getWidth();if($e===0)continue;let at=!1,ye=Ye,Te=this._workCell;if(U.length>0&&Ye===U[0][0]){at=!0;const je=U.shift();Te=new c.JoinedCellData(this._workCell,k.translateToString(!0,je[0],je[1]),je[1]-je[0]),ye=je[1]-1,$e=Te.getWidth()}const ut=this._isCellInSelection(Ye,D),tt=E&&Ye===H,He=Oe&&Ye>=X&&Ye<=Y;let We=!1;this._decorationService.forEachDecorationAtCell(Ye,D,void 0,(je=>{We=!0}));let Fe=Te.getChars()||m.WHITESPACE_CELL_CHAR;if(Fe===" "&&(Te.isUnderline()||Te.isOverline())&&(Fe=" "),ae=$e*I-K.get(Fe,Te.isBold(),Te.isItalic()),F){if(W&&(ut&&he||!ut&&!he&&Te.bg===ne)&&(ut&&he&&T.selectionForeground||Te.fg===pe)&&Te.extended.ext===ke&&He===Q&&ae===G&&!tt&&!at&&!We){Te.isInvisible()?ee+=m.WHITESPACE_CELL_CHAR:ee+=Fe,W++;continue}W&&(F.textContent=ee),F=this._document.createElement("span"),W=0,ee=""}else F=this._document.createElement("span");if(ne=Te.bg,pe=Te.fg,ke=Te.extended.ext,Q=He,G=ae,he=ut,at&&H>=Ye&&H<=ye&&(H=Ye),!this._coreService.isCursorHidden&&tt&&this._coreService.isCursorInitialized){if(Ae.push("xterm-cursor"),this._coreBrowserService.isFocused)P&&Ae.push("xterm-cursor-blink"),Ae.push(L==="bar"?"xterm-cursor-bar":L==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(z)switch(z){case"outline":Ae.push("xterm-cursor-outline");break;case"block":Ae.push("xterm-cursor-block");break;case"bar":Ae.push("xterm-cursor-bar");break;case"underline":Ae.push("xterm-cursor-underline")}}if(Te.isBold()&&Ae.push("xterm-bold"),Te.isItalic()&&Ae.push("xterm-italic"),Te.isDim()&&Ae.push("xterm-dim"),ee=Te.isInvisible()?m.WHITESPACE_CELL_CHAR:Te.getChars()||m.WHITESPACE_CELL_CHAR,Te.isUnderline()&&(Ae.push(`xterm-underline-${Te.extended.underlineStyle}`),ee===" "&&(ee=" "),!Te.isUnderlineColorDefault()))if(Te.isUnderlineColorRGB())F.style.textDecorationColor=`rgb(${f.AttributeData.toColorRGB(Te.getUnderlineColor()).join(",")})`;else{let je=Te.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Te.isBold()&&je<8&&(je+=8),F.style.textDecorationColor=T.ansi[je].css}Te.isOverline()&&(Ae.push("xterm-overline"),ee===" "&&(ee=" ")),Te.isStrikethrough()&&Ae.push("xterm-strikethrough"),He&&(F.style.textDecoration="underline");let Be=Te.getFgColor(),Ue=Te.getFgColorMode(),ct=Te.getBgColor(),it=Te.getBgColorMode();const St=!!Te.isInverse();if(St){const je=Be;Be=ct,ct=je;const le=Ue;Ue=it,it=le}let Ce,Ie,ce,ze=!1;switch(this._decorationService.forEachDecorationAtCell(Ye,D,void 0,(je=>{je.options.layer!=="top"&&ze||(je.backgroundColorRGB&&(it=50331648,ct=je.backgroundColorRGB.rgba>>8&16777215,Ce=je.backgroundColorRGB),je.foregroundColorRGB&&(Ue=50331648,Be=je.foregroundColorRGB.rgba>>8&16777215,Ie=je.foregroundColorRGB),ze=je.options.layer==="top")})),!ze&&ut&&(Ce=this._coreBrowserService.isFocused?T.selectionBackgroundOpaque:T.selectionInactiveBackgroundOpaque,ct=Ce.rgba>>8&16777215,it=50331648,ze=!0,T.selectionForeground&&(Ue=50331648,Be=T.selectionForeground.rgba>>8&16777215,Ie=T.selectionForeground)),ze&&Ae.push("xterm-decoration-top"),it){case 16777216:case 33554432:ce=T.ansi[ct],Ae.push(`xterm-bg-${ct}`);break;case 50331648:ce=p.channels.toColor(ct>>16,ct>>8&255,255&ct),this._addStyle(F,`background-color:#${R((ct>>>0).toString(16),"0",6)}`);break;default:St?(ce=T.foreground,Ae.push(`xterm-bg-${l.INVERTED_DEFAULT_COLOR}`)):ce=T.background}switch(Ce||Te.isDim()&&(Ce=p.color.multiplyOpacity(ce,.5)),Ue){case 16777216:case 33554432:Te.isBold()&&Be<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Be+=8),this._applyMinimumContrast(F,ce,T.ansi[Be],Te,Ce,void 0)||Ae.push(`xterm-fg-${Be}`);break;case 50331648:const je=p.channels.toColor(Be>>16&255,Be>>8&255,255&Be);this._applyMinimumContrast(F,ce,je,Te,Ce,Ie)||this._addStyle(F,`color:#${R(Be.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(F,ce,T.foreground,Te,Ce,Ie)||St&&Ae.push(`xterm-fg-${l.INVERTED_DEFAULT_COLOR}`)}Ae.length&&(F.className=Ae.join(" "),Ae.length=0),tt||at||We?F.textContent=ee:W++,ae!==this.defaultSpacing&&(F.style.letterSpacing=`${ae}px`),$.push(F),Ye=ye}return F&&W&&(F.textContent=ee),$}_applyMinimumContrast(k,D,E,L,z,H){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.treatGlyphAsBackgroundColor)(L.getCode()))return!1;const P=this._getContrastCache(L);let I;if(z||H||(I=P.getColor(D.rgba,E.rgba)),I===void 0){const K=this._optionsService.rawOptions.minimumContrastRatio/(L.isDim()?2:1);I=p.color.ensureContrastRatio(z||D,H||E,K),P.setColor((z||D).rgba,(H||E).rgba,I??null)}return!!I&&(this._addStyle(k,`color:${I.css}`),!0)}_getContrastCache(k){return k.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(k,D){k.setAttribute("style",`${k.getAttribute("style")||""}${D};`)}_isCellInSelection(k,D){const E=this._selectionStart,L=this._selectionEnd;return!(!E||!L)&&(this._columnSelectMode?E[0]<=L[0]?k>=E[0]&&D>=E[1]&&k<L[0]&&D<=L[1]:k<E[0]&&D>=E[1]&&k>=L[0]&&D<=L[1]:D>E[1]&&D<L[1]||E[1]===L[1]&&D===E[1]&&k>=E[0]&&k<L[0]||E[1]<L[1]&&D===L[1]&&k<L[0]||E[1]<L[1]&&D===E[1]&&k>=E[0])}};function R(k,D,E){for(;k.length<E;)k=D+k;return k}r.DomRendererRowFactory=y=d([g(1,a.ICharacterJoinerService),g(2,C.IOptionsService),g(3,a.ICoreBrowserService),g(4,C.ICoreService),g(5,C.IDecorationService),g(6,a.IThemeService)],y)},2550:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WidthCache=void 0,r.WidthCache=class{constructor(u,d){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 l=u.createElement("span");l.classList.add("xterm-char-measure-element"),l.style.fontWeight="bold";const m=u.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const b=u.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontWeight="bold",b.style.fontStyle="italic",this._measureElements=[g,l,m,b],this._container.appendChild(g),this._container.appendChild(l),this._container.appendChild(m),this._container.appendChild(b),d.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,d,g,l){u===this._font&&d===this._fontSize&&g===this._weight&&l===this._weightBold||(this._font=u,this._fontSize=d,this._weight=g,this._weightBold=l,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${g}`,this._measureElements[1].style.fontWeight=`${l}`,this._measureElements[2].style.fontWeight=`${g}`,this._measureElements[3].style.fontWeight=`${l}`,this.clear())}get(u,d,g){let l=0;if(!d&&!g&&u.length===1&&(l=u.charCodeAt(0))<256){if(this._flat[l]!==-9999)return this._flat[l];const C=this._measure(u,0);return C>0&&(this._flat[l]=C),C}let m=u;d&&(m+="B"),g&&(m+="I");let b=this._holey.get(m);if(b===void 0){let C=0;d&&(C|=1),g&&(C|=2),b=this._measure(u,C),b>0&&this._holey.set(m,b)}return b}_measure(u,d){const g=this._measureElements[d];return g.textContent=u.repeat(32),g.offsetWidth/32}}},2223:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TEXT_BASELINE=r.DIM_OPACITY=r.INVERTED_DEFAULT_COLOR=void 0;const d=u(6114);r.INVERTED_DEFAULT_COLOR=257,r.DIM_OPACITY=.5,r.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(A,r)=>{function u(g){return 57508<=g&&g<=57558}function d(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(r,"__esModule",{value:!0}),r.computeNextVariantOffset=r.createRenderDimensions=r.treatGlyphAsBackgroundColor=r.allowRescaling=r.isEmoji=r.isRestrictedPowerlineGlyph=r.isPowerlineGlyph=r.throwIfFalsy=void 0,r.throwIfFalsy=function(g){if(!g)throw new Error("value must not be falsy");return g},r.isPowerlineGlyph=u,r.isRestrictedPowerlineGlyph=function(g){return 57520<=g&&g<=57527},r.isEmoji=d,r.allowRescaling=function(g,l,m,b){return l===1&&m>Math.ceil(1.5*b)&&g!==void 0&&g>255&&!d(g)&&!u(g)&&!(function(C){return 57344<=C&&C<=63743})(g)},r.treatGlyphAsBackgroundColor=function(g){return u(g)||(function(l){return 9472<=l&&l<=9631})(g)},r.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},r.computeNextVariantOffset=function(g,l,m=0){return(g-(2*Math.round(l)-m))%(2*Math.round(l))}},6052:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.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,l,m,b=!1){if(this.selectionStart=l,this.selectionEnd=m,!l||!m||l[0]===m[0]&&l[1]===m[1])return void this.clear();const C=g.buffers.active.ydisp,p=l[1]-C,a=m[1]-C,c=Math.max(p,0),o=Math.min(a,g.rows-1);c>=g.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=p,this.viewportEndRow=a,this.viewportCappedStartRow=c,this.viewportCappedEndRow=o,this.startCol=l[0],this.endCol=m[0])}isCellSelected(g,l,m){return!!this.hasSelection&&(m-=g.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?l>=this.startCol&&m>=this.viewportCappedStartRow&&l<this.endCol&&m<=this.viewportCappedEndRow:l<this.startCol&&m>=this.viewportCappedStartRow&&l>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&m===this.viewportStartRow&&l>=this.startCol&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportEndRow&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportStartRow&&l>=this.startCol)}}r.createSelectionRenderModel=function(){return new u}},456:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionModel=void 0,r.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,d=this.selectionEnd;return!(!u||!d)&&(u[1]>d[1]||u[1]===d[1]&&u[0]>d[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(A,r,u){var d=this&&this.__decorate||function(o,f,y,R){var k,D=arguments.length,E=D<3?f:R===null?R=Object.getOwnPropertyDescriptor(f,y):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(o,f,y,R);else for(var L=o.length-1;L>=0;L--)(k=o[L])&&(E=(D<3?k(E):D>3?k(f,y,E):k(f,y))||E);return D>3&&E&&Object.defineProperty(f,y,E),E},g=this&&this.__param||function(o,f){return function(y,R){f(y,R,o)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharSizeService=void 0;const l=u(2585),m=u(8460),b=u(844);let C=r.CharSizeService=class extends b.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(o,f,y){super(),this._optionsService=y,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new c(this._optionsService))}catch{this._measureStrategy=this.register(new a(o,f,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const o=this._measureStrategy.measure();o.width===this.width&&o.height===this.height||(this.width=o.width,this.height=o.height,this._onCharSizeChange.fire())}};r.CharSizeService=C=d([g(2,l.IOptionsService)],C);class p extends b.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(f,y){f!==void 0&&f>0&&y!==void 0&&y>0&&(this._result.width=f,this._result.height=y)}}class a extends p{constructor(f,y,R){super(),this._document=f,this._parentElement=y,this._optionsService=R,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 c extends p{constructor(f){super(),this._optionsService=f,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const y=this._ctx.measureText("W");if(!("width"in y&&"fontBoundingBoxAscent"in y&&"fontBoundingBoxDescent"in y))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const f=this._ctx.measureText("W");return this._validateAndSet(f.width,f.fontBoundingBoxAscent+f.fontBoundingBoxDescent),this._result}}},4269:function(A,r,u){var d=this&&this.__decorate||function(c,o,f,y){var R,k=arguments.length,D=k<3?o:y===null?y=Object.getOwnPropertyDescriptor(o,f):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(c,o,f,y);else for(var E=c.length-1;E>=0;E--)(R=c[E])&&(D=(k<3?R(D):k>3?R(o,f,D):R(o,f))||D);return k>3&&D&&Object.defineProperty(o,f,D),D},g=this&&this.__param||function(c,o){return function(f,y){o(f,y,c)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharacterJoinerService=r.JoinedCellData=void 0;const l=u(3734),m=u(643),b=u(511),C=u(2585);class p extends l.AttributeData{constructor(o,f,y){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=f,this._width=y}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.JoinedCellData=p;let a=r.CharacterJoinerService=class a_{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new b.CellData}register(o){const f={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(f),f.id}deregister(o){for(let f=0;f<this._characterJoiners.length;f++)if(this._characterJoiners[f].id===o)return this._characterJoiners.splice(f,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const f=this._bufferService.buffer.lines.get(o);if(!f||f.length===0)return[];const y=[],R=f.translateToString(!0);let k=0,D=0,E=0,L=f.getFg(0),z=f.getBg(0);for(let H=0;H<f.getTrimmedLength();H++)if(f.loadCell(H,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==L||this._workCell.bg!==z){if(H-k>1){const P=this._getJoinedRanges(R,E,D,f,k);for(let I=0;I<P.length;I++)y.push(P[I])}k=H,E=D,L=this._workCell.fg,z=this._workCell.bg}D+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-k>1){const H=this._getJoinedRanges(R,E,D,f,k);for(let P=0;P<H.length;P++)y.push(H[P])}return y}_getJoinedRanges(o,f,y,R,k){const D=o.substring(f,y);let E=[];try{E=this._characterJoiners[0].handler(D)}catch(L){console.error(L)}for(let L=1;L<this._characterJoiners.length;L++)try{const z=this._characterJoiners[L].handler(D);for(let H=0;H<z.length;H++)a_._mergeRanges(E,z[H])}catch(z){console.error(z)}return this._stringRangesToCellRanges(E,R,k),E}_stringRangesToCellRanges(o,f,y){let R=0,k=!1,D=0,E=o[R];if(E){for(let L=y;L<this._bufferService.cols;L++){const z=f.getWidth(L),H=f.getString(L).length||m.WHITESPACE_CELL_CHAR.length;if(z!==0){if(!k&&E[0]<=D&&(E[0]=L,k=!0),E[1]<=D){if(E[1]=L,E=o[++R],!E)break;E[0]<=D?(E[0]=L,k=!0):k=!1}D+=H}}E&&(E[1]=this._bufferService.cols)}}static _mergeRanges(o,f){let y=!1;for(let R=0;R<o.length;R++){const k=o[R];if(y){if(f[1]<=k[0])return o[R-1][1]=f[1],o;if(f[1]<=k[1])return o[R-1][1]=Math.max(f[1],k[1]),o.splice(R,1),o;o.splice(R,1),R--}else{if(f[1]<=k[0])return o.splice(R,0,f),o;if(f[1]<=k[1])return k[0]=Math.min(f[0],k[0]),o;f[0]<k[1]&&(k[0]=Math.min(f[0],k[0]),y=!0)}}return y?o[o.length-1][1]=f[1]:o.push(f),o}};r.CharacterJoinerService=a=d([g(0,C.IBufferService)],a)},5114:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreBrowserService=void 0;const d=u(844),g=u(8460),l=u(3656);class m extends d.Disposable{constructor(p,a,c){super(),this._textarea=p,this._window=a,this.mainDocument=c,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new b(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((o=>this._screenDprMonitor.setWindow(o)))),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(p){this._window!==p&&(this._window=p,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}r.CoreBrowserService=m;class b extends d.Disposable{constructor(p){super(),this._parentWindow=p,this._windowResizeListener=this.register(new d.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,d.toDisposable)((()=>this.clearListener())))}setWindow(p){this._parentWindow=p,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,l.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var p;this._outerListener&&((p=this._resolutionMediaMatchList)==null||p.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.LinkProviderService=void 0;const d=u(844);class g extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const b=this.linkProviders.indexOf(m);b!==-1&&this.linkProviders.splice(b,1)}}}}r.LinkProviderService=g},8934:function(A,r,u){var d=this&&this.__decorate||function(C,p,a,c){var o,f=arguments.length,y=f<3?p:c===null?c=Object.getOwnPropertyDescriptor(p,a):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(C,p,a,c);else for(var R=C.length-1;R>=0;R--)(o=C[R])&&(y=(f<3?o(y):f>3?o(p,a,y):o(p,a))||y);return f>3&&y&&Object.defineProperty(p,a,y),y},g=this&&this.__param||function(C,p){return function(a,c){p(a,c,C)}};Object.defineProperty(r,"__esModule",{value:!0}),r.MouseService=void 0;const l=u(4725),m=u(9806);let b=r.MouseService=class{constructor(C,p){this._renderService=C,this._charSizeService=p}getCoords(C,p,a,c,o){return(0,m.getCoords)(window,C,p,a,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(C,p){const a=(0,m.getCoordsRelativeToElement)(window,C,p);if(this._charSizeService.hasValidSize)return a[0]=Math.min(Math.max(a[0],0),this._renderService.dimensions.css.canvas.width-1),a[1]=Math.min(Math.max(a[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(a[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(a[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(a[0]),y:Math.floor(a[1])}}};r.MouseService=b=d([g(0,l.IRenderService),g(1,l.ICharSizeService)],b)},3230:function(A,r,u){var d=this&&this.__decorate||function(o,f,y,R){var k,D=arguments.length,E=D<3?f:R===null?R=Object.getOwnPropertyDescriptor(f,y):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(o,f,y,R);else for(var L=o.length-1;L>=0;L--)(k=o[L])&&(E=(D<3?k(E):D>3?k(f,y,E):k(f,y))||E);return D>3&&E&&Object.defineProperty(f,y,E),E},g=this&&this.__param||function(o,f){return function(y,R){f(y,R,o)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RenderService=void 0;const l=u(6193),m=u(4725),b=u(8460),C=u(844),p=u(7226),a=u(2585);let c=r.RenderService=class extends C.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(o,f,y,R,k,D,E,L){super(),this._rowCount=o,this._charSizeService=R,this._renderer=this.register(new C.MutableDisposable),this._pausedResizeTask=new p.DebouncedIdleTask,this._observerDisposable=this.register(new C.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 b.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new b.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new b.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new b.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new l.RenderDebouncer(((z,H)=>this._renderRows(z,H)),E),this.register(this._renderDebouncer),this.register(E.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(D.onResize((()=>this._fullRefresh()))),this.register(D.buffers.onBufferActivate((()=>{var z;return(z=this._renderer.value)==null?void 0:z.clear()}))),this.register(y.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(k.onDecorationRegistered((()=>this._fullRefresh()))),this.register(k.onDecorationRemoved((()=>this._fullRefresh()))),this.register(y.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(D.cols,D.rows),this._fullRefresh()}))),this.register(y.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(D.buffer.y,D.buffer.y,!0)))),this.register(L.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(E.window,f),this.register(E.onWindowChange((z=>this._registerIntersectionObserver(z,f))))}_registerIntersectionObserver(o,f){if("IntersectionObserver"in o){const y=new o.IntersectionObserver((R=>this._handleIntersectionChange(R[R.length-1])),{threshold:0});y.observe(f),this._observerDisposable.value=(0,C.toDisposable)((()=>y.disconnect()))}}_handleIntersectionChange(o){this._isPaused=o.isIntersecting===void 0?o.intersectionRatio===0:!o.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(o,f,y=!1){this._isPaused?this._needsFullRefresh=!0:(y||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(o,f,this._rowCount))}_renderRows(o,f){this._renderer.value&&(o=Math.min(o,this._rowCount-1),f=Math.min(f,this._rowCount-1),this._renderer.value.renderRows(o,f),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:o,end:f}),this._onRender.fire({start:o,end:f}),this._isNextRenderRedrawOnly=!0)}resize(o,f){this._rowCount=f,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(o){this._renderer.value=o,this._renderer.value&&(this._renderer.value.onRequestRedraw((f=>this.refreshRows(f.start,f.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(o){return this._renderDebouncer.addRefreshCallback(o)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var o,f;this._renderer.value&&((f=(o=this._renderer.value).clearTextureAtlas)==null||f.call(o),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(o,f){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var y;return(y=this._renderer.value)==null?void 0:y.handleResize(o,f)})):this._renderer.value.handleResize(o,f),this._fullRefresh())}handleCharSizeChanged(){var o;(o=this._renderer.value)==null||o.handleCharSizeChanged()}handleBlur(){var o;(o=this._renderer.value)==null||o.handleBlur()}handleFocus(){var o;(o=this._renderer.value)==null||o.handleFocus()}handleSelectionChanged(o,f,y){var R;this._selectionState.start=o,this._selectionState.end=f,this._selectionState.columnSelectMode=y,(R=this._renderer.value)==null||R.handleSelectionChanged(o,f,y)}handleCursorMove(){var o;(o=this._renderer.value)==null||o.handleCursorMove()}clear(){var o;(o=this._renderer.value)==null||o.clear()}};r.RenderService=c=d([g(2,a.IOptionsService),g(3,m.ICharSizeService),g(4,a.IDecorationService),g(5,a.IBufferService),g(6,m.ICoreBrowserService),g(7,m.IThemeService)],c)},9312:function(A,r,u){var d=this&&this.__decorate||function(E,L,z,H){var P,I=arguments.length,K=I<3?L:H===null?H=Object.getOwnPropertyDescriptor(L,z):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")K=Reflect.decorate(E,L,z,H);else for(var X=E.length-1;X>=0;X--)(P=E[X])&&(K=(I<3?P(K):I>3?P(L,z,K):P(L,z))||K);return I>3&&K&&Object.defineProperty(L,z,K),K},g=this&&this.__param||function(E,L){return function(z,H){L(z,H,E)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionService=void 0;const l=u(9806),m=u(9504),b=u(456),C=u(4725),p=u(8460),a=u(844),c=u(6114),o=u(4841),f=u(511),y=u(2585),R=" ",k=new RegExp(R,"g");let D=r.SelectionService=class extends a.Disposable{constructor(E,L,z,H,P,I,K,X,Y){super(),this._element=E,this._screenElement=L,this._linkifier=z,this._bufferService=H,this._coreService=P,this._mouseService=I,this._optionsService=K,this._renderService=X,this._coreBrowserService=Y,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new f.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new p.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new p.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new p.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new p.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=$=>this._handleMouseMove($),this._mouseUpListener=$=>this._handleMouseUp($),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim(($=>this._handleTrim($))),this.register(this._bufferService.buffers.onBufferActivate(($=>this._handleBufferActivate($)))),this.enable(),this._model=new b.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,a.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 E=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!E||!L||E[0]===L[0]&&E[1]===L[1])}get selectionText(){const E=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;if(!E||!L)return"";const z=this._bufferService.buffer,H=[];if(this._activeSelectionMode===3){if(E[0]===L[0])return"";const P=E[0]<L[0]?E[0]:L[0],I=E[0]<L[0]?L[0]:E[0];for(let K=E[1];K<=L[1];K++){const X=z.translateBufferLineToString(K,!0,P,I);H.push(X)}}else{const P=E[1]===L[1]?L[0]:void 0;H.push(z.translateBufferLineToString(E[1],!0,E[0],P));for(let I=E[1]+1;I<=L[1]-1;I++){const K=z.lines.get(I),X=z.translateBufferLineToString(I,!0);K!=null&&K.isWrapped?H[H.length-1]+=X:H.push(X)}if(E[1]!==L[1]){const I=z.lines.get(L[1]),K=z.translateBufferLineToString(L[1],!0,0,L[0]);I&&I.isWrapped?H[H.length-1]+=K:H.push(K)}}return H.map((P=>P.replace(k," "))).join(c.isWindows?`\r
|
|
413
|
-
`:`
|
|
414
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(E){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),c.isLinux&&E&&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(E){const L=this._getMouseBufferCoords(E),z=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!!(z&&H&&L)&&this._areCoordsInSelection(L,z,H)}isCellInSelection(E,L){const z=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!(!z||!H)&&this._areCoordsInSelection([E,L],z,H)}_areCoordsInSelection(E,L,z){return E[1]>L[1]&&E[1]<z[1]||L[1]===z[1]&&E[1]===L[1]&&E[0]>=L[0]&&E[0]<z[0]||L[1]<z[1]&&E[1]===z[1]&&E[0]<z[0]||L[1]<z[1]&&E[1]===L[1]&&E[0]>=L[0]}_selectWordAtCursor(E,L){var P,I;const z=(I=(P=this._linkifier.currentLink)==null?void 0:P.link)==null?void 0:I.range;if(z)return this._model.selectionStart=[z.start.x-1,z.start.y-1],this._model.selectionStartLength=(0,o.getRangeLength)(z,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const H=this._getMouseBufferCoords(E);return!!H&&(this._selectWordAt(H,L),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(E,L){this._model.clearSelection(),E=Math.max(E,0),L=Math.min(L,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,E],this._model.selectionEnd=[this._bufferService.cols,L],this.refresh(),this._onSelectionChange.fire()}_handleTrim(E){this._model.handleTrim(E)&&this.refresh()}_getMouseBufferCoords(E){const L=this._mouseService.getCoords(E,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(L)return L[0]--,L[1]--,L[1]+=this._bufferService.buffer.ydisp,L}_getMouseEventScrollAmount(E){let L=(0,l.getCoordsRelativeToElement)(this._coreBrowserService.window,E,this._screenElement)[1];const z=this._renderService.dimensions.css.canvas.height;return L>=0&&L<=z?0:(L>z&&(L-=z),L=Math.min(Math.max(L,-50),50),L/=50,L/Math.abs(L)+Math.round(14*L))}shouldForceSelection(E){return c.isMac?E.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:E.shiftKey}handleMouseDown(E){if(this._mouseDownTimeStamp=E.timeStamp,(E.button!==2||!this.hasSelection)&&E.button===0){if(!this._enabled){if(!this.shouldForceSelection(E))return;E.stopPropagation()}E.preventDefault(),this._dragScrollAmount=0,this._enabled&&E.shiftKey?this._handleIncrementalClick(E):E.detail===1?this._handleSingleClick(E):E.detail===2?this._handleDoubleClick(E):E.detail===3&&this._handleTripleClick(E),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(E){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(E))}_handleSingleClick(E){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(E)?3:0,this._model.selectionStart=this._getMouseBufferCoords(E),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const L=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);L&&L.length!==this._model.selectionStart[0]&&L.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(E){this._selectWordAtCursor(E,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(E){const L=this._getMouseBufferCoords(E);L&&(this._activeSelectionMode=2,this._selectLineAt(L[1]))}shouldColumnSelect(E){return E.altKey&&!(c.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(E){if(E.stopImmediatePropagation(),!this._model.selectionStart)return;const L=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(E),!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(E),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const z=this._bufferService.buffer;if(this._model.selectionEnd[1]<z.lines.length){const H=z.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]++}L&&L[0]===this._model.selectionEnd[0]&&L[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const E=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(E.ydisp+this._bufferService.rows,E.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=E.ydisp),this.refresh()}}_handleMouseUp(E){const L=E.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&L<500&&E.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const z=this._mouseService.getCoords(E,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(z&&z[0]!==void 0&&z[1]!==void 0){const H=(0,m.moveToCellSequence)(z[0]-1,z[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(H,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const E=this._model.finalSelectionStart,L=this._model.finalSelectionEnd,z=!(!E||!L||E[0]===L[0]&&E[1]===L[1]);z?E&&L&&(this._oldSelectionStart&&this._oldSelectionEnd&&E[0]===this._oldSelectionStart[0]&&E[1]===this._oldSelectionStart[1]&&L[0]===this._oldSelectionEnd[0]&&L[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(E,L,z)):this._oldHasSelection&&this._fireOnSelectionChange(E,L,z)}_fireOnSelectionChange(E,L,z){this._oldSelectionStart=E,this._oldSelectionEnd=L,this._oldHasSelection=z,this._onSelectionChange.fire()}_handleBufferActivate(E){this.clearSelection(),this._trimListener.dispose(),this._trimListener=E.activeBuffer.lines.onTrim((L=>this._handleTrim(L)))}_convertViewportColToCharacterIndex(E,L){let z=L;for(let H=0;L>=H;H++){const P=E.loadCell(H,this._workCell).getChars().length;this._workCell.getWidth()===0?z--:P>1&&L!==H&&(z+=P-1)}return z}setSelection(E,L,z){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[E,L],this._model.selectionStartLength=z,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(E){this._isClickInSelection(E)||(this._selectWordAtCursor(E,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(E,L,z=!0,H=!0){if(E[0]>=this._bufferService.cols)return;const P=this._bufferService.buffer,I=P.lines.get(E[1]);if(!I)return;const K=P.translateBufferLineToString(E[1],!1);let X=this._convertViewportColToCharacterIndex(I,E[0]),Y=X;const $=E[0]-X;let U=0,T=0,F=0,B=0;if(K.charAt(X)===" "){for(;X>0&&K.charAt(X-1)===" ";)X--;for(;Y<K.length&&K.charAt(Y+1)===" ";)Y++}else{let ne=E[0],pe=E[0];I.getWidth(ne)===0&&(U++,ne--),I.getWidth(pe)===2&&(T++,pe++);const ke=I.getString(pe).length;for(ke>1&&(B+=ke-1,Y+=ke-1);ne>0&&X>0&&!this._isCharWordSeparator(I.loadCell(ne-1,this._workCell));){I.loadCell(ne-1,this._workCell);const Q=this._workCell.getChars().length;this._workCell.getWidth()===0?(U++,ne--):Q>1&&(F+=Q-1,X-=Q-1),X--,ne--}for(;pe<I.length&&Y+1<K.length&&!this._isCharWordSeparator(I.loadCell(pe+1,this._workCell));){I.loadCell(pe+1,this._workCell);const Q=this._workCell.getChars().length;this._workCell.getWidth()===2?(T++,pe++):Q>1&&(B+=Q-1,Y+=Q-1),Y++,pe++}}Y++;let W=X+$-U+F,ee=Math.min(this._bufferService.cols,Y-X+U+T-F-B);if(L||K.slice(X,Y).trim()!==""){if(z&&W===0&&I.getCodePoint(0)!==32){const ne=P.lines.get(E[1]-1);if(ne&&I.isWrapped&&ne.getCodePoint(this._bufferService.cols-1)!==32){const pe=this._getWordAt([this._bufferService.cols-1,E[1]-1],!1,!0,!1);if(pe){const ke=this._bufferService.cols-pe.start;W-=ke,ee+=ke}}}if(H&&W+ee===this._bufferService.cols&&I.getCodePoint(this._bufferService.cols-1)!==32){const ne=P.lines.get(E[1]+1);if(ne!=null&&ne.isWrapped&&ne.getCodePoint(0)!==32){const pe=this._getWordAt([0,E[1]+1],!1,!1,!0);pe&&(ee+=pe.length)}}return{start:W,length:ee}}}_selectWordAt(E,L){const z=this._getWordAt(E,L);if(z){for(;z.start<0;)z.start+=this._bufferService.cols,E[1]--;this._model.selectionStart=[z.start,E[1]],this._model.selectionStartLength=z.length}}_selectToWordAt(E){const L=this._getWordAt(E,!0);if(L){let z=E[1];for(;L.start<0;)L.start+=this._bufferService.cols,z--;if(!this._model.areSelectionValuesReversed())for(;L.start+L.length>this._bufferService.cols;)L.length-=this._bufferService.cols,z++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?L.start:L.start+L.length,z]}}_isCharWordSeparator(E){return E.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(E.getChars())>=0}_selectLineAt(E){const L=this._bufferService.buffer.getWrappedRangeForLine(E),z={start:{x:0,y:L.first},end:{x:this._bufferService.cols-1,y:L.last}};this._model.selectionStart=[0,L.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,o.getRangeLength)(z,this._bufferService.cols)}};r.SelectionService=D=d([g(3,y.IBufferService),g(4,y.ICoreService),g(5,C.IMouseService),g(6,y.IOptionsService),g(7,C.IRenderService),g(8,C.ICoreBrowserService)],D)},4725:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ILinkProviderService=r.IThemeService=r.ICharacterJoinerService=r.ISelectionService=r.IRenderService=r.IMouseService=r.ICoreBrowserService=r.ICharSizeService=void 0;const d=u(8343);r.ICharSizeService=(0,d.createDecorator)("CharSizeService"),r.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),r.IMouseService=(0,d.createDecorator)("MouseService"),r.IRenderService=(0,d.createDecorator)("RenderService"),r.ISelectionService=(0,d.createDecorator)("SelectionService"),r.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),r.IThemeService=(0,d.createDecorator)("ThemeService"),r.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(A,r,u){var d=this&&this.__decorate||function(D,E,L,z){var H,P=arguments.length,I=P<3?E:z===null?z=Object.getOwnPropertyDescriptor(E,L):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(D,E,L,z);else for(var K=D.length-1;K>=0;K--)(H=D[K])&&(I=(P<3?H(I):P>3?H(E,L,I):H(E,L))||I);return P>3&&I&&Object.defineProperty(E,L,I),I},g=this&&this.__param||function(D,E){return function(L,z){E(L,z,D)}};Object.defineProperty(r,"__esModule",{value:!0}),r.ThemeService=r.DEFAULT_ANSI_COLORS=void 0;const l=u(7239),m=u(8055),b=u(8460),C=u(844),p=u(2585),a=m.css.toColor("#ffffff"),c=m.css.toColor("#000000"),o=m.css.toColor("#ffffff"),f=m.css.toColor("#000000"),y={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};r.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const D=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],E=[0,95,135,175,215,255];for(let L=0;L<216;L++){const z=E[L/36%6|0],H=E[L/6%6|0],P=E[L%6];D.push({css:m.channels.toCss(z,H,P),rgba:m.channels.toRgba(z,H,P)})}for(let L=0;L<24;L++){const z=8+10*L;D.push({css:m.channels.toCss(z,z,z),rgba:m.channels.toRgba(z,z,z)})}return D})());let R=r.ThemeService=class extends C.Disposable{get colors(){return this._colors}constructor(D){super(),this._optionsService=D,this._contrastCache=new l.ColorContrastCache,this._halfContrastCache=new l.ColorContrastCache,this._onChangeColors=this.register(new b.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:a,background:c,cursor:o,cursorAccent:f,selectionForeground:void 0,selectionBackgroundTransparent:y,selectionBackgroundOpaque:m.color.blend(c,y),selectionInactiveBackgroundTransparent:y,selectionInactiveBackgroundOpaque:m.color.blend(c,y),ansi:r.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(D={}){const E=this._colors;if(E.foreground=k(D.foreground,a),E.background=k(D.background,c),E.cursor=k(D.cursor,o),E.cursorAccent=k(D.cursorAccent,f),E.selectionBackgroundTransparent=k(D.selectionBackground,y),E.selectionBackgroundOpaque=m.color.blend(E.background,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundTransparent=k(D.selectionInactiveBackground,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundOpaque=m.color.blend(E.background,E.selectionInactiveBackgroundTransparent),E.selectionForeground=D.selectionForeground?k(D.selectionForeground,m.NULL_COLOR):void 0,E.selectionForeground===m.NULL_COLOR&&(E.selectionForeground=void 0),m.color.isOpaque(E.selectionBackgroundTransparent)&&(E.selectionBackgroundTransparent=m.color.opacity(E.selectionBackgroundTransparent,.3)),m.color.isOpaque(E.selectionInactiveBackgroundTransparent)&&(E.selectionInactiveBackgroundTransparent=m.color.opacity(E.selectionInactiveBackgroundTransparent,.3)),E.ansi=r.DEFAULT_ANSI_COLORS.slice(),E.ansi[0]=k(D.black,r.DEFAULT_ANSI_COLORS[0]),E.ansi[1]=k(D.red,r.DEFAULT_ANSI_COLORS[1]),E.ansi[2]=k(D.green,r.DEFAULT_ANSI_COLORS[2]),E.ansi[3]=k(D.yellow,r.DEFAULT_ANSI_COLORS[3]),E.ansi[4]=k(D.blue,r.DEFAULT_ANSI_COLORS[4]),E.ansi[5]=k(D.magenta,r.DEFAULT_ANSI_COLORS[5]),E.ansi[6]=k(D.cyan,r.DEFAULT_ANSI_COLORS[6]),E.ansi[7]=k(D.white,r.DEFAULT_ANSI_COLORS[7]),E.ansi[8]=k(D.brightBlack,r.DEFAULT_ANSI_COLORS[8]),E.ansi[9]=k(D.brightRed,r.DEFAULT_ANSI_COLORS[9]),E.ansi[10]=k(D.brightGreen,r.DEFAULT_ANSI_COLORS[10]),E.ansi[11]=k(D.brightYellow,r.DEFAULT_ANSI_COLORS[11]),E.ansi[12]=k(D.brightBlue,r.DEFAULT_ANSI_COLORS[12]),E.ansi[13]=k(D.brightMagenta,r.DEFAULT_ANSI_COLORS[13]),E.ansi[14]=k(D.brightCyan,r.DEFAULT_ANSI_COLORS[14]),E.ansi[15]=k(D.brightWhite,r.DEFAULT_ANSI_COLORS[15]),D.extendedAnsi){const L=Math.min(E.ansi.length-16,D.extendedAnsi.length);for(let z=0;z<L;z++)E.ansi[z+16]=k(D.extendedAnsi[z],r.DEFAULT_ANSI_COLORS[z+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(D){this._restoreColor(D),this._onChangeColors.fire(this.colors)}_restoreColor(D){if(D!==void 0)switch(D){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[D]=this._restoreColors.ansi[D]}else for(let E=0;E<this._restoreColors.ansi.length;++E)this._colors.ansi[E]=this._restoreColors.ansi[E]}modifyColors(D){D(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 k(D,E){if(D!==void 0)try{return m.css.toColor(D)}catch{}return E}r.ThemeService=R=d([g(0,p.IOptionsService)],R)},6349:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CircularList=void 0;const d=u(8460),g=u(844);class l extends g.Disposable{constructor(b){super(),this._maxLength=b,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.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(b){if(this._maxLength===b)return;const C=new Array(b);for(let p=0;p<Math.min(b,this.length);p++)C[p]=this._array[this._getCyclicIndex(p)];this._array=C,this._maxLength=b,this._startIndex=0}get length(){return this._length}set length(b){if(b>this._length)for(let C=this._length;C<b;C++)this._array[C]=void 0;this._length=b}get(b){return this._array[this._getCyclicIndex(b)]}set(b,C){this._array[this._getCyclicIndex(b)]=C}push(b){this._array[this._getCyclicIndex(this._length)]=b,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(b,C,...p){if(C){for(let a=b;a<this._length-C;a++)this._array[this._getCyclicIndex(a)]=this._array[this._getCyclicIndex(a+C)];this._length-=C,this.onDeleteEmitter.fire({index:b,amount:C})}for(let a=this._length-1;a>=b;a--)this._array[this._getCyclicIndex(a+p.length)]=this._array[this._getCyclicIndex(a)];for(let a=0;a<p.length;a++)this._array[this._getCyclicIndex(b+a)]=p[a];if(p.length&&this.onInsertEmitter.fire({index:b,amount:p.length}),this._length+p.length>this._maxLength){const a=this._length+p.length-this._maxLength;this._startIndex+=a,this._length=this._maxLength,this.onTrimEmitter.fire(a)}else this._length+=p.length}trimStart(b){b>this._length&&(b=this._length),this._startIndex+=b,this._length-=b,this.onTrimEmitter.fire(b)}shiftElements(b,C,p){if(!(C<=0)){if(b<0||b>=this._length)throw new Error("start argument out of range");if(b+p<0)throw new Error("Cannot shift elements in list beyond index 0");if(p>0){for(let c=C-1;c>=0;c--)this.set(b+c+p,this.get(b+c));const a=b+C+p-this._length;if(a>0)for(this._length+=a;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let a=0;a<C;a++)this.set(b+a+p,this.get(b+a))}}_getCyclicIndex(b){return(this._startIndex+b)%this._maxLength}}r.CircularList=l},1439:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.clone=void 0,r.clone=function u(d,g=5){if(typeof d!="object")return d;const l=Array.isArray(d)?[]:{};for(const m in d)l[m]=g<=1?d[m]:d[m]&&u(d[m],g-1);return l}},8055:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.contrastRatio=r.toPaddedHex=r.rgba=r.rgb=r.css=r.color=r.channels=r.NULL_COLOR=void 0;let u=0,d=0,g=0,l=0;var m,b,C,p,a;function c(f){const y=f.toString(16);return y.length<2?"0"+y:y}function o(f,y){return f<y?(y+.05)/(f+.05):(f+.05)/(y+.05)}r.NULL_COLOR={css:"#00000000",rgba:0},(function(f){f.toCss=function(y,R,k,D){return D!==void 0?`#${c(y)}${c(R)}${c(k)}${c(D)}`:`#${c(y)}${c(R)}${c(k)}`},f.toRgba=function(y,R,k,D=255){return(y<<24|R<<16|k<<8|D)>>>0},f.toColor=function(y,R,k,D){return{css:f.toCss(y,R,k,D),rgba:f.toRgba(y,R,k,D)}}})(m||(r.channels=m={})),(function(f){function y(R,k){return l=Math.round(255*k),[u,d,g]=a.toChannels(R.rgba),{css:m.toCss(u,d,g,l),rgba:m.toRgba(u,d,g,l)}}f.blend=function(R,k){if(l=(255&k.rgba)/255,l===1)return{css:k.css,rgba:k.rgba};const D=k.rgba>>24&255,E=k.rgba>>16&255,L=k.rgba>>8&255,z=R.rgba>>24&255,H=R.rgba>>16&255,P=R.rgba>>8&255;return u=z+Math.round((D-z)*l),d=H+Math.round((E-H)*l),g=P+Math.round((L-P)*l),{css:m.toCss(u,d,g),rgba:m.toRgba(u,d,g)}},f.isOpaque=function(R){return(255&R.rgba)==255},f.ensureContrastRatio=function(R,k,D){const E=a.ensureContrastRatio(R.rgba,k.rgba,D);if(E)return m.toColor(E>>24&255,E>>16&255,E>>8&255)},f.opaque=function(R){const k=(255|R.rgba)>>>0;return[u,d,g]=a.toChannels(k),{css:m.toCss(u,d,g),rgba:k}},f.opacity=y,f.multiplyOpacity=function(R,k){return l=255&R.rgba,y(R,l*k/255)},f.toColorRGB=function(R){return[R.rgba>>24&255,R.rgba>>16&255,R.rgba>>8&255]}})(b||(r.color=b={})),(function(f){let y,R;try{const k=document.createElement("canvas");k.width=1,k.height=1;const D=k.getContext("2d",{willReadFrequently:!0});D&&(y=D,y.globalCompositeOperation="copy",R=y.createLinearGradient(0,0,1,1))}catch{}f.toColor=function(k){if(k.match(/#[\da-f]{3,8}/i))switch(k.length){case 4:return u=parseInt(k.slice(1,2).repeat(2),16),d=parseInt(k.slice(2,3).repeat(2),16),g=parseInt(k.slice(3,4).repeat(2),16),m.toColor(u,d,g);case 5:return u=parseInt(k.slice(1,2).repeat(2),16),d=parseInt(k.slice(2,3).repeat(2),16),g=parseInt(k.slice(3,4).repeat(2),16),l=parseInt(k.slice(4,5).repeat(2),16),m.toColor(u,d,g,l);case 7:return{css:k,rgba:(parseInt(k.slice(1),16)<<8|255)>>>0};case 9:return{css:k,rgba:parseInt(k.slice(1),16)>>>0}}const D=k.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(D)return u=parseInt(D[1]),d=parseInt(D[2]),g=parseInt(D[3]),l=Math.round(255*(D[5]===void 0?1:parseFloat(D[5]))),m.toColor(u,d,g,l);if(!y||!R)throw new Error("css.toColor: Unsupported css format");if(y.fillStyle=R,y.fillStyle=k,typeof y.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(y.fillRect(0,0,1,1),[u,d,g,l]=y.getImageData(0,0,1,1).data,l!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(u,d,g,l),css:k}}})(C||(r.css=C={})),(function(f){function y(R,k,D){const E=R/255,L=k/255,z=D/255;return .2126*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))}f.relativeLuminance=function(R){return y(R>>16&255,R>>8&255,255&R)},f.relativeLuminance2=y})(p||(r.rgb=p={})),(function(f){function y(k,D,E){const L=k>>24&255,z=k>>16&255,H=k>>8&255;let P=D>>24&255,I=D>>16&255,K=D>>8&255,X=o(p.relativeLuminance2(P,I,K),p.relativeLuminance2(L,z,H));for(;X<E&&(P>0||I>0||K>0);)P-=Math.max(0,Math.ceil(.1*P)),I-=Math.max(0,Math.ceil(.1*I)),K-=Math.max(0,Math.ceil(.1*K)),X=o(p.relativeLuminance2(P,I,K),p.relativeLuminance2(L,z,H));return(P<<24|I<<16|K<<8|255)>>>0}function R(k,D,E){const L=k>>24&255,z=k>>16&255,H=k>>8&255;let P=D>>24&255,I=D>>16&255,K=D>>8&255,X=o(p.relativeLuminance2(P,I,K),p.relativeLuminance2(L,z,H));for(;X<E&&(P<255||I<255||K<255);)P=Math.min(255,P+Math.ceil(.1*(255-P))),I=Math.min(255,I+Math.ceil(.1*(255-I))),K=Math.min(255,K+Math.ceil(.1*(255-K))),X=o(p.relativeLuminance2(P,I,K),p.relativeLuminance2(L,z,H));return(P<<24|I<<16|K<<8|255)>>>0}f.blend=function(k,D){if(l=(255&D)/255,l===1)return D;const E=D>>24&255,L=D>>16&255,z=D>>8&255,H=k>>24&255,P=k>>16&255,I=k>>8&255;return u=H+Math.round((E-H)*l),d=P+Math.round((L-P)*l),g=I+Math.round((z-I)*l),m.toRgba(u,d,g)},f.ensureContrastRatio=function(k,D,E){const L=p.relativeLuminance(k>>8),z=p.relativeLuminance(D>>8);if(o(L,z)<E){if(z<L){const I=y(k,D,E),K=o(L,p.relativeLuminance(I>>8));if(K<E){const X=R(k,D,E);return K>o(L,p.relativeLuminance(X>>8))?I:X}return I}const H=R(k,D,E),P=o(L,p.relativeLuminance(H>>8));if(P<E){const I=y(k,D,E);return P>o(L,p.relativeLuminance(I>>8))?H:I}return H}},f.reduceLuminance=y,f.increaseLuminance=R,f.toChannels=function(k){return[k>>24&255,k>>16&255,k>>8&255,255&k]}})(a||(r.rgba=a={})),r.toPaddedHex=c,r.contrastRatio=o},8969:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreTerminal=void 0;const d=u(844),g=u(2585),l=u(4348),m=u(7866),b=u(744),C=u(7302),p=u(6975),a=u(8460),c=u(1753),o=u(1480),f=u(7994),y=u(9282),R=u(5435),k=u(5981),D=u(2660);let E=!1;class L extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new a.EventEmitter),this._onScroll.event((H=>{var P;(P=this._onScrollApi)==null||P.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 P in H)this.optionsService.options[P]=H[P]}constructor(H){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new a.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new a.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new a.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new a.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new a.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new a.EventEmitter),this._instantiationService=new l.InstantiationService,this.optionsService=this.register(new C.OptionsService(H)),this._instantiationService.setService(g.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(b.BufferService)),this._instantiationService.setService(g.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(g.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(p.CoreService)),this._instantiationService.setService(g.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(c.CoreMouseService)),this._instantiationService.setService(g.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(o.UnicodeService)),this._instantiationService.setService(g.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(f.CharsetService),this._instantiationService.setService(g.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(D.OscLinkService),this._instantiationService.setService(g.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new R.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,a.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,a.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,a.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,a.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((P=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((P=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new k.WriteBuffer(((P,I)=>this._inputHandler.parse(P,I)))),this.register((0,a.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(H,P){this._writeBuffer.write(H,P)}writeSync(H,P){this._logService.logLevel<=g.LogLevelEnum.WARN&&!E&&(this._logService.warn("writeSync is unreliable and will be removed soon."),E=!0),this._writeBuffer.writeSync(H,P)}input(H,P=!0){this.coreService.triggerDataEvent(H,P)}resize(H,P){isNaN(H)||isNaN(P)||(H=Math.max(H,b.MINIMUM_COLS),P=Math.max(P,b.MINIMUM_ROWS),this._bufferService.resize(H,P))}scroll(H,P=!1){this._bufferService.scroll(H,P)}scrollLines(H,P,I){this._bufferService.scrollLines(H,P,I)}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 P=H-this._bufferService.buffer.ydisp;P!==0&&this.scrollLines(P)}registerEscHandler(H,P){return this._inputHandler.registerEscHandler(H,P)}registerDcsHandler(H,P){return this._inputHandler.registerDcsHandler(H,P)}registerCsiHandler(H,P){return this._inputHandler.registerCsiHandler(H,P)}registerOscHandler(H,P){return this._inputHandler.registerOscHandler(H,P)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let H=!1;const P=this.optionsService.rawOptions.windowsPty;P&&P.buildNumber!==void 0&&P.buildNumber!==void 0?H=P.backend==="conpty"&&P.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(y.updateWindowsModeWrappedState.bind(null,this._bufferService))),H.push(this.registerCsiHandler({final:"H"},(()=>((0,y.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const P of H)P.dispose()}))}}}r.CoreTerminal=L},8460:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.runAndSubscribe=r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===u)return void this._listeners.splice(d,1)}}})),this._event}fire(u,d){const g=[];for(let l=0;l<this._listeners.length;l++)g.push(this._listeners[l]);for(let l=0;l<g.length;l++)g[l].call(void 0,u,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},r.forwardEvent=function(u,d){return u((g=>d.fire(g)))},r.runAndSubscribe=function(u,d){return d(void 0),u((g=>d(g)))}},5435:function(A,r,u){var d=this&&this.__decorate||function(U,T,F,B){var W,ee=arguments.length,ne=ee<3?T:B===null?B=Object.getOwnPropertyDescriptor(T,F):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ne=Reflect.decorate(U,T,F,B);else for(var pe=U.length-1;pe>=0;pe--)(W=U[pe])&&(ne=(ee<3?W(ne):ee>3?W(T,F,ne):W(T,F))||ne);return ee>3&&ne&&Object.defineProperty(T,F,ne),ne},g=this&&this.__param||function(U,T){return function(F,B){T(F,B,U)}};Object.defineProperty(r,"__esModule",{value:!0}),r.InputHandler=r.WindowsOptionsReportType=void 0;const l=u(2584),m=u(7116),b=u(2015),C=u(844),p=u(482),a=u(8437),c=u(8460),o=u(643),f=u(511),y=u(3734),R=u(2585),k=u(1480),D=u(6242),E=u(6351),L=u(5941),z={"(":0,")":1,"*":2,"+":3,"-":1,".":2},H=131072;function P(U,T){if(U>24)return T.setWinLines||!1;switch(U){case 1:return!!T.restoreWin;case 2:return!!T.minimizeWin;case 3:return!!T.setWinPosition;case 4:return!!T.setWinSizePixels;case 5:return!!T.raiseWin;case 6:return!!T.lowerWin;case 7:return!!T.refreshWin;case 8:return!!T.setWinSizeChars;case 9:return!!T.maximizeWin;case 10:return!!T.fullscreenWin;case 11:return!!T.getWinState;case 13:return!!T.getWinPosition;case 14:return!!T.getWinSizePixels;case 15:return!!T.getScreenSizePixels;case 16:return!!T.getCellSizePixels;case 18:return!!T.getWinSizeChars;case 19:return!!T.getScreenSizeChars;case 20:return!!T.getIconTitle;case 21:return!!T.getWinTitle;case 22:return!!T.pushTitle;case 23:return!!T.popTitle;case 24:return!!T.setWinLines}return!1}var I;(function(U){U[U.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",U[U.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(I||(r.WindowsOptionsReportType=I={}));let K=0;class X extends C.Disposable{getAttrData(){return this._curAttrData}constructor(T,F,B,W,ee,ne,pe,ke,Q=new b.EscapeSequenceParser){super(),this._bufferService=T,this._charsetService=F,this._coreService=B,this._logService=W,this._optionsService=ee,this._oscLinkService=ne,this._coreMouseService=pe,this._unicodeService=ke,this._parser=Q,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new p.StringToUtf32,this._utf8Decoder=new p.Utf8ToUtf32,this._workCell=new f.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=a.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=a.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new c.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new c.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new c.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new c.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new c.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new c.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new c.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new c.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new c.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new c.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new c.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 Y(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((G=>this._activeBuffer=G.activeBuffer))),this._parser.setCsiHandlerFallback(((G,he)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(G),params:he.toArray()})})),this._parser.setEscHandlerFallback((G=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(G)})})),this._parser.setExecuteHandlerFallback((G=>{this._logService.debug("Unknown EXECUTE code: ",{code:G})})),this._parser.setOscHandlerFallback(((G,he,ae)=>{this._logService.debug("Unknown OSC code: ",{identifier:G,action:he,data:ae})})),this._parser.setDcsHandlerFallback(((G,he,ae)=>{he==="HOOK"&&(ae=ae.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(G),action:he,payload:ae})})),this._parser.setPrintHandler(((G,he,ae)=>this.print(G,he,ae))),this._parser.registerCsiHandler({final:"@"},(G=>this.insertChars(G))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(G=>this.scrollLeft(G))),this._parser.registerCsiHandler({final:"A"},(G=>this.cursorUp(G))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(G=>this.scrollRight(G))),this._parser.registerCsiHandler({final:"B"},(G=>this.cursorDown(G))),this._parser.registerCsiHandler({final:"C"},(G=>this.cursorForward(G))),this._parser.registerCsiHandler({final:"D"},(G=>this.cursorBackward(G))),this._parser.registerCsiHandler({final:"E"},(G=>this.cursorNextLine(G))),this._parser.registerCsiHandler({final:"F"},(G=>this.cursorPrecedingLine(G))),this._parser.registerCsiHandler({final:"G"},(G=>this.cursorCharAbsolute(G))),this._parser.registerCsiHandler({final:"H"},(G=>this.cursorPosition(G))),this._parser.registerCsiHandler({final:"I"},(G=>this.cursorForwardTab(G))),this._parser.registerCsiHandler({final:"J"},(G=>this.eraseInDisplay(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(G=>this.eraseInDisplay(G,!0))),this._parser.registerCsiHandler({final:"K"},(G=>this.eraseInLine(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(G=>this.eraseInLine(G,!0))),this._parser.registerCsiHandler({final:"L"},(G=>this.insertLines(G))),this._parser.registerCsiHandler({final:"M"},(G=>this.deleteLines(G))),this._parser.registerCsiHandler({final:"P"},(G=>this.deleteChars(G))),this._parser.registerCsiHandler({final:"S"},(G=>this.scrollUp(G))),this._parser.registerCsiHandler({final:"T"},(G=>this.scrollDown(G))),this._parser.registerCsiHandler({final:"X"},(G=>this.eraseChars(G))),this._parser.registerCsiHandler({final:"Z"},(G=>this.cursorBackwardTab(G))),this._parser.registerCsiHandler({final:"`"},(G=>this.charPosAbsolute(G))),this._parser.registerCsiHandler({final:"a"},(G=>this.hPositionRelative(G))),this._parser.registerCsiHandler({final:"b"},(G=>this.repeatPrecedingCharacter(G))),this._parser.registerCsiHandler({final:"c"},(G=>this.sendDeviceAttributesPrimary(G))),this._parser.registerCsiHandler({prefix:">",final:"c"},(G=>this.sendDeviceAttributesSecondary(G))),this._parser.registerCsiHandler({final:"d"},(G=>this.linePosAbsolute(G))),this._parser.registerCsiHandler({final:"e"},(G=>this.vPositionRelative(G))),this._parser.registerCsiHandler({final:"f"},(G=>this.hVPosition(G))),this._parser.registerCsiHandler({final:"g"},(G=>this.tabClear(G))),this._parser.registerCsiHandler({final:"h"},(G=>this.setMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(G=>this.setModePrivate(G))),this._parser.registerCsiHandler({final:"l"},(G=>this.resetMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(G=>this.resetModePrivate(G))),this._parser.registerCsiHandler({final:"m"},(G=>this.charAttributes(G))),this._parser.registerCsiHandler({final:"n"},(G=>this.deviceStatus(G))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(G=>this.deviceStatusPrivate(G))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(G=>this.softReset(G))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(G=>this.setCursorStyle(G))),this._parser.registerCsiHandler({final:"r"},(G=>this.setScrollRegion(G))),this._parser.registerCsiHandler({final:"s"},(G=>this.saveCursor(G))),this._parser.registerCsiHandler({final:"t"},(G=>this.windowOptions(G))),this._parser.registerCsiHandler({final:"u"},(G=>this.restoreCursor(G))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(G=>this.insertColumns(G))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(G=>this.deleteColumns(G))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(G=>this.selectProtected(G))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(G=>this.requestMode(G,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(G=>this.requestMode(G,!1))),this._parser.setExecuteHandler(l.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(l.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(l.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(l.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(l.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(l.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(l.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(l.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(l.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new D.OscHandler((G=>(this.setTitle(G),this.setIconName(G),!0)))),this._parser.registerOscHandler(1,new D.OscHandler((G=>this.setIconName(G)))),this._parser.registerOscHandler(2,new D.OscHandler((G=>this.setTitle(G)))),this._parser.registerOscHandler(4,new D.OscHandler((G=>this.setOrReportIndexedColor(G)))),this._parser.registerOscHandler(8,new D.OscHandler((G=>this.setHyperlink(G)))),this._parser.registerOscHandler(10,new D.OscHandler((G=>this.setOrReportFgColor(G)))),this._parser.registerOscHandler(11,new D.OscHandler((G=>this.setOrReportBgColor(G)))),this._parser.registerOscHandler(12,new D.OscHandler((G=>this.setOrReportCursorColor(G)))),this._parser.registerOscHandler(104,new D.OscHandler((G=>this.restoreIndexedColor(G)))),this._parser.registerOscHandler(110,new D.OscHandler((G=>this.restoreFgColor(G)))),this._parser.registerOscHandler(111,new D.OscHandler((G=>this.restoreBgColor(G)))),this._parser.registerOscHandler(112,new D.OscHandler((G=>this.restoreCursorColor(G)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const G in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:G},(()=>this.selectCharset("("+G))),this._parser.registerEscHandler({intermediates:")",final:G},(()=>this.selectCharset(")"+G))),this._parser.registerEscHandler({intermediates:"*",final:G},(()=>this.selectCharset("*"+G))),this._parser.registerEscHandler({intermediates:"+",final:G},(()=>this.selectCharset("+"+G))),this._parser.registerEscHandler({intermediates:"-",final:G},(()=>this.selectCharset("-"+G))),this._parser.registerEscHandler({intermediates:".",final:G},(()=>this.selectCharset("."+G))),this._parser.registerEscHandler({intermediates:"/",final:G},(()=>this.selectCharset("/"+G)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((G=>(this._logService.error("Parsing error: ",G),G))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new E.DcsHandler(((G,he)=>this.requestStatusString(G,he))))}_preserveStack(T,F,B,W){this._parseStack.paused=!0,this._parseStack.cursorStartX=T,this._parseStack.cursorStartY=F,this._parseStack.decodedLength=B,this._parseStack.position=W}_logSlowResolvingAsync(T){this._logService.logLevel<=R.LogLevelEnum.WARN&&Promise.race([T,new Promise(((F,B)=>setTimeout((()=>B("#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(T,F){let B,W=this._activeBuffer.x,ee=this._activeBuffer.y,ne=0;const pe=this._parseStack.paused;if(pe){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,F))return this._logSlowResolvingAsync(B),B;W=this._parseStack.cursorStartX,ee=this._parseStack.cursorStartY,this._parseStack.paused=!1,T.length>H&&(ne=this._parseStack.position+H)}if(this._logService.logLevel<=R.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof T=="string"?` "${T}"`:` "${Array.prototype.map.call(T,(G=>String.fromCharCode(G))).join("")}"`),typeof T=="string"?T.split("").map((G=>G.charCodeAt(0))):T),this._parseBuffer.length<T.length&&this._parseBuffer.length<H&&(this._parseBuffer=new Uint32Array(Math.min(T.length,H))),pe||this._dirtyRowTracker.clearRange(),T.length>H)for(let G=ne;G<T.length;G+=H){const he=G+H<T.length?G+H:T.length,ae=typeof T=="string"?this._stringDecoder.decode(T.substring(G,he),this._parseBuffer):this._utf8Decoder.decode(T.subarray(G,he),this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,ae))return this._preserveStack(W,ee,ae,G),this._logSlowResolvingAsync(B),B}else if(!pe){const G=typeof T=="string"?this._stringDecoder.decode(T,this._parseBuffer):this._utf8Decoder.decode(T,this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,G))return this._preserveStack(W,ee,G,0),this._logSlowResolvingAsync(B),B}this._activeBuffer.x===W&&this._activeBuffer.y===ee||this._onCursorMove.fire();const ke=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Q=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Q<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Q,this._bufferService.rows-1),Math.min(ke,this._bufferService.rows-1))}print(T,F,B){let W,ee;const ne=this._charsetService.charset,pe=this._optionsService.rawOptions.screenReaderMode,ke=this._bufferService.cols,Q=this._coreService.decPrivateModes.wraparound,G=this._coreService.modes.insertMode,he=this._curAttrData;let ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&B-F>0&&ae.getWidth(this._activeBuffer.x-1)===2&&ae.setCellFromCodepoint(this._activeBuffer.x-1,0,1,he);let Ae=this._parser.precedingJoinState;for(let Oe=F;Oe<B;++Oe){if(W=T[Oe],W<127&&ne){const ye=ne[String.fromCharCode(W)];ye&&(W=ye.charCodeAt(0))}const Ye=this._unicodeService.charProperties(W,Ae);ee=k.UnicodeService.extractWidth(Ye);const $e=k.UnicodeService.extractShouldJoin(Ye),at=$e?k.UnicodeService.extractWidth(Ae):0;if(Ae=Ye,pe&&this._onA11yChar.fire((0,p.stringFromCodePoint)(W)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+ee-at>ke){if(Q){const ye=ae;let Te=this._activeBuffer.x-at;for(this._activeBuffer.x=at,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),ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),at>0&&ae instanceof a.BufferLine&&ae.copyCellsFrom(ye,Te,0,at,!1);Te<ke;)ye.setCellFromCodepoint(Te++,0,1,he)}else if(this._activeBuffer.x=ke-1,ee===2)continue}if($e&&this._activeBuffer.x){const ye=ae.getWidth(this._activeBuffer.x-1)?1:2;ae.addCodepointToCell(this._activeBuffer.x-ye,W,ee);for(let Te=ee-at;--Te>=0;)ae.setCellFromCodepoint(this._activeBuffer.x++,0,0,he)}else if(G&&(ae.insertCells(this._activeBuffer.x,ee-at,this._activeBuffer.getNullCell(he)),ae.getWidth(ke-1)===2&&ae.setCellFromCodepoint(ke-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,he)),ae.setCellFromCodepoint(this._activeBuffer.x++,W,ee,he),ee>0)for(;--ee;)ae.setCellFromCodepoint(this._activeBuffer.x++,0,0,he)}this._parser.precedingJoinState=Ae,this._activeBuffer.x<ke&&B-F>0&&ae.getWidth(this._activeBuffer.x)===0&&!ae.hasContent(this._activeBuffer.x)&&ae.setCellFromCodepoint(this._activeBuffer.x,0,1,he),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(T,F){return T.final!=="t"||T.prefix||T.intermediates?this._parser.registerCsiHandler(T,F):this._parser.registerCsiHandler(T,(B=>!P(B.params[0],this._optionsService.rawOptions.windowOptions)||F(B)))}registerDcsHandler(T,F){return this._parser.registerDcsHandler(T,new E.DcsHandler(F))}registerEscHandler(T,F){return this._parser.registerEscHandler(T,F)}registerOscHandler(T,F){return this._parser.registerOscHandler(T,new D.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 T;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&&((T=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&T.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 T=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-T),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(T=this._bufferService.cols-1){this._activeBuffer.x=Math.min(T,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(T,F){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=T,this._activeBuffer.y=this._activeBuffer.scrollTop+F):(this._activeBuffer.x=T,this._activeBuffer.y=F),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(T,F){this._restrictCursor(),this._setCursor(this._activeBuffer.x+T,this._activeBuffer.y+F)}cursorUp(T){const F=this._activeBuffer.y-this._activeBuffer.scrollTop;return F>=0?this._moveCursor(0,-Math.min(F,T.params[0]||1)):this._moveCursor(0,-(T.params[0]||1)),!0}cursorDown(T){const F=this._activeBuffer.scrollBottom-this._activeBuffer.y;return F>=0?this._moveCursor(0,Math.min(F,T.params[0]||1)):this._moveCursor(0,T.params[0]||1),!0}cursorForward(T){return this._moveCursor(T.params[0]||1,0),!0}cursorBackward(T){return this._moveCursor(-(T.params[0]||1),0),!0}cursorNextLine(T){return this.cursorDown(T),this._activeBuffer.x=0,!0}cursorPrecedingLine(T){return this.cursorUp(T),this._activeBuffer.x=0,!0}cursorCharAbsolute(T){return this._setCursor((T.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(T){return this._setCursor(T.length>=2?(T.params[1]||1)-1:0,(T.params[0]||1)-1),!0}charPosAbsolute(T){return this._setCursor((T.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(T){return this._moveCursor(T.params[0]||1,0),!0}linePosAbsolute(T){return this._setCursor(this._activeBuffer.x,(T.params[0]||1)-1),!0}vPositionRelative(T){return this._moveCursor(0,T.params[0]||1),!0}hVPosition(T){return this.cursorPosition(T),!0}tabClear(T){const F=T.params[0];return F===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:F===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(T){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let F=T.params[0]||1;for(;F--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(T){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let F=T.params[0]||1;for(;F--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(T){const F=T.params[0];return F===1&&(this._curAttrData.bg|=536870912),F!==2&&F!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(T,F,B,W=!1,ee=!1){const ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);ne.replaceCells(F,B,this._activeBuffer.getNullCell(this._eraseAttrData()),ee),W&&(ne.isWrapped=!1)}_resetBufferLine(T,F=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),F),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+T),B.isWrapped=!1)}eraseInDisplay(T,F=!1){let B;switch(this._restrictCursor(this._bufferService.cols),T.params[0]){case 0:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,F);B<this._bufferService.rows;B++)this._resetBufferLine(B,F);this._dirtyRowTracker.markDirty(B);break;case 1:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B,0,this._activeBuffer.x+1,!0,F),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(B+1).isWrapped=!1);B--;)this._resetBufferLine(B,F);this._dirtyRowTracker.markDirty(0);break;case 2:for(B=this._bufferService.rows,this._dirtyRowTracker.markDirty(B-1);B--;)this._resetBufferLine(B,F);this._dirtyRowTracker.markDirty(0);break;case 3:const W=this._activeBuffer.lines.length-this._bufferService.rows;W>0&&(this._activeBuffer.lines.trimStart(W),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-W,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-W,0),this._onScroll.fire(0))}return!0}eraseInLine(T,F=!1){switch(this._restrictCursor(this._bufferService.cols),T.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(T){this._restrictCursor();let F=T.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y,W=this._bufferService.rows-1-this._activeBuffer.scrollBottom,ee=this._bufferService.rows-1+this._activeBuffer.ybase-W+1;for(;F--;)this._activeBuffer.lines.splice(ee-1,1),this._activeBuffer.lines.splice(B,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(T){this._restrictCursor();let F=T.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y;let W;for(W=this._bufferService.rows-1-this._activeBuffer.scrollBottom,W=this._bufferService.rows-1+this._activeBuffer.ybase-W;F--;)this._activeBuffer.lines.splice(B,1),this._activeBuffer.lines.splice(W,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(T){this._restrictCursor();const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return F&&(F.insertCells(this._activeBuffer.x,T.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(T){this._restrictCursor();const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return F&&(F.deleteCells(this._activeBuffer.x,T.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(T){let F=T.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(T){let F=T.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(a.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const F=T.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);W.deleteCells(0,F,this._activeBuffer.getNullCell(this._eraseAttrData())),W.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const F=T.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);W.insertCells(0,F,this._activeBuffer.getNullCell(this._eraseAttrData())),W.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const F=T.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);W.insertCells(this._activeBuffer.x,F,this._activeBuffer.getNullCell(this._eraseAttrData())),W.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const F=T.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);W.deleteCells(this._activeBuffer.x,F,this._activeBuffer.getNullCell(this._eraseAttrData())),W.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(T){this._restrictCursor();const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return F&&(F.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(T.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(T){const F=this._parser.precedingJoinState;if(!F)return!0;const B=T.params[0]||1,W=k.UnicodeService.extractWidth(F),ee=this._activeBuffer.x-W,ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(ee),pe=new Uint32Array(ne.length*B);let ke=0;for(let G=0;G<ne.length;){const he=ne.codePointAt(G)||0;pe[ke++]=he,G+=he>65535?2:1}let Q=ke;for(let G=1;G<B;++G)pe.copyWithin(Q,0,ke),Q+=ke;return this.print(pe,0,Q),!0}sendDeviceAttributesPrimary(T){return T.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(l.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(l.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(T){return T.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(l.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(l.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(T.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(l.C0.ESC+"[>83;40003;0c")),!0}_is(T){return(this._optionsService.rawOptions.termName+"").indexOf(T)===0}setMode(T){for(let F=0;F<T.length;F++)switch(T.params[F]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(T){for(let F=0;F<T.length;F++)switch(T.params[F]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.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(T){for(let F=0;F<T.length;F++)switch(T.params[F]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(T){for(let F=0;F<T.length;F++)switch(T.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(),T.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(T,F){const B=this._coreService.decPrivateModes,{activeProtocol:W,activeEncoding:ee}=this._coreMouseService,ne=this._coreService,{buffers:pe,cols:ke}=this._bufferService,{active:Q,alt:G}=pe,he=this._optionsService.rawOptions,ae=$e=>$e?1:2,Ae=T.params[0];return Oe=Ae,Ye=F?Ae===2?4:Ae===4?ae(ne.modes.insertMode):Ae===12?3:Ae===20?ae(he.convertEol):0:Ae===1?ae(B.applicationCursorKeys):Ae===3?he.windowOptions.setWinLines?ke===80?2:ke===132?1:0:0:Ae===6?ae(B.origin):Ae===7?ae(B.wraparound):Ae===8?3:Ae===9?ae(W==="X10"):Ae===12?ae(he.cursorBlink):Ae===25?ae(!ne.isCursorHidden):Ae===45?ae(B.reverseWraparound):Ae===66?ae(B.applicationKeypad):Ae===67?4:Ae===1e3?ae(W==="VT200"):Ae===1002?ae(W==="DRAG"):Ae===1003?ae(W==="ANY"):Ae===1004?ae(B.sendFocus):Ae===1005?4:Ae===1006?ae(ee==="SGR"):Ae===1015?4:Ae===1016?ae(ee==="SGR_PIXELS"):Ae===1048?1:Ae===47||Ae===1047||Ae===1049?ae(Q===G):Ae===2004?ae(B.bracketedPasteMode):0,ne.triggerDataEvent(`${l.C0.ESC}[${F?"":"?"}${Oe};${Ye}$y`),!0;var Oe,Ye}_updateAttrColor(T,F,B,W,ee){return F===2?(T|=50331648,T&=-16777216,T|=y.AttributeData.fromColorRGB([B,W,ee])):F===5&&(T&=-50331904,T|=33554432|255&B),T}_extractColor(T,F,B){const W=[0,0,-1,0,0,0];let ee=0,ne=0;do{if(W[ne+ee]=T.params[F+ne],T.hasSubParams(F+ne)){const pe=T.getSubParams(F+ne);let ke=0;do W[1]===5&&(ee=1),W[ne+ke+1+ee]=pe[ke];while(++ke<pe.length&&ke+ne+1+ee<W.length);break}if(W[1]===5&&ne+ee>=2||W[1]===2&&ne+ee>=5)break;W[1]&&(ee=1)}while(++ne+F<T.length&&ne+ee<W.length);for(let pe=2;pe<W.length;++pe)W[pe]===-1&&(W[pe]=0);switch(W[0]){case 38:B.fg=this._updateAttrColor(B.fg,W[1],W[3],W[4],W[5]);break;case 48:B.bg=this._updateAttrColor(B.bg,W[1],W[3],W[4],W[5]);break;case 58:B.extended=B.extended.clone(),B.extended.underlineColor=this._updateAttrColor(B.extended.underlineColor,W[1],W[3],W[4],W[5])}return ne}_processUnderline(T,F){F.extended=F.extended.clone(),(!~T||T>5)&&(T=1),F.extended.underlineStyle=T,F.fg|=268435456,T===0&&(F.fg&=-268435457),F.updateExtended()}_processSGR0(T){T.fg=a.DEFAULT_ATTR_DATA.fg,T.bg=a.DEFAULT_ATTR_DATA.bg,T.extended=T.extended.clone(),T.extended.underlineStyle=0,T.extended.underlineColor&=-67108864,T.updateExtended()}charAttributes(T){if(T.length===1&&T.params[0]===0)return this._processSGR0(this._curAttrData),!0;const F=T.length;let B;const W=this._curAttrData;for(let ee=0;ee<F;ee++)B=T.params[ee],B>=30&&B<=37?(W.fg&=-50331904,W.fg|=16777216|B-30):B>=40&&B<=47?(W.bg&=-50331904,W.bg|=16777216|B-40):B>=90&&B<=97?(W.fg&=-50331904,W.fg|=16777224|B-90):B>=100&&B<=107?(W.bg&=-50331904,W.bg|=16777224|B-100):B===0?this._processSGR0(W):B===1?W.fg|=134217728:B===3?W.bg|=67108864:B===4?(W.fg|=268435456,this._processUnderline(T.hasSubParams(ee)?T.getSubParams(ee)[0]:1,W)):B===5?W.fg|=536870912:B===7?W.fg|=67108864:B===8?W.fg|=1073741824:B===9?W.fg|=2147483648:B===2?W.bg|=134217728:B===21?this._processUnderline(2,W):B===22?(W.fg&=-134217729,W.bg&=-134217729):B===23?W.bg&=-67108865:B===24?(W.fg&=-268435457,this._processUnderline(0,W)):B===25?W.fg&=-536870913:B===27?W.fg&=-67108865:B===28?W.fg&=-1073741825:B===29?W.fg&=2147483647:B===39?(W.fg&=-67108864,W.fg|=16777215&a.DEFAULT_ATTR_DATA.fg):B===49?(W.bg&=-67108864,W.bg|=16777215&a.DEFAULT_ATTR_DATA.bg):B===38||B===48||B===58?ee+=this._extractColor(T,ee,W):B===53?W.bg|=1073741824:B===55?W.bg&=-1073741825:B===59?(W.extended=W.extended.clone(),W.extended.underlineColor=-1,W.updateExtended()):B===100?(W.fg&=-67108864,W.fg|=16777215&a.DEFAULT_ATTR_DATA.fg,W.bg&=-67108864,W.bg|=16777215&a.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",B);return!0}deviceStatus(T){switch(T.params[0]){case 5:this._coreService.triggerDataEvent(`${l.C0.ESC}[0n`);break;case 6:const F=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${l.C0.ESC}[${F};${B}R`)}return!0}deviceStatusPrivate(T){if(T.params[0]===6){const F=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${l.C0.ESC}[?${F};${B}R`)}return!0}softReset(T){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=a.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(T){const F=T.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 B=F%2==1;return this._optionsService.options.cursorBlink=B,!0}setScrollRegion(T){const F=T.params[0]||1;let B;return(T.length<2||(B=T.params[1])>this._bufferService.rows||B===0)&&(B=this._bufferService.rows),B>F&&(this._activeBuffer.scrollTop=F-1,this._activeBuffer.scrollBottom=B-1,this._setCursor(0,0)),!0}windowOptions(T){if(!P(T.params[0],this._optionsService.rawOptions.windowOptions))return!0;const F=T.length>1?T.params[1]:0;switch(T.params[0]){case 14:F!==2&&this._onRequestWindowsOptionsReport.fire(I.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(I.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${l.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(T){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(T){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(T){return this._windowTitle=T,this._onTitleChange.fire(T),!0}setIconName(T){return this._iconName=T,!0}setOrReportIndexedColor(T){const F=[],B=T.split(";");for(;B.length>1;){const W=B.shift(),ee=B.shift();if(/^\d+$/.exec(W)){const ne=parseInt(W);if($(ne))if(ee==="?")F.push({type:0,index:ne});else{const pe=(0,L.parseColor)(ee);pe&&F.push({type:1,index:ne,color:pe})}}}return F.length&&this._onColor.fire(F),!0}setHyperlink(T){const F=T.split(";");return!(F.length<2)&&(F[1]?this._createHyperlink(F[0],F[1]):!F[0]&&this._finishHyperlink())}_createHyperlink(T,F){this._getCurrentLinkId()&&this._finishHyperlink();const B=T.split(":");let W;const ee=B.findIndex((ne=>ne.startsWith("id=")));return ee!==-1&&(W=B[ee].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:W,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(T,F){const B=T.split(";");for(let W=0;W<B.length&&!(F>=this._specialColors.length);++W,++F)if(B[W]==="?")this._onColor.fire([{type:0,index:this._specialColors[F]}]);else{const ee=(0,L.parseColor)(B[W]);ee&&this._onColor.fire([{type:1,index:this._specialColors[F],color:ee}])}return!0}setOrReportFgColor(T){return this._setOrReportSpecialColor(T,0)}setOrReportBgColor(T){return this._setOrReportSpecialColor(T,1)}setOrReportCursorColor(T){return this._setOrReportSpecialColor(T,2)}restoreIndexedColor(T){if(!T)return this._onColor.fire([{type:2}]),!0;const F=[],B=T.split(";");for(let W=0;W<B.length;++W)if(/^\d+$/.exec(B[W])){const ee=parseInt(B[W]);$(ee)&&F.push({type:2,index:ee})}return F.length&&this._onColor.fire(F),!0}restoreFgColor(T){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(T){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(T){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,m.DEFAULT_CHARSET),!0}selectCharset(T){return T.length!==2?(this.selectDefaultCharset(),!0):(T[0]==="/"||this._charsetService.setgCharset(z[T[0]],m.CHARSETS[T[1]]||m.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 T=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,T,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=a.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=a.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(T){return this._charsetService.setgLevel(T),!0}screenAlignmentPattern(){const T=new f.CellData;T.content=4194373,T.fg=this._curAttrData.fg,T.bg=this._curAttrData.bg,this._setCursor(0,0);for(let F=0;F<this._bufferService.rows;++F){const B=this._activeBuffer.ybase+this._activeBuffer.y+F,W=this._activeBuffer.lines.get(B);W&&(W.fill(T),W.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(T,F){const B=this._bufferService.buffer,W=this._optionsService.rawOptions;return(ee=>(this._coreService.triggerDataEvent(`${l.C0.ESC}${ee}${l.C0.ESC}\\`),!0))(T==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:T==='"p'?'P1$r61;1"p':T==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:T==="m"?"P1$r0m":T===" q"?`P1$r${{block:2,underline:4,bar:6}[W.cursorStyle]-(W.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(T,F){this._dirtyRowTracker.markRangeDirty(T,F)}}r.InputHandler=X;let Y=class{constructor(U){this._bufferService=U,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(U){U<this.start?this.start=U:U>this.end&&(this.end=U)}markRangeDirty(U,T){U>T&&(K=U,U=T,T=K),U<this.start&&(this.start=U),T>this.end&&(this.end=T)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function $(U){return 0<=U&&U<256}Y=d([g(0,R.IBufferService)],Y)},844:(A,r)=>{function u(d){for(const g of d)g.dispose();d.length=0}Object.defineProperty(r,"__esModule",{value:!0}),r.getDisposeArrayDisposable=r.disposeArray=r.toDisposable=r.MutableDisposable=r.Disposable=void 0,r.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const g=this._disposables.indexOf(d);g!==-1&&this._disposables.splice(g,1)}},r.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var g;this._isDisposed||d===this._value||((g=this._value)==null||g.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},r.toDisposable=function(d){return{dispose:d}},r.disposeArray=u,r.getDisposeArrayDisposable=function(d){return{dispose:()=>u(d)}}},1505:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FourKeyMap=r.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(g,l,m){this._data[g]||(this._data[g]={}),this._data[g][l]=m}get(g,l){return this._data[g]?this._data[g][l]:void 0}clear(){this._data={}}}r.TwoKeyMap=u,r.FourKeyMap=class{constructor(){this._data=new u}set(d,g,l,m,b){this._data.get(d,g)||this._data.set(d,g,new u),this._data.get(d,g).set(l,m,b)}get(d,g,l,m){var b;return(b=this._data.get(d,g))==null?void 0:b.get(l,m)}clear(){this._data.clear()}}},6114:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isChromeOS=r.isLinux=r.isWindows=r.isIphone=r.isIpad=r.isMac=r.getSafariVersion=r.isSafari=r.isLegacyEdge=r.isFirefox=r.isNode=void 0,r.isNode=typeof process<"u"&&"title"in process;const u=r.isNode?"node":navigator.userAgent,d=r.isNode?"node":navigator.platform;r.isFirefox=u.includes("Firefox"),r.isLegacyEdge=u.includes("Edge"),r.isSafari=/^((?!chrome|android).)*safari/i.test(u),r.getSafariVersion=function(){if(!r.isSafari)return 0;const g=u.match(/Version\/(\d+)/);return g===null||g.length<2?0:parseInt(g[1])},r.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),r.isIpad=d==="iPad",r.isIphone=d==="iPhone",r.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),r.isLinux=d.indexOf("Linux")>=0,r.isChromeOS=/\bCrOS\b/.test(u)},6106:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SortedList=void 0;let u=0;r.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(u=this._search(this._getKey(d)),this._array.splice(u,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const g=this._getKey(d);if(g===void 0||(u=this._search(g),u===-1)||this._getKey(this._array[u])!==g)return!1;do if(this._array[u]===d)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===g);return!1}*getKeyIterator(d){if(this._array.length!==0&&(u=this._search(d),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===d))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===d)}forEachByKey(d,g){if(this._array.length!==0&&(u=this._search(d),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===d))do g(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===d)}values(){return[...this._array].values()}_search(d){let g=0,l=this._array.length-1;for(;l>=g;){let m=g+l>>1;const b=this._getKey(this._array[m]);if(b>d)l=m-1;else{if(!(b<d)){for(;m>0&&this._getKey(this._array[m-1])===d;)m--;return m}g=m+1}}return g}}},7226:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DebouncedIdleTask=r.IdleTaskQueue=r.PriorityTaskQueue=void 0;const d=u(6114);class g{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),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(b){this._idleCallback=void 0;let C=0,p=0,a=b.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),p=Math.max(C,p),c=b.timeRemaining(),1.5*p>c)return a-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(a-C))}ms`),void this._start();a=c}this.clear()}}class l extends g{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const C=Date.now()+b;return{timeRemaining:()=>Math.max(0,C-Date.now())}}}r.PriorityTaskQueue=l,r.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends g{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:l,r.DebouncedIdleTask=class{constructor(){this._queue=new r.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.updateWindowsModeWrappedState=void 0;const d=u(643);r.updateWindowsModeWrappedState=function(g){const l=g.buffer.lines.get(g.buffer.ybase+g.buffer.y-1),m=l==null?void 0:l.get(g.cols-1),b=g.buffer.lines.get(g.buffer.ybase+g.buffer.y);b&&m&&(b.isWrapped=m[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&m[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ExtendedAttrs=r.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(l){return[l>>>16&255,l>>>8&255,255&l]}static fromColorRGB(l){return(255&l[0])<<16|(255&l[1])<<8|255&l[2]}clone(){const l=new u;return l.fg=this.fg,l.bg=this.bg,l.extended=this.extended.clone(),l}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}r.AttributeData=u;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(l){this._ext=l}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(l){this._ext&=-469762049,this._ext|=l<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(l){this._ext&=-67108864,this._ext|=67108863&l}get urlId(){return this._urlId}set urlId(l){this._urlId=l}get underlineVariantOffset(){const l=(3758096384&this._ext)>>29;return l<0?4294967288^l:l}set underlineVariantOffset(l){this._ext&=536870911,this._ext|=l<<29&3758096384}constructor(l=0,m=0){this._ext=0,this._urlId=0,this._ext=l,this._urlId=m}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}r.ExtendedAttrs=d},9092:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Buffer=r.MAX_BUFFER_SIZE=void 0;const d=u(6349),g=u(7226),l=u(3734),m=u(8437),b=u(4634),C=u(511),p=u(643),a=u(4863),c=u(7116);r.MAX_BUFFER_SIZE=4294967295,r.Buffer=class{constructor(o,f,y){this._hasScrollback=o,this._optionsService=f,this._bufferService=y,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=C.CellData.fromCharData([0,p.NULL_CELL_CHAR,p.NULL_CELL_WIDTH,p.NULL_CELL_CODE]),this._whitespaceCell=C.CellData.fromCharData([0,p.WHITESPACE_CELL_CHAR,p.WHITESPACE_CELL_WIDTH,p.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 d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(o){return o?(this._nullCell.fg=o.fg,this._nullCell.bg=o.bg,this._nullCell.extended=o.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new l.ExtendedAttrs),this._nullCell}getWhitespaceCell(o){return o?(this._whitespaceCell.fg=o.fg,this._whitespaceCell.bg=o.bg,this._whitespaceCell.extended=o.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new l.ExtendedAttrs),this._whitespaceCell}getBlankLine(o,f){return new m.BufferLine(this._bufferService.cols,this.getNullCell(o),f)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const o=this.ybase+this.y-this.ydisp;return o>=0&&o<this._rows}_getCorrectBufferLength(o){if(!this._hasScrollback)return o;const f=o+this._optionsService.rawOptions.scrollback;return f>r.MAX_BUFFER_SIZE?r.MAX_BUFFER_SIZE:f}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=m.DEFAULT_ATTR_DATA);let f=this._rows;for(;f--;)this.lines.push(this.getBlankLine(o))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(o,f){const y=this.getNullCell(m.DEFAULT_ATTR_DATA);let R=0;const k=this._getCorrectBufferLength(f);if(k>this.lines.maxLength&&(this.lines.maxLength=k),this.lines.length>0){if(this._cols<o)for(let E=0;E<this.lines.length;E++)R+=+this.lines.get(E).resize(o,y);let D=0;if(this._rows<f)for(let E=this._rows;E<f;E++)this.lines.length<f+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new m.BufferLine(o,y)):this.ybase>0&&this.lines.length<=this.ybase+this.y+D+1?(this.ybase--,D++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(o,y)));else for(let E=this._rows;E>f;E--)this.lines.length>f+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(k<this.lines.maxLength){const E=this.lines.length-k;E>0&&(this.lines.trimStart(E),this.ybase=Math.max(this.ybase-E,0),this.ydisp=Math.max(this.ydisp-E,0),this.savedY=Math.max(this.savedY-E,0)),this.lines.maxLength=k}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,f-1),D&&(this.y+=D),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=f-1,this._isReflowEnabled&&(this._reflow(o,f),this._cols>o))for(let D=0;D<this.lines.length;D++)R+=+this.lines.get(D).resize(o,y);this._cols=o,this._rows=f,this._memoryCleanupQueue.clear(),R>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let o=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,o=!1);let f=0;for(;this._memoryCleanupPosition<this.lines.length;)if(f+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),f>100)return!0;return o}get _isReflowEnabled(){const o=this._optionsService.rawOptions.windowsPty;return o&&o.buildNumber?this._hasScrollback&&o.backend==="conpty"&&o.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(o,f){this._cols!==o&&(o>this._cols?this._reflowLarger(o,f):this._reflowSmaller(o,f))}_reflowLarger(o,f){const y=(0,b.reflowLargerGetLinesToRemove)(this.lines,this._cols,o,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(y.length>0){const R=(0,b.reflowLargerCreateNewLayout)(this.lines,y);(0,b.reflowLargerApplyNewLayout)(this.lines,R.layout),this._reflowLargerAdjustViewport(o,f,R.countRemoved)}}_reflowLargerAdjustViewport(o,f,y){const R=this.getNullCell(m.DEFAULT_ATTR_DATA);let k=y;for(;k-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<f&&this.lines.push(new m.BufferLine(o,R))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-y,0)}_reflowSmaller(o,f){const y=this.getNullCell(m.DEFAULT_ATTR_DATA),R=[];let k=0;for(let D=this.lines.length-1;D>=0;D--){let E=this.lines.get(D);if(!E||!E.isWrapped&&E.getTrimmedLength()<=o)continue;const L=[E];for(;E.isWrapped&&D>0;)E=this.lines.get(--D),L.unshift(E);const z=this.ybase+this.y;if(z>=D&&z<D+L.length)continue;const H=L[L.length-1].getTrimmedLength(),P=(0,b.reflowSmallerGetNewLineLengths)(L,this._cols,o),I=P.length-L.length;let K;K=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+I):Math.max(0,this.lines.length-this.lines.maxLength+I);const X=[];for(let B=0;B<I;B++){const W=this.getBlankLine(m.DEFAULT_ATTR_DATA,!0);X.push(W)}X.length>0&&(R.push({start:D+L.length+k,newLines:X}),k+=X.length),L.push(...X);let Y=P.length-1,$=P[Y];$===0&&(Y--,$=P[Y]);let U=L.length-I-1,T=H;for(;U>=0;){const B=Math.min(T,$);if(L[Y]===void 0)break;if(L[Y].copyCellsFrom(L[U],T-B,$-B,B,!0),$-=B,$===0&&(Y--,$=P[Y]),T-=B,T===0){U--;const W=Math.max(U,0);T=(0,b.getWrappedLineTrimmedLength)(L,W,this._cols)}}for(let B=0;B<L.length;B++)P[B]<o&&L[B].setCell(P[B],y);let F=I-K;for(;F-- >0;)this.ybase===0?this.y<f-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+k)-f&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+I,this.ybase+f-1)}if(R.length>0){const D=[],E=[];for(let Y=0;Y<this.lines.length;Y++)E.push(this.lines.get(Y));const L=this.lines.length;let z=L-1,H=0,P=R[H];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+k);let I=0;for(let Y=Math.min(this.lines.maxLength-1,L+k-1);Y>=0;Y--)if(P&&P.start>z+I){for(let $=P.newLines.length-1;$>=0;$--)this.lines.set(Y--,P.newLines[$]);Y++,D.push({index:z+1,amount:P.newLines.length}),I+=P.newLines.length,P=R[++H]}else this.lines.set(Y,E[z--]);let K=0;for(let Y=D.length-1;Y>=0;Y--)D[Y].index+=K,this.lines.onInsertEmitter.fire(D[Y]),K+=D[Y].amount;const X=Math.max(0,L+k-this.lines.maxLength);X>0&&this.lines.onTrimEmitter.fire(X)}}translateBufferLineToString(o,f,y=0,R){const k=this.lines.get(o);return k?k.translateToString(f,y,R):""}getWrappedRangeForLine(o){let f=o,y=o;for(;f>0&&this.lines.get(f).isWrapped;)f--;for(;y+1<this.lines.length&&this.lines.get(y+1).isWrapped;)y++;return{first:f,last:y}}setupTabStops(o){for(o!=null?this.tabs[o]||(o=this.prevStop(o)):(this.tabs={},o=0);o<this._cols;o+=this._optionsService.rawOptions.tabStopWidth)this.tabs[o]=!0}prevStop(o){for(o==null&&(o=this.x);!this.tabs[--o]&&o>0;);return o>=this._cols?this._cols-1:o<0?0:o}nextStop(o){for(o==null&&(o=this.x);!this.tabs[++o]&&o<this._cols;);return o>=this._cols?this._cols-1:o<0?0:o}clearMarkers(o){this._isClearing=!0;for(let f=0;f<this.markers.length;f++)this.markers[f].line===o&&(this.markers[f].dispose(),this.markers.splice(f--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].dispose(),this.markers.splice(o--,1);this._isClearing=!1}addMarker(o){const f=new a.Marker(o);return this.markers.push(f),f.register(this.lines.onTrim((y=>{f.line-=y,f.line<0&&f.dispose()}))),f.register(this.lines.onInsert((y=>{f.line>=y.index&&(f.line+=y.amount)}))),f.register(this.lines.onDelete((y=>{f.line>=y.index&&f.line<y.index+y.amount&&f.dispose(),f.line>y.index&&(f.line-=y.amount)}))),f.register(f.onDispose((()=>this._removeMarker(f)))),f}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLine=r.DEFAULT_ATTR_DATA=void 0;const d=u(3734),g=u(511),l=u(643),m=u(482);r.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let b=0;class C{constructor(a,c,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*a);const f=c||g.CellData.fromCharData([0,l.NULL_CELL_CHAR,l.NULL_CELL_WIDTH,l.NULL_CELL_CODE]);for(let y=0;y<a;++y)this.setCell(y,f);this.length=a}get(a){const c=this._data[3*a+0],o=2097151&c;return[this._data[3*a+1],2097152&c?this._combined[a]:o?(0,m.stringFromCodePoint)(o):"",c>>22,2097152&c?this._combined[a].charCodeAt(this._combined[a].length-1):o]}set(a,c){this._data[3*a+1]=c[l.CHAR_DATA_ATTR_INDEX],c[l.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[a]=c[1],this._data[3*a+0]=2097152|a|c[l.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*a+0]=c[l.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[l.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(a){return this._data[3*a+0]>>22}hasWidth(a){return 12582912&this._data[3*a+0]}getFg(a){return this._data[3*a+1]}getBg(a){return this._data[3*a+2]}hasContent(a){return 4194303&this._data[3*a+0]}getCodePoint(a){const c=this._data[3*a+0];return 2097152&c?this._combined[a].charCodeAt(this._combined[a].length-1):2097151&c}isCombined(a){return 2097152&this._data[3*a+0]}getString(a){const c=this._data[3*a+0];return 2097152&c?this._combined[a]:2097151&c?(0,m.stringFromCodePoint)(2097151&c):""}isProtected(a){return 536870912&this._data[3*a+2]}loadCell(a,c){return b=3*a,c.content=this._data[b+0],c.fg=this._data[b+1],c.bg=this._data[b+2],2097152&c.content&&(c.combinedData=this._combined[a]),268435456&c.bg&&(c.extended=this._extendedAttrs[a]),c}setCell(a,c){2097152&c.content&&(this._combined[a]=c.combinedData),268435456&c.bg&&(this._extendedAttrs[a]=c.extended),this._data[3*a+0]=c.content,this._data[3*a+1]=c.fg,this._data[3*a+2]=c.bg}setCellFromCodepoint(a,c,o,f){268435456&f.bg&&(this._extendedAttrs[a]=f.extended),this._data[3*a+0]=c|o<<22,this._data[3*a+1]=f.fg,this._data[3*a+2]=f.bg}addCodepointToCell(a,c,o){let f=this._data[3*a+0];2097152&f?this._combined[a]+=(0,m.stringFromCodePoint)(c):2097151&f?(this._combined[a]=(0,m.stringFromCodePoint)(2097151&f)+(0,m.stringFromCodePoint)(c),f&=-2097152,f|=2097152):f=c|4194304,o&&(f&=-12582913,f|=o<<22),this._data[3*a+0]=f}insertCells(a,c,o){if((a%=this.length)&&this.getWidth(a-1)===2&&this.setCellFromCodepoint(a-1,0,1,o),c<this.length-a){const f=new g.CellData;for(let y=this.length-a-c-1;y>=0;--y)this.setCell(a+c+y,this.loadCell(a+y,f));for(let y=0;y<c;++y)this.setCell(a+y,o)}else for(let f=a;f<this.length;++f)this.setCell(f,o);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,o)}deleteCells(a,c,o){if(a%=this.length,c<this.length-a){const f=new g.CellData;for(let y=0;y<this.length-a-c;++y)this.setCell(a+y,this.loadCell(a+c+y,f));for(let y=this.length-c;y<this.length;++y)this.setCell(y,o)}else for(let f=a;f<this.length;++f)this.setCell(f,o);a&&this.getWidth(a-1)===2&&this.setCellFromCodepoint(a-1,0,1,o),this.getWidth(a)!==0||this.hasContent(a)||this.setCellFromCodepoint(a,0,1,o)}replaceCells(a,c,o,f=!1){if(f)for(a&&this.getWidth(a-1)===2&&!this.isProtected(a-1)&&this.setCellFromCodepoint(a-1,0,1,o),c<this.length&&this.getWidth(c-1)===2&&!this.isProtected(c)&&this.setCellFromCodepoint(c,0,1,o);a<c&&a<this.length;)this.isProtected(a)||this.setCell(a,o),a++;else for(a&&this.getWidth(a-1)===2&&this.setCellFromCodepoint(a-1,0,1,o),c<this.length&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c,0,1,o);a<c&&a<this.length;)this.setCell(a++,o)}resize(a,c){if(a===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const o=3*a;if(a>this.length){if(this._data.buffer.byteLength>=4*o)this._data=new Uint32Array(this._data.buffer,0,o);else{const f=new Uint32Array(o);f.set(this._data),this._data=f}for(let f=this.length;f<a;++f)this.setCell(f,c)}else{this._data=this._data.subarray(0,o);const f=Object.keys(this._combined);for(let R=0;R<f.length;R++){const k=parseInt(f[R],10);k>=a&&delete this._combined[k]}const y=Object.keys(this._extendedAttrs);for(let R=0;R<y.length;R++){const k=parseInt(y[R],10);k>=a&&delete this._extendedAttrs[k]}}return this.length=a,4*o*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const a=new Uint32Array(this._data.length);return a.set(this._data),this._data=a,1}return 0}fill(a,c=!1){if(c)for(let o=0;o<this.length;++o)this.isProtected(o)||this.setCell(o,a);else{this._combined={},this._extendedAttrs={};for(let o=0;o<this.length;++o)this.setCell(o,a)}}copyFrom(a){this.length!==a.length?this._data=new Uint32Array(a._data):this._data.set(a._data),this.length=a.length,this._combined={};for(const c in a._combined)this._combined[c]=a._combined[c];this._extendedAttrs={};for(const c in a._extendedAttrs)this._extendedAttrs[c]=a._extendedAttrs[c];this.isWrapped=a.isWrapped}clone(){const a=new C(0);a._data=new Uint32Array(this._data),a.length=this.length;for(const c in this._combined)a._combined[c]=this._combined[c];for(const c in this._extendedAttrs)a._extendedAttrs[c]=this._extendedAttrs[c];return a.isWrapped=this.isWrapped,a}getTrimmedLength(){for(let a=this.length-1;a>=0;--a)if(4194303&this._data[3*a+0])return a+(this._data[3*a+0]>>22);return 0}getNoBgTrimmedLength(){for(let a=this.length-1;a>=0;--a)if(4194303&this._data[3*a+0]||50331648&this._data[3*a+2])return a+(this._data[3*a+0]>>22);return 0}copyCellsFrom(a,c,o,f,y){const R=a._data;if(y)for(let D=f-1;D>=0;D--){for(let E=0;E<3;E++)this._data[3*(o+D)+E]=R[3*(c+D)+E];268435456&R[3*(c+D)+2]&&(this._extendedAttrs[o+D]=a._extendedAttrs[c+D])}else for(let D=0;D<f;D++){for(let E=0;E<3;E++)this._data[3*(o+D)+E]=R[3*(c+D)+E];268435456&R[3*(c+D)+2]&&(this._extendedAttrs[o+D]=a._extendedAttrs[c+D])}const k=Object.keys(a._combined);for(let D=0;D<k.length;D++){const E=parseInt(k[D],10);E>=c&&(this._combined[E-c+o]=a._combined[E])}}translateToString(a,c,o,f){c=c??0,o=o??this.length,a&&(o=Math.min(o,this.getTrimmedLength())),f&&(f.length=0);let y="";for(;c<o;){const R=this._data[3*c+0],k=2097151&R,D=2097152&R?this._combined[c]:k?(0,m.stringFromCodePoint)(k):l.WHITESPACE_CELL_CHAR;if(y+=D,f)for(let E=0;E<D.length;++E)f.push(c);c+=R>>22||1}return f&&f.push(c),y}}r.BufferLine=C},4841:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getRangeLength=void 0,r.getRangeLength=function(u,d){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 d*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(A,r)=>{function u(d,g,l){if(g===d.length-1)return d[g].getTrimmedLength();const m=!d[g].hasContent(l-1)&&d[g].getWidth(l-1)===1,b=d[g+1].getWidth(0)===2;return m&&b?l-1:l}Object.defineProperty(r,"__esModule",{value:!0}),r.getWrappedLineTrimmedLength=r.reflowSmallerGetNewLineLengths=r.reflowLargerApplyNewLayout=r.reflowLargerCreateNewLayout=r.reflowLargerGetLinesToRemove=void 0,r.reflowLargerGetLinesToRemove=function(d,g,l,m,b){const C=[];for(let p=0;p<d.length-1;p++){let a=p,c=d.get(++a);if(!c.isWrapped)continue;const o=[d.get(p)];for(;a<d.length&&c.isWrapped;)o.push(c),c=d.get(++a);if(m>=p&&m<a){p+=o.length-1;continue}let f=0,y=u(o,f,g),R=1,k=0;for(;R<o.length;){const E=u(o,R,g),L=E-k,z=l-y,H=Math.min(L,z);o[f].copyCellsFrom(o[R],k,y,H,!1),y+=H,y===l&&(f++,y=0),k+=H,k===E&&(R++,k=0),y===0&&f!==0&&o[f-1].getWidth(l-1)===2&&(o[f].copyCellsFrom(o[f-1],l-1,y++,1,!1),o[f-1].setCell(l-1,b))}o[f].replaceCells(y,l,b);let D=0;for(let E=o.length-1;E>0&&(E>f||o[E].getTrimmedLength()===0);E--)D++;D>0&&(C.push(p+o.length-D),C.push(D)),p+=o.length-1}return C},r.reflowLargerCreateNewLayout=function(d,g){const l=[];let m=0,b=g[m],C=0;for(let p=0;p<d.length;p++)if(b===p){const a=g[++m];d.onDeleteEmitter.fire({index:p-C,amount:a}),p+=a-1,C+=a,b=g[++m]}else l.push(p);return{layout:l,countRemoved:C}},r.reflowLargerApplyNewLayout=function(d,g){const l=[];for(let m=0;m<g.length;m++)l.push(d.get(g[m]));for(let m=0;m<l.length;m++)d.set(m,l[m]);d.length=g.length},r.reflowSmallerGetNewLineLengths=function(d,g,l){const m=[],b=d.map(((c,o)=>u(d,o,g))).reduce(((c,o)=>c+o));let C=0,p=0,a=0;for(;a<b;){if(b-a<l){m.push(b-a);break}C+=l;const c=u(d,p,g);C>c&&(C-=c,p++);const o=d[p].getWidth(C-1)===2;o&&C--;const f=o?l-1:l;m.push(f),a+=f}return m},r.getWrappedLineTrimmedLength=u},5295:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferSet=void 0;const d=u(8460),g=u(844),l=u(9092);class m extends g.Disposable{constructor(C,p){super(),this._optionsService=C,this._bufferService=p,this._onBufferActivate=this.register(new d.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 l.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new l.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(C){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(C),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(C,p){this._normal.resize(C,p),this._alt.resize(C,p),this.setupTabStops(C)}setupTabStops(C){this._normal.setupTabStops(C),this._alt.setupTabStops(C)}}r.BufferSet=m},511:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellData=void 0;const d=u(482),g=u(643),l=u(3734);class m extends l.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new l.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const p=new m;return p.setFromCharData(C),p}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[g.CHAR_DATA_ATTR_INDEX],this.bg=0;let p=!1;if(C[g.CHAR_DATA_CHAR_INDEX].length>2)p=!0;else if(C[g.CHAR_DATA_CHAR_INDEX].length===2){const a=C[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=a&&a<=56319){const c=C[g.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(a-55296)+c-56320+65536|C[g.CHAR_DATA_WIDTH_INDEX]<<22:p=!0}else p=!0}else this.content=C[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[g.CHAR_DATA_WIDTH_INDEX]<<22;p&&(this.combinedData=C[g.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[g.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=m},643:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WHITESPACE_CELL_CODE=r.WHITESPACE_CELL_WIDTH=r.WHITESPACE_CELL_CHAR=r.NULL_CELL_CODE=r.NULL_CELL_WIDTH=r.NULL_CELL_CHAR=r.CHAR_DATA_CODE_INDEX=r.CHAR_DATA_WIDTH_INDEX=r.CHAR_DATA_CHAR_INDEX=r.CHAR_DATA_ATTR_INDEX=r.DEFAULT_EXT=r.DEFAULT_ATTR=r.DEFAULT_COLOR=void 0,r.DEFAULT_COLOR=0,r.DEFAULT_ATTR=256|r.DEFAULT_COLOR<<9,r.DEFAULT_EXT=0,r.CHAR_DATA_ATTR_INDEX=0,r.CHAR_DATA_CHAR_INDEX=1,r.CHAR_DATA_WIDTH_INDEX=2,r.CHAR_DATA_CODE_INDEX=3,r.NULL_CELL_CHAR="",r.NULL_CELL_WIDTH=1,r.NULL_CELL_CODE=0,r.WHITESPACE_CELL_CHAR=" ",r.WHITESPACE_CELL_WIDTH=1,r.WHITESPACE_CELL_CODE=32},4863:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Marker=void 0;const d=u(8460),g=u(844);class l{get id(){return this._id}constructor(b){this.line=b,this.isDisposed=!1,this._disposables=[],this._id=l._nextId++,this._onDispose=this.register(new d.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(b){return this._disposables.push(b),b}}r.Marker=l,l._nextId=1},7116:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_CHARSET=r.CHARSETS=void 0,r.CHARSETS={},r.DEFAULT_CHARSET=r.CHARSETS.B,r.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},r.CHARSETS.A={"#":"£"},r.CHARSETS.B=void 0,r.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},r.CHARSETS.C=r.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},r.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},r.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},r.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},r.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},r.CHARSETS.E=r.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},r.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},r.CHARSETS.H=r.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},r.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(A,r)=>{var u,d,g;Object.defineProperty(r,"__esModule",{value:!0}),r.C1_ESCAPED=r.C1=r.C0=void 0,(function(l){l.NUL="\0",l.SOH="",l.STX="",l.ETX="",l.EOT="",l.ENQ="",l.ACK="",l.BEL="\x07",l.BS="\b",l.HT=" ",l.LF=`
|
|
415
|
-
`,l.VT="\v",l.FF="\f",l.CR="\r",l.SO="",l.SI="",l.DLE="",l.DC1="",l.DC2="",l.DC3="",l.DC4="",l.NAK="",l.SYN="",l.ETB="",l.CAN="",l.EM="",l.SUB="",l.ESC="\x1B",l.FS="",l.GS="",l.RS="",l.US="",l.SP=" ",l.DEL=""})(u||(r.C0=u={})),(function(l){l.PAD="",l.HOP="",l.BPH="",l.NBH="",l.IND="",l.NEL="
",l.SSA="",l.ESA="",l.HTS="",l.HTJ="",l.VTS="",l.PLD="",l.PLU="",l.RI="",l.SS2="",l.SS3="",l.DCS="",l.PU1="",l.PU2="",l.STS="",l.CCH="",l.MW="",l.SPA="",l.EPA="",l.SOS="",l.SGCI="",l.SCI="",l.CSI="",l.ST="",l.OSC="",l.PM="",l.APC=""})(d||(r.C1=d={})),(function(l){l.ST=`${u.ESC}\\`})(g||(r.C1_ESCAPED=g={}))},7399:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.evaluateKeyboardEvent=void 0;const d=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:["'",'"']};r.evaluateKeyboardEvent=function(l,m,b,C){const p={type:0,cancel:!1,key:void 0},a=(l.shiftKey?1:0)|(l.altKey?2:0)|(l.ctrlKey?4:0)|(l.metaKey?8:0);switch(l.keyCode){case 0:l.key==="UIKeyInputUpArrow"?p.key=m?d.C0.ESC+"OA":d.C0.ESC+"[A":l.key==="UIKeyInputLeftArrow"?p.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D":l.key==="UIKeyInputRightArrow"?p.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C":l.key==="UIKeyInputDownArrow"&&(p.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:p.key=l.ctrlKey?"\b":d.C0.DEL,l.altKey&&(p.key=d.C0.ESC+p.key);break;case 9:if(l.shiftKey){p.key=d.C0.ESC+"[Z";break}p.key=d.C0.HT,p.cancel=!0;break;case 13:p.key=l.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,p.cancel=!0;break;case 27:p.key=d.C0.ESC,l.altKey&&(p.key=d.C0.ESC+d.C0.ESC),p.cancel=!0;break;case 37:if(l.metaKey)break;a?(p.key=d.C0.ESC+"[1;"+(a+1)+"D",p.key===d.C0.ESC+"[1;3D"&&(p.key=d.C0.ESC+(b?"b":"[1;5D"))):p.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(l.metaKey)break;a?(p.key=d.C0.ESC+"[1;"+(a+1)+"C",p.key===d.C0.ESC+"[1;3C"&&(p.key=d.C0.ESC+(b?"f":"[1;5C"))):p.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(l.metaKey)break;a?(p.key=d.C0.ESC+"[1;"+(a+1)+"A",b||p.key!==d.C0.ESC+"[1;3A"||(p.key=d.C0.ESC+"[1;5A")):p.key=m?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(l.metaKey)break;a?(p.key=d.C0.ESC+"[1;"+(a+1)+"B",b||p.key!==d.C0.ESC+"[1;3B"||(p.key=d.C0.ESC+"[1;5B")):p.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:l.shiftKey||l.ctrlKey||(p.key=d.C0.ESC+"[2~");break;case 46:p.key=a?d.C0.ESC+"[3;"+(a+1)+"~":d.C0.ESC+"[3~";break;case 36:p.key=a?d.C0.ESC+"[1;"+(a+1)+"H":m?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:p.key=a?d.C0.ESC+"[1;"+(a+1)+"F":m?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:l.shiftKey?p.type=2:l.ctrlKey?p.key=d.C0.ESC+"[5;"+(a+1)+"~":p.key=d.C0.ESC+"[5~";break;case 34:l.shiftKey?p.type=3:l.ctrlKey?p.key=d.C0.ESC+"[6;"+(a+1)+"~":p.key=d.C0.ESC+"[6~";break;case 112:p.key=a?d.C0.ESC+"[1;"+(a+1)+"P":d.C0.ESC+"OP";break;case 113:p.key=a?d.C0.ESC+"[1;"+(a+1)+"Q":d.C0.ESC+"OQ";break;case 114:p.key=a?d.C0.ESC+"[1;"+(a+1)+"R":d.C0.ESC+"OR";break;case 115:p.key=a?d.C0.ESC+"[1;"+(a+1)+"S":d.C0.ESC+"OS";break;case 116:p.key=a?d.C0.ESC+"[15;"+(a+1)+"~":d.C0.ESC+"[15~";break;case 117:p.key=a?d.C0.ESC+"[17;"+(a+1)+"~":d.C0.ESC+"[17~";break;case 118:p.key=a?d.C0.ESC+"[18;"+(a+1)+"~":d.C0.ESC+"[18~";break;case 119:p.key=a?d.C0.ESC+"[19;"+(a+1)+"~":d.C0.ESC+"[19~";break;case 120:p.key=a?d.C0.ESC+"[20;"+(a+1)+"~":d.C0.ESC+"[20~";break;case 121:p.key=a?d.C0.ESC+"[21;"+(a+1)+"~":d.C0.ESC+"[21~";break;case 122:p.key=a?d.C0.ESC+"[23;"+(a+1)+"~":d.C0.ESC+"[23~";break;case 123:p.key=a?d.C0.ESC+"[24;"+(a+1)+"~":d.C0.ESC+"[24~";break;default:if(!l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)if(b&&!C||!l.altKey||l.metaKey)!b||l.altKey||l.ctrlKey||l.shiftKey||!l.metaKey?l.key&&!l.ctrlKey&&!l.altKey&&!l.metaKey&&l.keyCode>=48&&l.key.length===1?p.key=l.key:l.key&&l.ctrlKey&&(l.key==="_"&&(p.key=d.C0.US),l.key==="@"&&(p.key=d.C0.NUL)):l.keyCode===65&&(p.type=1);else{const c=g[l.keyCode],o=c==null?void 0:c[l.shiftKey?1:0];if(o)p.key=d.C0.ESC+o;else if(l.keyCode>=65&&l.keyCode<=90){const f=l.ctrlKey?l.keyCode-64:l.keyCode+32;let y=String.fromCharCode(f);l.shiftKey&&(y=y.toUpperCase()),p.key=d.C0.ESC+y}else if(l.keyCode===32)p.key=d.C0.ESC+(l.ctrlKey?d.C0.NUL:" ");else if(l.key==="Dead"&&l.code.startsWith("Key")){let f=l.code.slice(3,4);l.shiftKey||(f=f.toLowerCase()),p.key=d.C0.ESC+f,p.cancel=!0}}else l.keyCode>=65&&l.keyCode<=90?p.key=String.fromCharCode(l.keyCode-64):l.keyCode===32?p.key=d.C0.NUL:l.keyCode>=51&&l.keyCode<=55?p.key=String.fromCharCode(l.keyCode-51+27):l.keyCode===56?p.key=d.C0.DEL:l.keyCode===219?p.key=d.C0.ESC:l.keyCode===220?p.key=d.C0.FS:l.keyCode===221&&(p.key=d.C0.GS)}return p}},482:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},r.utf32ToString=function(u,d=0,g=u.length){let l="";for(let m=d;m<g;++m){let b=u[m];b>65535?(b-=65536,l+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):l+=String.fromCharCode(b)}return l},r.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,d){const g=u.length;if(!g)return 0;let l=0,m=0;if(this._interim){const b=u.charCodeAt(m++);56320<=b&&b<=57343?d[l++]=1024*(this._interim-55296)+b-56320+65536:(d[l++]=this._interim,d[l++]=b),this._interim=0}for(let b=m;b<g;++b){const C=u.charCodeAt(b);if(55296<=C&&C<=56319){if(++b>=g)return this._interim=C,l;const p=u.charCodeAt(b);56320<=p&&p<=57343?d[l++]=1024*(C-55296)+p-56320+65536:(d[l++]=C,d[l++]=p)}else C!==65279&&(d[l++]=C)}return l}},r.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,d){const g=u.length;if(!g)return 0;let l,m,b,C,p=0,a=0,c=0;if(this.interim[0]){let y=!1,R=this.interim[0];R&=(224&R)==192?31:(240&R)==224?15:7;let k,D=0;for(;(k=63&this.interim[++D])&&D<4;)R<<=6,R|=k;const E=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=E-D;for(;c<L;){if(c>=g)return 0;if(k=u[c++],(192&k)!=128){c--,y=!0;break}this.interim[D++]=k,R<<=6,R|=63&k}y||(E===2?R<128?c--:d[p++]=R:E===3?R<2048||R>=55296&&R<=57343||R===65279||(d[p++]=R):R<65536||R>1114111||(d[p++]=R)),this.interim.fill(0)}const o=g-4;let f=c;for(;f<g;){for(;!(!(f<o)||128&(l=u[f])||128&(m=u[f+1])||128&(b=u[f+2])||128&(C=u[f+3]));)d[p++]=l,d[p++]=m,d[p++]=b,d[p++]=C,f+=4;if(l=u[f++],l<128)d[p++]=l;else if((224&l)==192){if(f>=g)return this.interim[0]=l,p;if(m=u[f++],(192&m)!=128){f--;continue}if(a=(31&l)<<6|63&m,a<128){f--;continue}d[p++]=a}else if((240&l)==224){if(f>=g)return this.interim[0]=l,p;if(m=u[f++],(192&m)!=128){f--;continue}if(f>=g)return this.interim[0]=l,this.interim[1]=m,p;if(b=u[f++],(192&b)!=128){f--;continue}if(a=(15&l)<<12|(63&m)<<6|63&b,a<2048||a>=55296&&a<=57343||a===65279)continue;d[p++]=a}else if((248&l)==240){if(f>=g)return this.interim[0]=l,p;if(m=u[f++],(192&m)!=128){f--;continue}if(f>=g)return this.interim[0]=l,this.interim[1]=m,p;if(b=u[f++],(192&b)!=128){f--;continue}if(f>=g)return this.interim[0]=l,this.interim[1]=m,this.interim[2]=b,p;if(C=u[f++],(192&C)!=128){f--;continue}if(a=(7&l)<<18|(63&m)<<12|(63&b)<<6|63&C,a<65536||a>1114111)continue;d[p++]=a}}return p}}},225:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV6=void 0;const d=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]],l=[[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 m;r.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let b=0;b<g.length;++b)m.fill(0,g[b][0],g[b][1]+1)}}wcwidth(b){return b<32?0:b<127?1:b<65536?m[b]:(function(C,p){let a,c=0,o=p.length-1;if(C<p[0][0]||C>p[o][1])return!1;for(;o>=c;)if(a=c+o>>1,C>p[a][1])c=a+1;else{if(!(C<p[a][0]))return!0;o=a-1}return!1})(b,l)?0:b>=131072&&b<=196605||b>=196608&&b<=262141?2:1}charProperties(b,C){let p=this.wcwidth(b),a=p===0&&C!==0;if(a){const c=d.UnicodeService.extractWidth(C);c===0?a=!1:c>p&&(p=c)}return d.UnicodeService.createPropertyValue(0,p,a)}}},5981:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WriteBuffer=void 0;const d=u(8460),g=u(844);class l extends g.Disposable{constructor(b){super(),this._action=b,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(b,C){if(C!==void 0&&this._syncCalls>C)return void(this._syncCalls=0);if(this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let p;for(this._isSyncWriting=!0;p=this._writeBuffer.shift();){this._action(p);const a=this._callbacks.shift();a&&a()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(b,C){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+=b.length,this._writeBuffer.push(b),this._callbacks.push(C),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(C)}_innerWrite(b=0,C=!0){const p=b||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const a=this._writeBuffer[this._bufferOffset],c=this._action(a,C);if(c){const f=y=>Date.now()-p>=12?setTimeout((()=>this._innerWrite(0,y))):this._innerWrite(p,y);return void c.catch((y=>(queueMicrotask((()=>{throw y})),Promise.resolve(!1)))).then(f)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=a.length,Date.now()-p>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}r.WriteBuffer=l},5941:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.toRgbString=r.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})$/,d=/^[\da-f]+$/;function g(l,m){const b=l.toString(16),C=b.length<2?"0"+b:b;switch(m){case 4:return b[0];case 8:return C;case 12:return(C+C).slice(0,3);default:return C+C}}r.parseColor=function(l){if(!l)return;let m=l.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const b=u.exec(m);if(b){const C=b[1]?15:b[4]?255:b[7]?4095:65535;return[Math.round(parseInt(b[1]||b[4]||b[7]||b[10],16)/C*255),Math.round(parseInt(b[2]||b[5]||b[8]||b[11],16)/C*255),Math.round(parseInt(b[3]||b[6]||b[9]||b[12],16)/C*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),d.exec(m)&&[3,6,9,12].includes(m.length))){const b=m.length/3,C=[0,0,0];for(let p=0;p<3;++p){const a=parseInt(m.slice(b*p,b*p+b),16);C[p]=b===1?a<<4:b===2?a:b===3?a>>4:a>>8}return C}},r.toRgbString=function(l,m=16){const[b,C,p]=l;return`rgb:${g(b,m)}/${g(C,m)}/${g(p,m)}`}},5770:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.PAYLOAD_LIMIT=void 0,r.PAYLOAD_LIMIT=1e7},6351:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DcsHandler=r.DcsParser=void 0;const d=u(482),g=u(8742),l=u(5770),m=[];r.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(C,p){this._handlers[C]===void 0&&(this._handlers[C]=[]);const a=this._handlers[C];return a.push(p),{dispose:()=>{const c=a.indexOf(p);c!==-1&&a.splice(c,1)}}}clearHandler(C){this._handlers[C]&&delete this._handlers[C]}setHandlerFallback(C){this._handlerFb=C}reset(){if(this._active.length)for(let C=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;C>=0;--C)this._active[C].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(C,p){if(this.reset(),this._ident=C,this._active=this._handlers[C]||m,this._active.length)for(let a=this._active.length-1;a>=0;a--)this._active[a].hook(p);else this._handlerFb(this._ident,"HOOK",p)}put(C,p,a){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(C,p,a);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(C,p,a))}unhook(C,p=!0){if(this._active.length){let a=!1,c=this._active.length-1,o=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,a=p,o=this._stack.fallThrough,this._stack.paused=!1),!o&&a===!1){for(;c>=0&&(a=this._active[c].unhook(C),a!==!0);c--)if(a instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,a;c--}for(;c>=0;c--)if(a=this._active[c].unhook(!1),a instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,a}else this._handlerFb(this._ident,"UNHOOK",C);this._active=m,this._ident=0}};const b=new g.Params;b.addParam(0),r.DcsHandler=class{constructor(C){this._handler=C,this._data="",this._params=b,this._hitLimit=!1}hook(C){this._params=C.length>1||C.params[0]?C.clone():b,this._data="",this._hitLimit=!1}put(C,p,a){this._hitLimit||(this._data+=(0,d.utf32ToString)(C,p,a),this._data.length>l.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(C){let p=!1;if(this._hitLimit)p=!1;else if(C&&(p=this._handler(this._data,this._params),p instanceof Promise))return p.then((a=>(this._params=b,this._data="",this._hitLimit=!1,a)));return this._params=b,this._data="",this._hitLimit=!1,p}}},2015:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.EscapeSequenceParser=r.VT500_TRANSITION_TABLE=r.TransitionTable=void 0;const d=u(844),g=u(8742),l=u(6242),m=u(6351);class b{constructor(c){this.table=new Uint8Array(c)}setDefault(c,o){this.table.fill(c<<4|o)}add(c,o,f,y){this.table[o<<8|c]=f<<4|y}addMany(c,o,f,y){for(let R=0;R<c.length;R++)this.table[o<<8|c[R]]=f<<4|y}}r.TransitionTable=b;const C=160;r.VT500_TRANSITION_TABLE=(function(){const a=new b(4095),c=Array.apply(null,Array(256)).map(((D,E)=>E)),o=(D,E)=>c.slice(D,E),f=o(32,127),y=o(0,24);y.push(25),y.push.apply(y,o(28,32));const R=o(0,14);let k;for(k in a.setDefault(1,0),a.addMany(f,0,2,0),R)a.addMany([24,26,153,154],k,3,0),a.addMany(o(128,144),k,3,0),a.addMany(o(144,152),k,3,0),a.add(156,k,0,0),a.add(27,k,11,1),a.add(157,k,4,8),a.addMany([152,158,159],k,0,7),a.add(155,k,11,3),a.add(144,k,11,9);return a.addMany(y,0,3,0),a.addMany(y,1,3,1),a.add(127,1,0,1),a.addMany(y,8,0,8),a.addMany(y,3,3,3),a.add(127,3,0,3),a.addMany(y,4,3,4),a.add(127,4,0,4),a.addMany(y,6,3,6),a.addMany(y,5,3,5),a.add(127,5,0,5),a.addMany(y,2,3,2),a.add(127,2,0,2),a.add(93,1,4,8),a.addMany(f,8,5,8),a.add(127,8,5,8),a.addMany([156,27,24,26,7],8,6,0),a.addMany(o(28,32),8,0,8),a.addMany([88,94,95],1,0,7),a.addMany(f,7,0,7),a.addMany(y,7,0,7),a.add(156,7,0,0),a.add(127,7,0,7),a.add(91,1,11,3),a.addMany(o(64,127),3,7,0),a.addMany(o(48,60),3,8,4),a.addMany([60,61,62,63],3,9,4),a.addMany(o(48,60),4,8,4),a.addMany(o(64,127),4,7,0),a.addMany([60,61,62,63],4,0,6),a.addMany(o(32,64),6,0,6),a.add(127,6,0,6),a.addMany(o(64,127),6,0,0),a.addMany(o(32,48),3,9,5),a.addMany(o(32,48),5,9,5),a.addMany(o(48,64),5,0,6),a.addMany(o(64,127),5,7,0),a.addMany(o(32,48),4,9,5),a.addMany(o(32,48),1,9,2),a.addMany(o(32,48),2,9,2),a.addMany(o(48,127),2,10,0),a.addMany(o(48,80),1,10,0),a.addMany(o(81,88),1,10,0),a.addMany([89,90,92],1,10,0),a.addMany(o(96,127),1,10,0),a.add(80,1,11,9),a.addMany(y,9,0,9),a.add(127,9,0,9),a.addMany(o(28,32),9,0,9),a.addMany(o(32,48),9,9,12),a.addMany(o(48,60),9,8,10),a.addMany([60,61,62,63],9,9,10),a.addMany(y,11,0,11),a.addMany(o(32,128),11,0,11),a.addMany(o(28,32),11,0,11),a.addMany(y,10,0,10),a.add(127,10,0,10),a.addMany(o(28,32),10,0,10),a.addMany(o(48,60),10,8,10),a.addMany([60,61,62,63],10,0,11),a.addMany(o(32,48),10,9,12),a.addMany(y,12,0,12),a.add(127,12,0,12),a.addMany(o(28,32),12,0,12),a.addMany(o(32,48),12,9,12),a.addMany(o(48,64),12,0,11),a.addMany(o(64,127),12,12,13),a.addMany(o(64,127),10,12,13),a.addMany(o(64,127),9,12,13),a.addMany(y,13,13,13),a.addMany(f,13,13,13),a.add(127,13,0,13),a.addMany([27,156,24,26],13,14,0),a.add(C,0,2,0),a.add(C,8,5,8),a.add(C,6,0,6),a.add(C,11,0,11),a.add(C,13,13,13),a})();class p extends d.Disposable{constructor(c=r.VT500_TRANSITION_TABLE){super(),this._transitions=c,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=(o,f,y)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,f)=>{},this._escHandlerFb=o=>{},this._errorHandlerFb=o=>o,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new l.OscParser),this._dcsParser=this.register(new m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(c,o=[64,126]){let f=0;if(c.prefix){if(c.prefix.length>1)throw new Error("only one byte as prefix supported");if(f=c.prefix.charCodeAt(0),f&&60>f||f>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(c.intermediates){if(c.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let R=0;R<c.intermediates.length;++R){const k=c.intermediates.charCodeAt(R);if(32>k||k>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");f<<=8,f|=k}}if(c.final.length!==1)throw new Error("final must be a single byte");const y=c.final.charCodeAt(0);if(o[0]>y||y>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return f<<=8,f|=y,f}identToString(c){const o=[];for(;c;)o.push(String.fromCharCode(255&c)),c>>=8;return o.reverse().join("")}setPrintHandler(c){this._printHandler=c}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(c,o){const f=this._identifier(c,[48,126]);this._escHandlers[f]===void 0&&(this._escHandlers[f]=[]);const y=this._escHandlers[f];return y.push(o),{dispose:()=>{const R=y.indexOf(o);R!==-1&&y.splice(R,1)}}}clearEscHandler(c){this._escHandlers[this._identifier(c,[48,126])]&&delete this._escHandlers[this._identifier(c,[48,126])]}setEscHandlerFallback(c){this._escHandlerFb=c}setExecuteHandler(c,o){this._executeHandlers[c.charCodeAt(0)]=o}clearExecuteHandler(c){this._executeHandlers[c.charCodeAt(0)]&&delete this._executeHandlers[c.charCodeAt(0)]}setExecuteHandlerFallback(c){this._executeHandlerFb=c}registerCsiHandler(c,o){const f=this._identifier(c);this._csiHandlers[f]===void 0&&(this._csiHandlers[f]=[]);const y=this._csiHandlers[f];return y.push(o),{dispose:()=>{const R=y.indexOf(o);R!==-1&&y.splice(R,1)}}}clearCsiHandler(c){this._csiHandlers[this._identifier(c)]&&delete this._csiHandlers[this._identifier(c)]}setCsiHandlerFallback(c){this._csiHandlerFb=c}registerDcsHandler(c,o){return this._dcsParser.registerHandler(this._identifier(c),o)}clearDcsHandler(c){this._dcsParser.clearHandler(this._identifier(c))}setDcsHandlerFallback(c){this._dcsParser.setHandlerFallback(c)}registerOscHandler(c,o){return this._oscParser.registerHandler(c,o)}clearOscHandler(c){this._oscParser.clearHandler(c)}setOscHandlerFallback(c){this._oscParser.setHandlerFallback(c)}setErrorHandler(c){this._errorHandler=c}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(c,o,f,y,R){this._parseStack.state=c,this._parseStack.handlers=o,this._parseStack.handlerPos=f,this._parseStack.transition=y,this._parseStack.chunkPos=R}parse(c,o,f){let y,R=0,k=0,D=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,D=this._parseStack.chunkPos+1;else{if(f===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const E=this._parseStack.handlers;let L=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(f===!1&&L>-1){for(;L>=0&&(y=E[L](this._params),y!==!0);L--)if(y instanceof Promise)return this._parseStack.handlerPos=L,y}this._parseStack.handlers=[];break;case 4:if(f===!1&&L>-1){for(;L>=0&&(y=E[L](),y!==!0);L--)if(y instanceof Promise)return this._parseStack.handlerPos=L,y}this._parseStack.handlers=[];break;case 6:if(R=c[this._parseStack.chunkPos],y=this._dcsParser.unhook(R!==24&&R!==26,f),y)return y;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(R=c[this._parseStack.chunkPos],y=this._oscParser.end(R!==24&&R!==26,f),y)return y;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,D=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let E=D;E<o;++E){switch(R=c[E],k=this._transitions.table[this.currentState<<8|(R<160?R:C)],k>>4){case 2:for(let I=E+1;;++I){if(I>=o||(R=c[I])<32||R>126&&R<C){this._printHandler(c,E,I),E=I-1;break}if(++I>=o||(R=c[I])<32||R>126&&R<C){this._printHandler(c,E,I),E=I-1;break}if(++I>=o||(R=c[I])<32||R>126&&R<C){this._printHandler(c,E,I),E=I-1;break}if(++I>=o||(R=c[I])<32||R>126&&R<C){this._printHandler(c,E,I),E=I-1;break}}break;case 3:this._executeHandlers[R]?this._executeHandlers[R]():this._executeHandlerFb(R),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:E,code:R,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const L=this._csiHandlers[this._collect<<8|R];let z=L?L.length-1:-1;for(;z>=0&&(y=L[z](this._params),y!==!0);z--)if(y instanceof Promise)return this._preserveStack(3,L,z,k,E),y;z<0&&this._csiHandlerFb(this._collect<<8|R,this._params),this.precedingJoinState=0;break;case 8:do switch(R){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(R-48)}while(++E<o&&(R=c[E])>47&&R<60);E--;break;case 9:this._collect<<=8,this._collect|=R;break;case 10:const H=this._escHandlers[this._collect<<8|R];let P=H?H.length-1:-1;for(;P>=0&&(y=H[P](),y!==!0);P--)if(y instanceof Promise)return this._preserveStack(4,H,P,k,E),y;P<0&&this._escHandlerFb(this._collect<<8|R),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|R,this._params);break;case 13:for(let I=E+1;;++I)if(I>=o||(R=c[I])===24||R===26||R===27||R>127&&R<C){this._dcsParser.put(c,E,I),E=I-1;break}break;case 14:if(y=this._dcsParser.unhook(R!==24&&R!==26),y)return this._preserveStack(6,[],0,k,E),y;R===27&&(k|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let I=E+1;;I++)if(I>=o||(R=c[I])<32||R>127&&R<C){this._oscParser.put(c,E,I),E=I-1;break}break;case 6:if(y=this._oscParser.end(R!==24&&R!==26),y)return this._preserveStack(5,[],0,k,E),y;R===27&&(k|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&k}}}r.EscapeSequenceParser=p},6242:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OscHandler=r.OscParser=void 0;const d=u(5770),g=u(482),l=[];r.OscParser=class{constructor(){this._state=0,this._active=l,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(m,b){this._handlers[m]===void 0&&(this._handlers[m]=[]);const C=this._handlers[m];return C.push(b),{dispose:()=>{const p=C.indexOf(b);p!==-1&&C.splice(p,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=l}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].end(!1);this._stack.paused=!1,this._active=l,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||l,this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,b,C){if(this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].put(m,b,C);else this._handlerFb(this._id,"PUT",(0,g.utf32ToString)(m,b,C))}start(){this.reset(),this._state=1}put(m,b,C){if(this._state!==3){if(this._state===1)for(;b<C;){const p=m[b++];if(p===59){this._state=2,this._start();break}if(p<48||57<p)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+p-48}this._state===2&&C-b>0&&this._put(m,b,C)}}end(m,b=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let C=!1,p=this._active.length-1,a=!1;if(this._stack.paused&&(p=this._stack.loopPosition-1,C=b,a=this._stack.fallThrough,this._stack.paused=!1),!a&&C===!1){for(;p>=0&&(C=this._active[p].end(m),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].end(!1),C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!0,C}else this._handlerFb(this._id,"END",m);this._active=l,this._id=-1,this._state=0}}},r.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,b,C){this._hitLimit||(this._data+=(0,g.utf32ToString)(m,b,C),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let b=!1;if(this._hitLimit)b=!1;else if(m&&(b=this._handler(this._data),b instanceof Promise))return b.then((C=>(this._data="",this._hitLimit=!1,C)));return this._data="",this._hitLimit=!1,b}}},8742:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Params=void 0;const u=2147483647;class d{static fromArray(l){const m=new d;if(!l.length)return m;for(let b=Array.isArray(l[0])?1:0;b<l.length;++b){const C=l[b];if(Array.isArray(C))for(let p=0;p<C.length;++p)m.addSubParam(C[p]);else m.addParam(C)}return m}constructor(l=32,m=32){if(this.maxLength=l,this.maxSubParamsLength=m,m>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(l),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(l),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const l=new d(this.maxLength,this.maxSubParamsLength);return l.params.set(this.params),l.length=this.length,l._subParams.set(this._subParams),l._subParamsLength=this._subParamsLength,l._subParamsIdx.set(this._subParamsIdx),l._rejectDigits=this._rejectDigits,l._rejectSubDigits=this._rejectSubDigits,l._digitIsSub=this._digitIsSub,l}toArray(){const l=[];for(let m=0;m<this.length;++m){l.push(this.params[m]);const b=this._subParamsIdx[m]>>8,C=255&this._subParamsIdx[m];C-b>0&&l.push(Array.prototype.slice.call(this._subParams,b,C))}return l}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(l){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(l<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=l>u?u:l}}addSubParam(l){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(l<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=l>u?u:l,this._subParamsIdx[this.length-1]++}}hasSubParams(l){return(255&this._subParamsIdx[l])-(this._subParamsIdx[l]>>8)>0}getSubParams(l){const m=this._subParamsIdx[l]>>8,b=255&this._subParamsIdx[l];return b-m>0?this._subParams.subarray(m,b):null}getSubParamsAll(){const l={};for(let m=0;m<this.length;++m){const b=this._subParamsIdx[m]>>8,C=255&this._subParamsIdx[m];C-b>0&&(l[m]=this._subParams.slice(b,C))}return l}addDigit(l){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const b=this._digitIsSub?this._subParams:this.params,C=b[m-1];b[m-1]=~C?Math.min(10*C+l,u):l}}r.Params=d},5741:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.AddonManager=void 0,r.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,d){const g={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(g),d.dispose=()=>this._wrappedAddonDispose(g),d.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let d=-1;for(let g=0;g<this._addons.length;g++)if(this._addons[g]===u){d=g;break}if(d===-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(d,1)}}},8771:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferApiView=void 0;const d=u(3785),g=u(511);r.BufferApiView=class{constructor(l,m){this._buffer=l,this.type=m}init(l){return this._buffer=l,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(l){const m=this._buffer.lines.get(l);if(m)return new d.BufferLineApiView(m)}getNullCell(){return new g.CellData}}},3785:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLineApiView=void 0;const d=u(511);r.BufferLineApiView=class{constructor(g){this._line=g}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(g,l){if(!(g<0||g>=this._line.length))return l?(this._line.loadCell(g,l),l):this._line.loadCell(g,new d.CellData)}translateToString(g,l,m){return this._line.translateToString(g,l,m)}}},8285:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferNamespaceApi=void 0;const d=u(8771),g=u(8460),l=u(844);class m extends l.Disposable{constructor(C){super(),this._core=C,this._onBufferChange=this.register(new g.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}r.BufferNamespaceApi=m},7975:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ParserApi=void 0,r.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,d){return this._core.registerCsiHandler(u,(g=>d(g.toArray())))}addCsiHandler(u,d){return this.registerCsiHandler(u,d)}registerDcsHandler(u,d){return this._core.registerDcsHandler(u,((g,l)=>d(g,l.toArray())))}addDcsHandler(u,d){return this.registerDcsHandler(u,d)}registerEscHandler(u,d){return this._core.registerEscHandler(u,d)}addEscHandler(u,d){return this.registerEscHandler(u,d)}registerOscHandler(u,d){return this._core.registerOscHandler(u,d)}addOscHandler(u,d){return this.registerOscHandler(u,d)}}},7090:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeApi=void 0,r.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(A,r,u){var d=this&&this.__decorate||function(a,c,o,f){var y,R=arguments.length,k=R<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,o):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(a,c,o,f);else for(var D=a.length-1;D>=0;D--)(y=a[D])&&(k=(R<3?y(k):R>3?y(c,o,k):y(c,o))||k);return R>3&&k&&Object.defineProperty(c,o,k),k},g=this&&this.__param||function(a,c){return function(o,f){c(o,f,a)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferService=r.MINIMUM_ROWS=r.MINIMUM_COLS=void 0;const l=u(8460),m=u(844),b=u(5295),C=u(2585);r.MINIMUM_COLS=2,r.MINIMUM_ROWS=1;let p=r.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(a){super(),this.isUserScrolling=!1,this._onResize=this.register(new l.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new l.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(a.rawOptions.cols||0,r.MINIMUM_COLS),this.rows=Math.max(a.rawOptions.rows||0,r.MINIMUM_ROWS),this.buffers=this.register(new b.BufferSet(a,this))}resize(a,c){this.cols=a,this.rows=c,this.buffers.resize(a,c),this._onResize.fire({cols:a,rows:c})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(a,c=!1){const o=this.buffer;let f;f=this._cachedBlankLine,f&&f.length===this.cols&&f.getFg(0)===a.fg&&f.getBg(0)===a.bg||(f=o.getBlankLine(a,c),this._cachedBlankLine=f),f.isWrapped=c;const y=o.ybase+o.scrollTop,R=o.ybase+o.scrollBottom;if(o.scrollTop===0){const k=o.lines.isFull;R===o.lines.length-1?k?o.lines.recycle().copyFrom(f):o.lines.push(f.clone()):o.lines.splice(R+1,0,f.clone()),k?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const k=R-y+1;o.lines.shiftElements(y+1,k-1,-1),o.lines.set(R,f.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(a,c,o){const f=this.buffer;if(a<0){if(f.ydisp===0)return;this.isUserScrolling=!0}else a+f.ydisp>=f.ybase&&(this.isUserScrolling=!1);const y=f.ydisp;f.ydisp=Math.max(Math.min(f.ydisp+a,f.ybase),0),y!==f.ydisp&&(c||this._onScroll.fire(f.ydisp))}};r.BufferService=p=d([g(0,C.IOptionsService)],p)},7994:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CharsetService=void 0,r.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,d){this._charsets[u]=d,this.glevel===u&&(this.charset=d)}}},1753:function(A,r,u){var d=this&&this.__decorate||function(f,y,R,k){var D,E=arguments.length,L=E<3?y:k===null?k=Object.getOwnPropertyDescriptor(y,R):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(f,y,R,k);else for(var z=f.length-1;z>=0;z--)(D=f[z])&&(L=(E<3?D(L):E>3?D(y,R,L):D(y,R))||L);return E>3&&L&&Object.defineProperty(y,R,L),L},g=this&&this.__param||function(f,y){return function(R,k){y(R,k,f)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreMouseService=void 0;const l=u(2585),m=u(8460),b=u(844),C={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:f=>f.button!==4&&f.action===1&&(f.ctrl=!1,f.alt=!1,f.shift=!1,!0)},VT200:{events:19,restrict:f=>f.action!==32},DRAG:{events:23,restrict:f=>f.action!==32||f.button!==3},ANY:{events:31,restrict:f=>!0}};function p(f,y){let R=(f.ctrl?16:0)|(f.shift?4:0)|(f.alt?8:0);return f.button===4?(R|=64,R|=f.action):(R|=3&f.button,4&f.button&&(R|=64),8&f.button&&(R|=128),f.action===32?R|=32:f.action!==0||y||(R|=3)),R}const a=String.fromCharCode,c={DEFAULT:f=>{const y=[p(f,!1)+32,f.col+32,f.row+32];return y[0]>255||y[1]>255||y[2]>255?"":`\x1B[M${a(y[0])}${a(y[1])}${a(y[2])}`},SGR:f=>{const y=f.action===0&&f.button!==4?"m":"M";return`\x1B[<${p(f,!0)};${f.col};${f.row}${y}`},SGR_PIXELS:f=>{const y=f.action===0&&f.button!==4?"m":"M";return`\x1B[<${p(f,!0)};${f.x};${f.y}${y}`}};let o=r.CoreMouseService=class extends b.Disposable{constructor(f,y){super(),this._bufferService=f,this._coreService=y,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const R of Object.keys(C))this.addProtocol(R,C[R]);for(const R of Object.keys(c))this.addEncoding(R,c[R]);this.reset()}addProtocol(f,y){this._protocols[f]=y}addEncoding(f,y){this._encodings[f]=y}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(f){if(!this._protocols[f])throw new Error(`unknown protocol "${f}"`);this._activeProtocol=f,this._onProtocolChange.fire(this._protocols[f].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(f){if(!this._encodings[f])throw new Error(`unknown encoding "${f}"`);this._activeEncoding=f}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(f){if(f.col<0||f.col>=this._bufferService.cols||f.row<0||f.row>=this._bufferService.rows||f.button===4&&f.action===32||f.button===3&&f.action!==32||f.button!==4&&(f.action===2||f.action===3)||(f.col++,f.row++,f.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,f,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(f))return!1;const y=this._encodings[this._activeEncoding](f);return y&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(y):this._coreService.triggerDataEvent(y,!0)),this._lastEvent=f,!0}explainEvents(f){return{down:!!(1&f),up:!!(2&f),drag:!!(4&f),move:!!(8&f),wheel:!!(16&f)}}_equalEvents(f,y,R){if(R){if(f.x!==y.x||f.y!==y.y)return!1}else if(f.col!==y.col||f.row!==y.row)return!1;return f.button===y.button&&f.action===y.action&&f.ctrl===y.ctrl&&f.alt===y.alt&&f.shift===y.shift}};r.CoreMouseService=o=d([g(0,l.IBufferService),g(1,l.ICoreService)],o)},6975:function(A,r,u){var d=this&&this.__decorate||function(o,f,y,R){var k,D=arguments.length,E=D<3?f:R===null?R=Object.getOwnPropertyDescriptor(f,y):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(o,f,y,R);else for(var L=o.length-1;L>=0;L--)(k=o[L])&&(E=(D<3?k(E):D>3?k(f,y,E):k(f,y))||E);return D>3&&E&&Object.defineProperty(f,y,E),E},g=this&&this.__param||function(o,f){return function(y,R){f(y,R,o)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreService=void 0;const l=u(1439),m=u(8460),b=u(844),C=u(2585),p=Object.freeze({insertMode:!1}),a=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let c=r.CoreService=class extends b.Disposable{constructor(o,f,y){super(),this._bufferService=o,this._logService=f,this._optionsService=y,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,l.clone)(p),this.decPrivateModes=(0,l.clone)(a)}reset(){this.modes=(0,l.clone)(p),this.decPrivateModes=(0,l.clone)(a)}triggerDataEvent(o,f=!1){if(this._optionsService.rawOptions.disableStdin)return;const y=this._bufferService.buffer;f&&this._optionsService.rawOptions.scrollOnUserInput&&y.ybase!==y.ydisp&&this._onRequestScrollToBottom.fire(),f&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,(()=>o.split("").map((R=>R.charCodeAt(0))))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,(()=>o.split("").map((f=>f.charCodeAt(0))))),this._onBinary.fire(o))}};r.CoreService=c=d([g(0,C.IBufferService),g(1,C.ILogService),g(2,C.IOptionsService)],c)},9074:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DecorationService=void 0;const d=u(8055),g=u(8460),l=u(844),m=u(6106);let b=0,C=0;class p extends l.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList((o=>o==null?void 0:o.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,l.toDisposable)((()=>this.reset())))}registerDecoration(o){if(o.marker.isDisposed)return;const f=new a(o);if(f){const y=f.marker.onDispose((()=>f.dispose()));f.onDispose((()=>{f&&(this._decorations.delete(f)&&this._onDecorationRemoved.fire(f),y.dispose())})),this._decorations.insert(f),this._onDecorationRegistered.fire(f)}return f}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,f,y){let R=0,k=0;for(const D of this._decorations.getKeyIterator(f))R=D.options.x??0,k=R+(D.options.width??1),o>=R&&o<k&&(!y||(D.options.layer??"bottom")===y)&&(yield D)}forEachDecorationAtCell(o,f,y,R){this._decorations.forEachByKey(f,(k=>{b=k.options.x??0,C=b+(k.options.width??1),o>=b&&o<C&&(!y||(k.options.layer??"bottom")===y)&&R(k)}))}}r.DecorationService=p;class a extends l.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(o){super(),this.options=o,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=o.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.InstantiationService=r.ServiceCollection=void 0;const d=u(2585),g=u(8343);class l{constructor(...b){this._entries=new Map;for(const[C,p]of b)this.set(C,p)}set(b,C){const p=this._entries.get(b);return this._entries.set(b,C),p}forEach(b){for(const[C,p]of this._entries.entries())b(C,p)}has(b){return this._entries.has(b)}get(b){return this._entries.get(b)}}r.ServiceCollection=l,r.InstantiationService=class{constructor(){this._services=new l,this._services.set(d.IInstantiationService,this)}setService(m,b){this._services.set(m,b)}getService(m){return this._services.get(m)}createInstance(m,...b){const C=(0,g.getServiceDependencies)(m).sort(((c,o)=>c.index-o.index)),p=[];for(const c of C){const o=this._services.get(c.id);if(!o)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${c.id}.`);p.push(o)}const a=C.length>0?C[0].index:b.length;if(b.length!==a)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${a+1} conflicts with ${b.length} static arguments`);return new m(...b,...p)}}},7866:function(A,r,u){var d=this&&this.__decorate||function(a,c,o,f){var y,R=arguments.length,k=R<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,o):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(a,c,o,f);else for(var D=a.length-1;D>=0;D--)(y=a[D])&&(k=(R<3?y(k):R>3?y(c,o,k):y(c,o))||k);return R>3&&k&&Object.defineProperty(c,o,k),k},g=this&&this.__param||function(a,c){return function(o,f){c(o,f,a)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;const l=u(844),m=u(2585),b={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let C,p=r.LogService=class extends l.Disposable{get logLevel(){return this._logLevel}constructor(a){super(),this._optionsService=a,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),C=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(a){for(let c=0;c<a.length;c++)typeof a[c]=="function"&&(a[c]=a[c]())}_log(a,c,o){this._evalLazyOptionalParams(o),a.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...o)}trace(a,...c){var o;this._logLevel<=m.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,a,c)}debug(a,...c){var o;this._logLevel<=m.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,a,c)}info(a,...c){var o;this._logLevel<=m.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,a,c)}warn(a,...c){var o;this._logLevel<=m.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,a,c)}error(a,...c){var o;this._logLevel<=m.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,a,c)}};r.LogService=p=d([g(0,m.IOptionsService)],p),r.setTraceLogger=function(a){C=a},r.traceCall=function(a,c,o){if(typeof o.value!="function")throw new Error("not supported");const f=o.value;o.value=function(...y){if(C.logLevel!==m.LogLevelEnum.TRACE)return f.apply(this,y);C.trace(`GlyphRenderer#${f.name}(${y.map((k=>JSON.stringify(k))).join(", ")})`);const R=f.apply(this,y);return C.trace(`GlyphRenderer#${f.name} return`,R),R}}},7302:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OptionsService=r.DEFAULT_OPTIONS=void 0;const d=u(8460),g=u(844),l=u(6114);r.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:l.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const m=["normal","bold","100","200","300","400","500","600","700","800","900"];class b extends g.Disposable{constructor(p){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const a={...r.DEFAULT_OPTIONS};for(const c in p)if(c in a)try{const o=p[c];a[c]=this._sanitizeAndValidateOption(c,o)}catch(o){console.error(o)}this.rawOptions=a,this.options={...a},this._setupOptions(),this.register((0,g.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(p,a){return this.onOptionChange((c=>{c===p&&a(this.rawOptions[p])}))}onMultipleOptionChange(p,a){return this.onOptionChange((c=>{p.indexOf(c)!==-1&&a()}))}_setupOptions(){const p=c=>{if(!(c in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);return this.rawOptions[c]},a=(c,o)=>{if(!(c in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);o=this._sanitizeAndValidateOption(c,o),this.rawOptions[c]!==o&&(this.rawOptions[c]=o,this._onOptionChange.fire(c))};for(const c in this.rawOptions){const o={get:p.bind(this,c),set:a.bind(this,c)};Object.defineProperty(this.options,c,o)}}_sanitizeAndValidateOption(p,a){switch(p){case"cursorStyle":if(a||(a=r.DEFAULT_OPTIONS[p]),!(function(c){return c==="block"||c==="underline"||c==="bar"})(a))throw new Error(`"${a}" is not a valid value for ${p}`);break;case"wordSeparator":a||(a=r.DEFAULT_OPTIONS[p]);break;case"fontWeight":case"fontWeightBold":if(typeof a=="number"&&1<=a&&a<=1e3)break;a=m.includes(a)?a:r.DEFAULT_OPTIONS[p];break;case"cursorWidth":a=Math.floor(a);case"lineHeight":case"tabStopWidth":if(a<1)throw new Error(`${p} cannot be less than 1, value: ${a}`);break;case"minimumContrastRatio":a=Math.max(1,Math.min(21,Math.round(10*a)/10));break;case"scrollback":if((a=Math.min(a,4294967295))<0)throw new Error(`${p} cannot be less than 0, value: ${a}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(a<=0)throw new Error(`${p} cannot be less than or equal to 0, value: ${a}`);break;case"rows":case"cols":if(!a&&a!==0)throw new Error(`${p} must be numeric, value: ${a}`);break;case"windowsPty":a=a??{}}return a}}r.OptionsService=b},2660:function(A,r,u){var d=this&&this.__decorate||function(b,C,p,a){var c,o=arguments.length,f=o<3?C:a===null?a=Object.getOwnPropertyDescriptor(C,p):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(b,C,p,a);else for(var y=b.length-1;y>=0;y--)(c=b[y])&&(f=(o<3?c(f):o>3?c(C,p,f):c(C,p))||f);return o>3&&f&&Object.defineProperty(C,p,f),f},g=this&&this.__param||function(b,C){return function(p,a){C(p,a,b)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkService=void 0;const l=u(2585);let m=r.OscLinkService=class{constructor(b){this._bufferService=b,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(b){const C=this._bufferService.buffer;if(b.id===void 0){const y=C.addMarker(C.ybase+C.y),R={data:b,id:this._nextId++,lines:[y]};return y.onDispose((()=>this._removeMarkerFromLink(R,y))),this._dataByLinkId.set(R.id,R),R.id}const p=b,a=this._getEntryIdKey(p),c=this._entriesWithId.get(a);if(c)return this.addLineToLink(c.id,C.ybase+C.y),c.id;const o=C.addMarker(C.ybase+C.y),f={id:this._nextId++,key:this._getEntryIdKey(p),data:p,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(f,o))),this._entriesWithId.set(f.key,f),this._dataByLinkId.set(f.id,f),f.id}addLineToLink(b,C){const p=this._dataByLinkId.get(b);if(p&&p.lines.every((a=>a.line!==C))){const a=this._bufferService.buffer.addMarker(C);p.lines.push(a),a.onDispose((()=>this._removeMarkerFromLink(p,a)))}}getLinkData(b){var C;return(C=this._dataByLinkId.get(b))==null?void 0:C.data}_getEntryIdKey(b){return`${b.id};;${b.uri}`}_removeMarkerFromLink(b,C){const p=b.lines.indexOf(C);p!==-1&&(b.lines.splice(p,1),b.lines.length===0&&(b.data.id!==void 0&&this._entriesWithId.delete(b.key),this._dataByLinkId.delete(b.id)))}};r.OscLinkService=m=d([g(0,l.IBufferService)],m)},8343:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createDecorator=r.getServiceDependencies=r.serviceRegistry=void 0;const u="di$target",d="di$dependencies";r.serviceRegistry=new Map,r.getServiceDependencies=function(g){return g[d]||[]},r.createDecorator=function(g){if(r.serviceRegistry.has(g))return r.serviceRegistry.get(g);const l=function(m,b,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(p,a,c){a[u]===a?a[d].push({id:p,index:c}):(a[d]=[{id:p,index:c}],a[u]=a)})(l,m,C)};return l.toString=()=>g,r.serviceRegistry.set(g,l),l}},2585:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IDecorationService=r.IUnicodeService=r.IOscLinkService=r.IOptionsService=r.ILogService=r.LogLevelEnum=r.IInstantiationService=r.ICharsetService=r.ICoreService=r.ICoreMouseService=r.IBufferService=void 0;const d=u(8343);var g;r.IBufferService=(0,d.createDecorator)("BufferService"),r.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),r.ICoreService=(0,d.createDecorator)("CoreService"),r.ICharsetService=(0,d.createDecorator)("CharsetService"),r.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(l){l[l.TRACE=0]="TRACE",l[l.DEBUG=1]="DEBUG",l[l.INFO=2]="INFO",l[l.WARN=3]="WARN",l[l.ERROR=4]="ERROR",l[l.OFF=5]="OFF"})(g||(r.LogLevelEnum=g={})),r.ILogService=(0,d.createDecorator)("LogService"),r.IOptionsService=(0,d.createDecorator)("OptionsService"),r.IOscLinkService=(0,d.createDecorator)("OscLinkService"),r.IUnicodeService=(0,d.createDecorator)("UnicodeService"),r.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeService=void 0;const d=u(8460),g=u(225);class l{static extractShouldJoin(b){return(1&b)!=0}static extractWidth(b){return b>>1&3}static extractCharKind(b){return b>>3}static createPropertyValue(b,C,p=!1){return(16777215&b)<<3|(3&C)<<1|(p?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const b=new g.UnicodeV6;this.register(b),this._active=b.version,this._activeProvider=b}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(b){if(!this._providers[b])throw new Error(`unknown Unicode version "${b}"`);this._active=b,this._activeProvider=this._providers[b],this._onChange.fire(b)}register(b){this._providers[b.version]=b}wcwidth(b){return this._activeProvider.wcwidth(b)}getStringCellWidth(b){let C=0,p=0;const a=b.length;for(let c=0;c<a;++c){let o=b.charCodeAt(c);if(55296<=o&&o<=56319){if(++c>=a)return C+this.wcwidth(o);const R=b.charCodeAt(c);56320<=R&&R<=57343?o=1024*(o-55296)+R-56320+65536:C+=this.wcwidth(R)}const f=this.charProperties(o,p);let y=l.extractWidth(f);l.extractShouldJoin(f)&&(y-=l.extractWidth(p)),C+=y,p=f}return C}charProperties(b,C){return this._activeProvider.charProperties(b,C)}}r.UnicodeService=l}},S={};function M(A){var r=S[A];if(r!==void 0)return r.exports;var u=S[A]={exports:{}};return w[A].call(u.exports,u,u.exports,M),u.exports}var O={};return(()=>{var A=O;Object.defineProperty(A,"__esModule",{value:!0}),A.Terminal=void 0;const r=M(9042),u=M(3236),d=M(844),g=M(5741),l=M(8285),m=M(7975),b=M(7090),C=["cols","rows"];class p extends d.Disposable{constructor(c){super(),this._core=this.register(new u.Terminal(c)),this._addonManager=this.register(new g.AddonManager),this._publicOptions={...this._core.options};const o=y=>this._core.options[y],f=(y,R)=>{this._checkReadonlyOptions(y),this._core.options[y]=R};for(const y in this._core.options){const R={get:o.bind(this,y),set:f.bind(this,y)};Object.defineProperty(this._publicOptions,y,R)}}_checkReadonlyOptions(c){if(C.includes(c))throw new Error(`Option "${c}" 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 m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new b.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 l.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const c=this._core.coreService.decPrivateModes;let o="none";switch(this._core.coreMouseService.activeProtocol){case"X10":o="x10";break;case"VT200":o="vt200";break;case"DRAG":o="drag";break;case"ANY":o="any"}return{applicationCursorKeysMode:c.applicationCursorKeys,applicationKeypadMode:c.applicationKeypad,bracketedPasteMode:c.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:o,originMode:c.origin,reverseWraparoundMode:c.reverseWraparound,sendFocusMode:c.sendFocus,wraparoundMode:c.wraparound}}get options(){return this._publicOptions}set options(c){for(const o in c)this._publicOptions[o]=c[o]}blur(){this._core.blur()}focus(){this._core.focus()}input(c,o=!0){this._core.input(c,o)}resize(c,o){this._verifyIntegers(c,o),this._core.resize(c,o)}open(c){this._core.open(c)}attachCustomKeyEventHandler(c){this._core.attachCustomKeyEventHandler(c)}attachCustomWheelEventHandler(c){this._core.attachCustomWheelEventHandler(c)}registerLinkProvider(c){return this._core.registerLinkProvider(c)}registerCharacterJoiner(c){return this._checkProposedApi(),this._core.registerCharacterJoiner(c)}deregisterCharacterJoiner(c){this._checkProposedApi(),this._core.deregisterCharacterJoiner(c)}registerMarker(c=0){return this._verifyIntegers(c),this._core.registerMarker(c)}registerDecoration(c){return this._checkProposedApi(),this._verifyPositiveIntegers(c.x??0,c.width??0,c.height??0),this._core.registerDecoration(c)}hasSelection(){return this._core.hasSelection()}select(c,o,f){this._verifyIntegers(c,o,f),this._core.select(c,o,f)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(c,o){this._verifyIntegers(c,o),this._core.selectLines(c,o)}dispose(){super.dispose()}scrollLines(c){this._verifyIntegers(c),this._core.scrollLines(c)}scrollPages(c){this._verifyIntegers(c),this._core.scrollPages(c)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(c){this._verifyIntegers(c),this._core.scrollToLine(c)}clear(){this._core.clear()}write(c,o){this._core.write(c,o)}writeln(c,o){this._core.write(c),this._core.write(`\r
|
|
416
|
-
`,o)}paste(c){this._core.paste(c)}refresh(c,o){this._verifyIntegers(c,o),this._core.refresh(c,o)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(c){this._addonManager.loadAddon(this,c)}static get strings(){return r}_verifyIntegers(...c){for(const o of c)if(o===1/0||isNaN(o)||o%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...c){for(const o of c)if(o&&(o===1/0||isNaN(o)||o%1!=0||o<0))throw new Error("This API only accepts positive integers")}}A.Terminal=p})(),O})()))})(Ku)),Ku.exports}var Kx=Yx(),Xu={exports:{}},Sg;function Xx(){return Sg||(Sg=1,(function(s,h){(function(w,S){s.exports=S()})(self,(()=>(()=>{var w={};return(()=>{var S=w;Object.defineProperty(S,"__esModule",{value:!0}),S.FitAddon=void 0,S.FitAddon=class{activate(M){this._terminal=M}dispose(){}fit(){const M=this.proposeDimensions();if(!M||!this._terminal||isNaN(M.cols)||isNaN(M.rows))return;const O=this._terminal._core;this._terminal.rows===M.rows&&this._terminal.cols===M.cols||(O._renderService.clear(),this._terminal.resize(M.cols,M.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const M=this._terminal._core,O=M._renderService.dimensions;if(O.css.cell.width===0||O.css.cell.height===0)return;const A=this._terminal.options.scrollback===0?0:M.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(r.getPropertyValue("height")),d=Math.max(0,parseInt(r.getPropertyValue("width"))),g=window.getComputedStyle(this._terminal.element),l=u-(parseInt(g.getPropertyValue("padding-top"))+parseInt(g.getPropertyValue("padding-bottom"))),m=d-(parseInt(g.getPropertyValue("padding-right"))+parseInt(g.getPropertyValue("padding-left")))-A;return{cols:Math.max(2,Math.floor(m/O.css.cell.width)),rows:Math.max(1,Math.floor(l/O.css.cell.height))}}}})(),w})()))})(Xu)),Xu.exports}var Vx=Xx(),Vu={exports:{}},xg;function Jx(){return xg||(xg=1,(function(s,h){(function(w,S){s.exports=S()})(self,(()=>(()=>{var w={903:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BaseRenderLayer=void 0;const d=u(274),g=u(627),l=u(237),m=u(860),b=u(374),C=u(296),p=u(345),a=u(859),c=u(399),o=u(855);class f extends a.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var k;return(k=this._charAtlas)==null?void 0:k.pages[0].canvas}constructor(k,D,E,L,z,H,P,I,K,X){super(),this._terminal=k,this._container=D,this._alpha=z,this._themeService=H,this._bufferService=P,this._optionsService=I,this._decorationService=K,this._coreBrowserService=X,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,C.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new a.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new p.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new d.CellColorResolver(this._terminal,this._optionsService,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${E}-layer`),this._canvas.style.zIndex=L.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors((Y=>{this._refreshCharAtlas(Y),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}))),this.register((0,a.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,b.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(k,D){}handleSelectionChanged(k,D,E=!1){this._selectionModel.update(this._terminal._core,k,D,E)}_setTransparency(k){if(k===this._alpha)return;const D=this._canvas;this._alpha=k,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,D),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(k){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,g.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,k,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,p.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let D=0;D<this._charAtlas.pages.length;D++)this._bitmapGenerator[D]=new y(this._charAtlas.pages[D].canvas)}}resize(k){this._deviceCellWidth=k.device.cell.width,this._deviceCellHeight=k.device.cell.height,this._deviceCharWidth=k.device.char.width,this._deviceCharHeight=k.device.char.height,this._deviceCharLeft=k.device.char.left,this._deviceCharTop=k.device.char.top,this._canvas.width=k.device.canvas.width,this._canvas.height=k.device.canvas.height,this._canvas.style.width=`${k.css.canvas.width}px`,this._canvas.style.height=`${k.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var k;(k=this._charAtlas)==null||k.clearTexture()}_fillCells(k,D,E,L){this._ctx.fillRect(k*this._deviceCellWidth,D*this._deviceCellHeight,E*this._deviceCellWidth,L*this._deviceCellHeight)}_fillMiddleLineAtCells(k,D,E=1){const L=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(k*this._deviceCellWidth,(D+1)*this._deviceCellHeight-L-this._coreBrowserService.dpr,E*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(k,D,E=1,L=0){this._ctx.fillRect(k*this._deviceCellWidth,(D+1)*this._deviceCellHeight+L-this._coreBrowserService.dpr-1,E*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(k,D,E=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const L=this._coreBrowserService.dpr;this._ctx.lineWidth=L;for(let z=0;z<E;z++){const H=(k+z)*this._deviceCellWidth,P=(k+z+.5)*this._deviceCellWidth,I=(k+z+1)*this._deviceCellWidth,K=(D+1)*this._deviceCellHeight-L-1,X=K-L,Y=K+L;this._ctx.moveTo(H,K),this._ctx.bezierCurveTo(H,X,P,X,P,K),this._ctx.bezierCurveTo(P,Y,I,Y,I,K)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(k,D,E=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const L=this._coreBrowserService.dpr;this._ctx.lineWidth=L,this._ctx.setLineDash([2*L,L]);const z=k*this._deviceCellWidth,H=(D+1)*this._deviceCellHeight-L-1;this._ctx.moveTo(z,H);for(let P=0;P<E;P++){const I=(k+E+P)*this._deviceCellWidth;this._ctx.lineTo(I,H)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(k,D,E=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const L=this._coreBrowserService.dpr;this._ctx.lineWidth=L,this._ctx.setLineDash([4*L,3*L]);const z=k*this._deviceCellWidth,H=(k+E)*this._deviceCellWidth,P=(D+1)*this._deviceCellHeight-L-1;this._ctx.moveTo(z,P),this._ctx.lineTo(H,P),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(k,D,E){this._ctx.fillRect(k*this._deviceCellWidth,D*this._deviceCellHeight,this._coreBrowserService.dpr*E,this._deviceCellHeight)}_strokeRectAtCell(k,D,E,L){const z=this._coreBrowserService.dpr;this._ctx.lineWidth=z,this._ctx.strokeRect(k*this._deviceCellWidth+z/2,D*this._deviceCellHeight+z/2,E*this._deviceCellWidth-z,L*this._deviceCellHeight-z)}_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(k,D,E,L){this._alpha?this._ctx.clearRect(k*this._deviceCellWidth,D*this._deviceCellHeight,E*this._deviceCellWidth,L*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(k*this._deviceCellWidth,D*this._deviceCellHeight,E*this._deviceCellWidth,L*this._deviceCellHeight))}_fillCharTrueColor(k,D,E){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=l.TEXT_BASELINE,this._clipRow(E);let L=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(L=(0,m.tryDrawCustomChar)(this._ctx,k.getChars(),D*this._deviceCellWidth,E*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),L||this._ctx.fillText(k.getChars(),D*this._deviceCellWidth+this._deviceCharLeft,E*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(k,D,E){var K,X,Y,$;const L=k.getChars(),z=k.getCode(),H=k.getWidth();if(this._cellColorResolver.resolve(k,D,this._bufferService.buffer.ydisp+E,this._deviceCellWidth),!this._charAtlas)return;let P;if(P=L&&L.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(L,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(k.getCode()||o.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!P.size.x||!P.size.y)return;this._ctx.save(),this._clipRow(E),this._bitmapGenerator[P.texturePage]&&this._charAtlas.pages[P.texturePage].canvas!==this._bitmapGenerator[P.texturePage].canvas&&((X=(K=this._bitmapGenerator[P.texturePage])==null?void 0:K.bitmap)==null||X.close(),delete this._bitmapGenerator[P.texturePage]),this._charAtlas.pages[P.texturePage].version!==((Y=this._bitmapGenerator[P.texturePage])==null?void 0:Y.version)&&(this._bitmapGenerator[P.texturePage]||(this._bitmapGenerator[P.texturePage]=new y(this._charAtlas.pages[P.texturePage].canvas)),this._bitmapGenerator[P.texturePage].refresh(),this._bitmapGenerator[P.texturePage].version=this._charAtlas.pages[P.texturePage].version);let I=P.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,b.allowRescaling)(z,H,P.size.x,this._deviceCellWidth)&&(I=this._deviceCellWidth-1),this._ctx.drawImage((($=this._bitmapGenerator[P.texturePage])==null?void 0:$.bitmap)||this._charAtlas.pages[P.texturePage].canvas,P.texturePosition.x,P.texturePosition.y,P.size.x,P.size.y,D*this._deviceCellWidth+this._deviceCharLeft-P.offset.x,E*this._deviceCellHeight+this._deviceCharTop-P.offset.y,I,P.size.y),this._ctx.restore()}_clipRow(k){this._ctx.beginPath(),this._ctx.rect(0,k*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(k,D){return`${D?"italic":""} ${k?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}r.BaseRenderLayer=f;class y{get bitmap(){return this._bitmap}constructor(k){this.canvas=k,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var k;(k=this._bitmap)==null||k.close(),this._bitmap=void 0,c.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout((()=>this._generate()),100)),this._state===1&&(this._state=2))}_generate(){var k;this._state===0&&((k=this._bitmap)==null||k.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then((D=>{this._state===2?this.refresh():this._bitmap=D,this._state=0})),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CanvasRenderer=void 0;const d=u(627),g=u(56),l=u(374),m=u(345),b=u(859),C=u(873),p=u(43),a=u(630),c=u(744);class o extends b.Disposable{constructor(y,R,k,D,E,L,z,H,P,I,K){super(),this._terminal=y,this._screenElement=R,this._bufferService=D,this._charSizeService=E,this._optionsService=L,this._coreBrowserService=P,this._themeService=K,this._observerDisposable=this.register(new b.MutableDisposable),this._onRequestRedraw=this.register(new m.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new m.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new m.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const X=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new c.TextRenderLayer(this._terminal,this._screenElement,0,X,this._bufferService,this._optionsService,z,I,this._coreBrowserService,K),new a.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,I,this._optionsService,K),new p.LinkRenderLayer(this._terminal,this._screenElement,2,k,this._bufferService,this._optionsService,I,this._coreBrowserService,K),new C.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,H,this._coreBrowserService,I,K)];for(const Y of this._renderLayers)(0,m.forwardEvent)(Y.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,l.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,g.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,((Y,$)=>this._setCanvasDevicePixelDimensions(Y,$))),this.register(this._coreBrowserService.onWindowChange((Y=>{this._observerDisposable.value=(0,g.observeDevicePixelDimensions)(this._renderLayers[0].canvas,Y,(($,U)=>this._setCanvasDevicePixelDimensions($,U)))}))),this.register((0,b.toDisposable)((()=>{for(const Y of this._renderLayers)Y.dispose();(0,d.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){return this._renderLayers[0].cacheCanvas}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._bufferService.cols,this._bufferService.rows))}handleResize(y,R){this._updateDimensions();for(const k of this._renderLayers)k.resize(this.dimensions);this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation((y=>y.handleBlur()))}handleFocus(){this._runOperation((y=>y.handleFocus()))}handleSelectionChanged(y,R,k=!1){this._runOperation((D=>D.handleSelectionChanged(y,R,k))),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation((y=>y.handleCursorMove()))}clear(){this._runOperation((y=>y.reset()))}_runOperation(y){for(const R of this._renderLayers)y(R)}renderRows(y,R){for(const k of this._renderLayers)k.handleGridChanged(y,R)}clearTextureAtlas(){for(const y of this._renderLayers)y.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const y=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*y),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*y),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._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/y),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/y),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(y,R){this.dimensions.device.canvas.height=R,this.dimensions.device.canvas.width=y;for(const k of this._renderLayers)k.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}r.CanvasRenderer=o},873:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CursorRenderLayer=void 0;const d=u(457),g=u(859),l=u(399),m=u(782),b=u(903);class C extends b.BaseRenderLayer{constructor(a,c,o,f,y,R,k,D,E,L){super(a,c,"cursor",o,!0,L,y,R,E,D),this._onRequestRedraw=f,this._coreService=k,this._cursorBlinkStateManager=this.register(new g.MutableDisposable),this._cell=new m.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(R.onOptionChange((()=>this._handleOptionsChanged()))),this._handleOptionsChanged()}resize(a){super.resize(a),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var a;this._clearCursor(),(a=this._cursorBlinkStateManager.value)==null||a.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var a;(a=this._cursorBlinkStateManager.value)==null||a.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var a;(a=this._cursorBlinkStateManager.value)==null||a.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager.value||(this._cursorBlinkStateManager.value=new d.CursorBlinkStateManager((()=>this._render(!0)),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var a;(a=this._cursorBlinkStateManager.value)==null||a.restartBlinkAnimation()}handleGridChanged(a,c){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(a){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const c=this._bufferService.buffer.ybase+this._bufferService.buffer.y,o=c-this._bufferService.buffer.ydisp;if(o<0||o>=this._bufferService.rows)return void this._clearCursor();const f=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(c).loadCell(f,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const y=this._optionsService.rawOptions.cursorStyle,R=this._optionsService.rawOptions.cursorInactiveStyle;return R&&R!=="none"&&this._cursorRenderers[R](f,o,this._cell),this._ctx.restore(),this._state.x=f,this._state.y=o,this._state.isFocused=!1,this._state.style=y,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===f&&this._state.y===o&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](f,o,this._cell),this._ctx.restore(),this._state.x=f,this._state.y=o,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(l.isFirefox||this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(a,c,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(a,c,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(a,c,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(a,c,o.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(o,a,c),this._ctx.restore()}_renderUnderlineCursor(a,c,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(a,c),this._ctx.restore()}_renderOutlineCursor(a,c,o){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(a,c,o.getWidth(),1),this._ctx.restore()}}r.CursorRenderLayer=C},574:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.GridCache=void 0,r.GridCache=class{constructor(){this.cache=[]}resize(u,d){for(let g=0;g<u;g++){this.cache.length<=g&&this.cache.push([]);for(let l=this.cache[g].length;l<d;l++)this.cache[g].push(void 0);this.cache[g].length=d}this.cache.length=u}clear(){for(let u=0;u<this.cache.length;u++)for(let d=0;d<this.cache[u].length;d++)this.cache[u][d]=void 0}}},43:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.LinkRenderLayer=void 0;const d=u(197),g=u(237),l=u(903);class m extends l.BaseRenderLayer{constructor(C,p,a,c,o,f,y,R,k){super(C,p,"link",a,!0,k,o,f,y,R),this.register(c.onShowLinkUnderline((D=>this._handleShowLinkUnderline(D)))),this.register(c.onHideLinkUnderline((D=>this._handleHideLinkUnderline(D))))}resize(C){super.resize(C),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const C=this._state.y2-this._state.y1-1;C>0&&this._clearCells(0,this._state.y1+1,this._state.cols,C),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(C){if(C.fg===g.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:C.fg&&(0,d.is256Color)(C.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[C.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,C.y1===C.y2)this._fillBottomLineAtCells(C.x1,C.y1,C.x2-C.x1);else{this._fillBottomLineAtCells(C.x1,C.y1,C.cols-C.x1);for(let p=C.y1+1;p<C.y2;p++)this._fillBottomLineAtCells(0,p,C.cols);this._fillBottomLineAtCells(0,C.y2,C.x2)}this._state=C}_handleHideLinkUnderline(C){this._clearCurrentLink()}}r.LinkRenderLayer=m},630:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionRenderLayer=void 0;const d=u(903);class g extends d.BaseRenderLayer{constructor(m,b,C,p,a,c,o,f){super(m,b,"selection",C,!0,f,p,o,c,a),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(m){super.resize(m),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(m,b,C){super.handleSelectionChanged(m,b,C),this._redrawSelection(m,b,C)}_redrawSelection(m,b,C){if(!this._didStateChange(m,b,C,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!m||!b)return void this._clearState();const p=m[1]-this._bufferService.buffer.ydisp,a=b[1]-this._bufferService.buffer.ydisp,c=Math.max(p,0),o=Math.min(a,this._bufferService.rows-1);if(c>=this._bufferService.rows||o<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,C){const f=m[0],y=b[0]-f,R=o-c+1;this._fillCells(f,c,y,R)}else{const f=p===c?m[0]:0,y=c===a?b[0]:this._bufferService.cols;this._fillCells(f,c,y-f,1);const R=Math.max(o-c-1,0);if(this._fillCells(0,c+1,this._bufferService.cols,R),c!==o){const k=a===o?b[0]:this._bufferService.cols;this._fillCells(0,o,k,1)}}this._state.start=[m[0],m[1]],this._state.end=[b[0],b[1]],this._state.columnSelectMode=C,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(m,b,C,p){return!this._areCoordinatesEqual(m,this._state.start)||!this._areCoordinatesEqual(b,this._state.end)||C!==this._state.columnSelectMode||p!==this._state.ydisp}_areCoordinatesEqual(m,b){return!(!m||!b)&&m[0]===b[0]&&m[1]===b[1]}}r.SelectionRenderLayer=g},744:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TextRenderLayer=void 0;const d=u(577),g=u(147),l=u(782),m=u(855),b=u(903),C=u(574);class p extends b.BaseRenderLayer{constructor(c,o,f,y,R,k,D,E,L,z){super(c,o,"text",f,y,z,R,k,E,L),this._characterJoinerService=D,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new l.CellData,this._state=new C.GridCache,this.register(k.onSpecificOptionChange("allowTransparency",(H=>this._setTransparency(H))))}resize(c){super.resize(c);const o=this._getFont(!1,!1);this._characterWidth===c.device.char.width&&this._characterFont===o||(this._characterWidth=c.device.char.width,this._characterFont=o,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(c,o,f){for(let y=c;y<=o;y++){const R=y+this._bufferService.buffer.ydisp,k=this._bufferService.buffer.lines.get(R),D=this._characterJoinerService.getJoinedCharacters(R);for(let E=0;E<this._bufferService.cols;E++){k.loadCell(E,this._workCell);let L=this._workCell,z=!1,H=E;if(L.getWidth()!==0){if(D.length>0&&E===D[0][0]){z=!0;const P=D.shift();L=new d.JoinedCellData(this._workCell,k.translateToString(!0,P[0],P[1]),P[1]-P[0]),H=P[1]-1}!z&&this._isOverlapping(L)&&H<k.length-1&&k.getCodePoint(H+1)===m.NULL_CELL_CODE&&(L.content&=-12582913,L.content|=8388608),f(L,E,y),E=H}}}}_drawBackground(c,o){const f=this._ctx,y=this._bufferService.cols;let R=0,k=0,D=null;f.save(),this._forEachCell(c,o,((E,L,z)=>{let H=null;E.isInverse()?H=E.isFgDefault()?this._themeService.colors.foreground.css:E.isFgRGB()?`rgb(${g.AttributeData.toColorRGB(E.getFgColor()).join(",")})`:this._themeService.colors.ansi[E.getFgColor()].css:E.isBgRGB()?H=`rgb(${g.AttributeData.toColorRGB(E.getBgColor()).join(",")})`:E.isBgPalette()&&(H=this._themeService.colors.ansi[E.getBgColor()].css);let P=!1;this._decorationService.forEachDecorationAtCell(L,this._bufferService.buffer.ydisp+z,void 0,(I=>{I.options.layer!=="top"&&P||(I.backgroundColorRGB&&(H=I.backgroundColorRGB.css),P=I.options.layer==="top")})),D===null&&(R=L,k=z),z!==k?(f.fillStyle=D||"",this._fillCells(R,k,y-R,1),R=L,k=z):D!==H&&(f.fillStyle=D||"",this._fillCells(R,k,L-R,1),R=L,k=z),D=H})),D!==null&&(f.fillStyle=D,this._fillCells(R,k,y-R,1)),f.restore()}_drawForeground(c,o){this._forEachCell(c,o,((f,y,R)=>this._drawChars(f,y,R)))}handleGridChanged(c,o){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,c,this._bufferService.cols,o-c+1),this._drawBackground(c,o),this._drawForeground(c,o))}_isOverlapping(c){if(c.getWidth()!==1||c.getCode()<256)return!1;const o=c.getChars();if(this._characterOverlapCache.hasOwnProperty(o))return this._characterOverlapCache[o];this._ctx.save(),this._ctx.font=this._characterFont;const f=Math.floor(this._ctx.measureText(o).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[o]=f,f}}r.TextRenderLayer=p},274:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellColorResolver=void 0;const d=u(855),g=u(160),l=u(374);let m,b=0,C=0,p=!1,a=!1,c=!1,o=0;r.CellColorResolver=class{constructor(f,y,R,k,D,E){this._terminal=f,this._optionService=y,this._selectionRenderModel=R,this._decorationService=k,this._coreBrowserService=D,this._themeService=E,this.result={fg:0,bg:0,ext:0}}resolve(f,y,R,k){if(this.result.bg=f.bg,this.result.fg=f.fg,this.result.ext=268435456&f.bg?f.extended.ext:0,C=0,b=0,a=!1,p=!1,c=!1,m=this._themeService.colors,o=0,f.getCode()!==d.NULL_CELL_CODE&&f.extended.underlineStyle===4){const D=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));o=y*k%(2*Math.round(D))}if(this._decorationService.forEachDecorationAtCell(y,R,"bottom",(D=>{D.backgroundColorRGB&&(C=D.backgroundColorRGB.rgba>>8&16777215,a=!0),D.foregroundColorRGB&&(b=D.foregroundColorRGB.rgba>>8&16777215,p=!0)})),c=this._selectionRenderModel.isCellSelected(this._terminal,y,R),c){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:C=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:C=(16777215&this.result.fg)<<8|255;break;default:C=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:C=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:C=(16777215&this.result.bg)<<8|255}C=g.rgba.blend(C,4294967040&(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else C=(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(a=!0,m.selectionForeground&&(b=m.selectionForeground.rgba>>8&16777215,p=!0),(0,l.treatGlyphAsBackgroundColor)(f.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)b=(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:b=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:b=(16777215&this.result.fg)<<8|255;break;default:b=this._themeService.colors.foreground.rgba}b=g.rgba.blend(b,4294967040&(this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}p=!0}}this._decorationService.forEachDecorationAtCell(y,R,"top",(D=>{D.backgroundColorRGB&&(C=D.backgroundColorRGB.rgba>>8&16777215,a=!0),D.foregroundColorRGB&&(b=D.foregroundColorRGB.rgba>>8&16777215,p=!0)})),a&&(C=c?-16777216&f.bg&-134217729|C|50331648:-16777216&f.bg|C|50331648),p&&(b=-16777216&f.fg&-67108865|b|50331648),67108864&this.result.fg&&(a&&!p&&(b=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&m.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,p=!0),!a&&p&&(C=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&m.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,a=!0)),m=void 0,this.result.bg=a?C:this.result.bg,this.result.fg=p?b:this.result.fg,this.result.ext&=536870911,this.result.ext|=o<<29&3758096384}}},627:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.removeTerminalFromCache=r.acquireTextureAtlas=void 0;const d=u(509),g=u(197),l=[];r.acquireTextureAtlas=function(m,b,C,p,a,c,o,f){const y=(0,g.generateConfig)(p,a,c,o,b,C,f);for(let D=0;D<l.length;D++){const E=l[D],L=E.ownedBy.indexOf(m);if(L>=0){if((0,g.configEquals)(E.config,y))return E.atlas;E.ownedBy.length===1?(E.atlas.dispose(),l.splice(D,1)):E.ownedBy.splice(L,1);break}}for(let D=0;D<l.length;D++){const E=l[D];if((0,g.configEquals)(E.config,y))return E.ownedBy.push(m),E.atlas}const R=m._core,k={atlas:new d.TextureAtlas(document,y,R.unicodeService),config:y,ownedBy:[m]};return l.push(k),k.atlas},r.removeTerminalFromCache=function(m){for(let b=0;b<l.length;b++){const C=l[b].ownedBy.indexOf(m);if(C!==-1){l[b].ownedBy.length===1?(l[b].atlas.dispose(),l.splice(b,1)):l[b].ownedBy.splice(C,1);break}}}},197:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.is256Color=r.configEquals=r.generateConfig=void 0;const d=u(160);r.generateConfig=function(g,l,m,b,C,p,a){const c={foreground:p.foreground,background:p.background,cursor:d.NULL_COLOR,cursorAccent:d.NULL_COLOR,selectionForeground:d.NULL_COLOR,selectionBackgroundTransparent:d.NULL_COLOR,selectionBackgroundOpaque:d.NULL_COLOR,selectionInactiveBackgroundTransparent:d.NULL_COLOR,selectionInactiveBackgroundOpaque:d.NULL_COLOR,ansi:p.ansi.slice(),contrastCache:p.contrastCache,halfContrastCache:p.halfContrastCache};return{customGlyphs:C.customGlyphs,devicePixelRatio:a,letterSpacing:C.letterSpacing,lineHeight:C.lineHeight,deviceCellWidth:g,deviceCellHeight:l,deviceCharWidth:m,deviceCharHeight:b,fontFamily:C.fontFamily,fontSize:C.fontSize,fontWeight:C.fontWeight,fontWeightBold:C.fontWeightBold,allowTransparency:C.allowTransparency,drawBoldTextInBrightColors:C.drawBoldTextInBrightColors,minimumContrastRatio:C.minimumContrastRatio,colors:c}},r.configEquals=function(g,l){for(let m=0;m<g.colors.ansi.length;m++)if(g.colors.ansi[m].rgba!==l.colors.ansi[m].rgba)return!1;return g.devicePixelRatio===l.devicePixelRatio&&g.customGlyphs===l.customGlyphs&&g.lineHeight===l.lineHeight&&g.letterSpacing===l.letterSpacing&&g.fontFamily===l.fontFamily&&g.fontSize===l.fontSize&&g.fontWeight===l.fontWeight&&g.fontWeightBold===l.fontWeightBold&&g.allowTransparency===l.allowTransparency&&g.deviceCharWidth===l.deviceCharWidth&&g.deviceCharHeight===l.deviceCharHeight&&g.drawBoldTextInBrightColors===l.drawBoldTextInBrightColors&&g.minimumContrastRatio===l.minimumContrastRatio&&g.colors.foreground.rgba===l.colors.foreground.rgba&&g.colors.background.rgba===l.colors.background.rgba},r.is256Color=function(g){return(50331648&g)==16777216||(50331648&g)==33554432}},237:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TEXT_BASELINE=r.DIM_OPACITY=r.INVERTED_DEFAULT_COLOR=void 0;const d=u(399);r.INVERTED_DEFAULT_COLOR=257,r.DIM_OPACITY=.5,r.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},457:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CursorBlinkStateManager=void 0,r.CursorBlinkStateManager=class{constructor(u,d){this._renderCallback=u,this._coreBrowserService=d,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 d=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,d>0)return void this._restartInterval(d)}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 d=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(d)}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:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tryDrawCustomChar=r.powerlineDefinitions=r.boxDrawingDefinitions=r.blockElementDefinitions=void 0;const d=u(374);r.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const 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]]};r.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(p,a)=>`M0,${.5-a} L1,${.5-a} M0,${.5+a} L1,${.5+a}`},"║":{1:(p,a)=>`M${.5-p},0 L${.5-p},1 M${.5+p},0 L${.5+p},1`},"╒":{1:(p,a)=>`M.5,1 L.5,${.5-a} L1,${.5-a} M.5,${.5+a} L1,${.5+a}`},"╓":{1:(p,a)=>`M${.5-p},1 L${.5-p},.5 L1,.5 M${.5+p},.5 L${.5+p},1`},"╔":{1:(p,a)=>`M1,${.5-a} L${.5-p},${.5-a} L${.5-p},1 M1,${.5+a} L${.5+p},${.5+a} L${.5+p},1`},"╕":{1:(p,a)=>`M0,${.5-a} L.5,${.5-a} L.5,1 M0,${.5+a} L.5,${.5+a}`},"╖":{1:(p,a)=>`M${.5+p},1 L${.5+p},.5 L0,.5 M${.5-p},.5 L${.5-p},1`},"╗":{1:(p,a)=>`M0,${.5+a} L${.5-p},${.5+a} L${.5-p},1 M0,${.5-a} L${.5+p},${.5-a} L${.5+p},1`},"╘":{1:(p,a)=>`M.5,0 L.5,${.5+a} L1,${.5+a} M.5,${.5-a} L1,${.5-a}`},"╙":{1:(p,a)=>`M1,.5 L${.5-p},.5 L${.5-p},0 M${.5+p},.5 L${.5+p},0`},"╚":{1:(p,a)=>`M1,${.5-a} L${.5+p},${.5-a} L${.5+p},0 M1,${.5+a} L${.5-p},${.5+a} L${.5-p},0`},"╛":{1:(p,a)=>`M0,${.5+a} L.5,${.5+a} L.5,0 M0,${.5-a} L.5,${.5-a}`},"╜":{1:(p,a)=>`M0,.5 L${.5+p},.5 L${.5+p},0 M${.5-p},.5 L${.5-p},0`},"╝":{1:(p,a)=>`M0,${.5-a} L${.5-p},${.5-a} L${.5-p},0 M0,${.5+a} L${.5+p},${.5+a} L${.5+p},0`},"╞":{1:(p,a)=>`M.5,0 L.5,1 M.5,${.5-a} L1,${.5-a} M.5,${.5+a} L1,${.5+a}`},"╟":{1:(p,a)=>`M${.5-p},0 L${.5-p},1 M${.5+p},0 L${.5+p},1 M${.5+p},.5 L1,.5`},"╠":{1:(p,a)=>`M${.5-p},0 L${.5-p},1 M1,${.5+a} L${.5+p},${.5+a} L${.5+p},1 M1,${.5-a} L${.5+p},${.5-a} L${.5+p},0`},"╡":{1:(p,a)=>`M.5,0 L.5,1 M0,${.5-a} L.5,${.5-a} M0,${.5+a} L.5,${.5+a}`},"╢":{1:(p,a)=>`M0,.5 L${.5-p},.5 M${.5-p},0 L${.5-p},1 M${.5+p},0 L${.5+p},1`},"╣":{1:(p,a)=>`M${.5+p},0 L${.5+p},1 M0,${.5+a} L${.5-p},${.5+a} L${.5-p},1 M0,${.5-a} L${.5-p},${.5-a} L${.5-p},0`},"╤":{1:(p,a)=>`M0,${.5-a} L1,${.5-a} M0,${.5+a} L1,${.5+a} M.5,${.5+a} L.5,1`},"╥":{1:(p,a)=>`M0,.5 L1,.5 M${.5-p},.5 L${.5-p},1 M${.5+p},.5 L${.5+p},1`},"╦":{1:(p,a)=>`M0,${.5-a} L1,${.5-a} M0,${.5+a} L${.5-p},${.5+a} L${.5-p},1 M1,${.5+a} L${.5+p},${.5+a} L${.5+p},1`},"╧":{1:(p,a)=>`M.5,0 L.5,${.5-a} M0,${.5-a} L1,${.5-a} M0,${.5+a} L1,${.5+a}`},"╨":{1:(p,a)=>`M0,.5 L1,.5 M${.5-p},.5 L${.5-p},0 M${.5+p},.5 L${.5+p},0`},"╩":{1:(p,a)=>`M0,${.5+a} L1,${.5+a} M0,${.5-a} L${.5-p},${.5-a} L${.5-p},0 M1,${.5-a} L${.5+p},${.5-a} L${.5+p},0`},"╪":{1:(p,a)=>`M.5,0 L.5,1 M0,${.5-a} L1,${.5-a} M0,${.5+a} L1,${.5+a}`},"╫":{1:(p,a)=>`M0,.5 L1,.5 M${.5-p},0 L${.5-p},1 M${.5+p},0 L${.5+p},1`},"╬":{1:(p,a)=>`M0,${.5+a} L${.5-p},${.5+a} L${.5-p},1 M1,${.5+a} L${.5+p},${.5+a} L${.5+p},1 M0,${.5-a} L${.5-p},${.5-a} L${.5-p},0 M1,${.5-a} L${.5+p},${.5-a} L${.5+p},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:(p,a)=>`M.5,1 L.5,${.5+a/.15*.5} C.5,${.5+a/.15*.5},.5,.5,1,.5`},"╮":{1:(p,a)=>`M.5,1 L.5,${.5+a/.15*.5} C.5,${.5+a/.15*.5},.5,.5,0,.5`},"╯":{1:(p,a)=>`M.5,0 L.5,${.5-a/.15*.5} C.5,${.5-a/.15*.5},.5,.5,0,.5`},"╰":{1:(p,a)=>`M.5,0 L.5,${.5-a/.15*.5} C.5,${.5-a/.15*.5},.5,.5,1,.5`}},r.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},r.powerlineDefinitions[""]=r.powerlineDefinitions[""],r.powerlineDefinitions[""]=r.powerlineDefinitions[""],r.tryDrawCustomChar=function(p,a,c,o,f,y,R,k){const D=r.blockElementDefinitions[a];if(D)return(function(H,P,I,K,X,Y){for(let $=0;$<P.length;$++){const U=P[$],T=X/8,F=Y/8;H.fillRect(I+U.x*T,K+U.y*F,U.w*T,U.h*F)}})(p,D,c,o,f,y),!0;const E=g[a];if(E)return(function(H,P,I,K,X,Y){let $=l.get(P);$||($=new Map,l.set(P,$));const U=H.fillStyle;if(typeof U!="string")throw new Error(`Unexpected fillStyle type "${U}"`);let T=$.get(U);if(!T){const F=P[0].length,B=P.length,W=H.canvas.ownerDocument.createElement("canvas");W.width=F,W.height=B;const ee=(0,d.throwIfFalsy)(W.getContext("2d")),ne=new ImageData(F,B);let pe,ke,Q,G;if(U.startsWith("#"))pe=parseInt(U.slice(1,3),16),ke=parseInt(U.slice(3,5),16),Q=parseInt(U.slice(5,7),16),G=U.length>7&&parseInt(U.slice(7,9),16)||1;else{if(!U.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${U}" when drawing pattern glyph`);[pe,ke,Q,G]=U.substring(5,U.length-1).split(",").map((he=>parseFloat(he)))}for(let he=0;he<B;he++)for(let ae=0;ae<F;ae++)ne.data[4*(he*F+ae)]=pe,ne.data[4*(he*F+ae)+1]=ke,ne.data[4*(he*F+ae)+2]=Q,ne.data[4*(he*F+ae)+3]=P[he][ae]*(255*G);ee.putImageData(ne,0,0),T=(0,d.throwIfFalsy)(H.createPattern(W,null)),$.set(U,T)}H.fillStyle=T,H.fillRect(I,K,X,Y)})(p,E,c,o,f,y),!0;const L=r.boxDrawingDefinitions[a];if(L)return(function(H,P,I,K,X,Y,$){H.strokeStyle=H.fillStyle;for(const[U,T]of Object.entries(P)){let F;H.beginPath(),H.lineWidth=$*Number.parseInt(U),F=typeof T=="function"?T(.15,.15/Y*X):T;for(const B of F.split(" ")){const W=B[0],ee=b[W];if(!ee){console.error(`Could not find drawing instructions for "${W}"`);continue}const ne=B.substring(1).split(",");ne[0]&&ne[1]&&ee(H,C(ne,X,Y,I,K,!0,$))}H.stroke(),H.closePath()}})(p,L,c,o,f,y,k),!0;const z=r.powerlineDefinitions[a];return!!z&&((function(H,P,I,K,X,Y,$,U){const T=new Path2D;T.rect(I,K,X,Y),H.clip(T),H.beginPath();const F=$/12;H.lineWidth=U*F;for(const B of P.d.split(" ")){const W=B[0],ee=b[W];if(!ee){console.error(`Could not find drawing instructions for "${W}"`);continue}const ne=B.substring(1).split(",");ne[0]&&ne[1]&&ee(H,C(ne,X,Y,I,K,!1,U,(P.leftPadding??0)*(F/2),(P.rightPadding??0)*(F/2)))}P.type===1?(H.strokeStyle=H.fillStyle,H.stroke()):H.fill(),H.closePath()})(p,z,c,o,f,y,R,k),!0)};const l=new Map;function m(p,a,c=0){return Math.max(Math.min(p,a),c)}const b={C:(p,a)=>p.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]),L:(p,a)=>p.lineTo(a[0],a[1]),M:(p,a)=>p.moveTo(a[0],a[1])};function C(p,a,c,o,f,y,R,k=0,D=0){const E=p.map((L=>parseFloat(L)||parseInt(L)));if(E.length<2)throw new Error("Too few arguments for instruction");for(let L=0;L<E.length;L+=2)E[L]*=a-k*R-D*R,y&&E[L]!==0&&(E[L]=m(Math.round(E[L]+.5)-.5,a,0)),E[L]+=o+k*R;for(let L=1;L<E.length;L+=2)E[L]*=c,y&&E[L]!==0&&(E[L]=m(Math.round(E[L]+.5)-.5,c,0)),E[L]+=f;return E}},56:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.observeDevicePixelDimensions=void 0;const d=u(859);r.observeDevicePixelDimensions=function(g,l,m){let b=new l.ResizeObserver((C=>{const p=C.find((o=>o.target===g));if(!p)return;if(!("devicePixelContentBoxSize"in p))return b==null||b.disconnect(),void(b=void 0);const a=p.devicePixelContentBoxSize[0].inlineSize,c=p.devicePixelContentBoxSize[0].blockSize;a>0&&c>0&&m(a,c)}));try{b.observe(g,{box:["device-pixel-content-box"]})}catch{b.disconnect(),b=void 0}return(0,d.toDisposable)((()=>b==null?void 0:b.disconnect()))}},374:(A,r)=>{function u(g){return 57508<=g&&g<=57558}function d(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(r,"__esModule",{value:!0}),r.computeNextVariantOffset=r.createRenderDimensions=r.treatGlyphAsBackgroundColor=r.allowRescaling=r.isEmoji=r.isRestrictedPowerlineGlyph=r.isPowerlineGlyph=r.throwIfFalsy=void 0,r.throwIfFalsy=function(g){if(!g)throw new Error("value must not be falsy");return g},r.isPowerlineGlyph=u,r.isRestrictedPowerlineGlyph=function(g){return 57520<=g&&g<=57527},r.isEmoji=d,r.allowRescaling=function(g,l,m,b){return l===1&&m>Math.ceil(1.5*b)&&g!==void 0&&g>255&&!d(g)&&!u(g)&&!(function(C){return 57344<=C&&C<=63743})(g)},r.treatGlyphAsBackgroundColor=function(g){return u(g)||(function(l){return 9472<=l&&l<=9631})(g)},r.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},r.computeNextVariantOffset=function(g,l,m=0){return(g-(2*Math.round(l)-m))%(2*Math.round(l))}},296:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.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,l,m,b=!1){if(this.selectionStart=l,this.selectionEnd=m,!l||!m||l[0]===m[0]&&l[1]===m[1])return void this.clear();const C=g.buffers.active.ydisp,p=l[1]-C,a=m[1]-C,c=Math.max(p,0),o=Math.min(a,g.rows-1);c>=g.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=p,this.viewportEndRow=a,this.viewportCappedStartRow=c,this.viewportCappedEndRow=o,this.startCol=l[0],this.endCol=m[0])}isCellSelected(g,l,m){return!!this.hasSelection&&(m-=g.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?l>=this.startCol&&m>=this.viewportCappedStartRow&&l<this.endCol&&m<=this.viewportCappedEndRow:l<this.startCol&&m>=this.viewportCappedStartRow&&l>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&m===this.viewportStartRow&&l>=this.startCol&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportEndRow&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportStartRow&&l>=this.startCol)}}r.createSelectionRenderModel=function(){return new u}},509:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TextureAtlas=void 0;const d=u(237),g=u(860),l=u(374),m=u(160),b=u(345),C=u(485),p=u(385),a=u(147),c=u(855),o={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 f;class y{get pages(){return this._pages}constructor(L,z,H){this._document=L,this._config=z,this._unicodeService=H,this._didWarmUp=!1,this._cacheMap=new C.FourKeyMap,this._cacheMapCombined=new C.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new a.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new b.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new b.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=D(L,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,l.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const L of this.pages)L.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const L=new p.IdleTaskQueue;for(let z=33;z<126;z++)L.enqueue((()=>{if(!this._cacheMap.get(z,c.DEFAULT_COLOR,c.DEFAULT_COLOR,c.DEFAULT_EXT)){const H=this._drawToCache(z,c.DEFAULT_COLOR,c.DEFAULT_COLOR,c.DEFAULT_EXT);this._cacheMap.set(z,c.DEFAULT_COLOR,c.DEFAULT_COLOR,c.DEFAULT_EXT,H)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const L of this._pages)L.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(y.maxAtlasPages&&this._pages.length>=Math.max(4,y.maxAtlasPages)){const z=this._pages.filter(($=>2*$.canvas.width<=(y.maxTextureSize||4096))).sort((($,U)=>U.canvas.width!==$.canvas.width?U.canvas.width-$.canvas.width:U.percentageUsed-$.percentageUsed));let H=-1,P=0;for(let $=0;$<z.length;$++)if(z[$].canvas.width!==P)H=$,P=z[$].canvas.width;else if($-H==3)break;const I=z.slice(H,H+4),K=I.map(($=>$.glyphs[0].texturePage)).sort((($,U)=>$>U?1:-1)),X=this.pages.length-I.length,Y=this._mergePages(I,X);Y.version++;for(let $=K.length-1;$>=0;$--)this._deletePage(K[$]);this.pages.push(Y),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(Y.canvas)}const L=new R(this._document,this._textureSize);return this._pages.push(L),this._activePages.push(L),this._onAddTextureAtlasCanvas.fire(L.canvas),L}_mergePages(L,z){const H=2*L[0].canvas.width,P=new R(this._document,H,L);for(const[I,K]of L.entries()){const X=I*K.canvas.width%H,Y=Math.floor(I/2)*K.canvas.height;P.ctx.drawImage(K.canvas,X,Y);for(const U of K.glyphs)U.texturePage=z,U.sizeClipSpace.x=U.size.x/H,U.sizeClipSpace.y=U.size.y/H,U.texturePosition.x+=X,U.texturePosition.y+=Y,U.texturePositionClipSpace.x=U.texturePosition.x/H,U.texturePositionClipSpace.y=U.texturePosition.y/H;this._onRemoveTextureAtlasCanvas.fire(K.canvas);const $=this._activePages.indexOf(K);$!==-1&&this._activePages.splice($,1)}return P}_deletePage(L){this._pages.splice(L,1);for(let z=L;z<this._pages.length;z++){const H=this._pages[z];for(const P of H.glyphs)P.texturePage--;H.version++}}getRasterizedGlyphCombinedChar(L,z,H,P,I){return this._getFromCacheMap(this._cacheMapCombined,L,z,H,P,I)}getRasterizedGlyph(L,z,H,P,I){return this._getFromCacheMap(this._cacheMap,L,z,H,P,I)}_getFromCacheMap(L,z,H,P,I,K=!1){return f=L.get(z,H,P,I),f||(f=this._drawToCache(z,H,P,I,K),L.set(z,H,P,I,f)),f}_getColorFromAnsiIndex(L){if(L>=this._config.colors.ansi.length)throw new Error("No color found for idx "+L);return this._config.colors.ansi[L]}_getBackgroundColor(L,z,H,P){if(this._config.allowTransparency)return m.NULL_COLOR;let I;switch(L){case 16777216:case 33554432:I=this._getColorFromAnsiIndex(z);break;case 50331648:const K=a.AttributeData.toColorRGB(z);I=m.channels.toColor(K[0],K[1],K[2]);break;default:I=H?m.color.opaque(this._config.colors.foreground):this._config.colors.background}return I}_getForegroundColor(L,z,H,P,I,K,X,Y,$,U){const T=this._getMinimumContrastColor(L,z,H,P,I,K,X,$,Y,U);if(T)return T;let F;switch(I){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&$&&K<8&&(K+=8),F=this._getColorFromAnsiIndex(K);break;case 50331648:const B=a.AttributeData.toColorRGB(K);F=m.channels.toColor(B[0],B[1],B[2]);break;default:F=X?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(F=m.color.opaque(F)),Y&&(F=m.color.multiplyOpacity(F,d.DIM_OPACITY)),F}_resolveBackgroundRgba(L,z,H){switch(L){case 16777216:case 33554432:return this._getColorFromAnsiIndex(z).rgba;case 50331648:return z<<8;default:return H?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(L,z,H,P){switch(L){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&P&&z<8&&(z+=8),this._getColorFromAnsiIndex(z).rgba;case 50331648:return z<<8;default:return H?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(L,z,H,P,I,K,X,Y,$,U){if(this._config.minimumContrastRatio===1||U)return;const T=this._getContrastCache($),F=T.getColor(L,P);if(F!==void 0)return F||void 0;const B=this._resolveBackgroundRgba(z,H,X),W=this._resolveForegroundRgba(I,K,X,Y),ee=m.rgba.ensureContrastRatio(B,W,this._config.minimumContrastRatio/($?2:1));if(!ee)return void T.setColor(L,P,null);const ne=m.channels.toColor(ee>>24&255,ee>>16&255,ee>>8&255);return T.setColor(L,P,ne),ne}_getContrastCache(L){return L?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(L,z,H,P,I=!1){const K=typeof L=="number"?String.fromCharCode(L):L,X=Math.min(this._config.deviceCellWidth*Math.max(K.length,2)+4,this._textureSize);this._tmpCanvas.width<X&&(this._tmpCanvas.width=X);const Y=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<Y&&(this._tmpCanvas.height=Y),this._tmpCtx.save(),this._workAttributeData.fg=H,this._workAttributeData.bg=z,this._workAttributeData.extended.ext=P,this._workAttributeData.isInvisible())return o;const $=!!this._workAttributeData.isBold(),U=!!this._workAttributeData.isInverse(),T=!!this._workAttributeData.isDim(),F=!!this._workAttributeData.isItalic(),B=!!this._workAttributeData.isUnderline(),W=!!this._workAttributeData.isStrikethrough(),ee=!!this._workAttributeData.isOverline();let ne=this._workAttributeData.getFgColor(),pe=this._workAttributeData.getFgColorMode(),ke=this._workAttributeData.getBgColor(),Q=this._workAttributeData.getBgColorMode();if(U){const Be=ne;ne=ke,ke=Be;const Ue=pe;pe=Q,Q=Ue}const G=this._getBackgroundColor(Q,ke,U,T);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=G.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const he=$?this._config.fontWeightBold:this._config.fontWeight,ae=F?"italic":"";this._tmpCtx.font=`${ae} ${he} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=d.TEXT_BASELINE;const Ae=K.length===1&&(0,l.isPowerlineGlyph)(K.charCodeAt(0)),Oe=K.length===1&&(0,l.isRestrictedPowerlineGlyph)(K.charCodeAt(0)),Ye=this._getForegroundColor(z,Q,ke,H,pe,ne,U,T,$,(0,l.treatGlyphAsBackgroundColor)(K.charCodeAt(0)));this._tmpCtx.fillStyle=Ye.css;const $e=Oe?0:4;let at=!1;this._config.customGlyphs!==!1&&(at=(0,g.tryDrawCustomChar)(this._tmpCtx,K,$e,$e,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let ye,Te=!Ae;if(ye=typeof L=="number"?this._unicodeService.wcwidth(L):this._unicodeService.getStringCellWidth(L),B){this._tmpCtx.save();const Be=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ue=Be%2==1?.5:0;if(this._tmpCtx.lineWidth=Be,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Te=!1,this._tmpCtx.strokeStyle=`rgb(${a.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Te=!1;let ce=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&ce<8&&(ce+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(ce).css}this._tmpCtx.beginPath();const ct=$e,it=Math.ceil($e+this._config.deviceCharHeight)-Ue-(I?2*Be:0),St=it+Be,Ce=it+2*Be;let Ie=this._workAttributeData.getUnderlineVariantOffset();for(let ce=0;ce<ye;ce++){this._tmpCtx.save();const ze=ct+ce*this._config.deviceCellWidth,je=ct+(ce+1)*this._config.deviceCellWidth,le=ze+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(ze,it),this._tmpCtx.lineTo(je,it),this._tmpCtx.moveTo(ze,Ce),this._tmpCtx.lineTo(je,Ce);break;case 3:const ie=Be<=1?Ce:Math.ceil($e+this._config.deviceCharHeight-Be/2)-Ue,_e=Be<=1?it:Math.ceil($e+this._config.deviceCharHeight+Be/2)-Ue,ue=new Path2D;ue.rect(ze,it,this._config.deviceCellWidth,Ce-it),this._tmpCtx.clip(ue),this._tmpCtx.moveTo(ze-this._config.deviceCellWidth/2,St),this._tmpCtx.bezierCurveTo(ze-this._config.deviceCellWidth/2,_e,ze,_e,ze,St),this._tmpCtx.bezierCurveTo(ze,ie,le,ie,le,St),this._tmpCtx.bezierCurveTo(le,_e,je,_e,je,St),this._tmpCtx.bezierCurveTo(je,ie,je+this._config.deviceCellWidth/2,ie,je+this._config.deviceCellWidth/2,St);break;case 4:const Pe=Ie===0?0:Ie>=Be?2*Be-Ie:Be-Ie;Ie>=Be||Pe===0?(this._tmpCtx.setLineDash([Math.round(Be),Math.round(Be)]),this._tmpCtx.moveTo(ze+Pe,it),this._tmpCtx.lineTo(je,it)):(this._tmpCtx.setLineDash([Math.round(Be),Math.round(Be)]),this._tmpCtx.moveTo(ze,it),this._tmpCtx.lineTo(ze+Pe,it),this._tmpCtx.moveTo(ze+Pe+Be,it),this._tmpCtx.lineTo(je,it)),Ie=(0,l.computeNextVariantOffset)(je-ze,Be,Ie);break;case 5:const Me=.6,J=.3,Z=je-ze,te=Math.floor(Me*Z),V=Math.floor(J*Z),xe=Z-te-V;this._tmpCtx.setLineDash([te,V,xe]),this._tmpCtx.moveTo(ze,it),this._tmpCtx.lineTo(je,it);break;default:this._tmpCtx.moveTo(ze,it),this._tmpCtx.lineTo(je,it)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!at&&this._config.fontSize>=12&&!this._config.allowTransparency&&K!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const ce=this._tmpCtx.measureText(K);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in ce&&ce.actualBoundingBoxDescent>0){this._tmpCtx.save();const ze=new Path2D;ze.rect(ct,it-Math.ceil(Be/2),this._config.deviceCellWidth*ye,Ce-it+Math.ceil(Be/2)),this._tmpCtx.clip(ze),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=G.css,this._tmpCtx.strokeText(K,$e,$e+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(ee){const Be=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ue=Be%2==1?.5:0;this._tmpCtx.lineWidth=Be,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo($e,$e+Ue),this._tmpCtx.lineTo($e+this._config.deviceCharWidth*ye,$e+Ue),this._tmpCtx.stroke()}if(at||this._tmpCtx.fillText(K,$e,$e+this._config.deviceCharHeight),K==="_"&&!this._config.allowTransparency){let Be=k(this._tmpCtx.getImageData($e,$e,this._config.deviceCellWidth,this._config.deviceCellHeight),G,Ye,Te);if(Be)for(let Ue=1;Ue<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=G.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(K,$e,$e+this._config.deviceCharHeight-Ue),Be=k(this._tmpCtx.getImageData($e,$e,this._config.deviceCellWidth,this._config.deviceCellHeight),G,Ye,Te),Be);Ue++);}if(W){const Be=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),Ue=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=Be,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo($e,$e+Math.floor(this._config.deviceCharHeight/2)-Ue),this._tmpCtx.lineTo($e+this._config.deviceCharWidth*ye,$e+Math.floor(this._config.deviceCharHeight/2)-Ue),this._tmpCtx.stroke()}this._tmpCtx.restore();const ut=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let tt;if(tt=this._config.allowTransparency?(function(Be){for(let Ue=0;Ue<Be.data.length;Ue+=4)if(Be.data[Ue+3]>0)return!1;return!0})(ut):k(ut,G,Ye,Te),tt)return o;const He=this._findGlyphBoundingBox(ut,this._workBoundingBox,X,Oe,at,$e);let We,Fe;for(;;){if(this._activePages.length===0){const Be=this._createNewPage();We=Be,Fe=Be.currentRow,Fe.height=He.size.y;break}We=this._activePages[this._activePages.length-1],Fe=We.currentRow;for(const Be of this._activePages)He.size.y<=Be.currentRow.height&&(We=Be,Fe=Be.currentRow);for(let Be=this._activePages.length-1;Be>=0;Be--)for(const Ue of this._activePages[Be].fixedRows)Ue.height<=Fe.height&&He.size.y<=Ue.height&&(We=this._activePages[Be],Fe=Ue);if(Fe.y+He.size.y>=We.canvas.height||Fe.height>He.size.y+2){let Be=!1;if(We.currentRow.y+We.currentRow.height+He.size.y>=We.canvas.height){let Ue;for(const ct of this._activePages)if(ct.currentRow.y+ct.currentRow.height+He.size.y<ct.canvas.height){Ue=ct;break}if(Ue)We=Ue;else if(y.maxAtlasPages&&this._pages.length>=y.maxAtlasPages&&Fe.y+He.size.y<=We.canvas.height&&Fe.height>=He.size.y&&Fe.x+He.size.x<=We.canvas.width)Be=!0;else{const ct=this._createNewPage();We=ct,Fe=ct.currentRow,Fe.height=He.size.y,Be=!0}}Be||(We.currentRow.height>0&&We.fixedRows.push(We.currentRow),Fe={x:0,y:We.currentRow.y+We.currentRow.height,height:He.size.y},We.fixedRows.push(Fe),We.currentRow={x:0,y:Fe.y+Fe.height,height:0})}if(Fe.x+He.size.x<=We.canvas.width)break;Fe===We.currentRow?(Fe.x=0,Fe.y+=Fe.height,Fe.height=0):We.fixedRows.splice(We.fixedRows.indexOf(Fe),1)}return He.texturePage=this._pages.indexOf(We),He.texturePosition.x=Fe.x,He.texturePosition.y=Fe.y,He.texturePositionClipSpace.x=Fe.x/We.canvas.width,He.texturePositionClipSpace.y=Fe.y/We.canvas.height,He.sizeClipSpace.x/=We.canvas.width,He.sizeClipSpace.y/=We.canvas.height,Fe.height=Math.max(Fe.height,He.size.y),Fe.x+=He.size.x,We.ctx.putImageData(ut,He.texturePosition.x-this._workBoundingBox.left,He.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,He.size.x,He.size.y),We.addGlyph(He),We.version++,He}_findGlyphBoundingBox(L,z,H,P,I,K){z.top=0;const X=P?this._config.deviceCellHeight:this._tmpCanvas.height,Y=P?this._config.deviceCellWidth:H;let $=!1;for(let U=0;U<X;U++){for(let T=0;T<Y;T++){const F=U*this._tmpCanvas.width*4+4*T+3;if(L.data[F]!==0){z.top=U,$=!0;break}}if($)break}z.left=0,$=!1;for(let U=0;U<K+Y;U++){for(let T=0;T<X;T++){const F=T*this._tmpCanvas.width*4+4*U+3;if(L.data[F]!==0){z.left=U,$=!0;break}}if($)break}z.right=Y,$=!1;for(let U=K+Y-1;U>=K;U--){for(let T=0;T<X;T++){const F=T*this._tmpCanvas.width*4+4*U+3;if(L.data[F]!==0){z.right=U,$=!0;break}}if($)break}z.bottom=X,$=!1;for(let U=X-1;U>=0;U--){for(let T=0;T<Y;T++){const F=U*this._tmpCanvas.width*4+4*T+3;if(L.data[F]!==0){z.bottom=U,$=!0;break}}if($)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:z.right-z.left+1,y:z.bottom-z.top+1},sizeClipSpace:{x:z.right-z.left+1,y:z.bottom-z.top+1},offset:{x:-z.left+K+(P||I?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-z.top+K+(P||I?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}r.TextureAtlas=y;class R{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(L){this._glyphs.push(L),this._usedPixels+=L.size.x*L.size.y}constructor(L,z,H){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],H)for(const P of H)this._glyphs.push(...P.glyphs),this._usedPixels+=P._usedPixels;this.canvas=D(L,z,z),this.ctx=(0,l.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 k(E,L,z,H){const P=L.rgba>>>24,I=L.rgba>>>16&255,K=L.rgba>>>8&255,X=z.rgba>>>24,Y=z.rgba>>>16&255,$=z.rgba>>>8&255,U=Math.floor((Math.abs(P-X)+Math.abs(I-Y)+Math.abs(K-$))/12);let T=!0;for(let F=0;F<E.data.length;F+=4)E.data[F]===P&&E.data[F+1]===I&&E.data[F+2]===K||H&&Math.abs(E.data[F]-P)+Math.abs(E.data[F+1]-I)+Math.abs(E.data[F+2]-K)<U?E.data[F+3]=0:T=!1;return T}function D(E,L,z){const H=E.createElement("canvas");return H.width=L,H.height=z,H}},577:function(A,r,u){var d=this&&this.__decorate||function(c,o,f,y){var R,k=arguments.length,D=k<3?o:y===null?y=Object.getOwnPropertyDescriptor(o,f):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(c,o,f,y);else for(var E=c.length-1;E>=0;E--)(R=c[E])&&(D=(k<3?R(D):k>3?R(o,f,D):R(o,f))||D);return k>3&&D&&Object.defineProperty(o,f,D),D},g=this&&this.__param||function(c,o){return function(f,y){o(f,y,c)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharacterJoinerService=r.JoinedCellData=void 0;const l=u(147),m=u(855),b=u(782),C=u(97);class p extends l.AttributeData{constructor(o,f,y){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=f,this._width=y}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.JoinedCellData=p;let a=r.CharacterJoinerService=class o_{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new b.CellData}register(o){const f={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(f),f.id}deregister(o){for(let f=0;f<this._characterJoiners.length;f++)if(this._characterJoiners[f].id===o)return this._characterJoiners.splice(f,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const f=this._bufferService.buffer.lines.get(o);if(!f||f.length===0)return[];const y=[],R=f.translateToString(!0);let k=0,D=0,E=0,L=f.getFg(0),z=f.getBg(0);for(let H=0;H<f.getTrimmedLength();H++)if(f.loadCell(H,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==L||this._workCell.bg!==z){if(H-k>1){const P=this._getJoinedRanges(R,E,D,f,k);for(let I=0;I<P.length;I++)y.push(P[I])}k=H,E=D,L=this._workCell.fg,z=this._workCell.bg}D+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-k>1){const H=this._getJoinedRanges(R,E,D,f,k);for(let P=0;P<H.length;P++)y.push(H[P])}return y}_getJoinedRanges(o,f,y,R,k){const D=o.substring(f,y);let E=[];try{E=this._characterJoiners[0].handler(D)}catch(L){console.error(L)}for(let L=1;L<this._characterJoiners.length;L++)try{const z=this._characterJoiners[L].handler(D);for(let H=0;H<z.length;H++)o_._mergeRanges(E,z[H])}catch(z){console.error(z)}return this._stringRangesToCellRanges(E,R,k),E}_stringRangesToCellRanges(o,f,y){let R=0,k=!1,D=0,E=o[R];if(E){for(let L=y;L<this._bufferService.cols;L++){const z=f.getWidth(L),H=f.getString(L).length||m.WHITESPACE_CELL_CHAR.length;if(z!==0){if(!k&&E[0]<=D&&(E[0]=L,k=!0),E[1]<=D){if(E[1]=L,E=o[++R],!E)break;E[0]<=D?(E[0]=L,k=!0):k=!1}D+=H}}E&&(E[1]=this._bufferService.cols)}}static _mergeRanges(o,f){let y=!1;for(let R=0;R<o.length;R++){const k=o[R];if(y){if(f[1]<=k[0])return o[R-1][1]=f[1],o;if(f[1]<=k[1])return o[R-1][1]=Math.max(f[1],k[1]),o.splice(R,1),o;o.splice(R,1),R--}else{if(f[1]<=k[0])return o.splice(R,0,f),o;if(f[1]<=k[1])return k[0]=Math.min(f[0],k[0]),o;f[0]<k[1]&&(k[0]=Math.min(f[0],k[0]),y=!0)}}return y?o[o.length-1][1]=f[1]:o.push(f),o}};r.CharacterJoinerService=a=d([g(0,C.IBufferService)],a)},160:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.contrastRatio=r.toPaddedHex=r.rgba=r.rgb=r.css=r.color=r.channels=r.NULL_COLOR=void 0;let u=0,d=0,g=0,l=0;var m,b,C,p,a;function c(f){const y=f.toString(16);return y.length<2?"0"+y:y}function o(f,y){return f<y?(y+.05)/(f+.05):(f+.05)/(y+.05)}r.NULL_COLOR={css:"#00000000",rgba:0},(function(f){f.toCss=function(y,R,k,D){return D!==void 0?`#${c(y)}${c(R)}${c(k)}${c(D)}`:`#${c(y)}${c(R)}${c(k)}`},f.toRgba=function(y,R,k,D=255){return(y<<24|R<<16|k<<8|D)>>>0},f.toColor=function(y,R,k,D){return{css:f.toCss(y,R,k,D),rgba:f.toRgba(y,R,k,D)}}})(m||(r.channels=m={})),(function(f){function y(R,k){return l=Math.round(255*k),[u,d,g]=a.toChannels(R.rgba),{css:m.toCss(u,d,g,l),rgba:m.toRgba(u,d,g,l)}}f.blend=function(R,k){if(l=(255&k.rgba)/255,l===1)return{css:k.css,rgba:k.rgba};const D=k.rgba>>24&255,E=k.rgba>>16&255,L=k.rgba>>8&255,z=R.rgba>>24&255,H=R.rgba>>16&255,P=R.rgba>>8&255;return u=z+Math.round((D-z)*l),d=H+Math.round((E-H)*l),g=P+Math.round((L-P)*l),{css:m.toCss(u,d,g),rgba:m.toRgba(u,d,g)}},f.isOpaque=function(R){return(255&R.rgba)==255},f.ensureContrastRatio=function(R,k,D){const E=a.ensureContrastRatio(R.rgba,k.rgba,D);if(E)return m.toColor(E>>24&255,E>>16&255,E>>8&255)},f.opaque=function(R){const k=(255|R.rgba)>>>0;return[u,d,g]=a.toChannels(k),{css:m.toCss(u,d,g),rgba:k}},f.opacity=y,f.multiplyOpacity=function(R,k){return l=255&R.rgba,y(R,l*k/255)},f.toColorRGB=function(R){return[R.rgba>>24&255,R.rgba>>16&255,R.rgba>>8&255]}})(b||(r.color=b={})),(function(f){let y,R;try{const k=document.createElement("canvas");k.width=1,k.height=1;const D=k.getContext("2d",{willReadFrequently:!0});D&&(y=D,y.globalCompositeOperation="copy",R=y.createLinearGradient(0,0,1,1))}catch{}f.toColor=function(k){if(k.match(/#[\da-f]{3,8}/i))switch(k.length){case 4:return u=parseInt(k.slice(1,2).repeat(2),16),d=parseInt(k.slice(2,3).repeat(2),16),g=parseInt(k.slice(3,4).repeat(2),16),m.toColor(u,d,g);case 5:return u=parseInt(k.slice(1,2).repeat(2),16),d=parseInt(k.slice(2,3).repeat(2),16),g=parseInt(k.slice(3,4).repeat(2),16),l=parseInt(k.slice(4,5).repeat(2),16),m.toColor(u,d,g,l);case 7:return{css:k,rgba:(parseInt(k.slice(1),16)<<8|255)>>>0};case 9:return{css:k,rgba:parseInt(k.slice(1),16)>>>0}}const D=k.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(D)return u=parseInt(D[1]),d=parseInt(D[2]),g=parseInt(D[3]),l=Math.round(255*(D[5]===void 0?1:parseFloat(D[5]))),m.toColor(u,d,g,l);if(!y||!R)throw new Error("css.toColor: Unsupported css format");if(y.fillStyle=R,y.fillStyle=k,typeof y.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(y.fillRect(0,0,1,1),[u,d,g,l]=y.getImageData(0,0,1,1).data,l!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(u,d,g,l),css:k}}})(C||(r.css=C={})),(function(f){function y(R,k,D){const E=R/255,L=k/255,z=D/255;return .2126*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))}f.relativeLuminance=function(R){return y(R>>16&255,R>>8&255,255&R)},f.relativeLuminance2=y})(p||(r.rgb=p={})),(function(f){function y(k,D,E){const L=k>>24&255,z=k>>16&255,H=k>>8&255;let P=D>>24&255,I=D>>16&255,K=D>>8&255,X=o(p.relativeLuminance2(P,I,K),p.relativeLuminance2(L,z,H));for(;X<E&&(P>0||I>0||K>0);)P-=Math.max(0,Math.ceil(.1*P)),I-=Math.max(0,Math.ceil(.1*I)),K-=Math.max(0,Math.ceil(.1*K)),X=o(p.relativeLuminance2(P,I,K),p.relativeLuminance2(L,z,H));return(P<<24|I<<16|K<<8|255)>>>0}function R(k,D,E){const L=k>>24&255,z=k>>16&255,H=k>>8&255;let P=D>>24&255,I=D>>16&255,K=D>>8&255,X=o(p.relativeLuminance2(P,I,K),p.relativeLuminance2(L,z,H));for(;X<E&&(P<255||I<255||K<255);)P=Math.min(255,P+Math.ceil(.1*(255-P))),I=Math.min(255,I+Math.ceil(.1*(255-I))),K=Math.min(255,K+Math.ceil(.1*(255-K))),X=o(p.relativeLuminance2(P,I,K),p.relativeLuminance2(L,z,H));return(P<<24|I<<16|K<<8|255)>>>0}f.blend=function(k,D){if(l=(255&D)/255,l===1)return D;const E=D>>24&255,L=D>>16&255,z=D>>8&255,H=k>>24&255,P=k>>16&255,I=k>>8&255;return u=H+Math.round((E-H)*l),d=P+Math.round((L-P)*l),g=I+Math.round((z-I)*l),m.toRgba(u,d,g)},f.ensureContrastRatio=function(k,D,E){const L=p.relativeLuminance(k>>8),z=p.relativeLuminance(D>>8);if(o(L,z)<E){if(z<L){const I=y(k,D,E),K=o(L,p.relativeLuminance(I>>8));if(K<E){const X=R(k,D,E);return K>o(L,p.relativeLuminance(X>>8))?I:X}return I}const H=R(k,D,E),P=o(L,p.relativeLuminance(H>>8));if(P<E){const I=y(k,D,E);return P>o(L,p.relativeLuminance(I>>8))?H:I}return H}},f.reduceLuminance=y,f.increaseLuminance=R,f.toChannels=function(k){return[k>>24&255,k>>16&255,k>>8&255,255&k]}})(a||(r.rgba=a={})),r.toPaddedHex=c,r.contrastRatio=o},345:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.runAndSubscribe=r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===u)return void this._listeners.splice(d,1)}}})),this._event}fire(u,d){const g=[];for(let l=0;l<this._listeners.length;l++)g.push(this._listeners[l]);for(let l=0;l<g.length;l++)g[l].call(void 0,u,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},r.forwardEvent=function(u,d){return u((g=>d.fire(g)))},r.runAndSubscribe=function(u,d){return d(void 0),u((g=>d(g)))}},859:(A,r)=>{function u(d){for(const g of d)g.dispose();d.length=0}Object.defineProperty(r,"__esModule",{value:!0}),r.getDisposeArrayDisposable=r.disposeArray=r.toDisposable=r.MutableDisposable=r.Disposable=void 0,r.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const g=this._disposables.indexOf(d);g!==-1&&this._disposables.splice(g,1)}},r.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var g;this._isDisposed||d===this._value||((g=this._value)==null||g.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},r.toDisposable=function(d){return{dispose:d}},r.disposeArray=u,r.getDisposeArrayDisposable=function(d){return{dispose:()=>u(d)}}},485:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FourKeyMap=r.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(g,l,m){this._data[g]||(this._data[g]={}),this._data[g][l]=m}get(g,l){return this._data[g]?this._data[g][l]:void 0}clear(){this._data={}}}r.TwoKeyMap=u,r.FourKeyMap=class{constructor(){this._data=new u}set(d,g,l,m,b){this._data.get(d,g)||this._data.set(d,g,new u),this._data.get(d,g).set(l,m,b)}get(d,g,l,m){var b;return(b=this._data.get(d,g))==null?void 0:b.get(l,m)}clear(){this._data.clear()}}},399:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isChromeOS=r.isLinux=r.isWindows=r.isIphone=r.isIpad=r.isMac=r.getSafariVersion=r.isSafari=r.isLegacyEdge=r.isFirefox=r.isNode=void 0,r.isNode=typeof process<"u"&&"title"in process;const u=r.isNode?"node":navigator.userAgent,d=r.isNode?"node":navigator.platform;r.isFirefox=u.includes("Firefox"),r.isLegacyEdge=u.includes("Edge"),r.isSafari=/^((?!chrome|android).)*safari/i.test(u),r.getSafariVersion=function(){if(!r.isSafari)return 0;const g=u.match(/Version\/(\d+)/);return g===null||g.length<2?0:parseInt(g[1])},r.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),r.isIpad=d==="iPad",r.isIphone=d==="iPhone",r.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),r.isLinux=d.indexOf("Linux")>=0,r.isChromeOS=/\bCrOS\b/.test(u)},385:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DebouncedIdleTask=r.IdleTaskQueue=r.PriorityTaskQueue=void 0;const d=u(399);class g{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),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(b){this._idleCallback=void 0;let C=0,p=0,a=b.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),p=Math.max(C,p),c=b.timeRemaining(),1.5*p>c)return a-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(a-C))}ms`),void this._start();a=c}this.clear()}}class l extends g{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const C=Date.now()+b;return{timeRemaining:()=>Math.max(0,C-Date.now())}}}r.PriorityTaskQueue=l,r.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends g{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:l,r.DebouncedIdleTask=class{constructor(){this._queue=new r.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},147:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ExtendedAttrs=r.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(l){return[l>>>16&255,l>>>8&255,255&l]}static fromColorRGB(l){return(255&l[0])<<16|(255&l[1])<<8|255&l[2]}clone(){const l=new u;return l.fg=this.fg,l.bg=this.bg,l.extended=this.extended.clone(),l}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}r.AttributeData=u;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(l){this._ext=l}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(l){this._ext&=-469762049,this._ext|=l<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(l){this._ext&=-67108864,this._ext|=67108863&l}get urlId(){return this._urlId}set urlId(l){this._urlId=l}get underlineVariantOffset(){const l=(3758096384&this._ext)>>29;return l<0?4294967288^l:l}set underlineVariantOffset(l){this._ext&=536870911,this._ext|=l<<29&3758096384}constructor(l=0,m=0){this._ext=0,this._urlId=0,this._ext=l,this._urlId=m}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}r.ExtendedAttrs=d},782:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellData=void 0;const d=u(133),g=u(855),l=u(147);class m extends l.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new l.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const p=new m;return p.setFromCharData(C),p}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[g.CHAR_DATA_ATTR_INDEX],this.bg=0;let p=!1;if(C[g.CHAR_DATA_CHAR_INDEX].length>2)p=!0;else if(C[g.CHAR_DATA_CHAR_INDEX].length===2){const a=C[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=a&&a<=56319){const c=C[g.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(a-55296)+c-56320+65536|C[g.CHAR_DATA_WIDTH_INDEX]<<22:p=!0}else p=!0}else this.content=C[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[g.CHAR_DATA_WIDTH_INDEX]<<22;p&&(this.combinedData=C[g.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[g.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=m},855:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WHITESPACE_CELL_CODE=r.WHITESPACE_CELL_WIDTH=r.WHITESPACE_CELL_CHAR=r.NULL_CELL_CODE=r.NULL_CELL_WIDTH=r.NULL_CELL_CHAR=r.CHAR_DATA_CODE_INDEX=r.CHAR_DATA_WIDTH_INDEX=r.CHAR_DATA_CHAR_INDEX=r.CHAR_DATA_ATTR_INDEX=r.DEFAULT_EXT=r.DEFAULT_ATTR=r.DEFAULT_COLOR=void 0,r.DEFAULT_COLOR=0,r.DEFAULT_ATTR=256|r.DEFAULT_COLOR<<9,r.DEFAULT_EXT=0,r.CHAR_DATA_ATTR_INDEX=0,r.CHAR_DATA_CHAR_INDEX=1,r.CHAR_DATA_WIDTH_INDEX=2,r.CHAR_DATA_CODE_INDEX=3,r.NULL_CELL_CHAR="",r.NULL_CELL_WIDTH=1,r.NULL_CELL_CODE=0,r.WHITESPACE_CELL_CHAR=" ",r.WHITESPACE_CELL_WIDTH=1,r.WHITESPACE_CELL_CODE=32},133:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},r.utf32ToString=function(u,d=0,g=u.length){let l="";for(let m=d;m<g;++m){let b=u[m];b>65535?(b-=65536,l+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):l+=String.fromCharCode(b)}return l},r.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,d){const g=u.length;if(!g)return 0;let l=0,m=0;if(this._interim){const b=u.charCodeAt(m++);56320<=b&&b<=57343?d[l++]=1024*(this._interim-55296)+b-56320+65536:(d[l++]=this._interim,d[l++]=b),this._interim=0}for(let b=m;b<g;++b){const C=u.charCodeAt(b);if(55296<=C&&C<=56319){if(++b>=g)return this._interim=C,l;const p=u.charCodeAt(b);56320<=p&&p<=57343?d[l++]=1024*(C-55296)+p-56320+65536:(d[l++]=C,d[l++]=p)}else C!==65279&&(d[l++]=C)}return l}},r.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,d){const g=u.length;if(!g)return 0;let l,m,b,C,p=0,a=0,c=0;if(this.interim[0]){let y=!1,R=this.interim[0];R&=(224&R)==192?31:(240&R)==224?15:7;let k,D=0;for(;(k=63&this.interim[++D])&&D<4;)R<<=6,R|=k;const E=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=E-D;for(;c<L;){if(c>=g)return 0;if(k=u[c++],(192&k)!=128){c--,y=!0;break}this.interim[D++]=k,R<<=6,R|=63&k}y||(E===2?R<128?c--:d[p++]=R:E===3?R<2048||R>=55296&&R<=57343||R===65279||(d[p++]=R):R<65536||R>1114111||(d[p++]=R)),this.interim.fill(0)}const o=g-4;let f=c;for(;f<g;){for(;!(!(f<o)||128&(l=u[f])||128&(m=u[f+1])||128&(b=u[f+2])||128&(C=u[f+3]));)d[p++]=l,d[p++]=m,d[p++]=b,d[p++]=C,f+=4;if(l=u[f++],l<128)d[p++]=l;else if((224&l)==192){if(f>=g)return this.interim[0]=l,p;if(m=u[f++],(192&m)!=128){f--;continue}if(a=(31&l)<<6|63&m,a<128){f--;continue}d[p++]=a}else if((240&l)==224){if(f>=g)return this.interim[0]=l,p;if(m=u[f++],(192&m)!=128){f--;continue}if(f>=g)return this.interim[0]=l,this.interim[1]=m,p;if(b=u[f++],(192&b)!=128){f--;continue}if(a=(15&l)<<12|(63&m)<<6|63&b,a<2048||a>=55296&&a<=57343||a===65279)continue;d[p++]=a}else if((248&l)==240){if(f>=g)return this.interim[0]=l,p;if(m=u[f++],(192&m)!=128){f--;continue}if(f>=g)return this.interim[0]=l,this.interim[1]=m,p;if(b=u[f++],(192&b)!=128){f--;continue}if(f>=g)return this.interim[0]=l,this.interim[1]=m,this.interim[2]=b,p;if(C=u[f++],(192&C)!=128){f--;continue}if(a=(7&l)<<18|(63&m)<<12|(63&b)<<6|63&C,a<65536||a>1114111)continue;d[p++]=a}}return p}}},776:function(A,r,u){var d=this&&this.__decorate||function(a,c,o,f){var y,R=arguments.length,k=R<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,o):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(a,c,o,f);else for(var D=a.length-1;D>=0;D--)(y=a[D])&&(k=(R<3?y(k):R>3?y(c,o,k):y(c,o))||k);return R>3&&k&&Object.defineProperty(c,o,k),k},g=this&&this.__param||function(a,c){return function(o,f){c(o,f,a)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;const l=u(859),m=u(97),b={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let C,p=r.LogService=class extends l.Disposable{get logLevel(){return this._logLevel}constructor(a){super(),this._optionsService=a,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),C=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(a){for(let c=0;c<a.length;c++)typeof a[c]=="function"&&(a[c]=a[c]())}_log(a,c,o){this._evalLazyOptionalParams(o),a.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...o)}trace(a,...c){var o;this._logLevel<=m.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,a,c)}debug(a,...c){var o;this._logLevel<=m.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,a,c)}info(a,...c){var o;this._logLevel<=m.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,a,c)}warn(a,...c){var o;this._logLevel<=m.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,a,c)}error(a,...c){var o;this._logLevel<=m.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,a,c)}};r.LogService=p=d([g(0,m.IOptionsService)],p),r.setTraceLogger=function(a){C=a},r.traceCall=function(a,c,o){if(typeof o.value!="function")throw new Error("not supported");const f=o.value;o.value=function(...y){if(C.logLevel!==m.LogLevelEnum.TRACE)return f.apply(this,y);C.trace(`GlyphRenderer#${f.name}(${y.map((k=>JSON.stringify(k))).join(", ")})`);const R=f.apply(this,y);return C.trace(`GlyphRenderer#${f.name} return`,R),R}}},726:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createDecorator=r.getServiceDependencies=r.serviceRegistry=void 0;const u="di$target",d="di$dependencies";r.serviceRegistry=new Map,r.getServiceDependencies=function(g){return g[d]||[]},r.createDecorator=function(g){if(r.serviceRegistry.has(g))return r.serviceRegistry.get(g);const l=function(m,b,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(p,a,c){a[u]===a?a[d].push({id:p,index:c}):(a[d]=[{id:p,index:c}],a[u]=a)})(l,m,C)};return l.toString=()=>g,r.serviceRegistry.set(g,l),l}},97:(A,r,u)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IDecorationService=r.IUnicodeService=r.IOscLinkService=r.IOptionsService=r.ILogService=r.LogLevelEnum=r.IInstantiationService=r.ICharsetService=r.ICoreService=r.ICoreMouseService=r.IBufferService=void 0;const d=u(726);var g;r.IBufferService=(0,d.createDecorator)("BufferService"),r.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),r.ICoreService=(0,d.createDecorator)("CoreService"),r.ICharsetService=(0,d.createDecorator)("CharsetService"),r.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(l){l[l.TRACE=0]="TRACE",l[l.DEBUG=1]="DEBUG",l[l.INFO=2]="INFO",l[l.WARN=3]="WARN",l[l.ERROR=4]="ERROR",l[l.OFF=5]="OFF"})(g||(r.LogLevelEnum=g={})),r.ILogService=(0,d.createDecorator)("LogService"),r.IOptionsService=(0,d.createDecorator)("OptionsService"),r.IOscLinkService=(0,d.createDecorator)("OscLinkService"),r.IUnicodeService=(0,d.createDecorator)("UnicodeService"),r.IDecorationService=(0,d.createDecorator)("DecorationService")}},S={};function M(A){var r=S[A];if(r!==void 0)return r.exports;var u=S[A]={exports:{}};return w[A].call(u.exports,u,u.exports,M),u.exports}var O={};return(()=>{var A=O;Object.defineProperty(A,"__esModule",{value:!0}),A.CanvasAddon=void 0;const r=M(345),u=M(859),d=M(776),g=M(949);class l extends u.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new r.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new r.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var b;return(b=this._renderer)==null?void 0:b.textureAtlas}activate(b){const C=b._core;if(!b.element)return void this.register(C.onWillOpen((()=>this.activate(b))));this._terminal=b;const p=C.coreService,a=C.optionsService,c=C.screenElement,o=C.linkifier,f=C,y=f._bufferService,R=f._renderService,k=f._characterJoinerService,D=f._charSizeService,E=f._coreBrowserService,L=f._decorationService,z=f._logService,H=f._themeService;(0,d.setTraceLogger)(z),this._renderer=new g.CanvasRenderer(b,c,o,y,D,a,k,p,E,L,H),this.register((0,r.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,r.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),R.setRenderer(this._renderer),R.handleResize(y.cols,y.rows),this.register((0,u.toDisposable)((()=>{var P;R.setRenderer(this._terminal._core._createRenderer()),R.handleResize(b.cols,b.rows),(P=this._renderer)==null||P.dispose(),this._renderer=void 0})))}clearTextureAtlas(){var b;(b=this._renderer)==null||b.clearTextureAtlas()}}A.CanvasAddon=l})(),O})()))})(Vu)),Vu.exports}var Cg=Jx(),Ju={exports:{}},kg;function Qx(){return kg||(kg=1,(function(s,h){(function(w,S){s.exports=S()})(self,(()=>(()=>{var w={345:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.runAndSubscribe=r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===u)return void this._listeners.splice(d,1)}}})),this._event}fire(u,d){const g=[];for(let l=0;l<this._listeners.length;l++)g.push(this._listeners[l]);for(let l=0;l<g.length;l++)g[l].call(void 0,u,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},r.forwardEvent=function(u,d){return u((g=>d.fire(g)))},r.runAndSubscribe=function(u,d){return d(void 0),u((g=>d(g)))}},859:(A,r)=>{function u(d){for(const g of d)g.dispose();d.length=0}Object.defineProperty(r,"__esModule",{value:!0}),r.getDisposeArrayDisposable=r.disposeArray=r.toDisposable=r.MutableDisposable=r.Disposable=void 0,r.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const g=this._disposables.indexOf(d);g!==-1&&this._disposables.splice(g,1)}},r.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var g;this._isDisposed||d===this._value||((g=this._value)==null||g.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},r.toDisposable=function(d){return{dispose:d}},r.disposeArray=u,r.getDisposeArrayDisposable=function(d){return{dispose:()=>u(d)}}}},S={};function M(A){var r=S[A];if(r!==void 0)return r.exports;var u=S[A]={exports:{}};return w[A](u,u.exports,M),u.exports}var O={};return(()=>{var A=O;Object.defineProperty(A,"__esModule",{value:!0}),A.SearchAddon=void 0;const r=M(345),u=M(859),d=" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?";class g extends u.Disposable{constructor(m){super(),this._highlightedLines=new Set,this._highlightDecorations=[],this._selectedDecoration=this.register(new u.MutableDisposable),this._linesCacheTimeoutId=0,this._linesCacheDisposables=new u.MutableDisposable,this._onDidChangeResults=this.register(new r.EventEmitter),this.onDidChangeResults=this._onDidChangeResults.event,this._highlightLimit=(m==null?void 0:m.highlightLimit)??1e3}activate(m){this._terminal=m,this.register(this._terminal.onWriteParsed((()=>this._updateMatches()))),this.register(this._terminal.onResize((()=>this._updateMatches()))),this.register((0,u.toDisposable)((()=>this.clearDecorations())))}_updateMatches(){var m;this._highlightTimeout&&window.clearTimeout(this._highlightTimeout),this._cachedSearchTerm&&((m=this._lastSearchOptions)!=null&&m.decorations)&&(this._highlightTimeout=setTimeout((()=>{const b=this._cachedSearchTerm;this._cachedSearchTerm=void 0,this.findPrevious(b,{...this._lastSearchOptions,incremental:!0,noScroll:!0})}),200))}clearDecorations(m){this._selectedDecoration.clear(),(0,u.disposeArray)(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear(),m||(this._cachedSearchTerm=void 0)}clearActiveDecoration(){this._selectedDecoration.clear()}findNext(m,b){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");const C=!this._lastSearchOptions||this._didOptionsChange(this._lastSearchOptions,b);this._lastSearchOptions=b,b!=null&&b.decorations&&(this._cachedSearchTerm===void 0||m!==this._cachedSearchTerm||C)&&this._highlightAllMatches(m,b);const p=this._findNextAndSelect(m,b);return this._fireResults(b),this._cachedSearchTerm=m,p}_highlightAllMatches(m,b){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");if(!m||m.length===0)return void this.clearDecorations();b=b||{},this.clearDecorations(!0);const C=[];let p,a=this._find(m,0,0,b);for(;a&&((p==null?void 0:p.row)!==a.row||(p==null?void 0:p.col)!==a.col)&&!(C.length>=this._highlightLimit);)p=a,C.push(p),a=this._find(m,p.col+p.term.length>=this._terminal.cols?p.row+1:p.row,p.col+p.term.length>=this._terminal.cols?0:p.col+1,b);for(const c of C){const o=this._createResultDecoration(c,b.decorations);o&&(this._highlightedLines.add(o.marker.line),this._highlightDecorations.push({decoration:o,match:c,dispose(){o.dispose()}}))}}_find(m,b,C,p){var o;if(!this._terminal||!m||m.length===0)return(o=this._terminal)==null||o.clearSelection(),void this.clearDecorations();if(C>this._terminal.cols)throw new Error(`Invalid col: ${C} to search in terminal of ${this._terminal.cols} cols`);let a;this._initLinesCache();const c={startRow:b,startCol:C};if(a=this._findInLine(m,c,p),!a)for(let f=b+1;f<this._terminal.buffer.active.baseY+this._terminal.rows&&(c.startRow=f,c.startCol=0,a=this._findInLine(m,c,p),!a);f++);return a}_findNextAndSelect(m,b){var f;if(!this._terminal||!m||m.length===0)return(f=this._terminal)==null||f.clearSelection(),this.clearDecorations(),!1;const C=this._terminal.getSelectionPosition();this._terminal.clearSelection();let p=0,a=0;C&&(this._cachedSearchTerm===m?(p=C.end.x,a=C.end.y):(p=C.start.x,a=C.start.y)),this._initLinesCache();const c={startRow:a,startCol:p};let o=this._findInLine(m,c,b);if(!o)for(let y=a+1;y<this._terminal.buffer.active.baseY+this._terminal.rows&&(c.startRow=y,c.startCol=0,o=this._findInLine(m,c,b),!o);y++);if(!o&&a!==0)for(let y=0;y<a&&(c.startRow=y,c.startCol=0,o=this._findInLine(m,c,b),!o);y++);return!o&&C&&(c.startRow=C.start.y,c.startCol=0,o=this._findInLine(m,c,b)),this._selectResult(o,b==null?void 0:b.decorations,b==null?void 0:b.noScroll)}findPrevious(m,b){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");const C=!this._lastSearchOptions||this._didOptionsChange(this._lastSearchOptions,b);this._lastSearchOptions=b,b!=null&&b.decorations&&(this._cachedSearchTerm===void 0||m!==this._cachedSearchTerm||C)&&this._highlightAllMatches(m,b);const p=this._findPreviousAndSelect(m,b);return this._fireResults(b),this._cachedSearchTerm=m,p}_didOptionsChange(m,b){return!!b&&(m.caseSensitive!==b.caseSensitive||m.regex!==b.regex||m.wholeWord!==b.wholeWord)}_fireResults(m){if(m!=null&&m.decorations){let b=-1;if(this._selectedDecoration.value){const C=this._selectedDecoration.value.match;for(let p=0;p<this._highlightDecorations.length;p++){const a=this._highlightDecorations[p].match;if(a.row===C.row&&a.col===C.col&&a.size===C.size){b=p;break}}}this._onDidChangeResults.fire({resultIndex:b,resultCount:this._highlightDecorations.length})}}_findPreviousAndSelect(m,b){var y;if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");if(!this._terminal||!m||m.length===0)return(y=this._terminal)==null||y.clearSelection(),this.clearDecorations(),!1;const C=this._terminal.getSelectionPosition();this._terminal.clearSelection();let p=this._terminal.buffer.active.baseY+this._terminal.rows-1,a=this._terminal.cols;const c=!0;this._initLinesCache();const o={startRow:p,startCol:a};let f;if(C&&(o.startRow=p=C.start.y,o.startCol=a=C.start.x,this._cachedSearchTerm!==m&&(f=this._findInLine(m,o,b,!1),f||(o.startRow=p=C.end.y,o.startCol=a=C.end.x))),f||(f=this._findInLine(m,o,b,c)),!f){o.startCol=Math.max(o.startCol,this._terminal.cols);for(let R=p-1;R>=0&&(o.startRow=R,f=this._findInLine(m,o,b,c),!f);R--);}if(!f&&p!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let R=this._terminal.buffer.active.baseY+this._terminal.rows-1;R>=p&&(o.startRow=R,f=this._findInLine(m,o,b,c),!f);R--);return this._selectResult(f,b==null?void 0:b.decorations,b==null?void 0:b.noScroll)}_initLinesCache(){const m=this._terminal;this._linesCache||(this._linesCache=new Array(m.buffer.active.length),this._linesCacheDisposables.value=(0,u.getDisposeArrayDisposable)([m.onLineFeed((()=>this._destroyLinesCache())),m.onCursorMove((()=>this._destroyLinesCache())),m.onResize((()=>this._destroyLinesCache()))])),window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=window.setTimeout((()=>this._destroyLinesCache()),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeoutId&&(window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=0)}_isWholeWord(m,b,C){return(m===0||d.includes(b[m-1]))&&(m+C.length===b.length||d.includes(b[m+C.length]))}_findInLine(m,b,C={},p=!1){var H;const a=this._terminal,c=b.startRow,o=b.startCol,f=a.buffer.active.getLine(c);if(f!=null&&f.isWrapped)return p?void(b.startCol+=a.cols):(b.startRow--,b.startCol+=a.cols,this._findInLine(m,b,C));let y=(H=this._linesCache)==null?void 0:H[c];y||(y=this._translateBufferLineToStringWithWrap(c,!0),this._linesCache&&(this._linesCache[c]=y));const[R,k]=y,D=this._bufferColsToStringOffset(c,o),E=C.caseSensitive?m:m.toLowerCase(),L=C.caseSensitive?R:R.toLowerCase();let z=-1;if(C.regex){const P=RegExp(E,"g");let I;if(p)for(;I=P.exec(L.slice(0,D));)z=P.lastIndex-I[0].length,m=I[0],P.lastIndex-=m.length-1;else I=P.exec(L.slice(D)),I&&I[0].length>0&&(z=D+(P.lastIndex-I[0].length),m=I[0])}else p?D-E.length>=0&&(z=L.lastIndexOf(E,D-E.length)):z=L.indexOf(E,D);if(z>=0){if(C.wholeWord&&!this._isWholeWord(z,L,m))return;let P=0;for(;P<k.length-1&&z>=k[P+1];)P++;let I=P;for(;I<k.length-1&&z+m.length>=k[I+1];)I++;const K=z-k[P],X=z+m.length-k[I],Y=this._stringLengthToBufferSize(c+P,K);return{term:m,col:Y,row:c+P,size:this._stringLengthToBufferSize(c+I,X)-Y+a.cols*(I-P)}}}_stringLengthToBufferSize(m,b){const C=this._terminal.buffer.active.getLine(m);if(!C)return 0;for(let p=0;p<b;p++){const a=C.getCell(p);if(!a)break;const c=a.getChars();c.length>1&&(b-=c.length-1);const o=C.getCell(p+1);o&&o.getWidth()===0&&b++}return b}_bufferColsToStringOffset(m,b){const C=this._terminal;let p=m,a=0,c=C.buffer.active.getLine(p);for(;b>0&&c;){for(let o=0;o<b&&o<C.cols;o++){const f=c.getCell(o);if(!f)break;f.getWidth()&&(a+=f.getCode()===0?1:f.getChars().length)}if(p++,c=C.buffer.active.getLine(p),c&&!c.isWrapped)break;b-=C.cols}return a}_translateBufferLineToStringWithWrap(m,b){var o;const C=this._terminal,p=[],a=[0];let c=C.buffer.active.getLine(m);for(;c;){const f=C.buffer.active.getLine(m+1),y=!!f&&f.isWrapped;let R=c.translateToString(!y&&b);if(y&&f){const k=c.getCell(c.length-1);k&&k.getCode()===0&&k.getWidth()===1&&((o=f.getCell(0))==null?void 0:o.getWidth())===2&&(R=R.slice(0,-1))}if(p.push(R),!y)break;a.push(a[a.length-1]+R.length),m++,c=f}return[p.join(""),a]}_selectResult(m,b,C){const p=this._terminal;if(this._selectedDecoration.clear(),!m)return p.clearSelection(),!1;if(p.select(m.col,m.row,m.size),b){const a=p.registerMarker(-p.buffer.active.baseY-p.buffer.active.cursorY+m.row);if(a){const c=p.registerDecoration({marker:a,x:m.col,width:m.size,backgroundColor:b.activeMatchBackground,layer:"top",overviewRulerOptions:{color:b.activeMatchColorOverviewRuler}});if(c){const o=[];o.push(a),o.push(c.onRender((f=>this._applyStyles(f,b.activeMatchBorder,!0)))),o.push(c.onDispose((()=>(0,u.disposeArray)(o)))),this._selectedDecoration.value={decoration:c,match:m,dispose(){c.dispose()}}}}}if(!C&&(m.row>=p.buffer.active.viewportY+p.rows||m.row<p.buffer.active.viewportY)){let a=m.row-p.buffer.active.viewportY;a-=Math.floor(p.rows/2),p.scrollLines(a)}return!0}_applyStyles(m,b,C){m.classList.contains("xterm-find-result-decoration")||(m.classList.add("xterm-find-result-decoration"),b&&(m.style.outline=`1px solid ${b}`)),C&&m.classList.add("xterm-find-active-result-decoration")}_createResultDecoration(m,b){const C=this._terminal,p=C.registerMarker(-C.buffer.active.baseY-C.buffer.active.cursorY+m.row);if(!p)return;const a=C.registerDecoration({marker:p,x:m.col,width:m.size,backgroundColor:b.matchBackground,overviewRulerOptions:this._highlightedLines.has(p.line)?void 0:{color:b.matchOverviewRuler,position:"center"}});if(a){const c=[];c.push(p),c.push(a.onRender((o=>this._applyStyles(o,b.matchBorder,!1)))),c.push(a.onDispose((()=>(0,u.disposeArray)(c))))}return a}}A.SearchAddon=g})(),O})()))})(Ju)),Ju.exports}var Zx=Qx();function eC(s){return _t(`/api/projects/${s}/sessions`)}function l_(s){return _t(`/api/sessions/${s}`)}function tC(s,h){const w=h?`?${new URLSearchParams({from:h})}`:"";return _t(`/api/sessions/${s}/diff${w}`)}function iC(s,h,w,S){const M=new URLSearchParams({path:h});return w&&M.set("from",w),S&&M.set("now",S),_t(`/api/sessions/${s}/diff/file?${M}`)}function sC(s){return _t(`/api/sessions/${s}/snapshots`)}function nC(s){return rt(`/api/sessions/${s}/snapshot`,{})}function Eg(s,h){return rt(`/api/projects/${s}/sessions`,h)}function Wk(s,h){return Di(`/api/sessions/${s}`,h)}function qk(s){return Cr(`/api/sessions/${s}`)}function rC(s,h,w){const S=h?{...h,...w!=null&&w.continueSession?{continueSession:!0}:{}}:w!=null&&w.continueSession?{continueSession:!0}:void 0;return rt(`/api/sessions/${s}/start`,S)}function aC(s){return _t(`/api/sessions/${s}/pending-prompt`)}function oC(s){return rt(`/api/sessions/${s}/submit-initial`,{})}function lC(s){return rt(`/api/sessions/${s}/skip-initial`,{})}function gh(s){return rt(`/api/sessions/${s}/stop`)}function Gk(s,h=!0){return rt(`/api/sessions/${s}/cleanup`,{delete_branch:h})}function c_(s,h,w){return rt(`/api/sessions/${s}/paste-image`,{data:h,name:w})}function cC(s){return _t(`/api/sessions/${s}/clipboard-image-path`)}function Yk(s){return _t(`/api/projects/${s}/sessions/processes`)}const uC={background:"#0c0c0c",foreground:"#cccccc",cursor:"#f2f2f2",cursorAccent:"#0c0c0c",selectionBackground:"#264f78",black:"#0c0c0c",red:"#f14c4c",green:"#16c60c",yellow:"#cca700",blue:"#3b78ff",magenta:"#b4009e",cyan:"#61d6d6",white:"#cccccc",brightBlack:"#666666",brightRed:"#f14c4c",brightGreen:"#16c60c",brightYellow:"#f9f1a5",brightBlue:"#569cd6",brightMagenta:"#b4009e",brightCyan:"#9cdcfe",brightWhite:"#f2f2f2"},ai={default:{id:"default",name:"Default",accent:"#cccccc",theme:uC},claude:{id:"claude",name:"Claude",accent:"#d97757",theme:{background:"#1a1614",foreground:"#ebe5dc",cursor:"#d97757",cursorAccent:"#1a1614",selectionBackground:"#3a2a20",black:"#1a1614",red:"#e36049",green:"#a8b545",yellow:"#d9a657",blue:"#7ea5d4",magenta:"#c688be",cyan:"#82b3a3",white:"#d6cfc4",brightBlack:"#7a6e63",brightRed:"#ed7c5e",brightGreen:"#bdc869",brightYellow:"#e8b76e",brightBlue:"#d97757",brightMagenta:"#dba5d4",brightCyan:"#9bc8b8",brightWhite:"#f5ede0"}},vercel:{id:"vercel",name:"Vercel",accent:"#ffffff",theme:{background:"#000000",foreground:"#ededed",cursor:"#ffffff",cursorAccent:"#000000",selectionBackground:"#333333",black:"#000000",red:"#ff6363",green:"#7eb38a",yellow:"#f0ce6e",blue:"#52a9ff",magenta:"#f771b9",cyan:"#79ffe1",white:"#a1a1a1",brightBlack:"#666666",brightRed:"#ff8888",brightGreen:"#a3d4ad",brightYellow:"#ffe27a",brightBlue:"#79c8ff",brightMagenta:"#ff97cf",brightCyan:"#79ffe1",brightWhite:"#ffffff"}},supabase:{id:"supabase",name:"Supabase",accent:"#3ecf8e",theme:{background:"#1c1c1c",foreground:"#ededed",cursor:"#3ecf8e",cursorAccent:"#1c1c1c",selectionBackground:"#1f4738",black:"#1c1c1c",red:"#ed7777",green:"#3ecf8e",yellow:"#e0c367",blue:"#5a9bf2",magenta:"#bd80de",cyan:"#8edbe1",white:"#cfcfcf",brightBlack:"#525252",brightRed:"#f49191",brightGreen:"#65e0a3",brightYellow:"#f0d480",brightBlue:"#82b6f7",brightMagenta:"#d2a3e8",brightCyan:"#a8e8ed",brightWhite:"#ffffff"}},stripe:{id:"stripe",name:"Stripe",accent:"#635bff",theme:{background:"#0a2540",foreground:"#f6f9fc",cursor:"#635bff",cursorAccent:"#0a2540",selectionBackground:"#2c3e60",black:"#0a2540",red:"#ff5c8a",green:"#5ad6a4",yellow:"#f9c46b",blue:"#7a73ff",magenta:"#a87dff",cyan:"#5fbed9",white:"#cfd7e3",brightBlack:"#425466",brightRed:"#ff7ca6",brightGreen:"#7ee0b6",brightYellow:"#ffd58a",brightBlue:"#9b94ff",brightMagenta:"#c5a4ff",brightCyan:"#88d3e8",brightWhite:"#ffffff"}},spotify:{id:"spotify",name:"Spotify",accent:"#1db954",theme:{background:"#121212",foreground:"#ffffff",cursor:"#1db954",cursorAccent:"#121212",selectionBackground:"#1d4d2e",black:"#121212",red:"#e07a7a",green:"#1db954",yellow:"#d4b35a",blue:"#5099d6",magenta:"#b58fd0",cyan:"#7dccd9",white:"#b3b3b3",brightBlack:"#535353",brightRed:"#f08e8e",brightGreen:"#1ed760",brightYellow:"#e8c977",brightBlue:"#74b1e3",brightMagenta:"#caaae0",brightCyan:"#9adde6",brightWhite:"#ffffff"}},ferrari:{id:"ferrari",name:"Ferrari",accent:"#ff2800",theme:{background:"#0d0d0d",foreground:"#f5f5f5",cursor:"#ff2800",cursorAccent:"#0d0d0d",selectionBackground:"#4a1410",black:"#0d0d0d",red:"#ff2800",green:"#a5b65f",yellow:"#e0c14a",blue:"#4d8fc9",magenta:"#c772a8",cyan:"#6cbac7",white:"#cfcfcf",brightBlack:"#5e5e5e",brightRed:"#ff5a3d",brightGreen:"#bdcc7d",brightYellow:"#f0d56b",brightBlue:"#6ea8db",brightMagenta:"#dc92be",brightCyan:"#8ad0db",brightWhite:"#ffffff"}},nvidia:{id:"nvidia",name:"NVIDIA",accent:"#76b900",theme:{background:"#000000",foreground:"#ffffff",cursor:"#76b900",cursorAccent:"#000000",selectionBackground:"#2d3d10",black:"#000000",red:"#e26060",green:"#76b900",yellow:"#d4b03e",blue:"#5097cc",magenta:"#b87aac",cyan:"#6ec3c5",white:"#bdbdbd",brightBlack:"#4a4a4a",brightRed:"#f08080",brightGreen:"#94d624",brightYellow:"#e6c861",brightBlue:"#6fb0e0",brightMagenta:"#d29ac8",brightCyan:"#90dde0",brightWhite:"#ffffff"}},apple:{id:"apple",name:"Apple",accent:"#0071e3",light:!0,theme:{background:"#ffffff",foreground:"#1d1d1f",cursor:"#0071e3",cursorAccent:"#ffffff",selectionBackground:"#b3d7ff",black:"#1d1d1f",red:"#d70015",green:"#248a3d",yellow:"#9a6b00",blue:"#0071e3",magenta:"#8944ab",cyan:"#008575",white:"#86868b",brightBlack:"#6e6e73",brightRed:"#ff3b30",brightGreen:"#2fa04c",brightYellow:"#bf8700",brightBlue:"#2b8fff",brightMagenta:"#af52de",brightCyan:"#00a3b4",brightWhite:"#f5f5f7"}},notion:{id:"notion",name:"Notion",accent:"#eb5757",light:!0,theme:{background:"#f7f6f3",foreground:"#37352f",cursor:"#37352f",cursorAccent:"#f7f6f3",selectionBackground:"#d3e5ef",black:"#37352f",red:"#d44c47",green:"#448361",yellow:"#cb912f",blue:"#337ea9",magenta:"#9065b0",cyan:"#0f7b6c",white:"#9b9a97",brightBlack:"#787774",brightRed:"#eb5757",brightGreen:"#4f9768",brightYellow:"#d9730d",brightBlue:"#4a94bf",brightMagenta:"#a97cc9",brightCyan:"#339588",brightWhite:"#ffffff"}},starbucks:{id:"starbucks",name:"Starbucks",accent:"#00754a",light:!0,theme:{background:"#f2f0eb",foreground:"#1e3932",cursor:"#00754a",cursorAccent:"#f2f0eb",selectionBackground:"#d4e9e2",black:"#1e3932",red:"#b3423a",green:"#00754a",yellow:"#a1721c",blue:"#3a6c8c",magenta:"#7d4a78",cyan:"#1f7a70",white:"#8a857c",brightBlack:"#5c5a54",brightRed:"#d05b4c",brightGreen:"#008248",brightYellow:"#bf8b2e",brightBlue:"#4d86a8",brightMagenta:"#9a6394",brightCyan:"#349b8f",brightWhite:"#fbf9f4"}}},Lg=["default","claude","vercel","supabase","stripe","spotify","ferrari","nvidia","apple","notion","starbucks"],u_="default";function Rg(s){return ai[s]??ai.default}let Qu=!1;function h_(s){var r,u;const h=window.electronAPI;if(!(h!=null&&h.imeReset)||Qu)return!1;Qu=!0;let w=!1;const S=()=>{w=!0,Qu=!1,window.clearTimeout(O),window.removeEventListener("focus",A)},M=()=>{if(!w)try{s()}finally{S()}},O=window.setTimeout(M,1e3),A=()=>{requestAnimationFrame(()=>{requestAnimationFrame(M)})};return window.addEventListener("focus",A),(u=(r=document.activeElement)==null?void 0:r.blur)==null||u.call(r),h.imeReset(!0),!0}const Zu=(s,h)=>{var w,S;try{(S=(w=window.electronAPI)==null?void 0:w.imeLog)==null||S.call(w,{reason:s,path:window.location.pathname,...h})}catch{}},Zo=s=>{const h=s instanceof HTMLElement?s:null;if(!h)return null;const w=typeof h.className=="string"?h.className.slice(0,60):"";return`${h.tagName}${h.id?`#${h.id}`:""}${w?`.${w}`:""}`};if(typeof document<"u"){document.addEventListener("keydown",s=>{const h=s.target instanceof HTMLElement?s.target:null;h!=null&&h.closest("[data-term-container]")||Zu("keydown:outside",{key:s.key,target:Zo(h),active:Zo(document.activeElement)})},!0),document.addEventListener("focusin",s=>{Zu("focusin",{target:Zo(s.target)})},!0);for(const s of["compositionstart","compositionend"])document.addEventListener(s,h=>{const w=h.target instanceof HTMLElement?h.target:null;w!=null&&w.closest("[data-term-container]")||Zu(`${s}:outside`,{target:Zo(w),data:h.data??""})},!0)}const el=ai.default.theme,eh={decorations:{matchBackground:"#5a4a00",matchBorder:"#cca700",matchOverviewRuler:"#cca700",activeMatchBackground:"#cca700",activeMatchBorder:"#f2f2f2",activeMatchColorOverviewRuler:"#f2f2f2"}};function Dg(s){const h=/^#([0-9a-f]{6})$/i.exec(s.background??"");if(!h)return 1;const w=parseInt(h[1],16);return .299*(w>>16)+.587*(w>>8&255)+.114*(w&255)>128?4.5:1}function d_(s){return s.includes(`
|
|
417
|
-
`)?`\x1B[200~${s}\x1B[201~`:s}function hC(s){const h=s.filter(Boolean).map(w=>/\s/.test(w)?`"${w}"`:w);return h.length?h.join(" ")+" ":""}function dC(s){return s>=1024*1024?`${(s/(1024*1024)).toFixed(1)} MB`:`${Math.max(1,Math.round(s/1024))} KB`}function fC({sessionId:s,isRunning:h,subscribed:w,onFitted:S,sendMessage:M,subscribeBinary:O,onEvent:A,height:r="100%",fontSize:u=jh,theme:d,inputBlocked:g=!1,autoFocusOnMount:l=!1,onRequestRefresh:m,disableImagePaste:b=!1,onCycleTab:C,onSelectTab:p,onToggleDiff:a}){const c=j.useRef(d);c.current=d;const o=j.useRef(g);o.current=g;const f=j.useRef(b);f.current=b;const y=j.useRef(C);y.current=C;const R=j.useRef(p);R.current=p;const k=j.useRef(a);k.current=a;const D=j.useRef(m);D.current=m;const E=j.useRef(null),L=j.useRef(null),z=j.useRef(null),H=j.useRef(null),P=j.useRef({cols:0,rows:0}),I=j.useRef(null),K=j.useRef(null),X=j.useRef(!1),Y=j.useRef(S);Y.current=S;const $=j.useRef(null),[U,T]=j.useState(!0),[F,B]=j.useState(""),W=j.useRef(B);W.current=B;const[ee,ne]=j.useState(null),pe=j.useRef(null),ke=j.useRef(null),[Q,G]=j.useState(!1),[he,ae]=j.useState(""),[Ae,Oe]=j.useState({index:-1,count:0}),Ye=j.useRef(Oe);Ye.current=Oe;const $e=j.useRef(!1),at=()=>{var ze;const ce=((ze=L.current)==null?void 0:ze.getSelection())??"";ce&&!ce.includes(`
|
|
418
|
-
`)&&ae(ce),$e.current=!0,G(!0)},ye=j.useRef(at);ye.current=at;const Te=()=>{var ce,ze;$e.current=!1,G(!1),(ce=pe.current)==null||ce.clearDecorations(),Oe({index:-1,count:0});try{(ze=L.current)==null||ze.focus()}catch{}},ut=j.useRef(Te);ut.current=Te;const tt=j.useRef(0),He=(ce,ze,je)=>{const le=++tt.current,ie=Date.now();ne({dataUrl:ce,bytes:ze});const _e=()=>{const ue=Math.max(0,600-(Date.now()-ie));setTimeout(()=>{tt.current===le&&ne(null)},ue)};je.then(_e,_e)},We=j.useRef(He);We.current=He;const{warning:Fe}=cn(),Be=j.useRef(Fe);Be.current=Fe;const[Ue,ct]=j.useState(null),it=j.useRef(()=>{});j.useEffect(()=>{if(!Ue)return;const ce=()=>ct(null),ze=je=>{je.key==="Escape"&&ce()};return window.addEventListener("keydown",ze,!0),window.addEventListener("resize",ce),window.addEventListener("scroll",ce,!0),()=>{window.removeEventListener("keydown",ze,!0),window.removeEventListener("resize",ce),window.removeEventListener("scroll",ce,!0)}},[Ue]),j.useEffect(()=>{var st;const ce=E.current;if(!ce)return;const ze=be=>{const nt=be.type;o.current&&nt==="session:terminal-input"||M(be)},je=new Kx.Terminal({fontFamily:vt,fontSize:u,lineHeight:1,cursorBlink:h,convertEol:!1,scrollback:5e3,theme:c.current??el,minimumContrastRatio:Dg(c.current??el),allowProposedApi:!0,macOptionIsMeta:!0}),le=/Mac|iPhone|iPad|iPod/.test(navigator.platform);let ie=0;const _e=async()=>{var nt;if(o.current){console.debug("[paste] inputBlocked → ignored");return}if(!window.isSecureContext)return;if(ie=Date.now(),!f.current)try{const dt=await navigator.clipboard.read();for(const Wt of dt){const oi=Wt.types.find(Lt=>Lt.startsWith("image/"));if(oi){const Lt=await Wt.getType(oi),Gt=new FileReader;Gt.onload=()=>{const Kt=Gt.result;console.debug("[paste] image via clipboard.read(), bytes=",Lt.size);const bi=c_(s,Kt);bi.catch(pi=>console.warn("[paste] pasteImage failed:",pi)),We.current(Kt,Lt.size,bi)},Gt.readAsDataURL(Lt);return}}}catch(dt){console.debug("[paste] clipboard.read() rejected, falling through:",dt)}let be=null;try{be=await navigator.clipboard.readText()}catch(dt){console.warn("[paste] clipboard.readText() failed:",dt)}if(be){const dt=be.includes(`
|
|
419
|
-
`);console.debug("[paste] sending text, len=",be.length,"multiline=",dt),ze({type:"session:terminal-input",sessionId:s,input:d_(be)});return}try{const dt=await cC(s);if(dt.path){console.debug("[paste] empty browser clipboard, using OS file path:",dt.path),ze({type:"session:terminal-input",sessionId:s,input:dt.path});return}}catch(dt){console.debug("[paste] getClipboardImagePath failed:",dt)}console.warn("[paste] no content available (text empty, no image, no file path)"),(nt=Be.current)==null||nt.call(Be,"붙여넣을 내용을 클립보드에서 읽지 못했습니다. 우클릭 → 붙여넣기를 사용하세요.")};je.attachCustomKeyEventHandler(be=>{var Gt;if(be.type!=="keydown")return!0;const nt=le?be.metaKey:be.ctrlKey,dt=le?be.ctrlKey:be.metaKey,Wt=nt&&!dt&&!be.altKey&&!be.shiftKey,oi=nt&&!dt&&!be.altKey&&be.shiftKey,Lt=be.key.toLowerCase();if(Lt==="tab"&&(Wt||oi)&&y.current)return be.preventDefault(),y.current(oi?"prev":"next"),!1;if(Wt&&/^[1-9]$/.test(Lt)&&R.current)return be.preventDefault(),R.current(Number(Lt)-1),!1;if(Lt==="f"&&Wt)return be.preventDefault(),ye.current(),!1;if(Lt==="t"&&Wt||Lt==="r"&&oi||Lt==="f5"&&!be.ctrlKey&&!be.metaKey&&!be.altKey&&!be.shiftKey)return be.preventDefault(),!1;if(Lt==="d"&&oi&&k.current)return be.preventDefault(),k.current(),!1;if(oi&&(["a","p","o","m","x","z"].includes(Lt)||Lt.startsWith("arrow")))return be.preventDefault(),!1;if(Wt&&Lt==="c"){const Kt=je.getSelection();return Kt?(be.preventDefault(),(Gt=navigator.clipboard)==null||Gt.writeText(Kt).catch(()=>{}),je.clearSelection(),!1):!le}if(Wt&&Lt==="v"||be.altKey&&!be.ctrlKey&&!be.metaKey&&!be.shiftKey&&Lt==="v")return be.preventDefault(),_e(),!1;if((be.ctrlKey||be.metaKey)&&!be.altKey){if(be.key==="+"||be.key==="=")return be.preventDefault(),_a(s,1),!1;if(be.key==="-"||be.key==="_")return be.preventDefault(),_a(s,-1),!1}return!0});const ue=new Vx.FitAddon;je.loadAddon(ue),je.open(ce),L.current=je,z.current=ue;const Pe=new Zx.SearchAddon;je.loadAddon(Pe),pe.current=Pe;const Me=Pe.onDidChangeResults(({resultIndex:be,resultCount:nt})=>{Ye.current({index:be,count:nt})}),J=()=>{$e.current&&ut.current()};ce.addEventListener("focusin",J),je.attachCustomWheelEventHandler(be=>!be.ctrlKey&&!be.metaKey?!0:(be.preventDefault(),be.__zoomHandled=!0,be.deltaY!==0&&_a(s,be.deltaY<0?1:-1),!1));const Z=be=>{if(be.ctrlKey||be.metaKey){if(be.preventDefault(),be.stopPropagation(),be.deltaY===0||be.__zoomHandled)return;_a(s,be.deltaY<0?1:-1);return}be.stopPropagation()};ce.addEventListener("wheel",Z,{passive:!1});const te=window.electronAPI,V=(st=te==null?void 0:te.onTerminalZoom)==null?void 0:st.call(te,be=>{var dt;const nt=ce.matches(":hover");(dt=te.imeLog)==null||dt.call(te,{reason:"zoom:recv",dir:be,hovered:nt,path:window.location.pathname}),nt&&_a(s,be==="in"?1:-1)});it.current=()=>{_e()};const xe=be=>{be.preventDefault(),ct({x:be.clientX,y:be.clientY,hasSelection:je.hasSelection()})};ce.addEventListener("contextmenu",xe);try{ue.fit()}catch{}if(l){const be=document.activeElement;if(!(!!be&&(be.tagName==="INPUT"||be.tagName==="TEXTAREA"||be.tagName==="SELECT"||be.isContentEditable))&&(be===null||be===document.body))try{je.focus()}catch{}}const me=()=>{const be=je.cols,nt=je.rows;be===P.current.cols&&nt===P.current.rows||(P.current={cols:be,rows:nt},M({type:"session:resize",sessionId:s,cols:be,rows:nt}))};$.current=me;const ve=O(s,be=>{try{je.write(be)}catch{}}),Se=A(be=>{be.type==="session:replay-end"&&be.sessionId===s&&T(!1)}),Ne=()=>Date.now()-ie<300,qe=()=>f.current,Xe=be=>W.current(be),Qe=(be,nt,dt)=>We.current(be,nt,dt),Je=pC()?wC({container:ce,term:je,sessionId:s,sendMessage:ze}):yC({container:ce,term:je,sessionId:s,sendMessage:ze,isPasteAlreadyHandled:Ne,isImagePasteDisabled:qe,onComposingChange:Xe,onImagePasted:Qe}),bt=100;let Et=null,ht=0,$t=!1;const Ot={cols:je.cols,rows:je.rows},ot=new ResizeObserver(()=>{if(Et!==null)return;const be=Math.max(0,bt-(performance.now()-ht));Et=setTimeout(()=>{Et=null,requestAnimationFrame(()=>{var dt;ht=performance.now();const nt=ce.getBoundingClientRect();if(!(nt.width===0||nt.height===0)){try{ue.fit(),(je.cols!==Ot.cols||je.rows!==Ot.rows)&&(Ot.cols=je.cols,Ot.rows=je.rows,je.refresh(0,je.rows-1))}catch{}!$t&&je.cols>=20&&je.rows>=5&&($t=!0,(dt=Y.current)==null||dt.call(Y,je.cols,je.rows)),I.current&&clearTimeout(I.current),I.current=setTimeout(me,150)}})},be)});return ot.observe(ce),()=>{var be;ot.disconnect(),Et!==null&&clearTimeout(Et),I.current&&clearTimeout(I.current),K.current&&clearTimeout(K.current),ce.removeEventListener("wheel",Z),V==null||V(),ce.removeEventListener("contextmenu",xe),ct(null),Je(),ve(),Se();try{M({type:"session:unsubscribe",sessionId:s})}catch{}ce.removeEventListener("focusin",J),Me.dispose(),pe.current=null,(be=H.current)==null||be.dispose(),H.current=null,je.dispose(),L.current=null,z.current=null,$.current=null,X.current=!1}},[s]),j.useEffect(()=>{const ce=L.current;if(ce){if(l&&!H.current)try{const ze=new Cg.CanvasAddon;ce.loadAddon(ze),H.current=ze}catch{H.current=null}else if(!l&&H.current){try{H.current.dispose()}catch{}H.current=null}}},[l,s]),j.useEffect(()=>{if(!w||X.current)return;X.current=!0;const ce=L.current;ce&&ce.cols>0&&ce.rows>0&&(P.current={cols:0,rows:0},M({type:"session:resize",sessionId:s,cols:ce.cols,rows:ce.rows})),M({type:"session:subscribe",sessionId:s})},[w,s,M]),j.useEffect(()=>{L.current&&(L.current.options.cursorBlink=h)},[h]),j.useEffect(()=>{var le;if(!l)return;const ce=document.activeElement;if(!(!(!!ce&&ce.classList.contains("xterm-helper-textarea"))&&!!ce&&(ce.tagName==="INPUT"||ce.tagName==="TEXTAREA"||ce.tagName==="SELECT"||ce.isContentEditable)))try{(le=L.current)==null||le.focus()}catch{}},[l]),j.useEffect(()=>{const ce=L.current,ze=z.current;if(!ce||!ze||ce.options.fontSize===u)return;if(ce.options.fontSize=u,H.current){try{H.current.dispose()}catch{}H.current=null;try{const le=new Cg.CanvasAddon;ce.loadAddon(le),H.current=le}catch{}}if(ce.buffer.active.type==="alternate"){K.current&&clearTimeout(K.current),K.current=setTimeout(()=>{var le;(le=D.current)==null||le.call(D)},500);return}try{ze.fit(),ce.refresh(0,ce.rows-1)}catch{}ce.cols===P.current.cols&&ce.rows===P.current.rows||(K.current&&clearTimeout(K.current),K.current=setTimeout(()=>{var le;(le=$.current)==null||le.call($)},300))},[u,s]),j.useEffect(()=>{const ce=L.current;if(ce){ce.options.theme=d??el,ce.options.minimumContrastRatio=Dg(d??el);try{ce.refresh(0,ce.rows-1)}catch{}}},[d]),j.useEffect(()=>{if(!Q)return;const ce=pe.current;if(!ce)return;const ze=setTimeout(()=>{he?ce.findNext(he,{...eh,incremental:!0}):(ce.clearDecorations(),Oe({index:-1,count:0}))},120);return()=>clearTimeout(ze)},[he,Q]),j.useEffect(()=>{var ce;Q&&((ce=ke.current)==null||ce.select())},[Q]);const St=(d==null?void 0:d.background)??Ee.bg,Ce=()=>{var ce;he&&((ce=pe.current)==null||ce.findNext(he,eh))},Ie=()=>{var ce;he&&((ce=pe.current)==null||ce.findPrevious(he,eh))};return v.jsxs("div",{style:{position:"relative",background:St,padding:12,height:r,width:"100%",boxSizing:"border-box",overflow:"hidden"},children:[U&&w&&v.jsx("div",{style:{position:"absolute",top:8,right:12,fontFamily:vt,fontSize:11,color:Ee.dim,zIndex:1,pointerEvents:"none"},children:"loading history…"}),v.jsx("div",{ref:E,"data-term-container":!0,style:{height:"100%",width:"100%"}}),Q&&v.jsxs("div",{style:{position:"absolute",top:8,right:12,zIndex:5,display:"flex",alignItems:"center",gap:6,padding:"4px 6px",background:"rgba(0,0,0,0.85)",border:`1px solid ${Ee.separator}`,borderRadius:6,fontFamily:vt,fontSize:12,boxShadow:"0 4px 16px rgba(0,0,0,0.5)"},children:[v.jsx("input",{ref:ke,value:he,onChange:ce=>ae(ce.target.value),onKeyDown:ce=>{ce.key==="Enter"?(ce.preventDefault(),ce.shiftKey?Ie():Ce()):ce.key==="Escape"&&(ce.preventDefault(),Te())},placeholder:"검색",spellCheck:!1,style:{width:160,background:"transparent",border:"none",outline:"none",color:Ee.bright,fontFamily:vt,fontSize:12}}),v.jsx("span",{style:{color:Ee.dim,minWidth:44,textAlign:"right",fontVariantNumeric:"tabular-nums"},children:he?Ae.count>0?`${Ae.index+1}/${Ae.count}`:"0/0":""}),[{label:"↑",title:"이전 (Shift+Enter)",onClick:Ie},{label:"↓",title:"다음 (Enter)",onClick:Ce},{label:"×",title:"닫기 (Esc)",onClick:Te}].map(ce=>v.jsx("button",{type:"button",title:ce.title,onClick:ce.onClick,className:"px-1.5 rounded-md hover:bg-white/10",style:{color:Ee.bright,lineHeight:"18px"},children:ce.label},ce.label))]}),(F||ee)&&v.jsxs("div",{style:{position:"absolute",right:12,bottom:12,maxWidth:"calc(100% - 24px)",display:"flex",flexDirection:"column",alignItems:"flex-end",gap:6,zIndex:2,pointerEvents:"none"},children:[ee&&v.jsxs("div",{style:{padding:4,background:"rgba(0,0,0,0.72)",border:`1px solid ${Ee.separator}`,borderRadius:4,maxWidth:"100%"},children:[v.jsx("img",{src:ee.dataUrl,alt:"",style:{display:"block",maxWidth:220,maxHeight:140,borderRadius:2}}),v.jsxs("div",{style:{fontFamily:vt,fontSize:11,color:Ee.dim,marginTop:3},children:["이미지 붙여넣음 · ",dC(ee.bytes)]})]}),F&&v.jsx("div",{style:{maxWidth:"100%",padding:"3px 8px",background:"rgba(0,0,0,0.72)",border:`1px solid ${Ee.separator}`,borderRadius:4,fontFamily:vt,fontSize:Math.max(12,u),color:Ee.bright,lineHeight:1.3,whiteSpace:"pre",overflow:"hidden",textOverflow:"ellipsis"},children:F})]}),Ue&&zi.createPortal((()=>{const je=Math.max(8,Math.min(Ue.x,window.innerWidth-184-8)),le=Math.max(8,Math.min(Ue.y,window.innerHeight-116-8)),ie=()=>ct(null),_e=()=>{var J,Z;const Me=((J=L.current)==null?void 0:J.getSelection())??"";Me&&((Z=navigator.clipboard)==null||Z.writeText(Me).catch(()=>{})),ie()},ue=()=>{it.current(),ie()},Pe=()=>{var Me;(Me=L.current)==null||Me.selectAll(),ie()};return v.jsxs(v.Fragment,{children:[v.jsx("div",{style:{position:"fixed",inset:0,zIndex:2147483646},onMouseDown:ie,onContextMenu:Me=>{Me.preventDefault(),ie()}}),v.jsxs("div",{role:"menu",style:{position:"fixed",left:je,top:le,zIndex:2147483647,minWidth:168,background:Ee.bg,border:`1px solid ${Ee.separator}`,borderRadius:6,padding:4,fontFamily:vt,fontSize:13,boxShadow:"0 8px 24px rgba(0,0,0,0.5)"},children:[v.jsx("button",{type:"button",disabled:!Ue.hasSelection,onClick:_e,className:"w-full text-left px-3 py-1.5 rounded-md hover:bg-white/10 disabled:opacity-40 disabled:cursor-not-allowed",style:{color:Ee.bright},children:"복사"}),v.jsx("button",{type:"button",onClick:ue,className:"w-full text-left px-3 py-1.5 rounded-md hover:bg-white/10",style:{color:Ee.bright},children:"붙여넣기"}),v.jsx("button",{type:"button",onClick:Pe,className:"w-full text-left px-3 py-1.5 rounded-md hover:bg-white/10",style:{color:Ee.bright},children:"전체 선택"})]})]})})(),document.body)]})}function pC(){if(typeof navigator>"u")return!1;const s=navigator.userAgent;return/iPad|iPhone|iPod/.test(s)||/Mac/.test(s)&&navigator.maxTouchPoints>1||/Android/i.test(s)}const dl=[12593,12594,12596,12599,12600,12601,12609,12610,12611,12613,12614,12615,12616,12617,12618,12619,12620,12621,12622],f_=[12623,12624,12625,12626,12627,12628,12629,12630,12631,12632,12633,12634,12635,12636,12637,12638,12639,12640,12641,12642,12643],Tg=[0,12593,12594,12595,12596,12597,12598,12599,12601,12602,12603,12604,12605,12606,12607,12608,12609,12610,12612,12613,12614,12615,12616,12618,12619,12620,12621,12622];function p_(s){return s>=12593&&s<=12622}function m_(s){return s>=12623&&s<=12643}function mC(s){return p_(s)||m_(s)}function gC(s){return s>=44032&&s<=55203}function vC(){return{cho:-1,jung:-1,jong:0}}function Ih(s){return s.cho<0&&s.jung<0&&s.jong===0}function Ts(s){return Ih(s)?"":s.cho>=0&&s.jung>=0?String.fromCharCode(44032+(s.cho*21+s.jung)*28+s.jong):s.cho>=0?String.fromCharCode(dl[s.cho]):s.jung>=0?String.fromCharCode(f_[s.jung]):""}function Mg(s){const h=Ts(s);return s.cho=-1,s.jung=-1,s.jong=0,h}function _C(s,h){if(m_(h)){const w=f_.indexOf(h);if(w<0)return"";if(s.cho<0&&s.jung<0||s.cho>=0&&s.jung<0)return s.jung=w,"";if(s.cho<0&&s.jung>=0){const A=Ts(s);return s.jung=w,A}if(s.jong===0){const A=Ts(s);return s.cho=-1,s.jung=w,s.jong=0,A}const S=Tg[s.jong],M=dl.indexOf(S);s.jong=0;const O=Ts(s);return M>=0?(s.cho=M,s.jung=w,s.jong=0):(s.cho=-1,s.jung=w,s.jong=0),O}if(p_(h)){const w=dl.indexOf(h),S=Tg.indexOf(h);if(s.cho<0&&s.jung<0)return w>=0?(s.cho=w,""):String.fromCharCode(h);if(s.cho>=0&&s.jung<0){const O=String.fromCharCode(dl[s.cho]);return w>=0?(s.cho=w,O):(s.cho=-1,O+String.fromCharCode(h))}if(s.cho<0&&s.jung>=0){const O=Ts(s);return s.jung=-1,w>=0?(s.cho=w,O):O+String.fromCharCode(h)}if(s.jong===0){if(S>0)return s.jong=S,"";const O=Ts(s);return s.cho=w>=0?w:-1,s.jung=-1,s.jong=0,O}const M=Ts(s);return s.cho=w>=0?w:-1,s.jung=-1,s.jong=0,w<0?M+String.fromCharCode(h):M}return""}function bC(s,h){const w=Ts(s),S=h-44032;return s.cho=Math.floor(S/588),s.jung=Math.floor(S/28)%21,s.jong=S%28,w}function Ag(s){return Ih(s)?!1:(s.cho=-1,s.jung=-1,s.jong=0,!0)}function yC({container:s,term:h,sessionId:w,sendMessage:S,isPasteAlreadyHandled:M,isImagePasteDisabled:O,onComposingChange:A,onImagePasted:r}){let u=!1;const d=L=>{try{A==null||A(L)}catch{}};let g=null;const l=(L,z={})=>{var H,P;try{(P=(H=window.electronAPI)==null?void 0:H.imeLog)==null||P.call(H,{reason:L,path:window.location.pathname,...z})}catch{}},m=(L=!1)=>{try{const z=s.querySelector(".xterm-helper-textarea"),H=s.querySelector(".xterm-screen");if(!z||!H){L||l("pos:no-dom",{hasHelper:!!z,hasScreen:!!H});return}const P=h.cols,I=h.rows;if(P<=0||I<=0){L||l("pos:no-grid",{cols:P,rows:I});return}const K=H.getBoundingClientRect();if(K.width===0||K.height===0){L||l("pos:zero-screen",{w:K.width,h:K.height});return}const X=K.width/P,Y=K.height/I,$=h.buffer.active,U=Math.min($.cursorX,P-1),T=Math.max(0,Math.min($.cursorY,I-1));z.style.left=`${U*X}px`,z.style.top=`${T*Y}px`,z.style.width=`${Math.max(X,1)}px`,z.style.height=`${Math.max(Y,1)}px`,L||l("pos:applied",{cursorX:U,cursorY:T,left:U*X,top:T*Y})}catch{}};m();let b=0;const C=()=>{b||(b=requestAnimationFrame(()=>{b=0,m(!0)}))},p=h.onCursorMove(C),a=()=>{var L;u=!0,m(),d("");try{const z=document.activeElement,H=s.querySelector(".xterm-helper-textarea"),P=H==null?void 0:H.getBoundingClientRect();l("compositionstart",{activeTag:z==null?void 0:z.tagName,activeClass:z==null?void 0:z.className,activeIsHelper:!!z&&((L=z.classList)==null?void 0:L.contains("xterm-helper-textarea")),helperStyleLeft:H==null?void 0:H.style.left,helperStyleTop:H==null?void 0:H.style.top,helperRectLeft:P==null?void 0:P.left,helperRectTop:P==null?void 0:P.top,visibility:document.visibilityState,hasFocus:document.hasFocus(),cols:h.cols,rows:h.rows})}catch{}},c=L=>{d(L.data??""),l("compositionupdate",{data:L.data??""})},o=L=>{u=!1,d("");const z=L.data;l("compositionend",{data:z??"",sent:!!z}),z&&(g=z,S({type:"session:terminal-input",sessionId:w,input:z}))},f=L=>{var P,I;if(M()){L.preventDefault();return}const z=(P=L.clipboardData)==null?void 0:P.items;if(z&&!(O!=null&&O())){for(let K=0;K<z.length;K++)if(z[K].type.startsWith("image/")){L.preventDefault();const X=z[K].getAsFile();if(!X)return;const Y=new FileReader;Y.onload=()=>{const $=Y.result;console.debug("[paste-fallback] image via paste event, bytes=",X.size);const U=c_(w,$,X.name);U.catch(T=>console.warn("[paste-fallback] pasteImage failed:",T)),r==null||r($,X.size,U)},Y.readAsDataURL(X);return}}const H=(I=L.clipboardData)==null?void 0:I.getData("text/plain");if(H){L.preventDefault();const K=H.includes(`
|
|
420
|
-
`);console.debug("[paste-fallback] sending text, len=",H.length,"multiline=",K),S({type:"session:terminal-input",sessionId:w,input:d_(H)})}else console.debug("[paste-fallback] paste event had no usable text/image")},y=L=>{var K,X;const z=(K=L.dataTransfer)==null?void 0:K.files;if(!z||z.length===0)return;L.preventDefault();const H=(X=window.electronAPI)==null?void 0:X.getDroppedFilePath;if(!H)return;const P=[];for(let Y=0;Y<z.length;Y++){const $=H(z[Y]);$&&P.push($)}const I=hC(P);I&&S({type:"session:terminal-input",sessionId:w,input:I})},R=L=>{var z,H;(H=(z=L.dataTransfer)==null?void 0:z.types)!=null&&H.includes("Files")&&(L.preventDefault(),L.dataTransfer.dropEffect="copy")},k=()=>{if(u)return;h_(()=>{try{h.focus()}catch{}})&&l("focus-rescue")},D=L=>{var z,H;l("keydown",{key:L.key,composing:u,activeIsHelper:!!((H=(z=document.activeElement)==null?void 0:z.classList)!=null&&H.contains("xterm-helper-textarea")),hasFocus:document.hasFocus()}),document.hasFocus()||k()};s.addEventListener("keydown",D,!0),s.addEventListener("compositionstart",a,!0),s.addEventListener("compositionupdate",c,!0),s.addEventListener("compositionend",o,!0),s.addEventListener("paste",f,!0),s.addEventListener("dragover",R),s.addEventListener("drop",y);const E=h.onData(L=>{if(!u){if(g!==null&&L===g){g=null;return}g=null,S({type:"session:terminal-input",sessionId:w,input:L})}});return()=>{E.dispose(),p.dispose(),b&&cancelAnimationFrame(b),s.removeEventListener("keydown",D,!0),s.removeEventListener("compositionstart",a,!0),s.removeEventListener("compositionupdate",c,!0),s.removeEventListener("compositionend",o,!0),s.removeEventListener("paste",f,!0),s.removeEventListener("dragover",R),s.removeEventListener("drop",y),d("")}}function wC({container:s,term:h,sessionId:w,sendMessage:S}){const M=s.querySelector(".xterm-helper-textarea");let O="",A=0;M&&(O=M.style.display,A=M.tabIndex,M.style.display="none",M.tabIndex=-1),getComputedStyle(s).position==="static"&&(s.style.position="relative");const r=document.createElement("textarea");r.setAttribute("autocomplete","off"),r.setAttribute("lang","ko"),r.setAttribute("inputmode","text"),r.rows=1,Object.assign(r.style,{position:"absolute",background:"transparent",border:"none",outline:"none",padding:"0",margin:"0",fontFamily:vt,fontSize:"16px",lineHeight:"1.2",resize:"none",overflow:"hidden",whiteSpace:"pre",caretColor:"rgba(255,255,255,0.001)",zIndex:"5"});const u=()=>{Object.assign(r.style,{inset:"0",left:"auto",top:"auto",width:"100%",height:"100%",color:"transparent"})},d=()=>{const k=s.querySelector(".xterm-screen");if(!k)return;const D=h.cols,E=h.rows;if(D<=0||E<=0)return;const L=k.clientWidth/D,z=k.clientHeight/E,H=h.buffer.active.cursorX,P=h.buffer.active.cursorY,I=k.getBoundingClientRect(),K=s.getBoundingClientRect();Object.assign(r.style,{inset:"auto",left:`${I.left-K.left+H*L}px`,top:`${I.top-K.top+P*z}px`,width:`${Math.max(L*30,240)}px`,height:`${Math.max(z,20)}px`,color:Ee.text})};u(),s.appendChild(r);let g=!1;const l=vC();let m=null;const b=()=>{m&&(clearTimeout(m),m=null)},C=k=>{k&&S({type:"session:terminal-input",sessionId:w,input:k})},p=()=>{const k=Mg(l);k&&C(k)},a=()=>{const k=Ts(l);r.value=k,k?d():u()},c=()=>{b(),m=setTimeout(()=>{m=null,p(),r.value="",u()},600)},o=()=>{g=!0,b(),p(),d()},f=k=>{g=!1,k.data&&C(k.data),r.value="",u()};r.addEventListener("compositionstart",o),r.addEventListener("compositionend",f);const y=k=>{if(g)return;const D=k;switch(D.inputType){case"insertCompositionText":case"insertFromComposition":return;case"deleteContentBackward":b(),Ag(l)?a():(C(""),r.value="",u());return;case"insertLineBreak":case"insertParagraph":b(),p(),C("\r"),r.value="",u();return;default:if(!D.data){a();return}b();let E="";for(const L of D.data){const z=L.codePointAt(0);mC(z)?E+=_C(l,z):gC(z)?E+=bC(l,z):(E+=Mg(l),E+=L)}C(E),a(),Ih(l)||c()}};r.addEventListener("input",y);const R=k=>{if(g||k.isComposing)return;let D=null;switch(k.key){case"Enter":D="\r";break;case"Backspace":D="";break;case"Tab":D=" ";break;case"Escape":D="\x1B";break;case"ArrowUp":D="\x1B[A";break;case"ArrowDown":D="\x1B[B";break;case"ArrowRight":D="\x1B[C";break;case"ArrowLeft":D="\x1B[D";break;case"Home":D="\x1B[H";break;case"End":D="\x1B[F";break}if(D){if(k.preventDefault(),b(),k.key==="Backspace"){if(Ag(l)){a();return}}else p();C(D),r.value="",u();return}if(k.ctrlKey&&!k.metaKey&&!k.altKey&&k.key.length===1){const E=k.key.toUpperCase().charCodeAt(0);E>=64&&E<=95&&(k.preventDefault(),b(),p(),C(String.fromCharCode(E-64)),r.value="",u())}};return r.addEventListener("keydown",R),()=>{b(),p(),r.remove(),M&&(M.style.display=O,M.tabIndex=A)}}function SC(s){switch(s){case"A":return{label:"A",color:"text-status-success"};case"D":return{label:"D",color:"text-status-error"};case"R":return{label:"R",color:"text-purple-500"};case"C":return{label:"C",color:"text-blue-500"};default:return{label:"M",color:"text-accent"}}}function xC({files:s,loading:h,selectedFile:w,onFileClick:S,commitHash:M}){const{t:O}=Tt();return v.jsxs("div",{className:"h-full flex flex-col",children:[v.jsxs("div",{className:"px-3 py-2 border-b border-warm-100 flex items-center justify-between shrink-0",children:[v.jsx("span",{className:"text-[11px] font-semibold text-warm-500 uppercase tracking-wider",children:O("git.changedFiles")}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsxs("span",{className:"text-2xs text-warm-400",children:[s.length," ",O("git.files")]}),M&&v.jsx("span",{className:"text-2xs font-mono text-warm-400",children:M.substring(0,7)})]})]}),h?v.jsx("div",{className:"flex-1 flex items-center justify-center",children:v.jsx("span",{className:"text-xs text-warm-400",children:O("git.loadingFiles")})}):s.length===0?v.jsx("div",{className:"flex-1 flex items-center justify-center",children:v.jsx("span",{className:"text-xs text-warm-400",children:O("git.noFilesChanged")})}):v.jsx("div",{className:"flex-1 overflow-y-auto",children:s.map(A=>{const r=SC(A.status),u=w===A.path;return v.jsxs("div",{onClick:()=>S(A.path),className:`flex items-center gap-2 px-3 py-1.5 cursor-pointer text-xs hover:bg-warm-50/50 transition-colors ${u?"bg-accent/10 border-l-2 border-accent":""}`,children:[v.jsx("span",{className:`font-mono font-bold text-2xs w-3 shrink-0 ${r.color}`,children:r.label}),v.jsxs("span",{className:"truncate flex-1 text-warm-600",title:A.path,children:[A.path.split("/").pop(),v.jsx("span",{className:"text-warm-400 ml-1 text-2xs",children:A.path.includes("/")?A.path.substring(0,A.path.lastIndexOf("/")):""})]}),v.jsxs("span",{className:"shrink-0 text-2xs text-status-success",children:["+",A.additions]}),v.jsxs("span",{className:"shrink-0 text-2xs text-status-error",children:["-",A.deletions]})]},A.path)})})]})}function CC({diff:s,loading:h,selectedFile:w,fileHeaders:S}){const{t:M}=Tt(),[O,A]=j.useState(!0);return w?h?v.jsx("div",{className:"h-full flex items-center justify-center",children:v.jsx("span",{className:"text-xs text-warm-400",children:M("git.loadingDiff")})}):v.jsxs("div",{className:"h-full flex flex-col bg-[#1A1A1A]",children:[v.jsxs("div",{className:"px-3 py-2 border-b border-gray-700 shrink-0 flex items-center justify-between gap-2",children:[v.jsx("span",{className:"text-xs font-mono text-gray-100 truncate",title:w,children:w}),v.jsx("button",{onClick:()=>A(r=>!r),title:M("git.wrapLines")||"Wrap lines",className:`p-1 rounded-md shrink-0 hover:bg-gray-700 ${O?"text-accent":"text-gray-500"}`,children:v.jsx(gS,{size:14})})]}),v.jsx("div",{className:"flex-1 overflow-auto",children:v.jsx("div",{className:"p-3 font-mono text-xs leading-relaxed",children:s?(()=>{let r=0,u=0,d=!1;return s.split(`
|
|
421
|
-
`).map((g,l)=>{if(S&&g.startsWith("Index: "))return d=!1,v.jsx("div",{className:"mt-3 first:mt-0 mb-1 pb-1 border-b border-gray-700 font-semibold text-gray-100",children:g.slice(7)},l);if(g.startsWith("@@")){const p=/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(g);return p&&(r=parseInt(p[1],10),u=parseInt(p[2],10),d=!0),null}if(!d)return null;let m="text-gray-200",b=null,C=null;if(g.startsWith("+")&&!g.startsWith("+++"))m="text-gray-100 bg-green-500/20",C=u++;else if(g.startsWith("-")&&!g.startsWith("---"))m="text-gray-100 bg-red-500/20",b=r++;else if(g.startsWith(" "))b=r++,C=u++;else return null;return v.jsxs("div",{className:`flex items-start ${m}`,children:[v.jsx("span",{className:"select-none shrink-0 w-9 pr-2 text-right text-gray-500",children:b??""}),v.jsx("span",{className:"select-none shrink-0 w-9 pr-2 text-right text-gray-500",children:C??""}),v.jsx("span",{className:`flex-1 min-w-0 ${O?"whitespace-pre-wrap break-words":"whitespace-pre"}`,children:g||" "})]},l)})})():v.jsx("span",{className:"text-gray-400 italic",children:"No changes"})})})]}):v.jsx("div",{className:"h-full flex items-center justify-center",children:v.jsx("span",{className:"text-sm text-warm-400",children:M("git.selectFileToViewDiff")})})}function kC({sessionId:s,onClose:h,projectId:w,onEvent:S,sendMessage:M}){const{t:O}=Tt(),[A,r]=j.useState([]),[u,d]=j.useState(!0),[g,l]=j.useState(null),[m,b]=j.useState(!1),[C,p]=j.useState(null),[a,c]=j.useState(""),[o,f]=j.useState(!1),[y,R]=j.useState(0),[k,D]=j.useState([]),[E,L]=j.useState(null),[z,H]=j.useState(!1),[P,I]=j.useState({from:null,now:null}),K=j.useRef(new Map),X=j.useCallback(()=>R(U=>U+1),[]);j.useEffect(()=>{if(!(!M||!w))return M({type:"git:watch",projectId:w}),()=>M({type:"git:unwatch",projectId:w})},[M,w]),j.useEffect(()=>{if(!(!S||!w))return S(U=>{U.type==="git:changed"&&U.projectId===w&&X()})},[S,w,X]),j.useEffect(()=>{let U=!1;return sC(s).then(T=>{U||D(T.snapshots??[])}).catch(()=>{U||D([])}),()=>{U=!0}},[s,y]),j.useEffect(()=>{let U=!1;return b(!0),tC(s,E??void 0).then(T=>{if(U)return;d(T.available),l(T.reason??null);const F=T.available&&T.files?T.files.map(B=>({path:B.path,status:B.status,additions:B.insertions,deletions:B.deletions})):[];r(F),K.current.clear(),I({from:E,now:T.now??null}),p(B=>B&&F.some(W=>W.path===B)?B:F.length>0?F[0].path:null)}).catch(()=>{U||(d(!1),l("error"),r([]))}).finally(()=>{U||b(!1)}),()=>{U=!0}},[s,E,y]),j.useEffect(()=>{if(!C){c("");return}const U=`${P.now??""}:${C}`,T=K.current.get(U);if(T!==void 0){c(T),f(!1);return}let F=!1;return f(!0),c(""),iC(s,C,P.from??void 0,P.now??void 0).then(B=>{if(F)return;const W=B.available&&B.diff?B.diff:"";K.current.set(U,W),c(W)}).catch(()=>{F||c("")}).finally(()=>{F||f(!1)}),()=>{F=!0}},[s,C,P]);const Y=j.useCallback(()=>{H(!0),nC(s).then(U=>{if(U.available&&U.snapshots){D(U.snapshots);const T=U.snapshots[U.snapshots.length-1];T&&L(T.sha)}}).catch(()=>{}).finally(()=>H(!1))},[s]),$=U=>{const T=new Date(U);return Number.isNaN(T.getTime())?U:T.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})};return v.jsxs("div",{className:"h-full flex flex-col bg-warm-50",children:[v.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-warm-100 shrink-0",children:[v.jsx("span",{className:"text-xs font-semibold text-warm-600",children:O("session.diff.title")||"Diff"}),v.jsxs("div",{className:"flex items-center gap-1",children:[v.jsx("button",{onClick:Y,disabled:z||!u,title:O("session.diff.capture")||"Capture snapshot",className:"p-1 rounded-md hover:bg-warm-100 text-warm-500 disabled:opacity-40",children:v.jsx(Zw,{size:14,className:z?"animate-pulse":""})}),v.jsx("button",{onClick:X,title:O("common.refresh")||"Refresh",className:"p-1 rounded-md hover:bg-warm-100 text-warm-500",children:v.jsx(Av,{size:14,className:m?"animate-spin":""})}),v.jsx("button",{onClick:h,title:O("common.close")||"Close",className:"p-1 rounded-md hover:bg-warm-100 text-warm-500",children:v.jsx(Ri,{size:14})})]})]}),k.length>0&&v.jsxs("div",{className:"flex items-center gap-1 px-3 py-1.5 border-b border-warm-100 overflow-x-auto shrink-0",children:[v.jsx(jg,{active:E===null,onClick:()=>L(null),label:O("session.diff.pageStart")||"From start"}),k.map(U=>v.jsx(jg,{active:E===U.sha,onClick:()=>L(U.sha),label:`#${U.seq} ${$(U.at)}`},U.sha))]}),u?v.jsxs("div",{className:"flex-1 flex min-h-0",children:[v.jsx("div",{className:"w-2/5 min-w-[180px] max-w-[320px] border-r border-warm-100 overflow-hidden",children:v.jsx(xC,{files:A,loading:m,selectedFile:C,onFileClick:p})}),v.jsx("div",{className:"flex-1 min-w-0",children:v.jsx(CC,{diff:a,loading:o,selectedFile:C})})]}):v.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:v.jsx("span",{className:"text-xs text-warm-400",children:g==="not-git"?O("session.diff.notGit")||"Not a git repository":O("session.diff.unavailable")||"Diff unavailable"})})]})}function jg({active:s,onClick:h,label:w}){return v.jsx("button",{onClick:h,className:`px-2 py-0.5 rounded-md text-[11px] whitespace-nowrap shrink-0 ${s?"bg-warm-600 text-white":"bg-warm-100 text-warm-600 hover:bg-warm-200"}`,children:w})}const EC={presetId:u_},Ma=new Map,mr=new Map;function g_(s){return`sessionTheme:${s}`}window.addEventListener("storage",s=>{var S;if(s.storageArea!==localStorage||!((S=s.key)!=null&&S.startsWith("sessionTheme:")))return;const h=s.key.slice(13);Ma.delete(h);const w=mr.get(h);if(w){const M=vh(h);w.forEach(O=>O(M))}});function LC(s){return typeof s!="string"?!1:s==="custom"||s in ai}function vh(s){const h=Ma.get(s);if(h!==void 0)return h;let w=EC;try{const S=localStorage.getItem(g_(s));if(S!==null){const M=JSON.parse(S);M&&LC(M.presetId)&&(w={presetId:M.presetId,custom:M.custom&&typeof M.custom=="object"?M.custom:void 0})}}catch{}return Ma.set(s,w),w}function RC(s,h){const w=Ma.get(s);if(w&&w.presetId===h.presetId&&DC(w.custom,h.custom))return;Ma.set(s,h);try{localStorage.setItem(g_(s),JSON.stringify(h))}catch{}const S=mr.get(s);S&&S.forEach(M=>M(h))}function DC(s,h){return s===h?!0:!s||!h?!1:s.background===h.background&&s.foreground===h.foreground&&s.cursor===h.cursor&&s.selectionBackground===h.selectionBackground&&s.accent===h.accent}function TC(s){if(s.presetId!=="custom")return Rg(s.presetId).theme;const h=Rg(u_).theme,w=s.custom??{},S=w.cursor??w.accent??h.cursor;return{...h,background:w.background??h.background,foreground:w.foreground??h.foreground,cursor:S,cursorAccent:w.background??h.cursorAccent,selectionBackground:w.selectionBackground??h.selectionBackground,brightBlue:w.accent??h.brightBlue,blue:w.accent??h.blue}}function v_(s){const[h,w]=j.useState(()=>vh(s));j.useEffect(()=>{w(vh(s));let O=mr.get(s);return O||(O=new Set,mr.set(s,O)),O.add(w),()=>{const A=mr.get(s);A&&(A.delete(w),A.size===0&&mr.delete(s))}},[s]);const S=j.useCallback(O=>RC(s,O),[s]),M=j.useMemo(()=>TC(h),[h]);return[h,M,S]}function __({session:s,visible:h,intent:w,intentNonce:S,onClose:M,sendMessage:O,subscribeBinary:A,onEvent:r,onCycleTab:u,onSelectTab:d,remountKey:g=0}){const{t:l}=Tt(),m=s.status==="running"||w==="start"||w==="resume"?"pendingFit":"replay-only",[b,C]=j.useState(m),[p,a]=j.useState(null),[c,o]=j.useState(!1),[f,y]=j.useState(480),R=!!s.is_git_repo,k=j.useRef(null),D=j.useCallback(ye=>{ye.preventDefault();const Te=k.current;if(!Te)return;const ut=He=>{const We=Te.getBoundingClientRect(),Fe=240,Be=Math.max(Fe,We.width-200);y(Math.min(Be,Math.max(Fe,We.right-He.clientX)))},tt=()=>{window.removeEventListener("mousemove",ut),window.removeEventListener("mouseup",tt),document.body.style.cursor="",document.body.style.userSelect=""};window.addEventListener("mousemove",ut),window.addEventListener("mouseup",tt),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[]),[E,L]=j.useState(0),z=j.useCallback(()=>L(ye=>ye+1),[]),H=j.useRef(null),P=j.useRef(!1),I=j.useRef(S),[K,X]=j.useState(null),[Y,$]=j.useState(null),[U,T]=j.useState(!1),[F,B]=j.useState(null),[W,ee]=j.useState(null),ne=j.useRef(s.status==="running");j.useEffect(()=>{s.status==="running"&&b!=="subscribed"&&b!=="starting"&&b!=="pendingFit"&&(ne.current=!0,C("subscribed"))},[s.status,b]),j.useEffect(()=>{if(s.status==="running"||!ne.current||b!=="subscribed"&&b!=="stopping")return;const ye=setTimeout(()=>M(),300);return()=>clearTimeout(ye)},[s.status,b,M]);const pe=j.useCallback(async()=>{const ye=H.current;if(ye&&!P.current){P.current=!0,C("starting"),a(null),ee(null);try{const Te=await rC(s.id,ye,w==="resume"?{continueSession:!0}:void 0);C("subscribed"),Te.pendingInitialPrompt?(X(Te.pendingInitialPromptLength??0),$(null),T(!1)):(X(null),$(null))}catch(Te){const ut=Te instanceof Error?Te.message:String(Te);a(ut),C("error")}finally{P.current=!1}}},[s.id,w]),ke=j.useCallback(async()=>{if(U){T(!1);return}if(T(!0),Y===null)try{const ye=await aC(s.id);$(ye.prompt??"")}catch(ye){ee(ye instanceof Error?ye.message:String(ye))}},[U,Y,s.id]),Q=j.useCallback(async()=>{if(!F){B("send"),ee(null);try{await oC(s.id),X(null),$(null),T(!1)}catch(ye){ee(ye instanceof Error?ye.message:String(ye))}finally{B(null)}}},[F,s.id]),G=j.useCallback(async()=>{if(!F){B("skip"),ee(null);try{await lC(s.id),X(null),$(null),T(!1)}catch(ye){ee(ye instanceof Error?ye.message:String(ye))}finally{B(null)}}},[F,s.id]);j.useEffect(()=>{if(S===I.current)return;I.current=S,(w==="start"||w==="resume")&&b==="replay-only"&&s.status!=="running"&&(H.current?pe():C("pendingFit"))},[S,w,b,s.status,pe]);const he=j.useCallback(()=>{H.current?pe():C("pendingFit")},[pe]),ae=j.useCallback((ye,Te)=>{H.current={cols:ye,rows:Te},b==="pendingFit"&&(s.status==="running"?(ne.current=!0,C("subscribed")):pe())},[b,pe,s.status]),Ae=s.status==="running",Oe=b==="subscribed",[Ye]=qv(s.id),[,$e]=v_(s.id),at=b==="starting"||b==="pendingFit"?v.jsxs("div",{style:{...tl,pointerEvents:"none"},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[v.jsx(lh,{size:14,style:{animation:"spin 1s linear infinite",color:Ee.dim}}),v.jsx("span",{style:{color:Ee.dim,fontFamily:vt,fontSize:12},children:l("session.starting")||"starting…"})]}),v.jsx("span",{style:{color:Ee.dim,fontFamily:vt,fontSize:10,marginTop:6},children:l("session.starting.typeAhead")||"type-ahead is captured and replayed once ready"})]}):b==="stopping"?v.jsx("div",{style:{...tl,pointerEvents:"none"},children:v.jsx("span",{style:{color:Ee.dim,fontFamily:vt,fontSize:12},children:l("session.stopping")||"stopping…"})}):b==="replay-only"?v.jsx("div",{style:tl,children:v.jsxs("button",{onClick:he,style:{display:"flex",alignItems:"center",gap:8,fontFamily:vt,fontSize:14,color:Ee.bright,background:"transparent",border:`1px solid ${Ee.separator}`,padding:"10px 22px",borderRadius:6,cursor:"pointer"},children:[v.jsx(eS,{size:16})," ",l("session.startInWindow")||"Start"]})}):b==="error"?v.jsxs("div",{style:tl,children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:Ee.error,fontFamily:vt,fontSize:12,marginBottom:8},children:[v.jsx(kv,{size:14})," ",l("session.startFailed")||"failed to start"]}),p&&v.jsx("div",{style:{color:Ee.dim,fontFamily:vt,fontSize:11,marginBottom:8,maxWidth:360,textAlign:"center",wordBreak:"break-word"},children:p}),v.jsx("button",{onClick:()=>{pe()},style:{fontFamily:vt,fontSize:12,color:Ee.bright,background:"transparent",border:`1px solid ${Ee.separator}`,padding:"4px 12px",borderRadius:4,cursor:"pointer"},children:l("common.retry")||"Retry"})]}):null;return v.jsxs("div",{ref:k,style:{display:h?"flex":"none",flexDirection:"row",position:"absolute",inset:0,background:Ee.bg},children:[v.jsxs("div",{style:{position:"relative",flex:1,minWidth:0,height:"100%"},children:[v.jsx(fC,{sessionId:s.id,isRunning:Ae,subscribed:Oe,onFitted:ae,sendMessage:O,subscribeBinary:A,onEvent:r,fontSize:Ye,theme:$e,inputBlocked:K!==null,autoFocusOnMount:h,onRequestRefresh:z,disableImagePaste:s.cli_tool==="raw-shell",onCycleTab:u,onSelectTab:d,onToggleDiff:()=>{R&&o(ye=>!ye)}},`${g}:${E}`),at,R&&!c&&v.jsxs("button",{onClick:()=>o(!0),title:`${l("session.diff.title")||"Diff"} (${navigator.platform.startsWith("Mac")?"⌘":"Ctrl"}+Shift+D)`,style:{position:"absolute",top:4,right:8,zIndex:1002,display:"inline-flex",alignItems:"center",gap:4,fontFamily:vt,fontSize:10,color:Ee.dim,background:"rgba(20,20,28,0.7)",border:`1px solid ${Ee.separator}`,padding:"2px 8px",borderRadius:4,cursor:"pointer"},children:[v.jsx(C1,{size:12})," Diff"]}),K!==null&&v.jsxs("div",{style:MC,children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[v.jsx(h1,{"aria-hidden":!0,size:14,style:{color:Ee.info}}),v.jsxs("span",{style:{flex:1},children:[l("session.initialPrompt.ready")||"Initial prompt ready",v.jsxs("span",{style:{color:Ee.dim,marginLeft:8},children:[K.toLocaleString()," chars"]}),v.jsx("div",{style:{color:Ee.warning,fontSize:10,marginTop:2},children:l("session.initialPrompt.blocked")||"Press Send or Skip before typing — keystrokes are ignored until then."})]}),v.jsxs("button",{onClick:ke,style:th("neutral"),title:U?l("session.initialPrompt.hidePreview")||"Hide preview":l("session.initialPrompt.preview")||"Preview",children:[U?v.jsx(Cv,{size:12}):v.jsx(Dh,{size:12}),U?l("session.initialPrompt.hidePreview")||"Hide":l("session.initialPrompt.preview")||"Preview"]}),v.jsxs("button",{onClick:Q,disabled:F!==null,style:th("primary"),children:[F==="send"?v.jsx(lh,{size:12,style:{animation:"spin 1s linear infinite"}}):v.jsx(cS,{size:12}),l("session.initialPrompt.send")||"Send"]}),v.jsx("button",{onClick:G,disabled:F!==null,style:th("danger"),children:l("session.initialPrompt.skip")||"Skip"})]}),W&&v.jsx("div",{style:{color:Ee.error,fontSize:10,marginTop:4},children:W}),U&&v.jsx("pre",{style:{margin:0,marginTop:6,maxHeight:240,overflow:"auto",background:"rgba(0,0,0,0.4)",padding:8,fontFamily:vt,fontSize:10,color:Ee.bright,whiteSpace:"pre-wrap",wordBreak:"break-word",border:`1px solid ${Ee.separator}`,borderRadius:4},children:Y===null?l("session.initialPrompt.loading")||"loading…":Y})]})]}),R&&c&&v.jsxs(v.Fragment,{children:[v.jsx("div",{onMouseDown:D,style:{width:5,flexShrink:0,cursor:"col-resize",background:Ee.separator}}),v.jsx("div",{style:{width:f,flexShrink:0,minWidth:0,height:"100%"},children:v.jsx(kC,{sessionId:s.id,projectId:s.project_id,onEvent:r,sendMessage:O,onClose:()=>o(!1)})})]})]})}const MC={position:"absolute",top:0,left:0,right:0,background:"rgba(28,28,38,0.96)",borderBottom:`1px solid ${Ee.separator}`,borderLeft:`3px solid ${Ee.warning}`,padding:"8px 10px",color:Ee.bright,fontFamily:vt,fontSize:11,zIndex:3,display:"flex",flexDirection:"column"};function th(s){const h={display:"inline-flex",alignItems:"center",gap:4,fontFamily:vt,fontSize:10,padding:"3px 8px",borderRadius:4,cursor:"pointer",border:`1px solid ${Ee.separator}`,background:"transparent"};return s==="primary"?{...h,color:Ee.bright,borderColor:Ee.info,background:`${Ee.info}22`}:s==="danger"?{...h,color:Ee.dim}:{...h,color:Ee.bright}}const tl={position:"absolute",inset:0,background:"rgba(12,12,12,0.85)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",zIndex:1e3},Og=340;function AC({sessionId:s}){var C,p,a,c,o,f;const[h,,w]=v_(s),[S,M]=j.useState(!1),[O,A]=j.useState(!1),[r,u]=j.useState({top:0,left:0}),d=j.useRef(null),g=j.useRef(null),l=j.useCallback(()=>{if(!d.current)return;const y=d.current.getBoundingClientRect(),R=window.innerWidth,k=window.innerHeight,D=g.current;let E=y.bottom+4,L=y.right-Og;if(D){const z=D.offsetHeight,H=D.offsetWidth;L=y.right-H,L<8&&(L=8),L+H>R-8&&(L=R-8-H),E+z>k-8&&(E=Math.max(8,y.top-z-4))}else L<8&&(L=8);u({top:E,left:L}),A(!0)},[]);j.useEffect(()=>{if(!S){A(!1);return}l();const y=requestAnimationFrame(l),R=D=>{var L,z;const E=D.target;(L=d.current)!=null&&L.contains(E)||(z=g.current)!=null&&z.contains(E)||M(!1)},k=D=>{D.key==="Escape"&&M(!1)};return document.addEventListener("mousedown",R),document.addEventListener("keydown",k),window.addEventListener("scroll",l,!0),window.addEventListener("resize",l),()=>{cancelAnimationFrame(y),document.removeEventListener("mousedown",R),document.removeEventListener("keydown",k),window.removeEventListener("scroll",l,!0),window.removeEventListener("resize",l)}},[S,l]);const m=y=>{if(y==="custom"){const R=h.custom??{background:ai.default.theme.background,foreground:ai.default.theme.foreground,cursor:ai.default.theme.cursor,selectionBackground:ai.default.theme.selectionBackground,accent:ai.default.theme.brightBlue};w({presetId:"custom",custom:R})}else w({presetId:y,custom:h.custom}),M(!1)},b=y=>{const R={...h.custom??{},...y};w({presetId:"custom",custom:R})};return v.jsxs(v.Fragment,{children:[v.jsx("button",{ref:d,"data-no-drag":!0,onMouseDown:y=>y.stopPropagation(),onClick:()=>M(y=>!y),"aria-label":"terminal-theme",title:"Terminal theme (Ctrl+Shift+P)",style:{background:"transparent",border:"none",color:Ee.titleText,cursor:"pointer",padding:"0 6px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:0,flexShrink:0,height:"100%"},children:v.jsx(q1,{size:14})}),S&&zi.createPortal(v.jsxs("div",{ref:g,className:"z-tooltip",style:{position:"fixed",top:r.top,left:r.left,width:Og,background:"#1e1e1e",border:`1px solid ${Ee.separator}`,borderRadius:6,padding:10,fontFamily:vt,color:Ee.text,boxShadow:"0 8px 24px rgba(0,0,0,0.5)",opacity:O?1:0,transition:"opacity 80ms"},onMouseDown:y=>y.stopPropagation(),children:[v.jsx("div",{style:{fontSize:10,color:Ee.dim,marginBottom:6,letterSpacing:.5},children:"DARK"}),v.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:6,marginBottom:10},children:Lg.filter(y=>!ai[y].light).map(y=>v.jsx(Bg,{preset:ai[y],selected:h.presetId===y,onClick:()=>m(y)},y))}),v.jsx("div",{style:{fontSize:10,color:Ee.dim,marginBottom:6,letterSpacing:.5},children:"LIGHT"}),v.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:6,marginBottom:10},children:[Lg.filter(y=>ai[y].light).map(y=>v.jsx(Bg,{preset:ai[y],selected:h.presetId===y,onClick:()=>m(y)},y)),v.jsx(jC,{selected:h.presetId==="custom",accent:((C=h.custom)==null?void 0:C.accent)??ai.default.theme.brightBlue??"#569cd6",onClick:()=>m("custom")})]}),h.presetId==="custom"&&v.jsxs("div",{style:{borderTop:`1px solid ${Ee.separator}`,paddingTop:8},children:[v.jsx("div",{style:{fontSize:10,color:Ee.dim,marginBottom:6,letterSpacing:.5},children:"CUSTOM COLORS"}),v.jsx(ba,{label:"Background",value:((p=h.custom)==null?void 0:p.background)??ai.default.theme.background??"#0c0c0c",onChange:y=>b({background:y})}),v.jsx(ba,{label:"Foreground",value:((a=h.custom)==null?void 0:a.foreground)??ai.default.theme.foreground??"#cccccc",onChange:y=>b({foreground:y})}),v.jsx(ba,{label:"Cursor",value:((c=h.custom)==null?void 0:c.cursor)??ai.default.theme.cursor??"#f2f2f2",onChange:y=>b({cursor:y})}),v.jsx(ba,{label:"Selection",value:((o=h.custom)==null?void 0:o.selectionBackground)??ai.default.theme.selectionBackground??"#264f78",onChange:y=>b({selectionBackground:y})}),v.jsx(ba,{label:"Accent",value:((f=h.custom)==null?void 0:f.accent)??ai.default.theme.brightBlue??"#569cd6",onChange:y=>b({accent:y})})]})]}),document.body)]})}function Bg({preset:s,selected:h,onClick:w}){return v.jsxs("button",{onClick:w,style:{position:"relative",background:s.theme.background,border:`1px solid ${h?s.accent:Ee.separator}`,outline:h?`1px solid ${s.accent}`:"none",outlineOffset:-2,borderRadius:4,padding:"6px 8px",cursor:"pointer",fontFamily:vt,fontSize:10,color:s.theme.foreground,textAlign:"left",height:52,display:"flex",flexDirection:"column",justifyContent:"space-between",overflow:"hidden"},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[v.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:s.accent,flexShrink:0}}),v.jsx("span",{style:{fontWeight:600,fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.name}),h&&v.jsx(Ra,{size:12,style:{marginLeft:"auto",flexShrink:0}})]}),v.jsxs("div",{style:{fontSize:9,opacity:.85,fontFamily:vt},children:[v.jsx("span",{style:{color:s.theme.green},children:"$"})," ",v.jsx("span",{style:{color:s.theme.brightBlue},children:"ls"})]})]})}function jC({selected:s,accent:h,onClick:w}){return v.jsxs("button",{onClick:w,style:{position:"relative",background:"#0c0c0c",border:`1px dashed ${s?h:Ee.separator}`,outline:s?`1px solid ${h}`:"none",outlineOffset:-2,borderRadius:4,padding:"6px 8px",cursor:"pointer",fontFamily:vt,fontSize:10,color:Ee.text,textAlign:"left",height:52,display:"flex",flexDirection:"column",justifyContent:"space-between",overflow:"hidden"},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[v.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:h,flexShrink:0}}),v.jsx("span",{style:{fontWeight:600,fontSize:11},children:"Custom"}),s&&v.jsx(Ra,{size:12,style:{marginLeft:"auto",flexShrink:0}})]}),v.jsx("div",{style:{fontSize:9,opacity:.7},children:"edit colors"})]})}function ba({label:s,value:h,onChange:w}){const[S,M]=j.useState(h);j.useEffect(()=>{M(h)},[h]);const O=A=>{M(A);const r=A.startsWith("#")?A:`#${A}`;(/^#[0-9a-fA-F]{6}$/.test(r)||/^#[0-9a-fA-F]{3}$/.test(r))&&w(Ng(r))};return v.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 0",fontSize:11,color:Ee.text},children:[v.jsx("span",{style:{flex:1},children:s}),v.jsx("input",{type:"text",value:S,onChange:A=>O(A.target.value),onBlur:()=>M(h),spellCheck:!1,style:{width:64,padding:"2px 4px",fontSize:10,fontFamily:vt,color:Ee.text,background:"transparent",border:`1px solid ${Ee.separator}`,borderRadius:3}}),v.jsx("input",{type:"color",value:Ng(h),onChange:A=>w(A.target.value),style:{width:28,height:22,padding:0,border:`1px solid ${Ee.separator}`,borderRadius:3,background:"transparent",cursor:"pointer"}})]})}function Ng(s){return/^#[0-9a-fA-F]{6}$/.test(s)?s.toLowerCase():/^#[0-9a-fA-F]{3}$/.test(s)?("#"+s.slice(1).split("").map(h=>h+h).join("")).toLowerCase():"#000000"}const zg=360;function OC({sessionId:s,sendMessage:h}){const[w,S]=j.useState(!1),[M,O]=j.useState(!1),[A,r]=j.useState({top:0,left:0}),[u,d]=j.useState(null),[g,l]=j.useState(""),[m,b]=j.useState(!1),[C,p]=j.useState(""),[a,c]=j.useState(""),[o,f]=j.useState(!1),[y,R]=j.useState(null),k=j.useRef(null),D=j.useRef(null),E=j.useRef(null),L=j.useCallback(()=>{if(!k.current)return;const X=k.current.getBoundingClientRect(),Y=window.innerWidth,$=window.innerHeight,U=D.current;let T=X.bottom+4,F=X.right-zg;if(U){const B=U.offsetHeight,W=U.offsetWidth;F=X.right-W,F<8&&(F=8),F+W>Y-8&&(F=Y-8-W),T+B>$-8&&(T=Math.max(8,X.top-B-4))}else F<8&&(F=8);r({top:T,left:F}),O(!0)},[]);j.useEffect(()=>{if(!w)return;let X=!1;return Uv().then(Y=>{X||d(Y)}).catch(Y=>{X||R(Y instanceof Error?Y.message:"Failed to load")}),()=>{X=!0}},[w]),j.useEffect(()=>{if(!w){O(!1);return}L();const X=requestAnimationFrame(L),Y=requestAnimationFrame(()=>{requestAnimationFrame(()=>{var T;return(T=E.current)==null?void 0:T.focus()})}),$=T=>{var B,W;const F=T.target;(B=k.current)!=null&&B.contains(F)||(W=D.current)!=null&&W.contains(F)||S(!1)},U=T=>{T.key==="Escape"&&S(!1)};return document.addEventListener("mousedown",$),document.addEventListener("keydown",U),window.addEventListener("scroll",L,!0),window.addEventListener("resize",L),()=>{cancelAnimationFrame(X),cancelAnimationFrame(Y),document.removeEventListener("mousedown",$),document.removeEventListener("keydown",U),window.removeEventListener("scroll",L,!0),window.removeEventListener("resize",L)}},[w,L]),j.useEffect(()=>{w||(l(""),b(!1),p(""),c(""),R(null))},[w]);const z=j.useMemo(()=>{if(!u)return[];const X=g.trim().toLowerCase();return X?u.filter(Y=>Y.name.toLowerCase().includes(X)||Y.command_template.toLowerCase().includes(X)):u},[u,g]),H=X=>{h({type:"session:terminal-input",sessionId:s,input:X.command_template}),S(!1)},P=X=>{X.key==="Enter"&&z.length>0&&(X.preventDefault(),H(z[0]))},I=!!C.trim()&&!!a.trim()&&!o,K=async()=>{if(I){f(!0),R(null);try{const X=await $v({name:C.trim(),command_template:a.trim()});d(Y=>Y?[X,...Y]:[X]),p(""),c(""),b(!1)}catch(X){R(X instanceof Error?X.message:"Failed")}finally{f(!1)}}};return v.jsxs(v.Fragment,{children:[v.jsx("button",{ref:k,"data-no-drag":!0,onMouseDown:X=>X.stopPropagation(),onClick:()=>S(X=>!X),"aria-label":"alias-inserter",title:"Insert saved command (alias) (Ctrl+Shift+A)",style:BC,children:v.jsx(m1,{size:14})}),w&&zi.createPortal(v.jsxs("div",{ref:D,className:"z-tooltip",style:{position:"fixed",top:A.top,left:A.left,width:zg,background:"#1e1e1e",border:`1px solid ${Ee.separator}`,borderRadius:6,padding:10,fontFamily:vt,color:Ee.text,boxShadow:"0 8px 24px rgba(0,0,0,0.5)",opacity:M?1:0,transition:"opacity 80ms"},onMouseDown:X=>X.stopPropagation(),children:[v.jsx("input",{ref:E,type:"text",value:g,onChange:X=>l(X.target.value),onKeyDown:P,placeholder:"Filter aliases… (Enter inserts first match)",style:{width:"100%",boxSizing:"border-box",background:"#0c0c0c",border:`1px solid ${Ee.separator}`,borderRadius:4,color:Ee.bright,fontFamily:vt,fontSize:11,padding:"6px 8px",outline:"none"}}),v.jsx("div",{style:{marginTop:8,maxHeight:280,overflowY:"auto"},children:u===null?v.jsx("div",{style:Hg,children:"Loading…"}):z.length===0?v.jsx("div",{style:Hg,children:u.length===0?"No aliases yet — add one below.":"No matches."}):z.map(X=>v.jsxs("button",{onClick:()=>H(X),style:NC,onMouseEnter:Y=>Y.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:Y=>Y.currentTarget.style.background="transparent",title:`Insert: ${X.command_template}`,children:[v.jsx("span",{style:{fontSize:11,color:Ee.bright,fontWeight:600},children:X.name}),v.jsx("code",{style:{fontSize:10,color:Ee.dim,marginLeft:8,flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:X.command_template})]},X.id))}),v.jsx("div",{style:{borderTop:`1px solid ${Ee.separator}`,marginTop:8,paddingTop:8},children:m?v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[v.jsx("input",{type:"text",value:C,onChange:X=>p(X.target.value),placeholder:"Name (e.g. git status)",maxLength:64,style:Pg}),v.jsx("input",{type:"text",value:a,onChange:X=>c(X.target.value),onKeyDown:X=>{X.key==="Enter"&&(X.preventDefault(),K())},placeholder:"Command (e.g. git status -sb)",maxLength:1024,style:{...Pg,fontFamily:vt}}),y&&v.jsx("div",{style:{fontSize:10,color:"#f87171"},children:y}),v.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:6},children:[v.jsxs("button",{type:"button",onClick:()=>{b(!1),R(null)},style:b_,children:[v.jsx(Ri,{size:12})," Cancel"]}),v.jsx("button",{type:"button",onClick:K,disabled:!I,style:{...zC,opacity:I?1:.5},children:"Save"})]})]}):v.jsxs("button",{type:"button",onClick:()=>{b(!0),R(null)},style:HC,children:[v.jsx(Tn,{size:12})," New alias"]})})]}),document.body)]})}const BC={background:"transparent",border:"none",color:Ee.titleText,cursor:"pointer",padding:"0 6px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:0,flexShrink:0,height:"100%"},Hg={fontSize:11,color:Ee.dim,padding:"12px 4px",textAlign:"center"},NC={display:"flex",alignItems:"center",width:"100%",background:"transparent",border:"none",padding:"6px 8px",cursor:"pointer",textAlign:"left",borderRadius:3,transition:"background 80ms"},Pg={width:"100%",boxSizing:"border-box",background:"#0c0c0c",border:`1px solid ${Ee.separator}`,borderRadius:4,color:Ee.bright,fontSize:11,padding:"5px 7px",outline:"none"},b_={display:"inline-flex",alignItems:"center",gap:3,background:"transparent",border:`1px solid ${Ee.separator}`,color:Ee.dim,fontFamily:vt,fontSize:10,padding:"3px 8px",borderRadius:4,cursor:"pointer"},zC={...b_,background:"rgba(86,156,214,0.13)",border:"1px solid #569cd6",color:Ee.bright},HC={display:"inline-flex",alignItems:"center",gap:4,background:"transparent",border:"none",color:Ee.dim,fontFamily:vt,fontSize:11,padding:"4px 0",cursor:"pointer"};function PC({orientation:s,onDragStart:h,onDrag:w,onDragEnd:S}){const M=j.useCallback(A=>{if(A.button!==0)return;A.preventDefault(),A.stopPropagation();const r=A.clientX,u=A.clientY;h();let d=!1;const g=()=>{d||(d=!0,window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",p),window.removeEventListener("blur",l),window.removeEventListener("keydown",m),document.removeEventListener("visibilitychange",b))},l=()=>{g(),S()},m=a=>{a.key==="Escape"&&l()},b=()=>{document.hidden&&l()},C=a=>{const c=s==="horizontal"?a.clientX-r:a.clientY-u;w(c)},p=()=>{g(),S()};window.addEventListener("mousemove",C),window.addEventListener("mouseup",p),window.addEventListener("blur",l),window.addEventListener("keydown",m),document.addEventListener("visibilitychange",b)},[s,h,w,S]),O=s==="horizontal";return v.jsx("div",{onMouseDown:M,style:{flex:"0 0 4px",background:Ee.separator,cursor:O?"col-resize":"row-resize",position:"relative",zIndex:1}})}function Fh(s){const{node:h,path:w,onSplitSizes:S,zoomPath:M,...O}=s;return h.kind==="stack"?v.jsx(Wh,{stack:h,path:w,...O}):v.jsx(IC,{split:h,path:w,onSplitSizes:S,zoomPath:M,stackProps:O})}const Ig=80;function IC({split:s,path:h,onSplitSizes:w,zoomPath:S,stackProps:M}){const O=s.orientation==="horizontal",A=j.useRef(null),r=j.useRef([]),u=j.useRef(null);return v.jsx("div",{ref:A,style:{display:"flex",flexDirection:O?"row":"column",flex:1,minWidth:0,minHeight:0},children:s.children.map((d,g)=>v.jsxs(j.Fragment,{children:[v.jsx("div",{ref:l=>{r.current[g]=l},style:{flex:S?"1 1 0%":`0 0 ${s.sizes[g]}%`,display:S&&S[h.length]!==g?"none":"flex",flexDirection:"column",minWidth:0,minHeight:0,overflow:"hidden"},children:v.jsx(Fh,{node:d,path:[...h,g],onSplitSizes:w,zoomPath:S,...M})}),!S&&g<s.children.length-1&&v.jsx(PC,{orientation:s.orientation,onDragStart:()=>{const l=A.current;if(!l)return;const m=s.sizes.slice();u.current={i:g,initialSizes:m,finalSizes:m.slice(),total:O?l.clientWidth:l.clientHeight}},onDrag:l=>{const m=u.current;if(!m||m.total<=0)return;const b=m.initialSizes[m.i]/100*m.total,C=m.initialSizes[m.i+1]/100*m.total,p=b+C,a=Math.max(Ig,Math.min(p-Ig,b+l)),c=p-a,o=a/m.total*100,f=c/m.total*100,y=r.current[m.i],R=r.current[m.i+1];y&&(y.style.flexBasis=`${o}%`),R&&(R.style.flexBasis=`${f}%`);const k=m.initialSizes.slice();k[m.i]=o,k[m.i+1]=f,m.finalSizes=k},onDragEnd:()=>{const l=u.current;l&&w(h,l.finalSizes),u.current=null}})]},g))})}const et=28,It=68;function Dl(s,h,w){const S=s-w.x,M=h-w.y;if(S<0||M<0||S>w.w||M>w.h)return null;const O=S-w.w/2,A=M-w.h/2;return Math.abs(O)<=et&&Math.abs(A)<=et?"center":O>=-It-et&&O<=-It+et&&Math.abs(A)<=et?"left":O>=It-et&&O<=It+et&&Math.abs(A)<=et?"right":A>=-It-et&&A<=-It+et&&Math.abs(O)<=et?"top":A>=It-et&&A<=It+et&&Math.abs(O)<=et?"bottom":null}function bl(s,h){const w=document.elementsFromPoint(s,h);for(const S of w){const M=S.closest("[data-group-id][data-stack-path]");if(!M)continue;const O=M.dataset.stackPath||"",A=O===""?[]:O.split(".").map(Number),r=M.getBoundingClientRect(),u={x:r.left,y:r.top,w:r.width,h:r.height};return{groupId:M.dataset.groupId||"",path:A,rect:u,zone:Dl(s,h,u)}}return null}function FC(s,h){const w=s.w/2,S=s.h/2;switch(h){case"center":return s;case"left":return{x:s.x,y:s.y,w,h:s.h};case"right":return{x:s.x+w,y:s.y,w,h:s.h};case"top":return{x:s.x,y:s.y,w:s.w,h:S};case"bottom":return{x:s.x,y:s.y+S,w:s.w,h:S}}}const _h=It*2+12;function y_(s,h,w,S){const M=s-w/2,O=h-S/2;return Math.abs(M)<=et&&Math.abs(O)<=et?"max":M>=-It-et&&M<=-It+et&&Math.abs(O)<=et?"left":M>=It-et&&M<=It+et&&Math.abs(O)<=et?"right":O>=-It-et&&O<=-It+et&&Math.abs(M)<=et?"top":O>=It-et&&O<=It+et&&Math.abs(M)<=et?"bottom":O>=-_h-et&&O<=-_h+et&&Math.abs(M)<=et?"popout":null}function w_(s,h,w,S,M){switch(s){case"left":return{x:M,y:0,w:h,h:S};case"right":return{x:w-h,y:0,w:h,h:S};case"top":return{x:M,y:0,w:w-M,h};case"bottom":return{x:M,y:S-h,w:w-M,h}}}function Aa(s,h,w,S){if(s==="max")return{x:S,y:0,w:h-S,h:w};const M=Math.round(s==="left"||s==="right"?(h-S)/2:w/2);return w_(s,M,h,w,S)}function gr(){const s=document.querySelector("[data-app-sidebar]");return Math.max(0,s?s.getBoundingClientRect().right:0)}function S_({activeZone:s}){const h=window.innerWidth,w=window.innerHeight,S=h/2,M=w/2,O=s&&s!=="popout"?Aa(s,h,w,gr()):null;return zi.createPortal(v.jsxs(v.Fragment,{children:[O&&v.jsx("div",{style:{position:"fixed",left:O.x,top:O.y,width:O.w,height:O.h,background:`${Ee.info}33`,border:`2px dashed ${Ee.info}`,borderRadius:8,pointerEvents:"none",zIndex:2400,transition:"left 80ms ease-out, top 80ms ease-out, width 80ms ease-out, height 80ms ease-out",boxSizing:"border-box"}}),v.jsxs("div",{style:{position:"fixed",inset:0,pointerEvents:"none",zIndex:2500},children:[v.jsx(is,{offsetX:S-et,offsetY:M-et,active:s==="max",kind:"center"}),v.jsx(is,{offsetX:S-It-et,offsetY:M-et,active:s==="left",kind:"left"}),v.jsx(is,{offsetX:S+It-et,offsetY:M-et,active:s==="right",kind:"right"}),v.jsx(is,{offsetX:S-et,offsetY:M-It-et,active:s==="top",kind:"top"}),v.jsx(is,{offsetX:S-et,offsetY:M+It-et,active:s==="bottom",kind:"bottom"}),v.jsx(is,{offsetX:S-et,offsetY:M-_h-et,active:s==="popout",kind:"popout"})]})]}),document.body)}function vr({targetRect:s,activeZone:h}){const w=s.x+s.w/2,S=s.y+s.h/2,M=h?FC(s,h):null;return zi.createPortal(v.jsxs(v.Fragment,{children:[M&&v.jsx("div",{style:{position:"fixed",left:M.x,top:M.y,width:M.w,height:M.h,background:`${Ee.info}33`,border:`2px dashed ${Ee.info}`,borderRadius:4,pointerEvents:"none",zIndex:2400,boxSizing:"border-box"}}),(()=>{const O=It+et;return v.jsxs("div",{style:{position:"fixed",left:w-O,top:S-O,width:O*2,height:O*2,pointerEvents:"none",zIndex:2500},children:[v.jsx(is,{offsetX:O-et,offsetY:O-et,active:h==="center",kind:"center"}),v.jsx(is,{offsetX:O-It-et,offsetY:O-et,active:h==="left",kind:"left"}),v.jsx(is,{offsetX:O+It-et,offsetY:O-et,active:h==="right",kind:"right"}),v.jsx(is,{offsetX:O-et,offsetY:O-It-et,active:h==="top",kind:"top"}),v.jsx(is,{offsetX:O-et,offsetY:O+It-et,active:h==="bottom",kind:"bottom"})]})})()]}),document.body)}function is({offsetX:s,offsetY:h,active:w,kind:S}){const M=et*2,O=w?Ee.info:"#3a3a3a",A=w?Ee.bright:Ee.separator;return v.jsx("div",{style:{position:"absolute",left:s,top:h,width:M,height:M,background:"#1a1a1a",border:`1px solid ${A}`,borderRadius:4,boxShadow:w?`0 0 8px ${Ee.info}`:"0 1px 3px rgba(0,0,0,0.4)",boxSizing:"border-box",overflow:"hidden"},children:v.jsx(UC,{kind:S,fill:O})})}function UC({kind:s,fill:h}){const w={position:"absolute",background:h};switch(s){case"center":return v.jsx("div",{style:{...w,inset:4}});case"popout":return v.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(_r,{size:24,color:h})});case"left":return v.jsxs(v.Fragment,{children:[v.jsx("div",{style:{...w,left:4,top:4,bottom:4,width:"calc(50% - 4px)"}}),v.jsx("div",{style:{position:"absolute",right:4,top:4,bottom:4,width:"calc(50% - 4px)",border:`1px dashed ${h}`,boxSizing:"border-box"}})]});case"right":return v.jsxs(v.Fragment,{children:[v.jsx("div",{style:{position:"absolute",left:4,top:4,bottom:4,width:"calc(50% - 4px)",border:`1px dashed ${h}`,boxSizing:"border-box"}}),v.jsx("div",{style:{...w,right:4,top:4,bottom:4,width:"calc(50% - 4px)"}})]});case"top":return v.jsxs(v.Fragment,{children:[v.jsx("div",{style:{...w,top:4,left:4,right:4,height:"calc(50% - 4px)"}}),v.jsx("div",{style:{position:"absolute",bottom:4,left:4,right:4,height:"calc(50% - 4px)",border:`1px dashed ${h}`,boxSizing:"border-box"}})]});case"bottom":return v.jsxs(v.Fragment,{children:[v.jsx("div",{style:{position:"absolute",top:4,left:4,right:4,height:"calc(50% - 4px)",border:`1px dashed ${h}`,boxSizing:"border-box"}}),v.jsx("div",{style:{...w,bottom:4,left:4,right:4,height:"calc(50% - 4px)"}})]})}}function $C(s){const[h,w]=j.useState(()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(s).matches);return j.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const S=window.matchMedia(s),M=O=>w(O.matches);return w(S.matches),S.addEventListener("change",M),()=>S.removeEventListener("change",M)},[s]),h}const il=320,sl=200,nl=80,rl=22,WC=4,Fg=8,tn=10,al=60,qC=12;function sn(s,h,w){return Math.max(h,Math.min(w,s))}function GC(s,h,w,S){const M=s<=Fg,O=s>=w-Fg;if(!M&&!O)return null;const A=S/3,r=S*2/3;return M?h<A?"top-left":h>r?"bottom-left":"left":h<A?"top-right":h>r?"bottom-right":"right"}function Ug(s,h,w){const S=Math.round(h/2),M=Math.round(w/2);switch(s){case"left":return{x:0,y:0,w:S,h:w};case"right":return{x:h-S,y:0,w:S,h:w};case"top-left":return{x:0,y:0,w:S,h:M};case"top-right":return{x:h-S,y:0,w:S,h:M};case"bottom-left":return{x:0,y:w-M,w:S,h:M};case"bottom-right":return{x:h-S,y:w-M,w:S,h:M}}}function YC(s,h,w,S,M){let O=s,A=h;const r=O,u=O+w,d=A,g=A+S;for(const l of M){const m=l.x,b=l.x+l.w,C=l.y,p=l.y+l.h;d<p&&g>C&&(Math.abs(r-b)<=tn?O=b:Math.abs(u-m)<=tn?O=m-w:Math.abs(r-m)<=tn?O=m:Math.abs(u-b)<=tn&&(O=b-w)),r<b&&u>m&&(Math.abs(d-p)<=tn?A=p:Math.abs(g-C)<=tn?A=C-S:Math.abs(d-C)<=tn?A=C:Math.abs(g-p)<=tn&&(A=p-S))}return{x:O,y:A}}function KC({group:s,sessionsById:h,neighbors:w,isTopmost:S,zIndex:M,sendMessage:O,subscribeBinary:A,onEvent:r}){const{t:u}=Tt(),d=$C("(max-width: 767px)"),g=XC(),l=j.useRef(null),[m,b]=j.useState(!1),C=j.useRef(null),[p,a]=j.useState(null),c=j.useRef({x:s.x,y:s.y,w:s.w,h:s.h});c.current={x:s.x,y:s.y,w:s.w,h:s.h};const[o,f]=j.useState(null),y=j.useRef(null),[R,k]=j.useState(!1),[D,E]=j.useState(null),L=j.useRef(null),z=j.useRef(w);z.current=w;const[H,P]=j.useState(null),I=j.useRef(null),K=j.useCallback((ye,Te)=>{if(d||m||ye.button!==0||ye.target.closest("[data-no-drag]"))return;ye.preventDefault(),g.focus(Pt(s.root)[0]||"");const tt=ye.clientX,He=ye.clientY,We={...c.current},Fe=l.current,Be=window.innerWidth,Ue=window.innerHeight,ct=gr();let it=!1,St="";Te&&Fe&&(St=Fe.style.pointerEvents,Fe.style.pointerEvents="none");let Ce=!1;const Ie=()=>{Ce||(Ce=!0,window.removeEventListener("mousemove",ie),window.removeEventListener("mouseup",_e),window.removeEventListener("blur",ce),window.removeEventListener("keydown",ze),document.removeEventListener("visibilitychange",je),Te&&Fe&&(Fe.style.pointerEvents=St))},ce=()=>{Ie(),I.current=null,P(null),y.current=null,f(null),L.current=null,E(null),k(!1),g.setGroupGeometry(s.id,{...c.current})},ze=ue=>{ue.key==="Escape"&&ce()},je=()=>{document.hidden&&ce()};let le=!1;const ie=ue=>{if(le)return;{const ve=window.screenX,Se=window.screenY,Ne=ve+window.outerWidth,qe=Se+window.outerHeight;if(ue.screenX<ve-al||ue.screenX>Ne+al||ue.screenY<Se-al||ue.screenY>qe+al){le=!0,Ie(),I.current=null,P(null),y.current=null,f(null),L.current=null,E(null),k(!1),g.setGroupGeometry(s.id,{...c.current}),g.popOutGroup(s.id,{atScreenX:ue.screenX,atScreenY:ue.screenY});return}}const Pe=ue.clientX-tt,Me=ue.clientY-He;let J=sn(We.x+Pe,-(We.w-nl),Be-nl),Z=sn(We.y+Me,0,Ue-rl);const te=z.current;if(te.length>0){const ve=YC(J,Z,We.w,We.h,te);J=ve.x,Z=ve.y}if(Fe&&(Fe.style.left=`${J}px`,Fe.style.top=`${Z}px`),c.current.x=J,c.current.y=Z,Te){let ve=null;const Se=document.elementFromPoint(ue.clientX,ue.clientY),Ne=Se==null?void 0:Se.closest("[data-group-id][data-stack-path]");if(Ne){const qe=Ne.dataset.groupId||"";if(qe!==s.id){const Xe=Ne.dataset.stackPath||"",Qe=Xe===""?[]:Xe.split(".").map(Number),Je=Ne.getBoundingClientRect(),bt={x:Je.left,y:Je.top,w:Je.width,h:Je.height};ve={groupId:qe,path:Qe,rect:bt,zone:Dl(ue.clientX,ue.clientY,bt)}}}I.current=ve,P(ve?{rect:ve.rect,zone:ve.zone}:null)}!it&&Math.hypot(ue.clientX-tt,ue.clientY-He)>=qC&&(it=!0,k(!0),s.dock&&g.setGroupDock(s.id,null));const V=Te&&I.current&&I.current.zone,xe=V||!it?null:y_(ue.clientX,ue.clientY,Be,Ue);xe!==L.current&&(L.current=xe,E(xe));const me=V||xe?null:GC(ue.clientX,ue.clientY,Be,Ue);me!==y.current&&(y.current=me,f(me))},_e=ue=>{Ie(),k(!1);const Pe=L.current;if(L.current=null,E(null),Te&&I.current&&I.current.zone){const J=I.current;g.dockGroup(s.id,J.groupId,J.path,J.zone),I.current=null,P(null),y.current=null,f(null);return}if(Pe==="popout"){I.current=null,P(null),y.current=null,f(null),g.setGroupGeometry(s.id,{...c.current}),g.popOutGroup(s.id,{atScreenX:ue.screenX,atScreenY:ue.screenY});return}if(Pe&&Pe!=="max"){const J=Aa(Pe,Be,Ue,ct);Fe&&(Fe.style.left=`${J.x}px`,Fe.style.top=`${J.y}px`,Fe.style.width=`${J.w}px`,Fe.style.height=`${J.h}px`),c.current=J,I.current=null,P(null),y.current=null,f(null),g.setGroupDock(s.id,Pe);return}const Me=Pe?Aa(Pe,Be,Ue,ct):y.current?Ug(y.current,Be,Ue):null;Me&&(Fe&&(Fe.style.left=`${Me.x}px`,Fe.style.top=`${Me.y}px`,Fe.style.width=`${Me.w}px`,Fe.style.height=`${Me.h}px`),c.current=Me,y.current=null,f(null)),I.current=null,P(null),g.setGroupGeometry(s.id,{...c.current})};window.addEventListener("mousemove",ie),window.addEventListener("mouseup",_e),window.addEventListener("blur",ce),window.addEventListener("keydown",ze),document.addEventListener("visibilitychange",je)},[d,m,g,s.id,s.root,s.dock]),X=j.useCallback(ye=>K(ye,!1),[K]),Y=j.useCallback(ye=>K(ye,!0),[K]),$=j.useCallback(ye=>Te=>{if(d||m||Te.button!==0)return;Te.preventDefault(),Te.stopPropagation();const ut=Te.clientX,tt=Te.clientY,He={...c.current},We=l.current,Fe=window.innerWidth,Be=window.innerHeight,Ue=ze=>{const je=ze.clientX-ut,le=ze.clientY-tt;let ie=He.x,_e=He.y,ue=He.w,Pe=He.h;ye.includes("e")?ue=sn(He.w+je,il,Math.max(il,Fe-He.x)):ye.includes("w")&&(ie=sn(He.x+je,0,He.x+He.w-il),ue=He.x+He.w-ie),ye.includes("s")?Pe=sn(He.h+le,sl,Math.max(sl,Be-He.y)):ye.includes("n")&&(_e=sn(He.y+le,0,He.y+He.h-sl),Pe=He.y+He.h-_e),We&&(We.style.left=`${ie}px`,We.style.top=`${_e}px`,We.style.width=`${ue}px`,We.style.height=`${Pe}px`),c.current={x:ie,y:_e,w:ue,h:Pe}};let ct=!1;const it=()=>{ct||(ct=!0,window.removeEventListener("mousemove",Ue),window.removeEventListener("mouseup",ce),window.removeEventListener("blur",St),window.removeEventListener("keydown",Ce),document.removeEventListener("visibilitychange",Ie))},St=()=>{it(),g.setGroupGeometry(s.id,{...c.current})},Ce=ze=>{ze.key==="Escape"&&St()},Ie=()=>{document.hidden&&St()},ce=()=>{it(),g.setGroupGeometry(s.id,{...c.current})};window.addEventListener("mousemove",Ue),window.addEventListener("mouseup",ce),window.addEventListener("blur",St),window.addEventListener("keydown",Ce),document.addEventListener("visibilitychange",Ie)},[d,m,g,s.id]);j.useEffect(()=>{if(d||s.dock)return;const ye=()=>{const Te=window.innerWidth,ut=window.innerHeight,tt=c.current,He=sn(tt.x,-(tt.w-nl),Te-nl),We=sn(tt.y,0,ut-rl);(He!==tt.x||We!==tt.y)&&g.setGroupGeometry(s.id,{...tt,x:He,y:We})};return window.addEventListener("resize",ye),()=>window.removeEventListener("resize",ye)},[d,g,s.id,s.dock]);const U=j.useCallback(ye=>{a(ye),g.setActiveTab(s.id,ye),g.focus(ye)},[g,s.id]),T=j.useCallback(ye=>{a(ye),g.focus(ye)},[g]),F=j.useCallback(ye=>{g.close(ye)},[g]),B=j.useCallback((ye,Te,ut)=>{g.beginTabDrag(s.id,ye,Te,ut)},[g,s.id]),W=j.useCallback(ye=>{g.close(ye)},[g]),ee=j.useCallback((ye,Te)=>{g.setSplitSizes(s.id,ye,Te)},[g,s.id]),ne=wr(s.root),pe=Pt(s.root);j.useEffect(()=>{p&&pe.includes(p)||a(ne[0]||pe[0]||null)},[p,ne,pe]);const[ke,Q]=j.useState(null),G=ke&&s.root.kind==="split"?yr(s.root,ke):null,he=!!ke&&!G;j.useEffect(()=>{he&&Q(null)},[he]);const ae=j.useCallback(()=>{if(m){const ye=C.current;ye&&g.setGroupGeometry(s.id,ye),C.current=null,b(!1);return}C.current={...c.current},s.dock&&g.setGroupDock(s.id,null),g.setGroupGeometry(s.id,{x:6,y:6,w:Math.max(il,window.innerWidth-12),h:Math.max(sl,window.innerHeight-12)}),b(!0)},[g,s.id,m,s.dock]),Ae=ye=>{const Te=/Mac|iPhone|iPad|iPod/.test(navigator.platform),ut=Te?ye.metaKey:ye.ctrlKey,tt=Te?ye.ctrlKey:ye.metaKey;if(!ut||tt||ye.altKey||!ye.shiftKey)return;const He=ye.key.toLowerCase();if(He==="o")ye.preventDefault(),g.popOutGroup(s.id);else if(He==="m")ye.preventDefault(),g.minimizeGroup(s.id);else if(He==="x")ye.preventDefault(),g.closeGroup(s.id);else if(He==="z")ye.preventDefault(),s.root.kind==="split"?Q(We=>We?null:p):ae();else if(He.startsWith("arrow")){ye.preventDefault();const We=p?yr(s.root,p):null,Fe=We?Rx(s.root,We,He.slice(5)):null,Be=Fe?ln(s.root,Fe):null;if(!Fe||!Be||Be.kind!=="stack")return;T(Be.activeTab),ke&&Q(Be.activeTab);const Ue=`[data-stack-path="${Fe.join(".")}"] .xterm-helper-textarea`;requestAnimationFrame(()=>{var it,St;(St=Array.from(((it=l.current)==null?void 0:it.querySelectorAll(Ue))??[]).find(Ce=>Ce.offsetParent!==null))==null||St.focus()})}};if(d){const ye=ne[0],Te=ye?h.get(ye):null;if(!Te)return null;const ut=s.intents[ye]??{intent:"open",nonce:0};return zi.createPortal(v.jsxs("div",{style:{position:"fixed",inset:0,background:Ee.bg,display:"flex",flexDirection:"column",zIndex:110},children:[v.jsxs("div",{style:{background:Ee.titleBg,height:rl,display:"flex",alignItems:"center",borderBottom:`1px solid ${Ee.separator}`},children:[v.jsx("span",{style:{flex:1,color:Ee.titleText,fontFamily:vt,fontSize:12,paddingLeft:8,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Te.title}),v.jsx("button",{"data-no-drag":!0,onClick:()=>g.closeGroup(s.id),style:nn,"aria-label":"close",children:v.jsx(Ri,{size:14})})]}),v.jsx("div",{style:{flex:1,position:"relative",minHeight:0},children:v.jsx(__,{session:Te,visible:!0,intent:ut.intent,intentNonce:ut.nonce,onClose:()=>g.close(ye),sendMessage:O,subscribeBinary:A,onEvent:r})})]}),document.body)}const Oe=o?(()=>{const ye=window.innerWidth,Te=window.innerHeight,ut=Ug(o,ye,Te);return zi.createPortal(v.jsx("div",{style:{position:"fixed",left:ut.x,top:ut.y,width:ut.w,height:ut.h,background:`${Ee.info}33`,border:`2px dashed ${Ee.info}`,borderRadius:8,pointerEvents:"none",zIndex:2e3,transition:"left 80ms ease-out, top 80ms ease-out, width 80ms ease-out, height 80ms ease-out",boxSizing:"border-box"}}),document.body)})():null,Ye=(()=>{var Te;if(pe.length===0)return"";const ye=((Te=h.get(pe[0]))==null?void 0:Te.title)||pe[0];return pe.length===1?ye:`${ye} +${pe.length-1}`})(),$e=s.root.kind==="split",at=zi.createPortal(v.jsxs("div",{ref:l,onKeyDown:Ae,onMouseDown:$e?()=>g.focus(pe[0]||""):Y,style:{position:"fixed",left:s.x,top:s.y,width:s.w,height:s.h,zIndex:M,background:Ee.bg,border:`1px solid ${S?Ee.info:Ee.separator}`,borderRadius:8,boxShadow:S?`0 10px 40px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.3), 0 0 0 1px ${Ee.info}66, 0 0 18px ${Ee.info}33`:"0 10px 40px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.3)",display:"flex",flexDirection:"column",overflow:"hidden",opacity:S?1:.88,filter:S?"none":"saturate(0.82)",transition:"box-shadow 120ms ease-out, border-color 120ms ease-out, opacity 140ms ease-out, filter 140ms ease-out"},children:[$e&&v.jsxs("div",{onMouseDown:X,onDoubleClick:ye=>{ye.target.closest("button")||ae()},style:{height:rl,flexShrink:0,display:"flex",flexDirection:"column",background:Ee.titleBg,borderBottom:`1px solid ${Ee.separator}`,userSelect:"none",cursor:"move"},children:[v.jsx("div",{style:{display:"flex",height:WC,flexShrink:0},children:ne.map((ye,Te)=>v.jsx("div",{style:{flex:1,background:s.colors[ye]||Ee.titleText}},Te))}),v.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center",padding:"0 4px 0 8px",color:Ee.titleText,fontFamily:vt,fontSize:11},children:[v.jsx("span",{style:{color:Ee.info,fontWeight:600,letterSpacing:1,marginRight:8},"aria-hidden":!0,children:">_"}),v.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Ye}),pe.length>1&&v.jsxs(v.Fragment,{children:[v.jsx("button",{"data-no-drag":!0,onMouseDown:ye=>ye.stopPropagation(),onClick:()=>g.applyLayoutPreset(s.id,"single"),style:nn,"aria-label":"single-pane",title:u("session.layout.single"),children:v.jsx(jv,{size:12})}),v.jsx("button",{"data-no-drag":!0,onMouseDown:ye=>ye.stopPropagation(),onClick:()=>g.applyLayoutPreset(s.id,"columns"),style:nn,"aria-label":"two-columns",title:u("session.layout.columns"),children:v.jsx(Lv,{size:14})}),v.jsx("button",{"data-no-drag":!0,onMouseDown:ye=>ye.stopPropagation(),onClick:()=>g.applyLayoutPreset(s.id,"grid"),style:nn,"aria-label":"grid-layout",title:u("session.layout.grid"),children:v.jsx(Tv,{size:14})})]}),v.jsx("button",{"data-no-drag":!0,onMouseDown:ye=>ye.stopPropagation(),onClick:ae,style:nn,"aria-label":"toggle-maximize",title:`${u(m?"session.restoreSize":"session.maximize")} · ${u("session.maximizeHint")}`,children:m?v.jsx(Th,{size:14}):v.jsx(El,{size:14})}),v.jsx("button",{"data-no-drag":!0,onMouseDown:ye=>ye.stopPropagation(),onClick:()=>g.popOutGroup(s.id),style:nn,"aria-label":"pop-out",title:`${u("session.popOut")||"Pop out to separate window"} (Ctrl+Shift+O)`,children:v.jsx(_r,{size:14})}),v.jsx("button",{"data-no-drag":!0,onClick:()=>g.minimizeGroup(s.id),style:nn,"aria-label":"minimize",title:`${u("session.minimize")||"Minimize"} (Ctrl+Shift+M)`,children:v.jsx(Mh,{size:14})}),v.jsx("button",{"data-no-drag":!0,onClick:()=>g.closeGroup(s.id),style:nn,"aria-label":"close",title:`${u("session.close")||"Close"} (Ctrl+Shift+X)`,children:v.jsx(Ri,{size:14})})]})]}),v.jsx("div",{style:{flex:1,display:"flex",minHeight:0,minWidth:0},children:s.root.kind==="split"?v.jsx(Fh,{node:s.root,path:[],groupId:s.id,sessionsById:h,colors:s.colors,intents:s.intents,onTabClick:U,onTabClose:F,onTabMouseDown:B,onPaneAutoClose:W,registerRect:()=>{},onSplitSizes:ee,zoomPath:G??void 0,sendMessage:O,subscribeBinary:A,onEvent:r,focusedSessionId:p||void 0,groupTopmost:S,onFocusStack:T}):v.jsx(Wh,{stack:s.root,path:[],groupId:s.id,sessionsById:h,colors:s.colors,intents:s.intents,onTabClick:U,onTabClose:F,onTabMouseDown:B,onPaneAutoClose:W,registerRect:()=>{},sendMessage:O,subscribeBinary:A,onEvent:r,focusedSessionId:p||void 0,groupTopmost:S,onFocusStack:T,groupActions:{onMinimizeGroup:()=>g.minimizeGroup(s.id),onCloseGroup:()=>g.closeGroup(s.id),onPopOutGroup:()=>g.popOutGroup(s.id),onToggleMaximize:ae,isMaximized:m,onApplyLayoutPreset:ye=>g.applyLayoutPreset(s.id,ye)}})}),v.jsx("div",{onMouseDown:$("n"),style:{position:"absolute",top:0,left:6,right:6,height:4,cursor:"ns-resize",zIndex:3}}),v.jsx("div",{onMouseDown:$("s"),style:{position:"absolute",bottom:0,left:6,right:6,height:4,cursor:"ns-resize",zIndex:3}}),v.jsx("div",{onMouseDown:$("w"),style:{position:"absolute",top:6,bottom:6,left:0,width:4,cursor:"ew-resize",zIndex:3}}),v.jsx("div",{onMouseDown:$("e"),style:{position:"absolute",top:6,bottom:6,right:0,width:4,cursor:"ew-resize",zIndex:3}}),v.jsx("div",{onMouseDown:$("nw"),style:{position:"absolute",top:0,left:0,width:10,height:10,cursor:"nwse-resize",zIndex:4}}),v.jsx("div",{onMouseDown:$("ne"),style:{position:"absolute",top:0,right:0,width:10,height:10,cursor:"nesw-resize",zIndex:4}}),v.jsx("div",{onMouseDown:$("sw"),style:{position:"absolute",bottom:0,left:0,width:10,height:10,cursor:"nesw-resize",zIndex:4}}),v.jsx("div",{onMouseDown:$("se"),title:"resize",style:{position:"absolute",right:0,bottom:0,width:14,height:14,cursor:"nwse-resize",background:"linear-gradient(135deg, transparent 50%, rgba(255,255,255,0.2) 50%)",zIndex:4}})]}),document.body);return v.jsxs(v.Fragment,{children:[at,Oe,R&&!(H!=null&&H.zone)&&v.jsx(S_,{activeZone:D}),H&&v.jsx(vr,{targetRect:H.rect,activeZone:H.zone})]})}const nn={background:"transparent",border:"none",color:Ee.titleText,cursor:"pointer",padding:4,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4},ih=["#3b82f6","#22c55e","#eab308","#ef4444","#a855f7","#06b6d4","#f97316","#ec4899"];function En(s){for(const h of ih)if(!s.includes(h))return h;return ih[s.length%ih.length]}const Uh=j.createContext(null),x_=j.createContext({});function XC(){const s=j.useContext(Uh);if(!s)throw new Error("useSessionWindows must be used within SessionWindowsHost");return s}function Kk(){return j.useContext(x_)}function VC(){return j.useContext(Uh)}const yl=720,$h=460,JC=320,QC=200,$g=30,C_=80,k_=80,ka=80,bh=28;function ZC(s){const h=typeof window<"u"?window.innerWidth:1280,w=typeof window<"u"?window.innerHeight:800;let S=Number.isFinite(s.w)&&s.w>=JC?s.w:yl,M=Number.isFinite(s.h)&&s.h>=QC?s.h:$h;S=Math.min(S,h),M=Math.min(M,w);let O=Number.isFinite(s.x)?s.x:C_,A=Number.isFinite(s.y)?s.y:k_;return O=Math.max(Math.min(O,h-ka),-(S-ka)),A=Math.max(Math.min(A,w-bh),0),{x:O,y:A,w:S,h:M}}const Wg=12,ol=60;function E_(s){return`sessionGroups:${s}`}function Ea(s){try{const h=localStorage.getItem(E_(s));if(!h)return null;const w=JSON.parse(h);if(Array.isArray(w==null?void 0:w.groups)&&typeof(w==null?void 0:w.zCounter)=="number")return w}catch{}return null}function wl(s,h){try{localStorage.setItem(E_(s),JSON.stringify(h))}catch{}}function qg(s,h){const w=Ea(s);!w||!w.groups.some(S=>S.id===h)||(wl(s,{...w,groups:w.groups.filter(S=>S.id!==h)}),window.dispatchEvent(new CustomEvent("session-windows:changed")))}function e2(s,h,w){const S=Ea(s);!S||!S.groups.some(M=>M.id===h)||(wl(s,{...S,groups:S.groups.map(M=>M.id===h?{...M,...w}:M)}),window.dispatchEvent(new CustomEvent("session-windows:changed")))}function t2(s){const h=s%8;return{x:C_+h*$g,y:k_+h*$g,w:yl,h:$h}}function ll(s,h,w){return Math.max(h,Math.min(w,s))}function Gg(){return`g_${Math.random().toString(36).slice(2,10)}_${Date.now().toString(36)}`}function Ds(s,h){for(const w of s)if(yr(w.root,h))return w;return null}function Xk({projectId:s,sessions:h,sendMessage:w,subscribeBinary:S,onEvent:M,onAddSession:O,children:A}){const{t:r}=Tt(),{warning:u}=cn(),{confirm:d}=kr(),{sendNotification:g}=Ll(),[l]=j.useState(()=>{const J=Ea(s);if(!J)return{groups:[],zCounter:0};const Z=J.groups.map(te=>{const V=Pt(te.root),xe=new Set(V),me={};for(const qe of Object.keys(te.colors||{}))xe.has(qe)&&(me[qe]=te.colors[qe]);const ve={};for(const qe of V)ve[qe]={intent:"open",nonce:0},me[qe]||(me[qe]=En(Object.values(me)));const Se=ZC({x:te.x,y:te.y,w:te.w,h:te.h}),Ne=te.ownerWindowId||gt;return{...te,...Se,colors:me,intents:ve,minimized:!!te.minimized,ownerWindowId:Ne}});return{groups:_g(Z),zCounter:J.zCounter||Z.length}}),[m,b]=j.useState(l.groups),C=j.useRef(l.zCounter),p=j.useRef(m);p.current=m;const a=j.useRef(h);a.current=h;const[c,o]=j.useState(null),f=j.useRef(null);f.current=c;const[y,R]=j.useState({}),k=j.useRef(y);k.current=y,j.useEffect(()=>{var V;const J={},Z=((V=Ea(s))==null?void 0:V.sessionProjects)??{},te={};for(const xe of m)for(const me of Pt(xe.root)){const ve=h.find(Ne=>Ne.id===me)||y[me];ve!=null&&ve.title&&(J[me]=ve.title);const Se=(ve==null?void 0:ve.project_id)||Z[me];Se&&(te[me]=Se)}wl(s,{groups:m,zCounter:C.current,titles:J,sessionProjects:te}),window.dispatchEvent(new CustomEvent("session-windows:changed"))},[s,m,h,y]),j.useEffect(()=>()=>{var ve;const J=p.current;if(J.length===0)return;let Z=!1;const te=J.map(Se=>(Se.ownerWindowId||gt)!==gt||Se.minimized?Se:(Z=!0,{...Se,minimized:!0}));if(!Z)return;const V={},xe=((ve=Ea(s))==null?void 0:ve.sessionProjects)??{},me={};for(const Se of te)for(const Ne of Pt(Se.root)){const qe=a.current.find(Qe=>Qe.id===Ne)||k.current[Ne];qe!=null&&qe.title&&(V[Ne]=qe.title);const Xe=(qe==null?void 0:qe.project_id)||xe[Ne];Xe&&(me[Ne]=Xe)}wl(s,{groups:te,zCounter:C.current,titles:V,sessionProjects:me}),window.dispatchEvent(new CustomEvent("session-windows:changed"))},[s]),j.useEffect(()=>{const J=document.documentElement.style,Z={left:0,right:0,top:0,bottom:0};for(const te of m)!te.dock||te.minimized||(te.ownerWindowId||gt)!==gt||(te.dock==="left"?Z.left=Math.max(Z.left,te.x+te.w-gr()):te.dock==="right"?Z.right=Math.max(Z.right,window.innerWidth-te.x):te.dock==="top"?Z.top=Math.max(Z.top,te.y+te.h):Z.bottom=Math.max(Z.bottom,window.innerHeight-te.y));for(const te of["left","right","top","bottom"])J.setProperty(`--dock-inset-${te}`,`${Math.max(0,Math.round(Z[te]))}px`);return()=>{for(const te of["left","right","top","bottom"])J.removeProperty(`--dock-inset-${te}`)}},[m]),j.useEffect(()=>{const J=()=>{const V=window.innerWidth,xe=window.innerHeight,me=gr();b(ve=>{let Se=!1;const Ne=ve.map(qe=>{if(!qe.dock)return qe;const Xe=qe.dock==="left"||qe.dock==="right"?qe.w:qe.h,Qe=w_(qe.dock,Xe,V,xe,me);return Qe.x===qe.x&&Qe.y===qe.y&&Qe.w===qe.w&&Qe.h===qe.h?qe:(Se=!0,{...qe,...Qe})});return Se?Ne:ve})};J();const Z=document.querySelector("main"),te=Z?new ResizeObserver(J):null;return Z&&te&&te.observe(Z),window.addEventListener("resize",J),()=>{te==null||te.disconnect(),window.removeEventListener("resize",J)}},[]);const[D,E]=j.useState(()=>new Set),L=j.useRef(new Set);j.useEffect(()=>{if(h.length===0)return;const J=h.filter(te=>te.project_id===s);if(J.length===0)return;const Z=new Set(J.map(te=>te.id));for(const te of m)for(const V of Pt(te.root))Z.has(V)||y[V]||D.has(V)||L.current.has(V)||(L.current.add(V),l_(V).then(xe=>R(me=>({...me,[V]:xe}))).catch(xe=>{xe instanceof pl&&xe.status===404&&E(me=>new Set(me).add(V))}).finally(()=>L.current.delete(V)))},[m,h,s,y,D]),j.useEffect(()=>M(Z=>{Z.type!=="session:status-changed"||!Z.sessionId||R(te=>{const V=te[Z.sessionId];if(!V)return te;const xe={status:Z.status};return Z.worktree_path!==void 0&&(xe.worktree_path=Z.worktree_path),Z.branch_name!==void 0&&(xe.branch_name=Z.branch_name),{...te,[V.id]:{...V,...xe}}})}),[M]),j.useEffect(()=>{D.size!==0&&b(J=>{let Z=!1;const te=[];for(const V of J){const xe=Pt(V.root);if(!xe.some(Xe=>D.has(Xe))){te.push(V);continue}Z=!0;const me=new Set(xe.filter(Xe=>!D.has(Xe))),ve=Qv(V.root,me);if(!ve)continue;const Se=new Set(Pt(ve)),Ne={};for(const Xe of Object.keys(V.colors))Se.has(Xe)&&(Ne[Xe]=V.colors[Xe]);const qe={};for(const Xe of Object.keys(V.intents))Se.has(Xe)&&(qe[Xe]=V.intents[Xe]);te.push({...V,root:ve,colors:Ne,intents:qe})}return Z?te:J})},[D]);const z=j.useCallback((J,Z)=>{const te=p.current.length,V=t2(te);C.current+=1;const xe=C.current;return{id:Gg(),...V,z:xe,minimized:!1,root:on([J],J),colors:{[J]:En([])},intents:{[J]:{intent:Z,nonce:0}},ownerWindowId:gt}},[]),H=j.useCallback((J,Z="open")=>{b(te=>{const V=Ds(te,J);C.current+=1;const xe=C.current;return V?te.map(me=>{var Xe,Qe,Je;if(me.id!==V.id)return me;const ve=((Xe=me.intents[J])==null?void 0:Xe.intent)??"open",Se=Z==="start"||Z==="resume",Ne=Se?Z:ve,qe=Ne!==ve||Se;return{...me,z:xe,minimized:!1,root:Ki(me.root,J),intents:{...me.intents,[J]:{intent:Ne,nonce:qe?(((Qe=me.intents[J])==null?void 0:Qe.nonce)??0)+1:((Je=me.intents[J])==null?void 0:Je.nonce)??0}}}}):[...te,z(J,Z)]})},[z]),P=j.useCallback(J=>{b(Z=>{const te=Ds(Z,J);if(!te)return Z;const V=Z.reduce((me,ve)=>ve.z>me?ve.z:me,0);if(te.z===V&&!te.minimized)return Z;C.current+=1;const xe=C.current;return Z.map(me=>me.id===te.id?{...me,z:xe,minimized:!1}:me)})},[]),I=j.useCallback(async J=>{const Z=J.map(te=>a.current.find(V=>V.id===te)||k.current[te]).filter(te=>!!te&&te.status==="running");if(Z.length===0)return!0;if(!await d({message:r("session.confirmStop"),danger:!0}))return!1;for(const te of Z)gh(te.id).catch(()=>{});return!0},[r,d]),K=j.useCallback(async J=>{await I([J])&&b(Z=>{const te=Ds(Z,J);if(!te)return Z;const V=Rn(te.root,J);if(!V)return Z.filter(ve=>ve.id!==te.id);new Set(Pt(V));const xe={...te.colors};delete xe[J];const me={...te.intents};return delete me[J],Z.map(ve=>ve.id===te.id?{...ve,root:V,colors:xe,intents:me}:ve)})},[I]),X=j.useCallback(J=>{b(Z=>{const te=Ds(Z,J);return te?Z.map(V=>V.id===te.id?{...V,minimized:!0}:V):Z})},[]),Y=j.useCallback(J=>{b(Z=>{const te=Ds(Z,J);if(!te)return Z;C.current+=1;const V=C.current;return Z.map(xe=>xe.id===te.id?{...xe,minimized:!1,z:V}:xe)})},[]),$=j.useCallback(J=>!!Ds(p.current,J),[]),U=j.useCallback(async J=>{const Z=p.current.find(te=>te.id===J);Z&&!await I(Pt(Z.root))||b(te=>te.filter(V=>V.id!==J))},[I]),T=j.useCallback(J=>{b(Z=>Z.map(te=>te.id===J?{...te,minimized:!0}:te))},[]);j.useEffect(()=>{const J=te=>{const V=te.detail;!(V!=null&&V.projectId)||!V.groupId||V.projectId===s&&b(xe=>{if(!xe.find(Se=>Se.id===V.groupId))return xe;C.current+=1;const ve=C.current;return xe.map(Se=>Se.id===V.groupId?{...Se,minimized:!1,z:ve,root:V.sessionId?Ki(Se.root,V.sessionId):Se.root}:Se)})},Z=async te=>{var ve;const V=te.detail;if(!(V!=null&&V.projectId)||!V.groupId||V.projectId!==s)return;const xe=p.current.find(Se=>Se.id===V.groupId);if(xe&&!await I(Pt(xe.root)))return;const me=(xe==null?void 0:xe.ownerWindowId)||gt;me!==gt&&(Ae.current.delete(me),tt.current.delete(V.groupId),(ve=ae.current)==null||ve.post({t:"group-reclaimed",popoutId:me,groupIds:[V.groupId],reason:"late-return"})),b(Se=>Se.filter(Ne=>Ne.id!==V.groupId))};return window.addEventListener("session-windows:restore",J),window.addEventListener("session-windows:close",Z),()=>{window.removeEventListener("session-windows:restore",J),window.removeEventListener("session-windows:close",Z)}},[s,I]),j.useEffect(()=>{const J=sessionStorage.getItem("pendingSessionRestore");if(J)try{const Z=JSON.parse(J);if(Z.projectId!==s||!Z.groupId)return;sessionStorage.removeItem("pendingSessionRestore"),b(te=>{if(!te.find(me=>me.id===Z.groupId))return te;C.current+=1;const xe=C.current;return te.map(me=>me.id===Z.groupId?{...me,minimized:!1,z:xe,root:Z.sessionId?Ki(me.root,Z.sessionId):me.root}:me)})}catch{}},[s]);const F=j.useCallback(J=>{b(Z=>{if(!Z.find(xe=>xe.id===J))return Z;C.current+=1;const V=C.current;return Z.map(xe=>xe.id===J?{...xe,minimized:!1,z:V}:xe)})},[]),B=j.useCallback((J,Z)=>{b(te=>te.map(V=>V.id===J?{...V,...Z}:V))},[]),W=j.useCallback((J,Z)=>{b(te=>te.map(V=>{if(V.id===J){if(!Z)return V.dock?{...V,dock:void 0}:V;const xe=Aa(Z,window.innerWidth,window.innerHeight,gr());return{...V,...xe,dock:Z}}return Z&&V.dock===Z?{...V,dock:void 0}:V}))},[]),ee=j.useCallback((J,Z,te)=>{b(V=>V.map(xe=>xe.id===J?{...xe,root:Jv(xe.root,Z,te)}:xe))},[]),ne=j.useCallback((J,Z)=>{b(te=>te.map(V=>V.id===J?{...V,root:Ki(V.root,Z)}:V))},[]),pe=j.useCallback((J,Z)=>{b(te=>te.map(V=>V.id===J?{...V,root:Yv(V.root,Z)}:V))},[]),ke=j.useCallback((J,Z,te)=>{b(V=>V.map(xe=>xe.id===J?{...xe,root:Vv(xe.root,Z,te)}:xe))},[]),Q=j.useCallback((J,Z,te,V)=>{if(V.button!==0||!p.current.find(ot=>ot.id===J))return;V.preventDefault();const me=V.clientX,ve=V.clientY;let Se=null;o({groupId:J,sessionId:Z,fromPath:te,startX:me,startY:ve,mouseX:me,mouseY:ve,hoveredGroupId:null,hoveredPath:null,hoveredRect:null,zone:null,viewportZone:null});const Ne=(ot,st)=>{const be=Gg();Se=be;const nt=window.innerWidth,dt=window.innerHeight,Wt={x:ll(ot-60,-yl+ka,nt-ka),y:ll(st-12,0,dt-bh),w:yl,h:$h};b(oi=>{const Lt=oi.find(Jt=>Jt.id===J);if(!Lt)return oi;const Gt=Rn(Lt.root,Z),Kt=Lt.colors[Z]||En([]),bi=Lt.intents[Z]??{intent:"open",nonce:0};C.current+=1;const pi=C.current,Vi={id:be,...Wt,z:pi,minimized:!1,root:on([Z],Z),colors:{[Z]:Kt},intents:{[Z]:bi},ownerWindowId:gt},mi=[];for(const Jt of oi)if(Jt.id===J){if(Gt){const Qt=new Set(Pt(Gt)),Er={};for(const vi of Object.keys(Jt.colors))Qt.has(vi)&&(Er[vi]=Jt.colors[vi]);const Lr={};for(const vi of Object.keys(Jt.intents))Qt.has(vi)&&(Lr[vi]=Jt.intents[vi]);mi.push({...Jt,root:gl(Gt),colors:Er,intents:Lr})}}else mi.push(Jt);return mi.push(Vi),mi})};let qe=!1;const Xe=ot=>{const st=window.screenX,be=window.screenY,nt=st+window.outerWidth,dt=be+window.outerHeight;return ot.screenX<st-ol||ot.screenX>nt+ol||ot.screenY<be-ol||ot.screenY>dt+ol},Qe=ot=>{if(qe)return;const st=f.current;if(!st)return;if(!Se)Math.hypot(ot.clientX-me,ot.clientY-ve)>=Wg&&Ne(ot.clientX,ot.clientY);else{const Gt=window.innerWidth,Kt=window.innerHeight,bi=ll(ot.clientX-60,-640,Gt-ka),pi=ll(ot.clientY-12,0,Kt-bh);b(Vi=>Vi.map(mi=>mi.id===Se?{...mi,x:bi,y:pi}:mi))}if(Se&&Xe(ot)&&p.current.some(Gt=>Gt.id===Se)){const Gt=He.current;if(Gt){qe=!0;const Kt=Se;bt(),o(null),Gt(Kt,{atScreenX:ot.screenX,atScreenY:ot.screenY});return}}let be=null,nt=null,dt=null,Wt=null;const oi=document.elementsFromPoint(ot.clientX,ot.clientY);for(const Gt of oi){const Kt=Gt.closest("[data-group-id][data-stack-path]");if(!Kt)continue;const bi=Kt.dataset.groupId||"",pi=Kt.dataset.stackPath||"";if(Se?bi===Se:bi===st.groupId&&pi===st.fromPath.join("."))continue;const mi=pi===""?[]:pi.split(".").map(Number),Jt=Kt.getBoundingClientRect();be=bi,nt=mi,dt={x:Jt.left,y:Jt.top,w:Jt.width,h:Jt.height},Wt=Dl(ot.clientX,ot.clientY,dt);break}const Lt=Wt||!Se?null:y_(ot.clientX,ot.clientY,window.innerWidth,window.innerHeight);o({...st,mouseX:ot.clientX,mouseY:ot.clientY,hoveredGroupId:be,hoveredPath:nt,hoveredRect:dt,zone:Wt,viewportZone:Lt})};let Je=!1;const bt=()=>{Je||(Je=!0,window.removeEventListener("mousemove",Qe),window.removeEventListener("mouseup",Ot),window.removeEventListener("blur",Et),window.removeEventListener("keydown",ht),document.removeEventListener("visibilitychange",$t))},Et=()=>{bt(),o(null)},ht=ot=>{ot.key==="Escape"&&Et()},$t=()=>{document.hidden&&Et()},Ot=ot=>{var nt;bt();const st=f.current;if(o(null),!st)return;if(st.hoveredGroupId&&st.hoveredPath&&st.zone){const dt=Se||st.groupId;G(dt,st.sessionId,st.hoveredGroupId,st.hoveredPath,st.zone);return}const be=st.viewportZone;if(be&&Se&&p.current.some(dt=>dt.id===Se)){const dt=Se;if(be==="popout")(nt=He.current)==null||nt.call(He,dt,{atScreenX:ot.screenX,atScreenY:ot.screenY});else if(be==="max"){const Wt=Aa(be,window.innerWidth,window.innerHeight,gr());b(oi=>oi.map(Lt=>Lt.id===dt?{...Lt,x:Wt.x,y:Wt.y,w:Wt.w,h:Wt.h}:Lt))}else W(dt,be);return}};window.addEventListener("mousemove",Qe),window.addEventListener("mouseup",Ot),window.addEventListener("blur",Et),window.addEventListener("keydown",ht),document.addEventListener("visibilitychange",$t)},[]),G=j.useCallback((J,Z,te,V,xe)=>{b(me=>{const ve=me.find(ht=>ht.id===J),Se=me.find(ht=>ht.id===te);if(!ve||!Se)return me;if(J===te){const ht=ln(ve.root,V);if(!ht||ht.kind!=="stack")return me;const $t=ht.tabs.find(be=>be!==Z);if(!$t)return me;const Ot=Rn(ve.root,Z);if(!Ot)return me;const ot=yr(Ot,$t);if(!ot)return me;let st;return xe==="center"?st=pr(Ot,ot,Z):st=Ca(Ot,ot,xe,on([Z])),st=Ki(st,Z),me.map(be=>be.id!==J?be:(C.current+=1,{...be,root:st,z:C.current,minimized:!1}))}const Ne=Rn(ve.root,Z),qe=ve.colors[Z],Xe=ve.intents[Z]??{intent:"open",nonce:0};let Qe;if(xe==="center")Qe=pr(Se.root,V,Z);else{const ht=on([Z]);Qe=Ca(Se.root,V,xe,ht)}Qe=Ki(Qe,Z);const Je={...Se.colors};Je[Z]||(Je[Z]=qe||En(Object.values(Je)));const bt={...Se.intents,[Z]:Xe},Et=[];for(const ht of me)if(ht.id===J){if(Ne){const $t=new Set(Pt(Ne)),Ot={};for(const st of Object.keys(ht.colors))$t.has(st)&&(Ot[st]=ht.colors[st]);const ot={};for(const st of Object.keys(ht.intents))$t.has(st)&&(ot[st]=ht.intents[st]);Et.push({...ht,root:Ne,colors:Ot,intents:ot})}}else ht.id===te?(C.current+=1,Et.push({...ht,root:Qe,colors:Je,intents:bt,z:C.current,minimized:!1})):Et.push(ht);return Et})},[]),he=j.useCallback((J,Z,te,V)=>{b(xe=>{if(J===Z)return xe;const me=xe.find(Je=>Je.id===J),ve=xe.find(Je=>Je.id===Z);if(!me||!ve||me.root.kind!=="stack")return xe;const Se=me.root;let Ne;V==="center"?Ne=Se.tabs.reduce((Je,bt)=>pr(Je,te,bt),ve.root):Ne=Ca(ve.root,te,V,Se),Ne=Ki(Ne,Se.activeTab);const qe={...ve.colors,...me.colors},Xe={...ve.intents,...me.intents},Qe=[];for(const Je of xe)Je.id!==J&&(Je.id===Z?(C.current+=1,Qe.push({...Je,root:Ne,colors:qe,intents:Xe,z:C.current,minimized:!1})):Qe.push(Je));return Qe})},[]),ae=j.useRef(null),Ae=j.useRef(new Map),[Oe,Ye]=j.useState(null),$e=j.useRef(Oe);$e.current=Oe;const at=j.useRef(null),ye=j.useRef(typeof document<"u"&&document.hasFocus()?Date.now():0),[Te,ut]=j.useState(()=>typeof document<"u"&&document.hasFocus());j.useEffect(()=>{const J=()=>{ye.current=Date.now(),ut(!0)},Z=()=>ut(!1);window.addEventListener("focus",J),window.addEventListener("blur",Z);const te=e_();return()=>{window.removeEventListener("focus",J),window.removeEventListener("blur",Z),te(),at.current&&clearTimeout(at.current)}},[]);const tt=j.useRef(new Map),He=j.useRef(null),We=j.useCallback((J,Z)=>{var Qe;const te=p.current.find(Je=>Je.id===J);if(!te)return;const V=Ox(),xe={...te,ownerWindowId:V,dock:void 0};tt.current.set(J,xe),Ae.current.set(V,Date.now()),b(Je=>Je.map(bt=>bt.id===J?{...bt,ownerWindowId:V,dock:void 0}:bt)),(Qe=ae.current)==null||Qe.post({t:"group-handoff",to:V,groupId:J,group:xe});const me=Z&&(typeof Z.atScreenX=="number"||typeof Z.atScreenY=="number"),ve=me?Math.max(0,((Z==null?void 0:Z.atScreenX)??window.screenX+te.x)-40):Math.max(0,window.screenX+te.x),Se=me?Math.max(0,((Z==null?void 0:Z.atScreenY)??window.screenY+te.y)-12):Math.max(0,window.screenY+te.y),Ne=["popup",`width=${Math.max(400,te.w)}`,`height=${Math.max(300,te.h+40)}`,`left=${ve}`,`top=${Se}`].join(","),qe=`/popout/${encodeURIComponent(s)}/${encodeURIComponent(J)}?wid=${encodeURIComponent(V)}`,Xe=window.open(qe,"_blank",Ne);if(!Xe){tt.current.delete(J),Ae.current.delete(V),b(Je=>Je.map(bt=>bt.id===J?{...bt,ownerWindowId:gt}:bt)),u(r("session.popout.blocked"));return}Ax(V,Xe)},[s,r,u]);He.current=We;const Fe=j.useCallback(J=>{var V;const Z=p.current.find(xe=>xe.id===J);if(!Z)return;const te=Z.ownerWindowId||gt;if(te===gt){F(J);return}(V=ae.current)==null||V.post({t:"group-recall",popoutId:te,groupId:J}),setTimeout(()=>{var ve;const xe=p.current.find(Se=>Se.id===J);if(!xe||(xe.ownerWindowId||gt)===gt)return;Ae.current.delete(te),tt.current.delete(J),(ve=ae.current)==null||ve.post({t:"group-reclaimed",popoutId:te,groupIds:[J],reason:"late-return"}),C.current+=1;const me=C.current;b(Se=>Se.map(Ne=>Ne.id===J?{...Ne,ownerWindowId:gt,minimized:!1,z:me}:Ne))},1500)},[F]),Be=j.useCallback(J=>{const Z=Ds(p.current,J);Z&&Fe(Z.id)},[Fe]);j.useEffect(()=>{const J=Z=>{const te=Z.detail;!(te!=null&&te.projectId)||!te.groupId||te.projectId!==s||Fe(te.groupId)};return window.addEventListener("session-windows:recall",J),()=>window.removeEventListener("session-windows:recall",J)},[s,Fe]),j.useEffect(()=>{const J=sessionStorage.getItem("pendingSessionRecall");if(J)try{const Z=JSON.parse(J);if(Z.projectId!==s||!Z.groupId)return;sessionStorage.removeItem("pendingSessionRecall");const te=Z.groupId;setTimeout(()=>Fe(te),0)}catch{}},[s,Fe]);const Ue=j.useCallback(J=>J.kind==="stack"?[]:[0,...Ue(J.children[0])],[]),ct=j.useCallback((J,Z,te)=>{const V=Z?p.current.find(Se=>Se.id===Z):null,xe=V&&(V.ownerWindowId||gt)===gt;if(!V||!xe){H(J,"start");return}const me=(()=>{if(te){const Se=ln(V.root,te);if(Se&&Se.kind==="stack")return te}return Ue(V.root)})();C.current+=1;const ve=C.current;b(Se=>Se.map(Ne=>{if(Ne.id!==V.id)return Ne;const qe=Ki(pr(Ne.root,me,J),J);return{...Ne,root:qe,z:ve,minimized:!1,colors:{...Ne.colors,[J]:En(Object.values(Ne.colors))},intents:{...Ne.intents,[J]:{intent:"start",nonce:0}}}}))},[H,Ue]),it=j.useCallback(async(J,Z)=>{const te=new Date,V=String(te.getHours()).padStart(2,"0"),xe=String(te.getMinutes()).padStart(2,"0"),me=String(te.getSeconds()).padStart(2,"0"),ve=await Eg(s,{title:`Shell ${V}:${xe}:${me}`,cli_tool:"raw-shell",use_worktree:!1,memory_inject_mode:"none"});return O==null||O(ve),ct(ve.id,J,Z),ve.id},[s,O,ct]);j.useEffect(()=>{const J=Bh();ae.current=J;const Z=V=>{var xe;if(V.t==="hello"){const me=tt.current.get(V.groupId);if(me&&me.ownerWindowId===V.from)J.post({t:"group-handoff",to:V.from,groupId:V.groupId,group:me});else{const ve=p.current.find(Se=>Se.id===V.groupId);ve&&ve.ownerWindowId===V.from&&J.post({t:"group-handoff",to:V.from,groupId:V.groupId,group:ve})}}else if(V.t==="group-return"||V.t==="bye")if(V.t==="group-return"){const me=V.group;me&&me.id===V.groupId&&(tt.current.delete(V.groupId),Ae.current.delete(V.from),V.projectId&&V.projectId!==s&&qg(V.projectId,V.groupId),b(ve=>{const Se={...me,ownerWindowId:gt,dock:void 0};return _g([...ve.filter(Ne=>Ne.id!==V.groupId),Se])}))}else Ae.current.delete(V.from),b(me=>me.map(ve=>ve.ownerWindowId===V.from?{...ve,ownerWindowId:gt}:ve));else if(V.t==="group-close")tt.current.delete(V.groupId),V.projectId&&V.projectId!==s&&qg(V.projectId,V.groupId),b(me=>me.filter(ve=>ve.id!==V.groupId));else if(V.t==="heartbeat")Ae.current.set(V.from,Date.now());else if(V.t==="group-update"){const me=V.patch;V.projectId&&V.projectId!==s&&e2(V.projectId,V.groupId,me),b(ve=>ve.map(Se=>Se.id===V.groupId?{...Se,...me}:Se))}else if(V.t==="dock-probe"){if(document.visibilityState!=="visible")return;const me=vl(V.x,V.y),ve=_l(me)?bl(me.x,me.y):null;if(ve){const Se=$e.current;(!Se||Se.zone!==ve.zone||Se.groupId!==ve.groupId||Se.path.join(".")!==ve.path.join("."))&&Ye({rect:ve.rect,zone:ve.zone,path:ve.path,groupId:ve.groupId}),at.current&&clearTimeout(at.current),at.current=setTimeout(()=>Ye(null),800);const Ne=Mn();J.post({t:"dock-probe-result",from:gt,to:V.from,hit:!0,focusAt:ye.current,rect:{...i_(ve.rect.x,ve.rect.y),w:ve.rect.w*Ne,h:ve.rect.h*Ne},zone:ve.zone})}else $e.current&&Ye(null),J.post({t:"dock-probe-result",from:gt,to:V.from,hit:!1,focusAt:ye.current})}else if(V.t==="dock-end")Ye(null);else if(V.t==="dock-commit"&&V.to===gt){const me=vl(V.x,V.y),ve=_l(me)?bl(me.x,me.y):null,Se=ve&&ve.zone?ve:(xe=$e.current)!=null&&xe.zone?$e.current:null;let Ne=!1;const qe=V.sessions.map(Qe=>Qe.id),Xe=p.current.filter(Qe=>(Qe.ownerWindowId||gt)===gt);if(Se&&Se.zone&&!qe.some(Qe=>Ds(Xe,Qe))){const Qe=p.current.find(bt=>bt.id===Se.groupId),Je=Qe?ln(Qe.root,Se.path):null;if(Qe&&Je&&Je.kind==="stack"){Ne=!0;const bt=Se.zone,Et=Se.path;C.current+=1;const ht=C.current;b($t=>$t.map(Ot=>{if(Ot.id!==Qe.id)return Ot;const ot=Xv(Ot.root,Et,bt,qe,V.activeId),st={...Ot.colors},be={...Ot.intents};for(const nt of V.sessions)st[nt.id]||(st[nt.id]=nt.color||En(Object.values(st))),be[nt.id]=nt.intentInfo??{intent:"open",nonce:0};return{...Ot,root:ot,colors:st,intents:be,z:ht,minimized:!1}}))}}Ye(null),J.post({t:"dock-commit-ack",from:gt,to:V.from,commitId:V.commitId,accepted:Ne})}},te=J.subscribe(Z);return()=>{te(),J.close(),ae.current=null}},[s]),j.useEffect(()=>{const J=Date.now();for(const Z of l.groups)Z.ownerWindowId&&Z.ownerWindowId!==gt&&Ae.current.set(Z.ownerWindowId,J)},[]),j.useEffect(()=>{const J=async()=>{var Se;const te=Date.now(),V=[];for(const[Ne,qe]of Ae.current.entries())te-qe>Zv&&V.push(Ne);if(V.length===0)return;const xe=await s_(),me=V.filter(Ne=>xe.has(Ne)?(Ae.current.set(Ne,te),!1):!0);if(me.length===0)return;for(const Ne of me)Ae.current.delete(Ne);const ve=new Set(me);for(const Ne of p.current)Ne.ownerWindowId&&ve.has(Ne.ownerWindowId)&&tt.current.delete(Ne.id);for(const Ne of me){const qe=p.current.filter(Xe=>Xe.ownerWindowId===Ne).map(Xe=>Xe.id);qe.length>0&&((Se=ae.current)==null||Se.post({t:"group-reclaimed",popoutId:Ne,groupIds:qe,reason:"heartbeat-timeout"}))}b(Ne=>Ne.map(qe=>qe.ownerWindowId&&me.includes(qe.ownerWindowId)?{...qe,ownerWindowId:gt}:qe))},Z=setInterval(()=>{J()},Nh);return()=>clearInterval(Z)},[]);const St=j.useCallback((J,Z)=>{w({type:"session:terminal-input",sessionId:J,input:Z})},[w]),Ce=j.useCallback(()=>{var te,V;const J=p.current.filter(xe=>(xe.ownerWindowId||gt)===gt).slice().sort((xe,me)=>me.z-xe.z),Z=[];for(const xe of J)for(const me of Pt(xe.root)){const ve=((te=a.current.find(Se=>Se.id===me))==null?void 0:te.title)||((V=k.current[me])==null?void 0:V.title)||me;Z.push({sessionId:me,label:ve})}return Z},[]),Ie=j.useCallback(async(J,Z)=>{const V=p.current.filter(me=>!me.minimized&&(me.ownerWindowId||gt)===gt).reduce((me,ve)=>me&&me.z>=ve.z?me:ve,null),xe=await Eg(s,{title:Z||"",description:J,use_worktree:!1,memory_inject_mode:"none"});O==null||O(xe),ct(xe.id,(V==null?void 0:V.id)??null)},[s,O,ct]),ce=j.useMemo(()=>({openOrFocus:H,close:K,focus:P,minimize:X,restore:Y,isOpen:$,recallPopout:Be,closeGroup:U,minimizeGroup:T,restoreGroup:F,setGroupGeometry:B,setGroupDock:W,setSplitSizes:ee,setActiveTab:ne,applyLayoutPreset:pe,reorderTab:ke,beginTabDrag:Q,dockGroup:he,popOutGroup:We,createRawShellTab:it,sendToSession:St,listOpenTerminals:Ce,sendToNewTerminal:Ie}),[H,K,P,X,Y,$,Be,U,T,F,B,W,ee,ne,pe,ke,Q,he,We,it,St,Ce,Ie]),ze=j.useMemo(()=>{const J={};for(const Z of m){const V=(Z.ownerWindowId||gt)!==gt?"popped":Z.minimized?"minimized":"floating";for(const xe of Pt(Z.root))J[xe]=V}return J},[m]);j.useEffect(()=>{const J=Z=>{const te=/Mac|iPhone|iPad|iPod/.test(navigator.platform),V=te?Z.metaKey:Z.ctrlKey,xe=te?Z.ctrlKey:Z.metaKey;if(!V||xe||Z.altKey||Z.shiftKey||Z.key.toLowerCase()!=="t")return;Z.preventDefault();const ve=p.current.filter(Se=>!Se.minimized&&(Se.ownerWindowId||gt)===gt).reduce((Se,Ne)=>Se&&Se.z>=Ne.z?Se:Ne,null);it((ve==null?void 0:ve.id)??null).catch(()=>{})};return window.addEventListener("keydown",J),()=>window.removeEventListener("keydown",J)},[it]);const je=j.useMemo(()=>{const J=new Map;for(const Z of Object.values(y))J.set(Z.id,Z);for(const Z of h)J.set(Z.id,Z);return J},[h,y]),le=m.filter(J=>!J.minimized&&(J.ownerWindowId||gt)===gt),ie=le.reduce((J,Z)=>Z.z>J.z?{id:Z.id,z:Z.z}:J,{id:null,z:-1/0}).id,_e=le.find(J=>J.id===ie),ue=Te&&_e?wr(_e.root).join(","):"",Pe=j.useMemo(()=>new Set(ue?ue.split(","):[]),[ue]),Me=Ph(M,Pe,(J,Z)=>{var V;const te=Ds(p.current,J);!te||te.minimized||(te.ownerWindowId||gt)!==gt||g(r(Z==="blocked"?"notification.sessionBlocked":"notification.sessionDone"),((V=je.get(J))==null?void 0:V.title)||J,()=>H(J))});return v.jsx(Uh.Provider,{value:ce,children:v.jsx(x_.Provider,{value:ze,children:v.jsxs(Hh.Provider,{value:Me,children:[A,(()=>{const J=new Map(le.slice().sort((Z,te)=>Z.z-te.z).map((Z,te)=>[Z.id,te+1]));return le.map(Z=>{const te=le.filter(V=>V.id!==Z.id).map(({x:V,y:xe,w:me,h:ve})=>({x:V,y:xe,w:me,h:ve}));return v.jsx(KC,{group:Z,sessionsById:je,neighbors:te,isTopmost:Z.id===ie,zIndex:J.get(Z.id)??1,sendMessage:w,subscribeBinary:S,onEvent:M},Z.id)})})(),c&&c.hoveredRect&&v.jsx(vr,{targetRect:c.hoveredRect,activeZone:c.zone}),c&&!c.zone&&Math.hypot(c.mouseX-c.startX,c.mouseY-c.startY)>=Wg&&v.jsx(S_,{activeZone:c.viewportZone}),Oe&&v.jsx(vr,{targetRect:Oe.rect,activeZone:Oe.zone})]})})})}const i2=26;function Wh({stack:s,path:h,groupId:w,sessionsById:S,colors:M,intents:O,onTabClick:A,onTabClose:r,onTabMouseDown:u,onPaneAutoClose:d,registerRect:g,sendMessage:l,subscribeBinary:m,onEvent:b,focusedSessionId:C,groupTopmost:p,onFocusStack:a,groupActions:c}){const{t:o}=Tt(),[f,,y]=qv(s.activeTab),[R,k]=j.useState({}),D=()=>{const T=s.activeTab;T&&k(F=>({...F,[T]:(F[T]||0)+1}))},E=VC(),{states:L,attention:z}=j.useContext(Hh),H=p===void 0?!0:p&&(!C||C===s.activeTab),P=p===!0&&!H,I=S.get(s.activeTab),K=[[I==null?void 0:I.cli_tool,I==null?void 0:I.cli_model].filter(Boolean).join("/"),I==null?void 0:I.branch_name,I==null?void 0:I.status,I!=null&&I.total_tokens?`${I.total_tokens.toLocaleString()} tok`:""].filter(Boolean).join(" · "),X=T=>{T.button===0&&s.activeTab&&(a?a(s.activeTab):E==null||E.focus(s.activeTab)),T.stopPropagation()},Y=s.tabs.length>1?T=>{const F=s.tabs.indexOf(s.activeTab);if(F<0)return;const B=s.tabs.length,W=T==="next"?(F+1)%B:(F-1+B)%B;A(s.tabs[W])}:void 0,$=s.tabs.length>1?T=>{const F=s.tabs[T];F&&A(F)}:void 0,U=T=>{var Q;const F=/Mac|iPhone|iPad|iPod/.test(navigator.platform),B=F?T.metaKey:T.ctrlKey,W=F?T.ctrlKey:T.metaKey,ee=B&&!W&&!T.altKey&&T.shiftKey,ne=T.key.toLowerCase();if(T.key==="F5"&&!T.ctrlKey&&!T.metaKey&&!T.altKey&&!T.shiftKey||ee&&ne==="r"){T.preventDefault(),D();return}if(!ee||ne!=="a"&&ne!=="p")return;T.preventDefault();const ke=ne==="a"?"alias-inserter":"terminal-theme";(Q=T.currentTarget.querySelector(`[aria-label="${ke}"]`))==null||Q.click()};return v.jsxs("div",{onKeyDown:U,style:{flex:1,display:"flex",flexDirection:"column",background:Ee.bg,minWidth:0,minHeight:0,position:"relative",overflow:"hidden",opacity:P?p?.78:.88:1,filter:P?"saturate(0.78)":"none",boxShadow:H?`inset 0 0 0 1px ${Ee.info}`:"inset 0 0 0 1px transparent",transition:"opacity 140ms ease-out, filter 140ms ease-out, box-shadow 140ms ease-out"},children:[v.jsxs("div",{onDoubleClick:T=>{var F;T.target.closest("button")||(F=c==null?void 0:c.onToggleMaximize)==null||F.call(c)},style:{display:"flex",height:i2,background:H?"#323a42":Ee.titleBg,borderBottom:`1px solid ${Ee.separator}`,flexShrink:0,overflowX:"auto",overflowY:"hidden"},children:[s.tabs.map((T,F)=>{const B=S.get(T),W=T===s.activeTab,ee=M[T]||Ee.titleText,ne=(B==null?void 0:B.status)==="running"?Ee.success:(B==null?void 0:B.status)==="failed"?Ee.error:(B==null?void 0:B.status)==="completed"?Ee.info:Ee.dim,pe=L[T]??(B==null?void 0:B.agent_state)??"unknown",ke=pe==="working"?Ee.info:pe==="blocked"?Ee.warning:ne,Q=z.has(T),G=s.tabs.length>1&&F<9?`Ctrl+${F+1}`:"",he=[B==null?void 0:B.status,pe!=="unknown"?pe:"",B==null?void 0:B.cli_tool,B==null?void 0:B.cli_model,B==null?void 0:B.branch_name,G].filter(Boolean).join(" · ");return v.jsxs("div",{onMouseDown:ae=>{if(ae.button===0){if(c){A(T);return}ae.stopPropagation(),A(T),u(T,h,ae)}},style:{display:"flex",alignItems:"center",gap:6,padding:"0 6px 0 10px",fontFamily:vt,fontSize:11,color:W?Ee.bright:Ee.titleText,background:W?Ee.bg:"transparent",borderRight:`1px solid ${Ee.separator}`,cursor:"pointer",userSelect:"none",whiteSpace:"nowrap",maxWidth:200,position:"relative",boxShadow:Q?`inset 0 -2px 0 ${ke}`:void 0},title:`${(B==null?void 0:B.title)||T}${he?`
|
|
422
|
-
${he}`:""}`,children:[v.jsx("span",{"aria-label":pe!=="unknown"?pe:(B==null?void 0:B.status)||"unknown",className:pe==="working"?"workspace-dot-pulse":void 0,style:{width:6,height:6,borderRadius:"50%",background:ke,flexShrink:0}}),v.jsx("span",{"aria-hidden":!0,style:{flexShrink:0,fontFamily:vt,fontSize:11,fontWeight:700,letterSpacing:-.5,lineHeight:1,color:ee,width:16,textAlign:"center"},children:">_"}),v.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",flex:1,color:Q?ke:void 0,fontWeight:Q?600:void 0},children:(B==null?void 0:B.title)||T}),v.jsx("button",{"data-no-drag":!0,onMouseDown:ae=>ae.stopPropagation(),onClick:ae=>{ae.stopPropagation(),r(T)},"aria-label":"close-tab",title:o("group.closeTab")||"Close tab",style:{background:"transparent",border:"none",color:Ee.titleText,cursor:"pointer",padding:1,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:3,flexShrink:0},children:v.jsx(Ri,{size:12})})]},T)}),E&&v.jsx("button",{"data-no-drag":!0,onMouseDown:T=>T.stopPropagation(),onClick:()=>{E.createRawShellTab(w,h).catch(()=>{})},"aria-label":"new-tab",title:`${o("group.newTab")||"New shell tab"} (Ctrl+T)`,style:{background:"transparent",border:"none",borderRight:`1px solid ${Ee.separator}`,color:Ee.titleText,cursor:"pointer",padding:"0 8px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,height:"100%"},children:v.jsx(Tn,{size:14})}),v.jsx("div",{style:{flex:1,minWidth:8}}),K&&v.jsx("span",{title:K,style:{maxWidth:260,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:Ee.dim,fontFamily:vt,fontSize:9,padding:"0 7px",flexShrink:1},children:K}),v.jsx(OC,{sessionId:s.activeTab,sendMessage:l}),v.jsx("button",{"data-no-drag":!0,onMouseDown:T=>T.stopPropagation(),onClick:D,"aria-label":"refresh-terminal",title:`${o("session.refresh")||"Refresh rendering"} (F5 · Ctrl+Shift+R) — ${o("session.refresh.hint")||"Rebuild the terminal view (PTY stays running)"}`,style:es,children:v.jsx(aS,{size:12})}),v.jsx("button",{"data-no-drag":!0,onMouseDown:T=>T.stopPropagation(),onClick:()=>y(-1),"aria-label":"decrease-font",title:`${o("session.fontDecrease")||"Decrease font size"} (${f}px) · Ctrl+- · Ctrl+wheel`,style:es,children:v.jsx(ES,{size:14})}),v.jsx("button",{"data-no-drag":!0,onMouseDown:T=>T.stopPropagation(),onClick:()=>y(1),"aria-label":"increase-font",title:`${o("session.fontIncrease")||"Increase font size"} (${f}px) · Ctrl+= · Ctrl+wheel`,style:es,children:v.jsx(CS,{size:14})}),v.jsx(AC,{sessionId:s.activeTab}),c&&v.jsxs(v.Fragment,{children:[s.tabs.length>1&&c.onApplyLayoutPreset&&v.jsxs(v.Fragment,{children:[v.jsx("button",{"data-no-drag":!0,onMouseDown:T=>T.stopPropagation(),onClick:()=>{var T;return(T=c.onApplyLayoutPreset)==null?void 0:T.call(c,"single")},"aria-label":"single-pane",title:o("session.layout.single"),style:es,children:v.jsx(jv,{size:12})}),v.jsx("button",{"data-no-drag":!0,onMouseDown:T=>T.stopPropagation(),onClick:()=>{var T;return(T=c.onApplyLayoutPreset)==null?void 0:T.call(c,"columns")},"aria-label":"two-columns",title:o("session.layout.columns"),style:es,children:v.jsx(Lv,{size:14})}),v.jsx("button",{"data-no-drag":!0,onMouseDown:T=>T.stopPropagation(),onClick:()=>{var T;return(T=c.onApplyLayoutPreset)==null?void 0:T.call(c,"grid")},"aria-label":"grid-layout",title:o("session.layout.grid"),style:es,children:v.jsx(Tv,{size:14})})]}),c.onToggleMaximize&&v.jsx("button",{"data-no-drag":!0,onMouseDown:T=>T.stopPropagation(),onClick:c.onToggleMaximize,"aria-label":"toggle-maximize",title:`${c.isMaximized?o("session.restoreSize"):o("session.maximize")} · ${o("session.maximizeHint")}`,style:es,children:c.isMaximized?v.jsx(Th,{size:14}):v.jsx(El,{size:14})}),c.onPopOutGroup&&v.jsx("button",{"data-no-drag":!0,onMouseDown:T=>T.stopPropagation(),onClick:c.onPopOutGroup,"aria-label":"pop-out",title:`${o("session.popOut")||"Pop out to separate window"} (Ctrl+Shift+O)`,style:es,children:v.jsx(_r,{size:14})}),c.onReDockGroup&&v.jsx("button",{"data-no-drag":!0,onMouseDown:T=>T.stopPropagation(),onClick:c.onReDockGroup,"aria-label":"redock",title:o("session.popout.redock")||"Re-dock to main window",style:es,children:v.jsx(_r,{size:14,style:{transform:"scaleX(-1)"}})}),c.onMinimizeGroup&&v.jsx("button",{"data-no-drag":!0,onMouseDown:T=>T.stopPropagation(),onClick:c.onMinimizeGroup,"aria-label":"minimize",title:`${o("session.minimize")||"Minimize"} (Ctrl+Shift+M)`,style:es,children:v.jsx(Mh,{size:14})}),v.jsx("button",{"data-no-drag":!0,onMouseDown:T=>T.stopPropagation(),onClick:c.onCloseGroup,"aria-label":"close",title:`${o("session.close")||"Close"} (Ctrl+Shift+X)`,style:es,children:v.jsx(Ri,{size:14})})]})]}),v.jsx("div",{"data-group-id":w,"data-stack-path":h.join("."),ref:T=>{if(!T){g(h,null);return}const F=T.getBoundingClientRect();g(h,{x:F.left,y:F.top,w:F.width,h:F.height})},onMouseDown:X,style:{flex:1,position:"relative",minHeight:0,minWidth:0},children:s.tabs.map(T=>{const F=S.get(T);if(!F)return null;const B=O[T]||{intent:"open",nonce:0};return v.jsx(__,{session:F,visible:T===s.activeTab,intent:B.intent,intentNonce:B.nonce,onClose:()=>d(T),sendMessage:l,subscribeBinary:m,onEvent:b,onCycleTab:Y,onSelectTab:$,remountKey:R[T]||0},T)})})]})}const es={background:"transparent",border:"none",color:Ee.titleText,cursor:"pointer",padding:"0 6px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:0,flexShrink:0,height:"100%"},Yg=28;function s2({sendMessage:s,subscribeBinary:h,onEvent:w}){var je;const{projectId:S="",groupId:M=""}=Oy(),[O]=Cw(),A=O.get("wid")||"",{t:r}=Tt(),{confirm:u}=kr(),[d,g]=j.useState(null),[l,m]=j.useState([]),[b,C]=j.useState(null),[p,a]=j.useState(null),[c,o]=j.useState(0),f=j.useRef(0),y=j.useRef(0),R=j.useRef(0);j.useEffect(()=>{const ie=()=>{const Me=f.current;!Me||R.current===Me||Math.abs(y.current-Me)<=400&&(R.current=Me,o(J=>J+1))},_e=()=>{f.current=Date.now(),D(!0),ie()},ue=()=>D(!1),Pe=()=>{y.current=Date.now(),ie()};return window.addEventListener("focus",_e),window.addEventListener("blur",ue),window.addEventListener("pointerdown",Pe,!0),()=>{window.removeEventListener("focus",_e),window.removeEventListener("blur",ue),window.removeEventListener("pointerdown",Pe,!0)}},[]);const[k,D]=j.useState(()=>typeof document<"u"&&document.hasFocus()),{sendNotification:E}=Ll(),L=j.useRef(null);L.current=d;const z=j.useRef(null),H=j.useRef(!1);j.useEffect(()=>{if(!S)return;let le=!1;return eC(S).then(ie=>{le||m(ie)}).catch(ie=>{le||C(String((ie==null?void 0:ie.message)||ie))}),()=>{le=!0}},[S]);const P=j.useRef(new Set);j.useEffect(()=>{if(!d||l.length===0)return;const le=new Set(l.map(ie=>ie.id));for(const ie of Pt(d.root))le.has(ie)||P.current.has(ie)||(P.current.add(ie),l_(ie).then(_e=>m(ue=>ue.some(Pe=>Pe.id===_e.id)?ue:[...ue,_e])).catch(()=>{}))},[d,l]),j.useEffect(()=>w(ie=>{ie.type==="session:status-changed"&&ie.sessionId&&m(_e=>_e.map(ue=>{if(ue.id!==ie.sessionId)return ue;const Pe={status:ie.status,updated_at:new Date().toISOString()};return ie.worktree_path!==void 0&&(Pe.worktree_path=ie.worktree_path),ie.branch_name!==void 0&&(Pe.branch_name=ie.branch_name),{...ue,...Pe}}))}),[w]),j.useEffect(()=>{if(!S||!M||!A)return;const le=Bh();z.current=le;const ie=le.subscribe(Me=>{if(Me.t==="dock-probe"||Me.t==="dock-probe-result"||Me.t==="dock-end"||Me.t==="dock-commit"||Me.t==="dock-commit-ack"){ye.current(Me);return}if(Me.t==="group-handoff"&&Me.to===A&&Me.groupId===M){const J=Me.group;g({...J,x:0,y:0,w:window.innerWidth,h:Math.max(0,window.innerHeight-(J.root.kind==="split"?Yg:0)),minimized:!1,ownerWindowId:A})}else if(Me.t==="group-recall"&&Me.popoutId===A&&Me.groupId===M){const J=L.current;J&&le.post({t:"group-return",from:A,groupId:J.id,group:J,projectId:S}),setTimeout(()=>{try{window.close()}catch{}},50)}else if(Me.t==="group-focus"&&Me.popoutId===A&&Me.groupId===M){const J=window.electronAPI;if(J!=null&&J.windowFocus)J.windowFocus();else try{window.focus()}catch{}}else Me.t==="group-reclaimed"&&Me.popoutId===A&&(g(null),a(r("session.popout.reclaimed")||"메인 윈도우가 이 터미널을 회수했습니다. 잠시 후 창이 닫힙니다."),setTimeout(()=>{try{window.close()}catch{}},1500))});le.post({t:"hello",from:A,groupId:M});const _e=Nx(A),ue=setInterval(()=>{const Me=L.current;le.post({t:"heartbeat",from:A,ownedGroupIds:Me?[Me.id]:[M]})},Nh),Pe=()=>{const Me=L.current;Me&&!H.current&&le.post({t:"group-return",from:A,groupId:Me.id,group:Me,projectId:S}),le.post({t:"bye",from:A})};return window.addEventListener("beforeunload",Pe),()=>{clearInterval(ue),_e(),window.removeEventListener("beforeunload",Pe),ie(),le.close(),z.current=null}},[S,M,A]);const I=j.useCallback(le=>{!z.current||!L.current||z.current.post({t:"group-update",from:A,groupId:L.current.id,patch:le,projectId:S})},[A,S]),K=j.useCallback(le=>{g(ie=>{if(!ie)return ie;const _e={...ie,root:Ki(ie.root,le)};return I({root:_e.root}),_e})},[I]),X=j.useCallback(le=>{g(ie=>{var Z;if(!ie)return ie;const _e=Rn(ie.root,le);if(!_e)return H.current=!0,(Z=z.current)==null||Z.post({t:"group-close",from:A,groupId:ie.id,projectId:S}),setTimeout(()=>window.close(),50),null;const ue=new Set(Pt(_e)),Pe={};for(const te of Object.keys(ie.colors))ue.has(te)&&(Pe[te]=ie.colors[te]);const Me={};for(const te of Object.keys(ie.intents))ue.has(te)&&(Me[te]=ie.intents[te]);const J={...ie,root:_e,colors:Pe,intents:Me};return I({root:J.root,colors:J.colors,intents:J.intents}),J})},[I,A]),Y=j.useCallback(async le=>{const ie=l.find(_e=>_e.id===le);if((ie==null?void 0:ie.status)==="running"){if(!await u({message:r("session.confirmStop"),danger:!0}))return;gh(le).catch(()=>{})}X(le)},[l,r,X,u]),[$,U]=j.useState(null),T=j.useRef(null);T.current=$;const F=j.useRef(new Map),B=j.useRef(null),W=j.useRef(0),ee=j.useMemo(()=>({begin(){F.current.clear(),W.current=0},probe(le){var ie;Date.now()-W.current<33||(W.current=Date.now(),(ie=z.current)==null||ie.post({t:"dock-probe",from:A,x:le.screenX,y:le.screenY}))},best(){const le=Date.now();let ie=null;for(const[_e,ue]of F.current)!ue.hit||le-ue.at>500||(!ie||ue.focusAt>ie.focusAt)&&(ie={id:_e,focusAt:ue.focusAt,rect:ue.rect,zone:ue.zone});return ie},commit(le,ie,_e,ue){var Me;const Pe=`${A}_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,6)}`;B.current&&clearTimeout(B.current.timer),B.current={to:le,commitId:Pe,ids:_e.map(J=>J.id),timer:setTimeout(()=>{B.current=null},600)},(Me=z.current)==null||Me.post({t:"dock-commit",from:A,to:le,x:ie.screenX,y:ie.screenY,commitId:Pe,sessions:_e,activeId:ue})},end(){var le;F.current.clear(),(le=z.current)==null||le.post({t:"dock-end",from:A})}}),[A]),[ne,pe]=j.useState(null),ke=j.useRef(ne);ke.current=ne;const Q=j.useRef(null),G=j.useRef(typeof document<"u"&&document.hasFocus()?Date.now():0);j.useEffect(()=>{const le=()=>{G.current=Date.now()};window.addEventListener("focus",le);const ie=e_();return()=>{window.removeEventListener("focus",le),ie(),Q.current&&clearTimeout(Q.current)}},[]);const he=6,ae=j.useCallback((le,ie,_e)=>{if(_e.button!==0||!L.current)return;_e.preventDefault();const ue=_e.clientX,Pe=_e.clientY;let Me=!1;ee.begin();const J=Se=>{if(!Me){if(Math.hypot(Se.clientX-ue,Se.clientY-Pe)<he)return;Me=!0}if(!(Se.clientX>=0&&Se.clientY>=0&&Se.clientX<=window.innerWidth&&Se.clientY<=window.innerHeight)){U({sessionId:le,fromPath:ie,hoveredPath:null,hoveredRect:null,zone:null}),ee.probe(Se);return}let qe=null,Xe=null,Qe=null;const Je=document.elementsFromPoint(Se.clientX,Se.clientY);for(const bt of Je){const Et=bt.closest("[data-group-id][data-stack-path]");if(!Et)continue;const ht=Et.dataset.stackPath||"",$t=ht===""?[]:ht.split(".").map(Number),Ot=ht===ie.join(".");if(Ot){const st=L.current,be=st?ln(st.root,ie):null;if(!be||be.kind!=="stack"||be.tabs.length<2)break}const ot=Et.getBoundingClientRect();qe=$t,Xe={x:ot.left,y:ot.top,w:ot.width,h:ot.height},Qe=Dl(Se.clientX,Se.clientY,Xe),Ot&&Qe==="center"&&(Qe=null);break}U({sessionId:le,fromPath:ie,hoveredPath:qe,hoveredRect:Xe,zone:Qe})};let Z=!1;const te=()=>{Z||(Z=!0,window.removeEventListener("mousemove",J),window.removeEventListener("mouseup",ve),window.removeEventListener("blur",V),window.removeEventListener("keydown",xe),document.removeEventListener("visibilitychange",me))},V=()=>{te(),U(null),ee.end()},xe=Se=>{Se.key==="Escape"&&V()},me=()=>{document.hidden&&V()},ve=Se=>{te();const Ne=T.current;U(null);const qe=ee.best();if(ee.end(),!Ne)return;if(Ne.hoveredPath&&Ne.zone){const Qe=L.current;if(!Qe)return;const Je=Lx(Qe.root,Ne.sessionId,Ne.hoveredPath,Ne.zone);if(!Je)return;g({...Qe,root:Je}),I({root:Je});return}if(!qe)return;const Xe=L.current;ee.commit(qe.id,Se,[{id:Ne.sessionId,color:Xe==null?void 0:Xe.colors[Ne.sessionId],intentInfo:Xe==null?void 0:Xe.intents[Ne.sessionId]}],Ne.sessionId)};window.addEventListener("mousemove",J),window.addEventListener("mouseup",ve),window.addEventListener("blur",V),window.addEventListener("keydown",xe),document.addEventListener("visibilitychange",me)},[I,ee]),[Ae,Oe]=j.useState(null),Ye=j.useCallback(le=>{var Qe;if(le.button!==0||le.target.closest("[data-no-drag]"))return;const ie=L.current;if(!ie||ie.root.kind!=="stack")return;le.preventDefault();const _e=le.screenX,ue=le.screenY,Pe=window.screenX,Me=window.screenY,J=window.electronAPI;(Qe=J==null?void 0:J.windowMoveStart)==null||Qe.call(J),ee.begin();let Z=!1,te=null,V=0;const xe=()=>{if(V=0,!!te)if(J!=null&&J.windowMoveBy)J.windowMoveBy(te.dx,te.dy);else try{window.moveTo(Pe+te.dx,Me+te.dy)}catch{}},me=Je=>{const bt=Je.screenX-_e,Et=Je.screenY-ue;if(!Z){if(Math.hypot(bt,Et)<he)return;Z=!0}te={dx:bt,dy:Et},V||(V=requestAnimationFrame(xe)),ee.probe(Je);const ht=ee.best();if(ht!=null&&ht.rect){const $t=Mn();Oe({rect:{x:Je.clientX+(ht.rect.x-Je.screenX)/$t,y:Je.clientY+(ht.rect.y-Je.screenY)/$t,w:ht.rect.w/$t,h:ht.rect.h/$t},zone:ht.zone??null})}else Oe(null)};let ve=!1;const Se=()=>{ve||(ve=!0,window.removeEventListener("mousemove",me),window.removeEventListener("mouseup",Xe),window.removeEventListener("blur",Se),window.removeEventListener("keydown",Ne),document.removeEventListener("visibilitychange",qe),V&&cancelAnimationFrame(V),Oe(null),ee.end())},Ne=Je=>{Je.key==="Escape"&&Se()},qe=()=>{document.hidden&&Se()},Xe=Je=>{const bt=ee.best();if(Se(),!Z||!(bt!=null&&bt.zone))return;const Et=L.current;!Et||Et.root.kind!=="stack"||ee.commit(bt.id,Je,Et.root.tabs.map(ht=>({id:ht,color:Et.colors[ht],intentInfo:Et.intents[ht]})),Et.root.activeTab)};window.addEventListener("mousemove",me),window.addEventListener("mouseup",Xe),window.addEventListener("blur",Se),window.addEventListener("keydown",Ne),document.addEventListener("visibilitychange",qe)},[ee]),$e=j.useCallback(le=>{g(ie=>{if(!ie)return ie;const _e={...ie,root:Yv(ie.root,le)};return I({root:_e.root}),_e})},[I]),at=le=>{var _e;const ie=z.current;if(ie){if(le.t==="dock-probe"&&le.from!==A){if(document.visibilityState!=="visible"||!L.current)return;const ue=vl(le.x,le.y),Pe=_l(ue)?bl(ue.x,ue.y):null;if(Pe&&Pe.groupId===L.current.id){const Me=ke.current;(!Me||Me.zone!==Pe.zone||Me.path.join(".")!==Pe.path.join("."))&&pe({rect:Pe.rect,zone:Pe.zone,path:Pe.path}),Q.current&&clearTimeout(Q.current),Q.current=setTimeout(()=>pe(null),800);const J=Mn();ie.post({t:"dock-probe-result",from:A,to:le.from,hit:!0,focusAt:G.current,rect:{...i_(Pe.rect.x,Pe.rect.y),w:Pe.rect.w*J,h:Pe.rect.h*J},zone:Pe.zone})}else ke.current&&pe(null),ie.post({t:"dock-probe-result",from:A,to:le.from,hit:!1,focusAt:G.current})}else if(le.t==="dock-probe-result"&&le.to===A)F.current.set(le.from,{hit:le.hit,focusAt:le.focusAt,at:Date.now(),rect:le.rect,zone:le.zone});else if(le.t==="dock-end"&&le.from!==A)pe(null);else if(le.t==="dock-commit"&&le.to===A){const ue=L.current;let Pe=!1;const Me=le.sessions.map(J=>J.id);if(ue&&!Me.some(J=>Pt(ue.root).includes(J))){const J=vl(le.x,le.y),Z=_l(J)?bl(J.x,J.y):null,te=Z&&Z.groupId===ue.id&&Z.zone?{path:Z.path,zone:Z.zone}:(_e=ke.current)!=null&&_e.zone?{path:ke.current.path,zone:ke.current.zone}:null;if(te){const V=Xv(ue.root,te.path,te.zone,Me,le.activeId),xe={...ue.colors},me={...ue.intents};for(const ve of le.sessions)xe[ve.id]||(xe[ve.id]=ve.color||En(Object.values(xe))),me[ve.id]=ve.intentInfo??{intent:"open",nonce:0};g({...ue,root:V,colors:xe,intents:me}),I({root:V,colors:xe,intents:me}),Pe=!0}}pe(null),ie.post({t:"dock-commit-ack",from:A,to:le.from,commitId:le.commitId,accepted:Pe})}else if(le.t==="dock-commit-ack"&&le.to===A){const ue=B.current;if(ue&&ue.commitId===le.commitId&&ue.to===le.from&&(clearTimeout(ue.timer),B.current=null,le.accepted))for(const Pe of ue.ids)X(Pe)}}},ye=j.useRef(at);ye.current=at;const Te=j.useCallback(le=>{Y(le)},[Y]),ut=j.useCallback((le,ie)=>{g(_e=>{if(!_e)return _e;const ue={..._e,root:Jv(_e.root,le,ie)};return I({root:ue.root}),ue})},[I]),tt=window.electronAPI,He=!!(tt!=null&&tt.windowMinimize),We=j.useCallback(()=>{var le;(le=tt==null?void 0:tt.windowMinimize)==null||le.call(tt)},[tt]),Fe=j.useCallback(()=>{const le=L.current;if(!le||!z.current){window.close();return}z.current.post({t:"group-return",from:A,groupId:le.id,group:le,projectId:S}),setTimeout(()=>window.close(),50)},[A,S]),Be=j.useCallback(async()=>{const le=L.current;if(!le||!z.current){window.close();return}const _e=Pt(le.root).filter(ue=>{var Pe;return((Pe=l.find(Me=>Me.id===ue))==null?void 0:Pe.status)==="running"});_e.length&&!await u({message:r("session.confirmStop"),danger:!0})||(_e.forEach(ue=>gh(ue).catch(()=>{})),H.current=!0,z.current.post({t:"group-close",from:A,groupId:le.id,projectId:S}),setTimeout(()=>window.close(),50))},[l,r,A,S,u]),Ue=j.useMemo(()=>{const le=new Map;for(const ie of l)le.set(ie.id,ie);return le},[l]),ct=k&&d?wr(d.root).join(","):"",it=j.useMemo(()=>new Set(ct?ct.split(","):[]),[ct]),St=Ph(w,it,(le,ie)=>{var ue;const _e=L.current;!_e||!Pt(_e.root).includes(le)||E(r(ie==="blocked"?"notification.sessionBlocked":"notification.sessionDone"),((ue=Ue.get(le))==null?void 0:ue.title)||le,()=>K(le))});if(b)return v.jsxs("div",{style:sh,children:[v.jsx("p",{children:r("session.popout.loadFailed")||"Failed to load popout window."}),v.jsx("p",{style:{fontSize:12,opacity:.7},children:b})]});if(!d)return p?v.jsx("div",{style:sh,children:v.jsx("p",{children:p})}):v.jsxs("div",{style:sh,children:[v.jsx("p",{children:r("session.popout.waiting")||"Waiting for main window…"}),v.jsx("p",{style:{fontSize:12,opacity:.7},children:r("session.popout.waitingHint")||"If the main app is not open, this window cannot start. Open the project in the main app and try Pop Out again."})]});const Ce=Pt(d.root),Ie=Ce.length>0?((je=Ue.get(Ce[0]))==null?void 0:je.title)||Ce[0]:"",ce=Ce.length===1?Ie:`${Ie} +${Ce.length-1}`,ze=d.root.kind==="split";return v.jsxs("div",{style:{position:"fixed",inset:0,background:Ee.bg,display:"flex",flexDirection:"column"},children:[c>0&&v.jsx("div",{className:"popout-focus-flash","aria-hidden":!0},c),ze&&v.jsxs("div",{style:{height:Yg,background:Ee.titleBg,borderBottom:`1px solid ${Ee.separator}`,display:"flex",alignItems:"center",padding:"0 4px 0 10px",color:Ee.titleText,fontFamily:vt,fontSize:11,flexShrink:0,userSelect:"none",WebkitAppRegion:"drag"},children:[v.jsx("span",{style:{color:Ee.info,fontWeight:600,letterSpacing:1,marginRight:8},"aria-hidden":!0,children:">_"}),v.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:ce}),He&&v.jsx("button",{onClick:We,style:nh,"aria-label":"minimize-popout",title:r("session.popout.minimize")||"Minimize",children:v.jsx(Mh,{size:14})}),v.jsxs("button",{onClick:Fe,style:nh,"aria-label":"redock",title:r("session.popout.redock")||"Re-dock to main window",children:[v.jsx(_r,{size:14,style:{transform:"scaleX(-1)"}}),v.jsx("span",{style:{marginLeft:4},children:r("session.popout.redockShort")||"Re-dock"})]}),v.jsx("button",{onClick:Be,style:nh,"aria-label":"close-popout",title:r("session.popout.closeWindow")||"Close window",children:v.jsx(Ri,{size:14})})]}),v.jsx("div",{onMouseDown:ze?void 0:Ye,style:{flex:1,display:"flex",minHeight:0,minWidth:0},children:v.jsx(Hh.Provider,{value:St,children:d.root.kind==="split"?v.jsx(Fh,{node:d.root,path:[],groupId:d.id,sessionsById:Ue,colors:d.colors,intents:d.intents,onTabClick:K,onTabClose:Y,onTabMouseDown:ae,onPaneAutoClose:Te,registerRect:()=>{},onSplitSizes:ut,sendMessage:s,subscribeBinary:h,onEvent:w}):v.jsx(Wh,{stack:d.root,path:[],groupId:d.id,sessionsById:Ue,colors:d.colors,intents:d.intents,onTabClick:K,onTabClose:Y,onTabMouseDown:ae,onPaneAutoClose:Te,registerRect:()=>{},sendMessage:s,subscribeBinary:h,onEvent:w,groupActions:{onMinimizeGroup:He?We:void 0,onReDockGroup:Fe,onCloseGroup:Be,onApplyLayoutPreset:$e}})})}),$&&$.hoveredRect&&v.jsx(vr,{targetRect:$.hoveredRect,activeZone:$.zone}),Ae&&v.jsx(vr,{targetRect:Ae.rect,activeZone:Ae.zone}),ne&&v.jsx(vr,{targetRect:ne.rect,activeZone:ne.zone})]})}const sh={position:"fixed",inset:0,background:Ee.bg,color:Ee.titleText,fontFamily:vt,fontSize:12,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:8,padding:24,textAlign:"center"},nh={background:"transparent",border:"none",color:Ee.titleText,cursor:"pointer",padding:"4px 8px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,fontFamily:vt,fontSize:11,WebkitAppRegion:"no-drag"},n2=j.lazy(()=>ja(()=>import("./ProjectList-D2tf2Kfp.js"),__vite__mapDeps([0,1]))),r2=j.lazy(()=>ja(()=>import("./ProjectDetail-B96iIeaz.js").then(s=>s.l),__vite__mapDeps([2,3,4,5,6,7,1]))),a2=j.lazy(()=>ja(()=>import("./DiscussionDetail-HcG3ohsQ.js"),__vite__mapDeps([8,6,5,7]))),o2=j.lazy(()=>ja(()=>import("./ReviewQueue-UrhgwrGk.js"),__vite__mapDeps([9,4,5,10]))),l2=j.lazy(()=>ja(()=>import("./PersonalAgenda-DrfVGibs.js"),__vite__mapDeps([11,3,7,10])));function c2(){const{authenticated:s,authRequired:h,setupRequired:w,loading:S,login:M,logout:O,setup:A,changePassword:r}=Aw(),{connected:u,onEvent:d,sendMessage:g,subscribeBinary:l}=Ow(s),{t:m}=Tt();return j.useEffect(()=>{s&&Wv().then(b=>{var C,p;hl(b.defaultFontSize),(p=(C=window.electronAPI)==null?void 0:C.imeSetDebug)==null||p.call(C,b.imeDebug)}).catch(()=>{})},[s]),j.useEffect(()=>{const b=window.electronAPI,C=f=>{var y;return!!f&&!((y=f.classList)!=null&&y.contains("xterm-helper-textarea"))&&(f.tagName==="INPUT"||f.tagName==="TEXTAREA"||f.isContentEditable)},p=f=>{var y;h_(()=>f.focus())&&((y=b==null?void 0:b.imeLog)==null||y.call(b,{src:"app",event:"focus-rescue",tag:f.tagName}))},a=f=>{var R;const y=f.target;if(C(y)){if(!document.hasFocus()){p(y);return}(R=b==null?void 0:b.imeReset)==null||R.call(b)}},c=f=>{if(document.hasFocus())return;const y=f.target;C(y)&&p(y)},o=()=>{if(document.hasFocus())return;const f=document.activeElement;C(f)&&p(f)};return document.addEventListener("focusin",a,!0),document.addEventListener("pointerdown",c,!0),document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("focusin",a,!0),document.removeEventListener("pointerdown",c,!0),document.removeEventListener("keydown",o,!0)}},[]),S?v.jsxs("div",{className:"flex h-screen overflow-hidden",style:{backgroundColor:"var(--color-bg-primary)"},children:[v.jsxs("div",{className:"hidden md:flex flex-col w-64 border-r border-theme-border p-4 space-y-6",children:[v.jsx(fi,{className:"h-8 w-32 mb-4"}),v.jsxs("div",{className:"space-y-3",children:[v.jsx(fi,{className:"h-4 w-full"}),v.jsx(fi,{className:"h-4 w-5/6"}),v.jsx(fi,{className:"h-4 w-4/6"})]}),v.jsxs("div",{className:"mt-auto space-y-3 pt-4 border-t border-theme-border",children:[v.jsx(fi,{className:"h-4 w-1/2"}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(fi,{className:"h-8 w-8"}),v.jsx(fi,{className:"h-8 w-8"}),v.jsx(fi,{className:"h-8 w-8"})]})]})]}),v.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[v.jsx("div",{className:"md:hidden h-14 border-b border-theme-border flex items-center px-4",children:v.jsx(fi,{className:"h-6 w-32"})}),v.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-8",children:[v.jsxs("div",{className:"flex justify-between items-center",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(fi,{className:"h-8 w-48"}),v.jsx(fi,{className:"h-4 w-32"})]}),v.jsx(fi,{className:"h-10 w-24 rounded-xl"})]}),v.jsx(fi,{className:"h-12 w-full rounded-xl"}),v.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[...Array(6)].map((b,C)=>v.jsxs("div",{className:"card p-5 space-y-4",children:[v.jsx(fi,{className:"h-5 w-2/3"}),v.jsx(fi,{className:"h-3 w-full"}),v.jsxs("div",{className:"flex gap-2 pt-2",children:[v.jsx(fi,{className:"h-6 w-16"}),v.jsx(fi,{className:"h-6 w-16"})]})]},C))})]})]})]}):w?v.jsx(RS,{onSetup:A}):s?v.jsx(bw,{children:v.jsxs(Jm,{children:[v.jsx(an,{path:"/popout/:projectId/:groupId",element:v.jsx(s2,{sendMessage:g,subscribeBinary:l,onEvent:d})}),v.jsx(an,{path:"*",element:v.jsxs(v.Fragment,{children:[v.jsx(Ex,{onLogout:O,authRequired:h,connected:u,onEvent:d,children:v.jsx(j.Suspense,{fallback:null,children:v.jsxs(Jm,{children:[v.jsx(an,{path:"/",element:v.jsx(n2,{onEvent:d})}),v.jsx(an,{path:"/review",element:v.jsx(o2,{onEvent:d})}),v.jsx(an,{path:"/agenda",element:v.jsx(l2,{})}),v.jsx(an,{path:"/projects/:id",element:v.jsx(r2,{onEvent:d,connected:u,sendMessage:g,subscribeBinary:l})}),v.jsx(an,{path:"/projects/:id/discussions/:discussionId",element:v.jsx(a2,{onEvent:d,connected:u})})]})})}),v.jsx(Gx,{onEvent:d})]})})]})}):v.jsx(LS,{onLogin:M,onChangePassword:r})}function u2(s){return _t(`/api/harness/${s}`)}function Kg(s,h){return _t(`/api/harness/${s}/${h}`)}function h2(s,h,w){return Di(`/api/harness/${s}/${h}/settings`,w)}function d2(s,h,w){return Di(`/api/harness/${s}/${h}/memory`,{content:w})}function f2(s,h,w){return Di(`/api/harness/${s}/${h}/local-memory`,{content:w})}function p2(s,h,w){return Di(`/api/harness/${s}/${h}/hooks`,{hooks:w})}function m2(s,h,w,S,M){return rt(`/api/harness/${s}/${h}/hooks/toggle`,{event:w,index:S,enabled:M})}function g2(s,h,w,S){return rt(`/api/harness/${s}/${h}/skills/${encodeURIComponent(w)}/toggle`,{enabled:S})}function v2(s,h,w,S){return Di(`/api/harness/${s}/${h}/skills/${encodeURIComponent(w)}`,{content:S})}function _2(s,h){return rt(`/api/harness/${s}/${h}/port-from-claude`)}function b2(s,h,w){return Di(`/api/harness/${s}/${h}/mcp/${encodeURIComponent(w.alias)}`,w)}function y2(s,h,w){return Cr(`/api/harness/${s}/${h}/mcp/${encodeURIComponent(w)}`)}const w2={claude:["ask","accept","auto","bypassPermissions"],antigravity:["default","auto","all"],codex:["untrusted","on-request","on-failure","never"]},S2={claude:[],antigravity:["true","false","docker","podman"],codex:["read-only","workspace-write","danger-full-access"]};function x2({cli:s,settings:h,saving:w,onSave:S}){const{t:M}=Tt(),[O,A]=j.useState(h.model??""),[r,u]=j.useState(h.approvalMode??""),[d,g]=j.useState(h.sandbox??"");j.useEffect(()=>{A(h.model??""),u(h.approvalMode??""),g(h.sandbox??"")},[h.model,h.approvalMode,h.sandbox]);const l=(h.model??"")!==O||(h.approvalMode??"")!==r||(h.sandbox??"")!==d,m=async C=>{if(C.preventDefault(),!l||w)return;const p={};(h.model??"")!==O&&(p.model=O||void 0),(h.approvalMode??"")!==r&&(p.approvalMode=r||void 0),(h.sandbox??"")!==d&&(p.sandbox=d||void 0),await S(p)},b=S2[s];return v.jsxs("form",{onSubmit:m,className:"space-y-3 p-4 border border-warm-200 rounded-xl",children:[v.jsx("h4",{className:"text-sm font-semibold text-warm-700",children:M("harness.section.settings")}),v.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[v.jsxs("div",{children:[v.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:M("harness.field.model")}),v.jsx("input",{type:"text",value:O,onChange:C=>A(C.target.value),placeholder:M(`harness.field.modelPlaceholder.${s}`),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),v.jsxs("div",{children:[v.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:M("harness.field.approvalMode")}),v.jsxs("select",{value:r,onChange:C=>u(C.target.value),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent",children:[v.jsx("option",{value:"",children:M("harness.field.unset")}),w2[s].map(C=>v.jsx("option",{value:C,children:C},C))]})]}),b.length>0&&v.jsxs("div",{children:[v.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:M("harness.field.sandbox")}),v.jsxs("select",{value:d,onChange:C=>g(C.target.value),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent",children:[v.jsx("option",{value:"",children:M("harness.field.unset")}),b.map(C=>v.jsx("option",{value:C,children:C},C))]})]})]}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(Li,{type:"submit",variant:"primary",size:"sm",disabled:!l||w,children:M(w?"harness.saving":"harness.save")}),!l&&v.jsx("span",{className:"text-xs text-warm-400",children:M("harness.noChanges")})]})]})}function Xg(s,h){if(!h)return[];const w=[],S=s.toLowerCase(),M=h.toLowerCase();let O=S.indexOf(M);for(;O!==-1;)w.push(O),O=S.indexOf(M,O+M.length);return w}function Vg({filePath:s,content:h,saving:w,onSave:S}){const{t:M}=Tt(),[O,A]=j.useState(h),[r,u]=j.useState(!1),[d,g]=j.useState(!1),[l,m]=j.useState(""),[b,C]=j.useState(0),[p,a]=j.useState(null),c=j.useRef(null),o=j.useRef(null),f=j.useRef(null);j.useEffect(()=>{A(h)},[h]);const y=O!==h,R=s.split(/[\\/]/).pop()||s,k=j.useMemo(()=>Xg(O,l),[O,l]),D=k.length?Math.min(b,k.length-1):0,E=(U,T)=>{const F=c.current;if(!F)return;F.setSelectionRange(U,U+T);const B=parseFloat(getComputedStyle(F).lineHeight)||16,W=O.slice(0,U).split(`
|
|
423
|
-
`).length-1;F.scrollTop=Math.max(0,W*B-F.clientHeight/2)},L=()=>{g(!0),requestAnimationFrame(()=>{var U;return(U=o.current)==null?void 0:U.select()})},z=()=>{var U;g(!1),(U=c.current)==null||U.focus()},H=U=>{m(U),C(0);const T=Xg(O,U);T.length&&E(T[0],U.length)},P=U=>{if(!k.length)return;const T=(D+U+k.length)%k.length;C(T),E(k[T],l.length)},I=U=>{(U.ctrlKey||U.metaKey)&&U.key.toLowerCase()==="f"&&(U.preventDefault(),L())},K=U=>{const T=c.current;T&&(U.preventDefault(),U.currentTarget.setPointerCapture(U.pointerId),f.current={startY:U.clientY,startHeight:T.getBoundingClientRect().height})},X=U=>{if(!f.current)return;const T=f.current.startHeight+(U.clientY-f.current.startY);a(Math.max(120,T))},Y=()=>{f.current=null},$=U=>{U.key==="Enter"?(U.preventDefault(),P(U.shiftKey?-1:1)):U.key==="Escape"&&(U.preventDefault(),z())};return v.jsxs("div",{className:"space-y-3 p-4 border border-warm-200 rounded-xl",onKeyDown:I,children:[v.jsxs("div",{className:"flex items-center justify-between gap-2",children:[v.jsx("h4",{className:"text-sm font-semibold text-warm-700 font-mono",children:R}),v.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[v.jsx("code",{className:"text-[10px] text-warm-400 truncate",title:s,children:s}),v.jsx("button",{type:"button",onClick:L,className:"p-1 text-warm-400 hover:text-warm-600 hover:bg-warm-100 rounded-md transition-colors flex-shrink-0",title:M("harness.find.open"),children:v.jsx(ag,{size:14})}),v.jsx("button",{type:"button",onClick:()=>{u(U=>!U),a(null)},className:"p-1 text-warm-400 hover:text-warm-600 hover:bg-warm-100 rounded-md transition-colors flex-shrink-0",title:r?M("harness.memory.collapse")||"Collapse":M("harness.memory.expand")||"Expand",children:r?v.jsx(Th,{size:14}):v.jsx(El,{size:14})})]})]}),d&&v.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 border border-warm-200 rounded-lg bg-warm-50",children:[v.jsx(ag,{size:14,className:"text-warm-400 flex-shrink-0"}),v.jsx("input",{ref:o,type:"text",value:l,onChange:U=>H(U.target.value),onKeyDown:$,placeholder:M("harness.find.placeholder"),spellCheck:!1,className:"flex-1 min-w-0 text-xs bg-transparent text-warm-700 focus:outline-none"}),v.jsx("span",{className:"text-[11px] text-warm-400 tabular-nums flex-shrink-0",children:l?`${k.length?D+1:0}/${k.length}`:""}),v.jsx("button",{type:"button",onClick:()=>P(-1),disabled:!k.length,className:"p-0.5 text-warm-400 hover:text-warm-600 disabled:opacity-40 rounded-md transition-colors",title:M("harness.find.prev"),children:v.jsx(Cv,{size:14})}),v.jsx("button",{type:"button",onClick:()=>P(1),disabled:!k.length,className:"p-0.5 text-warm-400 hover:text-warm-600 disabled:opacity-40 rounded-md transition-colors",title:M("harness.find.next"),children:v.jsx(Dh,{size:14})}),v.jsx("button",{type:"button",onClick:z,className:"p-0.5 text-warm-400 hover:text-warm-600 rounded-md transition-colors",title:M("harness.find.close"),children:v.jsx(Ri,{size:14})})]}),v.jsx("textarea",{ref:c,value:O,onChange:U=>A(U.target.value),placeholder:M("harness.memory.placeholder"),spellCheck:!1,style:p!==null?{height:p}:void 0,className:`w-full px-3 py-2 text-xs font-mono leading-relaxed border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent resize-none ${r?"h-[75vh]":"h-96"}`}),v.jsx("div",{onPointerDown:K,onPointerMove:X,onPointerUp:Y,onPointerCancel:Y,onDoubleClick:()=>a(null),className:"group flex items-center justify-center h-3 -mt-2 cursor-ns-resize touch-none select-none",title:M("harness.memory.resize"),children:v.jsx("div",{className:"w-12 h-1 rounded-full bg-warm-200 group-hover:bg-warm-400 transition-colors"})}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(Li,{variant:"primary",size:"sm",onClick:()=>y&&!w&&S(O),disabled:!y||w,children:M(w?"harness.saving":"harness.save")}),!y&&v.jsx("span",{className:"text-xs text-warm-400",children:M("harness.noChanges")})]})]})}function Jg(s){return Array.isArray(s)?s.filter(h=>typeof h=="object"&&h!==null):null}function C2({hooks:s,disabledHooks:h,filePath:w,saving:S,onSave:M,onToggle:O}){const{t:A}=Tt(),[r,u]=j.useState(!1),[d,g]=j.useState(""),[l,m]=j.useState(null),b=Array.from(new Set([...Object.keys(s??{}),...Object.keys(h??{})])),C=b.length>0,p=Object.keys(h??{}).length>0,a=(o,f,y,R)=>v.jsxs("div",{className:"flex items-start gap-2 text-[11px]",children:[v.jsx("input",{type:"checkbox",checked:R,disabled:S,onChange:()=>O(o,y,!R),title:A(R?"harness.toggle.disable":"harness.toggle.enable"),className:"mt-0.5 flex-shrink-0 cursor-pointer"}),v.jsxs("div",{className:`min-w-0 flex-1${R?"":" opacity-50"}`,children:[f.matcher!==void 0&&f.matcher!==""&&v.jsx("span",{className:"inline-block px-1.5 py-0.5 mr-1.5 rounded-md bg-warm-200/60 text-warm-600 font-mono",children:f.matcher}),(f.hooks??[]).map((k,D)=>v.jsx("code",{className:"block mt-0.5 px-2 py-1 rounded-md bg-theme-card border border-warm-150 text-warm-600 font-mono whitespace-pre-wrap break-all",children:k.command??JSON.stringify(k)},D))]})]},`${R?"on":"off"}-${y}`);j.useEffect(()=>{g(JSON.stringify(s??{},null,2)),m(null)},[s]);const c=async()=>{let o;try{o=JSON.parse(d)}catch{m(A("harness.hooks.invalidJson")||"Invalid JSON");return}if(typeof o!="object"||o===null||Array.isArray(o)){m(A("harness.hooks.invalidJson")||"Invalid JSON");return}m(null);const f=o;await M(Object.keys(f).length===0?null:f),u(!1)};return v.jsxs("div",{className:"space-y-3 p-4 border border-warm-200 rounded-xl",children:[v.jsxs("div",{className:"flex items-center justify-between gap-2",children:[v.jsx("h4",{className:"text-sm font-semibold text-warm-700",children:"Hooks"}),v.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[v.jsx("code",{className:"text-[10px] text-warm-400 truncate",title:w,children:w}),!r&&v.jsxs(Li,{variant:"ghost",size:"sm",onClick:()=>u(!0),className:"flex-shrink-0",children:[v.jsx(ch,{size:12}),A("harness.hooks.editJson")||"Edit JSON"]})]})]}),r?v.jsxs(v.Fragment,{children:[v.jsx("textarea",{value:d,onChange:o=>g(o.target.value),spellCheck:!1,className:"w-full h-64 px-3 py-2 text-xs font-mono leading-relaxed border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent resize-y"}),l&&v.jsx("p",{className:"text-xs text-status-error",children:l}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(Li,{variant:"primary",size:"sm",onClick:c,disabled:S,children:A(S?"harness.saving":"harness.save")}),v.jsx(Li,{variant:"ghost",size:"sm",onClick:()=>{g(JSON.stringify(s??{},null,2)),m(null),u(!1)},children:A("harness.cancel")})]})]}):C?v.jsxs("div",{className:"space-y-2",children:[b.map(o=>{const f=s==null?void 0:s[o],y=f===void 0?[]:Jg(f),R=Jg(h==null?void 0:h[o])??[];return v.jsxs("div",{className:"p-2.5 bg-warm-50 border border-warm-150 rounded-lg",children:[v.jsx("div",{className:"text-xs font-semibold text-warm-700 font-mono mb-1.5",children:o}),v.jsxs("div",{className:"space-y-1.5",children:[y?y.map((k,D)=>a(o,k,D,!0)):v.jsx("pre",{className:"text-[11px] text-warm-500 font-mono whitespace-pre-wrap break-all",children:JSON.stringify(f,null,2)}),R.map((k,D)=>a(o,k,D,!1))]})]},o)}),p&&v.jsx("p",{className:"text-[11px] text-warm-400",children:A("harness.hooks.parkedNote")})]}):v.jsx("p",{className:"text-xs text-warm-400",children:A("harness.hooks.empty")||"No hooks configured."})]})}function k2({skills:s,saving:h,onSave:w,onToggle:S}){const{t:M}=Tt(),[O,A]=j.useState(null),[r,u]=j.useState(""),d=s??[],g=d.find(b=>b.name===O)??null,l=!!g&&r!==g.content,m=b=>{if(O===b.name){A(null);return}A(b.name),u(b.content)};return v.jsxs("div",{className:"space-y-3 p-4 border border-warm-200 rounded-xl",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h4",{className:"text-sm font-semibold text-warm-700",children:"Skills"}),v.jsx("code",{className:"text-[10px] text-warm-400",children:".claude/skills/"})]}),d.length===0?v.jsx("p",{className:"text-xs text-warm-400",children:M("harness.skills.empty")||"No skills found."}):v.jsx("div",{className:"space-y-1.5",children:d.map(b=>{const C=O===b.name;return v.jsxs("div",{className:"border border-warm-150 rounded-lg overflow-hidden",children:[v.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 bg-warm-50 hover:bg-warm-100 transition-colors",children:[v.jsx("input",{type:"checkbox",checked:b.enabled,disabled:h,onChange:()=>S(b.name,!b.enabled),title:b.enabled?M("harness.toggle.disable"):M("harness.toggle.enable"),className:"mt-0.5 flex-shrink-0 cursor-pointer"}),v.jsxs("button",{type:"button",onClick:()=>m(b),className:`flex-1 min-w-0 flex items-start gap-2 text-left${b.enabled?"":" opacity-50"}`,children:[v.jsx("span",{className:"mt-0.5 text-warm-400 flex-shrink-0",children:C?v.jsx(Dh,{size:14}):v.jsx(s1,{size:14})}),v.jsxs("span",{className:"min-w-0",children:[v.jsxs("span",{className:"block text-xs font-semibold text-warm-700 font-mono",children:["/",b.name]}),b.description&&v.jsx("span",{className:"block text-[11px] text-warm-400 mt-0.5 line-clamp-2",children:b.description})]})]})]}),C&&v.jsxs("div",{className:"p-3 space-y-2 border-t border-warm-150",children:[v.jsx("code",{className:"block text-[10px] text-warm-400 truncate",title:b.path,children:b.path}),v.jsx("textarea",{value:r,onChange:p=>u(p.target.value),spellCheck:!1,className:"w-full h-80 px-3 py-2 text-xs font-mono leading-relaxed border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent resize-y"}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(Li,{variant:"primary",size:"sm",onClick:()=>l&&!h&&w(b.name,r),disabled:!l||h,children:M(h?"harness.saving":"harness.save")}),!l&&v.jsx("span",{className:"text-xs text-warm-400",children:M("harness.noChanges")})]})]})]},b.name)})})]})}function Qg(s){const h={};for(const w of s.split(`
|
|
424
|
-
`)){const S=w.trim();if(!S)continue;const M=S.indexOf("=");if(M<0)continue;const O=S.slice(0,M).trim(),A=S.slice(M+1).trim();O&&(h[O]=A)}return h}function Zg(s){return s?Object.entries(s).map(([h,w])=>`${h}=${w}`).join(`
|
|
425
|
-
`):""}function E2({open:s,initial:h,existingAliases:w,saving:S,onCancel:M,onSave:O}){const{t:A}=Tt(),[r,u]=j.useState(""),[d,g]=j.useState("stdio"),[l,m]=j.useState(""),[b,C]=j.useState(""),[p,a]=j.useState(""),[c,o]=j.useState(""),[f,y]=j.useState(""),[R,k]=j.useState(null);j.useEffect(()=>{s&&(u((h==null?void 0:h.alias)??""),g((h==null?void 0:h.transport)??"stdio"),m((h==null?void 0:h.command)??""),C(((h==null?void 0:h.args)??[]).join(" ")),a(Zg(h==null?void 0:h.env)),o((h==null?void 0:h.url)??""),y(Zg(h==null?void 0:h.headers)),k(null))},[s,h]);const D=!!h,E=async L=>{if(L.preventDefault(),S)return;if(!r.trim()){k(A("harness.mcp.errAlias"));return}if(!D&&w.includes(r.trim())){k(A("harness.mcp.errAliasExists"));return}const z={alias:r.trim(),transport:d};if(d==="stdio"){if(!l.trim()){k(A("harness.mcp.errCommand"));return}z.command=l.trim();const H=b.trim()?b.trim().split(/\s+/):[];H.length>0&&(z.args=H);const P=Qg(p);Object.keys(P).length>0&&(z.env=P)}else{if(!c.trim()){k(A("harness.mcp.errUrl"));return}z.url=c.trim();const H=Qg(f);Object.keys(H).length>0&&(z.headers=H)}try{await O(z)}catch(H){k(H instanceof Error?H.message:String(H))}};return v.jsx(za,{open:s,onClose:M,size:"lg",children:v.jsxs("form",{onSubmit:E,className:"bg-warm-0 rounded-2xl shadow-elevated p-5 space-y-4",children:[v.jsx("h3",{className:"text-base font-semibold text-warm-700",children:A(D?"harness.mcp.editTitle":"harness.mcp.addTitle")}),v.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[v.jsxs("div",{children:[v.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:A("harness.mcp.alias")}),v.jsx("input",{type:"text",value:r,onChange:L=>u(L.target.value),disabled:D,placeholder:"memory",className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent disabled:opacity-50"})]}),v.jsxs("div",{children:[v.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:A("harness.mcp.transport")}),v.jsxs("select",{value:d,onChange:L=>g(L.target.value),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent",children:[v.jsx("option",{value:"stdio",children:"stdio"}),v.jsx("option",{value:"http",children:"http"}),v.jsx("option",{value:"sse",children:"sse"})]})]})]}),d==="stdio"?v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{children:[v.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:A("harness.mcp.command")}),v.jsx("input",{type:"text",value:l,onChange:L=>m(L.target.value),placeholder:"npx",className:"w-full px-3 py-1.5 text-xs font-mono border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),v.jsxs("div",{children:[v.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:A("harness.mcp.args")}),v.jsx("input",{type:"text",value:b,onChange:L=>C(L.target.value),placeholder:"-y @modelcontextprotocol/server-memory",className:"w-full px-3 py-1.5 text-xs font-mono border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),v.jsxs("div",{children:[v.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:A("harness.mcp.env")}),v.jsx("textarea",{value:p,onChange:L=>a(L.target.value),placeholder:`API_KEY=...
|
|
426
|
-
DEBUG=1`,rows:3,className:"w-full px-3 py-1.5 text-xs font-mono border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent resize-y"})]})]}):v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{children:[v.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:A("harness.mcp.url")}),v.jsx("input",{type:"text",value:c,onChange:L=>o(L.target.value),placeholder:"https://example.com/mcp",className:"w-full px-3 py-1.5 text-xs font-mono border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),v.jsxs("div",{children:[v.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:A("harness.mcp.headers")}),v.jsx("textarea",{value:f,onChange:L=>y(L.target.value),placeholder:"Authorization=Bearer ...",rows:3,className:"w-full px-3 py-1.5 text-xs font-mono border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent resize-y"})]})]}),R&&v.jsx("p",{className:"text-xs text-status-error",children:R}),v.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2 border-t border-warm-150",children:[v.jsx(Li,{variant:"secondary",size:"sm",onClick:M,disabled:S,children:A("harness.cancel")}),v.jsx(Li,{type:"submit",variant:"primary",size:"sm",disabled:S,children:A(S?"harness.saving":"harness.save")})]})]})})}function L2(s){return s.length<=4?"****":`${s.slice(0,2)}${"*".repeat(Math.min(s.length-4,8))}${s.slice(-2)}`}function R2(s){if(s.transport==="stdio"){const h=s.args?" "+s.args.join(" "):"";return`${s.command??""}${h}`.trim()||"—"}return s.url??"—"}function D2({servers:s,saving:h,onUpsert:w,onRemove:S}){const{t:M}=Tt(),{confirm:O}=kr(),[A,r]=j.useState(null),[u,d]=j.useState(!1),[g,l]=j.useState(null),m=()=>{r(null),d(!0)},b=a=>{r(a),d(!0)},C=async a=>{await w(a),d(!1),r(null)},p=async a=>{if(await O({message:M("harness.mcp.confirmRemove").replace("{alias}",a),danger:!0})){l(a);try{await S(a)}finally{l(null)}}};return v.jsxs("div",{className:"space-y-3 p-4 border border-warm-200 rounded-xl",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h4",{className:"text-sm font-semibold text-warm-700",children:M("harness.section.mcp")}),v.jsxs(Li,{variant:"primary",size:"sm",onClick:m,children:["+ ",M("harness.mcp.add")]})]}),s.length===0?v.jsx("p",{className:"text-xs text-warm-400",children:M("harness.mcp.empty")}):v.jsx("ul",{className:"space-y-2",children:s.map(a=>{const c=!!(a.env&&Object.keys(a.env).length>0)||!!(a.headers&&Object.keys(a.headers).length>0);return v.jsxs("li",{className:"p-3 border border-warm-150 rounded-lg bg-warm-50 flex items-start justify-between gap-3",children:[v.jsxs("div",{className:"min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[v.jsx("code",{className:"text-xs font-semibold text-warm-700",children:a.alias}),v.jsx("span",{className:"text-[10px] uppercase px-1.5 py-0.5 rounded-md bg-warm-200 text-warm-500",children:a.transport}),c&&v.jsx("span",{className:"text-[10px] uppercase px-1.5 py-0.5 rounded-md bg-warm-150 text-warm-500",children:"env"})]}),v.jsx("code",{className:"text-xs font-mono text-warm-500 break-all",children:R2(a)}),a.env&&Object.keys(a.env).length>0&&v.jsx("div",{className:"mt-1 text-[10px] font-mono text-warm-400 space-y-0.5",children:Object.entries(a.env).map(([o,f])=>v.jsxs("div",{children:[o,"=",L2(f)]},o))})]}),v.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[v.jsx(Li,{variant:"secondary",size:"sm",onClick:()=>b(a),children:M("harness.edit")}),v.jsx(Li,{variant:"danger",size:"sm",onClick:()=>p(a.alias),disabled:g===a.alias,children:g===a.alias?"…":M("harness.delete")})]})]},a.alias)})}),v.jsx(E2,{open:u,initial:A,existingAliases:s.map(a=>a.alias),saving:h,onCancel:()=>{d(!1),r(null)},onSave:C})]})}function T2({projectId:s,cli:h,snapshot:w,onChange:S}){const{t:M}=Tt(),{confirm:O}=kr(),[A,r]=j.useState(!1),[u,d]=j.useState(!1),[g,l]=j.useState(!1),[m,b]=j.useState(!1),[C,p]=j.useState(!1),[a,c]=j.useState(!1),[o,f]=j.useState(!1),[y,R]=j.useState(!1),[k,D]=j.useState(null),E=async U=>{r(!0),D(null);try{const T=await h2(s,h,U);S(T)}catch(T){D(T instanceof Error?T.message:String(T))}finally{r(!1)}},L=async U=>{d(!0),D(null);try{await d2(s,h,U);const T=await Kg(s,h);S(T)}catch(T){D(T instanceof Error?T.message:String(T))}finally{d(!1)}},z=async U=>{l(!0),D(null);try{await f2(s,h,U);const T=await Kg(s,h);S(T)}catch(T){D(T instanceof Error?T.message:String(T))}finally{l(!1)}},H=async U=>{b(!0),D(null);try{const T=await p2(s,h,U);S(T)}catch(T){D(T instanceof Error?T.message:String(T))}finally{b(!1)}},P=async(U,T,F)=>{b(!0),D(null);try{const B=await m2(s,h,U,T,F);S(B)}catch(B){D(B instanceof Error?B.message:String(B))}finally{b(!1)}},I=async(U,T)=>{p(!0),D(null);try{const F=await g2(s,h,U,T);S(F)}catch(F){D(F instanceof Error?F.message:String(F))}finally{p(!1)}},K=async(U,T)=>{p(!0),D(null);try{const F=await v2(s,h,U,T);S(F)}catch(F){D(F instanceof Error?F.message:String(F))}finally{p(!1)}},X=async()=>{if(await O(M("harness.port.confirm"))){R(!0),D(null);try{const U=await _2(s,h);S(U)}catch(U){D(U instanceof Error?U.message:String(U))}finally{R(!1)}}},Y=async U=>{c(!0),D(null);try{const T=await b2(s,h,U);S({...w,mcp:T})}catch(T){throw D(T instanceof Error?T.message:String(T)),T}finally{c(!1)}},$=async U=>{c(!0),D(null);try{const T=await y2(s,h,U);S({...w,mcp:T})}catch(T){D(T instanceof Error?T.message:String(T))}finally{c(!1)}};return v.jsxs("div",{className:"space-y-4",children:[k&&v.jsx("div",{className:"p-3 rounded-lg bg-status-error/5 text-xs text-status-error",children:k}),w.warnings.includes("codex.trustLevelMissing")&&v.jsxs("div",{className:"p-3 border border-status-warning/30 rounded-lg bg-status-warning/5 text-xs text-warm-600",children:[v.jsx("p",{className:"font-semibold mb-1",children:M("harness.warning.codexTrustLevel.title")}),v.jsx("p",{className:"mb-2",children:M("harness.warning.codexTrustLevel.body")}),v.jsx("pre",{className:"px-2 py-1 bg-warm-50 border border-warm-150 rounded-md text-[11px] font-mono whitespace-pre-wrap break-all",children:`[projects."${w.filePaths.settings.replace(/[\\/]\.codex[\\/]config\.toml$/,"").replace(/\\/g,"\\\\")}"]
|
|
427
|
-
trust_level = "trusted"`})]}),h==="codex"&&v.jsx("div",{className:"p-3 border border-warm-200 rounded-lg bg-warm-50 text-xs text-warm-500",children:M("harness.warning.tomlComments")}),h!=="claude"&&v.jsxs("div",{className:"flex items-center justify-between gap-3 p-3 border border-warm-200 rounded-lg bg-warm-50",children:[v.jsx("p",{className:"text-xs text-warm-500",children:M("harness.port.note")}),v.jsx(Li,{variant:"primary",size:"sm",onClick:X,disabled:y,className:"shrink-0",children:M(y?"harness.port.running":"harness.port.button")})]}),v.jsx(x2,{cli:h,settings:w.settings,saving:A,onSave:E}),v.jsx(Vg,{filePath:w.filePaths.memory,content:w.memory,saving:u,onSave:L}),h==="claude"&&w.filePaths.localMemory&&(w.localMemoryExists||o?v.jsx(Vg,{filePath:w.filePaths.localMemory,content:w.localMemory??"",saving:g,onSave:z}):v.jsxs("button",{type:"button",onClick:()=>f(!0),className:"w-full flex items-center justify-center gap-1.5 px-3 py-2.5 text-xs text-warm-400 hover:text-warm-600 border border-dashed border-warm-200 hover:border-warm-300 rounded-xl transition-colors",children:[v.jsx(Tn,{size:14}),M("harness.localMemory.create")||"Create CLAUDE.local.md"]})),h==="claude"&&v.jsxs(v.Fragment,{children:[v.jsx(C2,{hooks:w.hooks,disabledHooks:w.disabledHooks,filePath:w.filePaths.settings,saving:m,onSave:H,onToggle:P}),v.jsx(k2,{skills:w.skills,saving:C,onSave:K,onToggle:I})]}),v.jsx(D2,{servers:w.mcp,saving:a,onUpsert:Y,onRemove:$})]})}const M2=["claude","antigravity","codex"],L_="harness:active-cli";function A2(s){try{const h=localStorage.getItem(`${L_}:${s}`);if(h==="claude"||h==="antigravity"||h==="codex")return h}catch{}return"claude"}function j2(s,h){try{localStorage.setItem(`${L_}:${s}`,h)}catch{}}function O2({project:s}){const{t:h}=Tt(),[w,S]=j.useState(null),[M,O]=j.useState(()=>A2(s.id)),[A,r]=j.useState(null);j.useEffect(()=>{let g=!1;return r(null),S(null),u2(s.id).then(l=>{g||S(l)}).catch(l=>{g||r(l instanceof Error?l.message:String(l))}),()=>{g=!0}},[s.id]);const u=g=>{O(g),j2(s.id,g)},d=(g,l)=>{S(m=>m&&{...m,[g]:l})};return v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{className:"p-3 border border-status-warning/30 rounded-lg bg-status-warning/5 text-xs text-warm-600",children:[v.jsx("p",{className:"font-semibold mb-1",children:h("harness.warning.worktreeIsolation.title")}),v.jsx("p",{children:h("harness.warning.worktreeIsolation.body")})]}),v.jsx("div",{className:"flex items-center gap-1 border-b border-warm-200",children:M2.map(g=>v.jsx("button",{type:"button",onClick:()=>u(g),className:`px-4 py-2 text-xs font-medium border-b-2 -mb-px transition-colors ${M===g?"border-accent text-accent-dark":"border-transparent text-warm-500 hover:text-warm-700"}`,children:h(`harness.cli.${g}`)},g))}),A&&v.jsx("div",{className:"p-3 rounded-lg bg-status-error/5 text-xs text-status-error",children:A}),!w&&!A&&v.jsx("p",{className:"text-xs text-warm-400",children:h("harness.loading")}),w&&v.jsx(T2,{projectId:s.id,cli:M,snapshot:w[M],onChange:g=>d(M,g)})]})}function B2(s){return null}const N2={id:"harness",displayName:"Harness",displayNameKo:"하네스",PanelComponent:O2,SettingsComponent:B2,hasTab:!1,isEnabled:s=>!!s.path,translations:{en:{"tabs.harness":"Harness","tabs.harness.help":"Edit your global Claude/Antigravity/Codex CLI config — settings, memory, and MCP servers — without leaving the project. Note: changes affect your user-level CLI dirs, not the worktree.","harness.settingsTitle":"Harness Configuration","harness.settingsDesc":"Edit Claude / Antigravity / Codex CLI settings, memory files, and MCP servers.","harness.loading":"Loading harness configuration…","harness.cli.claude":"Claude","harness.cli.antigravity":"Antigravity","harness.cli.codex":"Codex","harness.section.settings":"Settings","harness.section.mcp":"MCP Servers","harness.field.model":"Model","harness.field.modelPlaceholder.claude":"e.g. claude-sonnet-4-6","harness.field.modelPlaceholder.antigravity":"e.g. leave blank for default","harness.field.modelPlaceholder.codex":"e.g. gpt-5","harness.field.approvalMode":"Approval Mode","harness.field.sandbox":"Sandbox","harness.field.unset":"(unset)","harness.save":"Save","harness.saving":"Saving…","harness.cancel":"Cancel","harness.edit":"Edit","harness.delete":"Delete","harness.noChanges":"No changes","harness.memory.placeholder":"Project context the AI should always know about (preferences, conventions, key files)…","harness.memory.expand":"Expand editor","harness.memory.collapse":"Collapse editor","harness.localMemory.create":"Create CLAUDE.local.md","harness.memory.resize":"Drag to resize, double-click to reset","harness.find.open":"Find (Ctrl+F)","harness.find.placeholder":"Find… (Enter: next, Shift+Enter: previous)","harness.find.prev":"Previous match","harness.find.next":"Next match","harness.find.close":"Close (Esc)","harness.hooks.empty":"No hooks configured.","harness.hooks.editJson":"Edit JSON","harness.hooks.invalidJson":"Invalid JSON — fix the syntax and try again.","harness.hooks.parkedNote":"Disabled hooks are kept in .claude/hooks.disabled.json and restored when re-enabled.","harness.skills.empty":"No skills in .claude/skills/.","harness.toggle.enable":"Enable","harness.toggle.disable":"Disable","harness.port.button":"Import from Claude","harness.port.running":"Importing…","harness.port.note":"Inline CLAUDE.md and .claude/skills/ into AGENTS.md. Hooks are not ported — this CLI has no hook mechanism.","harness.port.confirm":"Port CLAUDE.md + skills into AGENTS.md? A marked block is inserted (or replaced on re-port); content outside the block is kept.","harness.mcp.add":"Add Server","harness.mcp.empty":"No MCP servers configured.","harness.mcp.addTitle":"Add MCP Server","harness.mcp.editTitle":"Edit MCP Server","harness.mcp.alias":"Alias","harness.mcp.transport":"Transport","harness.mcp.command":"Command","harness.mcp.args":"Arguments (space-separated)","harness.mcp.env":"Environment (one KEY=VALUE per line)","harness.mcp.url":"URL","harness.mcp.headers":"Headers (one KEY=VALUE per line)","harness.mcp.confirmRemove":'Remove MCP server "{alias}"?',"harness.mcp.errAlias":"Alias is required.","harness.mcp.errAliasExists":"An MCP server with this alias already exists.","harness.mcp.errCommand":"Command is required for stdio transport.","harness.mcp.errUrl":"URL is required for HTTP/SSE transport.","harness.warning.worktreeIsolation.title":"Edits apply outside CLITrigger worktrees","harness.warning.worktreeIsolation.body":"Changes are saved to the project root. CLI tools launched directly from your terminal pick them up immediately. CLITrigger todos run inside .worktrees/<branch>/, so tracked files (CLAUDE.md, .claude/settings.json) are only included once you commit, and untracked files (.mcp.json, settings.local.json) are not copied automatically.","harness.warning.tomlComments":"Note: saving Codex config.toml via this UI may strip existing comments. Edit the file in a text editor if you want to preserve them.","harness.warning.codexTrustLevel.title":"Codex trust level required","harness.warning.codexTrustLevel.body":"Codex only loads project-level config.toml when this project is marked trusted in your user-global ~/.codex/config.toml. Add the snippet below to enable it:"},ko:{"tabs.harness":"하네스","tabs.harness.help":"Claude/Antigravity/Codex의 사용자 설정·메모리·MCP 서버를 한 곳에서 편집. 변경은 worktree가 아니라 사용자 글로벌 CLI 디렉토리에 적용됩니다.","harness.settingsTitle":"하네스 구성","harness.settingsDesc":"Claude / Antigravity / Codex CLI 설정·메모리 파일·MCP 서버를 편집합니다.","harness.loading":"하네스 구성 불러오는 중…","harness.cli.claude":"Claude","harness.cli.antigravity":"Antigravity","harness.cli.codex":"Codex","harness.section.settings":"설정","harness.section.mcp":"MCP 서버","harness.field.model":"모델","harness.field.modelPlaceholder.claude":"예: claude-sonnet-4-6","harness.field.modelPlaceholder.antigravity":"예: 비워두면 기본값","harness.field.modelPlaceholder.codex":"예: gpt-5","harness.field.approvalMode":"승인 모드","harness.field.sandbox":"샌드박스","harness.field.unset":"(미설정)","harness.save":"저장","harness.saving":"저장 중…","harness.cancel":"취소","harness.edit":"편집","harness.delete":"삭제","harness.noChanges":"변경사항 없음","harness.memory.placeholder":"AI가 항상 알고 있어야 할 프로젝트 컨텍스트(취향, 컨벤션, 주요 파일)…","harness.memory.expand":"에디터 확대","harness.memory.collapse":"에디터 축소","harness.localMemory.create":"CLAUDE.local.md 만들기","harness.memory.resize":"드래그로 높이 조절, 더블클릭으로 초기화","harness.find.open":"찾기 (Ctrl+F)","harness.find.placeholder":"찾기… (Enter: 다음, Shift+Enter: 이전)","harness.find.prev":"이전 결과","harness.find.next":"다음 결과","harness.find.close":"닫기 (Esc)","harness.hooks.empty":"설정된 hook이 없습니다.","harness.hooks.editJson":"JSON 편집","harness.hooks.invalidJson":"JSON 형식이 올바르지 않습니다. 수정 후 다시 저장하세요.","harness.hooks.parkedNote":"꺼진 훅은 .claude/hooks.disabled.json 에 보관되며, 다시 켜면 복원됩니다.","harness.skills.empty":".claude/skills/ 에 스킬이 없습니다.","harness.toggle.enable":"켜기","harness.toggle.disable":"끄기","harness.port.button":"Claude에서 가져오기","harness.port.running":"가져오는 중…","harness.port.note":"CLAUDE.md와 .claude/skills/ 를 AGENTS.md에 인라인합니다. 훅은 이 CLI에 실행 메커니즘이 없어 포팅되지 않습니다.","harness.port.confirm":"CLAUDE.md + 스킬을 AGENTS.md로 포팅할까요? 마커 블록으로 삽입되며(재실행 시 블록만 교체), 블록 밖 내용은 유지됩니다.","harness.mcp.add":"서버 추가","harness.mcp.empty":"등록된 MCP 서버가 없습니다.","harness.mcp.addTitle":"MCP 서버 추가","harness.mcp.editTitle":"MCP 서버 편집","harness.mcp.alias":"별칭","harness.mcp.transport":"전송 방식","harness.mcp.command":"명령어","harness.mcp.args":"인자 (공백 구분)","harness.mcp.env":"환경 변수 (한 줄에 KEY=VALUE)","harness.mcp.url":"URL","harness.mcp.headers":"헤더 (한 줄에 KEY=VALUE)","harness.mcp.confirmRemove":'MCP 서버 "{alias}" 을(를) 삭제할까요?',"harness.mcp.errAlias":"별칭은 필수입니다.","harness.mcp.errAliasExists":"이미 같은 별칭의 MCP 서버가 있습니다.","harness.mcp.errCommand":"stdio 전송 방식에는 명령어가 필요합니다.","harness.mcp.errUrl":"HTTP/SSE 전송 방식에는 URL이 필요합니다.","harness.warning.worktreeIsolation.title":"편집 사항은 CLITrigger worktree 밖에 적용됩니다","harness.warning.worktreeIsolation.body":"변경 사항은 프로젝트 루트에 저장됩니다. 터미널에서 CLI를 직접 띄울 때는 바로 적용되지만, CLITrigger의 todo는 .worktrees/<branch>/ 안에서 실행되므로 추적 파일(CLAUDE.md, .claude/settings.json)은 커밋해야 다음 worktree 생성 시 반영되고, untracked 파일(.mcp.json, settings.local.json)은 자동으로 복사되지 않습니다.","harness.warning.tomlComments":"참고: 이 UI로 Codex config.toml을 저장하면 기존 주석이 사라질 수 있습니다. 주석을 보존하려면 텍스트 에디터에서 직접 편집하세요.","harness.warning.codexTrustLevel.title":"Codex 신뢰 수준이 필요합니다","harness.warning.codexTrustLevel.body":"Codex는 ~/.codex/config.toml에 이 프로젝트가 trusted로 등록된 경우에만 프로젝트별 config.toml을 읽습니다. 아래 스니펫을 추가하세요:"}}};function z2(){Bw(N2)}const H2={success:o1,error:c1,warning:kv,info:T1},P2={success:"text-status-success",error:"text-status-error",warning:"text-status-warning",info:"text-accent"},I2={success:"bg-status-success",error:"bg-status-error",warning:"bg-status-warning",info:"bg-accent"};function F2({toast:s,onDismiss:h}){const[w,S]=j.useState(!1),M=H2[s.type],O=s.duration??3500;return j.useEffect(()=>{const A=requestAnimationFrame(()=>S(!0));return()=>cancelAnimationFrame(A)},[]),v.jsxs("div",{role:s.type==="error"?"alert":"status","aria-atomic":"true",className:Dn("relative flex items-start gap-3 px-4 py-3 rounded-xl shadow-elevated overflow-hidden","bg-theme-card border border-theme-border min-w-[280px] max-w-sm","transition-all duration-300",w?"animate-slide-in-right opacity-100":"opacity-0 translate-x-8"),children:[v.jsx(M,{size:16,className:Dn("mt-0.5 flex-shrink-0",P2[s.type])}),v.jsx("p",{className:"text-xs text-theme-text flex-1 leading-snug",children:s.message}),v.jsx("button",{type:"button","aria-label":"Dismiss notification",onClick:()=>h(s.id),className:"p-0.5 rounded-md text-theme-muted hover:text-theme-text transition-colors flex-shrink-0",children:v.jsx(Ri,{size:12})}),v.jsx("div",{className:Dn("absolute bottom-0 left-0 h-0.5",I2[s.type]),style:{animation:`toastProgress ${O}ms linear forwards`}})]})}function U2({toasts:s,onDismiss:h}){return s.length===0?null:zi.createPortal(v.jsx("div",{"aria-live":"polite","aria-relevant":"additions",className:"fixed bottom-6 right-6 z-toast flex flex-col gap-2 items-end",children:s.map(w=>v.jsx(F2,{toast:w,onDismiss:h},w.id))}),document.body)}class $2 extends j.Component{constructor(){super(...arguments);jm(this,"state",{error:null})}static getDerivedStateFromError(w){return{error:w}}componentDidCatch(w,S){console.error("[app] render failed:",w,S),window.dispatchEvent(new CustomEvent("app:render-error",{detail:w}))}render(){return this.state.error?v.jsx("main",{className:"min-h-screen bg-theme-bg flex items-center justify-center p-6",children:v.jsxs("section",{role:"alert",className:"card w-full max-w-lg p-8 text-center shadow-elevated",children:[v.jsx(bS,{size:32,className:"mx-auto mb-4 text-status-error"}),v.jsx("h1",{className:"text-xl font-semibold text-theme-text mb-2",children:this.props.title}),v.jsx("p",{className:"text-sm text-theme-text-secondary mb-6",children:this.props.description}),v.jsxs("button",{type:"button",className:"btn-primary mx-auto",onClick:()=>window.location.reload(),children:[v.jsx(Av,{size:16}),this.props.reloadLabel]})]})}):this.props.children}}function W2({children:s}){const{t:h}=Tt();return v.jsx($2,{title:h("errors.renderTitle"),description:h("errors.renderDescription"),reloadLabel:h("errors.reload"),children:s})}z2();const rn=window.electronAPI;var ev;(ev=rn==null?void 0:rn.onTerminalZoom)==null||ev.call(rn,s=>{var h;document.querySelector("[data-term-container]:hover")||(h=rn.zoomPage)==null||h.call(rn,s)});function q2(){const{toasts:s,error:h,dismiss:w}=cn(),{t:S}=Tt();return j.useEffect(()=>{const M=u=>{if(Gv(u,"").includes("(reading 'dimensions')")){console.debug("[global-error] suppressed xterm teardown error:",u);return}console.error("[global-error]",u),h(u instanceof pl?u.message:S("errors.unexpected"),7e3)},O=u=>{const d=u.error??u.message;if(wx(d)){u.preventDefault();return}M(d)},A=u=>M(u.reason),r=u=>M(u.detail);return window.addEventListener("error",O),window.addEventListener("unhandledrejection",A),window.addEventListener("app:render-error",r),()=>{window.removeEventListener("error",O),window.removeEventListener("unhandledrejection",A),window.removeEventListener("app:render-error",r)}},[h,S]),v.jsx(U2,{toasts:s,onDismiss:w})}function G2(){const s=qS(),h=YS();return v.jsx(Hv.Provider,{value:s,children:v.jsx(Pv.Provider,{value:h,children:v.jsx(XS,{children:v.jsxs(Hw,{children:[v.jsx(ZS,{children:v.jsx(W2,{children:v.jsx(c2,{})})}),v.jsx(q2,{})]})})})})}Xb.createRoot(document.getElementById("root")).render(v.jsx(tv.StrictMode,{children:v.jsx(G2,{})}));export{Ra as $,Q2 as A,og as B,Dh as C,bS as D,MS as E,Dv as F,S1 as G,O2 as H,Ei as I,lh as J,L1 as K,ts as L,za as M,Mv as N,eS as O,Tn as P,jv as Q,Av as R,ag as S,Ov as T,cg as U,Ee as V,vt as W,Ri as X,tk as Y,zi as Z,ja as _,Tt as a,Gk as a$,mk as a0,lk as a1,pk as a2,Sk as a3,xk as a4,$C as a5,ak as a6,ok as a7,zk as a8,Hk as a9,Ak as aA,Mk as aB,pl as aC,Li as aD,Ev as aE,h_ as aF,lx as aG,Wv as aH,XC as aI,Kk as aJ,Eg as aK,Wk as aL,Ah as aM,_r as aN,El as aO,J1 as aP,X1 as aQ,Y1 as aR,Cv as aS,Th as aT,Oy as aU,Cw as aV,Ll as aW,Z2 as aX,eC as aY,gh as aZ,qk as a_,Pk as aa,Ck as ab,kk as ac,xC as ad,CC as ae,Bk as af,vk as ag,Tk as ah,Ok as ai,jk as aj,Ik as ak,Nk as al,Rk as am,Ek as an,Lk as ao,dk as ap,fk as aq,gk as ar,Dk as as,bk as at,_k as au,yk as av,wk as aw,uk as ax,ck as ay,hk as az,cn as b,ik as b0,sk as b1,Xk as b2,Dn as b3,Rv as b4,Uk as b5,$k as b6,o1 as b7,c1 as b8,Fk as b9,BS as ba,sg as bb,yh as bc,ig as bd,wh as be,X2 as bf,VC as bg,kv as bh,v1 as bi,wS as bj,GS as bk,K2 as bl,tv as bm,V2 as bn,Kb as bo,Ve as c,kr as d,OS as e,Gv as f,Bv as g,nk as h,fi as i,v as j,Da as k,tx as l,TS as m,AS as n,_t as o,rt as p,Cr as q,j as r,Di as s,Yk as t,xl as u,s1 as v,J2 as w,ek as x,rk as y,ch as z};
|